Dear TI,
in our design based on UCD3138A we're using channels 0, 1, and 4 of ADC12 for measuring input voltage, output voltage and current. The ADC12 is configured to be triggered by DPWM0 event1. I observe strange behaviour which I don't understand. Could you, please, help me understand what is going on?
After power-on, my firmware initializes blocks of UCD3138A. In particular, it initializes ADC12 and DPWM0, but keeps DPWM0 disabled.
Then the firmware waits for a command to enable DPWM0. After DPWM0 gets enabled, ADC12 performs the conversions, as expected.
Then the firmware listens for a command to disable DPWM0. And here is the thing which I don't understand: after disabling DPWM0 ADC12 still keeps performing the conversions.
The (I think) important values in the registers are, after initialization:
ADCCTRL: 0x0010C721
DPWMCTRL0: 0x00000002
DPWMCTRL1: 0x00018400
DPWMCTRL2: 0x00000005
after the command to enable DPWM0 the firmware changes are:
DPWMCTRL1: 0x00018000
DWPMCTRL0: 0x00000003
and again after the command to disable DPWM0 register DPWMCTRL1 and DWPMCTRL0 are restored to initial values.
My problem is that I need to have the values read also after initialization, but since I don't understand what is going on, I'm not sure what is the proper solution. Please, let me know if I'm missing something, doing something incorrectly, or if it just works this way.
Best regards,
Adam
DPWMCTRL1: 0x00018000
DWPMCTRL0: 0x00000003