Hi,
1. under i.mx6sx board, uart4 has been setup as follows, and, "/dev/ttymxc3" was registered as kernel device.
but when opening the device as uart device, suddenly system crashed without any error(for example, segmentation fault). other uart devices are working well, /dev/ttymxc0, /dev/ttymxc1,/dev/ttymxc2, /dev/ttymxc4,/dev/ttymxc5
why ttymxc3 is making noise during open serial?
static int open_serial( char *dev_name, int baud, int vtime, int vmin )
{
int
fd;
struct termios newtio;
// trying to open fail
printf("\nuart port: %s\n",dev_name);
fd = open( dev_name, O_RDWR| O_NOCTTY /*| O_NDELAY |O_SYNC | O_NONBLOCK*/);
if ( fd < 0 )
{
// file open failed
printf( "Device OPEN FAIL %s\n", dev_name );
return -1;
}
2. imx6sx-sdb.dts has uart pin assigned at CSI_PIXCLK, CSI_MCLK
To prevent CSI pin mux functions from overlapping other pins, all related CSI pins has been reviewed again and other already-assigned uart4 pin has been checked again. but this is only separate pin muxing.
I've checked again if uart4 tx, rx pin would work well in terms of hw circuit. each pin has been configured as gpio output, and the gpio output test was okay. this pin should not assigned as UART4 pin? otherwise, is there solution for workaround in this case?
&uart4 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart_4>;
status = "okay";
};
pinctrl_uart_4: uart4grp {
fsl,pins = <
MX6SX_PAD_CSI_PIXCLK__UART4_TX 0x1b0b1
MX6SX_PAD_CSI_MCLK__UART4_RX 0x1b0b1
>;
};
Thanks and Regards,
DaeYun.
Hi DaeYun
crashing without any errors may be caused by hardware errors,
like short circuits between uart and processor/pmic control lines, so
one can check carefully board layout and check signals with oscilloscope.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------