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?
Capture timer sync for MCPWM unit 0 and 1
Re: Capture timer sync for MCPWM unit 0 and 1
No examples or ideas on how to sync the capture timers of unit 0 and 1?
Re: Capture timer sync for MCPWM unit 0 and 1
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.
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: Qwantbot and 2 guests