This is a low power example of the MAX1473 RF Receiver using the MAX32630FTHR.

Dependencies:   MAX30208 mbed-dev max32630fthr USBDevice

Revision:
4:7320d2a40b92
Parent:
3:4af4942a59f2
--- a/main.cpp	Fri Sep 04 17:40:23 2020 +0000
+++ b/main.cpp	Fri Sep 04 20:45:01 2020 +0000
@@ -80,7 +80,7 @@
 
 InterruptIn CheckData(P5_6);        //Interrupt pin for detecting incoming messages
 
-DigitalIn sw1(SW1);                 //Used on start-up to stay in active mode for re-programming
+DigitalIn sw2(SW1);                 //Used on start-up to stay in active mode for re-programming
 DigitalOut RXEnable(P5_1);          //Used to Enable Reciever
 
 
@@ -156,8 +156,10 @@
 
 int main(void)
 {
+    //configure PMIC
     MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3);
-    uart.baud(9600);
+    
+    uart.baud(9600);    //baud rate set to 9600
     
     //check if starting at main because of LP0 wake-up
     if(LP_IsLP0WakeUp()) {
@@ -169,14 +171,13 @@
         RTC_Setup();
     }
     
+    //LEDs on to indicate active mode
     gLED = LED_ON;
     rLED = LED_ON;
     bLED = LED_ON;
     
     CheckData.mode(PullNone);   //Set Interrupt pin to no pull
     
-    //microUSB.printf("Waking Up\r\n");
-    
     while(1) {
         //Clear existing wake-up config
         LP_ClearWakeUpConfig();
@@ -186,7 +187,7 @@
         
         //hold down switch 1 to prevent the microcontroller from going into LP0
         //Hold down Switch 1 in order to re-program device
-        while(sw1 == 0);
+        while(sw2 == 0);
         
         RXEnable = 1;   //Enable the Reciever
         wait_us(250);       //Give the Reciever time to wake-up (250us on data Sheet)
@@ -233,15 +234,11 @@
                     printf("data = %i\r\n",output[0]);
                     wait(1);
                     
-                    //Allow the computer Serial Port to establish connection with computer
-                    //wait(5);
-                    
                     //Convert translated data into temperature data
                     float clesius = TempSensor.toCelsius(output[0]);
                     float fare = TempSensor.toFahrenheit(clesius);
                     printf("C = %f\r\n",clesius);
                     printf("F = %f\r\n",fare);
-                    wait(2);    //Allow time to print all information before returning to sleep mode
                 } //if    
                 //End character cannot be found while condensing array (incomplete transmission)
                 else{