2025-09-07 12:01 AM - edited 2025-09-08 1:41 PM
In the STSPIN32G0601 device, the stm32g031 controller core has internal connections to complementary gate drivers. The outputs from the stm32g031 that can be configured with alternate function complementary signals (PA7, 8, 9, 10, PB0 and 1) are not used though. Internal connections in the STSPIN32G0601 are PA8, 9, 10, PB13, 14, and 15. I need to program a 3-wire, 2-phase signal that has a pulse frequency of 3,840Hz. I can do this with 3 separate output compare interrupts with each interrupt service routine writing to 2 pins. This is cumbersome compared to using the timer peripheral's PWM capabilities which are not available due to internal signal wiring. I have found nothing in the MCSDK development software that addresses this; so, I am coding in STM32CubeIDE.
MY QUESTION IS: am I overlooking a simpler way to approach this?
Solved! Go to Solution.
2025-09-08 2:01 PM
I found an answer to my own question. PB13, 14, and 15 are available for TIM1 OC1, 2, and 3 complementary alternate function outputs. When using STM32CubeMX, the default assignment for complementary outputs is PA7, PB0, 1. But if you click on other pins in the cubeMX GUI, you will see that other pins are also available for TIM1 outputs. If you select the TIM1 output function on one of those pins, the default selection will disappear in the GUI, and the desired pin will be reassigned. It is then possible to get TIM1_CHxN (x = 1, 2, 3) assigned as internally connected on the STSPIN32G0601.
2025-09-08 2:01 PM
I found an answer to my own question. PB13, 14, and 15 are available for TIM1 OC1, 2, and 3 complementary alternate function outputs. When using STM32CubeMX, the default assignment for complementary outputs is PA7, PB0, 1. But if you click on other pins in the cubeMX GUI, you will see that other pins are also available for TIM1 outputs. If you select the TIM1 output function on one of those pins, the default selection will disappear in the GUI, and the desired pin will be reassigned. It is then possible to get TIM1_CHxN (x = 1, 2, 3) assigned as internally connected on the STSPIN32G0601.