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.

TMS320F28335: Failure after initialization of peripheral interrupt expansion (PIE)

Part Number: TMS320F28335

Hi Sirs,

We have a failure sensor from the field and symptom is system cannot work anymore.

We have bootloader and AP code and there is no response on both bootloader and AP.

I use JTAG to load sysmbol only and check the status.

I find the system is gone after disable PIE of initialization of PIE.

I verify it twich and it was gone on same line.

Do you know what is wrong?

It is very strange that this symptom is solved while rebuild the project and download again.

Thanks.

  • Gogi,

    Could you please explain further of what you mean by "gone after disable PIE of initialization of PIE"?

    - Ken
  • Hi Ken,

    One step of PIE initialization is Disable the PIE, "PieCtrlRegs.PIECTRL.bit.ENPIE = 0".

    Next step is to clear registers and i set breakpoint on this line but no response anymore. 

    Gogi

  • Gogi,

    Please see the following workshop:

    processors.wiki.ti.com/.../C2000_Archived_Workshops

    In lab 5 see the PieCtrl_5_6_7_8_9_10.c file. Notice that first the PIE block is disabled and immediately next the PIE vector table is copied (memcpy) to populate the PIE block. Next, the PIE interrupts are disabled, potentially pending PIEIFR flags are cleared, and the PIE interrupt groups are acknowledged. Then finally the PIE block is enabled.

    I can set breakpoints at any point within this file, as well as single step through this file, etc. Please compare you PIE initialization code to this file and let me know the results.

    I hope this helps. If this answers your question, please click the green "Verified Answer" button. Thanks.

    - Ken
  • Hi Ken,
    One difference is "memcpy(&PieVectTable, &PieVectTableInit, 256);"
    This still cannot figure out why the sysytem was hanged after "Disable PIE" on this sample.

    Our initialization is
    void InitPieCtrl(void)
    {
    // Disable Interrupts at the CPU level:
    DINT;

    // Disable the PIE
    PieCtrlRegs.PIECTRL.bit.ENPIE = 0;

    // Clear all PIEIER registers:
    PieCtrlRegs.PIEIER1.all = 0;
    PieCtrlRegs.PIEIER2.all = 0;
    PieCtrlRegs.PIEIER3.all = 0;
    PieCtrlRegs.PIEIER4.all = 0;
    PieCtrlRegs.PIEIER5.all = 0;
    PieCtrlRegs.PIEIER6.all = 0;
    PieCtrlRegs.PIEIER7.all = 0;
    PieCtrlRegs.PIEIER8.all = 0;
    PieCtrlRegs.PIEIER9.all = 0;
    PieCtrlRegs.PIEIER10.all = 0;
    PieCtrlRegs.PIEIER11.all = 0;
    PieCtrlRegs.PIEIER12.all = 0;

    // Clear all PIEIFR registers:
    PieCtrlRegs.PIEIFR1.all = 0;
    PieCtrlRegs.PIEIFR2.all = 0;
    PieCtrlRegs.PIEIFR3.all = 0;
    PieCtrlRegs.PIEIFR4.all = 0;
    PieCtrlRegs.PIEIFR5.all = 0;
    PieCtrlRegs.PIEIFR6.all = 0;
    PieCtrlRegs.PIEIFR7.all = 0;
    PieCtrlRegs.PIEIFR8.all = 0;
    PieCtrlRegs.PIEIFR9.all = 0;
    PieCtrlRegs.PIEIFR10.all = 0;
    PieCtrlRegs.PIEIFR11.all = 0;
    PieCtrlRegs.PIEIFR12.all = 0;


    }
  • Gogi,

    Are you saying that you do not have the following?

    asm(" EALLOW"); // Enable EALLOW protected register access
    memcpy(&PieVectTable, &PieVectTableInit, 256);
    asm(" EDIS"); // Disable EALLOW protected register access

    Without this the PIE table will not be loaded with the vectors. Try running your code with my PieCtrl.c file (replace your file with mine). Then test and let me know what happens.

    - Ken
  • Gogi,

    It's been a while since we have heard from you last. Therefore, we are assuming you were able to resolve your issue. If this isn’t the case, please reject this resolution or reply to this thread. If this thread locks, please make a new thread describing the current status of your issue. Thank you.

    - Ken