2009-01-28 07:32 PM
what does STM32_Init do?
2011-05-17 04:00 AM
Hi,
While looking through the examples in the Keil directory of my installation, I discovered that they all use a file called STM32_init.c to set the chip up. I like this approach, having all the configurations in one place, but how does it work? There appears to be a numbe rof #defines for all the peripheral setups, but I cannot see where these are referenced as they are not in the STM32_reg.h file, or used in the source code either. --dave2011-05-17 04:00 AM
As this is a question about the Keil tools specifically, rather than the STM32 itself, you'd generally be better asking it in the Keil forum.
The answer is in the comment at the top of the file: it's all done by the magic of the Keil/uVision Configuration Wizard...2011-05-17 04:00 AM
Thanks for putting me right st7. It seems that using that functionality would put any portability out the window if you needed to use a different compiler other than Keil.
--dave2011-05-17 04:00 AM
Quote:
There appears to be a number of #defines for all the peripheral setups, but I cannot see where these are referenced
They are referenced by the functions like stm32_RtcSetup() defined at the end of the fileQuote:
It seems that using that functionality would put any portability out the window if you needed to use a different compiler other than Keil.
Not really: the 'C' file itself looks pretty standard - so it should be just as portable as any other 'C' source code...