How to program a LoRa-E5

I hope this video’s to connect and program wl55jc, B-L072z and L476RG STM32 boards can be helpful:

Good luck.

@acutetech You are a life save :slight_smile:

Hi all, I was able to remove RDP with STM32Cube Programmer using a ST-Link and create my own custom project. I no longer have the ST-Link so I tried to remove RDP of another LoraE5-mini board using UART via the USB-C port. I was not able to establish a connection, I get the error:

22:08:33 : Serial Port cu.usbserial-141430 is successfully opened.
22:08:33 : Port configuration: parity = none, baudrate = 115200, data-bit = 8, stop-bit = 1.0, flow-control = off
22:08:34 : Timeout error occured while waiting for acknowledgement.
22:08:34 : Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again…

Does anyone know if it is possible to remove RDP and program the LoraE5-mini board using UART (without a ST-Link)? Thank you.

I stumbled across this exact process as well. However, my process is a little different in that I use the CLI on macos (located at /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/ This is very reliable to erase the memory and let it connect to the IDE.

However, I haven’t been able to get it to work in the debugger. I suspect that something in the programming messes up the SWD interface. I can work with my Nucleo board with no issues.

Has anyone figured out the debugger on the E5 modules?


I am stuck! nothing works! I cannot connect my lora e5 dev board to the programmer!! tried everything!

Thanks for the solution. There is a lot of doubt about how to connect. I’m working with LoRa E5 Dev and it works too

Thanks acutetech, your post helped me to clear the factory firmware.

Because I was unsure of how to hook things up to do this I’ll detail what I did to use a Nucleo board to connect to the LoRa-E5 dev kit.

I removed the two jumpers on the Nucleo stlink programmer so that it was acting as a programmer for an external device, not the attached Nucleo board. Those are the jumpers near the crystal with ST-LINK written on one side and NUCLEO on the other.

The blue 5 pin header is the programming header on the LoRa-E5 dev kit.

Here are the links I made:

ST-LINK CN4                     E5 dev kit

2                                         3                    swd clk
3                                         5                    gnd
4                                         2                    swd io

Both the Nucleo/ST-LINK and the E5 dev kit have their USB cables in, and the stm programmer is connected using the ST-LINK option.

As acutech says, reading the E5 dev kit MCU will fail until the read-out-protection option byte is set to AA and that value is applied. This clears the factory firmware and all FFs are read.

Programming works fine, and SB12 - the reset line from the ST-LINK to the Nucleo - did not need to be opened, so there were no modifications to the ST-LINK part of the Nucleo except to open the two jumpers.


  1. Connect LoRa-E5 mini to PC via a Type-C cable.
  2. Open a serial tool(eg. Arduino Serial Monitor), select the right COM port, set the baud rate to 9600, and select Both NL & CR.
  3. Try to send “AT” and you will see the response.


I have been working towards a custom application on the Lora-E5 Dev Board which, if successful, I will turn into a product using the SEEED Lora module or some other STM Lora Module. Although I can understand locking down the application and the chip from a regulatory standpoint it is nto very useful for developers such as myself who do not want to use the module as a modem but instead want to run our application directly on the processor and in my case really don’t want to attach to a LoraWan and all that comes along with that. It has taken a few days but I am now able to build applications using the STM drivers as generated by CubeMX and compile in Eclipse an program and debug using OpenOCD. Aside from the normal setup and configuration issues one encounters with Eclipse the big hurdles were with OpenOCD and the module itself. There is a new cfg file for OpenOCD that supports the STM32WLx series but that only works with OpenOCD 0.11.4. I was using Linux 16.04 and that had to be upgraded to Linux 20.04 to work with OpenOCD 0.11. Once all that was complete and using CubeProg to erase the chip (using a ST-Link provided by a old Nucleo board) then I could load the code and fire up the debugger. Unfortunately the device would jump to the System boot loader and not to my program, I suspect this has something to do with how the BOOT0 pin is handled inside the module. To fix this I went back to CubeProg and set the BOOT_LOCK option which forces execution to start in User Flash and now things seem to be working just fine, program executes and I can set break points and debug. Now the fun begins…
Hope this helps other who are trying to develop their own applications.

1 Like