2024-02-26 01:41 PM - edited 2024-02-26 01:48 PM
Is it not possible to read the Unique device ID registers (96 bits) on STM32L051 through the bootloader? I get a NACK on that address.
2024-02-26 01:54 PM
Might not surprise me. How badly do you want to read it?
Could probably push some code into RAM, and run that to recover
2024-02-26 02:02 PM
Is there an address limit where the bootloader can read from?
2024-02-26 02:17 PM
Some of the other bootloaders check for RAM / FLASH address ranges.
This one could be disassembled and inspected.
2024-02-26 08:07 PM
Dear @MSipo ,
looking at our AN2606 , that address memory is not readable by the embedded bootloader on top of the main Flash/Data user area :
1FF8xxxx where are the Unique ID is not inside .
Cheers,
STOne-32
2024-02-26 08:28 PM
I am a bit confused: why are you asking if "bootloader can read the Unique Device ID"?
Isn't the bootloader hard-coded in MUC? Or do you want to implement your own bootloader?
As I understand from the reference manual: the Unique ID registers, at address 0x1FF80050, should be possible to read by any FW code. If the bootloader (fixed programmed in MCU) does not do? Maybe it is not used/not needed. How could you "tell the bootloader to read these registers? for you?"
But your user FW should be able to read this Unique ID (or read it via an external ST-LINK debugger connected).
How is this Unique ID register related to a bootloader code?
You should be able to read this Unique ID register any time in your own code.
2024-02-26 08:44 PM
Dear @tjaekel ,
Embedded bootloader is programmed only by ST and done at Factory, it is not a user code that can changed or modified. It has specifications as mentioned in AN2606 such as using RS232 commands and Allowed addresses inside are bounded depending on devices .
Of course if using a user code or SWD any address is accessible if not Protected .
Hope it helps you .
STOne-32
2024-02-27 12:43 AM
But does that table really state that? Doesn't it only state what memory regions the bootloader use?
2024-02-27 12:53 AM - edited 2024-02-27 01:17 AM
Update:
I have tested some more here. These are the results:
These reads work:
Does not work:
Looks like a bug in the bootloader. It will only accept the read if the first address is between 0x1FF8 0000 to 0x1FF8 001F.
Any thought about that?