Skip to main content
Nikita91
Lead II
March 14, 2022
Solved

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

  • March 14, 2022
  • 5 replies
  • 1596 views

..\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) \
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This topic has been closed for replies.
Best answer by Imen.D

Hello,

Thank you for bringing this issue to our attention.

Our development team is working on the analysis for fixing.

Thanks

Imen

5 replies

Sara BEN HADJ YAHYA
Technical Moderator
March 15, 2022

Hello @Nikita91​ ,

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

Thanks,

Sara.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Nikita91
Nikita91Author
Lead II
March 15, 2022

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
Technical Moderator
March 15, 2022

Hello @Nikita91​ ,

This issue is not related to CubeMX.

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

Sara.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Nikita91
Nikita91Author
Lead II
March 15, 2022

Hello,

There is a question related to MX:

Where does MX find the definition of HRTIM1?

Sara BEN HADJ YAHYA
Technical Moderator
March 15, 2022

Hello @Nikita91​ ,

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

Sara.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Nikita91
Nikita91Author
Lead II
March 15, 2022

After digging a little deeper:

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

Nikita91
Nikita91Author
Lead II
March 17, 2022

Done. Thank you for the tip.