You are reading a single comment by @asez73 and its replies. Click here to read the full conversation.
  • Hello,

    About page sizes:
    There are some details from ST doc: The 2 upper pages have to be unlocked with a specific value for these sectors.
    The reference manual, chapter 3.8.6 page 63/835 Flash option control register (FLASH_OPTCR), bits nWRP[7:6] shows a specific context which is somehow unclear to me.
    I was wondering if the stmhal library does care about those bits or not?

    Also, I tried the F4DISCOVERY values and did not had success: Apparently, the magic word address was right in the middle of the sector 6 which also contained the saved values.
    I think, it is a matter of page size (tried only 16K while it probably should be 128K) and number of pages (tried 3 while it again probably should be 2).
    So I have to spend more time on that point.

    As a side point, you can get:
    a- the size of the flash incorporated to your STM32 by peeking address 0x1FFF 7A22, value in KiloBytes, see page 829/835. This could be used to determine what special tweaks have to be done, depending upon the sector to be programmed / erased.
    b- a unique id, 96-bit long, of the stm32 by peeking at address 0x1FFF 7A10

    Do you use any of those already?

    That's all for today...


Avatar for asez73 @asez73 started