Added memtool by adding the following line into my local.conf file
IMAGE_INSTALL_append = "imx-test"
rebuilt using bitbake, and loaded image onto my i.mx6ul board
Memtool write to UART3 registers followed by a read shows that the write did not take effect. Any ideas why?
Memtool write success
root@imx6ul-var-dart:/# /unit_tests/memtool UART1.UCR1=0x201
SOC: i.MX6ULL
write 0x00000201 to 0x02020080
root@imx6ul-var-dart:/# /unit_tests/memtool UART1.UCR1
SOC: i.MX6ULL
UART1 Addr:0x2020000
UART1.UCR1 Addr:0x02020080 Value:0x00000201
Memtool write no effect
root@imx6ul-var-dart:/# /unit_tests/memtool UART3.UCR1=0x201
SOC: i.MX6ULL
write 0x00000201 to 0x021EC080
root@imx6ul-var-dart:/# /unit_tests/memtool UART3.UCR1
SOC: i.MX6ULL
UART3 Addr:0x21ec000
UART3.UCR1 Addr:0x021EC080 Value:0x00000C00
Monitored UART3 output with logic analyzer
root@imx6ul-var-dart:/dev# echo "hello" > /dev/ttymxc2
When I run the above command, I see "hello" at the logic analyzer. This leads me to believe that the driver, pin configuration and clock for UART3 are all working fine.
...somehow UART3 is enabled and working normally, but memtool can not write to the register values.
********* begin related info*******
I also tried writes to any/all of UART2, UART3, UART4, and all writes have no effect. Write followed by read shows that the write was ignored.
UART1 is used for console. UART1 is ttymxc0
root@imx6ul-var-dart:/# stty -F /dev/ttymxc0
speed 115200 baud; line = 0;
eol = ^J;
-brkint ixoff -imaxbel
-iexten
UART2, UART3, UART4 are used for other things. UART3 is assigned to ttymxc2, the settings for which are shown below.
root@imx6ul-var-dart:/# stty -F /dev/ttymxc2
speed 115200 baud; line = 0;
eol = ^J;
-brkint ixoff -imaxbel
-iexten
All active UARTs use the same driver as far as I can tell. The console (UART1) is in the tty group.
/dev
crw------- 1 root tty 207, 16 Nov 26 02:22 ttymxc0
crw------- 1 root root 207, 17 Nov 26 00:41 ttymxc1
crw------- 1 root root 207, 18 Nov 26 01:40 ttymxc2
Read all registers for UART3
0x021EC080: 00000C00 00004021 0000078C 00004000
0x021EC090: 00000B10 00002050 00004008 0000002B
0x021EC0A0: 00000000 00000029 00000C34 00000008
0x021EC0B0: 00002CA4 00000060 00000000
Read all registers for UART1
0x02020080: 00000241 0000402F 0000038C 00004002
0x02020090: 00000B01 00000040 00001080 0000002B
0x020200A0: 00000000 000001F7 00000C34 00000008
0x020200B0: 00002CA4 00000020 00000000
Device tree source include file
filename: ../kernel-source/arch/arm/boot/dts/imx6ul-imx6ull-var-dart-common.dtsi
/* Console UART */
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
status = "okay";
};
/* Bluetooth UART */
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
fsl,uart-has-rtscts;
status = "okay";
};
/* ttymxc2 UART */
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
fsl,uart-has-rtscts;
fsl,irda-mode;
status = "okay";
};
********** end related info **********
Any suggestions? Should I use something else besides memtool for register writes? I looked at devmem and devmem2, perhaps I'll try those next if I can't figure this out.
Any help is greatly appreciated.