mpc5744p flash erase

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,939件の閲覧回数
XSL-WF
Contributor I

Problem Description: as shown in Figure 2, call the erase function to erase. Each single step of the for loop can erase 64K or 256K. However, if there is no problem with erasing 64K, it will fly away when the first 256K block is erased and 0xFFFFFFFF is written in the first picture! At present, the problem is located in the code area in Figure 1. How to solve it?

fig1

XSLWF_0-1647393676018.png

fig2

XSLWF_1-1647393690800.png

 

 

0 件の賞賛
返信
1 解決策
1,917件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Are all interrupts disabled before erase?

Most likely, this event should trigger Machine Check exception. Is there a handler for this exception in your project? It could help to find the root cause:

lukaszadrapa_0-1647520760344.png

Regards,

Lukas

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,929件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

most likely, this is caused by Read While Write (RWW) error. Notice that RWW is supported only  between partitions. When you erase/program a partition, the code must be executed from another partition or from RAM:

lukaszadrapa_0-1647425259079.png

Regards,

Lukas

0 件の賞賛
返信
1,924件の閲覧回数
XSL-WF
Contributor I
hi,
tks for your anwer.

At present, the erasure code is in RAM. When the code calling the erasure program is placed in the first 64K area(fig1), there are still two areas that cannot be erased(fig2). Once erased, it will run away. When you put all the code in the first 64K area, there is no problem.

fig1

XSLWF_1-1647482439185.png

fig2

XSLWF_0-1647482074970.png

 

タグ(1)
0 件の賞賛
返信
1,918件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Are all interrupts disabled before erase?

Most likely, this event should trigger Machine Check exception. Is there a handler for this exception in your project? It could help to find the root cause:

lukaszadrapa_0-1647520760344.png

Regards,

Lukas

0 件の賞賛
返信
1,906件の閲覧回数
XSL-WF
Contributor I

thank you very much.

According to your help, we made an improved interrupt handler and solved the problem.

0 件の賞賛
返信