Can we do FlashSuspend in the Callback during C90 flash driver's erase operation?

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

Can we do FlashSuspend in the Callback during C90 flash driver's erase operation?

1,091 次查看
toliuch
Contributor I

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

0 项奖励
回复
5 回复数

981 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Chandler,

yes, callback function or an interrupt handler are the right places for suspend operation.

There are demo codes in the SSD package:

pastedImage_1.png

pastedImage_2.png

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

0 项奖励
回复

981 次查看
toliuch
Contributor I

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

0 项奖励
回复

981 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Chandler,

no, that's not possible. User manual also talks about it:

pastedImage_1.png

Regards,

Lukas

0 项奖励
回复

981 次查看
toliuch
Contributor I

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

0 项奖励
回复

981 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复