Skip to main content
DWalk.1
Associate
October 10, 2020
Solved

In STM32CubeMX, I'm trying to set TIM1 for PWM mode 1 for the STM32L412KB. This does not appear as one of the options.

  • October 10, 2020
  • 3 replies
  • 3179 views

Here is a screen shot of the options. It appears that PWM modes 1 and 2 are missing.0693W000004JKxqQAG.png

This topic has been closed for replies.
Best answer by Khouloud OTHMAN

Hello DWalk.1,

I can't find any attached .ioc file, please check that you have correctly attach it (the screenshot doesn't reveal so many details). Otherwise opening a new project using STM32L412KBTx, "PWM mode 1" / 2 could be selected if you have already selected the appropriate Channel Mode (Please see attached screenshot).

>Its just that now the STM32Cube program complains about invalid properties with the configuration and asks me if I want to generating the code anyway.

The issue isn't reproduced from my side, the code is generated without any problem and without showing any warning message.

0693W000004JZucQAG.pngRegards,

Khouloud.

3 replies

Khouloud OTHMAN
Associate
October 12, 2020

Hello DWalk.1,

Could you please share your .ioc file for further check ?

Thanks in advance.

Regards,

Khouloud.

DWalk.1
DWalk.1Author
Associate
October 12, 2020
Khouloud,
It is attached. Note that I manually changed the .ioc file to include the correct PWM parameters and the STM32Cube generates the correct code. Its just that now the STM32Cube program complains about invalid properties with the configuration and asks me if I want to generating the code anyway.
David Walker
David Walker
Khouloud OTHMAN
Khouloud OTHMANBest answer
Associate
October 13, 2020

Hello DWalk.1,

I can't find any attached .ioc file, please check that you have correctly attach it (the screenshot doesn't reveal so many details). Otherwise opening a new project using STM32L412KBTx, "PWM mode 1" / 2 could be selected if you have already selected the appropriate Channel Mode (Please see attached screenshot).

>Its just that now the STM32Cube program complains about invalid properties with the configuration and asks me if I want to generating the code anyway.

The issue isn't reproduced from my side, the code is generated without any problem and without showing any warning message.

0693W000004JZucQAG.pngRegards,

Khouloud.

DWalk.1
DWalk.1Author
Associate
October 13, 2020

Khouloud,

That was the problem exactly. I was set to "Output Compare Cx CNx", not the PWM mode. Once I changed it, it is working fine.

Maybe I get an award for the most baseless post of the week?

Thanks for you help!

David Walker

Khouloud OTHMAN
Associate
October 22, 2020

Hi DWalk.1,

Please select my post as Best is answered your question, so that thread is marked as solved.

Regards.

Khouloud.