Home/Support/Support Forum/CC6UL can not make UART2 receive data
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

CC6UL can not make UART2 receive data

0 votes
I need to configure UART2 to send/receive data.

I can send the from i.MX, but can not receive.

I took a look at 44 pin with oscilloscope and I see that it's strongly pulled high whenever there's no strong pullups at scheme. To be sure that it's not a hardware issue, I've turned off the uart2 and configured i.MX uart2 rx pin as an output gpio. Having this, I was able to drive it high and low.

I used the following connection scheme when tested the communication.

PC | CC6UL
tx - 44 rx
rx - 43 tx


On both sides I've used minicom as a serial console.

In my build I've used ccimx6ulstarter as a reference because my schematics is almost the same.

My device tree parts looks the following way:

imx6ul-ccimx6ulstarter.dts:

&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
status = "okay";
};

&iomuxc {
pinctrl-0 = <&pinctrl_hog>;
imx6ul-ccimx6ul {
pinctrl_uart2: uart2grp {
fsl,pins = <
MX6UL_PAD_UART2_TX_DATA__UART2_DTE_RX 0x1b0b1
MX6UL_PAD_UART2_RX_DATA__UART2_DTE_TX 0x1b0b1
>;
};
};
pinctrl_hog: hoggrp {
fsl,pins = <>;
};
};


Got tried a different pullups, but the result is the same.

Any clues where to look at ?
asked Dec 3, 2020 in Linux by mkonnov New to the Community (1 point)
edited Dec 7, 2020 by mkonnov

Please log in or register to answer this question.

1 Answer

0 votes
Please use the Smart IOmux tool to make sure there are no conflicts between UART2 and something else.
https://ftp1.digi.com/support/smartiomux/index.html

are you using the default device tree from the starter board? Smart IOmux won't let me add a UART2 saying there is a conflict. And looking closely, there is indeed a conflict with SPI and separately with GPIO-SPI SS.
If I add UART2 to the empty design I get this for the device tree:

&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;

status = "okay";
};

&iomuxc {
imx6ul-ccimx6ul {
pinctrl_uart2: uart2grp {
fsl,pins = <
MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX 0x1b0b1
MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX 0x1b0b1
>;
};
};
};
answered Dec 3, 2020 by LeonidM Veteran of the Digi Community (3,936 points)
>> are you using the default device tree from the starter board

Yes, I've started from it, but I have modified the dts and disabled everything except of fec1, uart2 and uart5.

I have applied your config as well, but still I don't see the data is coming.

Is there any iomux installation for Linux ? I've tried to install it using wine, but it seems like I need to spend more time on it, so would be faster to try smth other.
Unfortunately, there is no Linux version of Smart IOmux tool.
Are you using pins 23 & 24 on J8 raspberry pi connector?
Can you try setting up a lopback between those pins? does what you type echo back?
Also, can you setup a loopback between those pins and another UART and see if that works.
We have customers using UART2 on the starter board so we know it works. Search for  the string MX6UL_PAD_UART2_TX* and MX6UL_PAD_UART2_RX* on all our related *.dtsi files
I suspect you have a conflict somehow.
>> Can you try setting up a lopback between those pins?

Good idea.

>> does what you type echo back?

Nothing. Neither at PC side, nor at CC6UL SoM.
After disconnecting the serial line from 6UL with a jumper put on, I can see the local echo at PC side. But after connecting the serial line to 6UL, I can not see this. I took a look at the lines with an oscilloscope again and it there was nothing new - 6UL drives the line high so strong that PC tx can not drive it low enough when sending the bits.

I have applied device tree you gave me, but in anyway, my board .dts is very short and simple, so I don't even know what might cause the conflict. Please take a look:

---------------------------
/dts-v1/;
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
/* i.MX6 UltraLite CPU */
#include "imx6ul.dtsi"
/* ConnectCore 6UL (common) */
#include "imx6ul-ccimx6ul.dtsi"
/* ConnectCore 6UL StarterBoard */
#include "imx6ul-ccimx6ulstarter.dtsi"

&fec1 {
        status = "okay";
    mdio {
        ethphy0: ethernet-phy@0 {
            reg = <1>;
        };
    };
};

&uart2 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart2>;
    status = "okay";
};


&uart5 {
    status = "okay";
};

&iomuxc {
    pinctrl-0 =  <&pinctrl_hog>;

    imx6ul-ccimx6ul {
        pinctrl_uart2: uart2grp {
            fsl,pins = <
                MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX    0x1b0b1
                MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX    0x1b0b1
            >;
        };
    };
};
-----------------------------
Ok, thank you. I'll try to deal with a windows installation.

>> Are you using pins 23 & 24 on J8 raspberry pi connector?

I do not have this header soldered on my board (again, I'm on a custom board), but yes - it's a pins numbered 43 and 44 on CC6UL SoM.

I totally trust you that I'm not the first here trying to make UART2 work and very likely I have a problem on my side. But when I've had UART2 disabled and tried to confiugure those pins as a gpios from Linux, I was able to drive 6UL 'rx' pin high and low. But when it's set up as UART, I see that it's pulled high without any movents on a line when sending smth.
ECSPI interface is disabled and even more, all related sections to it is commented out in .dtsi file.
Finally, I've managed to use SmartIOMux tool on a Windows PC. Got generated the dts file for my design and use it, but unfortunately the result is the same.

Foreseeing your concerns about the suspicious custom board schematics - I've already mentioned here that I've been able to drive 6UL UART rx pin high and low being set up as GPIO.

LeonidM, could you please give me the dts file for 6UL board with proven to be working UART2 ?
...