Hello,
developing with a KL03 processor using the KDS v3.00 with KDSK 1.20 and using the flsl_flash component I am facing a strange error.
Stepping manually (F5/F6) through the instructions of the function FlashCommandSequence() in file FlashCommandSequence.c, the flash memory gets correctly written or erased but if program is running normally, processor does never go over the following loop and resets:
while(0x0U == (REG_BIT_GET(temp, FTFx_SSD_FSTAT_CCIF))) /* wait till CCIF bit is set */
Processor uses the internal clock and watchdog is disabled; before starting the flash instruction CCIF is high and ACCERR and FPVIOL flags are low; adding delays does not help.
What else? Thanks for any suggestion, Michael
Solved! Go to Solution.
Hi Michael Hauptman,
Did you relocate your FlashCommandSequence function to the RAM by using g_FlashLaunchCommand = (pFLASHCOMMANDSEQUENCE)RelocateFunction((uint32_t)ramFunc , 0x100 ,(uint32_t)FlashCommandSequence);?
Besides, please attach your problem project, I need to check it.
Waiting for your reply
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Michael Hauptman,
Did you relocate your FlashCommandSequence function to the RAM by using g_FlashLaunchCommand = (pFLASHCOMMANDSEQUENCE)RelocateFunction((uint32_t)ramFunc , 0x100 ,(uint32_t)FlashCommandSequence);?
Besides, please attach your problem project, I need to check it.
Waiting for your reply
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jingjing,
you are right! I am not fully confident with the KDSK and I missed that instruction...
Btw the classic PEx in KDS or CW is very, very, better than the KDSK version to help developpers!
Many thanks, Michael