S12XEP100, cannot erase flash block 0 at 7C_0000

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

S12XEP100, cannot erase flash block 0 at 7C_0000

ソリューションへジャンプ
894件の閲覧回数
AndersJ
Contributor IV

Is there anything in particular to consider when erasing flash at 7C_0000?

I erase sector by sector from 78_0000 and upwards, and crash when I reach 7C_0000.

My program runs in block 3 , 70_0000 to 73_FFFF.

 

Anders J

ラベル(1)
0 件の賞賛
返信
1 解決策
712件の閲覧回数
kef
Specialist I

Do you disable interrupts when erasing block0, which contains interrupt vectors?

 

Are you operating from block3 to avoid copying flash routines to RAM? Then try disabling interrupts. If you can't disable interrupts, then you may use IVBR to switch to alternative interrupt vectors table. But, either you need to move your ISRs to RAM, which is more work than moving only flash routine. Or, you may try allocating vectors table and all ISR's in the same PPAGE of block3, and then enable interrupts and don't leave this PPAGE while interrupts are enabled IVBR'ed to this PPAGE.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
712件の閲覧回数
AndersJ
Contributor IV

Block erasing has similar issues.

It crashes when erasing block 0, and also secures the device.

 

Can someone explain what I am doing wrong?

Anders J

 

0 件の賞賛
返信
713件の閲覧回数
kef
Specialist I

Do you disable interrupts when erasing block0, which contains interrupt vectors?

 

Are you operating from block3 to avoid copying flash routines to RAM? Then try disabling interrupts. If you can't disable interrupts, then you may use IVBR to switch to alternative interrupt vectors table. But, either you need to move your ISRs to RAM, which is more work than moving only flash routine. Or, you may try allocating vectors table and all ISR's in the same PPAGE of block3, and then enable interrupts and don't leave this PPAGE while interrupts are enabled IVBR'ed to this PPAGE.

0 件の賞賛
返信