cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to generate complementary PWM outputs on STM32MP2

ebuganik
Associate

Hi,

I'm trying to write a simple firmware for M33 core to test PWM outputs with TIM8 on STM32MP257FEV-1 board. It is possible to generate output for channels TIM8_CH1, TIM8_CH3 and TIM8_CH4, but as soon as I try to generate complementary outputs (TIM8_CH1N, TIM8_CH3N, TIM8_CH4N) to any of these timer channels, processor gets into HALT state. By this I mean that I've tried to map 6 GPIO pins to 6 complementary channels, because I need my firmware to drive a three-phase motor in the future. 

I've tried to do it as simple as possible by looking at some similar examples for other processors (e.g using HAL_TIMEx_PWMN_Start function to start complementary channel and so on), since I haven't found anything else for this processor. I'm also pretty aware that in my case there are 3 cores (cores of interest are A35 Linux core and M33 which will run this firmware). It seems that I have problems with Resource Manager and acquiring pins for channel complements, but I used them in the way they're listed as alternative functions in datasheet of this board. Not sure anymore if this is possible or how to do it.

I've uploaded some main files (with added code parts in the comments) that I use as a starting point and would appreciate any kind of advice.

Thanks in advance!

 

0 REPLIES 0