Posted on March 17, 2017 at 02:59The original post was too long to process during our migration. Please click on the attachment to read the original post.
Yes, I generated the initial code with CubeMX. I've since then modified the timer initialization functions to what I previously tested on the Nucleo. The names are defined in main.h and shown below.
In an old code, the PWM generation was setup like this:
void SetTimerOutputCC_SingleEdge(Timer_t* Timer, u32 n, u32 Value_lsb) { Timer->EdgesSize[n] = 0; // Non zero triggers the DMA mode for multiple pulses Timer->EdgesTableAdr[n] = 0;
TIM_OC_InitTypeDef struct before calling HAL_TIM_PWM_ConfigChannel. This for Advanced timers (i.e. TIM1 and TIM8) among others includes the polarity of the inverted output. You surely already know this from the concise and detailed 'library' manual.
Well, that did it! The CubeMX code has the inverted output config calls as well, but I deleted them since I didn't have them during my testing. Thank you!