fpiSTM wrote: Fri Jan 10, 2025 8:49 am
There is no issue with PB0.
Indeed I was doing something wrong and you were absolutely right, all the issue was related to pin definition:
another interesting thing when using hardwaretimer lib is to note that:
Code: Select all
T3_channel_3 = STM_PIN_CHANNEL(pinmap_function(digitalPinToPinName(pin_T3_CH_3_PWM), PinMap_PWM));
gTimer3PWM->setMode(T3_channel_3, TIMER_OUTPUT_COMPARE_PWM1, pin_T3_CH_3_PWM);
...STM_PIN_CHANNEL already "configures" the channel/pin. It is not enogh knowing which channel one wants to use. I could be sure "hey I know Im gonna use the channel 3!"
Code: Select all
gTimer3PWM->setMode(3, TIMER_OUTPUT_COMPARE_PWM1, pin_T3_CH_3_PWM);
well.... it doesnt work though
STM_PIN_CHANNEL is already STM_PIN_CONFIGURE_AND_RETRIEVE_CHANNEL_NUM
edit:
This way works as I thought
Code: Select all
T3_channel_3 = STM_PIN_CHANNEL(pinmap_function(digitalPinToPinName(pin_T3_CH_3_PWM), PinMap_PWM));
gTimer3PWM->setMode(3, TIMER_OUTPUT_COMPARE_PWM1, pin_T3_CH_3_PWM);
regards
julian