Quicksand micro-electronics / Mbed 2 deprecated QW TD-module Firmware update

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
quicksand
Date:
Tue Nov 03 10:40:08 2015 +0000
Commit message:
This code allows you to update the firmware inside the Telecom Design modem on the QW shield using the TD Loader tool.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 1ccc476f2eb0 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Nov 03 10:40:08 2015 +0000
@@ -0,0 +1,44 @@
+#include "mbed.h"
+ 
+DigitalOut LED_0 (PB_6);
+
+//Virtual serial port over USB
+Serial pc(USBTX, USBRX);
+Serial modem(PA_9, PA_10);
+
+bool once = true;
+
+int main() {
+    pc.baud(9600);
+    modem.baud(9600);
+    char c;
+    
+    LED_0 = 1;
+    
+    char responsebuffer[3];
+    
+    while(1) {   
+        if(modem.readable()) {
+            pc.putc(modem.getc());
+        }
+        
+        if(pc.readable()) {
+            c = pc.getc();
+            responsebuffer[0] = responsebuffer[1];
+            responsebuffer[1] = responsebuffer[2];
+            responsebuffer[2] = c;
+                if( once && responsebuffer[0] == 'A' && responsebuffer[1] == 'T' && responsebuffer[2] == 'Z' )
+                {
+                    LED_0 = 0;
+                    wait(3);
+                    modem.printf("ATZ\n\rATZ\n\r");
+                    wait(0.1);
+                    modem.baud(115200);
+                    pc.baud(115200);
+                    wait(0.1); 
+                    once = false;
+                }      
+            modem.putc(c);
+        }
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 1ccc476f2eb0 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Nov 03 10:40:08 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11
\ No newline at end of file