Skip to content

Low Power examples: added extra Serial prints just before the TX&RX pins are disabled #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion libraries/Examples/examples/Advanced/LowPower/LowPower.ino
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ void setup()
// These two GPIOs are critical: the TX/RX connections between the Artemis module and the CH340S on the Blackboard
// are prone to backfeeding each other. To stop this from happening, we must reconfigure those pins as GPIOs
// and then disable them completely:
Serial.println("The TX and RX pins need to be disabled to minimize the current draw.");
Serial.println("You should not see any more Serial messages after this...");
delay(100);
am_hal_gpio_pinconfig(48 /* TXO-0 */, g_AM_HAL_GPIO_DISABLE);
am_hal_gpio_pinconfig(49 /* RXI-0 */, g_AM_HAL_GPIO_DISABLE);

Expand Down Expand Up @@ -104,4 +107,4 @@ void setup()
void loop()
{
//Do nothing
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ void setup()
// These two GPIOs are critical: the TX/RX connections between the Artemis module and the CH340S on the Blackboard
// are prone to backfeeding each other. To stop this from happening, we must reconfigure those pins as GPIOs
// and then disable them completely:
Serial.println("The TX and RX pins need to be disabled to minimize the current draw.");
Serial.println("You should not see any more Serial messages after this...");
delay(100);
am_hal_gpio_pinconfig(48 /* TXO-0 */, g_AM_HAL_GPIO_DISABLE);
am_hal_gpio_pinconfig(49 /* RXI-0 */, g_AM_HAL_GPIO_DISABLE);

Expand Down Expand Up @@ -140,4 +143,4 @@ extern "C" void am_rtc_isr(void)
delay(100);
digitalWrite(LED_BUILTIN, LOW);
}
}
}