cancel
Showing results for 
Search instead for 
Did you mean: 

Complementary Signal PWM STM32F4 Discovery using cubemx

bram_labs
Associate II
Posted on October 21, 2016 at 10:21

The original post was too long to process during our migration. Please click on the attachment to read the original post.
3 REPLIES 3
bram_labs
Associate II
Posted on October 24, 2016 at 15:48

Solved, just need to be added : 

HAL_TIMEx_PWMN_Start(&htim1, TIM_CHANNEL_1);

Walid FTITI_O
Senior II
Posted on October 26, 2016 at 12:35

Hi BramLabs, 

Is this function not generated as HAL_TIMEx_PWM_Start() ? can you share you .ioc file.

-Hannibal-

bram_labs
Associate II
Posted on October 26, 2016 at 18:32

Sure :)

https://www.dropbox.com/s/il15kbf10xbha6c/TES_PWM_COMPLEMENTARY.ioc?dl=0

or you can see the file in attachment file.

(I just added ADC read configuration using DMA into the file for my project recently. Just delete the ADC things and reset the status of the pin to make sure only the PWM configuration enabled)

Oh yeah btw, for your question, i only tried using

HAL_TIMEx_PWMN_Start(&htim1, TIM_CHANNEL_1);

I tried looking at thestm32f4xx_hal_tim_ex.c function, and i found that

:

(#) Activate the TIM peripheral using one of the start functions:

(++) Complementary Output Compare : HAL_TIMEx_OCN_Start(), HAL_TIMEx_OCN_Start_DMA(), HAL_TIMEx_OC_Start_IT()

(++) Complementary PWM generation : HAL_TIMEx_PWMN_Start(), HAL_TIMEx_PWMN_Start_DMA(), HAL_TIMEx_PWMN_Start_IT()

(++) Complementary One-pulse mode output : HAL_TIMEx_OnePulseN_Start(), HAL_TIMEx_OnePulseN_Start_IT()

(++) Hall Sensor output : HAL_TIMEx_HallSensor_Start(), HAL_TIMEx_HallSensor_Start_DMA(), HAL_TIMEx_HallSensor_Start_IT().

Just ady tested and it worked.

________________

Attachments :

TES_PWM_COMPLEMENTARY.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1Jz&d=%2Fa%2F0X0000000blF%2F7aeaVVsziwb27gjCo8mlNmjYhH5X1yfrmQMYj3V7rCk&asPdf=false