Delete scheduled MCPWM interrupts

GvTardy
Posts: 23
Joined: Tue Jan 01, 2019 3:26 pm

Delete scheduled MCPWM interrupts

Postby GvTardy » Mon Jul 20, 2020 8:37 pm

Hi,

I am trying to capture the time of pulse width. The detection is done via a laser sensor.
Unfortunately the edges I try to detect are shiny, so I encounter quite some reflection, debouncing is needed.

I use the MCPWM Capture module for the detection - interrupts on the edges. This causes the trouble, that the interrupt fires more than once.

What I noticed is: when the interrupt is executed, the bouncing has already ended. If I could delete all registered MCPWM interrupts, I would have solve my problem.

Is there a way to delete all scheduled MCPWM interrupts within the interrupt handler?

My apologies if this is a trivial question, I have not found any hints searching the internet.

I have pinned the executed routines to the APP Core, running only this task on it. All other code is running on the other core.

Thank you very much in advance,
this forum has been a great help in the past.
Georg

Who is online

Users browsing this forum: HitecSmartHome and 271 guests