Closed
Description
When using analogWrite or ap3_pwm_output on pins 12 & 13 I'm unable to set different PWM rates without board freezing.
Using Artemis Redboard ATP and Arduino IDE for packages
This code freezes
void setup()
{
}
void loop()
{
ap3_pwm_output(12, 0, 100, AM_HAL_CTIMER_HFRC_12MHZ);
ap3_pwm_output(13, 0, 100, AM_HAL_CTIMER_HFRC_12MHZ);
delay(1000);
ap3_pwm_output(12, 50, 100, AM_HAL_CTIMER_HFRC_12MHZ);
ap3_pwm_output(13, 100, 100, AM_HAL_CTIMER_HFRC_12MHZ);
delay(500);
}
This code works
void setup()
{
}
void loop()
{
ap3_pwm_output(12, 0, 100, AM_HAL_CTIMER_HFRC_12MHZ);
ap3_pwm_output(13, 0, 100, AM_HAL_CTIMER_HFRC_12MHZ);
delay(1000);
ap3_pwm_output(12, 100, 100, AM_HAL_CTIMER_HFRC_12MHZ);
ap3_pwm_output(13, 100, 100, AM_HAL_CTIMER_HFRC_12MHZ);
delay(500);
}
By changing pins 12 to 32, both pieces of code function as expected.
edit: fixed typo and markdown
Metadata
Metadata
Assignees
Labels
No labels