May 19, 2021
04:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 19, 2021
04:13 PM
I'm trying to use a CCU8 timer slice to generate a short output pulse and then capture the time of an input rising edge, which will arrive sometime after the output pulse is finished.
To do this, I want to use one channel in compare mode, which will generate the pulse time, and one channel in capture mode, which will capture the rising edge time.
However, I want to do this in single-shot mode and not have the output reset when the timer stops. It appears that if I do this the simple way in edge-aligned mode, and set the compare match register for channel 1 to the length of the output pulse, then the output will reset right after the timer hits the period match, which I don't want.
If I instead make the compare match register a small value and time my pulse to the period match, inverting the output, I won't be able to capture the input edge, because the timer will have already stopped.
I could maybe use center-aligned mode and pre-load a value before starting the timer to be just before the compare match, and make the compare match close to the period match? The manual is a bit vague about how the active/passive rules apply in single-shot mode.
How can I prevent the output changing when the timer stops in single-shot mode, while still being able to generate a short pulse at the start of the timer run?
To do this, I want to use one channel in compare mode, which will generate the pulse time, and one channel in capture mode, which will capture the rising edge time.
However, I want to do this in single-shot mode and not have the output reset when the timer stops. It appears that if I do this the simple way in edge-aligned mode, and set the compare match register for channel 1 to the length of the output pulse, then the output will reset right after the timer hits the period match, which I don't want.
If I instead make the compare match register a small value and time my pulse to the period match, inverting the output, I won't be able to capture the input edge, because the timer will have already stopped.
I could maybe use center-aligned mode and pre-load a value before starting the timer to be just before the compare match, and make the compare match close to the period match? The manual is a bit vague about how the active/passive rules apply in single-shot mode.
How can I prevent the output changing when the timer stops in single-shot mode, while still being able to generate a short pulse at the start of the timer run?
- Tags:
- IFX
2 Replies
Jun 07, 2021
01:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 07, 2021
01:52 AM
Hi,
I am not sure I understood your request completely. Do you want the first channel to still continue counting ? What exactly needs to be done after period match for channel 1 ?
Best Regards,
Vasanth
I am not sure I understood your request completely. Do you want the first channel to still continue counting ? What exactly needs to be done after period match for channel 1 ?
Best Regards,
Vasanth
Oct 27, 2021
03:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 27, 2021
03:08 AM
Hi,
The thread was locked due to inactivity for a long time, you can continue the discussion on the topic by opening a new thread with reference to the locked one. The continuous discussion in an inactive thread may mostly be unattended by community users.
Thanks and Regards,
Nikhil