2015-08-19 04:59 AM
Hi,
I read datasheet STM32F072xx and AN2606 but I have a lack of understanding what are User Flash memory, System memory and embedded memory boot mode. Does someone could explain me :First of all I don't understand what ''X memory is selected as boot space''.1-Which are the differences and use for each of them?2- Is all about internal bootloader? 3-Which mode should be chosen for a custom bootloader and why? #stm32 #bootloader2015-08-19 05:40 AM
The BOOTx pins change the memory which is mapped/shadowed at the ZERO basis. This is where the processor looks for the vector table, and in the Cortex-M0 the only place the table can be.
If you create a custom boot loader, it has to reside at the BASE of the FLASH memory (@ 0x08000000), so it's the first thing to execute when the processor starts as it's also visible @ 0x00000000As your application isn't now at the base of the FLASH, you need to copy the vector table to the base of RAM (@ 0x20000000) and use the SYSCFG registers to map that @ 0x00000000 so the processor can use it.2015-08-19 05:49 AM
FLASH is, well, the non-volatile memory where you normally ''burn'' your program. System memory is the ''ROM'' where the bootloader is located. Embedded SRAM is, well, the SRAM where you normally place the variables, but you could copy part/whole of the program from FLASH into it and run it from there if you want.
JW2015-08-19 06:13 AM
Ok, and do you have an instance when the SRAM is prefered?
2015-08-19 06:14 AM
Hi pwdusid,
1.''X memory is selected as boot space'' it means that in the application initialization code, you have to relocate the vector table in the start address of this X memory.2.The embedded bootloader mode is used to reprogram the Flash memory using a serial interfaces. The embedded bootloader code is located in system memory. It is programmed by ST during production.3.Take a look to the Boot configuration paragraph in thehttp://www.st.com/web/en/resource/technical/document/reference_manual/DM00091010.pdf
-Syrine-2015-08-19 07:34 AM
Ok, and do you have an instance when the SRAM is preferred?
When you don't want Erase/Write operations on FLASH to stall execution.When you want to run code faster than FLASH permits. Not sure you have an ART on the F0's to mitigate the slowness of the FLASH with it's wait-states.