Skip to main content
Wonder Cakes
Visitor II
Jun 20, 2017 11:40 AM UTC
Question

What is the quickest way to read option bytes value in PIC32L1?

Posted on June 20, 2017 at 13:40

Hi,

I'm using STM32L1, and I would like to read out the option bytes values to make sure I was able to lock the read option of the memory.

What is the quickest way to do so ?

Thank you.

    This topic has been closed for replies.

    1 reply

    Zt Liu
    Senior III
    Jun 20, 2017 1:49 PM UTC
    Posted on June 20, 2017 at 15:49

    Hi Wonder Cakes!

    if you are using hal libraies, check your Cube example\Flash\Flash_WriteProtection Folders,

    It goes like this

    FLASH_OBProgramInitTypeDef OptionsBytesStruct;

    ...

    HAL_FLASH_Unlock();

    HAL_FLASH_OB_Unlock();

    HAL_FLASHEx_OBGetConfig(&OptionsBytesStruct);

    Is that what you want?