@@ -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