psoc4 counter clear interrupt | Cypress Semiconductor
psoc4 counter clear interrupt
I am new to interrupts and was playing recent days to improve on a previous design of timer-box.
I successfully got some psoc4 demo with gpio pins as source and it worked. Now I am on UDB elements and irqs, however unlike the more general PWM based counter the most basic Counter lacks generated functions to reset interrupts. How do you achieve it?
So far I have:
uint8 c_r = Counter_1_ReadControlRegister();
//c_r &= ~ 1u;
c_r |= 1u;
Are those the right API functions and the value considering I am interrupting on compare of the counter! I got a bit lost with all the macros in the gen files maybe someone can give tips, 1u I derived from : Counter_1_STATUS_CMP_INT_EN_MASK;
Maybe it is a very noob question, btw so far the docs for psoc4 interrupts were really helpful.