cancel
Showing results for 
Search instead for 
Did you mean: 

stm32h7xx_ll_adc.c doesn't compile for STM32H723xx (1.10.1) when USE_FULL_ASSERT is defined LL_ADC_INJ_TRIG_EXT_HRTIM_TRG2 not defined because H723 doesn't have HRTIM

Nikita91
Lead II

..\system\STM32H7xx_HAL_Driver\Src\stm32h7xx_ll_adc.c:1056:16: note: in expansion of macro 'IS_LL_ADC_INJ_TRIG_SOURCE'
 1056 |   assert_param(IS_LL_ADC_INJ_TRIG_SOURCE(ADC_INJ_InitStruct->TriggerSource));
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~
..\system\STM32H7xx_HAL_Driver\Src\stm32h7xx_ll_adc.c:229:33: error: 'LL_ADC_INJ_TRIG_EXT_HRTIM_TRG4' undeclared (first use in this function); did you mean 'LL_ADC_INJ_TRIG_EXT_TIM2_TRGO'?
  229 |    || ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_HRTIM_TRG4)                \
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

Thank you for bringing this issue to our attention.

Our development team is working on the analysis for fixing.

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

9 REPLIES 9
Sara BEN HADJ YAHYA
ST Employee

Hello @Nikita91​ ,

Could you please share your ioc file to help us reproduce the issue?

Thanks,

Sara.

Nikita91
Lead II

Hello,

Sorry I don't use MX. I use TrueSTUDIO.

The problem comes from the lines 1143-1146 of stm32h7xx_lladc.h:

#if defined(HRTIM1)
#define LL_ADC_INJ_TRIG_EXT_HRTIM_TRG2     (ADC_JSQR_JEXTSEL_4 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)                                                                                                   /*!< ADC group injected conversion trigger from external peripheral: HRTIM1 TRG2 event. Trigger edge set to rising edge (default setting). */
#define LL_ADC_INJ_TRIG_EXT_HRTIM_TRG4     (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)                                                                              /*!< ADC group injected conversion trigger from external peripheral: HRTIM1 TRG4 event. Trigger edge set to rising edge (default setting). */
#endif /* HRTIM1 */

There is a conditional with HRTIM1, but H723 doesn't have HRTIM so HRTIM1 is not defined. => errors when LL_ADC_INJ_TRIG_EXT_HRTIM_TRG2 is referenced by IS_LL_ADC_INJ_TRIG_SOURCE().

I build a simple MX project with ADC1, and it compiles with CubeIDE 1.9.

But how can it compile when I can't find a definition of HRTIM1 anywhere?

Edit: When USE_FULL_ASSERT is defined it doesn't compile!

Sara BEN HADJ YAHYA
ST Employee

Hello @Nikita91​ ,

This issue is not related to CubeMX.

I am adding @Imen DAHMEN​  to the loop to review this issue.

Sara.

Hello,

There is a question related to MX:

Where does MX find the definition of HRTIM1?

Hello @Nikita91​ ,

The stm32h7xx_lladc.h file is not generated by CubeMX. It is related to the Firmware.

Sara.

Nikita91
Lead II

After digging a little deeper:

stm32h7xx_ll_adc.h can't compile when USE_FULL_ASSERT is defined.

Done. Thank you for the tip.

Hello,

Thank you for bringing this issue to our attention.

Our development team is working on the analysis for fixing.

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen