- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...