SX1276 Tx Continuous Wave Demo Application

Dependencies:   SX1276Lib mbed

SX1276 Tx Continuous Wave Demo Application

This application is used for test purposes by outputting a continuous wave, at maximum power, at a given frequency.

Revision:
1:edbca7c3fbad
Parent:
0:d5e61ad8edd9
Child:
2:c6e6da9fc5e1
--- a/main.cpp	Tue Aug 19 08:50:29 2014 +0000
+++ b/main.cpp	Tue Aug 19 09:15:10 2014 +0000
@@ -89,6 +89,18 @@
 {
     uint8_t TxOuputPower = 0;
 
+    debug("\n\r\n\r     SX1276 Continuous Wave at full power Demo Application \n\r");
+        
+#if defined TARGET_NUCLEO_L152RE
+    debug("         > Nucleo-L152RE Platform <\r\n" );
+#elif defined TARGET_KL25Z
+    debug("         > KL25Z Platform <\r\n" );
+#elif defined TARGET_LPC11U6X
+    debug("         > LPC11U6X Platform <\r\n" );
+#else
+    debug("         > Untested Platform <\r\n" );
+#endif
+
     /**********************************************/
     /*                  WARNING                   */
     /* The below settings can damage the chipset  */
@@ -100,17 +112,9 @@
 
     if( Radio.DetectBoardType( ) == SX1276MB1LAS ) // 
     {
+        debug("\r\n     TEST_HF_OUTPUT on SX1276MB1LAS: 20 dBm at 915 MHz \r\n" );
         Radio.SetChannel( 915000000 );
         TxOuputPower = 14;
-        Radio.Write( 0x01, 0x88 );
-        Radio.Write( 0x3D, 0xA1 );
-        Radio.Write( 0x36, 0x01 );
-        Radio.Write( 0x1e, 0x08 );
-    }
-    else
-    {   // SX1276MB1MAS
-        Radio.SetChannel( 868000000 );
-        TxOuputPower = 20;
         Radio.Write( 0x01, 0x80 );
         Radio.Write( 0x44, 0x7B );
         Radio.Write( 0x3D, 0xA1 );
@@ -120,10 +124,23 @@
         Radio.Write( 0x46, 0x03 );
         Radio.Write( 0x4D, 0x87 );
         Radio.Write( 0x52, 0x60 );
+        
+        
+    }
+    else
+    {   // SX1276MB1MAS
+        debug("\r\n     TEST_HF_OUTPUT on SX1276MB1MAS: 14 dBm at 868 MHz \r\n" );
+        Radio.SetChannel( 868000000 );
+        TxOuputPower = 20;
+        Radio.Write( 0x01, 0x88 );
+        Radio.Write( 0x3D, 0xA1 );
+        Radio.Write( 0x36, 0x01 );
+        Radio.Write( 0x1e, 0x08 );
     }
     
 #elif TEST_LF_OUTPUT == 1
 
+    debug("\r\n     TEST_LF_OUTPUT on SX1276MB1xAS: 14 dBm at 434 MHz \r\n" );
     Radio.SetChannel( 433000000 );
     TxOuputPower = 14;
     Radio.Write( 0x01, 0x88 );