LPC54628 HOST USB Issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC54628 HOST USB Issue

1,811 Views
anealca
Contributor II

I cannot seem to detect the insertion of a USB device (Phillips 16GB stick using an Insignia USB On-the-Go adapter).

I am trying to use the USB HOST example with fatfs and FreeRTOS on the OM13098 development board.

I was able to get the fatfs and RTOS working with the SD card so I'm pretty sure they are not the issue.

I can get the Host code started using the Ip3516Hs controller, including using USB RAM.

The clocks and pin assignments seem correct.

The USB[1] PORTSC1 register seems stuck at 0x1000.

I cannot seem to reset the port using PR (bit[8]), nor can I enable to port PED (bit[2]).

I assume this is why the detect is failing (bits[0,1] are CCS and CSC).

What could I be missing?

Labels (2)
0 Kudos
Reply
5 Replies

1,571 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Adrian,

 

Are you basing your code with our SDK examples? I flashed my LPCXpresso54628 board with the host_msd_fatfs example and it worked correctly. What happens if you try this on your side?

 

You can download the latest version of the LPCXpresso54629 SDK from the following link:

Welcome | MCUXpresso SDK Builder 

 

Please tell me exactly which example is not working on your side so I can test it on mine.

 

Best regards,

Felipe

0 Kudos
Reply

1,571 Views
anealca
Contributor II

Felipe...

Thanks for your feedback.

I am using a project I have created from the FreeRTOS with the TCP/IP socket...

I've added quite a few features including the SD card I/F with FatFS

I am switching from from SD card to USB because the SD card is too slow for my data rate logging

I can now can use the IP3516HS Host to detect the insertion of the stick...

BUT I cannot seem to get any responses from the stick.

I'm using the IP3516HS host...

The ISR (USB_HostIp3516HsIsrFunction) correctly detects the device insertion...

The task (USB_HostIp3516HsTaskFunction) correctly see the device followed by the request to attach it

The attach ftn (USB_HostAttachDevice) sucessfully creates the device and control pipe

The driver (USB_HostIp3516HsWriteControlPipe) seems to send the GetDes8 message without error

BUT the callback ftn (USB_HostEnumerationTransferCallback) does not get a valid response

  status = 0xb (kStatus_USB_TransferFailed)...

I'm not sure why?

Thanks for your thoughts... Adrian.

0 Kudos
Reply

1,571 Views
FelipeGarcia
NXP Employee
NXP Employee

Hello Adrian,

 

What happens if you run the host_msd_fatfs example on your side? Does it work?

Have you tried to use a different USB stick?

 

Please make sure you leave JP10 open and JP9 placed in 1-2 for USB1 host and HS mode.

 

Best regards,

Felipe

0 Kudos
Reply

1,571 Views
anealca
Contributor II

Felipe...

Thanks for your help...

I had some issues on how I imported the SDK example which caused it to fail.

I re-imported the lpc54628 Host MSD FATFS with FreeRTOS example and was able to get it to work correctly.

This pointed out the issue I had with my code and I now have it running the Fat test and throughput examples.

thanks for your time.

This issue is now resolved.

0 Kudos
Reply

1,571 Views
anealca
Contributor II

Felipe Garcia...

I have taken the example into a project I have been developing and am able to detect insertion of a USB MSD device (Phillips 16GB)

The IP3516HS IRS detects the insertion and attempt to attach to the device

It send the GetDes8 request but the stick doesn't respond.

Not sure why?

USB_HostIp3516HsTaskFunction() see's USB_HOST_IP3516HS_EVENT_PORT_CHANGE followed by USB_HOST_IP3516HS_EVENT_ATTACH

Calls USB_HostAttachDevice() which successfully instantiates the device and pipe sending kStatus_DEV_GetDes8

Eventually calling USB_HostIp3516HsWriteControlPipe() to send the message

0 Kudos
Reply