Hi Mike,
Thanks for the help!
Since my USBFS driver works fine in U-BOOT, so I decided not configure again the USB BDT/buffer after entering linux.
but just disconnect DP pull-up when exit u-boot. below is part of the uClinux booting log, the CPU is MK70FN1M0VMJ15. As you can see, my BDTtable as well as the buffer is located in SRAM (around 0x1fff6400). I believe is correct, right? but it does the same, the USB just keep reset and reset, ( log: USB_Reset_Handler, 784 ). from the Linux HOST usbmon log, it seems the device is not response the "set address" command correctly.
the funny thing is as I said before, when the kernel panic happened (see bottom part of the log), I pull-out/plug-in the usb cable, and the usb enumeration is always successful. it's weird....I don't know what the kernel does after "panic", but my driver seems ok after kernel "panic"...kind of embarrassed.
---------------------------------------------------------------------------------
.....
.....
DSPI: controller 0 at hz=72000000,irq=26
DSPI: controller 1 at hz=72000000,irq=27
tBDTtable = 0x1fff6400
BufferPointer bEP0OUT_EVEN = 0x1fff6488
BufferPointer bEP0IN_EVEN = 0x1fff6508
k70-udc version 11 May 2018
k70_ep_alloc_request, ep0
usb0: MAC 22:a9:32:52:8e:32
usb0: HOST MAC 12:57:48:13:60:70
g_ether gadget: adding config #1 'CDC Ethernet (ECM)'/0821a3f0
g_ether gadget: adding 'cdc_ethernet'/703d8d80 to config 'CDC Ethernet (ECM)'/0821a3f0
k70_ep_alloc_request, ep1in-int
g_ether gadget: CDC Ethernet: full speed IN/ep2in-bulk OUT/ep3out-bulk NOTIFY/ep1in-int
g_ether gadget: cfg 1/0821a3f0 speeds: full/low
g_ether gadget: interface 0 = cdc_ethernet/703d8d80
g_ether gadget: interface 1 = cdc_ethernet/703d8d80
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
bound to g_ether
TCP cubic registered
NET: Registered protocol family 17
ARMv7-M VFP Extension supported
usb0: eth_open
IP-Config: Complete:
device=usb0, addr=192.168.1.2, mask=255.255.255.0, gw=192.168.1.1,
host=192.168.1.2, domain=, nis-domain=(none),
bootserver=192.168.1.1, rootserver=192.168.1.1, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.1
USB_Reset_Handler, 784
USB_Reset_Handler, 784
USB_Reset_Handler, 784
USB_Reset_Handler, 784
USB_Reset_Handler, 784
USB_Reset_Handler, 784
rpcbind: server 192.168.1.1 not responding, timed out
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 192.168.1.1
rpcbind: server 192.168.1.1 not responding, timed out
Root-NFS: Unable to get mountd port number from server, using default
Root-NFS: Server returned error -110 while mounting /work/nfs
VFS: Unable to mount root fs via NFS, trying floppy.
List of all partitions:
No filesystem could mount root, tried: nfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
USB_Reset_Handler, 784
USB_Reset_Handler, 784
USB_Reset_Handler, 784
USB_SetAddress, add = 14
g_ether gadget: full speed config #1: CDC Ethernet (ECM)
k70_ep_enable, ep1in-int
g_ether gadget: init ecm
g_ether gadget: notify connect false
g_ether gadget: activate ecm
k70_ep_enable, ep2in-bulk
k70_ep_enable, ep3out-bulk
k70_ep_alloc_request, ep2in-bulk
k70_ep_alloc_request, ep2in-bulk
k70_ep_alloc_request, ep3out-bulk
k70_ep_alloc_request, ep3out-bulk
usb0: qlen 2
g_ether gadget: ecm_open
usb0: eth_start
......
......
Thanks & Regards,
Ethan