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.

LP-MSPM0G3507: ADC wrong value loaded

Part Number: LP-MSPM0G3507
Other Parts Discussed in Thread: SYSCONFIG

Hello,

I have connected 2 ADC channels CH6(PB19) and Ch8(PA22) on ADC1. Result of CH8 is loaded into MEM0 and result of CH6 is loaded into MEM1.

Used sequence conversion mode and read ADC values when MEM0 loaded interrupt is occurred (values are read in to main and not in to ISR).

It is observed that value of CH8 is loaded into variable taken for CH6 and similarly for CH6i.e. MEM0 value is loaded into variable for MEM1 and vice versa.

I checked keeping breakpoint after DL_ADC12_getMemResult(ADC1_INST, DL_ADC12_MEM_IDX_0);. When breakpoint hits for first time no value is loaded into variable. After 2nd time value values are loaded.

Thanks and Regards,

Amruta 

  • Hi Amruta,

    I took the adc12_sequence_conversion example that is in our SDK and reconfigured it to use ADC1, channel 6 and channel 8. I do not see this same issue and everything is loading properly into the correct buffers.

    After the MEM0 result loaded interrupt are you getting the result from the MEM1 register? Reading your comment it alludes to loading both MEM0 and MEM1 after MEM0 is loaded. The sequence mode starts from MEM0 to the other memory registers sequentially so you might be getting the result before the register is loaded.

    Regards,

    Luke

  • Hello Luke,

    I am using early samples with SDK of 0.46, sysconfig ver1.14 and CCS ver 12.1. I have attached my settings and code snapshots. I connected GND to PA22 i.e to MEM0 and 3.3 to PB19. In debug mode it is observed that MSB_value = 4095 and LSB_value = 0 (attached screenshot for reference).

    Note: Checked with SDK1.10 it works OK.

  • Hi Amruta,

    I suggest if you're using the early samples to use the latest SDK 0.58. I also highly recommend ordering the new version of the launchpad and using the officially released SDK (MSPM0SDK 1.10) and IDE (CCS 12.3+).

    Regards,

    Luke