Situation:
An ESP32C3 running the Bluedroid BLE stack is connected via UART to another MCU which expects to always receive constant length messages. The system seems to work perfectly fine during normal operation, but if I for whatever reason reset the ESP32, the ESP32 writes exactly one byte to UART, hence throwing off the receiver MCU by one byte!
What I tried so far:
I commented out any call to uart_write_bytes()
, which in turn ensures that my program is not at fault. This change doesn't help though, as the ESP32 still keeps printing the byte upon reset.
What the ESP send onto UART:
- Upon hitting the "RST" button on the dev. board or flashing new software, it prints
0xfc
. - If I unplug and replug the power however, it prints
0xf8
.
N.B.: I tried to reproduce such behavior on another microcontroller, specifically an STM32L552ZE. I was not able to, i.e. the STM32 didn't print anything to UART after resetting.
Configuration (sdkconfig.json): As the file was too long to paste it directly, you can find it on pastebin
Questions:
- Is there some configuration option that causes the ESP32 to print that initial byte?
- How can I fix that behavior, i.e. make the ESP32 not print anything after resetting/flashing/startup