Hello,
I was recently learning the UCD3138 full-bridge hard-switch EVM firmware.
I read the void poll_adc(void) function. The last two statements found in the function are
Void poll_adc(void)
{
...
AdcRegs.ADCCTRL.bit.SW_START = 1; // trigger anew measurement sequence
AdcRegs.ADCCTRL.bit.SW_START = 0;
}
I am puzzled here.
Why does the function set SW_START first to 1 and then set it to 0 again? What is the reason for this?
I looked at the 《UCD3138 Digital Power Supply Controller Technical Reference Manual 》and it gave only the case of AdcRegs.ADCCTRL.bit.SW_START = 1; rather than setting SW_START to 0 again.
If this sets SW_START first to 1 and then zero again, will this trigger the new sample code? Or will it not trigger the new sampling sequence? Why do you do this?
Thank you.