How works global signal interrupt ?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi at all,

   

I'm working on PSoC5LP and I'm facing with a problem; I'm trying to get an interrupt from a global signal, setted on CTW:

   

   

This is my very simple main:

   

==================================================

   

uint8_t ctw_int_flag = 0u;

int main()
{

    /* Uncomment this line to enable global interrupts. */
    CyGlobalIntEnable;

    GSCTW_int_Start();       
    for(;;)
    {
        if(ctw_int_flag == 1u)
        {
            ctw_int_flag = 0;
            Pin_ctwSig_Write(~Pin_ctwSig_Read());           
        }
        else
        { }
    }
}

   

==================================================

   

and in the interrupt routine:

   

CY_ISR(GSCTW_int_Interrupt)
{
    /*  Place your Interrupt code here. */
    /* `#START GSCTW_int_Interrupt` */
    ctw_int_flag = 1u;
    /* `#END` */
}

   

Even if it's all very simple, the interrupt doesn't raising and I really do not know why...please, colud anyone help me ?

   

Regards

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The CTW is set up when the sleep timer is used. So get a SleepTimer  component, disable the interrupt selection and start it with the required frequency. Then you will probably see your CTW interrupt. Set your interrupt to "Rising Edge".

   

 

   

Bob

0 Likes
Anonymous
Not applicable

So, I can't use it without a sleep timer ? My goal is to use it with the watchdog timer, but I hope to see working it before introduce the WDT...

0 Likes