USB Memory Stick Issue with AN4368 USB MSD Host Bootloader

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

USB Memory Stick Issue with AN4368 USB MSD Host Bootloader

Jump to solution
2,963 Views
Vagni
Contributor IV

On my K60-based custom board I added the MSD Host Bootloader porting the AN4368 source code.

The USB Host Bootloader is working properly, but I have an issue relating to USB memory sticks with size 4GB and over: the image.S19 file is found only on about 25% of different memory sticks with that size. However, the device attachment and detachment is always properly detected by the bootloader.

MS Windows formats those memory sticks with FAT32 by default and FAT32 should be the FAT type supported by the bootloader's file system.

Since I get no issue with USB memory sticks with size less than 4GB (2GB, 1GB, ... up to an old 32MB memory stick!!!), that MS Windows formats with FAT by default, I have tried to format the 4GB or 8GB memory sticks with FAT: but I get the same issue.

Since it is now difficult to buy new USB memory sticks with size less than 4GB, my issue's severity has become very high for my application.

Is it a bootloader file-system issue?

0 Kudos
1 Solution
1,452 Views
Vagni
Contributor IV

Hello Heather,

I had to make a Service Request to the technical support about that issue.

Then I received a new version of the code and this is working much better.

See the attached zip file.

Bye

View solution in original post

0 Kudos
9 Replies
1,452 Views
Vagni
Contributor IV

I hope AN4368 will be soon updated with USB stack 4.1.1, CW 10.6 and KDS 2.0.0 (using GNU GCC compiler).

For my last project with K60FN1M0 cpu (1MB FTFE flash memory) I tried the porting, but I got too many compiler issues.

From TWR-K70 MSD HOST Bootloader based on AN4368 source code and AN4368 USB Host Bootloader bugs when using gcc tools I finally got a properly working USB MSD Host Bootloader with CW 10.6, but still with USB stack 4.0.2 and the old CodeWarrior compiler.

Alessandro

0 Kudos
1,452 Views
ARQuattr
Contributor IV

Alessandro, have you found a solution to your issue with large USB drives?  I'm having similar issues.  When you said the updated project code worked better, do you mean it allows reading larger USB drives?

Thanks

Angelo

0 Kudos
1,452 Views
Vagni
Contributor IV

Hi Angelo,

Yes, the new code version solved my issue with USB drivers larger than 4GB.

In the last version of my USB MSD Host Bootloader for CW 10.6 Freescale ARM

Compiler on a Kinetis K60N512 cpu I also updated the FatFs file system code

version from the original R0.08a (the FatFs current version is R0.12).

In the last months, starting from that code, I developed an SD/USB

MSD/DataFlash bootloader on a Kinetis K66F180 cpu with KDS 3.1.0 + PEx +

KSDK 1.3.0 in OSA BareMetal mode using FatFs R0.11a and till now I got no

issue with SD cards or USB MSD drivers 16/32 GB sized.

Regards,

Alessandro

Da: ARQuattr

Inviato: martedì 28 giugno 2016 20:39

A: Alessandro Vagniluca <alessandro.vagniluca@vaber-hs.it>

Oggetto: Re: - USB Memory Stick Issue with AN4368

USB MSD Host Bootloader

<https://community.freescale.com/resources/statics/1000/35400-NXP-Community-

Email-banner-600x75.jpg> NXP Community

USB Memory Stick Issue with AN4368 USB MSD Host Bootloader

reply from Angelo Quattrociocchi

<https://community.nxp.com/people/ARQuattr?et=watches.email.thread> in

Kinetis Microcontrollers - View the full discussion

<https://community.nxp.com/message/806667?et=watches.email.thread#comment-80

6667>

0 Kudos
1,452 Views
christianwalter
Contributor I

Dear All,

If you are using this codebase with CW 10.6 the alignment of the bdt buffer (khci_kinetis.c) does no longer work (at least for me). I had to change the code to

//#pragma data_alignment=512

uint_8 bdt[512] __attribute__ ((aligned(512))) = { 1 };

Christian

0 Kudos
1,452 Views
Ali2006
Contributor II


Hello Alessandro,

Were you able to solve the issue?

I have a similar problem.. though not entirely size related.. I have 4 USB sticks.. two work and two do not.  They are all over the map as far as size goes.. Only thing I can see that is different is that the ones the don't work when plugged into my computer show USB DISK 2.0 USB Drive in the hardware properties and the ones that do work show something different.. Either Staples Relay UFD USB Device.. or Flash Drive UT_USB20

Also.. Does any know if going to 3.8.1 solves these issues.. or if the code from 3.8.1 can be placed into a 3.8 environment to make things work.. I've seen on the board people complaining about 3.8.1 and I really don't want to brake anything if I don't have to..

Thanks for you help

0 Kudos
1,453 Views
Vagni
Contributor IV

Hello Heather,

I had to make a Service Request to the technical support about that issue.

Then I received a new version of the code and this is working much better.

See the attached zip file.

Bye

0 Kudos
1,452 Views
Angelillo
Contributor III

Hi Alessandro,

In my bootloader based on USB_MSD_Host_bootloader (AN4368) I have many problems with pendrives over to 4 GB. I have downloaded USB_MSD_Host_bootloader_rev2.zip but although I compare both revisions I don't see which are the differences between them. Can you say me these differences, please?

Thanks a lot in advance,

Ángel G.

0 Kudos
1,452 Views
Angelillo
Contributor III

Hi, Alessandro,

I'm sorry. Now, I'm seeing these many differences (for example, file "diskio.c"). I'm going to upgrade my Host Stack USB with this new revision. Thank you,

Ángel G.

0 Kudos
1,452 Views
foo86
Contributor I

Hello Angel

Did the Revision 2 of AN4368 USB MSD Host Bootloader solve your problem?

Best Regards

Martin

0 Kudos