ADC EXTEN register when using timer trigger (TRGO) Topic is solved

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: RoccoMarco, barthess

faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

ADC EXTEN register when using timer trigger (TRGO)

Postby faisal » Fri Sep 21, 2018 1:21 am

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).

User avatar
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)

Postby Giovanni » Fri Sep 21, 2018 10:19 am

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

faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

Re: ADC EXTEN register when using timer trigger (TRGO)

Postby faisal » Fri Sep 21, 2018 5:48 pm

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?

User avatar
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

Postby Giovanni » Fri Sep 21, 2018 8:46 pm

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


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 16 guests