Hello, I'm learning UCD3138 full-bridge hard-switch firmware, I have questions about void enable_current_sharing(void)
Void enable_current_sharing(void)
{
#ifdef CURRENT_SHARING_ENABLE
FeCtrl0Regs.EADCDAC.bit.DAC_DITHER_EN = 1;
//MiscAnalogRegs.CSCTRL.bit.TEST_MODE = 3 //3 for Set the current sharing bus output to pass through, switches Ө1=open, Ө2=close
//1 for DPWM current source control 250 uA into 10 kOhm at 100% duty cycle.
MiscAnalogRegs.CSCTRL.bit.TEST_MODE = 1; //
//300 kHz , 108 -> 300 KHZ
MiscAnalogRegs.CSCTRL.bit.DPWM_PERIOD = 108; //
// MiscAnalogRegs.CSCTRL.bit.DPWM_DUTY = 54;
}
I don't know why DPWM_PERIOD is set to 108 and get 300kHz PWM. How is this calculated?