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 QM_BAE_review_1 by
Diff: main.cpp
- Revision:
- 36:cc77770d787f
- Parent:
- 15:e09aaaccf134
- Child:
- 37:8a8024c45dc0
--- a/main.cpp Tue Apr 19 21:27:07 2016 +0000
+++ b/main.cpp Fri Jun 03 13:53:55 2016 +0000
@@ -30,7 +30,7 @@
uint8_t ACS_INIT_STATUS = 0;
uint8_t ACS_DATA_ACQ_STATUS = 0;
-uint8_t ACS_ATS_STATUS = 0;
+uint8_t ACS_ATS_STATUS = 0x60;
uint8_t ACS_MAIN_STATUS = 0;
uint8_t ACS_STATUS = 0;
@@ -95,6 +95,7 @@
//*****************************************************Assigning pins******************************************************//
DigitalOut ATS1_SW_ENABLE(PTC0); // enable of att sens2 switch
DigitalOut ATS2_SW_ENABLE(PTC16); // enable of att sens switch
+
InterruptIn irpt_4m_mstr(PIN38); //I2c interrupt from CDMS
DigitalOut irpt_2_mstr(PIN4); //I2C interrupt to CDMS
I2CSlave slave (PIN1,PIN2);///pin1 pin2
@@ -762,11 +763,18 @@
ACS_STATE = 4;
ACS_ATS_ENABLE = 1;
ACS_DATA_ACQ_ENABLE = 1;
+
+
EPS_BATTERY_HEAT_ENABLE = 1;
actual_data.power_mode=3;
//............intializing pins................//
+
+ ATS2_SW_ENABLE = 1;
+ ATS1_SW_ENABLE = 1;
+ wait_ms(5);
ATS1_SW_ENABLE = 0;
- ATS2_SW_ENABLE = 1;
+
+ ACS_ATS_STATUS = 0x60; //Set Sensor 1 working , Sensor2 working and powered off by default
DRV_XY_EN = 1;
DRV_Z_EN = 1;
