Skip to main content
Associate III
December 2, 2025
Question

H5 CubeMx does not allow setting EDATA number of sectors.

  • December 2, 2025
  • 2 replies
  • 649 views

In the H562 CubeMx setting the flash option bytes only allows flash number of sectors up to 7.

If you look at the FLASH_EDATA_EraseProgram example in the H5 firmware bundle you will see it sets the number of sectors to 8 before calling FLASH_OB_EDATAConfig function. this function decrements by one before ORing the sector enable bits.

Because CubeMx only allows up to seven when it generates code you do not get the full EDATA range.

And if you set 1 in cubemx I guess you do not get any??? 

2 replies

dvescoviAuthor
Associate III
December 2, 2025

see attached

TDK
Super User
December 3, 2025

This is a CubeMX bug. It should be allowing 1-8 to be input, not 0-7. Or if it does accept 0-7, then set EDATASize to one more than that.

TDK_0-1764724000310.png

vs

TDK_1-1764724458494.png

@Mahmoud Ben Romdhane 

"If you feel a post has answered your question, please click ""Accept as Solution""."
Technical Moderator
December 3, 2025

Hello @dvescovi @TDK ,

 

Let me thank you for your contributions.

An internal ticket is submitted to the dedicated team (Internal Ticket Number: Ticket 223076).

 

Thanks

Mahmoud

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.