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.
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.
Any help would be appreciated.
Pradeep M C