cancel
Showing results for 
Search instead for 
Did you mean: 

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

DWalk.1
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

5 REPLIES 5

Hello DWalk.1,

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

Thanks in advance.

Regards,

Khouloud.

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

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
Associate II

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

Hi DWalk.1,

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

Regards.

Khouloud.