Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
I would like to generate an interrupt every 100 ms in a CY8C3866. When I do this with a timer using the tc output pin, the ISR keeps firing about every 15 us or so for about 1 ms. It looks like the cause is that the tc pin stays high for about 1 ms after the unit reaches terminal count. How do I reset the count so the interrupt stops firing? Simple question I know. I'm new to PSoC. In a Microchip processor, I would just clear the interrupt and write a new value in the counter. But that does not work with this timer. Not sure what I'm doing wrong. I've read the datasheet for the timer several times and tried 3 or 4 ways of configuring and wiring the timer. Here's my current version of the ISR code:
/* `#START ISR_100ms_Interrupt` */
Thanks in advance!
/* `#END` */ An axample project with a simple 100 ms timer ISR would be great. If anyone knows where to find that on the Cypress website, please let me know. Otherwise, can someone point out what I'm doing wrong?
Instead of enabling the TC interrupt in the timer object, leave the interrupts disabled, and connect an 'Interrupt' component to the TC pin. Set the Interrupt to 'rising edge' triggered and that should resolve the issue.
You can do the following to achieve 100mS interrupt. Connect the TC terminal of Timer to an ISR as shown in figure, TimerWith-ISR. And set the Timer configuration as shown in Configure Timer. Zip file attached has the pics.