Skip to main content
mkm_ctv
Associate II
January 26, 2023
Question

Strange line (bug?) in LL_TIM_BDTR_Init()

  • January 26, 2023
  • 2 replies
  • 1083 views

Lines 792..793 in stm32h7xx_ll_tim.c:

 MODIFY_REG(tmpbdtr, TIM_BDTR_AOE, TIM_BDTRInitStruct->AutomaticOutput);
 MODIFY_REG(tmpbdtr, TIM_BDTR_MOE, TIM_BDTRInitStruct->AutomaticOutput);

That second line looks odd as TIM_BDTRInitStruct->AutomaticOutput seems to be either LL_TIM_AUTOMATICOUTPUT_DISABLE or LL_TIM_AUTOMATICOUTPUT_ENABLE, both having 0 in the MOE bit position. Wouldn't it make more sense to explicitly set it to zero if that is what it's always supposed to be?

Is there an option in CubeMX to have MOE set from the start? Having to call LL_TIM_EnableAllOutputs() on some timers but not all is a little unintuitive (e.g. moving from TIM3 to TIM8 made my code stop working).

Using CubeMX version 6.7.0 and STM32Cube FW_H7 V1.11.0

This topic has been closed for replies.

2 replies

KDJEM.1
Technical Moderator
January 26, 2023

Hello @Magnus Kristiansen-Modéer​,

  • Concerning the first issue, I reported internally. I will get back to you with more details as soon as possible.

  • I let our STM32CubeMX expert @Semer CHERNI​  investigate concerning this "Is there an option in CubeMX to have MOE set from the start?".

Internal ticket number: 143866 (This is an internal tracking number and is not accessible or usable by customers).

  

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
mkm_ctv
mkm_ctvAuthor
Associate II
April 17, 2023

Any updates on this?

KDJEM.1
Technical Moderator
April 17, 2023

Hi @Magnus Kristiansen-Modéer​ ,

Concerning the state of 143866 ticket is in progress :) .

I will come back to you when the issue is solved.

Sorry for this inconvenience.

Thank you.

Kaouthar.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.