Need USB Mass Storage on FRDM-KL25Z Platform

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

Need USB Mass Storage on FRDM-KL25Z Platform

2,264 Views
nicknax
Contributor II

I'm looking for a working example of an USB MSD on the FRDM-KL25Z platform, using CW for MCU v 10.5 and Freescale USB Stack 4.1.1.

The bundled example below compiles, but a block write to the device returns a success code (# of bytes written) while subsequent readbacks show that the contents remain unmodified.

C:\Freescale\Freescale USB Stack v4.1.1\ProcessorExpert\Examples\Device\MSD\USB_MSD_DEVICE_MKL25Z128_PEx\.cproject

I think the example is a bit suspect because it only creates a 1024-byte (2x 512 byte block) disk.  I've tried larger RAM sizes, but the original problem of "pretending to write" remains.

5 Replies

1,007 Views
mjbcswitzerland
Specialist V

Nick

Are you requiring host (eg. connecting a memoery stick to the board) or device mode (looking like a disk drive to a PC)?

If a device, what storage medium are you using/going to use? I would expect that this will need at least a few kbytes of disk space for the PC to be able to do anything with it (for boot sector, FAT and cluster space), so maybe the example (with very little space) is not designed to do more that show the enumeration(?). {Often an SD card would be added via SPI for decent file system space}

Regards

Mark

1,007 Views
nicknax
Contributor II

Hi Mark,

The second option - no hosting and no OS.

The cited example seems completely broken, but it could be something I'm doing wrong - do you have a Freedom board to try it?

0 Kudos

1,007 Views
mjbcswitzerland
Specialist V

Nick

Yes, I have a feedom board. At the moment I still don't see the use of USB-MSD device without enough memory to operate a FAT in unless the FAT is being emulated (as performed by boot loaders).

I haven't used the USB Stack 4.1.1 but instead the uTasker USB stack - there is a USB-MSD loader for the freedom boards at µTasker Test Software and Demos in case that could help checking that your board operates correctly.

Regards

Mark

1,007 Views
nicknax
Contributor II

Mark,

Thanks for the example, however, I would like to stay with the bare-metal example provided in the USB Stack 4.1.1 bundle.

I filed a technical service request a week ago, but the support tech just says "But I am sure that the original MSD USB Stack examples work fine".

I gues that's all I'm asking is if anyone can confirm that indeed

C:\Freescale\Freescale USB Stack v4.1.1\ProcessorExpert\Examples\Device\MSD\USB_MSD_DEVICE_MKL25Z128_PEx\.cproject

"works fine" on a FRDM-KL25Z board.

Nick

0 Kudos

1,007 Views
mjbcswitzerland
Specialist V

Nick

It sounds as though you have received the answer already from the people who know ;-)

Regards

Mark

0 Kudos