cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 dual flash bank

b1aze
Visitor

Hi i am working on a project with STM32H7A3VGT6 chipset which has LTDC controller. my goal is to make a LVGL based UI with SquareLine Studio and interface a 24 bit parallel RGB display with it . so i have made a UI using SquareLine Studio and imported to my project but the issue is when i try to build it it says flash overflowed. i know that the UI takes so much space but the spec of STM32H7.. says it mas  1 MB RAM . later in the linker script i saw it uses dual bank flash not single , so can i use it like this to make it work ? and any one can explain why is the RAM is also divided?

MEMORY

{

ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K

FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K

/*FLASH2 (rx) : ORIGIN = 0x08100000, LENGTH = 512K*/

DTCMRAM1 (xrw) : ORIGIN = 0x20000000, LENGTH = 64K

DTCMRAM2 (xrw) : ORIGIN = 0x20010000, LENGTH = 64K

RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 1024K

RAM_CD (xrw) : ORIGIN = 0x30000000, LENGTH = 128K

RAM_SRD (xrw) : ORIGIN = 0x38000000, LENGTH = 32K

} 
b1aze_0-1762245597758.png

 

7 REPLIES 7
b1aze
Visitor

b1aze_0-1762245558018.png

look at this diagram too

TDK
Super User

The STM32H7A3VGT6 only has 1 MB of flash memory. You won't be able to use flash memory beyond that.

If you feel a post has answered your question, please click "Accept as Solution".
mƎALLEm
ST Employee

Hello @b1aze and welcome to the community.

You can't do that with STM32H7A3VG:

FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K

STM32H7A3VG has two banks of 512KB and they are not contiguous:

From AN5293 "Migration guide from STM32F7 Series to STMH74x/75x, STM32H72x/73x and
STMH7A3/7Bx devices" / page 22: 

mALLEm_0-1762264515973.png

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.

so the issue is my application is too big to fit into one bank  . can i combine both and  make a single bank or single section of  flash so that my application can fit  inside . i need a solution 

thats ok can i use both regions into one beacuse my application is too big to fit into one region so thats why i am asking.


@b1aze wrote:

so the issue is my application is too big to fit into one bank  . can i combine both and  make a single bank or single section of  flash so that my application can fit  inside . i need a solution 


You can't concatenate both regions in one Flash bank. This was almost said in my previous post.

You need to use another part number having contiguous Flash banks (2MB of Flash size), Ex STM32H7A3xIx:

mALLEm_0-1762270413496.png

 

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.

>>so the issue is my application is too big to fit into one bank 

Ok, so you'll need to use both, use the Linker Script to describe the different regions, and then direct objects and functions into specific portions. Not entirely straight forward, but can likely direct libraries, and use attribute and #pragma to control distribution.

You might be able to create a script to determine the size of the working set, say from a .MAP file, or other analysis, to generate a workable distribution in the Linker Script. You might have to peridically rebalance if you consume all your resources.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..