Author Topic: USB Device Mass Storage Class (eMMC over USB)  (Read 12931 times)

ramakrishna

  • Member
  • ***
  • Posts: 10
USB Device Mass Storage Class (eMMC over USB)
« on: August 21, 2014, 05:34:34 am »
Hi Jan,
           We are working on a project which requires eMMC interface over USB. We are using the Ti's AM335x Processor and  the bare metal Starter ware Software. The Ti's Starter ware USB Library has a MSC Device Class but they are using the Some part of the Main memory(ram disk) as a storage device. eMMC is Connected to the Processor using MMC interface. The Starter ware also has a MMCSD Library for SD Card access but they gave example through UART interface.
           We are newbies to the USB Programming, having a good knowledge on USB Protocol and Enumeration. We would like confirm our approach for achieve this task.

1.The Host PC will communicate the MSC Device through SCSI Commands & Responses.
2.The firmware on AM335x will translate the SCSI Command set to MMC Specific Commands and MMC Specific Responses to SCSI Responses.
3.Is this task is achievable in AM335x which has both USB and MMC interaface ?

4.Is that firmware available for any controllers or processors to achieve above mentioned task?


          Please guide us in the Proper direction.

Thanks & Regards
Rama Krishna

                    

Tsuneo

  • Frequent Contributor
  • ****
  • Posts: 145
Re: USB Device Mass Storage Class (eMMC over USB)
« Reply #1 on: August 21, 2014, 09:53:20 am »
Hi ramakrishna,

You are completely right on the track.

I believe it wouldn’t take a half an hour to do your task,
because the USB MSC device code in the library well abstracts media access APIs,
also because the library has MMC APIs for FatFS.

Fill the routine body of media access APIs in usbdmscglue.c, using corresponding routines in fat_mmcsd.c

C:\ti\AM335X_StarterWare_02_00_01_01\examples\beaglebone\usb_dev_msc\usbdmscglue.c
C:\ti\AM335X_StarterWare_02_00_01_01\third_party\fatfs\port\fat_mmcsd.c

That’s all.

Tsuneo

ramakrishna

  • Member
  • ***
  • Posts: 10
Re: USB Device Mass Storage Class (eMMC over USB)
« Reply #2 on: August 22, 2014, 12:54:56 am »
Hi Tsuneo,
                 Thanks for your valuable suggestion.We will go with the approach.

Thanks & Regards
Rama Krishna

Tsuneo

  • Frequent Contributor
  • ****
  • Posts: 145
Re: USB Device Mass Storage Class (eMMC over USB)
« Reply #3 on: August 24, 2014, 03:49:14 am »
I didn’t answer to your last question,

Quote
4.Is that firmware available for any controllers or processors to achieve above mentioned task?

You may pick up any USB MCU, from 8bit to 64bit. MCU manufacturers provide USB device libraries / examples, which include MSC as the standard. Also SD card example over SPI or dedicated SD card interface.

- Atmel Studio
http://www.atmel.com/tools/atmelstudio.aspx
- Cypress PSoC
http://www.cypress.com/psocsoftware/?source=CY-ENG-HOMEPAGE&medium=Body-Products
- Freescale Processor Expert
http://www.freescale.com/webapp/sps/site/homepage.jsp?code=BEAN_STORE_MAIN&tid=SWnT
- Microchip Library for Applications, and Harmony
https://www.microchip.com/pagehandler/en-us/devtools/mla/home.html
https://www.microchip.com/pagehandler/en_us/devtools/mplabharmony/home.html
- NXP LPCOpen
http://www.lpcware.com/content/nxpfile/lpcopen-platform
- SiLabs Simplicity Studio
http://www.silabs.com/products/mcu/Pages/simplicity-studio.aspx
- ST STM32Cube
http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF259242?sc=stm32cube
- Ti's Starter ware apparently share its library code with TI Stellaris-/ Tiva-Ware
http://www.ti.com/tool/sw-tm4c?DCMP=tivac-series&HQS=tivaware
- TI MSP430Ware
http://www.ti.com/tool/msp430ware
etc.

Also middle-ware from Keil, IAR, etc. covers many USB MCUs.

Tsuneo

ramakrishna

  • Member
  • ***
  • Posts: 10
Re: USB Device Mass Storage Class (eMMC over USB)
« Reply #4 on: November 11, 2014, 08:04:51 am »
Hello Tsuneo,
                       We are succeeded after changes what u have mention in the starterware package.All is set well, but the through put is around 200KBps.We run the same code with RAM disk as a mass storage,the speed is around 12.5MBps.The eMMC runs at 26Mhz and the bus width of interface is 4 bit.The AM335x processor runs at 600Mhz.Please suggest how to increase the throughput?


Thanks & Regards
Rama Krishna