After upload this code to RAK3172, i can not upload again.
I try send AT+BOOT for force it into boot mode but can not.
If no delay in code, we can not upload code again.
It seems it doesn’t have any free time to listen to what I send it.
I tried on 10 boards and now all of them are out of my control.
Is there a way to save them all?
Well, a loop without delay() is a bad idea.
A setup without a delay() in the beginning to be able to send AT+BOOT is not the best idea either.
Unresponsive RUI3 devices happened to me too.
What you can do for RAK3172
Download STM32CubeProgrammer
Download the “standard” AT command firmware for the RAK3172 (make sure you choose the correct one, there are 4 versions of the RAK3172)
Connect the UART2 (or USB if you are using WisBlock modules) to the computer
Connect BOOT0 to VDD and reset the device
Start STM32CubeProgrammer, select the COM port the RAK3172 is connected to
Do a flash erase
Flash the AT command firmware
This will erase your LoRaWAN credentials and any other settings you did before, but you get a fresh RAK3172.