How to Disable QuadDec_isr

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

cross mob
mame_1061036
Level 1
Level 1

I have a simple QuadDec module which is connected to a motor encoder. If I now control the motor exactly to the position of the index signal, I have the problem that the processor is constantly stuck in the interrupt CY_ISR( QuadDec_ISR ) (file: QuadDec_INT.c).

I tried to stop the interrupt, but without success:

  • QuadDec_isr_Disable(): shows no effect
  • QuadDec_isr_Stop(): Code ends in the IntDefaultHandler which is expected.

Can I disable the interrupt? Why don't these APIs work?

0 Likes
1 Solution
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

You can also try CyIntClearPending(QD_ISR_NUMBER); to clear any pending interrupts. This too must be called from the callback function. This can be done if you don't want to disable and enable the interrupt every time.

Do let us know if it worked in your case.

Thanks and regards

Hari

View solution in original post

0 Likes
6 Replies