Data storage interrupt invoked for MPC5604b on execution of lwzx

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

Data storage interrupt invoked for MPC5604b on execution of lwzx

Jump to solution
996 Views
pradeepmc
Contributor II

Hi,
Needed some help with an issue where Data storage interrupt is being invoked on execution of lwzx instruction.

I am using the following Codewarrior 10.7 evaluation edition.
Target MCU is MPC5604B

The following default settings are ON for the project:
c/c++ build -> settings -> PowerPC CPU -> Processor is set to ZEN (I cant find e200z0h core)
c/c++ build -> settings -> PowerPC CPU -> Compress for PowerPC VLE (zen)
c/c++ build -> settings -> PowerPC Compiler -> Processor -> Translate PPC ASM to VLE ASM (ZEN)

 On execution of the below code, Data storage interrupt is generated.
I did a step execution on the disassembled code and see that lwzx is the instruction causing the interrupt.

Disassembled code:

2064                  if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCB->uxPriority ] ) ) > ( UBaseType_t ) 1 )
40001aca:   e_lwz r3,0(r22)
40001ace:   se_lwz r0,44(r3)
40001ad0:   e_mulli r9,r0,20
40001ad4:   e_lis r8,0x4000
40001ad8:   e_add16i r8,r8,19464
40001adc:   lwzx r0,r8,r9
40001ae0:   se_cmpli r0,0x0001
40001ae2:   se_ble xTaskIncrementTick+0xf0 (0x40001ae6); 0x40001AE6

The assembly code is generated by the compiler.
The above code is part of an ISR.

As per the BOOK E reference manual:
checked the Excection syndrome register.

ESR    0x00000021    $ESR

Only below fields are set. Not sure what to do with this data.

   VLEMI =1

   XTE=1

Any help would be appreciated.


Regards,
Pradeep M C

Labels (1)
0 Kudos
1 Solution
770 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, XTE marks External Termination Error.

Typically it can be caused by

- ECC error  

- accessing of reserved memory

- accessing of unimplemented register

- accessing of peripheral registers that is turned off

- can be asserted by EBI bus monitor if enabled

View solution in original post

0 Kudos
2 Replies
771 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, XTE marks External Termination Error.

Typically it can be caused by

- ECC error  

- accessing of reserved memory

- accessing of unimplemented register

- accessing of peripheral registers that is turned off

- can be asserted by EBI bus monitor if enabled

0 Kudos
770 Views
pradeepmc
Contributor II

Thanks David.

Yes, it is because of the accessing of reserved memory.

I checked the DEAR register and the address was some invalid value.

I was able to fix the logical error in my code.

0 Kudos