S12XDT512 - Debug Illegal Address Reset and Flash Problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S12XDT512 - Debug Illegal Address Reset and Flash Problem

1,762 Views
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
Labels (1)
0 Kudos
2 Replies

354 Views
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 Kudos

354 Views
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 Kudos