AnsweredAssumed Answered

MPC5777C PIT interrupts error

Question asked by duy hung on Aug 24, 2015

Hi all,

I use MPC5777C on Green Hills - Multi, i build demo code to blink led base on Example MPC5748G PIT ISR .

 

Now if demo code run PIT no interrupts it ok but I user PIT with interrupt it hang. I think it do not find address of vector table when PIT interrupt occurs.

I set MPC5777C_IsrVecTab.c file,

 

set PIT interrupts is location at 301 in vector table,

void INTC_Init(void) {  //-1--------------------------------------------------------------------   /* The Block Configuration Register is used to configure options of the INTC.       Initialize INTC for software vector mode */   INTC.MCR.R = 0x00000000;        //-2--------------------------------------------------------------------   /* configure IVORx offsets      This file also includes a trap for all core exceptions, excluding IVOR4 exceptions which have seperate handler */   e200zX_Interrupt_Setup();   //-3--------------------------------------------------------------------   /* configure Interrupt Base pointer      Set INTC ISR vector table base address */   INTC.IACKR.B.VTBA = (uint32_t) &IntcIsrVectorTable[0]; //-4--------------------------------------------------------------------   // assign VECTOR TABLE address //  INTC_0.IACKR[0].R = (uint32_t) IntcIsrVectorTable; //-5--------------------------------------------------------------------   // set lowest priority to enable interrupts from higher ones   INTC.CPR.B.PRI = 0; //-6--------------------------------------------------------------------   // assing required peripheral priorities   //INTC.PSR[226].R = 0x8001;    // PIT0   INTC.PSR[301].B.PRC_SEL = 0x00;    // PIT0   INTC.PSR[301].B.PRI = 0x01;    // PIT0 //-7--------------------------------------------------------------------   // Enable interrupts   asm(" wrteei 1"); }//INTC_Init

 

set

    .equ  INTC_IACKR, 0xFFF48010  # Interrupt Acknowledge Register address

    .equ  INTC_EOIR,  0xFFF48018  # End Of Interrupt Register address

 

Where am I missing ?

Do you have complete example of this PIT with interrupt ? Can you give me references ?

 

Thanks & Regards

D.Hung

Original Attachment has been moved to: MPC5777C_IsrVecTab.c.zip

Outcomes