This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-F28379D: Confused about a certain line within the Externally Interrupt CPU01 code

Part Number: LAUNCHXL-F28379D

Tool/software:

HI 

I was going through the example of using the external_interrupt_cpu01 example and while enabling the X component of the PIE, I cam across the code ( 1st line of the code) , My question is that in all other examples of setting up the PWM and ADC interrupts, we dont use this line, so why we are using it in this case? Is it compulsory ?

Kind Regards

Sana

  • Hi Sana, we need to enable the PIE block. 

    This line of code is handled in the InitPieVectTable() function.

    void InitPieVectTable(void)
    {
    Uint16 i;
    Uint32 *Source = (void *) &PieVectTableInit;
    Uint32 *Dest = (void *) &PieVectTable;

    //
    // Do not write over first 3 32-bit locations (these locations are
    // initialized by Boot ROM with boot variables)
    //
    Source = Source + 3;
    Dest = Dest + 3;

    EALLOW;
    for(i = 0; i < 221; i++)
    {
    *Dest++ = *Source++;
    }
    EDIS;

    //
    // Enable the PIE Vector Table
    //
    PieCtrlRegs.PIECTRL.bit.ENPIE = 1;
    }

    Thanks

    Aswin

  • HI Aswin 

    Thank you very much for your reply. My question is that why we need to enable the PIE Vector table in this case while in other examples e.g. epwm_deadband_cpu01 and more examples like that  we don't need to enable the PIE vector table. Can we run the model without using the pie vector table?

    Kind Regards

    Sana 

  • Hi Sana,

    You need to enable the PIE Vector table in the interrupt examples. We are calling the InitPieVectTable function in the example and in the function we are enabling the pie vector table, because in the InitPieCtrl() function, we are disableing them.

    Thanks

    Aswin

  • Thank you very much Aswin, that was very helpful.

    Sana