code crashes accessing randomization code

Dependencies:   LoRaWAN-SX1272-Application-24-31-9sec X_NUCLEO_IKS01A1 driver_mbed_TH02 LoRaWAN-lib-v1_0_1 SX1272Lib mbed

Fork of LoRaWAN-SX1272-Application-24-31-9sec by Oleh Zvonarov

Revision:
1:428dbf097fe6
Parent:
0:6cc76d70e2a1
Child:
8:0a3a16fd1bc8
--- a/app/main.cpp	Thu Apr 06 21:59:50 2017 +0000
+++ b/app/main.cpp	Sat Apr 29 07:41:12 2017 +0000
@@ -172,6 +172,8 @@
 
                 // Generate DevEUI if not defined by User
                 BoardGetDevEUI( DevEui );
+                
+                Led = 1;
 
                 // Join N/w server
                 DeviceJoin( );                
@@ -193,7 +195,9 @@
                 break;
             }
             case DEVICE_STATE_SEND:
-            {               
+            {   
+                Led = 0;
+                            
                 if( NextTx == true )
                 {
                     // Prepare payload frame based on application port