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: CPU timer 0 for slave core (CPU2) not getting serviced

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

I am using the same source code to initialize TIMER0 for both cores (CPU1 and CPU2). I am able to initialize, start and service the TIMER0 interrupt for CPU1 (master core) but for CPU2 (slave core), I see it always hitting the ISR for TIMER0 after the TIMER0 is started and Global Interrupts are enabled. I'm not sure why such different behavior is observed with same logic for different cores?

I am clear on the following:
1. Each core is having its timer instances (TIMER0, TIMER1 & TIMER2)
2. TIMER2 is dedicated for TI-RTOS (if used) and can be used as a normal timer module in case of a non-RTOS application.
3. There is no inter-dependency between CPU cores for their individual timer modules.

Device Interrupt Architecture (source TRM for TMS320F28379D (spruhm8i) by Texas Instruments)



Can someone please help me figure out what could be going wrong with TIMER0 of CPU2?

Regards.

Sumit Panse

  • Hi Sumit,

    I see it always hitting the ISR for TIMER0 after the TIMER0 is started and Global Interrupts are enabled

    Can you please provide more context behind this? The subject line states that Timer 0 on CPU2 is not serviced but here you are saying that the ISR is entered for TIMER0. Is the issue that the ISR is invoked right after you start the timer and not after the timer has finished counting?

    Best Regards,

    Marlyn

  • Hi Marlyn,

    Sorry, my bad for the subject line. Yes, you got it right, ISR is invoked right after timer is started.

    Regards,

    Sumit Panse

  • Hi Sumit,

    Thank you for the clarification! Are you using driverlib or bit field code?

    I modified the 'ipc_ex1_gpio_toggle' example found in C2000Ware to start timer0 at the same time in both CPU1/CPU2. The interrupt should occur every time the timer is finished: C:\ti\c2000\C2000Ware_4_00_00_00\device_support\f2837xd\examples\dual\ipc_gpio_toggle

    Could you please try this if you are using bitfield? If not, let me know and I can generate something in driverlib.

    CPU1:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //
    // Included Files
    //
    #include "F28x_Project.h"
    #include "F2837xD_Ipc_drivers.h"
    __interrupt void cpu_timer0_isr(void);
    //
    // Main
    //
    void main(void)
    {
    //
    // Step 1. Initialize System Control:
    // PLL, WatchDog, enable Peripheral Clocks
    // This example function is found in the F2837xD_SysCtrl.c file.
    //
    InitSysCtrl();
    #ifdef _STANDALONE
    #ifdef _FLASH
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    CPU2:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //
    // Included Files
    //
    #include "F28x_Project.h"
    #include "F2837xD_Ipc_drivers.h"
    __interrupt void cpu_timer0_isr(void);
    //
    // Main
    //
    void main(void)
    {
    //
    // Step 1. Initialize System Control:
    // PLL, WatchDog, enable Peripheral Clocks
    // This example function is found in the F2837xD_SysCtrl.c file.
    //
    // InitSysCtrl();
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Best Regards,

    Marlyn