cancel
Showing results for 
Search instead for 
Did you mean: 

what does STM32_Init do?

dave4
Associate II
Posted on January 29, 2009 at 04:32

what does STM32_Init do?

4 REPLIES 4
dave4
Associate II
Posted on May 17, 2011 at 13:00

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.

--dave

st3
Associate II
Posted on May 17, 2011 at 13:00

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...

dave4
Associate II
Posted on May 17, 2011 at 13:00

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.

--dave

st3
Associate II
Posted on May 17, 2011 at 13:00

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 file

Quote:

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...