Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -r60e0fc291e3897ab9b86aee7181eeb6d6dd7d35f -rc48ea51c06c9d002f1b9b6a1d7b72d69756f183d --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 60e0fc291e3897ab9b86aee7181eeb6d6dd7d35f) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision c48ea51c06c9d002f1b9b6a1d7b72d69756f183d) @@ -49,7 +49,7 @@ #define MAX_BLOOD_PUMP_PWM_DUTY_CYCLE 0.89 ///< Controller will error if PWM duty cycle > 90%, so set max to 89% #define MIN_BLOOD_PUMP_PWM_DUTY_CYCLE 0.10 ///< Controller will error if PWM duty cycle < 10%, so set min to 10% -#define BP_CONTROL_INTERVAL_SEC 5 ///< Blood pump control interval (in seconds). +#define BP_CONTROL_INTERVAL_SEC 10 ///< Blood pump control interval (in seconds). /// Interval (ms/task time) at which the blood pump is controlled. static const U32 BP_CONTROL_INTERVAL = ( BP_CONTROL_INTERVAL_SEC * MS_PER_SECOND / TASK_GENERAL_INTERVAL ); #define BP_P_COEFFICIENT 0.0001 ///< P term for blood pump control @@ -608,14 +608,11 @@ else if ( bloodPumpPWMDutyCyclePctSet >= bloodPumpPWMDutyCyclePct ) { resetBloodFlowMovingAverage(); + bloodPumpPWMDutyCyclePctSet = bloodPumpPWMDutyCyclePct; resetPIController( PI_CONTROLLER_ID_BLOOD_FLOW, bloodPumpPWMDutyCyclePctSet ); bloodPumpControlModeSet = bloodPumpControlMode; - // If open loop mode, set PWM to requested duty cycle where it will stay during control state - if ( bloodPumpControlModeSet == PUMP_CONTROL_MODE_OPEN_LOOP ) - { - bloodPumpPWMDutyCyclePctSet = bloodPumpPWMDutyCyclePct; - setBloodPumpControlSignalPWM( bloodPumpPWMDutyCyclePct ); - } + setBloodPumpControlSignalPWM( bloodPumpPWMDutyCyclePct ); + bpControlTimerCounter = 0; result = BLOOD_PUMP_CONTROL_TO_TARGET_STATE; } // Continue ramp up @@ -650,14 +647,11 @@ else if ( bloodPumpPWMDutyCyclePctSet <= bloodPumpPWMDutyCyclePct ) { resetBloodFlowMovingAverage(); + bloodPumpPWMDutyCyclePctSet = bloodPumpPWMDutyCyclePct; resetPIController( PI_CONTROLLER_ID_BLOOD_FLOW, bloodPumpPWMDutyCyclePctSet ); bloodPumpControlModeSet = bloodPumpControlMode; - // If open loop mode, set PWM to requested duty cycle where it will stay during control state - if ( bloodPumpControlModeSet == PUMP_CONTROL_MODE_OPEN_LOOP ) - { - bloodPumpPWMDutyCyclePctSet = bloodPumpPWMDutyCyclePct; - setBloodPumpControlSignalPWM( bloodPumpPWMDutyCyclePct ); - } + setBloodPumpControlSignalPWM( bloodPumpPWMDutyCyclePct ); + bpControlTimerCounter = 0; result = BLOOD_PUMP_CONTROL_TO_TARGET_STATE; } // Continue ramp down Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -r60e0fc291e3897ab9b86aee7181eeb6d6dd7d35f -rc48ea51c06c9d002f1b9b6a1d7b72d69756f183d --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 60e0fc291e3897ab9b86aee7181eeb6d6dd7d35f) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision c48ea51c06c9d002f1b9b6a1d7b72d69756f183d) @@ -49,7 +49,7 @@ #define MAX_DIAL_IN_PUMP_PWM_DUTY_CYCLE 0.89 ///< Controller will error if PWM duty cycle > 90%, so set max to 89%. #define MIN_DIAL_IN_PUMP_PWM_DUTY_CYCLE 0.10 ///< Controller will error if PWM duty cycle < 10%, so set min to 10%. -#define DIP_CONTROL_INTERVAL_SEC 5 ///< Dialysate inlet pump control interval (in seconds). +#define DIP_CONTROL_INTERVAL_SEC 10 ///< Dialysate inlet pump control interval (in seconds). /// Interval (ms/task time) at which the dialIn pump is controlled. static const U32 DIP_CONTROL_INTERVAL = ( DIP_CONTROL_INTERVAL_SEC * MS_PER_SECOND / TASK_GENERAL_INTERVAL ); #define DIP_P_COEFFICIENT 0.0001 ///< P term for dialIn pump control. @@ -571,14 +571,11 @@ else if ( dialInPumpPWMDutyCyclePctSet >= dialInPumpPWMDutyCyclePct ) { resetDialInFlowMovingAverage(); + dialInPumpPWMDutyCyclePctSet = dialInPumpPWMDutyCyclePct; resetPIController( PI_CONTROLLER_ID_DIALYSATE_FLOW, dialInPumpPWMDutyCyclePctSet ); dialInPumpControlModeSet = dialInPumpControlMode; - // If open loop mode, set PWM to requested duty cycle where it will stay during control state - if ( dialInPumpControlModeSet == PUMP_CONTROL_MODE_OPEN_LOOP ) - { - dialInPumpPWMDutyCyclePctSet = dialInPumpPWMDutyCyclePct; - setDialInPumpControlSignalPWM( dialInPumpPWMDutyCyclePct ); - } + setDialInPumpControlSignalPWM( dialInPumpPWMDutyCyclePct ); + dipControlTimerCounter = 0; result = DIAL_IN_PUMP_CONTROL_TO_TARGET_STATE; } // Continue ramp up @@ -613,14 +610,11 @@ else if ( dialInPumpPWMDutyCyclePctSet <= dialInPumpPWMDutyCyclePct ) { resetDialInFlowMovingAverage(); + dialInPumpPWMDutyCyclePctSet = dialInPumpPWMDutyCyclePct; resetPIController( PI_CONTROLLER_ID_DIALYSATE_FLOW, dialInPumpPWMDutyCyclePctSet ); dialInPumpControlModeSet = dialInPumpControlMode; - // If open loop mode, set PWM to requested duty cycle where it will stay during control state - if ( dialInPumpControlModeSet == PUMP_CONTROL_MODE_OPEN_LOOP ) - { - dialInPumpPWMDutyCyclePctSet = dialInPumpPWMDutyCyclePct; - setDialInPumpControlSignalPWM( dialInPumpPWMDutyCyclePct ); - } + setDialInPumpControlSignalPWM( dialInPumpPWMDutyCyclePct ); + dipControlTimerCounter = 0; result = DIAL_IN_PUMP_CONTROL_TO_TARGET_STATE; } // Continue ramp down Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -r7a754fc23436a42e61e60f66adf1cd0cc8b32ad6 -rc48ea51c06c9d002f1b9b6a1d7b72d69756f183d --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 7a754fc23436a42e61e60f66adf1cd0cc8b32ad6) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision c48ea51c06c9d002f1b9b6a1d7b72d69756f183d) @@ -44,16 +44,18 @@ #define MAX_DIAL_OUT_FLOW_RATE 650 ///< Maximum dialysate outlet pump flow rate in mL/min. #define MIN_DIAL_OUT_FLOW_RATE 100 ///< Minimum dialysate outlet pump flow rate in mL/min. -#define DPO_FLOW_ADJ_DUE_TO_HIGHER_INLET_PRES 1.200 ///< Adjustment factor to account for higher pump inlet pressure (than DPi pump inlet). #define MAX_DIAL_OUT_PUMP_PWM_STEP_UP_CHANGE 0.0133 ///< Maximum duty cycle change when ramping up ~ 200 mL/min/s. #define MAX_DIAL_OUT_PUMP_PWM_STEP_DN_CHANGE 0.02 ///< Maximum duty cycle change when ramping down ~ 300 mL/min/s. #define MAX_DIAL_OUT_PUMP_PWM_DUTY_CYCLE 0.89 ///< Controller will error if PWM duty cycle > 90%, so set max to 89%. #define MIN_DIAL_OUT_PUMP_PWM_DUTY_CYCLE 0.10 ///< Controller will error if PWM duty cycle < 10%, so set min to 10%. +#define MAX_DIAL_OUT_PUMP_PWM_OFFSET_CONTROL 0.4 ///< Maximum PWM offset (added to DPi PWM duty cycle). +#define MIN_DIAL_OUT_PUMP_PWM_OFFSET_CONTROL -0.4 ///< Minimum PWM offset (added to DPi PWM duty cycle). +#define DOP_CONTROL_INTERVAL_SEC 5 ///< Dialysate outlet pump control interval (in seconds). /// Interval (ms/task time) at which the dialysate outlet pump is controlled. -static const U32 DOP_CONTROL_INTERVAL = ( 2000 / TASK_GENERAL_INTERVAL ); -#define DOP_P_COEFFICIENT 0.0050 ///< P term for dialysate outlet pump control. +static const U32 DOP_CONTROL_INTERVAL = ( DOP_CONTROL_INTERVAL_SEC * MS_PER_SECOND / TASK_GENERAL_INTERVAL ); +#define DOP_P_COEFFICIENT 0.0010 ///< P term for dialysate outlet pump control. #define DOP_I_COEFFICIENT 0.0001 ///< I term for dialysate outlet pump control. #define DOP_HOME_RATE 100 ///< Target pump speed (in estimate mL/min) for homing. @@ -217,9 +219,8 @@ } // Initialize dialysate outlet flow PI controller - initializePIController( PI_CONTROLLER_ID_ULTRAFILTRATION, MIN_DIAL_OUT_PUMP_PWM_DUTY_CYCLE, - DOP_P_COEFFICIENT, DOP_I_COEFFICIENT, - MIN_DIAL_OUT_PUMP_PWM_DUTY_CYCLE, MAX_DIAL_OUT_PUMP_PWM_DUTY_CYCLE ); + initializePIController( PI_CONTROLLER_ID_ULTRAFILTRATION, 0, DOP_P_COEFFICIENT, DOP_I_COEFFICIENT, + MIN_DIAL_OUT_PUMP_PWM_OFFSET_CONTROL, MAX_DIAL_OUT_PUMP_PWM_OFFSET_CONTROL ); } /*********************************************************************//** @@ -247,10 +248,6 @@ { F32 adjFlow = (F32)flowRate; - if ( PUMP_CONTROL_MODE_CLOSED_LOOP == mode ) - { - adjFlow *= DPO_FLOW_ADJ_DUE_TO_HIGHER_INLET_PRES; - } lastGivenRate = flowRate; dialOutPumpDirection = dir; dialOutPumpControlMode = mode; @@ -518,14 +515,18 @@ // Have we reached end of ramp up? else if ( dialOutPumpPWMDutyCyclePctSet >= dialOutPumpPWMDutyCyclePct ) { - resetPIController( PI_CONTROLLER_ID_ULTRAFILTRATION, dialOutPumpPWMDutyCyclePctSet ); - dialOutPumpControlModeSet = dialOutPumpControlMode; - // If open loop mode, set PWM to requested duty cycle where it will stay during control state + dialOutPumpPWMDutyCyclePctSet = dialOutPumpPWMDutyCyclePct; if ( dialOutPumpControlModeSet == PUMP_CONTROL_MODE_OPEN_LOOP ) { - dialOutPumpPWMDutyCyclePctSet = dialOutPumpPWMDutyCyclePct; - setDialOutPumpControlSignalPWM( dialOutPumpPWMDutyCyclePct ); + resetPIController( PI_CONTROLLER_ID_ULTRAFILTRATION, dialOutPumpPWMDutyCyclePctSet ); } + else + { // Closed loop UF control is only controlling offset from DPi PWM + resetPIController( PI_CONTROLLER_ID_ULTRAFILTRATION, dialOutPumpPWMDutyCyclePctSet - getDialInPumpPWMDutyCyclePct() ); + } + dialOutPumpControlModeSet = dialOutPumpControlMode; + setDialOutPumpControlSignalPWM( dialOutPumpPWMDutyCyclePct ); + dopControlTimerCounter = 0; result = DIAL_OUT_PUMP_CONTROL_TO_TARGET_STATE; } // Continue ramp up @@ -559,14 +560,18 @@ // Have we reached end of ramp down? else if ( dialOutPumpPWMDutyCyclePctSet <= dialOutPumpPWMDutyCyclePct ) { - resetPIController( PI_CONTROLLER_ID_ULTRAFILTRATION, dialOutPumpPWMDutyCyclePctSet ); - dialOutPumpControlModeSet = dialOutPumpControlMode; - // If open loop mode, set PWM to requested duty cycle where it will stay during control state - if ( dialOutPumpControlModeSet == PUMP_CONTROL_MODE_OPEN_LOOP ) + dialOutPumpPWMDutyCyclePctSet = dialOutPumpPWMDutyCyclePct; + if ( ( dialOutPumpControlModeSet == PUMP_CONTROL_MODE_OPEN_LOOP ) || ( 0 == lastGivenRate ) ) { - dialOutPumpPWMDutyCyclePctSet = dialOutPumpPWMDutyCyclePct; - setDialOutPumpControlSignalPWM( dialOutPumpPWMDutyCyclePct ); + resetPIController( PI_CONTROLLER_ID_ULTRAFILTRATION, dialOutPumpPWMDutyCyclePctSet ); } + else + { // Closed loop UF control is only controlling offset from DPi PWM + resetPIController( PI_CONTROLLER_ID_ULTRAFILTRATION, dialOutPumpPWMDutyCyclePctSet - getDialInPumpPWMDutyCyclePct() ); + } + dialOutPumpControlModeSet = dialOutPumpControlMode; + setDialOutPumpControlSignalPWM( dialOutPumpPWMDutyCyclePct ); + dopControlTimerCounter = 0; result = DIAL_OUT_PUMP_CONTROL_TO_TARGET_STATE; } // Continue ramp down @@ -598,22 +603,17 @@ { F32 refVol = getTotalTargetDialOutUFVolumeInMl(); F32 totVol = getTotalMeasuredUFVolumeInMl(); - F32 newPWMDutyCyclePct; - F32 deltaPWMDutyCyclePct; + F32 offsetPWMDutyCyclePct; - // Get new PWM from PI controller - newPWMDutyCyclePct = runPIController( PI_CONTROLLER_ID_ULTRAFILTRATION, refVol, totVol ); - // Limit PWM change to max - deltaPWMDutyCyclePct = newPWMDutyCyclePct - dialOutPumpPWMDutyCyclePctSet; - if ( fabs( deltaPWMDutyCyclePct ) > MAX_DIAL_OUT_PUMP_PWM_STEP_UP_CHANGE ) - { - newPWMDutyCyclePct = ( deltaPWMDutyCyclePct < 0.0 ? \ - dialOutPumpPWMDutyCyclePctSet - MAX_DIAL_OUT_PUMP_PWM_STEP_UP_CHANGE : \ - dialOutPumpPWMDutyCyclePctSet + MAX_DIAL_OUT_PUMP_PWM_STEP_UP_CHANGE ); - } - // Set new PWM - dialOutPumpPWMDutyCyclePctSet = newPWMDutyCyclePct; - setDialOutPumpControlSignalPWM( newPWMDutyCyclePct ); + // Get new PWM offset from PI controller + offsetPWMDutyCyclePct = runPIController( PI_CONTROLLER_ID_ULTRAFILTRATION, refVol, totVol ); + // Add PWM offset to DPi PWM mirror for our new DPo PWM + dialOutPumpPWMDutyCyclePctSet = getDialInPumpPWMDutyCyclePct() + offsetPWMDutyCyclePct; + // Limit PWM range + dialOutPumpPWMDutyCyclePctSet = MIN( dialOutPumpPWMDutyCyclePctSet, MAX_DIAL_OUT_PUMP_PWM_DUTY_CYCLE ); + dialOutPumpPWMDutyCyclePctSet = MAX( dialOutPumpPWMDutyCyclePctSet, MIN_DIAL_OUT_PUMP_PWM_DUTY_CYCLE ); + // Apply new PWM to DPo pump + setDialOutPumpControlSignalPWM( dialOutPumpPWMDutyCyclePctSet ); } dopControlTimerCounter = 0; } Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -r1240b612f790f931825aba86ec37f37eccce9336 -rc48ea51c06c9d002f1b9b6a1d7b72d69756f183d --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 1240b612f790f931825aba86ec37f37eccce9336) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision c48ea51c06c9d002f1b9b6a1d7b72d69756f183d) @@ -534,7 +534,7 @@ { result = TRUE; // Set outlet pump to dialysate rate + set UF rate - setDialOutPumpTargetRate( setDialysateFlowRate + FLOAT_TO_INT_WITH_ROUND( setUFRate ), MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); + setDialOutPumpTargetRate( setDialysateFlowRate + (S32)setUFRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); // Restart UF time accumulation for reference volume calculation lastUFTimeStamp = getMSTimerCount(); // Go to UF running state Index: firmware/App/Services/PIControllers.c =================================================================== diff -u -r52362c924eb6233f0a23f6978ea3ce6a2b1b9376 -rc48ea51c06c9d002f1b9b6a1d7b72d69756f183d --- firmware/App/Services/PIControllers.c (.../PIControllers.c) (revision 52362c924eb6233f0a23f6978ea3ce6a2b1b9376) +++ firmware/App/Services/PIControllers.c (.../PIControllers.c) (revision c48ea51c06c9d002f1b9b6a1d7b72d69756f183d) @@ -64,7 +64,7 @@ /// PI Controllers -- initial configurations. static PI_CONTROLLER_T piControllers[ NUM_OF_PI_CONTROLLERS_IDS ] = { // Kp Ki uMax uMin ref meas err esw esum ctrl Ilimit controller type - { 0.0, 0.0, 0.90, 0.10, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 50.0, CONTROLLER_UNIDIRECTIONAL }, // PI_CONTROLLER_ID_ULTRAFILTRATION + { 0.0, 0.0, 0.90, 0.10, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 50.0, CONTROLLER_BIDIRECTIONAL }, // PI_CONTROLLER_ID_ULTRAFILTRATION { 0.0, 0.0, 0.90, 0.10, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 100.0, CONTROLLER_UNIDIRECTIONAL }, // PI_CONTROLLER_ID_BLOOD_FLOW { 0.0, 0.0, 0.90, 0.10, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 100.0, CONTROLLER_UNIDIRECTIONAL } // PI_CONTROLLER_ID_DIALYSATE_FLOW }; Index: firmware/HD.dil =================================================================== diff -u -r60e0fc291e3897ab9b86aee7181eeb6d6dd7d35f -rc48ea51c06c9d002f1b9b6a1d7b72d69756f183d --- firmware/HD.dil (.../HD.dil) (revision 60e0fc291e3897ab9b86aee7181eeb6d6dd7d35f) +++ firmware/HD.dil (.../HD.dil) (revision c48ea51c06c9d002f1b9b6a1d7b72d69756f183d) @@ -1,4 +1,4 @@ -# RM46L852PGE 07/01/21 16:54:15 +# RM46L852PGE 07/02/21 10:37:28 # ARCH=RM46L852PGE # @@ -3522,7 +3522,7 @@ DRIVER.CAN.VAR.CAN_2_MESSAGE_11_ENA.VALUE=0x00000000 DRIVER.CAN.VAR.CAN_2_MESSAGE_6_ENA.VALUE=0x00000000 DRIVER.CAN.VAR.CAN_2_MESSAGE_4_INT_ENA.VALUE=0x00000000 -DRIVER.CAN.VAR.CAN_1_PROP_SEG.VALUE=5 +DRIVER.CAN.VAR.CAN_1_PROP_SEG.VALUE=3 DRIVER.CAN.VAR.CAN_3_MESSAGE_1_ID.VALUE=1 DRIVER.CAN.VAR.CAN_2_MESSAGE_64_INT_LEVEL.VALUE=0x00000000 DRIVER.CAN.VAR.CAN_2_MESSAGE_56_INT_LEVEL.VALUE=0x00000000 @@ -3955,8 +3955,8 @@ DRIVER.CAN.VAR.CAN_1_MESSAGE_4_INT_LEVEL.VALUE=0x00000010 DRIVER.CAN.VAR.CAN_3_MESSAGE_11_DLC.VALUE=8 DRIVER.CAN.VAR.CAN_1_MESSAGE_3_DLC.VALUE=8 -DRIVER.CAN.VAR.CAN_1_SAMPLE_POINT_REFERENCE.VALUE=87 -DRIVER.CAN.VAR.CAN_1_PROPAGATION_DELAY.VALUE=2100 +DRIVER.CAN.VAR.CAN_1_SAMPLE_POINT_REFERENCE.VALUE=75 +DRIVER.CAN.VAR.CAN_1_PROPAGATION_DELAY.VALUE=1050 DRIVER.CAN.VAR.CAN_1_MESSAGE_51_EOB.VALUE=0x00000000 DRIVER.CAN.VAR.CAN_1_MESSAGE_51_DIR.VALUE=0x20000000 DRIVER.CAN.VAR.CAN_1_MESSAGE_50_INT_ENA_REF.VALUE=0x00000000 @@ -4706,7 +4706,7 @@ DRIVER.CAN.VAR.CAN_2_MESSAGE_6_MASK.VALUE=0x000007FF DRIVER.CAN.VAR.CAN_1_MESSAGE_57_ENA.VALUE=0x00000000 DRIVER.CAN.VAR.CAN_1_MESSAGE_49_ENA.VALUE=0x00000000 -DRIVER.CAN.VAR.CAN_1_PHASE_SEG.VALUE=1 +DRIVER.CAN.VAR.CAN_1_PHASE_SEG.VALUE=2 DRIVER.CAN.VAR.CAN_3_MESSAGE_30_ID.VALUE=30 DRIVER.CAN.VAR.CAN_3_MESSAGE_22_ID.VALUE=22 DRIVER.CAN.VAR.CAN_3_MESSAGE_14_ID.VALUE=14 @@ -4931,7 +4931,7 @@ DRIVER.CAN.VAR.CAN_1_MESSAGE_9_ID.VALUE=0x100 DRIVER.CAN.VAR.CAN_1_MESSAGE_5_RTR.VALUE=0x00000000 DRIVER.CAN.VAR.CAN_1_MESSAGE_59_DLC.VALUE=8 -DRIVER.CAN.VAR.CAN_1_SJW.VALUE=1 +DRIVER.CAN.VAR.CAN_1_SJW.VALUE=2 DRIVER.CAN.VAR.CAN_3_MESSAGE_50_EOB.VALUE=0x00000000 DRIVER.CAN.VAR.CAN_3_MESSAGE_50_DIR.VALUE=0x20000000 DRIVER.CAN.VAR.CAN_3_MESSAGE_42_EOB.VALUE=0x00000000 @@ -5214,7 +5214,7 @@ DRIVER.CAN.VAR.CAN_3_MESSAGE_8_DIR.VALUE=0x20000000 DRIVER.CAN.VAR.CAN_1_MESSAGE_10_EOB.VALUE=0x00000080 DRIVER.CAN.VAR.CAN_1_MESSAGE_10_DIR.VALUE=0x00000000 -DRIVER.CAN.VAR.CAN_1_SAMPLE_POINT.VALUE=87.500 +DRIVER.CAN.VAR.CAN_1_SAMPLE_POINT.VALUE=75.000 DRIVER.CAN.VAR.CAN_2_MESSAGE_51_BOOL_ENA.VALUE=0 DRIVER.CAN.VAR.CAN_2_MESSAGE_43_BOOL_ENA.VALUE=0 DRIVER.CAN.VAR.CAN_2_MESSAGE_35_BOOL_ENA.VALUE=0 Index: firmware/include/can.h =================================================================== diff -u -r60e0fc291e3897ab9b86aee7181eeb6d6dd7d35f -rc48ea51c06c9d002f1b9b6a1d7b72d69756f183d --- firmware/include/can.h (.../can.h) (revision 60e0fc291e3897ab9b86aee7181eeb6d6dd7d35f) +++ firmware/include/can.h (.../can.h) (revision c48ea51c06c9d002f1b9b6a1d7b72d69756f183d) @@ -635,9 +635,9 @@ | (uint32)((uint32)0x0000000AU << 10U) | 0x00020002U) #define CAN1_ES_CONFIGVALUE 0x00000007U #define CAN1_BTR_CONFIGVALUE ((uint32)((uint32)0U << 16U) \ - | (uint32)((uint32)(1U - 1U) << 12U) \ - | (uint32)((uint32)((5U + 1U) - 1U) << 8U) \ - | (uint32)((uint32)(1U - 1U) << 6U) | (uint32)51U) + | (uint32)((uint32)(2U - 1U) << 12U) \ + | (uint32)((uint32)((3U + 2U) - 1U) << 8U) \ + | (uint32)((uint32)(2U - 1U) << 6U) | (uint32)51U) #define CAN1_TEST_CONFIGVALUE 0x00000080U #define CAN1_ABOTR_CONFIGVALUE ((uint32)(1040000U)) #define CAN1_INTMUX0_CONFIGVALUE ((uint32)0x00000000U \ Index: firmware/source/can.c =================================================================== diff -u -r60e0fc291e3897ab9b86aee7181eeb6d6dd7d35f -rc48ea51c06c9d002f1b9b6a1d7b72d69756f183d --- firmware/source/can.c (.../can.c) (revision 60e0fc291e3897ab9b86aee7181eeb6d6dd7d35f) +++ firmware/source/can.c (.../can.c) (revision c48ea51c06c9d002f1b9b6a1d7b72d69756f183d) @@ -439,9 +439,9 @@ * - Setup baud rate prescaler */ canREG1->BTR = (uint32)((uint32)0U << 16U) | - (uint32)((uint32)(1U - 1U) << 12U) | - (uint32)((uint32)((5U + 1U) - 1U) << 8U) | - (uint32)((uint32)(1U - 1U) << 6U) | + (uint32)((uint32)(2U - 1U) << 12U) | + (uint32)((uint32)((3U + 2U) - 1U) << 8U) | + (uint32)((uint32)(2U - 1U) << 6U) | (uint32)51U;