• AVR Freaks

Harmony 3: how to start Timer2/3 interrupt? [solved]

Author
yts
Super Member
  • Total Posts : 595
  • Reward points : 0
  • Joined: 2005/09/06 17:45:30
  • Status: offline
2019/09/09 23:32:53 (permalink)
0

Harmony 3: how to start Timer2/3 interrupt? [solved]

Environment:
PIC32MX270F256B-50I/SP
core: v3.4.0, csp: v3.4.0

I would like to know the method to start the timer2/3 (32 bits timer) interrupt.

Project Graph is shown in the attached figure.
Three functions (TMR2_Start,TMR2_InterruptEnable, and EVIC_SourceEnable) are used as a test in app.c .

void APP_Initialize ( void )
{
    /* Place the App state machine in its initial state. */
    appData.state = APP_STATE_INIT;
TMR2_Start();
TMR2_InterruptEnable();
EVIC_SourceEnable( _TIMER_3_IRQ );
}

However, the interrupt has never occurred, that is , __ISR(_TIMER_3_VECTOR, ipl1AUTO) TIMER_3_Handler (void) function has never been called.

I would be happy if someone helped me.
post edited by yts - 2019/09/12 20:09:01

Attached Image(s)

#1

1 Reply Related Threads

    yts
    Super Member
    • Total Posts : 595
    • Reward points : 0
    • Joined: 2005/09/06 17:45:30
    • Status: offline
    Re: Harmony 3: how to start Timer2/3 interrupt 2019/09/12 20:08:00 (permalink)
    0
    I find the solution.

    The check box for TMR3 Clock Enable should be checked manually as shown in the attached figure.
    Only one function, TMR2_Start(), is needed to start tirmer2/3 (32bits).

    void APP_Initialize ( void )
    {
        appData.state = APP_STATE_INIT;
    TMR2_Start();
    }

    Attached Image(s)

    #2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5