AnsweredAssumed Answered

LPC11U68: USB ISP countinously enumerated by Linux but the mass-storage is never mounted

Question asked by Olivier Martin on Nov 2, 2016
Latest reply on Nov 3, 2016 by jeremyzhou

Hi all,
I have designed my own PCB with LPC11U68. Here is the schematic:

We cannot read well but the capacitors attached to the crystal are 18pF and the crystal is this one: http://www.digikey.com/product-detail/en/7M-12.000MEEQ-T/887-1316-1-ND/2207898

 

The ISP is expected to be through USB (I cannot change to UART). I have a 12Mhz external crystal.
When I plug the board to USB, I can see the USB be enumerated by Linux:

 

[46830.963165] scsi79 : usb-storage 2-1.3:1.0
[46831.436294] usb 2-1.3: USB disconnect, device number 68
[46831.634474] usb 2-1.3: new full-speed USB device number 69 using ehci-pci
[46831.729533] usb 2-1.3: New USB device found, idVendor=1fc9, idProduct=0017
[46831.729542] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[46831.729548] usb 2-1.3: Product: LPC1XXX IFLASH
[46831.729553] usb 2-1.3: Manufacturer: NXP
[46831.729557] usb 2-1.3: SerialNumber: ISP
[46831.730339] usb-storage 2-1.3:1.0: USB Mass Storage device detected

 

But I could only access the USB mass-storage the first time I plugged it. But I did not have time to do anything else, after few seconds the mass-storage disappeared and since then every time I plug the device it constantly enumerated but without mounting the mass-storage; even after leaving the device unplugged for an hour.

 

The only one time the LPC was successful mounted I had this output:

 

[234963.388167] usb 1-1.1: new full-speed USB device number 113 using ehci-pci
[234963.483203] usb 1-1.1: New USB device found, idVendor=1fc9, idProduct=0017
[234963.483210] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[234963.483215] usb 1-1.1: Product: LPC1XXX IFLASH
[234963.483218] usb 1-1.1: Manufacturer: NXP
[234963.483222] usb 1-1.1: SerialNumber: ISP
[234963.483994] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[234963.484215] scsi122 : usb-storage 1-1.1:1.0
mtp-probe: checking bus 1, device 113: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1"
mtp-probe: bus: 1, device: 113 was not an MTP device
[234964.485934] scsi 122:0:0:0: Direct-Access     NXP      LPC1XXX IFLASH   1.0  PQ: 0 ANSI: 0 CCS
[234964.486568] sd 122:0:0:0: Attached scsi generic sg2 type 0
[234964.487081] sd 122:0:0:0: [sdb] 516 512-byte logical blocks: (264 kB/258 KiB)
[234964.488418] sd 122:0:0:0: [sdb] Write Protect is off
[234964.488427] sd 122:0:0:0: [sdb] Mode Sense: 03 00 00 00
[234964.492817] sd 122:0:0:0: [sdb] No Caching mode page found
[234964.492827] sd 122:0:0:0: [sdb] Assuming drive cache: write through
[234964.497456] sd 122:0:0:0: [sdb] No Caching mode page found
[234964.497465] sd 122:0:0:0: [sdb] Assuming drive cache: write through
[234964.506426]  sdb:
[234964.511600] sd 122:0:0:0: [sdb] No Caching mode page found
[234964.511607] sd 122:0:0:0: [sdb] Assuming drive cache: write through
[234964.511613] sd 122:0:0:0: [sdb] Attached SCSI removable disk
udisksd[2678]: Mounted /dev/sdb at /media/olivier/CRP DISABLD on behalf of uid 1000

 

I tried on a different computer and it also continuously enumerated without mounting the mass-storage.

 

I can briefly do a `lsusb` and Linux seems to return the appropriate info:

 

Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x1fc9 NXP Semiconductors
  idProduct          0x0017
  bcdDevice            d.01
  iManufacturer           1
  iProduct                2
  iSerial                 3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0

 

I am trying to think about potential issues:
- Software: Unlikely as it is still in the NXP ROM Bootloader
- Design: Possible, I discovered after sending my design to the PCB manufacturer that NXP has added many more capacitors on the voltage lines: https://www.lpcware.com/system/files/LPC11U68_Xpresso_v2_Schematic_RevC_1.pdf .
- Soldering: Why not (I am not necessary an expert in SMD soldering) but it would not explain why it "almost" work

 

With a logic analyzer, the crystal signals XTALIN and XTALOUT look like that:
I confirm XTALOUT has a frequency of 12MHz.

 

The USB signals look like that (I removed the crystal signals):

 

I compare both last packets before the interruption of the USB signals and they are different.

Outcomes