hi, experts
About ADC ONESHOT mode, Maybe because of my misconfiguration, I went into some problems as below:
I configure SOC0,SOC4,SOC9,SOC15(the four SOCs are all software trigger), Sequential mode
and then enable SOCPRICTL.ONESHOT.
in the main loop, softwarely trigger ADC as below:
while(1)
{
DELAY_US(10);
AdcRegs.ADCSOCFRC1.all = 0xFFFF; // Point1
temp = AdcRegs.ADCSOCFLG1.all;
DELAY_US(10);
AdcRegs.ADCSOCFRC1.all = 0xFFFF; // Point2
DELAY_US(10);
AdcRegs.ADCSOCFRC1.all = 0xFFFF;
DELAY_US(10);
AdcRegs.ADCSOCFRC1.all = 0xFFFF;
}
I set breakpoint in two line above, there are some prolems with the result:
1.After Point1, ADCSOCFLG1 are all 1, meanwhile I think it should be 0x1000(only the first SOC);
2.After Point1, temp = 0xFFFF, which means ADCSOCFLG1 are all 1s. but I did not configure other SOC registers;
3.All 16 AdcResult registers are filled with data;
So i want to ask is:
1. What is the correct outcome with the case(SOC0,SOC4,SOC9,SOC15)?
2.why i got this result?
3.What is the correct way to use ONESHOT mode?
best wishes!!!