Skip to content

GPIOs can be set to illegal states #8

Closed
@nseidle

Description

@nseidle

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions