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.

DM36x CLKOUT0 and CLKOUT1 and CLKOUT2 enable procedure, includes example for Gel file hotmenus

E2E DM36x Community,

Here's a procedure that can come in handy in the case that you would want to use the CLKOUT0,  CLKOUT1 or CLKOUT2 in DM36x.  

hotmenu Clkout0_driver()
{
 *(unsigned int *)0x01C40048 &= 0xFFFFFFFE; // Enable CLKOUT0 driver
 *(unsigned int *)0x01C40010 |= 0x00300000;   // GIO37 will act as CLKOUT0
 *(unsigned int *)0x01C40000 |= 0x00008000;  // GIO 93 as CLKOUT0 
 *(unsigned int *)0x01C40948 |= 0x00000002;      // OBS CLK enabled 
 *(unsigned int *)0x01C40904 =  0x00000000;       // Oscillator divider output enabled
 *(unsigned int *)0x01C40924 =  0x00008001;  // Expecting 12 Mhz clock
 GEL_TextOut(" Clkout 0 enabled \n");
}
  

hotmenu Clkout1_driver()
{
 *(unsigned int *)0x01C40048 &= 0xFFFFFFFD; // Enable CLKOUT1 driver
 *(unsigned int *)0x01C40010 |= 0x30000;    // GIO35 will act as CLKOUT1
 *(unsigned int *)0x01C40D48 |= 0x2;     // OBS CLK enabled
 *(unsigned int *)0x01C40D04 =  0x00;       // Oscillator divider output enabled
 *(unsigned int *)0x01C40D24 =  0x8001;  // Expecting 12 Mhz clock
 GEL_TextOut(" Clkout 1 enabled \n");
}
 

hotmenu Clkout2_driver()
{
 *(unsigned int *)0x01C40048 &= 0xFFFFFFFB; // Enable CLKOUT2 driver
 *(unsigned int *)0x01C40010 |= 0x00000300;    // GIO31 will act as CLKOUT2
 *(unsigned int *)0x01C40904 =  0x00;       // Oscillator divider output enabled
 *(unsigned int *)0x01C40924 =  0x8001;  //  Default value  observed on CLKOUT2 will be PLLC1_VCO/(((SYSCLK99 +1)*16))- 15 Mhz clock (using 24Mhz crystal)
 GEL_TextOut(" Clkout 2 enabled \n");
}

  • How to modify the default CLKOUT1 frequency, how make it output 37.125MHz?

    Any reply will be appreciated.

  • Hi. I'm calling this code from my linux board init function and DM368 fails to produce the clock on either GIO37 or GIO93.

    If I unplug the jumper cable from the Leopardboard DM368 I'm testing this with and plug it into a signal generator supplying a clock of 24MHz, I can I2C (SCCB) to the CMOS sensor. With DM368 supplying the clock, the CMOS sensor doesn't respond.

    Is there something else I need to setup before I can get the clock out of CLKOUT0 (GIO37/GIO93)?

    Should I set up the direction register for those pins (GPIOs)?

    PS. I do not have the proper tools to measure clocks, but I'm using a microcontroller capable of counting edges and a multimeter (expecting it to show the mean).