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.

McBSP - How Can I Generate Internal Clock Using AUXOSC

Other Parts Discussed in Thread: DM385

Hello,

I'm using DM8148, I would like to configure and use the on-chip AUXOSC oscialltor to create 2.048 MHz or 8.192 MHz for the McBSP.

Note: In McBSP, I thought on using "McBSP internal clock" and "McBSP Sample Rate Generator" by configuring SCLKME=0 and CLKSM=1.

My questions are:

1) How can I configure the on-chip oscillator AUXOSC, for example, to run at 22.5792 MHz?

    Technical Ref Manual:

    "2.4 Oscillator

    DEVOSC is always needed, while AUXOSC is optional for video/audio reference and can run at any desired frequency in range of 20-30 MHz (e.g., typically could be 27 MHz or 22.5792 MHz)."

    AUXOSC register doesn't seem to have an option for the desired frequency:

    "3.2.14 AUXOSC Register

    3   GZ                 R/W   0h  Setting this to 1 will disable the oscillator. Note: - To enter into  deepsleep, set this bit to 1 - To exit deepsleep, set this bit 0
    2   SW2              R/W   0h 0 (select 15-35 MHz range)
    1   SW1              R/W   1h 1 (select 15-35 MHz range)
    0   RESELECT R/W   0h Internal feedback resistor usage"

2) After (1) is accomplished, how can I generate 2.048 MHz or 8.192 MHz out of AUXOSC? (For example, if I generate 22.5792 MHz, can I multiply by 40 and divide by 441?)

3) What is the accuracy, in PPM, of the AUXOSC clock?

4) Are there limitations on the generated clocks (Audio pll clk3 input, sysclk20, ...) ?

Thanks,

Gilad

  • Hi Gilad,

    Even though you are planning to use internal oscillator, you should connect 22.579MHz external crystal on the AUXOSC_MXI and AUXOSC_MXO pins. You can not configure this 22.579MHz by software (with programming DM8148 device registers).

    Refer to the DM814x datasheet, section 7.4.1.1 Using the Internal Oscillators

    Check also the DM8148 EVM reference design schematics:

    BR,
    Pavel


  • Hi Pavel,

    Thank you for your reply.

    I still don't understand, you wrote that I must use an external crystal, but in the Technical Ref Manual (see mark in section 2.3.2 below), it writes that auxosc is on-chip oscillator.

    Moreover, I understand from section 2.3.2 of the Technical Ref Manual (see mark below) that AUXOSC has two modes:

    1. Use it as a second oscillator, generate any frequency between 20-30 MHz.

    2. Use one off-chip VCXO to supply AUXOSC reference clock, the on-chip oscillator is bypassed.

    If I must supply external crystal for AUXOSC, why does this sections writes about on-chip oscillator? why do we need bypass and VCXO, isn't using VCXO and bypass identical to using external crystal?

    Technical Ref Manual:

    "2.3.2 Clock Structure

    The device has two reference clocks which are generated by on-chip oscillators or externally. The main
    oscillator on the device is 20 MHz (DEVOSC). Optionally, if DEVOSC is 20 MHz and a precise audio or
    video frequency is desired, a second oscillator (AUXOSC) may be utilized for video and/or audio PLLs
    (e.g., 27, 22.5792 MHz or other frequency between 20-30 MHz). For instance, if a precise audio reference
    clock is needed, AUXOSC would provide this (e.g., 22.5792 for 44.1k audio) and then the video clock
    must be derived from Video PLL based on a multiply/divide of 20 MHz (pre-divide in PLL allows precise 27
    MHz multiples from 20 MHz reference).
    It is also possible to have one off-chip VCXO to supply the AUXOSC reference clock and in this case, the
    on-chip oscillator is bypassed."

    Another thing, in clock814x_data.c linux kernel file, I found the following:

    /* Additional clock source */
    static struct clk osc1_clkin_ck = {
        .name = "osc1_clkin_ck",
        .ops = &clkops_null,
        .rate = 27000000, /* Typically at 27M or 22.579MHz */
        .flags = RATE_IN_TI814X | RATE_IN_DM385 | RATE_IN_TI811X,
    };

    Doesn't this line configures the oscillator clock?

    Thank you,

    Gilad

  • Gilad,

    Gilad Z said:
    I still don't understand, you wrote that I must use an external crystal, but in the Technical Ref Manual (see mark in section 2.3.2 below), it writes that auxosc is on-chip oscillator.

    We have external crystal + internal/on-chip oscillator.

    See DM814x datasheet:

    7.4.1 Device (DEV) and Auxiliary (AUX) Clock Inputs

    The device provides two clock inputs, Device (DEVOSC_MXI/DEV_CLKIN) and Auxiliary (AUXOSC_MXI/AUX_CLKIN). The Device (DEV) clock is used to generate the majority of the internal reference clocks, while the Auxiliary (AUX) clock can optionally be used as a source for the Audio and/or Video PLLs.
    The DEV and AUX clocks can be sourced in two ways:
    1. Using an external crystal in conjunction with the internal oscillator or
    2. Using an external 1.8-V LVCMOS-compatible clock input
    Note: The external crystals used with the internal oscillators must operate in fundamental parallel resonant mode only. There is no overtone support.

    7.4.1.1 Using the Internal Oscillators

    When the internal oscillators are used to generate the DEV and AUX clocks, external crystals are required to be connected across the DEVOSC or AUXOSC oscillator MXI and MXO pins, along with two load capacitors

    7.4.1.2 Using a 1.8V LVCMOS-Compatible Clock Input

    A 1.8-V LVCMOS-Compatible Clock Input can be used instead of the internal oscillators as the DEV and AUX clock inputs to the system.

    Gilad Z said:

    Another thing, in clock814x_data.c linux kernel file, I found the following:

    /* Additional clock source */
    static struct clk osc1_clkin_ck = {
        .name = "osc1_clkin_ck",
        .ops = &clkops_null,
        .rate = 27000000, /* Typically at 27M or 22.579MHz */
        .flags = RATE_IN_TI814X | RATE_IN_DM385 | RATE_IN_TI811X,
    };

    What is the version of your SDK and PSP? I am using EZSDK5.05.00.02 with PSP04.04.00.01, and this is what I have in clock814x_data.c linux kernel file:

    static struct clk osc0_clkin_ck = {
        .name        = "osc0_clkin_ck",
        .ops        = &clkops_null,
        .rate        = 20000000,
        .flags        = RATE_IN_TI814X | RATE_IN_DM385,
    };

    static struct clk osc1_clkin_ck = {
        .name        = "osc1_clkin_ck",
        .ops        = &clkops_null,
        .rate        = 22579000, /* Typically at 27M or 22.579MHz */
        .flags        = RATE_IN_TI814X | RATE_IN_DM385,
    };

    I do not think you can configure the osc1_clkin_ck frequency (from 20MHz to 30MHz) with just updating the .rate value, can you? The .rate value should match the external crystal attached.

    Best regards,
    Pavel

  • Gilad,

    One question: Are you using DM8148 EVM or custom board?

    Best regards,
    Pavel

  • Hi Pavel,

    Thank you for your answers.

    I have more questions:

    I'm using DM8148 EVM. I'm currently using EZSDK 5.03.00.09, but I have downloaded EZSDK 5.05.02.00.

    • Should I move to the newer version?
    • Do you know what was fixed in this version?

    I want to get accurate clock for telephony.

    • What does the spec says about the external clock, should I use an external crystal (which is less stable) or oscillator?
    • What is the accuracy (in PPM) of the output clock of AUXOSC?

    Thanks,

    Gilad

  • Gilad,

    Gilad Z said:
    I'm using DM8148 EVM

    Which revision of the EVM? I am using rev.D EVM with DM8148 PG2.1 device.

    As you are with EVM, you do not need to worry about the external crystal. It is already attached. You should attach it yourself, when design DM814x based custom board.

    Gilad Z said:
    Should I move to the newer version?

    Yes, it is recommended. In the latest EZSDK, we have improvements and bug fixed.

    Gilad Z said:
    Do you know what was fixed in this version?

    In the SDK folder, we have the following document: ti-ezsdk_dm814x-evm_5_05_02_00/ezsdk_5_05_02_00_dm814x_Release_Notes.pdf This documents provides the differences with the EZSDK5.04.

    And you should also check the similar document from EZSDK 5.04: ti-ezsdk_dm814x-evm_5_04_00_11/ezsdk_5_04_00_11_dm814x_Release_Notes.pdf, which provides the differences between EZSDK 5.04 and 5.03. EZSDK 5.04 can be downloaded from http://downloads.ti.com/dsps/dsps_public_sw/ezsdk/

    The PSP differences with the previous version can be checked from ti-ezsdk_dm814x-evm_5_05_02_00/board-support/docs/TI81XX_PSP_04.04.00.01_Release_Notes.pdf document.

    Gilad Z said:
    I want to get accurate clock for telephony.

    What is the frequency that you need?

    Best regards,
    Pavel

  • Hi Pavel,

    Thank you for your reply.

    How can I find which revision of EVM and device I have? 

    What is the frequency of the external clock in the EVM?

    I'm currently using EVM, but the next step is custom board. The question - which to use, external crystal or oscillator to get the desired accuracy of clock out?

    The needed frequency is 2.048 MHz or 8.192 MHz.

    Thank you,

    Gilad

  • Gilad,

    Gilad Z said:
    How can I find which revision of EVM and device I have? 

    The revision of the EVM should be printed on the EVM base board. The device PG is reported in the u-boot stage.

    Gilad Z said:
    What is the frequency of the external clock in the EVM?

    If by "external clock" you mean the clock sourced from the auxiliary crystal oscillator, the frequency on the EVM is 22.579 MHz. 

    Gilad Z said:
    I'm currently using EVM, but the next step is custom board. The question - which to use, external crystal or oscillator to get the desired accuracy of clock out?

    You need a crystal oscillator. A crystal oscillator is a (external) crystal and (internal/built-in) oscillator. DM814x device has built-in oscillator circuity, so you need to add crystal. In case of EVM, Mistral has already add the crystal, and its frequency is 22.579 MHz.

    Gilad Z said:
    The needed frequency is 2.048 MHz or 8.192 MHz.

    You can try to modify the Audio PLL settings, to produce the desired frequency. Also, you can follow this wiki page:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_PM_CLOCK_FRAMEWORK_User_Guide

    Best regards,
    Pavel

  • "Answered" - Thanks Pavel!