2021-08-31 05:26 AM
From time to time I run into a Problem that the STM-Bootloader doesn't respond when I try to activate it.
What I do:
Hold reset pin of STM low for at least 2s. Then set Boot0-pin to high (Boot1 is connected to GND with a 10k resistor).
After another 1s I release the reset pin. Then after 1.5s I send 0x7F over UART1 to set the STM into UART-Bootloader mode.
From here I wait 1s for a response from the STM.
What happens:
Approximately 4 of 5 times the STM responses with the 0x79 ACK Byte and I do my normal flashing routine.
But the other times there is none response from the STM. So I pull the reset line again and do the same procedure again.
Mostly it works the next time, but sometimes it needs several retries.
What I've already checked:
- The Slopes of the UART signal are steep enough.
- Currently I'm running it with 115200 Baud, but the Problem also occurres when I'm setting it down to 9600 Baud.
- If the STM response, the baudrate deviation is below 1,3%.
- There was no glitch measureable before the 0x7F Byte, that could have caused wrong Baud-rate detection (measured with 500 MHz Bandwidth).
For more clarity I've added some picures of the normal and the error case.
Any hints for what can cause this issue?
2021-08-31 09:55 AM
If other interfaces are active, the bootloader will activate on those.
NRST doesn't need a full second to reset the chip. It needs to be low for 300ns per the datasheet. Bootloader starts up very quickly after that.