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.

AM2432: Clock generation from AM2432 for ADS131M06

Part Number: AM2432
Other Parts Discussed in Thread: ADS131M06,

Hi Expert,

When an external ADC chipset(ADS131M06) is connected to AM2432, this external ADC chipset requires an external master clock in the range 4MHz~10MHz. I plan to use the generated clock from AM2432 instead of an external crystal due to the flexibility of changing the clock rate during operation. I think there is a way that AM2432 can generate those clocks but not clear to me yet.

I found the EPWM module of AM2432 and it seems to work for this purpose. Can the EPWM module generate those clocks? Is there any other way?

I would appreciate it if you share your knowledge and experience on this.

Regards,

Moonil 

  • Hi Moonil,

    I'm looking into this and will get back with you shortly.

    Regards,
    Frank

  • Hi Moonil,

    Yes, it should be possible to generate a clock from EPWM for the ADS131M06 CLKIN.

    Please see the MCU+SDK for EPWM example code: https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_02_00_31/exports/docs/api_guide_am243x/EXAMPLES_DRIVERS_EPWM_DUTY_CYCLE.html

    This example configures ePWM0 to generate a 1KHz signal with 25% duty cycle for 60 seconds on EPWM_A. It can be modified to generate another EPWM signal frequency and duty cycle.

    The ECAP APWM can also be used to generate the ADS131M06 CLKIN. Please see these sections of the AM64x/AM243x TRM (spruim2):

    • 12.4.2.4.1 Capture and APWM Operating Modes
    • 12.4.2.4.1.2 ECAP APWM Mode Operation

    I don't see an ECAP APWM example in the MCU+SDK, but the driver supports it, please see: https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_02_00_31/exports/docs/api_guide_am243x/DRIVERS_ECAP_PAGE.html

    Regards,
    Frank

  • Hi Frank

    Thanks for your kind answer.

    I wonder what are mainly different points between EPWM and ECAP APWM? I was considering only EPWM but if ECAP APWM has any advantage in generating CLKIN around 4MHz ~10MHz, then I will also consider ECAP APWM. 

    Could you share your knowledge about different points and advantages each?

    FYI, I need to change the clock rate(CLKIN) during device operation dynamically. This is required for the sampling rate change of ADS131M06.

    Regards,

    Moonil

  • Hi Moonil,

    Could you share your knowledge about different points and advantages each?

    For your requirements, they're similar.

    The EPWM functional clock is 250 MHz.There is a functional clock divider before the Time Base Submodule, but you don't need it for the range of frequencies you want to generate. You'd only need to divide down the clock if you had a much slower EPWM frequency since the TBCNT is 16 bits. EPWM can generate center-aligned PWM waveforms, but that isn't needed here.

    ECAP APWM is 125 MHz. There isn't a functional clock divider before the counter, but you don't need one for the range of frequencies you want to generated.

    In both cases, you might not be able to generate an exact target frequency because of the functional clock input to the HW IP module. In the case of EPWM, there is also the issue of Up-Down Count (Triangle) and Up Count (Sawtooth) mode to consider. I recall the EPWM software example is configured for Up-Down count mode, so you'll need to take that into account.

    For example, EPWM, Up-Count mode, target: 4 MHz

    • 250/1/4 = 62.5
    • 250/62 = 4.03 MHz
    • 250/63 = 3.97 MHz

    For example, EPWM, Up-Count mode, target: 10 MHz

    • 250/1/10 = 25
    • 250/25 = 10 MHz
    I need to change the clock rate(CLKIN) during device operation dynamically.

    The EPWM TBPRD and CMPA/B registers have a shadow mode. Please see these sections in AM64x/AM243x TRM (spruim2),

    • 12.4.3.4.2.3.1 EPWM Time-Base Period Shadow Register
    • 12.4.3.4.3.3 Operational Highlights for the EPWM Counter-Compare Submodule

    ECAP APWM also has a shadow mode for the APRD and ACMP registers, please the TRM, 12.4.2.4.1.2 ECAP APWM Mode Operation.

    Hence, it should be possible to change the clock frequency (PRD adjustment) or duty cycle (CMP adjustment) dynamically without any glitches.

    I'm looping in a colleague from the HW team in case you need further details.

    Regards,
    Frank