Interfacing a USB hard disk

39 views
Skip to first unread message

deepak

unread,
May 25, 2012, 2:41:26 AM5/25/12
to BRTOS
Hi

I needed to understand what all is required to interface a hard disk
to a embedded system.

I am trying to interface 100 GB hard disk to a Kinetis k60 tower . I
get enumeration but says that failed to load file system.


This i have tried with MQX and now i want to try with BRTOS, will the
hard drive work with BRTOS ??

Thanking you

Deepak

Carlos Henrique Barriquello

unread,
May 27, 2012, 10:25:29 AM5/27/12
to br...@googlegroups.com
Hi Deepak,

By your question, I suppose you trying to use USB to interface the hard disk. 

As fair as I know, nobody has tried this before.

However, it should work fine, as the USB driver is a Freescale implementation, and the FAT file system is a generic implementation by Chan (http://elm-chan.org/fsw/ff/00index_e.html). Also, both has been used in BRTOS projects with success.

Best luck,
Carlos


Deepak

--
Você está recebendo esta mensagem porque se inscreveu no grupo "BRTOS" dos Grupos do Google.
Para postar neste grupo, envie um e-mail para br...@googlegroups.com.
Para cancelar a inscrição nesse grupo, envie um e-mail para brtos+un...@googlegroups.com.
Para obter mais opções, visite esse grupo em http://groups.google.com/group/brtos?hl=pt-BR.


Alexandre Panosso Vieira

unread,
May 27, 2012, 5:28:32 PM5/27/12
to br...@googlegroups.com

I can tell guys that I worked on the past with ELM FatFs Generic lib and it  was a litle mass at the biginning, and the mean problem was related to the times


I was interfacing a SD card with BRTOs in a ARM project, and as far we could understand, the libs does not handle properly with OS interrupt signals  (or something related to this) . For that we have got a lot of corrupted files and every sort of no cense writes !

 

The solution we found was to construct a kind of FIFO (using a EEPROM on the board) and we perform the writes and reads of SD Card using the FatFs lib commands when nothing more was able to interrupt the processes . . . we made something like a MUTEX that enable the product to run !

 

I will look fo the files, or at least the notes we made about it, and if I find I can post you then ! (sorry, but I got no to mutch holpe on it !)

 

 

regards

Panosso(BR)

Gustavo Denardin

unread,
May 27, 2012, 7:04:02 PM5/27/12
to br...@googlegroups.com
Hi all,

Alexandre, this is a little bit strange. We already used the FatFS library + BRTOS with several microcontrollers and it always work. We never ever had a problem when writting to SD cards.

Are you sure that you used the timer function of the FATFS in a BRTOS task or interrupt? This function must be called each 10ms.

      ///////////////////////////////////////////////////
      ///   FatFS Timer Handler                      
      ///////////////////////////////////////////////////
      disk_timerproc();
      ///////////////////////////////////////////////////  


About your problem Deepak, there are two ways to interface a hard disk with a microcontroller: USB and IDE connection. There are several projects that have implemented IDE hard disk communication (PIC, 8052, etc). However, we never implemented anything like that in the BRTOS project. I know that is possible, but you must search on the web how to do it. I beleive you must replace the SPI/SD code (that makes the memory block access) by the IDE code.
Some sites you can consult:

If you intend to make USB communication could be a little bit simpler. However, we used the Freescale MSD class to interface a SD card through USB (mass storage device) and faced some problems with more than 4GB SD cards. This is all i know for the moment.

Best regards,
Gustavo


2012/5/27 Alexandre Panosso Vieira <pan...@gmail.com>
Reply all
Reply to author
Forward
0 new messages