cancel
Showing results for 
Search instead for 
Did you mean: 

Strange line (bug?) in LL_TIM_BDTR_Init()

mkm_ctv
Associate II

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

3 REPLIES 3
KDJEM.1
ST Employee

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.

Any updates on this?

KDJEM.1
ST Employee

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.