as a preface: Thank you to everybody contributing in these forums! I have found a lot of useful information and good ideas here.
Here comes my question:
I work with the STM32F100VB. In my application it's vital that the pins of the STM32 are in well-defined states during and after startup (reset). In the reference manual you can read the following:
7.1.1 General-purpose I/O (GPIO)
During and just after reset, the alternate functions are not active and the I/O ports are
configured in Input Floating mode (CNFx[1:0]=01b, MODEx[1:0]=00b).
Now... what's the right procedure to activate the clock, setup the IO pins and define the desired output potential to the pins? In which order should it be done?
I found that if I set up the clock first, activate the clock for the GPIO ports and then do the GPIO setup itself, I see (undesired) spikes at the output pin under certain conditions.
What I essentially want:
- Pin is in "input floating" mode and held high via external pullup during reset
- "Gapless" transition of the pin being input floating (external pullup) to the pin being output with voltage "high".
Thank you so much.