How to enter Boot Mode in RUI3

Hi, I am using 2172 with Arduino. To get the device reliably into boot mode for flashing I use a little microcontroller to generate bounce-free the two reset signals within 100 ms (to emulate double click). This worked so far. My latest sketch accesses flash right at the beginning and suddenly the MC magic does not work anymore.

  • Does the bootloader uses the flash to store the status after first reset?
  • Is there any mandatory feedback on UART2 once the device is in boot mode?
  • Any other hint on timing to have reliable switching into boot mode during development?
  • Is there an API call in custom mode to turn the device into boot mode?

Welcome to RAK forum @Chris2 ,

To answer your questions.

  1. Parameters related to the operation of the device like configurations, keys, eui, modes, etc. are stored in flash.
  2. The feedback you’ll have is
  3. I have to check with the RUI3 team but as far as I know, the period before it goes to application code is 150mSec so your 100mSec should be ok.
  4. There is no API call (I have to confirm).

I will still ask RUI3 team for items #3 and #4. If any more details I get. I will share here :+1:

Btw, what firmware version are you using? If ever you find any issues/roadblock, just let us know.

I use 3.4.2-rui3_22q1_update.112. From what I read in doc and forum there are two boot loaders, right? STM loader enabled with boot0=>VCC plus using STM flasher and your RAK loader enabled with double click during boot. Would be cool to have a howto for option B which seems to be used in Arduino and I can’t reliably start. My current settings are:

  • boot0 → GND
  • connect RX/TX of Host to UART2
  • to the double reset however it works
  • Arduino-built-in flasher tool should start flashing.

Hi @Chris2 ,

Do I understand it correctly that you can’t upload your code via Arduino IDE using the RAK3172 Bootloader? What error is shown in the Arduino IDE?

“Device is not in boot mode”. I can upload fw when default firmware is running. I guess, the problem starts once I turn the serial console into RAK_CUSTOM_MODE. Then of course at+boot will not be available anymore. May be this is needed in Arduino IDE ?

Hi @Chris2 ,

Even if you enable RAK_CUSTOM_MODE, the AT+BOOT command should still be available but you wont be able to reupload again since other AT Commands are disabled. To reupload again via Arduino, you need to switch to AT mode again by inputting AT+ATM while in Custom Mode. This will allow you to upload again codes via Arduino IDE.

Guide on switching to different Serial modes is here - RAK Unified Interface V3 (RUI3) Serial Operating Modes | RAKwireless Documentation Center

thanks, makes sense and works!