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.

CCS/TMS320F28379D: How know CPU and Peripheral clock

Part Number: TMS320F28379D
Other Parts Discussed in Thread: LAUNCHXL-F28379D

Tool/software: Code Composer Studio

Hi,

I'm starting to work on LaunchXL-F28379D. I work on PWM high resolution.

I succes to build and run the provide program (C2000).

I don't understand how to have CPU clock value or how put the cpu clock on 1 pin. (like on microship DSP)

I want to set the CPU clock on the maximum value and i have to prove it.

thank you in advance

Best regards

Jean-Jacques Trognon

  • Hello,

    The F28379D does have a GPIO muxed signal - XCLKOUT. This signal is a divided down output of the System Clock. It is found on GPIO73. On the LaunchPad, GPIO73 is routed to J9.37. This is the high-density connector on the backside of the board.

    To configure XCLKOUT, refer to section 2.7.4 XCLKOUT in the device technical reference manual SPRUHM8.

    If you need something more accessible, many EPWM signals are routed to the BoosterPack connectors. These can be configured to output 50% duty cycle signals, and are based on divided values of the System clock as well. You can refer to the EPWM section of the TRM for more information on how to configure the EPWMs as well.

    Thanks,
    Mark
  • Thank you I'm trying this
  • hello,
    I try to configure XCLKOUT with section 2.7.4 XCLKOUT.
    I have a program who works correctly for the PWM and I add this for view cpu clock on GPIO 73 :

    while(ClkCfgRegs.CLKSRCCTL3.bit.XCLKOUTSEL != 0x2 )
    {
    ClkCfgRegs.CLKSRCCTL3.bit.XCLKOUTSEL = 0x2; // source de XCLKOUT 0x2 => CPU1 / default = 0
    }
    while(ClkCfgRegs.XCLKOUTDIVSEL.bit.XCLKOUTDIV != 0x0)
    {
    ClkCfgRegs.XCLKOUTDIVSEL.bit.XCLKOUTDIV =0x0; // pas de diviseur (/1) / default 0x3
    }
    GPIO_SetupPinMux(73,1,3); // GPIO 73 / CPU 1 / Mux 3= XCLKout


    When I try to put the default value in the "while" the program go after "while" so the boucle while works.
    I think, The problem is change value in registers.
    I don't know if GPIO_SetupPinMux works. It's a fonction of "F2837xS_Gpio.c"

    Can you help me?

    thank you in advance !

    Jean-Jacques
  • Jean-Jacques,

    CLKSRCCTL3 and XCLKOUTDIVSEL are both EALLOW protected registers. please place an EALLOW; before the while loops and an EDIS; before the GPIO_setupPinMux() function call.

    Thanks,
    Mark
  • Thank you very much Mark !