Hi,
With C90 flash driver, for MPC56xx MCUs, we shall commit flash operations in synchronized way. While we can see the con-current operation can be implemented by the callback function. The erase operation supports FlashSuspend. The only place I can imagine to do this "Suspend" is in the callback function.
So, could you enlighten me:
1. Can we suspend the erase operation in the callback function?
2. Do we have any other chance to suspend in case the MCU does not include multiple bank, thus no RWW support?
Thanks,
Chandler
Hi Chandler,
yes, callback function or an interrupt handler are the right places for suspend operation.
There are demo codes in the SSD package:
This one is taken from https://www.nxp.com/downloads/en/device-drivers/MPC56XX_C90LC_JDP_SSD_100_DEVD.exe
File:
c:\Program Files (x86)\Freescale\Standard Software Driver v1.0.3\xPC56xx_C90LC\Demos\MPC5602D\Demo_Code\suspend_resume_demo\SusResDemo.c
Regards,
Lukas
Hi, Lukas:
Thank you very much!
In the callback, I see it suspend and then resume the erase operation. Can we suspend the erase operation without resume it? I expect the erase operation can return, and we have a late chance to resume it. This will make an asynchronized operation.
Thanks,
Chandler
Hi Chandler,
no, that's not possible. User manual also talks about it:
Regards,
Lukas
Hi, Lukas:
Thank you for further checking!
in the user manual, the statement doesn't mean directly that we have to resume in the same callback, it defines only the resume api shall be paired according to the suspend flag, no time sequence is required.
Can I have the source code of the api? it may be able to explain everything in detail.
thanks,
Chandler
Hi,
I checked the source code and I can see this use-case is not supported by the drivers. Both functions must be called in pair in Callback function.
Regards,
Lukas