AnsweredAssumed Answered

CF_V1: Flash PageErase --> MCU crash at certain address

Question asked by M Pape on Jul 15, 2011
Latest reply on Jul 19, 2011 by M Pape

Hey there,

I'm developing on ColdFire V1 (MCF51QE128) using CodeWarrior v10.1. All flash routines are taken from AN3942.

BurstProg and PageErase are working in general, but:


When I want to Erase several pages in one function, the microcontroller crashed (debug session is terminated, connection lost; micro controller does wierd things). This happens in this function, when i>= 12:

void deleteAllRecordings()
    unsigned int i;
    flashSettings.currentDataLoc = 0;
    saveSettings(); //does some PageErase and Burstprog at 0x14000 - 0x143FF
    for(i=0; i < (FLASH_MAX_ADDRESS-FLASH_DATA_BASE)/1024; i++)
         Page_Erase((unsigned int *) FLASH_DATA_BASE + i*1024);


  • FLASH_MAX_ADDRESS = 0x20000
  • FLASH_DATA_BASE = 0x14400

So, this function crashes, when address is 0x17400 or higher (I tested it with i=12 or i=13, by skipping i=12).


Please help me finding the source of this problem.


Thanks in advance!