cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G491 Flash memory organization

Doublesets
Associate II

STM32CubeProgrammer2.17.pngSTM32CubeProgrammer2.16.pngHello

For my project I use a stm32g491rct6 with 256k flash. RM0440 Reference manual table 2 say that the flash of this Micro is 256KB in single bank, at this point what is the page size and flash mapping? In stm32g4xx_hal_flash.h FLASH_PAGE_SIZE is 0x800U /* 2 KB */ and bit22 in User option bytes is SET .
The project created with cubeide 1.15.1 map all flash in contiguous mode from 800000 to 803ffff.
If I use more than 128KB seems to write the flash in contiguous mode, if I open the same project in STMCubeIDE 1.16.0 when I flash the firmware the operation fail, the only way to solve the proble is to split the code in 2 zones, one fro 0x800000 to 801ffff and one to 8040000 to 805ffff.
Cubeprogrammer 2.16.0 show the block contiguos 0-255 from 8000000 to 807ffff while Cubeprogrammer 2.17.0 show blocks 0-63 from 8000000 to 801ffff and 65280-65343 from 8040000 to 805ffff.
Whats wrong?
Thanks

2 REPLIES 2
TDK
Guru

I've requested someone take a look at this. Please be patient.

Clearly it's a bug of some sort as far as I can see.

If you feel a post has answered your question, please click "Accept as Solution".
KDJEM.1
ST Employee

Hello @Doublesets and @TDK ,

 

Thank you for bringing this bug to our attention.

The STM32G491 belongs to category 4.

KDJEM1_2-1721132393375.png

So, the size is 2 Kbyte as mentioned in RM0440 table 18 

KDJEM1_1-1721132192769.png

 

Also, I advise you to refer to  STM32 MCU reference manuals: Expected preliminary ... - STMicroelectronics Community for some FLASH typos in RM0440

I confirm the issue and I reported internally.

Internal ticket number: 186668(This is an internal tracking number and is not accessible or usable by customers).

Thank you for your contribution in STCommunity. 

Kaouthar

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.