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.

TMS320F28379D: How to initialize the interrupt on CPU2?

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hi, Engineers

I am trying to setup the CPU2 interrupt.  CPU timer0 interrupt is setup, but no int triggerred. by the way, is it possible that setup PWM4 interrupt on CPU1 and CPU2 handles the PWM4INT?

the code is below:

////////--------PIE interrupts---------/////////////////
pie.PIECTRL.bit.ENPIE = 1; // enable PIE vectors ENPIE=1
pie.PIEIFR1.all = 0x0000; // clear all PIE INT1 flags
pie.PIEIER1.all = 0x0000; // disable all PIE INT1
pie.PIEIER1.bit.INTx7 = 1; // enable INT1.7 = T0INT - T0 CPU
pie.PIEACK.all = 0xFFFF; // clear all PIE ACK flags

// CPU interrupts
IFR = 0; 
IER = 31; 
// CPU Timer T0 
T0.PERD = 32000; // 5kHz, T0PER = 200us s at 160 MHz
T0.CTRL.all = 0xC820; 

  • the updated code for CPU2 is below, but still not working:

    disableINT();
    eallow();
    IFR = 0; // clear CPU flags
    IER = 0; //
    system.PCLKCR0.bit.CPUTIMER0 = 1;// SYSCLK for T0
    // CPU Timer T0 - clocked by SYSCLK and starts at reset
    T0.PERD = 32000;//5kHz, T0PER = 200us s at 160 MHz
    T0.CTRL.all = 0xC820; // Start, free run, reload, Enable T0 INT
    ///////////////////////////Enable CPU int1 which is connected to CPU-Timer 0,
    IER |= 0x0001;
    IER |= 0x1000;
    ////////--------PIE interrupts---------/////////////////
    pie.PIECTRL.bit.ENPIE = 1; // enable PIE vectors ENPIE=1
    pie.PIEIFR1.all = 0x0000; // clear all PIE INT1 flags
    pie.PIEIER1.all = 0x0000; // disable all PIE INT1
    pie.PIEIER1.bit.INTx7 = 1; // enable INT1.7 = T0INT - T0 CPU

    pie.PIEACK.all = 0xFFFF; // clear all PIE ACK flags
    // CPU interrupts
    EINT; // Enable Global interrupt INTM
    ERTM; // Enable Global realtime interrupt DBGM
    protect();

  • Hi,

    Have you taken a look at the dual core examples available in C2000ware?

    Regards,

    Veena

  • Yes, I have.

    I have tested one project(IPCdrivers) but still didn't work.

    And also followed the forum about interrupt setting, but nothing happened.

    best regards,

    Gao

  • Can you point to the example you found was not working?

    Regards,

    Veena