Rick Lei

CodeWarrior 0x200 Exception.

Discussion created by Rick Lei on Dec 16, 2008
Latest reply on Dec 17, 2008 by Paul Genua
I got a 0x200 exception from CodeWarrior during debuging my code. I found some reason from this forum which is the address is not accessible. However in my case, I can read the data from the address and the data is correct. But I can't write the data.
My case is as follows:
I am using a MPC855T and ISP1582. The USB chip is connected to chip select 5.
And the configuration is:
CS5_BR5:          .equ     0x0E000801
CS5_OR5:          .equ     0xFFFF8940
So the base address is 0x0E000000.
I try to write an unlock value to the register of ISP1582 following the chip's datasheet. The register's address is 0x7C.
The code is: 
*(volatile u16 *)(ISP158Xbase + reg) = value; ( here reg = 0x7C )
Then I got the 0x200 exception.
The interesting thing is that I can read the ID, 0x158230, from the chip. The address is 0x70.
The code is: 
u32 val = *(volatile u16 *)(ISP158Xbase + reg);
val |= ((*(volatile u16 *)(ISP158Xbase + reg + 2)) << 16); ( here reg = 0x70 )
Is there anyboy that know why the 0x200 exception happens?
Thanks a lot!