Skip to content

Commit 903cbbf

Browse files
committed
Correct Serial start up after deep sleep
1 parent 49ed691 commit 903cbbf

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Firmware/OpenLog_Artemis/OpenLog_Artemis.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
the SPI lines low, preventing communication with the IMU: https://github.com/sparkfun/OpenLog_Artemis/issues/104
111111
112112
v2.2:
113-
Use Apollo3 v2.2.0 with changes by paulvha to fix Issue 117 (Thank you Paul!)
113+
Use Apollo3 v2.2.1 with changes by paulvha to fix Issue 117 (Thank you Paul!)
114114
https://github.com/sparkfun/OpenLog_Artemis/issues/117#issuecomment-1085881142
115115
Also includes Paul's SPI.end fix
116116
https://github.com/sparkfun/Arduino_Apollo3/issues/442

Firmware/OpenLog_Artemis/lowerPower.ino

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -443,13 +443,11 @@ void wakeFromSleep()
443443
am_hal_gpio_pincfg_t intPinConfig = g_AM_HAL_GPIO_INPUT_PULLUP;
444444
if (settings.fallingEdgeTrigger == true)
445445
{
446-
SerialPrintln(F("Falling-edge triggering is enabled. Sensor data will be logged on a falling edge on GPIO pin 11."));
447446
attachInterrupt(PIN_TRIGGER, triggerPinISR, FALLING); // Enable the interrupt
448447
intPinConfig.eIntDir = AM_HAL_GPIO_PIN_INTDIR_HI2LO;
449448
}
450449
else
451450
{
452-
SerialPrintln(F("Rising-edge triggering is enabled. Sensor data will be logged on a rising edge on GPIO pin 11."));
453451
attachInterrupt(PIN_TRIGGER, triggerPinISR, RISING); // Enable the interrupt
454452
intPinConfig.eIntDir = AM_HAL_GPIO_PIN_INTDIR_LO2HI;
455453
}
@@ -474,6 +472,10 @@ void wakeFromSleep()
474472
{
475473
pin_config(PinName(48), g_AM_BSP_GPIO_COM_UART_TX);
476474
pin_config(PinName(49), g_AM_BSP_GPIO_COM_UART_RX);
475+
if (settings.useTxRxPinsForTerminal == true)
476+
{
477+
configureSerial1TxRx();
478+
}
477479
}
478480

479481
//Re-enable CIPO, COPI, SCK and the chip selects but may as well leave ICM_INT disabled
@@ -491,9 +493,6 @@ void wakeFromSleep()
491493

492494
if (settings.useTxRxPinsForTerminal == true)
493495
{
494-
//We may need to manually restore the Serial1 TX and RX pins?
495-
configureSerial1TxRx();
496-
497496
Serial1.begin(settings.serialTerminalBaudRate); // Start the serial port
498497
}
499498

0 commit comments

Comments
 (0)