[KEAZN64] [Flash controller] Flash launching command stalls CPU for 20ms

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[KEAZN64] [Flash controller] Flash launching command stalls CPU for 20ms

910件の閲覧回数
mohammedaboelna
Contributor III

Hello,

I am trying to access the flash of target "Kinetis KEAZN64" in terms of erasing sectors, flashing words, .. etc.

I found out that launching command (FTMRH_FSTAT = 0x80;) after configuring command by "Erase command", CPU stalls for 20ms.

I.e. In code, at line [ FTMRH_FSTAT = 0x80; ], this operation takes 20ms to move to the next line of code.

I do not know why CPU is halted in that way while the flash controller should run in parallel to the CPU.

Any solutions please ?

Thank you in advance.

0 件の賞賛
返信
1 返信

792件の閲覧回数
gerardo_rodriguez
NXP Employee
NXP Employee

Hello Mohammed Aboelnasr,

The 20ms time is expected for a Erase Flash Sector command according to the datasheet. The flash memory technology has the limitation of not allowing read operations at the same time as an erase or program operation is occurring within the same block. Refer to the application note AN4695 for more information on this.

In your case, I believe that the bit MCM_PLACR[ESFC] is set and is enabling the stalling of the flash controller when busy to avoid a read collision.

Let me know if you have any question.

Regards,

Gerardo

0 件の賞賛
返信