STM32L496
I'm using the ADC triggered with a timer using the timer's TRGO signal. How does the trigger polarity work in this case? The options are rising, falling, or both. It seems that the polarity is not relevant (as long as it is enabled in any way).
ADC EXTEN register when using timer trigger (TRGO) Topic is solved
Moderators: RoccoMarco, barthess
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: ADC EXTEN register when using timer trigger (TRGO)
Hi,
If I remember well, TRGO is a very short pulse, this is why you don't see any difference. Raising and falling edges are very close to each other.
Giovanni
If I remember well, TRGO is a very short pulse, this is why you don't see any difference. Raising and falling edges are very close to each other.
Giovanni
Re: ADC EXTEN register when using timer trigger (TRGO)
Giovanni wrote:Hi,
If I remember well, TRGO is a very short pulse, this is why you don't see any difference. Raising and falling edges are very close to each other.
Giovanni
It's important if cycle accuracy is required. I was confused whether the polarity had to do with the timer compare or something. From what you're saying it has to do with the TRGO line itself. If so, it should be rising edge. Though, if that is the behavior, then wouldn't a TRGO event trigger 2 conversions if you set the ADC to trigger on rising and falling edges? Or in general does it ignore requests that are too close to one another?
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: ADC EXTEN register when using timer trigger (TRGO) Topic is solved
I agree that it should be the rising edge.
In case of "both edges" I think the falling edge is just ignored because the conversion would still be in progress after the raising edge, I don't see any evidence of buffering for triggers in manual.
Depending on the TIM clock and ADC settings, TRGO pulse could be made wider than the conversion time, I think it would cause 2 conversions in that case.
Giovanni
In case of "both edges" I think the falling edge is just ignored because the conversion would still be in progress after the raising edge, I don't see any evidence of buffering for triggers in manual.
Depending on the TIM clock and ADC settings, TRGO pulse could be made wider than the conversion time, I think it would cause 2 conversions in that case.
Giovanni
Who is online
Users browsing this forum: No registered users and 16 guests