Unable to burn bootloader on RAK811 Breakout

I am having trouble burning a new bootloader version onto a RAK811 breakout module. Right now it has firmware version 2.0.3.0, so I am using the STM32CubeProgrammer to burn the most recent bootloader.
I am following these instructions.

I have a jumper connecting BOOT and VCC.
The STM32 Cube Programmer receives the following errors:

04:29:45 : Serial Port COM12 is successfully opened.
04:29:45 : Port configuration: parity = even, baudrate = 115200, data-bit = 8, stop-bit = 1.0, flow-control = off
04:29:45 : Activating device: OK
04:29:45 : Chip ID: 0x429
04:29:45 : BootLoader protocol version: 3.1
04:29:45 : Response received from device: NACK
04:29:45 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
04:29:47 : Response received from device: NACK
04:29:47 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
04:29:47 : Error: RDP level is set to 1 (0xBB), try using Read UnProtect (-rdu) command in order to remove the Read Out Protection.
04:29:47 : UPLOADING OPTION BYTES DATA ...
04:29:47 : Bank : 0x00
04:29:47 : Address : 0x1ff80000
04:29:47 : Size : 24 Bytes
04:29:47 : Response received from device: NACK
04:29:47 : Error: Address not acknowledged: 0x1FF80000
04:29:47 : Error: Uploading Option Bytes bank: 0 failed
04:29:47 : Error: Initializing the Option Bytes failed
04:29:47 : Disconnected from device.


Any ideas of what I could do to fix this? Any help would be appreciated, thanks!

I’ve also tried running STM32_Programmer –c port=uart –rdu but it throws an error regarding address 0x1FF8004C and times out.

Hi. Are you using macOS? Can you set verbosity to 3 and give output?

Sure, here’s the output at Verbosity level 3. The STM32CubeProg is running on Windows by the way, I cannot get it to install on the newest Mac OS.

16:42:28 : STM32CubeProgrammer API v2.2.1
16:42:35:643 : Serial Port COM12 is successfully opened.
16:42:35:645 : Port configuration: parity = even, baudrate = 115200, data-bit = 8, stop-bit = 1.0, flow-control = off
16:42:35:645 : No Init bits value is : 0
16:42:35:646 : Sending init command:
16:42:35:646 : byte 0x7F sent successfully to target
16:42:35:646 : Wait ends after 1 loop, dataready = 1, delay = 2
16:42:35:646 : Received response from target: 0x79
16:42:35:654 : Activating device: OK
16:42:35:654 : Sending GetID command and its XOR:
16:42:35:655 : byte 0x02 sent successfully to target
16:42:35:655 : byte 0xFD sent successfully to target
16:42:35:660 : Wait ends after 1 loop, dataready = 1, delay = 6
16:42:35:660 : Received response from target: 0x79
16:42:35:660 : Received response from target: 0x01042979
16:42:35:686 : Chip ID: 0x429
16:42:35:687 : Sending Get command and its XOR:
16:42:35:687 : byte 0x00 sent successfully to target
16:42:35:687 : byte 0xFF sent successfully to target
16:42:35:693 : Wait ends after 1 loop, dataready = 1, delay = 9
16:42:35:694 : Received response from target: 0x79
16:42:35:694 : Received response from target: 0x0b
16:42:35:694 : size of bytes in the response: 11
16:42:35:694 : Received response from target: 0x31000102112131446373829279
16:42:35:695 : Full received response: 0b31000102112131446373829279
16:42:35:695 : BootLoader protocol version: 3.1
16:42:35:695 : byte 0x11 sent successfully to target
16:42:35:695 : byte 0xEE sent successfully to target
16:42:35:717 : data sent successfully to target: 0x0800000008
16:42:35:727 : byte 0x00 sent successfully to target
16:42:35:727 : byte 0xFF sent successfully to target
16:42:35:740 : Sending GetID command and its XOR:
16:42:35:740 : byte 0x02 sent successfully to target
16:42:35:741 : byte 0xFD sent successfully to target
16:42:35:756 : Wait ends after 1 loop, dataready = 1, delay = 16
16:42:35:756 : Received response from target: 0x79
16:42:35:757 : Received response from target: 0x01042979
16:42:35:993 : byte 0x11 sent successfully to target
16:42:35:994 : byte 0xEE sent successfully to target
16:42:36:001 : data sent successfully to target: 0x0800000008
16:42:36:012 : byte 0x00 sent successfully to target
16:42:36:012 : byte 0xFF sent successfully to target
16:42:36:038 : Sending Read command and its XOR:
16:42:36:038 : byte 0x11 sent successfully to target
16:42:36:039 : byte 0xEE sent successfully to target
16:42:36:050 : Wait ends after 1 loop, dataready = 1, delay = 15
16:42:36:051 : Received response from target: 0x79
16:42:36:051 : Sending Read address and its checksum:
16:42:36:051 : data sent successfully to target: 0x1ff80000e7
16:42:36:096 : Wait ends after 1 loop, dataready = 1, delay = 15
16:42:36:096 : Received response from target: 0x79
16:42:36:097 : Sending number of bytes to be read - 1 and its checksum:
16:42:36:097 : data sent successfully to target: 0x03fc
16:42:36:097 : Wait ends after 1 loop, dataready = 1, delay = 15
16:42:36:097 : Received response from target: 0x79
16:42:36:098 : Received response from target: 0xaa0055ff
16:42:36:098 : Database: Config 0 is active.
16:42:36:098 : byte 0x11 sent successfully to target
16:42:36:099 : byte 0xEE sent successfully to target
16:42:36:103 : data sent successfully to target: 0x0800000008
16:42:36:157 : byte 0x00 sent successfully to target
16:42:36:157 : byte 0xFF sent successfully to target
16:42:36:160 : Sending Read command and its XOR:
16:42:36:160 : byte 0x11 sent successfully to target
16:42:36:161 : byte 0xEE sent successfully to target
16:42:36:161 : Wait ends after 1 loop, dataready = 1, delay = 15
16:42:36:162 : Received response from target: 0x79
16:42:36:162 : Sending Read address and its checksum:
16:42:36:162 : data sent successfully to target: 0x1ff8004cab
16:42:36:163 : Wait ends after 1 loop, dataready = 1, delay = 15
16:42:36:163 : Received response from target: 0x79
16:42:36:163 : Sending number of bytes to be read - 1 and its checksum:
16:42:36:164 : data sent successfully to target: 0x03fc
16:42:36:164 : Received response from target: 0x1f
16:42:36:164 : Response received from device: NACK
16:42:36:165 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
16:42:36:165 : failed to read the requested memory content
16:42:36:165 : Could not read flash size at address 0x1ff8004c
16:42:38:672 : Sending Read command and its XOR:
16:42:38:673 : byte 0x11 sent successfully to target
16:42:38:673 : bytesToWrite before send = 1
16:42:38:673 : bFlushRet = 1, bytesToWrite after flush() = 1
16:42:38:673 : waitForBytesWritten Error : The wait operation timed out.
16:42:38:673 : byte 0xEE sent successfully to target
16:42:38:674 : Wait ends after 1 loop, dataready = 1, delay = 14
16:42:38:674 : Received response from target: 0x79
16:42:38:674 : Sending Read address and its checksum:
16:42:38:674 : data sent successfully to target: 0x1ff8004cab
16:42:38:674 : Wait ends after 1 loop, dataready = 1, delay = 16
16:42:38:675 : Received response from target: 0x79
16:42:38:675 : Sending number of bytes to be read - 1 and its checksum:
16:42:38:675 : data sent successfully to target: 0x03fc
16:42:38:675 : Received response from target: 0x1f
16:42:38:676 : Response received from device: NACK
16:42:38:676 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
16:42:38:676 : failed to read the requested memory content
16:42:38:677 : Could not read flash size at address 0x1ff8004c
16:42:38:677 : byte 0x11 sent successfully to target
16:42:38:678 : byte 0xEE sent successfully to target
16:42:38:678 : Error: RDP level is set to 1 (0xBB), try using Read UnProtect (-rdu) command in order to remove the Read Out Protection.
16:42:38:764 : UPLOADING OPTION BYTES DATA ...
16:42:38:765 : Bank : 0x00
16:42:38:765 : Address : 0x1ff80000
16:42:38:765 : Size : 24 Bytes
16:42:38:766 : Sending Read command and its XOR:
16:42:38:767 : byte 0x11 sent successfully to target
16:42:38:767 : byte 0xEE sent successfully to target
16:42:38:767 : Received response from target: 0x79
16:42:38:767 : Sending Read address and its checksum:
16:42:38:768 : data sent successfully to target: 0x1ff80000e7
16:42:38:768 : Wait ends after 1 loop, dataready = 1, delay = 15
16:42:38:768 : Received response from target: 0x1f
16:42:38:769 : Response received from device: NACK
16:42:38:769 : Error: Address not acknowledged: 0x1FF80000
16:42:38:769 : Error: Uploading Option Bytes bank: 0 failed
16:42:38:802 : Error: Initializing the Option Bytes failed
16:42:38:831 : Disconnected from device.

The problem appears to be solved!
I installed the STM32CubeProgrammer a desktop PC and it is able to connect with and program the module without any errors. For some reason, my Surface Laptop 3 produces all these errors and is unable to keep a connection, yet the desktop PC works perfectly. Maybe this helps someone in the future who is having the same problem, however I don’t know why the Surface Laptop has this issue with the STM32CubeProgrammer.

@Lloyd The reason for this is most likely due to the lack of power supply in the serial port of your laptop.