cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX versions and code generation

Terje Bøhler
Associate II

0690X000006DSZoQAO.pngHi

Regarding STM32Cube version:

I launch my STM32CubeMX and do Help About

Which gives the following:

Version 5.1.0

STM32Cube V1.0

Q1: Is this the “latest & greatest�? STM32Cube version?

Regarding STM32Cube code generation (do I get new code?):

I launch the STM32CubeMX project file (.ioc)

I re-configure some TIM1 parameters (see attached picture):

I then want new code to be generated for this new configuration.

I do I File Save Project followed by a File Exit.

I cannot see that any of the source code catalogs have a new, updated time/date.

Q2: Do the STM32CubeMX really generate a new, updated (HAL, LL, …) software for my project?

Regarding TIM1 used as PWM generator while ADCs are in use:

I want to add a feature to my project: A need a fixed/constant 200kHz output-pulse.

I try to configure TIM1-CH2 (PA.09) for this purpose, but no pulse is generated (tried lots of “TIM1-variations�?).

Q3: Can I use TIM1-CH2 (PA.09) for this “PWM-purpose�? when I already are using ADC1 channel 1-16 (I assume the ADC’s are using TIM1 for some purposes)?

I really appreciate assistance to these issues.

BR Terje Bøhler

3 REPLIES 3
Joerg Wagner
Senior III

Answer #1: 5.0.1

Answer #2: Basically, yes.

Answer #3: Did you read the reference manual, "how to use this driver" in particular? PWM_Init(), PWM_Start().

Terje Bøhler
Associate II

Reg Q2 (do I get new code?)

How can I get updated my initializatin code (main.c)?

I did the following:

1) Doubleclick (lunch) my STM32CubeMX project file “X.ioc�?

2) From STM32CubeMX I changed GPIO-pin PB7 from todays configuration as an output pin with symbol name «PB7_200kHz_Pin» to a «Reset_state» (unused) pin – without any symbol name ("User label").

3) Then I do: Save Project As C:\STM\C93-Phase-2\C93-x19-FAT\ X.ioc

I here assumed the STM32CubeMX would generate an updated version of my inititialisation code (main.c). But my Keil MDK-ARM inititialisation code (main.c) is not updated. GPIO-pin PB7 is still defined as output – with label name «PB7_200kHz_Pin»

My Q is: How can I get the STM32CubeMX to generate new init code (main.c) containing the new GPIO configurations? I don’t see any “generate code�? feature in this STM32CubeMX tool? Have I overseen/misunderstood something?

I appreciate assistance ...

BR Terje Bøhler

Imen.D
ST Employee

Hello,

In the right panel, there is "Generate code" button to generate your project.0690X000006DadOQAS.jpg

Kind Regards,

Imen.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen