我已经使用
Raspberry Pi Pico
一段时间了,并且我正在使用 minicom
进行串行通信。但有一天,当连接到 USB 端口时,Pico
停止生成 tty/ATCM0
。在此之前,一切都运行得很好。
我仍然可以上传软件并且它正在执行,但因此没有串行通信。
我尝试过更换USB端口,上传以前运行良好的软件,甚至购买了新的
Pico
,因为我怀疑是硬件问题,但仍然没有帮助。我最好的猜测是 USB 驱动程序有问题,尽管我不记得对它们做了什么。
我在连接
/dev
时检查了 tty
是否有新的 Pico
文件,但没有出现任何内容。
dmesg
连接后输出Pico
:
[ 2418.974093] usb 3-2: new full-speed USB device number 28 using xhci_hcd
[ 2434.570047] usb 3-2: device descriptor read/64, error -110 // <-- Warning
dmesg
以BOOTLOADER
模式连接并上传文件后输出
[ 2901.230259] usb 3-2: new full-speed USB device number 30 using xhci_hcd // <-- connected as BOOTLOADER
[ 2901.397715] usb 3-2: New USB device found, idVendor=2e8a, idProduct=0003, bcdDevice= 1.00
[ 2901.397726] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2901.397729] usb 3-2: Product: RP2 Boot
[ 2901.397732] usb 3-2: Manufacturer: Raspberry Pi
[ 2901.397735] usb 3-2: SerialNumber: E0C912D24340
[ 2901.399735] usb-storage 3-2:1.0: USB Mass Storage device detected
[ 2901.399885] scsi host2: usb-storage 3-2:1.0
[ 2902.412571] scsi 2:0:0:0: Direct-Access RPI RP2 1 PQ: 0 ANSI: 2
[ 2902.413038] sd 2:0:0:0: Attached scsi generic sg1 type 0
[ 2902.413315] sd 2:0:0:0: [sdb] 262144 512-byte logical blocks: (134 MB/128 MiB)
[ 2902.413731] sd 2:0:0:0: [sdb] Write Protect is off
[ 2902.413734] sd 2:0:0:0: [sdb] Mode Sense: 03 00 00 00
[ 2902.415755] sd 2:0:0:0: [sdb] No Caching mode page found // <-- Warning
[ 2902.415761] sd 2:0:0:0: [sdb] Assuming drive cache: write through // <-- Warning
[ 2902.424350] sdb: sdb1
[ 2902.427764] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[ 2907.724687] usb 3-2: USB disconnect, device number 30 // <-- uploaded uf2 file
[ 2907.725456] blk_update_request: I/O error, dev sdb, sector 260 op 0x1:(WRITE) flags 0x100000 phys_seg 1 prio class 0 // <-- Warning
[ 2907.725471] Buffer I/O error on dev sdb1, logical block 259, lost async page write // <-- Warning
[ 2907.733492] FAT-fs (sdb1): unable to read boot sector to mark fs as dirty // <-- Warning
[ 2908.102068] usb 3-2: new full-speed USB device number 31 using xhci_hcd
[ 2923.530076] usb 3-2: device descriptor read/64, error -110 // <-- Warning
仅当 lsusb -tv
处于
Pico
模式时,
BOOTLOADER
才会列出这两个条目:
...
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 2: Dev 35, If 0, Class=Mass Storage, Driver=usb-storage, 12M
ID 2e8a:0003
|__ Port 2: Dev 35, If 1, Class=Vendor Specific Class, Driver=, 12M
ID 2e8a:0003
...
首先,它不是tty/ATCM0,而是/dev/ttyACM0。 其次,Pico 并不创建它。 充当 Pico 连接的 USB 主机的计算机创建了该设备。
因此请检查您是否在正确的位置寻找正确的东西。 如果您仍然没有得到任何信息,请重新刷新 Pico,您可以使用在线找到的 flash_nuke uf2。 您还需要确保在 CMakeLists 文件中启用了 USB 串行。 对该文件的任何更改都需要完全重建项目。