-
-
Notifications
You must be signed in to change notification settings - Fork 213
Open
Description
Hi, There appears to be a bug in attachInterrupt() call.
If pinMode is called on a pin before attachInterrupt is called with 'CHANGE' parameter the pin is forced high.
Minimal example. Tested with Arduino Nano 33 BLE and Mbed OS Nano board 4.0.8.
void dummy() {} // dummy interrupt handler
void setup() {
pinMode(2, INPUT);
attachInterrupt(2, dummy, CHANGE);
}
void loop()
{}
Steps to reproduce.
- Load the sketch above
- Measure voltage on pin 2. It's 3.3V. Expected result is that pin would be floating.
If call to pinMode is commented out, the pin works correctly and does not have a pull-up.
Metadata
Metadata
Assignees
Labels
No labels