MPC5644C Data Flash erase and watch dog

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5644C Data Flash erase and watch dog

1,210 Views
shepherd
Contributor II

Hi

 

I'm using data flash FEE for key parameter stored.

Power down strategy and some other application, will update the FEE.

I tested erase one block data flash will take nearly 1s, this is extremely beyond internal watchdog and external watchdog in my design. This is will cause Flash ECC error while access this area.

 

So I want to know how I can clear the watchdog while erase the Flash (from NXP Flash Lib), or if any other solution to fix this issue.

 

B.R.

Qifeng Chen

Labels (1)
5 Replies

866 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

if the flash drivers are configured as asynchronous, you just enter request for flash operation and the function does not wait for the end of operation. Then you just test in main function if the operation is completed.

If the flash drivers are configured as synchronous, you can use callback function in FLS drivers. The callback function should just refresh the watchdog. The callback function is called again and again from FLS driver until the flash operation is completed.

Regards,

Lukas

866 Views
ziomocci
Contributor IV

Dear Lukas,

 I am reading the sample code in the C90FL SSD folder and it seems that if, for example, we are erasing a memory section/block,  we need to call FlashSuspend and FlashResume.

Anyway, my erase callback simply contains a macro for WDT_refresh, without any call to suspend and resume, and it works well.

So, could you distinguish cases in which we need suspend/resume from which ones we do not need them?

 

Thank you in advance,

 

B.R.

 

Andrea Mocci

0 Kudos

866 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Andrea,

it is not necessary to call FlashSuspend/FlashResume when refreshing the watchdog. You can use just the callback function.

FlashSuspend/FlashResume can be used when you want to read data from partition/bank (depends on your device) which is being programmed/erased because the Read-While-Write is supported only between partitions/banks.

Regards,

Lukas

866 Views
ziomocci
Contributor IV

Always clear and exhaustive answers!!!


Thank you very much.


B.R.


Andrea Mocci

0 Kudos

866 Views
shepherd
Contributor II

Thank you, Lukas

I will try in my project.

B.R.

Qifeng

0 Kudos