Just got a Giga R1 and I've set it up to run micropython. I'm having trouble finding a micropython pwm example to control a motor. The examples using pwm from the micropython machine library don't seem to work and the pwm function from the Timer library gives me an error:
"Pin (A3) doesn't have an alt for Timer(1)"
I'm hoping I can have a look at code that works to learn haw to properly set up the Timer function. Here's the micropython code I used:
from machine import Pin
from pyb import Timer
motorPin = pyb.Pin.board.PA3
timer = pyb.Timer(1, freq = 1000)
ch2 = timer.channel(2, mode = pyb.Timer.PWM, pin = motorPin, pulse_width_percent = 50)
Thanks