Flash Read/ write problem for s12xdg

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

Flash Read/ write problem for s12xdg

842件の閲覧回数
Pinak
Contributor II

I am working on flash bootloader on xdg128.

 

For communication with bootloader I am using serial port with interrupt.

 

But if I dont disable interrupt while actual flash read/write operation are going on the code hangs.

 

As per program flow chart for xdg128(as mentioned in datasheet), nothing is written about disabling interrupt.

 

Also as per flowchart if i check CBEIF bit for writing next word, writing fails. It works if some delay is given between them.

 

Why so.

ラベル(1)
0 件の賞賛
返信
1 返信

656件の閲覧回数
kef
Specialist I

Flash memory is not readable while any flash command is in progress (erase, blank check, program etc). You need to disable interrupts before, and reenable them only after flash command is complete. Also part of your flashing code, which clears CBEIF and waits until CBEIF is set, should execute from RAM or another memory, which is readable while flash is being programmed, erased etc.

0 件の賞賛
返信