Skip to main content
Bence
Associate II
May 14, 2020
Question

LL library STM32 OUTPUT compare preload pwm setting enable is unsuccessful,May I ask what is the reason?

  • May 14, 2020
  • 5 replies
  • 6396 views

When I set Output compare preload to enable in the configuration interface, the generated code shows disable0693W000001cFw5QAE.png0693W000001cFvvQAE.png

This topic has been closed for replies.

5 replies

waclawek.jan
Super User
May 14, 2020

Look 2 lines higher than is the highlight - there's the preload enable.

JW

Bence
BenceAuthor
Associate II
May 15, 2020

Thank you for your answer. When I set Out put compare preload to disable in Device Configuration Tool, the highlight is still enable. I do n’t know how to configure to change these parameters. Could you tell me if you know?

0693W000001cIodQAE.png0693W000001cIoiQAE.png

waclawek.jan
Super User
May 15, 2020

I don't know.

@Nesrine.JLASSI​ , can you please have a look at this?

Thanks,

JW

Bence
BenceAuthor
Associate II
May 15, 2020

Thank you all the same, JW

Nesrine.JLASSI
Visitor II
May 15, 2020

Hello @Bence​ 

Could you please share your ioc file to check the issue.

Best regards,

Nesrine

Bence
BenceAuthor
Associate II
May 15, 2020

Hi, Nesrine . If you need any documents, please tell me。

Nesrine.JLASSI
Visitor II
May 15, 2020

Hello @Bence​ 

The LL are a translation of the intropack HAL drive. So, if in the function of the driver that you call there is a forcing of this parameter, then it appears in the LL code generation. 

In the reference function you would call (if you are in HAL):

HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim,

                      TIM_OC_InitTypeDef *sConfig,

                      uint32_t Channel)

There's a call for channel preload.

0693W000001cM1LQAU.png

This is the code you find in LL.

Best regards,

Nesrine

Bence
BenceAuthor
Associate II
May 18, 2020

Ok, I know, thank you. My solution is to enable it again during initialization.

waclawek.jan
Super User
May 15, 2020

Hi @Nesrine.JLASSI​

Why is then an option in the GUI to enable the preload, if it is ignored?

JW