To fix the hang problem
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: COM_POWER_ON_TX.h
- Revision:
- 295:699801854b71
- Parent:
- 271:72529b247333
- Child:
- 316:dd699de634b7
- Child:
- 319:c11a52b91d25
--- a/COM_POWER_ON_TX.h Fri Aug 26 16:08:38 2016 +0000 +++ b/COM_POWER_ON_TX.h Sun Aug 28 13:53:42 2016 +0000 @@ -112,10 +112,10 @@ } void COM_POWER_ON_TX() { - gPC.puts("Inside COM_POWER_ON_TX\r\n"); + //gPC.puts("Inside COM_POWER_ON_TX\r\n"); if( !(gFLAGS & COM_TX_FLAG) ){ gFLAGS = gFLAGS | COM_TX_FLAG; - gPC.puts("Inside COM_TX_FLAG\r\n"); + //gPC.puts("Inside COM_TX_FLAG\r\n"); gFLAGS = gFLAGS | BAE_SW_EN_FLAG ; if( gFLAGS & BAE_SW_EN_FLAG ){ /*WARNING: INFINITE WHILE LOOP POSSIBLE: if standby ack received and bcn tx main status = 0*/ @@ -125,7 +125,7 @@ gPC.puts("setting Bcn off\r\n"); wait(1); SET_BCN_STANDBY(tm_ptr); - gPC.puts("set Bcn off\r\n"); + //gPC.puts("set Bcn off\r\n"); uint8_t bcn_main_status = (tm_ptr->TM_string[2] & 0xEF); gPC.printf("bcn_main_status = 0x%02X\r\n",bcn_main_status); if(( bcn_main_status == 0xC0 )||( bcn_main_status ==0xA0 )){ @@ -139,7 +139,7 @@ gFLAGS = gFLAGS & (~RF_SW_STATUS_FLAG);/*RF_SW_STATUS_FLAG set to RF_COM_TX*/ } else{ - gPC.puts("diff\r\n"); + gPC.puts("waiting for bcn off\r\n"); Thread::wait(5000); } } @@ -147,9 +147,9 @@ gPC.puts("not A0\r\n"); SW_RST_BAE(); Base_tm *tm_ptr2 = NULL; - gPC.puts("set bcn off\r\n"); + gPC.puts("settin bcn off\r\n"); SET_BCN_STANDBY(tm_ptr2); - gPC.puts("bcn off\r\n"); + //gPC.puts("bcn off\r\n"); uint8_t standbyAck2 = 0; uint8_t bcn_main_status2 = (tm_ptr2->TM_string[2] & 0xEF); if( ( bcn_main_status2 == 0xC0 )||( bcn_main_status2 == 0xA0 ) ){