TWR-K65F180M non-functional USB

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

TWR-K65F180M non-functional USB

819 Views
bartrijvers
Contributor III

We've ordered a TWR-K65F180M board to evaluate the USB mass storage speed for a project we need to do. We already have this evaluated on a K64F using the SD card FreeRTOS example and found the speed insufficient.

Loading the same example from the K65F SDK 2.0 (downloaded yesterday) into the K65F board does not do anything; my Windows 7 PC does not recognize any USB device being plugged in. It even turns out that any other USB example does not register any USB device in Windows.

All jumper settings are as the board arrived and we've tested some different settings with no results.

We also tried different micro-USB cables and tried on a different Windows 7 PC, all having no result at all.

The only mod to the board was flashing a JLink debugger into the bootloader.

I'm using Kinetis Design Studio 3.2.0 with all updates installed.

I could use help urgently...

0 Kudos
Reply
6 Replies

645 Views
bartrijvers
Contributor III

Using breakpoints I see that the USB0 interrupt is only fired when disconnecting the USB cable, not when connecting the cable...

0 Kudos
Reply

645 Views
bartrijvers
Contributor III

We 've got the example going when we switched from the default config KHCI to EHCI.

However, we cannot seem to get a higher transfer rate (read to Windows) than 1.2 MB/second from an SD card. Putting the SD card in a USB card reader gets 10 to 15 times better transfer rate.

This is for SD card FreeRTOS Mass storage example running in release mode (no debugger attached). The same example but bare metal does not improve this as also the Ramdisk example does not give much improvements.

I hope the CPU is capable of giving true High Speed transfer capability and there is a software bottleneck that can be resolved or we need to re-solder some resistor.

I'll try the utasker binary next.

0 Kudos
Reply

645 Views
cutworth
NXP Employee
NXP Employee

Hi Bart,

You can check the following community link about checking HS USB and SDHC performance with MK26 which is with the same family as K65. Though the test is made with KSDK1.2 code, but I think it should apply as well. 

https://community.nxp.com/message/552720?commentID=552720#comment-552720 

What I found is the internal receive and transfer buffer size can impact a lot for the actual transfer speed you get.

Hao

0 Kudos
Reply

645 Views
bartrijvers
Contributor III

Hello Hao, I've found the buffer sizes and increased it which provides a better transfer rate: 16 KB read buffer gives an average of 6,5 MB/second. This is more in the direction of what's desired but it also made me curious of what is the maximum possible.

By the way, the link is unavailable to me, I an unauthorized to visit (while logged in).

Looking at the post of Mark, we're not planning on having concurrent file system access so block SD card access may also provide some additional gain.

0 Kudos
Reply

645 Views
mjbcswitzerland
Specialist V

Hi Bart

The bottle-neck is generally the SD card itself. They are quite slow when accessed using sector reads (CMD 17). Block reads (CMD 18) speed things up (for reading and especially writing: CMD 25) by the sort of factor you are seeing with external readers.


Most code will be based on sector reads (for simplicity and reliability). The uTasker includes block writes as an option but it is not used on the Kinetis due to problems with its SDHC (in fact I never tried it, or block reads on the K65, where it may have been solved (?)).

For USB-MSD, block operations are suitable as long as no other accesses to the SD card can take place (eg. from other tasks which may be using the card as well). Multiple-users are not possible due to the fact that transfers cannot be paused as discussed in the following threads:


https://community.nxp.com/message/457706?commentID=457706#comment-457706
https://community.nxp.com/message/808281?commentID=808281#comment-808281

Regards

Mark
Kinetis for professionals: http://www.utasker.com/kinetis.html

0 Kudos
Reply

645 Views
mjbcswitzerland
Specialist V

Hi Bart

Try a binary from http://www.utasker.com/kinetis/TWR-K65F180M.html
to check that there are no USB HW problems.

Regards

Mark
Kinetis for professionals: http://www.utasker.com/kinetis.html

0 Kudos
Reply