summaryrefslogtreecommitdiff
path: root/io-module/mths.c
diff options
context:
space:
mode:
Diffstat (limited to 'io-module/mths.c')
-rw-r--r--io-module/mths.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/io-module/mths.c b/io-module/mths.c
index 79ba885..224e918 100644
--- a/io-module/mths.c
+++ b/io-module/mths.c
@@ -392,17 +392,21 @@ static int radio_on_mths(void)
log_info("turning on radio");
gpio_set_value(onoff_pin->pin.gpio, 0);
- msleep(5500);
+ // ref:Telit_LE910_V2_Hardware_User_Guide_r9.pdf
+ // pg 32: When USB is connected or after firmware updating,
+ // delay must be equal at least to 10 seconds.
+ msleep(10500);
// set on/off pin high
gpio_set_value(onoff_pin->pin.gpio, 1);
+ log_info("radio_on_mths: radio should be coming up");
msleep(200);
// check that power is high
value = gpio_get_value(pwrmon_pin->pin.gpio);
if(value == 0) {
- log_warning("radio is still off. performing radio reset");
+ log_warning("radio_on_mths: radio is still off. performing radio reset");
//Perform Hard Reset
gpio_set_value(rst_pin->pin.gpio, 0);
@@ -437,13 +441,16 @@ static int radio_reset_mths(void)
// wait for 2 sec before toggling on/off pin
msleep(2000);
- // drive on/off pin low for 6 sec
+ // drive on/off pin low for 10.5 sec
gpio_set_value(onoff_pin->pin.gpio, 0);
- msleep(6000);
+ log_info("Wait 10.5 seconds for on/off pin");
+ msleep(10500);
+ log_info("Done with wait 10.5 seconds for on/off pin");
// set on/off pin high
gpio_set_value(onoff_pin->pin.gpio, 1);
+ msleep(200); // Delay for status pin to switch
return 0;
}