AnsweredAssumed Answered

Advanced Timers not working in PWM in all channels.

Question asked by Zarthrag on Aug 1, 2014
Latest reply on Sep 16, 2014 by STM32Cube-T
Greetings,

I'm attempting to use stm32cubemx to configure the timers of a stm32f427ig to control a few rgb leds as open-drain, pwm outputs.  I'm using timers 1,3,4,5, and 8.  All of them are using channels 1 thru 3, except timers 1 and 3, which are using a 4th channel attached to a single-color auxiliary LED.

The "regular" timers are working as-expected.  However, the advanced timers, 1 and 8 aren't putting a signal out on their configured pins. So far, I've only gotten Ch 4 working on timer 1.  Channels 1-3 on timers 1 and 8 simply aren't working, even through their configuration is identical to that of Ch 4 on Tim1.

(As an added-bonus, STM32CubeMX seems to hang/crash often while generating code. Often losing custom code sections in main.c)

I'm starting the PWM units after initialization using the following commands:

     HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1);
     HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_2);
     HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_3);
     HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_4);
     
     


     HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_1);
     HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_2);
     HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_3);


     HAL_TIM_PWM_Start(&htim5, TIM_CHANNEL_1);
     HAL_TIM_PWM_Start(&htim5, TIM_CHANNEL_2);
     HAL_TIM_PWM_Start(&htim5, TIM_CHANNEL_3);

     HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1);
     HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_2);
     HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_3);
     HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_4);




     HAL_TIM_PWM_Start(&htim8, TIM_CHANNEL_1);
     HAL_TIM_PWM_Start(&htim8, TIM_CHANNEL_2);
     HAL_TIM_PWM_Start(&htim8, TIM_CHANNEL_3);


I've attached the .ioc used.  Any advice as to why the advanced timers aren't working as expected would be appreciated. :-)

Attachments

Outcomes