Rework STM32 configuration
bon-1JbLm1bU5j5ZIx36JBfelj3+ndqKAYMe9FMPySWZwLkb1SvskN2V4Q@public.gmane.org Mon, 17 Dec 2018 15:36:38 +0100
| Newsgroups | gmane.comp.hardware.microcontrollers.ethernut |
|---|---|
| Message-ID | <[email protected]> |
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-1JbLm1bU5j5ZIx36JBfelj3+ndqKAYMe9FMPySWZwLkb1SvskN2V4Q@public.gmane.org Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 1623569 ------- Fax. 06151 1623305 --------- _______________________________________________ http://lists.egnite.de/mailman/listinfo/en-nut-discussion