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.

SW-EK-TM4C1294XL: ADC block clock

Guru 55513 points
Part Number: SW-EK-TM4C1294XL
Other Parts Discussed in Thread: REF2033, TM4C1294KCPDT, TM4C1294NCPDT

Strange issues of ADC1 temperature sensor reads and other unexplained sequencers behavior may be clock related. Past reading datasheet 15.3.2.7 states ADC0 sets the clock for the ADC module via ADCCC REG66. Most people would never think to check REG 66 that counters that statement when configuring the ADC clock via ADCClockConfigSet(). The ADC module contains both ADC0 and ADC1 blocks or peripherals. Seemingly the default ADC1 clock divisor 1 produces ADCCLK at PLL speed if it is not being configured, that is if REG 66 base address 0x4003.9000 is actually valid.

Register 66 showing ADC1 base address makes 15.3.2.7 statement odd when ADCClockConfigSet() is only called to configure ADCCC REG66 for 0x4003.8000 ADC module. It would seem a Typo exists to say ADC0 sets the modules clock most anyone believes refers to both ADC blocks. Recently discovered ADC1 base address too exists REG66 and ADCClockConfigSet() was called only  once with ADC0 base address.

15.3.2.7 Module Clocking:The system clock must be at the same frequency or higher than the ADC clock. All ADC modules share the same clock source to facilitate the synchronization of data samples between conversion units, the selection and programming of which is provided by ADC0's ADCCC register. The ADC modules do not run at different conversion rates.

Do ADC0 and ADC1 blocks share the ADC modules same clock source or are the actually independent configured clock sources as being indicated in REG-66? Perhaps another good reason to illustrate the clock sources in the figures of peripheral blocks!

  • Hi BP101,

    The 15.3.2.7 statement is correct in which both the ADC0 and ADC1 will share the same clock source at the same rate. Below is a another view of the clock tree for both the ADC0 and ADC1. As you can see the clock source is the the same and the N divider will be applied both ADC0/ADC1.

  • Hi Charles,

    Right the clock tree shows only one divisor block. REG 66 has 2 base address one for ADC0 and one for ADC1 where the PLL divisor must be configured for each ADC block and not the module as the clock tree shows.
  • Hi Charles,

    Right the clock tree shows only one divisor block. REG 66 has 2 base address one for ADC0 and one for ADC1 where the PLL divisor must be configured for each ADC block and not the module as the clock tree shows.
  • BP101,

    Charles is right. The clock tree in the data sheet is right. It even explains in the documentation of the ADCClockConfigSet() function that the ADC clock configuration is only done for ADC0_BASE. The ADCCC register of ADC1 does not do anything.

  • Hi Bob,

    Yet register 66 directly contradicts figures and text written shared ADC block clock, Note "Not all values are available on all devices" statement. Recently discovered ADC1 ADCPP REG bit field (9:4 CH) RO indicates 24 channels being available. That again is another alarming artifact that ADC1 is not being configured correctly, since it is not a documented errata.

    Don't like the fact register 66 base address contradicts the main clock tree figure and proceeding text.  I don't want to believe the text source as peripheral base address offsets have control over the silicon. Seemingly datasheet analysis text was written without any regard of a base address being indicated for ADC1 clock source. Perhaps a supposition was formed by the technical writer by directly using the main clock tree for information relative to ADC1?

    Why would anyone ever believe the register offset address was not correct or even required?

      

  • Yet what makes the text correct and the REG 66 ADC1 base address incorrect? Would it not seem incorrect to have ADCCC base address RW (0x4003.9000) if the clock is indeed shared?

    Perhaps someone forgot to add the code configuring ADC1 ADCCC RW bits CLKDIV 9:4, CS 3:0 at the same time as ADC0 in ADCClockConfigSet()? Point being the call passes/requires an ADC module base address with no ASSERT to reject ADC1 base address.

  • Hi BP101,
    There are two ADC modules in the device. From the programmer's model point of view these two modules are identical except the ADCCC. The datasheet could have stated a note that the ADCCC register description is only applicable to the ADC0 and remove the ADCCC offset address mentioned for ADC1. Again, as stated the ADC clock configuration is only done for ADC0_BASE. The ADCCC register of ADC1 does not do anything.
  • Hi Charles,

    Yet if we check ADC1; ADCCC, CLKDIV bit is 0x1, only if SW does not first configure ADC1 clock source. That alone seems to contradict any and all previous belief for ADC0/1 sharing the same clock source. Check it yourself and earlier attempts to use PWM0 GEN's triggers on ADC1 sequencers would cause rapid ADC1 results behavior. If we allow ADC0 clock source to run 480Mhz (CLKDIV=1) we get rapid samples as when ADC1 clock source is not configured (CLKDIV=1) versus ADC1 CLKDIV=15. Would normally agree with both at this point yet ADC1 was randomly returning very high value samples MCU AGND pin was connected to PCB AGND plane versus DGND trace run yet ADC0 samples triggered from PWM0 GEN1 was without issue.  

    Test issue yourself:

    ui32Config0 = ADCClockConfigGet(ADC0_BASE, &ui32ClockDiv0);
    ui32Config1 = ADCClockConfigGet(ADC1_BASE, &ui32ClockDiv1);
    UARTprintf("> ADC0-VCO/DIV-->>:%i\r\n", ui32ClockDiv0);
    UARTprintf("> ADC1-VCO/DIV-->>:%i\r\n", ui32ClockDiv1);

  • Not sure if the AGND/DGND has anything to do why ADC1 SS3 randomly producing very high values causing MCU temp sensor faults though ADC0 SS3 was not. Anyway thought it worth mentioning AGDN pin connected to DGND produced cleaner samples from internal VREF versus external REF2033 in either ground mode.
  • I'm redrawing what is already shown in the Clock tree diagram in the datasheet. It is what it is. The CLKDIV and CS fields in the ADCCC register from the ADC0 is used to configure the ADCCLK to both the ADC0 ad ADC1. The CLKDIV and CS in the ADC1 controller even though there has no bearing on the ADCCLK to the ADC1 converter. It is up to you if you don't want to believe it. 

  • Hi Charles,

    I understand what your saying/drawing/posting yet the evidence proves otherwise there are two separate clock source registers.

    The test posted above proves ADC1, CCC CLKDIV bit configures, how can that be if the register offset ADC1 did not exist? If we read the offset ADC1 CCC CLKDIV bit it returns the exact configured value. It would seem analysis has fallen short to state the ADC1 CCC offset is deprecated in TMC1294 but again datasheet leads us to check CCS debug register view for GEL file settings. Oddly the TM4C1294KCPDT GEL memory map includes the same register.
  • It would seem the CCS TM4C1294NCPDT GEL file is also agreeing with datasheet REG view offset ADCCC. If the ADCCC register is meaningless, why for sanity sakes is it include in the CCS debug register view and GEL memory maps?

    There was no reasonable explanation why ADC1 SS3 MCU temperature sensor value would randomly jump several billion counts. Count jump was so bad had to switch to ADC0 SS3 for MCU temperature. Happen to notice billions count occurs if configuring ADC0 CLKDIV=1.
  • Are you certain the ADC1 ADCCC register does nothing? Has such been confirmed through a test program such as MCU temperature monitor on ADC1?