Timer interrupt in component code generation error

A forums to allow bugs and problems with Flowcode v6 to be reported and resolved.

Moderator: Benj

Post Reply
kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Timer interrupt in component code generation error

Post by kersing »

When using a timer (Timer1) in a component the code generation fails. The code for the macro is generated as expected:

Code: Select all

void FCD_06431_udpipstack1__TimerTick()
However the interrupt block generated calls the macro as if in the main flowchart:

Code: Select all

/*========================================================================*\
   Use :Interrupt
\*========================================================================*/

    //Handler code for [TMR1]
    #ifndef MX_ISR_T1
    #define MX_ISR_T1
    void _ISR _T1Interrupt(void)
    {
        IFS0bits.T1IF = 0;
        FCM_TimerTick();
    }
    #else
    #warning "This interrupt has previously been enabled, so the macro <TimerTick> may never get called."
    #endif
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Timer interrupt in component code generation error

Post by Benj »

Hi Jac,

Interrupts in components are a bit tricky to get right. I'll PM you a couple of examples of how I have done this in components that require interrupts.

Post Reply