AnsweredAssumed Answered

Erasing Flash sectors in KL25 and FreeRtos

Question asked by Heron Hurpia on Mar 4, 2013
Latest reply on Mar 12, 2013 by Garabo

     I implemented successfully flash Erase and write routines as suggested in thread Erasing Flash sectors in KL25 on the Freedom Board, but when I tried to use with FreerRtos and more threads I got a message "No source available for "0xFFFFFFFE (0xFFFFFFFE)() "

     I already tried to use Cpu_DisableInt(); and taskENTER_CRITICAL(); but it didn't work. The error occurs after a few hundreds cycles.

 

Erase sector

     FLASH1_Erase(FLASH1Pointer, 0x1F000, 1024);

     do {

            FLASH1_Main(FLASH1Pointer);

            OpStatus = FLASH1_GetOperationStatus(FLASH1Pointer);

      } while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));

 

And then write the data in Flash:

 

      FLASH1_Write(FLASH1Pointer, FromPtr, 0x1F000, Size);

      do {

           FLASH1_Main(FLASH1Pointer);

           OpStatus = FLASH1_GetOperationStatus(FLASH1Pointer);

      } while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));

 

     Does someone have any suggestion ?

Outcomes