Closed ReikoR closed 1 year ago
Timer 1 and 2 are already used for encoder mode. Other channels of timers in encoder mode can't really be used for PWM, since the encoder mode changes the counter value.
If there is a lack of pins, then:
Current MCU schematic as reference:
Did you use STM32CubeIDE for creating the pin assignment? Based on the schematic I could not find pin assignment that would work.
For example encoder 2 is connected to PA9 and PA10 on the schematic , but encoder mode uses timer channels 1 and 2, which for the timer 1 are connected to pins PA8 and PA9.
Some more information on how to configure timers in STM32CubeIDE is on the firmware page: https://ut-robotics.github.io/picr22-home/basketball_robot_guide/electronics/firmware.html