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.

how to disable 28335 xclkout?

Other Parts Discussed in Thread: TMS320C28346

Hello.

i want disable 28335 xclkout.

i think just clloff bit set, but xclkout don't disable.

how to disable xclkout?

please let me know...

thank you.

// XTIMCLK = SYSCLKOUT/2
XintfRegs.XINTCNF2.bit.XTIMCLK = 1;
// XCLKOUT = XTIMCLK/2
XintfRegs.XINTCNF2.bit.CLKMODE = 1;
// Enable XCLKOUT
XintfRegs.XINTCNF2.bit.CLKOFF = 1;   

 

 

  • Hi,

    Here's the info you seek, I don't know why xclkout is not being disabled. How're you checking?

    Regards,

    Gautam

  • thanks gautam.

    But , I have already tried.

    Init Peripheral Clocks() to set XintfRegs.XINTCNF2.bit.CLKOFF was.

    (XintfRegs.XINTCNF2.bit.CLKOFF = 1;   )

    But, Ineffective.

    I'm just curious.

    regards,

  • I know, you've already tried... Above I've asked you a question wherein how do you know that Xclk is still ON?

    Also check this link: http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/87276.aspx

    Regards,

    Gautam

  • CLKOUT pin to an oscilloscope confirmed.

    CLKOUT pin is only connected to the T.P. 

    I'll link to read.

    But I do not know English very well.
    So, it takes time to understand.

    Thank you for your kindness. ^^;

  • Try replacing the code in: DSP2833x_SysCtrl.c

    Subroutine: InitPeripheralClocks(void)

    void InitPeripheralClocks(void)
    {
       EALLOW;
    
    // HISPCP/LOSPCP prescale register settings, normally it will be set to default values
       SysCtrlRegs.HISPCP.all = 0x0001;
       SysCtrlRegs.LOSPCP.all = 0x0002;
    
    // XCLKOUT to SYSCLKOUT ratio.  By default XCLKOUT = 1/4 SYSCLKOUT
       // XTIMCLK = SYSCLKOUT/2
       XintfRegs.XINTCNF2.bit.XTIMCLK = 1;
       // XCLKOUT = XTIMCLK/2
       XintfRegs.XINTCNF2.bit.CLKMODE = 1;
       // Enable XCLKOUT
       XintfRegs.XINTCNF2.bit.CLKOFF = 1;
    
    // Peripheral clock enables set for the selected peripherals.
    // If you are not using a peripheral leave the clock off
    // to save on power.
    //
    // Note: not all peripherals are available on all 2833x derivates.
    // Refer to the datasheet for your particular device.
    //
    // This function is not written to be an example of efficient code.
    
       SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1;    // ADC
    
       // *IMPORTANT*
       // The ADC_cal function, which  copies the ADC calibration values from TI reserved
       // OTP into the ADCREFSEL and ADCOFFTRIM registers, occurs automatically in the
       // Boot ROM. If the boot ROM code is bypassed during the debug process, the
       // following function MUST be called for the ADC to function according
       // to specification. The clocks to the ADC MUST be enabled before calling this
       // function.
       // See the device data manual and/or the ADC Reference
       // Manual for more information.
    
       ADC_cal();
    
    
       SysCtrlRegs.PCLKCR0.bit.I2CAENCLK = 1;   // I2C
       SysCtrlRegs.PCLKCR0.bit.SCIAENCLK = 1;   // SCI-A
       SysCtrlRegs.PCLKCR0.bit.SCIBENCLK = 1;   // SCI-B
       SysCtrlRegs.PCLKCR0.bit.SCICENCLK = 1;   // SCI-C
       SysCtrlRegs.PCLKCR0.bit.SPIAENCLK = 1;   // SPI-A
       SysCtrlRegs.PCLKCR0.bit.MCBSPAENCLK = 1; // McBSP-A
       SysCtrlRegs.PCLKCR0.bit.MCBSPBENCLK = 1; // McBSP-B
       SysCtrlRegs.PCLKCR0.bit.ECANAENCLK=1;    // eCAN-A
       SysCtrlRegs.PCLKCR0.bit.ECANBENCLK=1;    // eCAN-B
    
       SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0;   // Disable TBCLK within the ePWM
       SysCtrlRegs.PCLKCR1.bit.EPWM1ENCLK = 1;  // ePWM1
       SysCtrlRegs.PCLKCR1.bit.EPWM2ENCLK = 1;  // ePWM2
       SysCtrlRegs.PCLKCR1.bit.EPWM3ENCLK = 1;  // ePWM3
       SysCtrlRegs.PCLKCR1.bit.EPWM4ENCLK = 1;  // ePWM4
       SysCtrlRegs.PCLKCR1.bit.EPWM5ENCLK = 1;  // ePWM5
       SysCtrlRegs.PCLKCR1.bit.EPWM6ENCLK = 1;  // ePWM6
       SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 1;   // Enable TBCLK within the ePWM
    
       SysCtrlRegs.PCLKCR1.bit.ECAP3ENCLK = 1;  // eCAP3
       SysCtrlRegs.PCLKCR1.bit.ECAP4ENCLK = 1;  // eCAP4
       SysCtrlRegs.PCLKCR1.bit.ECAP5ENCLK = 1;  // eCAP5
       SysCtrlRegs.PCLKCR1.bit.ECAP6ENCLK = 1;  // eCAP6
       SysCtrlRegs.PCLKCR1.bit.ECAP1ENCLK = 1;  // eCAP1
       SysCtrlRegs.PCLKCR1.bit.ECAP2ENCLK = 1;  // eCAP2
       SysCtrlRegs.PCLKCR1.bit.EQEP1ENCLK = 1;  // eQEP1
       SysCtrlRegs.PCLKCR1.bit.EQEP2ENCLK = 1;  // eQEP2
    
       SysCtrlRegs.PCLKCR3.bit.CPUTIMER0ENCLK = 1; // CPU Timer 0
       SysCtrlRegs.PCLKCR3.bit.CPUTIMER1ENCLK = 1; // CPU Timer 1
       SysCtrlRegs.PCLKCR3.bit.CPUTIMER2ENCLK = 1; // CPU Timer 2
    
       SysCtrlRegs.PCLKCR3.bit.DMAENCLK = 1;       // DMA Clock
       SysCtrlRegs.PCLKCR3.bit.XINTFENCLK = 0;     // XTIMCLK
       SysCtrlRegs.PCLKCR3.bit.GPIOINENCLK = 1;    // GPIO input clock
    
       EDIS;
    }

    Regards,

    Gautam

  • Encountered with a similar problem on tms320c28346. You can not change the contents XINTCNF2 until external interface (XINTF) clock disabled.

    To disable xclkout do the following:

    SysCtrlRegs.PCLKCR3.bit.XINTFENCLK = 1;
    XintfRegs.XINTCNF2.bit.CLKOFF = 1;
    SysCtrlRegs.PCLKCR3.bit.XINTFENCLK = 0;

  • Gautam, your code will not work. XINTFENCLK = 0 by default after reset and XINTCNF2 not modified.