Skip to main content
Visitor II
November 8, 2024
Solved

STM32G474RE HRTIM ADC Injected Conversions not triggered

  • November 8, 2024
  • 1 reply
  • 1008 views

 

Hi there,

I am configuring HRTIM TIMD to generate PWM which works as expected, roughly following the Synchronous Buck Converter example for the DPOW1 eval board (my target is the nucleo64).

I use LL API calls instead of HAL calls for my project.  I have configured an interrup handler to service the JEOC interrupt before calling LL_ADC_INJ_ReadConversionData12()  (? - not even sure if this is correct).  I do not see my interrupt handler being called so either:

a) ADC conversion is not being triggered, or,

b) ADC conversion is triggered but interrupt JEOC isn't being generated.

Can someone suggest a way of ruling out one or the other problem?  For example, is there a blocking LL API call that will allow reading of completed conversions?  Is there an example of this somewhere for reference?

Thanks for any help in advance.

 

    This topic has been closed for replies.
    Best answer by vectorotter

     

    Fixed.  I was missing calls to enable the interrupt:

     

    NVIC_SetPriority(ADC1_2_IRQn, 0);

    NVIC_EnableIRQ(ADC1_2_IRQn);

     

    1 reply

    vectorotterAuthorAnswer
    Visitor II
    November 9, 2024

     

    Fixed.  I was missing calls to enable the interrupt:

     

    NVIC_SetPriority(ADC1_2_IRQn, 0);

    NVIC_EnableIRQ(ADC1_2_IRQn);