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.

Setting pinmux registers on OMAP L138 LCDK with AISGen

Other Parts Discussed in Thread: OMAPL138

Hello,


I am working with the OMAP L138 LCDK and I need to enable UART0. To do so, I need to set a couple of bits in PINMUX3. I thought that I could do this with the AISGen tool, but have been unsuccessful. I started with the OMAPL138 AISGen cfg file (http://processors.wiki.ti.com/images/a/a4/LCDK_AISGen_Config.zip), loaded the u-boot.bin from mcsd_1_01_00_02 as the application file, enabled the pinmux setting in the AISGen tool, and set my value. I flashed the resulting ais.bin to the LCDK board. When I boot up and read PINMUX3 I do not get the value that I set in the AISGen tool. My questions are:


1) Have I misunderstood how the AISGen tool is meant to work and be used?

2) I am booting linux. Is the OS overwriting my settings? UART0 signals are multiplexed with the ethernet signals. Do I have to disable the networking?

Thanks for any guidance!

Patrick

  • I forgot to mention that I also tried setting pinmux3 by changing omapl138_lcdk.c under u-boot-2012.04.01-psp03.22.00.06.sdk/include/configs/ and re-building u-boot. This didn't work for pinmux3, but I was able to change pinmux4 this way.
  • Hi Patrick,
    You have to make sure that u-boot is not overwriting the PINMUX3 for other peripherals like ethernet and other which shared with UART0.
    Are you using UART2 as debug port still ?
  • Yes. I'll be using all 3 uarts, but I will not need the ethernet. uart2 will be used for debug/flashing etc.

  • Hi,
    Try to disable ethernet support in u-boot board config file.

    /*
    * Board
    */
    #define CONFIG_DRIVER_TI_EMAC
    #undef CONFIG_USE_SPIFLASH
    #undef CONFIG_SYS_USE_NOR
    #define CONFIG_USE_NAND

    CHANGE TO

    /*
    * Board
    */
    #undef CONFIG_DRIVER_TI_EMAC /* Titus : Disable ethernet */
    #undef CONFIG_USE_SPIFLASH
    #undef CONFIG_SYS_USE_NOR
    #define CONFIG_USE_NAND
  • Thanks Titus. I've read a couple posts on the forum about this and have been playing with it this morning without much luck.

    I added #undef CONFIG_DRIVER_TI_EMAC and tried to rebuild u-boot, I got a lot of undefined references (I truncated this output):

    net/libnet.o: In function `rpc_req':
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:193: undefined reference to `NetEthHdrSize'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:202: undefined reference to `NetSendUDPPacket'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:203: undefined reference to `NetTxPacket'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:203: undefined reference to `NetServerEther'
    net/libnet.o: In function `NfsTimeout':
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:574: undefined reference to `NetStartAgain'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:577: undefined reference to `NetSetTimeout'
    net/libnet.o: In function `nfs_read_reply':
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:563: undefined reference to `NetBootFileXferSize'
    net/libnet.o: In function `NfsHandler':
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:656: undefined reference to `NetSetTimeout'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:668: undefined reference to `NetState'
    net/libnet.o: In function `NfsStart':
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:717: undefined reference to `eth_get_name'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:739: undefined reference to `NetSetTimeout'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:740: undefined reference to `NetSetHandler'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:752: undefined reference to `NetServerIP'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:752: undefined reference to `BootFile'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:752: undefined reference to `NetOurIP'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:752: undefined reference to `NetOurGatewayIP'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:752: undefined reference to `NetOurSubnetMask'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:752: undefined reference to `NetBootFileSize'
    /home/patrick/ti_no_ccs/tss-u-boot/u-boot-2012.04.01-psp03.22.00.06.sdk/net/nfs.c:752: undefined reference to `NetServerEther'

  • Hi Patrick,

    I would recommend you to use the pinmux utility of OMAPL138 to enable the UART0, UART1, UART2 and understand the collision when enabling the EMAC (MII) before proceeding.

    You will find the pinmux utility as a part of MCSDK 1.1. ( Path after installation : "..\ti\mcsdk_1_01_00_01\host-tools\pinmux_utils\windows\bin")

    Regards,

    Shankari

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Thanks for the suggestion Shankari. I did download that and had a look late last week. It's a helpful tool.

    At this point, I've verified that the changes to the u-boot code that I made are taking effect prior to the OS booting (using the md command in u-boot). If I understand correctly, the AISGen tool pinmux values are written first, u-boot second, and finally the OS can write the pinmux registers as well. Can someone verify that this is correct?

    Thanks!

    Patrick
  • Hi Patrick,

    yes, your understanding seems to be right.

    Regards,

    Shankari

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • In addition to adding #undef CONFIG_DRIVER_TI_EMAC, I had to wrap an #ifdef CONFIG_DRIVER_TI_EMAC around some code in omapl138_lcdk.c. Specifically in the function misc_init_r to get it to compile. This kept u-boot from overwriting pinmux3. The linux kernel, however, was also writing pinmux3, so I had to rebuild the kernel without ethernet support in order to keep it from overwriting pinmux3.

    For anyone else headed down this path, I was able to get a USB to ethernet adapter running to keep my wired to our network.