This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EK-TM4C1294XL: Utilizing internal flash as a USB mass storage device

Part Number: EK-TM4C1294XL

Hello,

I've been looking for information on enumerating a tm4c device's internal flash memory (I'm currently using EK-TM4C1294XL) as a USB mass storage device. I've seen the usb_dev_msc example for the DK-TM4C129X that uses Quad SPI Flash for the storage medium, but I haven't seen anything for the internal flash. The motivation would be to have a bootloader that enumerates the internal flash as a usb drive on the host computer and the user could simply drag and drop a new firmware .bin file onto the drive and the device would write the new application to the internal flash. Basically, it would be like the usb_stick_update example but using the tm4c device as a usb device as opposed to a host.

I've started by porting the usb_dev_msc example to the EK-TM4C1294XL in CCSv7 by altering the pinout and commenting out calls to everything graphics related and the SPI flash. So far the device enumerates as a mass storage device in the device manager, shows up as a drive in windows explorer, but a Windows popup says "You need to format the disk in drive E: before you can use it." I hesitate to throw caution to the wind and allow Windows to format it as a FAT file system in case it has unintended consequences.

I think my question is twofold, firstly is my goal of having the internal flash as a usb msc device for firmware updates possible? And if it is possible like I think it is, what specifically could be needed to "format the disk" properly (or trick Windows into thinking it's formatted correctly)? 

Just for the sake of giving additional information, I am using TivaWare_C_Series-2.1.4.178.

Thanks,

Luke

  • Hello Luke,

    We have not tried to use the TM4C internal flash memory for USB mass storage before.

    For Windows to think the disk is formatted right, it would need to seem to be something like FATFS formatted to Windows. Also while I agree you shouldn't let Windows try and format it, I really don't think it even could do so - I'd be surprised if Windows knew how to format Flash in a TM4C...

    We have not attempted to use the internal flash for FATFS format, so it is not clear how this might be accomplished. You would need to investigate the FATFS format and see how to incorporate this. Using this for a bootloader might complicate the matter further as well... depending on what the FATFS format requires, you may need to dedicate a portion of flash for it. That would then limit your application space even more as you'd need a FATFS section of flash, the bootloader, and then your application code.

    Whether this is feasible will ultimately depend on what you uncover about FATFS formatting and how much space you need for applications.