S12XDT512 - Debug Illegal Address Reset and Flash Problem

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

S12XDT512 - Debug Illegal Address Reset and Flash Problem

2,282件の閲覧回数
Lewing
Contributor I
Hello,
 
I'm running a function for erase, reading data from serial interface and flashing them in RAM. (typical bootloader application)
I erase the first three flash blocks (Device is a 9S12XDT512) and from the last block only the needed sectors. (works fine)
I can also read the data from the serial interface and write it to one of the first three blocks, but when i try to write them to the last block. I get an Illegal Address Reset and don't know why.
 
I have all Interrupts and the Watchdog disabled.
I use global addressing to access the Flash memory.
 
Are there some useful tricks find out why this resets occur?
 
Besides the last block where the problems occur is also the block with the reset vector table and the unpaged flash is mapped to.
 
thanks
Matthias

--
Alban Edit: Please always include FSL Part Number in Message Subject line.



Message Edited by Alban on 2007-09-06 11:23 AM
ラベル(1)
0 件の賞賛
返信
2 返答(返信)

874件の閲覧回数
Steve
NXP Employee
NXP Employee
When you are programming that block you will not be able to read it correctly. An illegal address reset could be caused if you are reading that block and doing something with the result. This would include interrupts but also perhaps library routines that your code uses.
The best way to work out what's going wrong is to step through the code using BDM and observe exactly what's happening.
0 件の賞賛
返信

874件の閲覧回数
Lewing
Contributor I
thanx for your hint.
 
The compiler uses absolut jumps and so it jumped back to the code area.
I changed the compiler option to generate Position Independent Code and now it's running. :smileyhappy: 
0 件の賞賛
返信