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.

RTOS/AM5728: CLKOUT1 on GPIO6_16

Part Number: AM5728

Tool/software: TI-RTOS

Hi,

I am using TI-RTOS on the DSP1 core and Linux on A15 (processor SDK v4.03). I am trying to setup GPIO6_16 as clkout1. I set the muxmode for GPIO6_16 to 0x9 (clkout1), and programmed CM_CLKSEL_CLKOUTMUX1 to 0x4 (DSP_GFCLK). I set the CM_CLKSEL_DSP_GFCLK_CLKOUTMUX to 0x0 (divide by 1). But, I am not seeing any output on the pin. What am I missing in my setup? Are there any examples for configuring CLKOUT1 that I can use for reference? 

Thanks,

Jimit

  • Based on the setup you have described, the configuration seems to be correct. How are you modifying the the MUXMODE? Are you doing this using UBoot/Linux or using register read write using DSP side code? Are you reading back the values in the registers to make sure the settings are applied correctly when you probed the pin?  Can you test that you can toggle the GPIO6_16 when muxmode is GPIO to make sure pin is active.

    I will check with device clocking expert to see if there is anything missing in the baseline setup for this pin.

    Regards,

    Rahul

  • I set the MUXMODE using uboot. I verified that it was set correctly using omapconf tool. I tried setting the CM_CLKSEL_CLKOUTMUX1 and CM_CLKSEL_DSP_GFCLK_CLKOUTMUX from DSP code directly as well as from Linux using omapconf. I can verify the registers' values using omapconf read option - and they are what I expect.

    -Jimit
  • Jimit,

    Are you using the pinmux tool.  This is highly recommended.

    Tom

  • I was not using the pinmux tool, but I tried that. The pinmux tool generated the similar output values which I used in the uboot.  

    From the genericFileFormatPadConf.txt -

    0x4A003690	0x20009	F21	CTRL_CORE_PAD_GPIO6_16	gpio6_16	clkout1

    And, boardPadDelayInit.c -

    #include <stdint.h>
    #include "boardPadDelay.h"
    #include "boardPadDelayTune.h"
    
    
    #if defined(_TMS320C6X) || defined(__TI_ARM_V7M4__)
    #ifndef __cplusplus
    #pragma DATA_SECTION (pad, "BOARD_IO_DELAY_DATA");
    #else
    #pragma DATA_SECTION ("BOARD_IO_DELAY_DATA");
    #endif
    const boardPadDelayCfg_t pad[] = {
    #else
    const boardPadDelayCfg_t pad[] __attribute__((section("BOARD_IO_DELAY_DATA"))) = {
    #endif
    /** {PADCONF_REG_OFFSET, PADCONF_VALUE, {CFG_X_IN offset, aDelay, gDelay}, {CFG_X_OEN offset, aDelay, gDelay}, {CFG_X_OUT offset, aDelay, gDelay}} **/
    
    /* PRCM - clkout1 on F21 - MyPRCM1 */
         {0x1690, 0x20009, {0x0, 0, 0}, {0x0, 0, 0}, {0x0, 0, 0}},
    };
    
    #ifdef __cplusplus
    #if defined(_TMS320C6X) || defined(__TI_ARM_V7M4__)
    #pragma CODE_SECTION ("BOARD_IO_DELAY_CODE");
    #endif
    #endif
    uint32_t boardPadGetSize()
    {
         return (sizeof(pad) / sizeof(boardPadDelayCfg_t));
    }
    
    #ifdef BOARD_PAD_DELAY_ALT_GRP_ENABLE
    #ifdef __cplusplus
    #if defined(_TMS320C6X) || defined(__TI_ARM_V7M4__)
    #pragma CODE_SECTION ("BOARD_IO_DELAY_CODE");
    #endif
    #endif
    uint32_t boardAltPadGetSize()
    {
         return (sizeof(altPad) / sizeof(boardPadDelayAltGpCfg_t));
    }
    #endif

    I am not sure how to add output of boardPadDelayInit.c to the uboot - does that get added to the iodelay_cfg_entry array?

  • Jimit,

    Please refer to the application note on integrating pinmux tool output with TI software. Linux SDK provides a script. Refer to section 1.6.1.1 in the document.
    www.ti.com/.../sprac44a.pdf

    Regards,
    Rahul