NamNamIoT / RAK3172_CANOPUS

Examples for Canopus_RAK3172 board
https://canopus-iot.com/
MIT License
56 stars 8 forks source link

Error: Detect baudrate fail, can not get the baudrate on Arduino IDE #9

Open Luynmax opened 4 months ago

Luynmax commented 4 months ago
 Hi, NamNamIoT !
    I’m workig with a RAK3172_CANOPUS  using  Arduino IDE. 
    It compiles ok, then uploads it to my board but fails. as shown below:
    ![Detect baudrate fail](https://github.com/NamNamIoT/RAK3172_CANOPUS/assets/163369668/6141faac-5e59-4990-88fa- 
    c59bbc56dd25)
    Previously, I successfully loaded the code with STM32CubeProgrammer and switched to loading with Arduino IDE but encountered 
    this error.
   Boards that have never been loaded with STM32CubeProgrammer will still operate normally.
   Hope to receive help from you !!! 
   Thanks.
Luynmax commented 4 months ago

Detect baudrate fail

NamNamIoT commented 4 months ago

Dear @Luynmax , This is a typical error of RAK3172. Reason: In the program we did not leave any break time to check the requirement to flash code. Therefore, the circuit board will run continuously without paying attention to the signals sent from the IDE. So I recommend that you leave a little delay in your loop() or at least a 1 second delay in setup.

In this case, you can send a signal to the circuit board to request immediate BOOT MODE. Syntax: AT+BOOT image

When receiving this signal, the circuit board will go into BOOT MODE and wait for you to flash. If the circuit board ignores this request (does not return BOOT MODE), try resetting the circuit board by pressing the reset button on the circuit board. Then spam AT+BOOT as much as possible, just a little delay in the program is enough for RAK3172 to check Serial.available.

If the AT+BOOT spam method doesn't work, we still have another way. You need to use STM32Cubeprogramer. Link: https://docs.rakwireless.com/Knowledge-Hub/Learn/STM32Cube-Programmer-Guide/#using-the-stm32-uart-bootloadern Usually, spamming AT+BOOT works great for me. Once successful, remember to leave a small delay in your program. image

Luynmax commented 4 months ago

Thank namamiot, I tried and loaded the code successfully