Tool/software:
My question is regarding "setupCMPSS" function:
Why is the under-current also monitored ? According to those lines:
//Set DAC to H~75% and L ~25% values
CMPSS_setDACValueHigh(base1, 2048+(int16_t)((float32_t)current_limit*(float32_t)2048.0/(float32_t)current_max_sense));
CMPSS_setDACValueLow(base1, 2048-(int16_t)((float32_t)current_limit*(float32_t)2048.0/(float32_t)current_max_sense));
and we use "CMPSS1_CTRIPH_OR_CTRIPL" as the MUX value:
#define II_SENSE_XBAR_MUX_VAL XBAR_EPWM_MUX00_CMPSS1_CTRIPH_OR_L
XBAR_setEPWMMuxConfig(XBAR_TRIP4, II_SENSE_XBAR_MUX_VAL);
So the output of the OR gate is 1 whenever CTRIPH or CTRIPL gives (1). This will mean that we are monitoring the over-current and the undercurrent also because COMPL (inverted) will give 1 if CMPIN is less than (2048-(14/16.968)*2048 = 358) and COMPH (inverted) will give 1 if CMPIN is larger than (2048+(14/16.968)*2048 = 3737.
So my question is: What is the point of monitoring the under-current ?
Thanks in advance.