Kinetis USB HS Details

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

Kinetis USB HS Details

762 Views
mjbcswitzerland
Specialist V

Hi All

After almost completing a development with the high speed USB device in a K70 I am wondering whether anyone knows the answer to the following two questions:

1. I didn't find it possible to send data directly from Flash.The USB OTG (full speed) device can do this when its bus master is given read rights in the flash controller (bus master 4 for K70) but the HS USB module doesn't have a bus master number. Can it be done?

2. I did some testing with single receive buffers for OUT pipes and the SDIS setting in the USBMODE register.

The SDIS (stream disable) causes a NYET to be returned to every OUT so that the USB host doesn't send more than a single OUT packet before the device has confirmed that its buffer is free.

However, whenever the host sent long bulk data blocks (eg. 4k of data as 8 x 512 OUT frames), each waiting until the following PING was acked, the data buffer error status was raised - meaning that there has been a data buffer overflow. In the test case of 4k blocks with 8 OUTs only 4 OUTs were actually received.

I don't however actually see which buffer is overrunning in this case since NYET/PING handshaking is operating correctly. Any explanations?

Regards

Mark

Labels (1)
Tags (1)
0 Kudos
3 Replies

353 Views
mjbcswitzerland
Specialist V

Hi All

Through trial and error it has been found that the the USB HS controller is bus master 6 and so can access flash if bus master 6 rights are set to allow it.

This details is missing in the lastest user's manual (as of today Rev. 2).

Regards

Mark

0 Kudos

353 Views
Monica
Senior Contributor III

Mark,

thanks a lot for this valuable observation.

I'll be sure to pass this along and get the Users Manual updated.

Really appreciate it, thanks for contributing!

Kind regards.

0 Kudos

353 Views
mjbcswitzerland
Specialist V

Hi All

To point 2 I would summarise that bulk endpoints generally need to operate with the ZLT bit set in their capability register configuration to avoid difficulties with the driver not getting a interrupt for data packets exactly fitting into their reception buffer (512 bytes for example) and subsequent over-runs that take place. WIth the ZLT bit set the handshaking is all as expected.

Based on this I could complete CDC, MSD and HMI class operations.

Regards

Mark

0 Kudos