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.

ADC Channel 0 on CC3200 LaunchPad

Other Parts Discussed in Thread: CC3200, ENERGIA

I am trying to get the ADC Channel 0 to work on the LaunchPad, I have used Pinmux and am not using UART anywhere.

But it still seems to think it is set to UART, as when I remove the UART Jumpers it effects ADC readings.

Here is PinMux

void PinMuxConfig(void)
{
    //
    // Enable Peripheral Clocks 
    //
    PRCMPeripheralClkEnable(PRCM_ADC, PRCM_RUN_MODE_CLK);

    //
    // Configure PIN_57 for ADC0 ADC_CH0
    //
    PinTypeADC(PIN_57, PIN_MODE_255);

    //
    // Configure PIN_58 for ADC0 ADC_CH1
    //
    PinTypeADC(PIN_58, PIN_MODE_255);

    //
    // Configure PIN_59 for ADC0 ADC_CH2
    //
    PinTypeADC(PIN_59, PIN_MODE_255);

    //
    // Configure PIN_60 for ADC0 ADC_CH3
    //
    PinTypeADC(PIN_60, PIN_MODE_255);
}

What do I need to do to use ADC Channel 0 on the CC3200 LaunchPad?

Glenn.

  • Hi Glenn,

    The problem is really with just the ADC channel 0 right? Are you leaving the pin floating or actually reading a voltage? If your reading a voltage, is it steady?

    Well, with the jumper there you do have an extra FTDI connected to ADC, possibly altering the value.
    The config is probably correct if the others are too, it's most likely just the extra component on the signal line that is affecting the value.

    Also, I don't know much about the board itself but pin57 is also UART0RX. Meaning it can receive a 3.3V signal from the FTDI. Although it should just be if on purpose try, you can damage the ADC!!
    The ADC only takes up to 1.8V (and I think it's 1.4V reference) so receiving a 3.3V can damage it! It doesn't matter if you have it configured for UART or not, if it's muxed to use the ADC it can be damaged from a 3.3V signal from the FTDI interface.
    So in summary, don't leave the jumper connected if you use the ADC channel 0, for safe keeping :)

    Do you have something like a 1V voltage reference around? If not make a voltage divider of 1k and 10k and connect 3.3V to it. The output should be around 0.3V. Use that to see if the ADC is reading the values correctly. 1.4V/4095 * ADCValue = Voltage being read.
    Of course a voltage reference is more precise.
  • Hi Luis,

    Thanks for your assistance with this, let me provide some additional details.

    I know it is not functioning correctly, as I am using a reference on all the other 3 pins and it provides entirely different readings. This is regardless of whether it is floating, pulled down or receiving a signal.

    I have tried 2 boards to see if this was a hardware issue and exact same behavior.

    Removing the UART jumpers does not resolve the issue, it just makes the values different.

    I am developing code for a device (sensor array platform) that has 4 analogue outputs, and it is essential I can get all 4 working very soon for a demonstration of the technology.

    Is there anyone from TI that could look into this, I have spent a lot of time on this and am wondering if this is an issue with the CC3200 LaunchPad or have I just missed something obvious?

    Glenn.
  • Hi Glenn,

    Could you try with Energia? Just to see if it's really the configuration that is not working?
  • Hi Glenn,

    I tried ADC Channel 0 by modifying the adc example and it works fine. I changed the jumper on J6 from position of FLASH to BP on LP. This is to isolate ADC channel from FTDI.

    Comment out lines between uiIndex=0; and MAP_ADCTimerConfig and then add the below lines just before MAP_ADCTimerConfig.

    uiChannel = ADC_CH_0;
    MAP_PinTypeADC(PIN_57,PIN_MODE_255);

    I also measured output using PIN_58 and then compared it with PIN_57 output. These match.

    Thanks and Regards,
    Siddaram
  • Hi Siddaram,

    Thank you, this is good news! Can you explain what you mean by the following "I changed the jumper on J6 from position of FLASH to BP on LP."

    I can see J6, but how do I change from FLASH to BP on LP?

    Glenn.
  • Hi Glenn,

    As you need to bring pin_57 on header instead of routing it to FTDI you need to move the jumper which is on J6 from it's default position to the other position. J6 is a 3-pin header and jumper would be on position 2-3 for FTDI connectivity. Remove that and put it on position 1-2 for bringing pin_57 on header.
    Please see section "2.4.4 UART Signals" of www.ti.com/.../swru372b.pdf for further details. Note that by the side of J6 "FLASH" and "BP" are printed.

    Thanks and Regards,

    Siddaram

  • Hi Siddaram,

    Thank you so much, this is working!

    I did try this but moved both jumpers which seemed to cause an alternative behavior...but may have been my test setup.

    Good luck for this Thursday ;-)

    Glenn (from Australia)