This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am trying to set up multiple ADC input that go to the part and print out. I found an example that gets me really close but I am noticing that the the 2 inputs that should change are not changing. Can someone point me to what I am doing wrong? Syscfg and code images below.
Thanks in advance!
Please check the hardware connection on LP. You can connect it to GND and VCC to see whether the result is changed.
Right now I have connection to HEATR_NTC and VBAT_MON, if I take that connection off, it reads close to zero for those 2 as well as ISNS_VOUT and ISNS_VREF. The issue is the ADC is not getting the new configuration from the code. I'm not sure if I have to disable conversion and then re-enable it later in the code.
Why do you think this is a issue. To recofigure the ADC when the the voltage input turns to be 0, should be done in your sofware. It is OK to keep the ADC to be enable. It will not do harm to MSPM0.
As you can see PA26 and PA16 are the same value, this should not be the case because PA16 is not plugged in. What I think is happening is the DL_ADC12_configConversionMem is not switching properly, so (in the code) gADCResult5 is the same as gADCResult and gADCResult6 is the same as gADCResult2. So my question is, do I have to disable and re-enable conversions to make the change? and is so, where should I implement that?
Not plugged in, or grounded? The ADC inputs are very high impedance, and it is possible that PA16 is floating to the same value as PA26.
You don't need to restart the conversion. Please remove the jump here:
I would suggest you connect one to GND and one to 3.3V to see if the conversion will change.
No change in code, connected one to ground and the other to 3.3V and PA26 and PA16 are still the same value.
As you don't enable the repeat mode. For new conversion after you change the memory configuration, you need to enable and start the conversion. That means in your code, you at least need have two enable and start the conversion.
Please check you code, there seems to be some problem in it.
I am already doing enable and start conversions in the code, You can see it in the code in the original question, but here it is highlighted.
Same results, Do I need to disable conversions first? If so, where is the best place to do so?
I think the reason why it is same is because it doesn't do the conversion as you want.
Can you use step by step in debug. Maybe there will be some timing issue.