K27/K28 USB MSC Device examples

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

K27/K28 USB MSC Device examples

Jump to solution
1,967 Views
eldarfiring
Contributor III

Hi All,

I'm looking for good examples for developing USB Mass Storage Device using Kinetis K27/MCUXpresso 11.1.  The actual storage media is an eMMC chip using K27 SDHC interface (and FAT). We need to read out files from that eMMC chip to a PC or similar.  However, I can't get any of the K27 SDK USB/MSC device examples to function. When I connect the FRDM-28F to the Windows 10 PC, it reports an error (or nothing happens at all) :

Windows has stopped this device because it has reported problems. (Code 43)

A request for the USB device descriptor failed.

Just to verify the hardware, I downloaded the uTasker bootloader binary and flashed K27 using that. Windows then detected the disk drive immediately. Then I transferred the uTasker application using USB without any problems. 

Has anyone tried this using K27/MCUXpresso SDK 2.7/FRDM-28F ? 

I've built both Full speed and High speed versions with the same result. I think the FRDM jumpers are correct.

Any other suggestions ?

0 Kudos
1 Solution
1,665 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hi Eldar, 

Please download the SDK for the FRDM-K28F. Are you able to reproduce the behavior you mentioned before while using the examples from this SDK? 

Regards, 

Victor 

View solution in original post

0 Kudos
9 Replies
1,665 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hi Eldar, 

I'm a little confused. First, you mentioned uTASKER and then you mentioned the SDK. These are to completely different things. Could you please clarify whether you are using the SDK examples or uTasker? My understanding is that with uTasker everything is working fine and with the SDK you are facing some problems, am I correct? If so, could you please clarify what SDK examples you are using? 

Regards, 

Victor 

0 Kudos
1,665 Views
eldarfiring
Contributor III

Hi,

Yes, USB is working with uTasker, but not with SDK examples. I tested with uTasker just to verify that my FRDM-K28F hardware is working properly.  I would prefer to use the SDK examples as a starting point for my development task. 

I have tried usb_device_msc_ramdisk (bm + freertos) which have the 'USB device descriptor failed' mentioned above , usb_device_msc_sdcard (freertos)  crashed with  hardfault :

trace.PNG

Regards, Eldar

0 Kudos
1,666 Views
mjbcswitzerland
Specialist V

Eldar

I have just added a binary that shows also FAT on SD card together with USB-MSD to SD card (as well as emulated FAT as a second external drive):
https://www.utasker.com/kinetis/FRDM-K28F.html

Probably if you use the non-A version of the SDK the example will start working but the uTasker project gives smaller code size, is a complete solution (not just example) and allows complete simulation/development and testing in VisualStudio (as well as builds with MCUXpresso). In addition, projects developed for K28 (using USB, FAT, SD card, etc.) can run on i.MX RT parts (when more speed is required) without any development efforts - just one project define is enough to switch between the families!

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]



0 Kudos
1,666 Views
eldarfiring
Contributor III

Hi,

Thank you for your feedback Mark. The problem was the SDK I used.

I will look into the uTasker as well. 

Best regards, Eldar

0 Kudos
1,666 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hi Eldar, 

Thanks for the additional information! In the screenshot that you shared, I saw that you are using the SDK for the FRDM-K28FA. Could you please confirm that your FRDM actually has the revision A of the silicon? The following image shows the mask for the different versions of this chip. 

pastedImage_1.png

Regards, 

Victor 

0 Kudos
1,666 Views
eldarfiring
Contributor III

Hi Victor,

My FRDM-K28F is a couple of years old and have the MK28FN2M0VMI15, whereas the real board we are developing is using MK27FN2M0AVMI15. My intention is to have the USB/MSC working on the FRDM board first, as we have not tested the USB hardware on our real board yet. 

Best Regards,

Eldar

0 Kudos
1,666 Views
eldarfiring
Contributor III

So yes, the SDK I'v built is the 'A' version whereas the FRDM hardware is not. I thought they were binary compatible ?

0 Kudos
1,666 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hi Eldar, 

Please download the SDK for the FRDM-K28F. Are you able to reproduce the behavior you mentioned before while using the examples from this SDK? 

Regards, 

Victor 

0 Kudos
1,666 Views
eldarfiring
Contributor III

Hi Victor,

Thank you for pointing that out for me, the problem was the SDK version I used. It is now working for both FRDM-K28F (MK28FN2M0VMI15) as well as my target board (MK27FN2M0AVMI15).

Best Regards, Eldar

0 Kudos