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.

TM4C123GH6PM: ADC Clock Configuration

Part Number: TM4C123GH6PM

Hi,

I am using TM4C123GH6PM microcontroller. Initial system clock is configured from external crystal oscillator to 16 MHz. I want to use the same system clock as ADC peripheral clock. Please help me how to configure the same external oscillator clock as ADC peripheral clock .

Thanks and Regards,

Santhosh.

  • Hello Santhosh,

    Due to Errata item ADC#08 you cannot use the MOSC clock for both system clock and ADC clock: https://www.ti.com/lit/pdf/spmz849

    You will need to either run the ADC via the PLL or you would need to run the ADC from PIOSC and the system clock from MOSC.

  • Hi Ralph,

    Thanks for your response. As per the errata i will use MOSC as system clock and use PIOSC as ADC clock. But i am having following queries in this configuration:

    • Should i need to reconfigure system clock as PLL  during PIOSC configuration (as ADC clock) and later disable PLL and reconfigure system clock as MOSC after successful configuration of ADC?
    • continuous to the above query, after configuring ADC whenever i want to use the ADC (for example reading the input channels data periodically) should i need to reconfigure system clock as PLL?

    Please let me know if you didn't understand my query as i can make it more clear with a piece of sample code as example. 

    Thanks and Regards,

    Santhosh.

  • Hello Santhosh,

    You don't need to use the PLL for this.

    One of the three workarounds is: Configure the MOSC as the system clock source and the PIOSC as the ADC clock source.

    Therefore, your configuration of "i will use MOSC as system clock and use PIOSC as ADC clock" already qualifies without needing to use the PLL.

    You can proceed as you planned.

  • Hi Ralph,

    Thanks for response, But to use PIOSC as ADC clock we need to first enable PLL. Please correct me if i am wrong.

    Thanks and Regards,

    Santhosh.

  • Hello Santhosh,

    It looks like the errata sheet wasn't very clear about the requirements to use MOSC and PIOSC together, I can see your point now looking at the datasheet description.

    Santhosh Malae66 said:
    Should i need to reconfigure system clock as PLL  during PIOSC configuration (as ADC clock) and later disable PLL and reconfigure system clock as MOSC after successful configuration of ADC?

    Yes, based on what is outlined in the device datasheet, that will be the steps that you need to take in order to run the ADC from PIOSC.

    Santhosh Malae66 said:
    continuous to the above query, after configuring ADC whenever i want to use the ADC (for example reading the input channels data periodically) should i need to reconfigure system clock as PLL?

    No, once you have the PIOSC configured correctly during initial system configuration you do not need to change the clock settings at all. It will run from the PIOSC unless you decide to make modifications to the settings to run it from the PLL instead.

  • Hi Ralph,

    Thanks for you inputs. i think i am bit clear now.

    Thanks and Regards,

    Santhosh.