問題描述:
在給板子刷linux系統的時候,不定時地會出現系統掛掉的情況,當時串口打印錯誤信息如下圖:
[ 5.016450] #0: DisplayPort monitor
[ 5.020478] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 5.029087] cfg80211: failed to load regulatory.db
[ 5.370369] usb 1-1: New USB device found, idVendor=0在這裏插入代碼片424, idProduct=2744, bcdDevice= 2.05
[ 5.378558] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 5.385685] usb 1-1: Product: USB2744
[ 5.389355] usb 1-1: Manufacturer: Microchip Tech
[ 5.522022] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[ 5.549252] usb 2-1: New USB device found, idVendor=0424, idProduct=5744, bcdDevice= 2.05
[ 5.557449] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[ 5.564583] usb 2-1: Product: USB5744
[ 5.568240] usb 2-1: Manufacturer: Microchip Tech
[ 5.574013] hub 1-1:1.0: USB hub found
[ 5.577903] hub 1-1:1.0: 4 ports detected
[ 5.602126] hub 2-1:1.0: USB hub found
[ 5.606002] hub 2-1:1.0: 3 ports detected
[ 5.976863] usb 1-1.1: new low-speed USB device number 3 using xhci-hcd
[ 6.084494] usb 1-1.1: New USB device found, idVendor=046d, idProduct=c077, bcdDevice=72.00
[ 6.092855] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6.100161] usb 1-1.1: Product: USB Optical Mouse
[ 6.104858] usb 1-1.1: Manufacturer: Logitech
[ 6.164496] input: Logitech USB Optical Mouse as /devices/platform/amba/ff9e0000.usb1/fe300000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.0/0003:046D:C077.0001/input/input1
[ 6.180090] hid-generic 0003:046D:C077.0001: input: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-xhci-hcd.0.auto-1.1/input0
[ 6.197970] EXT4-fs (mmcblk0p2): recovery complete
[ 6.207179] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 6.215301] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 6.221383] devtmpfs: mounted
[ 6.224635] Freeing unused kernel memory: 832K
[ 6.248876] Run /sbin/init as init process
[ 6.272858] usb 1-1.2: new high-speed USB device number 4 using xhci-hcd
[ 6.378493] usb 1-1.2: New USB device found, idVendor=ffff, idProduct=5678, bcdDevice= 2.00
[ 6.386838] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6.394155] usb 1-1.2: Product: Disk 2.0
[ 6.398080] usb 1-1.2: Manufacturer: USB
[ 6.402006] usb 1-1.2: SerialNumber: 5849701226373589849
[ 6.588170] usb-storage 1-1.2:1.0: USB Mass Storage device detected
INIT: version 2.88 booting
[ 6.651954] scsi host0: usb-storage 1-1.2:1.0
[ 6.736861] usb 1-1.4: new high-speed USB device number 5 using xhci-hcd
[ 7.119192] usb 1-1.4: New USB device found, idVendor=0424, idProduct=2740, bcdDevice= 2.00
[ 7.127549] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7.134862] usb 1-1.4: Product: Hub Controller
[ 7.139302] usb 1-1.4: Manufacturer: Microchip Tech
[ 7.808861] scsi 0:0:0:0: Direct-Access VendorCo ProductCode 2.00 PQ: 0 ANSI: 4
[ 7.873352] sd 0:0:0:0: [sda] 7864320 512-byte logical blocks: (4.03 GB/3.75 GiB)
[ 7.880990] sd 0:0:0:0: [sda] Write Protect is off
[ 7.885925] sd 0:0:0:0: [sda] No Caching mode page found
[ 7.891239] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 7.899754] sda: sda1
[ 7.903422] sd 0:0:0:0: [sda] Attached SCSI removable disk
Starting udev
[ 10.151323] udevd[1863]: starting eudev-3.2.5
[ 17.714005] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 19.064015] urandom_read: 4 callbacks suppressed
[ 19.064021] random: dd: uninitialized urandom read (512 bytes read)
INIT: Entering runlevel: 5
Configuring network interfaces... [ 29.708844] mmc0: Timeout waiting for hardware interrupt.
[ 29.714240] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 29.720665] mmc0: sdhci: Sys addr: 0x00000100 | Version: 0x00001002
[ 29.727095] mmc0: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000000
[ 29.733518] mmc0: sdhci: Argument: 0x002633e0 | Trn mode: 0x0000003b
[ 29.739942] mmc0: sdhci: Present: 0x01f70000 | Host ctl: 0x0000001b
[ 29.746365] mmc0: sdhci: Power: 0x0000000f | Blk gap: 0x00000080
[ 29.752788] mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x00000607
[ 29.759211] mmc0: sdhci: Timeout: 0x00000004 | Int stat: 0x00000003
[ 29.765634] mmc0: sdhci: Int enab: 0x02ff008b | Sig enab: 0x02ff008b
[ 29.772058] mmc0: sdhci: AC12 err: 0x00000000 | Slot int: 0x00000001
[ 29.778481] mmc0: sdhci: Caps: 0x31e8c881 | Caps_1: 0x00002007
[ 29.784904] mmc0: sdhci: Cmd: 0x0000123a | Max curr: 0x00000000
[ 29.791327] mmc0: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x0074b77f
[ 29.797750] mmc0: sdhci: Resp[2]: 0x325b5900 | Resp[3]: 0x00000900
[ 29.804172] mmc0: sdhci: Host ctl2: 0x00000000
[ 29.808600] mmc0: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x000000006fc75380
[ 29.815717] mmc0: sdhci: ============================================
[ 39.948837] mmc0: Timeout waiting for hardware interrupt.
[ 39.954218] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 39.960642] mmc0: sdhci: Sys addr: 0x00000100 | Version: 0x00001002
[ 39.967066] mmc0: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000000
[ 39.973489] mmc0: sdhci: Argument: 0x00000000 | Trn mode: 0x00000033
[ 39.979912] mmc0: sdhci: Present: 0x01f70000 | Host ctl: 0x0000001b
[ 39.986335] mmc0: sdhci: Power: 0x0000000f | Blk gap: 0x00000080
[ 39.992758] mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x00000607
[ 39.999182] mmc0: sdhci: Timeout: 0x0000000e | Int stat: 0x00018002
[ 40.005605] mmc0: sdhci: Int enab: 0x02ff008b | Sig enab: 0x02ff008b
[ 40.012028] mmc0: sdhci: AC12 err: 0x00000000 | Slot int: 0x00000001
[ 40.018451] mmc0: sdhci: Caps: 0x31e8c881 | Caps_1: 0x00002007
[ 40.024874] mmc0: sdhci: Cmd: 0x00000c1b | Max curr: 0x00000000
[ 40.031297] mmc0: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x0074b77f
[ 40.037721] mmc0: sdhci: Resp[2]: 0x325b5900 | Resp[3]: 0x00000900
[ 40.044143] mmc0: sdhci: Host ctl2: 0x00000000
[ 40.048571] mmc0: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x000000006fc75380
[ 40.055687] mmc0: sdhci: ============================================
[ 50.188838] mmc0: Timeout waiting for hardware cmd interrupt.
[ 50.194571] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 50.200995] mmc0: sdhci: Sys addr: 0x00000100 | Version: 0x00001002
[ 50.207418] mmc0: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000000
[ 50.213841] mmc0: sdhci: Argument: 0x00010000 | Trn mode: 0x00000033
[ 50.220265] mmc0: sdhci: Present: 0x01f70000 | Host ctl: 0x0000001b
[ 50.226688] mmc0: sdhci: Power: 0x0000000f | Blk gap: 0x00000080
[ 50.233111] mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x00000607
[ 50.239534] mmc0: sdhci: Timeout: 0x0000000e | Int stat: 0x00018001
[ 50.245957] mmc0: sdhci: Int enab: 0x02ff008b | Sig enab: 0x02ff008b
[ 50.252380] mmc0: sdhci: AC12 err: 0x00000000 | Slot int: 0x00000001
[ 50.258804] mmc0: sdhci: Caps: 0x31e8c881 | Caps_1: 0x00002007
[ 50.265227] mmc0: sdhci: Cmd: 0x00000d1a | Max curr: 0x00000000
[ 50.271650] mmc0: sdhci: Resp[0]: 0x00400900 | Resp[1]: 0x0074b77f
[ 50.278073] mmc0: sdhci: Resp[2]: 0x325b5900 | Resp[3]: 0x00000900
[ 50.284496] mmc0: sdhci: Host ctl2: 0x00000000
[ 50.288924] mmc0: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x000000006fc75380
[ 50.296040] mmc0: sdhci: ============================================
注意到上面打印信息中,在報錯之前多次出現檢測到新usb設備的提示(提示內容類似:New USB device found)。
問題解決:
板子的usb串口線與SDK處於連接狀態,可能是SDK會定時給板子發起等級較高的中斷請求導致的(這是我的猜想,如果那位瞭解是什麼原因,求留言指導)。所以,只要斷開SDK的連接,就不會再出現上面的問題了。