Showing results for 
Search instead for 
Did you mean: 

STM32 Open-Bootloader memory addresses


I am working on a port of the STM32L5xx Open-Bootloader for the STM32L4xx MCUs so that I can disable some of the peripherals that I am not using. While working on the port, I had some questions about the memory regions defined in the openbootloader_config.h file. I am using the references manuals linked below to find the address and size of the memory regions (Figure 2. pg. 88 for the L5 and Figure 4. pg. 95 for the L4). The open bootloader library and reference project being used are also linked below.


ICP (system memory): In the L4 MCUs, there are two separate system memory sections as opposed to 1 region for the L5 MCUs. In the port, will I need to define a separate region in the code for each different system memory or should I use one region over the other?


OB (option bytes): Same question as the system memory. There are two regions for the option bytes for the L4 and I'm not sure which one is needed by the bootloader.


OTP/ EB (Engi bytes): In the L5 example, the length of the OTP section does not match the documentation and part of the remaining memory is labeled as EB (engi bytes) by the comments. I can not find what the engi bytes are or where to place this section for the L4 port, and I'd like to know what OTP stands for, and how large to make this section for a L4 MCU?


Also, at the top of the config file is the MSB and LSB for the device ID. Where can I find the appropriate device ID for the L4 MCUs?


openbl library:
openbl project (STM32L5xx):
Reference manual (STM32L5xx): 
Reference manual (STM32L4xx): 

ST Employee

Hello @dremund-fortem 


This post has been escalated to the ST Online Support Team for additional assistance. 


We'll contact you directly.





One quick update, I found the device ID code in section 57.6.1 on page 2245. The device ID for the STM32L4 is 0x0470 or 0x0471.

Not exhaustive, but the L4's have several different die / identifiers..

    case 0x435 : printf("STM32L43xxx or L44xxx\n"); break;
    case 0x415 : printf("STM32L475xx, L476xx or L486xx\n"); break;
    case 0x461 : printf("STM32L496xx or L4A6xx\n"); break;
    case 0x462 : printf("STM32L45xxx or L46xxx\n"); break;
    case 0x470 : printf("STM32L4Rxxx or L4Sxxx\n"); break;
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..