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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-14 9:16 AM
..\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) \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Solved! Go to Solution.
- Labels:
-
Bug-report
-
STM32H7 Series
-
TIM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-30 12:46 AM
Hello,
Thank you for bringing this issue to our attention.
Our development team is working on the analysis for fixing.
Thanks
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-15 12:25 AM
Hello @Nikita91​ ,
Could you please share your ioc file to help us reproduce the issue?
Thanks,
Sara.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-15 2:55 AM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-15 3:00 AM
Hello @Nikita91​ ,
This issue is not related to CubeMX.
I am adding @Imen DAHMEN​ to the loop to review this issue.
Sara.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-15 3:04 AM
Hello,
There is a question related to MX:
Where does MX find the definition of HRTIM1?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-15 3:07 AM
Hello @Nikita91​ ,
The stm32h7xx_lladc.h file is not generated by CubeMX. It is related to the Firmware.
Sara.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-15 8:01 AM
After digging a little deeper:
stm32h7xx_ll_adc.h can't compile when USE_FULL_ASSERT is defined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-17 1:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-17 4:39 AM
Done. Thank you for the tip.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-30 12:46 AM
Hello,
Thank you for bringing this issue to our attention.
Our development team is working on the analysis for fixing.
Thanks
Imen
Thanks
Imen
