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.

sysbios configuration clock and pinmux

Other Parts Discussed in Thread: SYSCONFIG, SYSBIOS

I can configure some  pinmux or clock (For example: CM_ALWON_UART_1_CLKCTRL) in *.gel.

But once I configure pinmux or clock in c code before BIOS_start (after main) , one data exception happened.

I do not know why.

  • Hi Lusheng,

    I need more details. Please provide your SDK, is it EZSDK 5.05.02.00? Where exactly in C code you configure pinmux/clock? Can you share your code?

    The official guidelines how to configure clock in linux kernel C code is described in the wiki page below:

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

    The official guidelines how to configure pinmux in linux kernel C code is described in the wiki page below:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_User_Guide#Modifying_Pin_Mux_settings

    Regards,

    Pavel

  • void gpio_irq_init(void)
    {
    //pin mux 0x48140B94 PINCTRL230 0 1 GPMC_A[9] GP0[17]
    ( volatile Uint32* )( 0x48140B94) = 0x1; //PULLDOWN   //pinmux set 
    //active mode
    //WR_MEM_32(conf_gpio_17 , 1);
    GPIO_SYSCONFIG(GPIO0_BASE) = 0x8;
    //*( volatile Uint32* )( 0x48140B94 ) = 0x1;
    GPIO_CTRL(GPIO0_BASE) = 0x6; //div = 8
    //direction
    GPIO_OE(GPIO0_BASE) = 1<<GPIO_IRQ_TESTPIN ;
    //interrupt RISING EDGE
    GPIO_RISINGDETECT(GPIO0_BASE) = 1<<GPIO_IRQ_TESTPIN ;

    //Debounce enalbe
    GPIO_DEBOUNCENABLE(GPIO0_BASE) = 1<<GPIO_IRQ_TESTPIN ;
    GPIO_DEBOUNCINGTIME(GPIO0_BASE) = 0x10;

    GPIO_IRQENABLE_SET_0(GPIO0_BASE) = 1<<GPIO_IRQ_TESTPIN ;
    }

    I use sysbios, not linux; The code of underline will make one data abort.

    But I put this code in .gel, it is OK; I donot know why.

    #define conf_gpio_17                    (CTRL_MODULE_BASE_ADDR + 0x0B94)

    WR_MEM_32(conf_gpio_17      , 1);  // test gpio17 interrupt

  • Hi Lusheng,

    Lusheng zhang said:
    I use sysbios, not linux

    You should check this in our sysbios forum: http://e2e.ti.com/support/embedded/bios/default.aspx

    What I can say is that I can change the PINCTRL230 value to 0x1 in u-boot (which is equivalent to the GEL file) and I can not change the PINCTRL230 value to 0x1 from user-space (when the system is up, and syslink.ko module is already loaded). Thus it seems that the PINCTRLx values should be changed/configured at very early stage, like GEL file, bootloader, linux kernel. But I would recommend you to double check this in our BIOS forum.

    Regards,

    Pavel