cancel
Showing results for 
Search instead for 
Did you mean: 

Cubemx pwm for stm32f7 nucelo board

Adam Davis
Associate II

Hi there. I'm trying to generate a Pwm signal using my nucelo board but I'm having issues doing this using cubemx.

I've configured the clocks and oscillator based on resources I've found online but I'm not too sure what the clock source should be. I've tried internal, external, and none. Yet nothing seems to working. Am I missing something fundamental here?

Could somebody point me in the right direction using the cubemx for the stm32f7 nucelo board please.

Thanks

2 REPLIES 2
T J
Lead

hi,

did you check the timer is running ?

    HAL_TIMEx_OCN_Start(&htim3, TIM_CHANNEL_1);
    HAL_TIM_Base_Start(&htim3);

Khouloud GARSI
Lead II

Hello @Adam Davis​ ,

I'd highly recommend you to refer to timer examples provided under the STM32CubeF7 V1.12.0 firmware package. It's found under the path below:

STM32Cube_FW_F7_V1.12.0\Projects\STM32F746ZG-Nucleo\Examples\TIM

The example titled "TIM_PWMOutput" shows how to configure the TIM peripheral in PWM mode.

You may take this example as a reference to correctly configure your peripheral.

Khouloud.