stm32/boards/make-af-csv.py: Fix errors and improve format.#45
stm32/boards/make-af-csv.py: Fix errors and improve format.#45chrismas9 wants to merge 2 commits intoandrewleech:stm_af_csv_genfrom
Conversation
Use the GPIO xml file for the largest part in the family. Fixes missing pins on L152. Add filter for available AFs as well as available pins. This removes ETH from F405 and LCD from F427. Fix errors in ST open pin data - wrong AF number. Non AF SYS functions assigned to AF0, eg OSC. F413 PB4 & PB12. I2S3 should be AF7, not AF5. Fix I2S_CKIN is global, don't change to I2S1_CKIN. G081. Replace UCPDx_FRSTX1/UCPDx_FRSTX2 with UCPDx_FRSTX. G0B1. Replace TIMx_BK* with TIMx_BKIN*. Add EVENTOUT. L152. Remove bank B ADC pins as MicroPython does not support them. Changes to improve usefulness for pinout planning: Reorder some AFs to match old files. Most useful AF first. eg RTS before DE, SPI before I2S. Normalise names between STM32 families. Delete non AF SYS functions from AF0. Add all non AF SYS functions to SYS column after ACD. This includes OSC, DAC, BOOT*, etc. Restore pins with no AF. All discrepancies between auto-generated af.csv files and original files were investigated and compared with data sheets, reference manuals, open pin data and CubeMX. The changes are based on my best estimate of the correct AF and SYS mapping. Signed-off-by: Chris Mason <c.mason@inchipdesign.com.au>
These files were auto-generated by make-af-csv.py Signed-off-by: Chris Mason <c.mason@inchipdesign.com.au>
|
As well as not merging TIMx_ETR there is another thing I forgot to mention. Could you add the ability to specify the output file name, either from the command line / batch file or from a python script? The comment line should then get the output name, not the target. The current af.csv naming is inconsistent. Some use the crypto part, eg L4A6, others use the non crypto part, eg L496. I think some use the USB part csv file for non USB parts, eg L451. I want to clean up add add missing MCUs and adopt clearly named and correct af fies. I am experimenting with naming convention. Current think is this, but I will RFQ first: stm32_l433_l443_af.csv My goal is to make it obvious which files to use for an MCU, and have the correct file with correct AFs (eg without USB) for every MCU in a family. |
0cab69e to
802763b
Compare
Summary
Use the GPIO xml file for the largest part in the family.
Fixes missing pins on L152.
Add filter for available AFs as well as available pins.
This removes ETH from F405 and LCD from F427.
Fix errors in ST open pin data - wrong AF number.
Non AF SYS functions assigned to AF0, eg OSC.
F413 PB4 & PB12. I2S3 should be AF7, not AF5.
Fix I2S_CKIN is global, don't change to I2S1_CKIN.
G081. Replace UCPDx_FRSTX1/UCPDx_FRSTX2 with UCPDx_FRSTX.
G0B1. Replace TIMx_BK* with TIMx_BKIN*.
Add EVENTOUT.
L152. Remove bank B ADC pins as MicroPython does not support them.
Changes to improve usefulness for pinout planning:
Reorder some AFs to match old files. Most useful AF first.
eg RTS before DE, SPI before I2S.
Normalise names between STM32 families.
Delete non AF SYS functions from AF0.
Add all non AF SYS functions to SYS column after ACD.
This includes OSC, DAC, BOOT*, etc.
Restore pins with no AF.
Testing
All discrepancies between auto-generated af.csv files and original
files were investigated and compared with data sheets, reference
manuals, open pin data and CubeMX. The changes are based on my
best estimate of the correct AF and SYS mapping.
Trade-offs and Alternatives
This adds additional information to the af.csv file which is not alt funtion related, but is extremely useful for pinout planning for hardware design. The additional information is ignored by make-pins.py and does not alter the MicroPython builds.
Generative AI
I did not use generative AI tools when creating this PR.
Signed-off-by: Chris Mason c.mason@inchipdesign.com.au