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 SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE_samp_23SEP_DMA_flag by
Revision 310:30f20cc5c94b, committed 2016-11-24
- Comitter:
- samp1234
- Date:
- Thu Nov 24 05:45:20 2016 +0000
- Parent:
- 309:91755ef8f22a
- Commit message:
- cdms Sampoorna mam latest code
Changed in this revision
--- a/CDMS_HK.h Tue Nov 22 08:08:46 2016 +0000
+++ b/CDMS_HK.h Thu Nov 24 05:45:20 2016 +0000
@@ -71,7 +71,7 @@
CDMS_HK_MAIN_COUNTER++;
FCTN_CDMS_HK(); //collects temperatures
- RSSI_volatge = COMRX_RSSI_volatge.read() * 3.3;//to be checked
+ RSSI_volatge = COMRX_RSSI_volatge.read() * 3.3*10;//to be checked
//gPC.printf("\n\rRSSI voltage = %f",RSSI_volatge);
VERIFY_COMRX();
VERIFY_RTC();
@@ -160,6 +160,7 @@
if(crc == ((uint16_t)BAE_HK[132] << 8) | (uint16_t)BAE_HK[133]){
//gPC.printf("BAE HK data recieved through I2C\t");
TIME_LATEST_I2C_BAE = FCTN_CDMS_RD_RTC() >> 7;
+ gPC.printf("\r TIME_LATEST_I2C_BAE = %d",TIME_LATEST_I2C_BAE);
/*for(int i = 0; i<15; i++)
gPC.printf("\r 0x%02X\n",BAE_HK[i]);*/
for(int i = 0; i<4; i++)
@@ -363,23 +364,25 @@
GPIO_STATUS=(COMRX_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<11)):(GPIO_STATUS)&(~((uint16_t)(0x1<<11)));
// COMTX_OC_FAULT //$
GPIO_STATUS=(COM_TX_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<10)):(GPIO_STATUS)&(~((uint16_t)(0x1<<10)));
+ //SD_CARD_OC_FAULT //$
+ GPIO_STATUS=(SD_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<9)):(GPIO_STATUS)&(~((uint16_t)(0x1<<9)));
//BAE_OC_FAULT //$
- GPIO_STATUS=(BAE_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<9)):(GPIO_STATUS)&(~((uint16_t)(0x1<<9)));
+ GPIO_STATUS=(BAE_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<8)):(GPIO_STATUS)&(~((uint16_t)(0x1<<8)));
//PL_GPIO_1_STATUS //$
- GPIO_STATUS=(PL_GPIO_1_STATUS)?(GPIO_STATUS)|((uint16_t)(0x1<<8)):(GPIO_STATUS)&(~((uint16_t)(0x1<<8)));
+ GPIO_STATUS=(PL_GPIO_1_STATUS)?(GPIO_STATUS)|((uint16_t)(0x1<<7)):(GPIO_STATUS)&(~((uint16_t)(0x1<<7)));
//PL_GPIO_2_STATUS //$
- GPIO_STATUS=(PL_GPIO_2_STATUS)?(GPIO_STATUS)|((uint16_t)(0x1<<7)):(GPIO_STATUS)&(~((uint16_t)(0x1<<7)));
+ GPIO_STATUS=(PL_GPIO_2_STATUS)?(GPIO_STATUS)|((uint16_t)(0x1<<6)):(GPIO_STATUS)&(~((uint16_t)(0x1<<6)));
//PL_GPIO_3_STATUS //$
- GPIO_STATUS=(PL_GPIO_3_STATUS)?(GPIO_STATUS)|((uint16_t)(0x1<<6)):(GPIO_STATUS)&(~((uint16_t)(0x1<<6)));
+ GPIO_STATUS=(PL_GPIO_3_STATUS)?(GPIO_STATUS)|((uint16_t)(0x1<<5)):(GPIO_STATUS)&(~((uint16_t)(0x1<<5)));
//PL_BEE_SW_OC_FAULT //to be verified
- GPIO_STATUS=(PL_BEE_SW_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<5)):(GPIO_STATUS)&(~((uint16_t)(0x1<<5)));
+ GPIO_STATUS=(PL_BEE_SW_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<4)):(GPIO_STATUS)&(~((uint16_t)(0x1<<4)));
//PL_EPS_LATCH_SW_OC_FAULT // to be verified
- GPIO_STATUS=(PL_EPS_LATCH_SW_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<4)):(GPIO_STATUS)&(~((uint16_t)(0x1<<4)));
+ GPIO_STATUS=(PL_EPS_LATCH_SW_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<3)):(GPIO_STATUS)&(~((uint16_t)(0x1<<3)));
//EPS_V_C_EN_STATUS
- GPIO_STATUS=(COM_RX_CNTRL)?(GPIO_STATUS)|((uint16_t)(0x1<<3)):(GPIO_STATUS)&(~((uint16_t)(0x1<<3)));
+ GPIO_STATUS=(COM_RX_CNTRL)?(GPIO_STATUS)|((uint16_t)(0x1<<2)):(GPIO_STATUS)&(~((uint16_t)(0x1<<2)));
//EPS_V_D_EN_STATUS
- GPIO_STATUS=(COM_TX_CNTRL)?(GPIO_STATUS)|((uint16_t)(0x1<<2)):(GPIO_STATUS)&(~((uint16_t)(0x1<<2)));
+ GPIO_STATUS=(COM_TX_CNTRL)?(GPIO_STATUS)|((uint16_t)(0x1<<1)):(GPIO_STATUS)&(~((uint16_t)(0x1<<1)));
// gPC.printf("%04x\n",GPIO_STATUS);
gPC.printf("\rBAE_OC STATE = %04x \n",GPIO_STATUS);
}
@@ -551,20 +554,28 @@
CDMS_RAM[18] = SD_LIB_WRITES;
for(int i = 0; i<4; i++)
CDMS_RAM[19+i] = TIME_LATEST_RTC >> (3-i)*8;
+
for(int i = 0; i<4; i++)
CDMS_RAM[23+i] = TIME_LATEST_I2C_BAE >> (3-i)*8;
+ gPC.printf("\r TIME_LATEST_I2C_BAE = %d\n",TIME_LATEST_I2C_BAE);
for(int i = 0; i<4; i++)
CDMS_RAM[27+i] = TIME_LATEST_I2C_SPEED >> (3-i)*8;
+ gPC.printf("\r TIME_LATEST_I2C_SPEED = %d\n",TIME_LATEST_I2C_SPEED);
for(int i = 0; i<4; i++)
CDMS_RAM[31+i] = TIME_LATEST_SD_WR >> (3-i)*8;
+ gPC.printf("\r TIME_LATEST_SD_WR= %d\n",TIME_LATEST_SD_WR);
for(int i = 0; i<4; i++)
CDMS_RAM[35+i] = TIME_LATEST_SD_RD >> (3-i)*8;
+ gPC.printf("\r TIME_LATEST_SD_RD = %d\n",TIME_LATEST_SD_RD);
for(int i = 0; i<4; i++)
CDMS_RAM[39+i] = TIME_LATEST_SPI_SPEED >> (3-i)*8;
+ gPC.printf("\r TIME_LATEST_SPI_SPEED = %d\n",TIME_LATEST_SPI_SPEED);
for(int i = 0; i<4; i++)
CDMS_RAM[43+i] = FSC_CURRENT[1] >> (3-i)*8;
+ gPC.printf("\r FSC_CURRENT[1] = %d\n",FSC_CURRENT[1]);
for(int i = 0; i<4; i++)
CDMS_RAM[47+i] = FSC_LAST[1] >> (3-i)*8;
+ gPC.printf("\r FSC_LAST[1] = %d\n",FSC_LAST[1]);
for(int i = 0; i<4; i++)
CDMS_RAM[51+i] = FSC_CURRENT[2] >> (3-i)*8;
for(int i = 0; i<4; i++)
--- a/CDMS_PL.h Tue Nov 22 08:08:46 2016 +0000
+++ b/CDMS_PL.h Thu Nov 24 05:45:20 2016 +0000
@@ -333,7 +333,7 @@
uint64_t temp_time;
temp_time=FCTN_CDMS_RD_RTC();
pl_time = (uint32_t)((temp_time>>7) & 0x000000000FFFFFFF);
-
+ // TIME_LATEST_SPI_SPEED = pl_time; //added by samp
//call test3() here
//test3(1);
--- a/Compression.h Tue Nov 22 08:08:46 2016 +0000
+++ b/Compression.h Thu Nov 24 05:45:20 2016 +0000
@@ -138,6 +138,7 @@
// gPC.printf("\n\rsrp");
debug_cntr = 0;
sci_time = FCTN_CDMS_RD_RTC();
+ TIME_LATEST_SPI_SPEED = sci_time;
#if debug_time
sci_time = 0x0000000021000000;
#endif
--- a/FMS_all.h Tue Nov 22 08:08:46 2016 +0000
+++ b/FMS_all.h Thu Nov 24 05:45:20 2016 +0000
@@ -248,6 +248,8 @@
void SYS_PWR_RESET() // Have to be decided with EPS team.
{
+ // sys_pwr_rst.output();
+ //wait_ms(1);
//sys_pwr_rst = 1;
}
--- a/cdms_sd.h Tue Nov 22 08:08:46 2016 +0000
+++ b/cdms_sd.h Thu Nov 24 05:45:20 2016 +0000
@@ -663,7 +663,7 @@
int r = write(buffer, 512);
if(r == 0 ){
temp = FCTN_CDMS_RD_RTC();
- TIME_LATEST_SD_RD = temp >> 7;
+ TIME_LATEST_SD_WR = temp >> 7;
}
return r;
}
