ch9434是不是不支持64位系统,在64位linux系统调试ch9434失败,minicom可以连接/dev/ttyWCH0,但收发数据失败
热门产品 :
CH32V317: 互联型青稞RISC-V MCU
ch9434是不是不支持64位系统,在64位linux系统调试ch9434失败,minicom可以连接/dev/ttyWCH0,但收发数据失败
您好,驱动程序和设备支持使用在64位操作系统上,基于您的问题,建议检查下SPI通讯接口以及中断功能是否正常,可以按如下博客链接排查:https://blog.csdn.net/WCH_TechGroup/article/details/128288016
[ 1.430561] ch9434: SPI driver for spi to serial chip ch9434, etc. [ 1.430569] ch9434: V1.00 On 2020.06.17 [ 1.463038] ch943x_spi spi0.0: gpio_to_irq:-22, spi->irq:382 [ 1.463046] ch943x_spi spi0.0: setup 8 bpw, cpol, cpha, 3000000Hz [ 1.463099] ch943x_spi spi0.0: setup mode 3, 8 bits/w, 3000000 Hz max --> 0 [ 1.463109] ch943x_spi spi0.0: change to SPI MODE 3! [ 1.464669] ch943x_spi spi0.0: ch943x_port_write - reg:0x81, val:0x 0 [ 1.464868] ch943x_spi spi0.0: ch943x_port_write - reg:0x84, val:0x 0 [ 1.465114] ch943x_spi spi0.0: ch943x_port_read - reg:0x 6, val:0x 0 [ 1.465405] ch943x_spi spi0.0: ******Uart 0 SPR Test Start****** [ 1.465630] ch943x_spi spi0.0: ch943x_port_write - reg:0x87, val:0x55 [ 1.465891] ch943x_spi spi0.0: ch943x_port_read - reg:0x 7, val:0x55 [ 1.466120] ch943x_spi spi0.0: ch943x_port_write - reg:0x87, val:0x66 [ 1.466340] ch943x_spi spi0.0: ch943x_port_read - reg:0x 7, val:0x66 [ 1.466346] ch943x_spi spi0.0: ******Uart 0 SPR Test End****** [ 1.466558] ch943x_spi spi0.0: ch943x_port_write - reg:0x91, val:0x 0 [ 1.466753] ch943x_spi spi0.0: ch943x_port_write - reg:0x94, val:0x 0 [ 1.466967] ch943x_spi spi0.0: ch943x_port_read - reg:0x16, val:0x 0 [ 1.467260] ch943x_spi spi0.0: ******Uart 1 SPR Test Start****** [ 1.467485] ch943x_spi spi0.0: ch943x_port_write - reg:0x97, val:0x55 [ 1.467694] ch943x_spi spi0.0: ch943x_port_read - reg:0x17, val:0x55 [ 1.467878] ch943x_spi spi0.0: ch943x_port_write - reg:0x97, val:0x66 [ 1.468035] ch943x_spi spi0.0: ch943x_port_read - reg:0x17, val:0x66 [ 1.468041] ch943x_spi spi0.0: ******Uart 1 SPR Test End****** [ 1.468203] ch943x_spi spi0.0: ch943x_port_write - reg:0xa1, val:0x 0 [ 1.468369] ch943x_spi spi0.0: ch943x_port_write - reg:0xa4, val:0x 0 [ 1.468567] ch943x_spi spi0.0: ch943x_port_read - reg:0x26, val:0x 0 [ 1.468790] ch943x_spi spi0.0: ******Uart 2 SPR Test Start****** [ 1.468994] ch943x_spi spi0.0: ch943x_port_write - reg:0xa7, val:0x55 [ 1.469201] ch943x_spi spi0.0: ch943x_port_read - reg:0x27, val:0x55 [ 1.469371] ch943x_spi spi0.0: ch943x_port_write - reg:0xa7, val:0x66 [ 1.469538] ch943x_spi spi0.0: ch943x_port_read - reg:0x27, val:0x66 [ 1.469545] ch943x_spi spi0.0: ******Uart 2 SPR Test End****** [ 1.469726] ch943x_spi spi0.0: ch943x_port_write - reg:0xb1, val:0x 0 [ 1.469952] ch943x_spi spi0.0: ch943x_port_write - reg:0xb4, val:0x 0 [ 1.470146] ch943x_spi spi0.0: ch943x_port_read - reg:0x36, val:0x 0 [ 1.470376] ch943x_spi spi0.0: ******Uart 3 SPR Test Start****** [ 1.470558] ch943x_spi spi0.0: ch943x_port_write - reg:0xb7, val:0x55 [ 1.470735] ch943x_spi spi0.0: ch943x_port_read - reg:0x37, val:0x55 [ 1.470948] ch943x_spi spi0.0: ch943x_port_write - reg:0xb7, val:0x66 [ 1.471214] ch943x_spi spi0.0: ch943x_port_read - reg:0x37, val:0x66 [ 1.471220] ch943x_spi spi0.0: ******Uart 3 SPR Test End****** [ 1.471422] ch943x_spi spi0.0: ch943x_port_write - reg:0xc8, val:0xcd [ 1.471591] ch943x_spi spi0.0: ch943x_probe - devm_request_threaded_irq =382 result:0
开机启动测试正常,但minicom发送数据没反应
还是不行
您好,如上信息中提示:
gpio_to_irq:-22, spi->irq:382
中断的gpio配置是有问题的,可检查下这个配置,并按照博客内容单独验证中断功能。
注:串口收发等功能依赖中断功能。
好的谢谢,正常应该是什么样子的信息?
可以参考博客中的正常中断功能演示,GPIO可以从dts获取也可以代码指定,确保使用的GPIO和硬件上能对应起来。且此GPIO支持外部中断功能。