IMXRT USB full-speed example?

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

IMXRT USB full-speed example?

2,031 Views
jackking
Senior Contributor I

I am working on a design that uses a USB isolator chip (ADuM4160) which does not support hi-speed USB. 

I would like to use the KHCI configuration for USB, but it seems that only the EHCI included files are configured properly for the IMXRT UsbType.  The KHCI includes are packaged in the latest MCUXpresso SDK.

Are there some examples for the IMXRT that use USB full-speed instead of hi-speed, or an easy way to convert them?

Thanks

0 Kudos
Reply
3 Replies

1,837 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jack

for configuring USB as only full-speed one can set bit 24 PFSC register PORTSC1 described in
sect.41.7.31 Port Status & Control (USB_nPORTSC1) i.MX RT1050 Reference Manual
https://www.nxp.com/docs/en/reference-manual/IMXRT1050RM.pdf

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,818 Views
Eric_bj_Kang
NXP Employee
NXP Employee

Hi Igor,
Thanks for your response.

I confirmed the operation to change the speed from High to Full.
For this, I just set the PFSC bit as "1".

For Detailed, refer to the below contents.

> Test Board : i.MXRT1050-EVK
> Test Project : evkbimxrt1050_dev_msc_sdcard_lite_bm
> Modified Register :
   - USB_nPORTSC1 register / PFSC bit
   - 0, High-Speed (default) / 1, Full-Speed
> Test Result, for High-/Full-Speed
   - i.MXRT_1050_02-5.3_USB.Full.Speed.Test_Test.Result.png

> Modified Source / Contents
   - source/disk_sdcard.c

int main(void)
{
   ...
   USB_DeviceApplicationInit();

   // check USB1->PORTSC1 value
   usb_echo("USB_PORTSC1(0x402E0184) / PSPD, bit.27-26 = 0x%0X \r\n", (uint32_t)(USB1->PORTSC1)); // 0x1C00.0004

   // force USB Port, as Full-Speed - Eric
   USB1->PORTSC1 |= USB_PORTSC1_PFSC(1); // 0 - High-Speed(default) / 1 - Full-Speed
   usb_echo("USB_PORTSC1(0x402E0184) / PSPD, bit.27-26 = 0x%0X \r\n", (uint32_t)(USB1->PORTSC1)); // 0x1D00.0004

   while (1)
   ...
}



Best Regards,
Eric.

1,730 Views
pedro_guilherme
Contributor I

This solution worked for me on i.MX RT 1020. Thanks!

Before:

pedro_guilherme_0-1613680470072.png

 After:

pedro_guilherme_1-1613680497219.png

 

0 Kudos
Reply