Cannot upload code when UART continuously sends characters


I was unable to upload code from the arduino IDE as it continuously sent characters from the board via Serial2.
You can see it in the image, it seems like a continuous chain without stopping.

Hi @Nam ,

Will it be possible to use Serial1 for debug and reserve Serial/Serial2 for firmware update? This way we can avoid UART conflict update will proceed. It is likely that bootloader replies/commands were missed due to continuous printouts.

Can we force it into mode boot? I mean add some button to board, and when we need upload firmware, just press button (or switch).

There is no option to force bootloader mode by a GPIO.

Best practice is to put a 5 second delay into setup() to have a chance to send an AT+BOOT over the UART to force bootloader mode.

Why is your application sending data over the UART without any delay. Seems you have a while() loop where you just send your error message. Put a delay() there as well to get a chance to receive something over UART.

Thank your info. I have one second delay in setup. Im will try send AT+BOOT in this time.

UART send continueos is error of library i2c read sht30. Im not yet consider why. Just read and delay 5 second, but now it maybe go into while loop in library.

Success sir.
Thank you.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.