RAK3172 – Cannot Connect to STM32Cube Programmer (KO Application Received)

Hi ,

I have a RAK3172 module that I programmed yesterday using STM32Cube Programmer, and it was working well. However, today when I tried to connect the same module to STM32Cube Programmer, tried many times. But other module can able to connect with same wiring and settings
error Detail:
“Error:Activating device KO , check your boot configuration and serial port configuration.”

My connections are as follows (using FTDI converter):

  • VCC: 3V
  • BOOT: 3V
  • TX
  • RX
  • GND

Additional Details:

  • I am able to program the module through the RAK Firmware Upgrade Tool, but the CLI version does not update (remains at 1.5.11 even after flashing v4.2.1).
  • When I erase the flash memory and program via STM32Cube Programmer, the version updates correctly to v4.2.1 with CLI version 1.5.14.
  • Using Termite serial monitor, I can access AT commands and also set/exit boot mode from the terminal.
  • However, I am still unable to reconnect to STM32Cube Programmer, as the KO application error continues.

Has anyone experienced this issue or can suggest what could be causing the KO application error with STM32Cube Programmer? Any tips or troubleshooting steps would be greatly appreciated.

Thank you in advance for your support!

Hi @Prasanna ,

STM32CubeProgrammer is a reliable SW tool as well as STM32 UART Bootloader.

Whenever I encounter issues like this, common reasons are:

  1. Header pins not stable. I usually solved this by directly soldering the external USB-Serial converter to the pins of the board (if there is no built-in).
  2. Unreliable USB-Serial converter. Some USB-Serial converter doesn’t work well on STM32CubeProgarmmer.
  3. Other serial terminal software is running so COM port connection cannot be established correctly.
  4. There might be other connections on UART2 like GPS module, RS485 chip, etc. that causes connection issues.
  5. Boot mode is not pulled up correctly. I recommend to check boot pin voltage level.
  6. With Boot mode pulled-up, pull down RESET pin momentarily then try to connect again. In case you just plug-in the modules all together to USB at once.

However, if you say that multiple RAK3172s work on the same setup, it can be that particular RAK3172’s UART is already damaged. Assuming of course that the connections are reliable.

Thank you for your detailed suggestions.

To clarify, I have two RAK3172 modules, each connected to a different UART channel on my main controller. The connections are isolated, and I am directly interacting with the target RAK module’s UART2 interface.

I have already tried the following:

  • Grounded and reset the RESET pin as suggested.
  • Directly soldered the FTDI converter to the module’s pins for stable connection.
  • Verified BOOT pin is at 3V and VCC is also 3V.
  • No other serial terminal software is running.
  • No other devices are connected to UART2 (only the RAK module).

Despite this, I am still unable to connect with STM32Cube Programmer—getting the same KO application error.

My question:
Is there any way to fully erase the flash memory and update the CLI version (to 1.5.14) using only the RAK Firmware Upgrade Tool?
If yes, could you please share the recommended steps or firmware files to use?
My goal is to get a clean flash so that both the firmware and CLI version are properly updated.

Hi @Prasanna ,

You only need to reset momentarily, else the STM32WL will not start. FTDI chips are pretty stable unless if these are fake/clones.

If your setup is working on another RAK3172 but not on the other one and you covered all possible electrical issues (supply, wiring, etc.), it can be that the STM32WL is already damaged. Although this is almost impossible if your RAK3172 is still ok with RUI3 AT commands. It is very unlikely that the UART bootloader of STM32 is the only part of the chip that is damaged.

There is no way to fully erase the chip with only the RAK tools. You need the STLink, Jlink, RAKDAP or other external tools that can erase the full chip. The easiest way to do this without external tool is using UART with STM32CubeProgrammer however, you are having issues using the tool.

Hi, thank you for your feedback and suggestions.

I tried many times with UART but was still unable to connect or erase the flash memory using STM32Cube Programmer.I finally used SWD with STM32Cube Programmer, and I was able to successfully flash and write the updated firmware. Now the module is working as expected.

Thanks again for your support and guidance!

1 Like

Hi all,

I need to control the PA10 pin of the RAK3172 module from my external ESP controller. The RAK3172 is connected to the ESP via UART. Additionally, I would like to have the ability to control or configure the PA10 pin using AT commands.

Could anyone guide me on the best approach to achieve this?

  • Is it possible to directly control the PA10 pin from an external controller (e.g., by sending specific UART/AT commands from the ESP)?
  • Are there any AT commands available to configure or toggle the PA10 pin state?
  • If not, is there a recommended workaround or firmware modification to enable this functionality?

Any suggestions or reference documentation would be greatly appreciated.

Thank you!

With AT command firmware you cannot control any GPIO of the RAK3172.

To do so, you will need to run a custom application on the RAK3172 and control the GPIO.

You can write a custom application using our RUI3. A custom application based on RUI3 API keeps the complete AT command handler active. In addition, you can add custom AT commands to control a GPIO or read a GPIO.

Some examples (but not specifically for GPIO control) are in our RUI3-Best-Practices Github repository.