[En-Nut-Discussion] Rework STM32 configuration
bon at elektron.ikp.physik.tu-darmstadt.de
bon at elektron.ikp.physik.tu-darmstadt.de
Mon Dec 17 15:36:38 CET 2018
Hello,
I just uploaded a big bunch of patches. This mostly reworks the STM32
configuration. Many entries are now generated by python files from the
system headers and Stm32CubeMx XML file. There is no need for normal
users to rerun these files. This replaces entries provided by
hand by reading the datasheet and reference manual. Adding new STM32
devices should be much easier now. I tested with a lot of
configurations, please bear with me for slipped errors. Report errors!
Most important needed change for user code is in pin multiplexing. Of
course you can still use the alternate function value direct but
e.g. for the SPI_SCK function you can now use
#include PINMUXHEADER
# define SPI1_SCK_AF PINMUX(SPI1_SCK, SPI1_SCK_FUNC)
# if SPI1_SCK_AF == AF_NO_SUCH_PINFUNC
# warning BAD SPI1_SCK assignment
# endif
If choosen pin and function do not match, an error will be generated
during compile time.
A similar mechanism supplies a list of possible DMA channel and
supporting values with
#include DMACHANNELHEADER
This is not yet used, as the DMAMUX capability in STM32H7/L4R/L5 and
G0 will require more DMA infrastructure rework.
H7 now will compile, also in a minimal way. No PLL, DMA, SPI etc, but
I have seen uart output ;-)
Cheers
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------
More information about the En-Nut-Discussion
mailing list