-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Hi gang,
Another interesting Apollo3 v2.1 quirk:
Pulling the Serial1 RX pin low causes the Artemis to hang with v2.1 of the core...
Steps to reproduce:
Redboard Artemis ATP
Run the following sketch
Use a jumper wire to pull the RX1 pin to GND
With v2.1.0 and v2.1.1 of the core, the Artemis hangs permanently - even when the jumper wire is removed
With v1.2.1, the code keeps on running
I haven't yet figured out why this happens, or exactly where the code hangs. I'm hoping @paulvha may have some insight on this (thank you in advance - as always).
I know that holding a serial RX pin low is 'illegal' (manifesting as a continuous start bit?) but folks need to know about this just in case the thing they have attached to the RX pin is (e.g.) powered down and pulls the pin low.
I'm kicking myself, because I actually noticed this a few weeks ago when I was upgrading OpenLog Artemis. I noticed that Serial1 RX would hang after deep sleep if nothing was connected to the RX pin. I eventually figured out that the (weak?) pull-up on the RX pin is removed after deep sleep. If the pin then floats low, the code hangs. I worked around this at the time by manually re-enabling the pull-up on the RX pin after deep sleep. I guess this might explain some of the behavior seen in #411?
Best wishes,
Paul (ZC)
// RedBoard Artemis ATP - Serial1 Rx test
//
// Let the code run for a few seconds,
// then use a jumper wire to pull Serial1 RX (RX1) low
//
// With v2.1.0 & v2.1.1 of Apollo3, pulling RX1 low causes the Artemis to hang...
// With v1.2.1, the Artemis keeps on running...
void setup() {
Serial.begin(115200);
Serial1.begin(115200);
}
void loop() {
Serial.print(F("Serial1.available is "));
Serial.println(Serial1.available());
delay(500);
}