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.

TM4C1237E6PM: ADC Circuit implementation

Part Number: TM4C1237E6PM
Other Parts Discussed in Thread: CC1352P

Hi community,

In one of our project, we are using TM4C1237E6PM microcontroller to support the USB OTG feature.

During USB host mode,  connected device will be powered on via VBUS line. In order to monitor the current through VBUS line/ VBUS state (in case of device in dead battery condition), we are interfacing the 5v voltage divider network to the one of ADC input.

Please help me to bring up the circuit.

Now in current design i have done below circuit connections.

Both VDDA & VDD are shorted to 3.3V and GNDA & GND are shorted to digital ground. Is this is OK ? 

Or VDDA & VDD has to be isolated ?

And also please provide me the example code for ADC operation.

Thanks & regards,


  • Hello Divya,

    Divya jyothi said:
    Both VDDA & VDD are shorted to 3.3V and GNDA & GND are shorted to digital ground. Is this is OK ? 

    That is fine, no need for isolation. See Section 3.5.1 of our System Design Guidelines:

    I presume you are planning to use a voltage divider to get 5V down to 3.3V, right? If so, keep in mind you will want the resister choices to match well with the Input Resistance (RADC) of the device, which is 2.5kOhm and can be seen in Section 22.14 of your device datasheet:

     ADC sample code can be found in TivaWare under [Install Path]\TivaWare_C_Series-\examples\peripherals\adc

    Single_ended.c is probably what you want.

  • Hi Jacobi,

    Thank you for the support.

    Please help me to obtain the voltage divider resistor values for 3.3V from 5V with matching the internal ADC resistance.

    Thanks & regards,


  • Hello Divya,

    The output impedance of the voltage divider is just the parallel resistance of the two resistors used.

    So for example if you want to drop 5V to 3V, then you could use a 4kOhm/6kOhm resistor divider and the parallel values of those would be 2.4kOhm.

    You can find calculators to help you crunch through both values quickly so you can pick out of the available resistors you would have for the design.
  • hello Jacobi,

    Thank u for the support. 

    I have used resistor divider values R1= 3.9K and R2= 6.8K,so that effective parallel resistance is 2.47K and voltage is 3.17V ?

    Is this configuration is OK ?

    And also please provide me the TM4C123G reference design layout file.

    Thanks & regards,


  • Hello Divya,

    That sounds good as far as the configuration goes.

    Regarding design files, are there any particular design you had in mind?

    If not our LaunchPad has design files available on the tool page: - Look for the Design Files section.
  • Hi Jacobi,

    Thank u, I am looking for the same design files.

    One more clarification is required.

    Which and all GPIO's are capable of interrupt functionality ?

    Please help me to find out the answer.

    Thanks & regards,


  • Hello Divya,

    All GPIO are capable of interrupts. There are a few GPIO where you need to give special considerations regarding their initial configuration before using them, see the list of them on Table 10-1 of the device datasheet:
  • Hi,

    Thank u for the reply.

    Please help me to find the solution for the below queries:

    1) Please provide the brief information about the JTAG daisy chain configuration.

    We are using TI CC1352 and TI TM4C MCU in our design, we are planned to flash the both chips by using JTAG Daisy chain configuration.

    Please refer the attached image.

    a)We set CC1352P reset to 10ms by using RC circuit and TM4C reset to for 1ms. Since there is no additional JTAG resets for each IC. IS these IC resets have to be controlled by JTAG TAP port ?

    How it will be synchronized ? Both IC reset has to be shorted ?

    b) In this daisy chain set up requires any additional pull up & pull down resistors on JTAG IOs ?

    c)Is it possible to flash any one of the MCU by using Bypass mode of the other ?

    2)IO sink current

    I have connected 2# LED Cathode through current limiting resistor to PE1 and PE5 of TM4C1237E6PM. The LED Forward Current is 30mA .

    Whether PE port has the capability to sink the 8mA current ? How it will be configured ?

    3) VI & VH levels

    I am facing TM4C MCU IO input and out level mismatch with SPI Flash, RF SOC's. Please refer the below figure.

    Here VOH of TM4C is not matching with VIH of SPI flash & CC1352. How this issue will be taken care ?

    VIH(Min) of TM4C is not matching with VOH(min) of RF SOC2.

    Please help me to find the solution for the above queries.

    Thanks & regards,



  • Hello Divya,

    These questions are very different from the topic and on E2E we want to keep threads to topic as much as possible as other users will often search and read through old threads. Can you please make two separate threads for these queries? One for the Programming question, and one for the Power questions of Sink Current and VIH/VOH levels? And for the sink current question, please include details on the value of the current limiting resistor used, as by it's name, it reduces the current seen at the MCU port.