S12XDT512 - Debug Illegal Address Reset and Flash Problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S12XDT512 - Debug Illegal Address Reset and Flash Problem

2,281 次查看
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 回复数

873 次查看
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 项奖励
回复

873 次查看
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 项奖励
回复