Closed
Description
Following code compiles but pin never outputs High. The reason is the pinMode sets pad 27 to INPUT_PULL which is some sort of illegal state
If you do the following code with pad 28, works great. I think this failure mode is happening on a few different pins.
See file ap3_gpio.cpp. padMode() calls am_hal_gpio_pinconfig, retval is non-zero.
If you simply do a pinMode(27, INPUT); everything works as expected (but without wanted pullups).
void setup() {
Serial.begin(9600);
Serial.println("Test");
pinMode(27, INPUT_PULLUP);
}
void loop() {
if (digitalRead(27) == LOW)
Serial.println("Low");
else
Serial.println("High");
delay(250);
}
Metadata
Metadata
Assignees
Labels
No labels