Custom board needs bootloader mode to program

Hi All,

I have a custom board that implements the RAK4630-R module, things are working alright except that programming via usb is not as seemless as I would expect. It appears that the usb port can reset the device properly, however it does not come up immediately - it takes 5-10 seconds to re-populate on the device manager.

It appears the programming process expects this behavior, but it times out JUST before the device populates again, leading to this error:

Therefore, I have been forced to double-reset the board for bootloader mode, in order to program it. Quite annoying! Any solutions?

I just have RST going straight from the J-link to the RST line on the module, am I missing a pullup or capacitor on this line perhaps?

I tried adding the reset circuitry in with external capacitor and resistors, no luck, still see the same behavior.

Circuit that I added:


Confirmed I’m seeing the same behavior with a stock RAK4631 module on a RAK5005-O base board (v1.0).

It appears that something in the RUI firmware is keeping the COM port from populating as quickly as it needs to in order to be recognized by the Arduino IDE after a reset. @carlrowan are you aware of this issue?

No ideas? @beegee have you seen this behavior before?

Hi Charles,

I see sometimes the PermissionError on Win 10, but on a second try to flash it works.

I am getting that error as well with the Arduino BSP, it seems to be related to Windows, not to the flashing process itself.

I didn’t see the other problem Serial: No ping response.
Does a double reset push solve that problem?

Hi @beegee, the double reset push does solve the problem and allow the module to boot, but I have to do that every single time I need to program the chip.

It’s worth mentioning that the RAK4630-R modules take about 10 seconds to populate on the COM port on windows, while the non-R version connects almost instantly upon connection to my computer. I believe this behavior to be the cause of the issue, at least on my end. Is this your experience as well?

Hi @cmod ,

I use RAK3172 most of the time but with my experience with some RAK4631s that I migrated to RAK4631-R, everything works smooth. I can only have errors uploading if the serial terminal of Arduino is open or if there are other tools like wistoolbox connected to that com port.

Btw, on device manager with RAK4631-R this is what I see on COM port. I am using windows 11. If I click reset, this shows late like after few seconds (around 7-8 seconds). Seems there is a long USB process/detection happening in the background. But my application runs during this time.


When I upload the firmware, I will hear a reset happen but the upload continues normally, COM9 shows immediately without the long delay.

I doubt it is in the code but if you want me to run your sketch in my board (just for sanity check) you can send it to me and I try that sketch.

Hi @carlrowan, thank you very much for trying to verify this with me.

I won’t be able to send the source code directly, but I can send the compiled hex file, below.

Hi Charles,

I uploaded your firmware and whenever I reset, the COM port instantly show. This .hex is compiled under RUI3 right? Not the RAK4631 Arduino BSP?

Then I uploaded a different basic sketch and it runs smoothly in one attempt.

Btw, I read back the your previous messages and I am a bit confused because you are testing both RAK4631 and RAK4631-R. Are those different boards? Or you update the firmware via nrfutil?

Also, the boards are properly selected when you try to upload right? Just to be sure we are on same page :ok_hand:

Hi @carlrowan,

Yes that is correct, it was compiled with RUI3.

Very strange… I’m unsure why things are preventing board uploads without being in bootloader mode. Perhaps it has something to do with my RST circuit?


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