cancel
Showing results for 
Search instead for 
Did you mean: 

Flash memory size STM32F303RET6

RCesc.1
Associate II

Good morning,

I need to create a shared memory space between two applications (Bootloader and Application).

I am working with STM32F303RET6 MCU.

I want to do this inside flash memory and not SRAM.

For that reason I found many examples and codes where functions are created to Erase Memory and Write it again.

Everything works fine if I use addresses from 0x8000000 to 0x803FFFF, while errors occurs if I try to share memory addresses from 0x8040000 to 0x8080000.

Just to be sure the problem are not related to those functions, I tried to write my Application from a specific flash memory address modifying linker file (.ld). I tried writing the application from address 0x8040000 like in the example. When I download the code, it fails.

/* Memories definition */
 MEMORY
 {
  CCMRAM  (xrw)  : ORIGIN = 0x10000000,  LENGTH = 16K
  RAM  (xrw)  : ORIGIN = 0x20000000,  LENGTH = 64K
  FLASH  (rx)  : ORIGIN = 0x8040000,  LENGTH = 80K
}

MCU STM32F303RET6 should have 512Kb of Flash, so I should be able to write into this range. Then I discovered some disaligning information between Datasheet and Reference Manual.

I also found this post in the community where is written that Datasheet has a typo mistake (and it is still present inside datasheet!)

ttps://community.st.com/s/question/0D53W00000wxBndSAE/memory-map-issues-of-stm32f303re

So, which is the correct flash memory size of STM32F303RET6 MCU?

Because, again, everywhere is written 512 Kb but I am not able to write flashing addresses between 0x8040000 and 0x8080000.

So it seems to be 256 Kb.

Thanks.

2 REPLIES 2

> I am not able to write flashing addresses between 0x8040000 and 0x8080000.

How are you trying to write them? How do you know you are not able to write to those addresses?

Don't you have write protection on higher portion of memory enabled?

Did you try CubeProgrammer?

JW

RCesc.1
Associate II

Maybe I found the problem.

Here I found the functions to Read and Write Flash Memory in runtime:

STM32/FLASH_PROGRAM/F1 SERIES at master · controllerstech/STM32 · GitHub.

At the beginning I only adapted names but I found out the number of pages was fixed inside functions and not passed as parameters.