2026-01-13 2:03 PM
The STM32CubeProgrammer does not appear to be able to read system memory from an STM32L051 when using the UART interface however it is able to do so when using the SWD interface. When using the UART interface, both flash and EEPROM can be read, but not system memory. This is on a factory fresh part with no readout protection set (0xAA).
c:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe --connect port=COM5 -r8 0x1FF80050 8
-------------------------------------------------------------------
STM32CubeProgrammer v2.21.0
-------------------------------------------------------------------
Serial Port COM5 is successfully opened.
Port configuration: parity = even, baudrate = 115200, data-bit = 8, stop-bit = 1.0, flow-control = off
Activating device: OK
Board : --
Chip ID: 0x417
BootLoader protocol version: 3.1
Device name : STM32L05x/L06x/L010
Flash size : 64 KBytes (default)
Device type : MCU
Revision ID : --
Device CPU : Cortex-M0+
Response received from device: NACK
Error: Address not acknowledged: 0x1FF80050
Error: failed to read the requested memory content
Reading the UID is often critical in factory applications. Is there any way to read it using the UART interface?
2026-01-13 2:16 PM
I think I found the answer (posting here to help others since I didn't find it in my initial searches); it was here: https://community.st.com/t5/stm32-mcus-products/not-possible-to-read-the-unique-device-id-registers-96-bits-on/td-p/644303
You can read system memory but it only allows certain starting addresses (so far I've found 0x1FF80000 and 0x1FF80010 work; I have not found the magic pattern). You cannot specify an arbitrary start address and some read requests will cause a read failure (e.g. 128 bytes starting at 0x1FF80010). However, this provides a workaround that lets you get the UID via the DFU UART interface
c:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe --connect port=COM5 -r8 0x1FF80000 128
-------------------------------------------------------------------
STM32CubeProgrammer v2.21.0
-------------------------------------------------------------------
Serial Port COM5 is successfully opened.
Port configuration: parity = even, baudrate = 115200, data-bit = 8, stop-bit = 1.0, flow-control = off
Activating device: OK
Board : --
Chip ID: 0x417
BootLoader protocol version: 3.1
Device name : STM32L05x/L06x/L010
Flash size : 64 KBytes (default)
Device type : MCU
Revision ID : --
Device CPU : Cortex-M0+
██████████████████████████████████████████████████ 100%
0x1FF80000 : AA 00 55 FF 70 80 8F 7F 00 00 FF FF 00 00 FF FF
0x1FF80010 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1FF80020 : A0 94 5F 6B 54 BA AB 45 34 28 CB D7 20 02 DF FD
0x1FF80030 : 63 00 9C FF 3A 02 C5 FD 38 3C C7 C3 59 58 A6 A7
0x1FF80040 : 59 3A A6 C5 2F 33 D0 CC 03 B9 FC 46 00 47 FF B8
0x1FF80050 : 32 30 47 15 33 32 33 38 00 00 67 00 11 00 00 00
0x1FF80060 : 11 00 E5 4F 46 00 53 00 00 00 00 11 11 00 00 11
0x1FF80070 : 00 00 00 00 CA 41 68 18 81 06 9B 02 40 00 8D 03