Skip to main content
Associate III
August 17, 2022
Question

Is this an Error in the STMH7B3xi Datasheet?

  • August 17, 2022
  • 4 replies
  • 1187 views

Section Memories

...

The Flash memory is organized as follows:

Two independent 1 Mbyte banks of user Flash memory, each one containing 128 user sectors of 8 Kbytes

each.

• 128 Kbytes of System Flash memory from which the device can boot.

• 1 Kbyte of OTP (one-time programmable) memory containing option bytes for user configuration

Shouldn't this read:

The Flash memory is organized as follows:

• Two independent 1 Mbyte banks of user Flash memory, each one containing 8 user sectors of 128 Kbytes

each.

This topic has been closed for replies.

4 replies

Associate III
August 18, 2022

I spose I should RTFM!!!

I was looking at openblt and for H7xx devices there is a struct 'tFlashSector'

which reads:

#elif (BOOT_NVM_SIZE_KB == 2048)
 /* { 0x08000000, 0x20000, 0, 1 }, flash sector idx 0 - reserved for bootloader */
 { 0x08020000, 0x20000, 1, 1}, /* flash sector idx 1 - 128kb */
 { 0x08040000, 0x20000, 2, 1}, /* flash sector idx 2 - 128kb */
...
 { 0x081C0000, 0x20000, 6, 2}, /* flash sector idx 14 - 128kb */
 { 0x081E0000, 0x20000, 7, 2}, /* flash sector idx 15 - 128kb */

Never ASSUME... it makes an *** out of U and ME

0693W00000QNwGlQAL.png 

So the fact is:

H74x devices have 8 sectors of 128K

H7A(B) device do indeed have 128 sectors of 8K

Go figure

Equipped with this knowledge openblt struct should be:

static const tFlashSector flashLayout[] =
{
/* (BOOT_NVM_SIZE_KB == 2048) */
 {0x8020000,0x2000,16,1}, /* flash sector idx 16 - 8kb */
 {0x8022000,0x2000,17,1}, /* flash sector idx 17 - 8kb */
…
{0x81FA000,0x2000,125,2}, /* flash sector idx 125 bank2 - 8kb */
 {0x81FC000,0x2000,126,2}, /* flash sector idx 126 bank2 - 8kb */
 {0x81FE000,0x2000,127,2}, /* flash sector idx 127 bank2 - 8kb */
}

Amel NASRI
ST Technical Moderator
August 19, 2022

Hi @Claydonkey​ ,

Are you speaking about OpenBL from ST?

I don't see STM32H7 example there. could you please provide some more precision?

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
Associate III
September 4, 2022

May I apologise for the delay replying.

My use case was for openblt not openbl

I think the best way to explain how my misunderstanding was resolved is to look at

https://github.com/claydonkey/openblt/tree/master/Target/Demo/ARMCM7_STM32H7_Nucleo_H7A3ZI_CubeIDE

in particular:

https://github.com/claydonkey/openblt/blob/master/Target/Source/ARMCM7_STM32H7/flash.c

and

https://github.com/claydonkey/openblt/blob/master/Target/Source/ARMCM7_STM32H7/usb.c

Understandably the STM327A(B) chips are very different beasts to the STM327xx series