Capture timer sync for MCPWM unit 0 and 1

FO_swe
Posts: 3
Joined: Mon Jul 07, 2025 9:10 pm

Capture timer sync for MCPWM unit 0 and 1

Postby FO_swe » Mon Jul 07, 2025 10:32 pm

I¨m dabbling with a Time Delay Of Arrival (TDOA) system using four microphones. The microphones provides a digital output when the sound level reaches above a threshold set by a potentiometer.

As each MCPWM unit only has three capture channels I need to capture using both MCPWM unit 0 and unit 1.
The capture timers for the two units seem to be a bit off. At least I get the same capture timer value for all three channels on unit 0 and a different value from the one on unit 1, tested by using the same input signal for all four inputs.

Anyone know of some example code that shows how to sync the capture timers used by unit 0 and unit 1?

FO_swe
Posts: 3
Joined: Mon Jul 07, 2025 9:10 pm

Re: Capture timer sync for MCPWM unit 0 and 1

Postby FO_swe » Fri Oct 03, 2025 5:47 pm

No examples or ideas on how to sync the capture timers of unit 0 and 1?

FO_swe
Posts: 3
Joined: Mon Jul 07, 2025 9:10 pm

Re: Capture timer sync for MCPWM unit 0 and 1

Postby FO_swe » Sat Oct 04, 2025 6:42 pm

SOLVED

As I had two capture inputs free I made a simple solution.

One capture input on each unit is connected to the same GPIO output. The output is toggled during setup and the capture timer values for MCPWM unit 0 and MCPWM unit 1 are stored on the positive edge and I can use those values to correct captured timer values.

There are probably better solutions, but not that I'm able to produce.

Who is online

Users browsing this forum: ChatGPT-User and 2 guests