Skip to main content
Paolo Chiantore
Associate II
March 10, 2017
Solved

ADC synchronization to TRGO2 and TIM break

  • March 10, 2017
  • 2 replies
  • 915 views
Posted on March 10, 2017 at 15:03

On STM32 F7 I'm using ADC injected conversions triggered by TIM1 TRGO2 signal (OC5 rising).

In case TIM1 break2 is triggered what should happen to ADC injected conversions? Will break2 disable all PWM outputs including OC5 Ref thus stopping ADC trigger?

If yes this is a limitation when doing motor control based on ADC End Of Conversion interrupt, because in case of a break2 (due to some external fault e.g. some overcurrent) the control will not be called anymore.

    This topic has been closed for replies.
    Best answer by waclawek.jan
    Posted on March 11, 2017 at 11:36

    Break acts only on channels with complementary outputs, i.e. CH1..CH3. And even there, it does not influence OCxREF (thus TRGO connected to them); the break circuitry is just before (or part of) the output control portion, see the timer block diagram at the beginning of advanced timers chapter.

    2 replies

    waclawek.jan
    waclawek.janBest answer
    Super User
    March 11, 2017
    Posted on March 11, 2017 at 11:36

    Break acts only on channels with complementary outputs, i.e. CH1..CH3. And even there, it does not influence OCxREF (thus TRGO connected to them); the break circuitry is just before (or part of) the output control portion, see the timer block diagram at the beginning of advanced timers chapter.

    Paolo Chiantore
    Associate II
    March 13, 2017
    Posted on March 13, 2017 at 09:24

    Thank you for your detailed answer. This is correct.

    I was mislead by a little demo I did in which  'ADC_IRQHandler' was initially called periodically at ADC EOC (TRGO2 triggered every 50us) but after a break it was called continously (every 4us) as if TRGO2 had some kind of malfunctioning.

    This was due to the ADC watchdog interrupt being continously triggered: once removed ADC watchdog source ADC EOC is still triggered periodically as expected, even after a break.