diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCCMode.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCCMode.h index e91cec40a..151dc4ee2 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCCMode.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCCMode.h @@ -107,17 +107,17 @@ static int32_t CCModeVoltOut(CURRENT_USER_CODE *CurrentUserCode){ MeasureCurrent = MeasureCurrent * 1000; CCModeDACControl(IUCCurrent - MeasureCurrent); } -// NotifyCurrent[0] = (uint8_t) (IUCCurrent >> 24); -// NotifyCurrent[1] = (uint8_t) ((IUCCurrent & 0x00FF0000) >> 16); -// NotifyCurrent[2] = (uint8_t) ((IUCCurrent & 0x0000FF00) >> 8); -// NotifyCurrent[3] = (uint8_t) (IUCCurrent & 0x000000FF); + NotifyCurrent[0] = (uint8_t) (IUCCurrent >> 24); + NotifyCurrent[1] = (uint8_t) ((IUCCurrent & 0x00FF0000) >> 16); + NotifyCurrent[2] = (uint8_t) ((IUCCurrent & 0x0000FF00) >> 8); + NotifyCurrent[3] = (uint8_t) (IUCCurrent & 0x000000FF); // // NotifyVolt[0] = (uint8_t) (MeasureCurrent >> 24); // NotifyVolt[1] = (uint8_t) ((MeasureCurrent & 0x00FF0000) >> 16); // NotifyVolt[2] = (uint8_t) ((MeasureCurrent & 0x0000FF00) >> 8); // NotifyVolt[3] = (uint8_t) (MeasureCurrent & 0x000000FF); -// DACCode2Real2Notify(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant)); + DACCode2Real2Notify(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant)); CCModeDACEnable = 0; return MeasureCurrent; } @@ -131,7 +131,8 @@ static void CCModeDACControl(int32_t IUC_Measure_Difference){ INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant + IUC_Measure_Difference/1e5; DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant)); } - else if(IUC_Measure_Difference > 1000 || IUC_Measure_Difference < -1000){ +// else if(IUC_Measure_Difference > 1000 || IUC_Measure_Difference < -1000){ + else{ INSTRUCTION.VoltConstant = INSTRUCTION.VoltConstant + IUC_Measure_Difference/1e6; DAC_outputV(Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant)); } diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage.h index ffbc6ab8b..2944842bf 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/headstage.h @@ -883,7 +883,7 @@ static void update_ZM_instruction(uint8 *ins) { case CONSTANT_CURRENT:{ INSTRUCTION.eliteFxn = CONSTANT_CURRENT; - INSTRUCTION.SampleRate = 10000; + INSTRUCTION.SampleRate = 2; INSTRUCTION.CurrentLV = ins[3]; INSTRUCTION.ConstantCurrent = ( (uint32_t) (ins[4])<<24 | (uint32_t) (ins[5])<<16 | (uint32_t) (ins[6])<<8 | (uint32_t) (ins[7]) ); // GetInstructionParameter(ins+2);