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.

PROCESSOR-SDK-AM335X: UART configuration

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: AM3352

TI Processor SDK 06_00_00_07

Host computer: Ubuntu 18.04

Development board: AM335x Evaluation Module

16GB micro SD card with TI default linux image created with TI Processor SDK 06_00_00_07

Hi,

we recently bought a AM335x Evaluation Module to start some research on working with TI´s SDK. Eventually, we want to build a EVSE with a custom PCB design using a AM3352 processor.

While trying to run some of our software products on the eval module, I discovered that only UART0 and UART3 are enabled in the TI default image. Searching TI´s forum I found out, that I need to modify the device tree to enable UART1,2,4. However, I could not find any clue on how to do that.

Can you provide some information on how to do that?

Best Regards,

Sergej

  • Hi,

    Which AM335x EVM do you have? There are several. You can post a photo if unsure.

  • Hi,

    here are some photos.

  • OK, this is the AM335x GP EVM. Here is the User Guide for it: http://processors.wiki.ti.com/index.php/AM335x_General_Purpose_EVM_HW_User_Guide

    read especially section 4 and 6. You will notice that there is a CPLD on this board, and you can select different profiles. This table http://processors.wiki.ti.com/images/f/f0/Am335x_gpevm_pinuse.zip will

  • I read the the User Guide and have found out about CPLD already. As far as I understood only UART0 and UART3 are enabled in every profile, but I can only enable one additional UART depending on the selected profile, right? However, I need all five/six UARTS to be activated at the same time. How do I do that?

  • Hi Sergej,

    The question has been asked and answered many time on this e2e forum. You can find the details by searching on this forum.

    In general to enable a UART you only need to modify the kernel device tree file: configure the pinmux and enable the uart node. But first you would also have to check the board schematics to ensure the UART1/2/4 have pins available for your access, and if any of the pins is used by default for a different function, you would have to disable the function or pinmux in device tree so that you can set the pinmux for UART.

    Because the EVM has many functions, you might have difficulty to find all the UART 1/2/4 pins accessible, then you might want to take a look at Beaglebone Black board, which also uses AM335x processor but has most pins on two expansion connectors.

    For your reference, below is the patch I use to enable UART1 on Beaglebone Black.

    diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
    index e13aed096328..57f6159d6cb6 100644
    --- a/arch/arm/boot/dts/am335x-bone-common.dtsi
    +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
    @@ -99,6 +99,13 @@
                    >;
            };
     
    +       uart1_pins: pinmux_uart1_pins {
    +               pinctrl-single,pins = <
    +                       AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart1_rxd.uart1_rxd */
    +                       AM33XX_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart1_txd.uart1_txd */
    +               >;
    +       };
    +
            clkout2_pin: pinmux_clkout2_pin {
                    pinctrl-single,pins = <
                            AM33XX_IOPAD(0x9b4, PIN_OUTPUT_PULLDOWN | MUX_MODE3)    /* xdma_event_intr1.clkout2 */
    @@ -195,6 +202,13 @@
            status = "okay";
     };
     
    +&uart1 {
    +       pinctrl-names = "default";
    +       pinctrl-0 = <&uart1_pins>;
    +
    +       status = "okay";
    +};
    +
     &usb {
            status = "okay";
     };
    
  • Hi Bin,

    thanks for you tip. I will try it out and come back when I am done.