ch943x 无法收发数据

Linux系统CPU+两块ch943x扩展出8个串口,现在串口不能收发数据,linux系统/proc/interrupts中断有变化,日志见附件

icon_rar.giflog_tx_debug.zip

  1. 在linux侧向外(PC接的串口调试工具)发送数据时,驱动打印

[ 1045.394843] ch943x_spi spi0.0: ch943x_ist interrupt enter...

[ 1045.400586] ch943x_spi spi0.0: ch943x_port_read - reg:0x 5, val:0x60

[ 1045.407023] ch943x_spi spi0.0: ch943x_port_read - reg:0x 2, val:0xc1

[ 1045.413373] ch943x_spi spi0.0: ch943x_port_irq no int, quit

[ 1045.419026] ch943x_spi spi0.0: ch943x_port_read - reg:0x15, val:0x60

[ 1045.425464] ch943x_spi spi0.0: ch943x_port_read - reg:0x12, val:0xc1

[ 1045.431812] ch943x_spi spi0.0: ch943x_port_irq no int, quit

[ 1045.437467] ch943x_spi spi0.0: ch943x_port_read - reg:0x25, val:0x60

[ 1045.443902] ch943x_spi spi0.0: ch943x_port_read - reg:0x22, val:0xc1

[ 1045.450252] ch943x_spi spi0.0: ch943x_port_irq no int, quit

[ 1045.455907] ch943x_spi spi0.0: ch943x_port_read - reg:0x35, val:0x60

[ 1045.462345] ch943x_spi spi0.0: ch943x_port_read - reg:0x32, val:0xc1

[ 1045.468692] ch943x_spi spi0.0: ch943x_port_irq no int, quit

[ 1045.474261] ch943x_spi spi0.0: ch943x_ist end



您好,默认驱动程序不支持同时外挂2个CH9434设备,您把在用的修改后的驱动程序回传到我司技术邮箱:tech@wch.cn 。我们看下是代码端问题还是其他问题。


icon_rar.gifch9434.zip



已发送到tech@wch.cn邮箱


1、日志和驱动程序已收到;看设备树写法是用的2个SPI接口,驱动流程可不用过多改动;

2、日志未发现寄存器状态异常;

3、可检查是否为串口应用软件兼容问题,参考GitHub - WCHSoftGroup/tty_uart: linux tty uart application


驱动报这个错不要急吗?看驱动代码,走到这个错误,就退出了,所以收发函数也处理不了

[ 1045.450252] ch943x_spi spi0.0: ch943x_port_irq no int, quit


linux 侧没用其它串口软件,用的echo命令, echo 1>/dev/ttyWCH00 执行后会有上述报错


只有登录才能回复,可以选择微信账号登录