Example program demonstrating proper powering down of Telit radio and putting the processor into STOP mode.
Dependencies: WakeUp mbed mtsas SpiFlash25
Fork of Dragonfly_Cellular_Ping_Example by
Diff: main.cpp
- Revision:
- 2:0288328818cb
- Parent:
- 1:1411b4274907
- Child:
- 3:90cf39b6ed0d
--- a/main.cpp Wed Sep 30 14:45:58 2015 +0000 +++ b/main.cpp Fri Feb 26 16:47:54 2016 +0000 @@ -7,6 +7,11 @@ #include "mbed.h" #include "mtsas.h" +// This line controls the regulator's battery charger. +// BC_NCE = 0 enables the battery charger +// BC_NCE = 1 disables the battery charger +DigitalOut bc_nce(PB_2); + bool init_mtsas(); // The MTSSerialFlowControl object represents the physical serial link between the processor and the cellular radio. @@ -20,6 +25,9 @@ bool radio_ok = false; int main() { + // Disable the battery charger unless a battery is attached. + bc_nce = 1; + // Change the baud rate of the debug port from the default 9600 to 115200. Serial debug(USBTX, USBRX); debug.baud(115200);