Force K60 USB HS OTG port to FS

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

Force K60 USB HS OTG port to FS

768 Views
Sebster
Contributor II

Hi NXP,

I have a customer that has a similar question as in Post: 453444. However my customer is using a K60 (not a K66). His board has a Microchip USB PHY (USB3300) which is connected to the HS OTG port of the K60. The other USB port of the K60 is the FS Host port which is connected to a printer (FS).

He has a PC connected to the Microchip USB PHY (USB3300). 

He is using MQX 4.1 Stack.

The issue he is having is the following:

  1. Some printers (connected to the host FS USB port of the K60) do not enumerate properly
  2. On the K60 USB device port connected to the PC they set the stack for port speed FS.
    1. Protocol Analyzer indicates that PC to K60 USB Device stacks are HS (this is not true!)
    2. Is it possible to FORCE the K60 "Device" port (connected to the PC) to FS?
  3. The PC identifies the K60 USB Device Stack has a HUB
    1. Runs "split" commands
    2. Assumes that the devices behind the HUB are FS, and HUB is HS
    3. Why is this happening?
  4. They are using MQX. And the customer forces in register USBHS_PORTSC1 bit: 24: Port Force Full-Speed Connect  = 1.
    Question: 
    Could you tell me if this register is overwritten somewhere else? If not why is the K60 enumerating to HS with the PC?

Thanks

Seb

0 Kudos
Reply
1 Reply

507 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Sebster

Under device mode, the USBHS port is fully compatible with full speed / high speed operation via an external ULPI tranceiver, it will negotiate as full speed when you connect it to a full speed, so I am a little confused why this behaviour can't work for your project.


The MQX bsp drivers do not have special configuration options for speed restrictions.

Please refer to the following code for usb configuration with ULPL.


        MPU_CESR &= ~MPU_CESR_VLD_MASK;        //Enable clock to the module
        SIM_SCGC6 |= SIM_SCGC6_USBHS_MASK;        SIM_CLKDIV2 |= SIM_CLKDIV2_USBHSFRAC_MASK | SIM_CLKDIV2_USBHSDIV_MASK; // Divide reference clock to obtain 60MHz
        SIM_SOPT2 &= ~SIM_SOPT2_USBHSRC_MASK;  // MCGPLLCLK for the USB 60MHz CLKC source
        SIM_SOPT2 |= SIM_SOPT2_USBHSRC(1);     // MCGPLLCLK for the USB 60MHz CLKC source        PORTA_PCR7 = PORT_PCR_MUX(2);   //ULPI DIR
        PORTA_PCR8 = PORT_PCR_MUX(2);   //ULPI NXT
        PORTA_PCR10 = PORT_PCR_MUX(2);  //ULPI DATA0
        PORTA_PCR11 = PORT_PCR_MUX(2);  //ULPI DATA1
        PORTA_PCR24 = PORT_PCR_MUX(2);  //ULPI DATA2
        PORTA_PCR25 = PORT_PCR_MUX(2);  //ULPI DATA3
        PORTA_PCR26 = PORT_PCR_MUX(2);  //ULPI DATA4
        PORTA_PCR27 = PORT_PCR_MUX(2);  //ULPI DATA5
        PORTA_PCR28 = PORT_PCR_MUX(2);  //ULPI DATA6
        PORTA_PCR29 = PORT_PCR_MUX(2);  //ULPI DATA7
        PORTA_PCR6 = PORT_PCR_MUX(2);   //ULPI CLK
        PORTA_PCR9 = PORT_PCR_MUX(2);   //ULPI STP


This code is from _bsp_usb_io_init function\Freescale_MQX_4_1\mqx\source\bsp\twrk60f120m\init_gpio.c


To force the speed to FS only, software should set the PFSC bit (bit 24) in the PORTSC register during USB controller init and prior to setting the RS bit in the USBCMD register (start controller), The port will than work in full speed only.


Another option, pay attention on bcdUSB field (USB spec Release Number - if set for 1.1 the host will not try high speed

I hope it helps


Have a great day,
Daniel

-----------------------------------------------------------------------------------------------------------------------
Note: If this post is helpful, please click the Correct Answer button or helpful. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply