Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of RAJANGAM_REVIEW_BAE_CODE by
Diff: BCN.cpp
- Revision:
- 66:a5d2b8dc6b9e
- Parent:
- 58:c4203e162d12
- Child:
- 73:d2bca4d2cc64
diff -r d1b12729fcdc -r a5d2b8dc6b9e BCN.cpp
--- a/BCN.cpp Thu Nov 24 09:45:08 2016 +0000
+++ b/BCN.cpp Sun Dec 04 07:58:20 2016 +0000
@@ -13,10 +13,9 @@
Timer timer_Set_BCN_TX_STATUS_FAILURE;
extern BAE_HK_actual actual_data;
-
DigitalOut bcn_sw(PIN14,0);
-Serial pc_bcn(USBTX, USBRX); //tx,rx
+Serial pc_bcn(USBTX, USBRX); //tx,rx //see if it creates a problem
//SPI spi(D11, D12, D13); // mosi, miso, sclk
//DigitalOut cs(D10); //slave select or chip select
SPI spi(PIN16, PIN17, PIN15); // mosi, miso, sclk
@@ -85,13 +84,13 @@
RETURN_UPTIME(BAE_uptime.read(),&days,&hours,&mins);
SHORT_HK_data[10] = CDMS_OC_FAULT;
SHORT_HK_data[10] = (SHORT_HK_data[10]<<1) | 0;//receiver_oc_fault//to be diss;
- SHORT_HK_data[10] = (SHORT_HK_data[10]<<1) | ((quant_data.voltage_quant[12]>>2)&0x3C);
+ SHORT_HK_data[10] = (SHORT_HK_data[10]<<1) | ((quant_data.voltage_quant[5]>>2)&0x3C);
SHORT_HK_data[10] = (SHORT_HK_data[10]<<2) | ((days>>3)&0x03);
SHORT_HK_data[11] = (days<<5) | (hours&0x1F);
RETURN_UPTIME(I2C_last.read(),&days,&hours,&mins);
SHORT_HK_data[12] = EPS_CHARGER_STATUS;
- SHORT_HK_data[12] = (SHORT_HK_data[12]<<4) | (quant_data.voltage_quant[13]>>4);
+ SHORT_HK_data[12] = (SHORT_HK_data[12]<<4) | (quant_data.voltage_quant[6]>>4);
SHORT_HK_data[12] = (SHORT_HK_data[12]<<3) | (days>>2);
SHORT_HK_data[13] = (days<<6) | (mins&0x3F);
@@ -165,7 +164,7 @@
printf("\n\rthe BCN_TMP is %d\n",temp_temp);
pc_bcn.printf("temperature = %d\n\r",BCN_TMP);
//Get BCN_HK data from BCN HW(SPI) //Store BCN_HK data in BCN_HK_BUFFER
- printf("BCN_SPND_TX = %d\n\r",BCN_SPND_TX);
+ pc_bcn.printf("BCN_SPND_TX = %d\n\r",BCN_SPND_TX);
if(BCN_SPND_TX == 1 )
{
timer_Set_BCN_TX_STATUS_SUSPENDED.reset();
@@ -238,7 +237,7 @@
//if( readreg(RF22_REG_0F_ADC_CONFIGURATION) & 0x80 == 0x80 )
{
temperature = readreg(RF22_REG_11_ADC_Value);
- temperature = (float)temperature*0.5 - 64; //* 0.5 factor
+ temperature = (float)temperature*0.5 - 64; //* 0.5 factor // to be checked
}
//else temperature = 0xFF;
// temperature = (float)temperature*0.5 - 64;
