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.

  • Resolved

MSP430FR6820: inner ADC module problem

Expert 4980 points

Replies: 5

Views: 157

Part Number: MSP430FR6820

Hi,

we use the ADC module in MSP430FR6820 for two different measurements, having two configurations and 'deconfiguration' (common for both configurations).

We are doing the measurements in a cycle: first configuration, getting sample, deconfiguring ADC; second configuration, getting sample, deconfiguring ADC, and so on. We have a problem that the ADC doesn´t end the conversion, reaching  "frozen ADC module" state (attached first picture below). Registers after deconfiguration are attached below in the second picture. 

If I test only first configuration, (never-ending cycle: first configuration, getting sample, deconfig), or only second configuration (never-ending cycle: first configuration, getting sample, deconfig), everything works fine.

Can you help with some advice?

In which case can ADC stop working?

Thanks

  • Hi,

    I think you meet the problem that ADC will do conversion for another one time. It because when you read the ADCMEMX, the next conversion is started. It will finish the conversion after all.

    Add ADCCTL0 &= ~ ADCENC after the last conversion. If if doesn't solve your question. Please post your code.

    Eason

    If the post helped solve your issue, please click on the  'This resolved my issue'  button.

  • Expert 4980 points

    In reply to Eason Zhou:

    Hi Eason,

    thanks for your feedback. So far after adding that part it looks good, will check again after a few days.

    1. One question on this: If we use reference of 1,2V (ADC12MCTL0 = ADC12INCH_31 | ADC12VRSEL_1 | ADC12WINC), is it posible to connect higher voltage than the reference to input? Max input voltage will be 1,8V.Understood that from 1.2V to 1.8V we will have ADCMEM0 value of 0x0FFF. Will it break the converter?

    Also, we need to check the minimal battery voltage (higher than 1,8V). In our aplication we use 868MHz transciever (Tx current 30mA, voltage goes down gradually) and we need to be able to turn it off in time. Do we have any example of measurement of the baterry(Vcc) with comparator / msp430fr6820?

    Thanks!

  • In reply to Bart:

    Hi,

    It will not break the converter. See from the spec, if analog input voltage range below AVCC, it will be OK.

    Here is the reference code you can find:

    msp430fr6x7x_compe_01.c

    msp430fr6x7x_compe_02.c

    msp430fr6x7x_compe_04.c

    msp430fr6x7x_compe_05.c

    Eason

    If the post helped solve your issue, please click on the  'This resolved my issue'  button.

  • Expert 4980 points

    In reply to Eason Zhou:

    Thanks Eason,

    This helps.

    Regarding the last question about battery voltage measurement, do you happen to have some feedback on that (comparator based measurement with msp)?

  • In reply to Bart:

    HI Bart,

    Sorry to make you confused and reply late. The code I attached is for comparator. It can be used in your situation.

    Eason

    If the post helped solve your issue, please click on the  'This resolved my issue'  button.

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.