Erasing Flash sectors in KL25 and FreeRtos

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Erasing Flash sectors in KL25 and FreeRtos

1,631 次查看
HeronBR
Contributor I

     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 ?

0 项奖励
回复
1 回复

968 次查看
Luis_Garabo
NXP TechSupport
NXP TechSupport

Hi Heron,

We don't have much experience in FreeRTOS but you might be missing something in your flash driver. You could use the MQX FlashX driver as a reference and compare what it does is the same you are doing in your FreeRTOS Flash driver. My two cents :smileywink:!

Hope this helps you.

Regards,

-Garabo