FRDM-K28F USB mass storage controller example application - cannot format

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

FRDM-K28F USB mass storage controller example application - cannot format

1,361 Views
aptron_chad
Contributor II

I have tested the USB mass storage device example application on a brand new FRDM-K28F board using MCUXpresso and the latest SDK download.

When I connect the USB device port on the board into my PC Windows shows it as a drive , but the asks if I want to format the drive.  Windows then indicates it cannot format the drive.

has anyone tested the mass storage device usb example for this board and has seen similar or different behavior?

My goal eventually is to use the SDRAM on this board and map it to the USB mass storage driver as a preformatted  RAM disk of size 4 to 8 Megabyte, would that be possible?

0 Kudos
5 Replies

1,093 Views
andrewfisher
Contributor III

Hi Chad,

I have been doing something very similar. I am using MCUXpresso 10.0.2. on OSX. The problem I found with the frdmk28f_usb_examples_usb_device_msc_ramdisk_bm example is that the disk created in the example is simply too small to hold a filesystem. If you go into disc.h and change the size like this: 

#define TOTAL_LOGICAL_ADDRESS_BLOCKS_NORMAL (240U)

It then gives you a 120k byte disk which just about works (at least for a Mac file system).

I have then moved on to using SDRAM but so far have found that I cant make the USB dump directly into SDRAM. It immediately crashes, I do not yet know why. My current working scheme is based on  frdmk28f_usb_examples_usb_device_msc_sdcard_freertos with the calls to write to the SDCARD replaces with memcpy. I'd much rather get the data going direct to DDR but at the moment that doesn't work.

0 Kudos

1,093 Views
aptron_chad
Contributor II

correction there is a driver example   frdmk28f_driver_examples_sdramc

0 Kudos

1,093 Views
aptron_chad
Contributor II

Hi Andrew,

changing TOTAL_LOGICAL_ADDRESS_BLOCKS_NORMAL  to (240U) didn't yield positive results for me though I did see the format disk dialog in File Explorer mention a capacity of 120K once. 

Regarding mapping to SDRAM that would be ideal, even better if it could present as a preformatted volume . the question I would be asking is the SDRAM properly setup with the io mapping and the SDRAM itself. There is no driver / demo code that proves SDRAM operation that I can see in sdk2.2.0.

0 Kudos

1,093 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi, Chad


What IDE do you use? If you use MCUXpresso 10.0.x, there may be have some unknow problem on this  project. You can update to 10.1.0. I have tested it, and it seems ok. I have also teseted by KEIL and IAR, the project is ok. So if  the problem is still there, it may caused by your computer. You can download the firmware and try it on other computer.

Regards

Jing

0 Kudos

1,093 Views
aptron_chad
Contributor II

Hi Jing, 

I have tried recompiling using MCUxpresso 10.1.0. and TOTAL_LOGICAL_ADDRESS_BLOCKS_NORMAL (48U) the FRDM-K28F sdk version is 2.2.0 . Windows is unable to format it. i have tried it on 2 machines running windows 10.

0 Kudos