Bootloader Framing Errors - STM32L052
- April 27, 2017
- 3 replies
- 1521 views
Hi,
I'm writing an application on an STM32L052 that uses the UART (115200-N81), and I need to use the Bootloader for code upgrades.
If run the Bootloader using the BOOT0 pin, the UART initializes fine and I can upload code at any baud. However if I jump to the Bootloader code from my application, the Bootloader isn't initializing the UART correctly, and I get framing-errors transmitted out from the CPU.
From the scope traces (good and bad are attached), I can see that at any baud rate (115200-E81 shown), the Tx signal is switched to '0' between each byte instead of staying high, this causes a framing error. It almost seems as though the stop-bit is missing or inverted.
I'm guessing that in my application's use of the serial port, something is left in a register somewhere that doesn't get initialized in the Bootloader code. Since I cannot modify the Bootloader code, I need to find the errant register that causes a missed stop-bit, or causes this framing error.
Anyone run into this before???
- SteveK
#stm32l052 #bootloader #framing-error #uart-tx