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

1 REPLY 1
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".