Iam using the RAK11720 module and i want to pwm a motor. The pwm pin is connected to GP37 ( digital out) but it looks like pwm is only working with analog ADC pins. Is this correct or is it still possible to pwm with the GP37 (pin 27) ?
@carlrowan run a test as well on a different pin and it doesn’t work.
It seems there are only certain pins possible.
However, I went through the Apollo3 datasheet and I couldn’t find any specific info about which pins can do PWM and which can’t.
So this means gp37 cannot be used as a pwm signal? I tried before with an adc pin and this worked but i already made an pcb so this is not possible anymore and i need the adc for another functionality.
But is there a way to create a software controlled pwm signal instead of hardware? So yes, how can i implement this?
Well i dont need a real high frequency if i can start a motor in 20 steps in 3-5 seconds its enough. Do you have any idea of the max frequency i can use on the gp37 pin?
I manage to get hardware PWM for GPIO37, GPIO44, GPIO33 and GPIO13.
The only one that could be setup through Arduino API was the GPIO44. For the other three GPIOs I have to use really low level API of Ambiq SDK.
I think, that all GPIOs that can be connected to some sort of Timer output, may be used as PWM output. But a really few of them can actually be used with Arduino API.
Is there any reason why this limited capability?
Through my journey looking internal implementation of PWM mapping, I could get an Idea that this is not a such trivial task. Even though I couldn’t see any explicit reason why three of the four GPIOs that I tried to use, were not available with Arduino API.
Well i made my own hardware PWM so for now its fine. But it in a new update it would be great if software pwm will be added for these pins because it looks like its possible but it isnt.