Skip to content

Commit

Permalink
some bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GiPa committed Jan 9, 2013
1 parent 50620fd commit 59c01b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
22 changes: 2 additions & 20 deletions G14/sensor_activation_snooze_mode/applilet3_src/r_cg_dtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,23 +166,14 @@ void DTC_Reload(void) {

dtc_controldata_2.dtccr = _01_DTC_TRANSFER_MODE_REPEAT | _02_DTC_REPEAT_AREA_SOURCE |
_04_DTC_SOURCE_ADDR_INCREMENTED | _00_DTC_DEST_ADDR_FIXED |
_10_DTC_CHAIN_TRANSFER_ENABLE | _00_DTC_REPEAT_INT_DISABLE |
_00_DTC_CHAIN_TRANSFER_DISABLE | _00_DTC_REPEAT_INT_DISABLE |
_40_DTC_DATA_SIZE_16BITS;
dtc_controldata_2.dtbls = 0x01;
dtc_controldata_2.dtcct = 0x02;
dtc_controldata_2.dtrld = 0x02;
dtc_controldata_2.dtsar = (uint16_t) &IT_timing[0];
dtc_controldata_2.dtdar = (uint16_t) &ITMC;

// dtc_controldata_3.dtccr = _01_DTC_TRANSFER_MODE_REPEAT | _02_DTC_REPEAT_AREA_SOURCE |
// _04_DTC_SOURCE_ADDR_INCREMENTED | _00_DTC_DEST_ADDR_FIXED |
// _00_DTC_CHAIN_TRANSFER_DISABLE | _00_DTC_REPEAT_INT_DISABLE |
// _00_DTC_DATA_SIZE_8BITS;
// dtc_controldata_3.dtbls = 0x01;
// dtc_controldata_3.dtcct = 0x02;
// dtc_controldata_3.dtrld = 0x02;
// dtc_controldata_3.dtsar = (uint16_t) &ADC_power[0];
// dtc_controldata_3.dtdar = (uint16_t) &ADM0;
}

void DTC_Create(void)
Expand Down Expand Up @@ -222,23 +213,14 @@ void DTC_Create(void)

dtc_controldata_2.dtccr = _01_DTC_TRANSFER_MODE_REPEAT | _02_DTC_REPEAT_AREA_SOURCE |
_04_DTC_SOURCE_ADDR_INCREMENTED | _00_DTC_DEST_ADDR_FIXED |
_10_DTC_CHAIN_TRANSFER_ENABLE | _00_DTC_REPEAT_INT_DISABLE |
_00_DTC_CHAIN_TRANSFER_DISABLE | _00_DTC_REPEAT_INT_DISABLE |
_40_DTC_DATA_SIZE_16BITS;
dtc_controldata_2.dtbls = 0x01;
dtc_controldata_2.dtcct = 0x02;
dtc_controldata_2.dtrld = 0x02;
dtc_controldata_2.dtsar = (uint16_t) &IT_timing[0];
dtc_controldata_2.dtdar = (uint16_t) &ITMC;

// dtc_controldata_3.dtccr = _01_DTC_TRANSFER_MODE_REPEAT | _02_DTC_REPEAT_AREA_SOURCE |
// _04_DTC_SOURCE_ADDR_INCREMENTED | _00_DTC_DEST_ADDR_FIXED |
// _00_DTC_CHAIN_TRANSFER_DISABLE | _00_DTC_REPEAT_INT_DISABLE |
// _00_DTC_DATA_SIZE_8BITS;
// dtc_controldata_3.dtbls = 0x01;
// dtc_controldata_3.dtcct = 0x02;
// dtc_controldata_3.dtrld = 0x02;
// dtc_controldata_3.dtsar = (uint16_t) &ADC_power[0];
// dtc_controldata_3.dtdar = (uint16_t) &ADM0;
}

/* End user code. Do not edit comment generated here */
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ void TMR_RJ0_Start(void);
void TMR_RJ0_Create(void);

/* IT_TIGGER_TIME + HOCO wakeup time + ADC conversion time must be less than SENSOR_ON_TIME */
#define SENSOR_ON_TIME 0xA
#define IT_TRIGGER_TIME 0x9
#define SENSOR_ON_TIME 0x400
#define IT_TRIGGER_TIME 0x250

/* End user code. Do not edit comment generated here */
#endif
3 changes: 3 additions & 0 deletions G14/sensor_activation_snooze_mode/applilet3_src/r_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ void ADC_setupAdmRegister(void) {
/* disable / enable comparators */
ADCE = 0U;
ADCE = 1U;

// ADM0 = 0x0;
// ADM0 = _18_AD_CONVERSION_CLOCK_8 | _00_AD_TIME_MODE_NORMAL_1 | _00_AD_OPERMODE_SELECT | _01_AD_COMPARATOR_ENABLE;
}

void setupChain(void) {
Expand Down

0 comments on commit 59c01b7

Please sign in to comment.