Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 10 months ago.
How to use more than 64Kb flash memory for the K64F
If the value for NUM_SECTORS is greater than 16 (64kB) then the MCU locks up or freezes during the for loop using function erase_sector(), with no errors reported.
It would be nice to use more than 128KB of flash memory realizing that the functions with
__attribute__((section(".ARM.__at_0x10080"))) static void setupserial(void) {
are using the upper sectors which should not be erased.
I suspect the bootloader function with address
__attribute__((section(".ARM.__at_0x10000"))) void bootloader(void) {
is being erased when NUM_SECTORS is greater than 16, since
0x10000
is decimal 65536.
Would I be correct in concluding that for the FRDM-K64F with 1MB flash I need to change the start address mapping to a larger number?
Question relating to:
1 Answer
10 years, 10 months ago.
You are correct, I randomly choose that value, you will need to move it to a larger value if you need more flash. I randomly picked that one, and since it is sufficient for just demonstrating how to do it I never changed it. Now if you do more than 16 sectors it indeed erases its own bootloader.