cancel
Showing results for 
Search instead for 
Did you mean: 

STM32429 Discovery SATA communication.

Alex Amaral
Associate II
Posted on December 07, 2016 at 17:42

Hi all, I have the STM32f429 Discovery board and have been tasked with developing a SATA to USB converter from first principles as a university project. Does anyone know what the best course of action would be for communicating with a SATA drive from the discovery board? Any starting point would be greatly appreciated.

3 REPLIES 3
Posted on December 07, 2016 at 18:28

Very interesting task, but I'd ask your professor what they mean?  SATA is a very high speed serial bus, where the slowest version operates at 1.5GigaBits/sec.  There is no interface on the STM32F4 series of microcontrollers that could interface to this without and external controller.  Of course most of the existing controller chips have a SATA bus on one side, and USB on the other.  You could use one of these and read the SATA drive through the USB interface on your eval board, but it seems that this is the opposite of what has been assigned.  If they want you to build an external interface using an FPGA or some other logic to work with the SATA interface, that might be doable but rather impractical based on the existing chips that do this.

In any event a first step might be to look at the actual SATA specification documents, and perhaps at the data sheets of existing SATA to USB adapter chips.  They may at least give you an idea of what you need to do.  On the USB side, I would assume they want you to have the USB port on the chip act like a USB drive to the attached host system.  This is the inverse of some existing middleware provided by ST, which enables you to easily connect an external USB drive to your microcontroller.  again an interesting task.

If you go to the Wikipedia page on Serial ATA the references at the bottom should provide a good index as a start point.  This is a link to a pdf of the Rev 3.0 spec:

http://www.lttconn.com/res/lttconn/pdres/201005/20100521170123066.pdf

and here is a link to a data sheet of a TI chip that does what you are being asked to reinvent:

http://www.ti.com/lit/ds/symlink/tusb9260.pdf

Posted on December 07, 2016 at 18:34

Seems like an asinine project idea.

The transceiver and data rate are all working against you. Better to look at silicon from Marvell, Broadcom, etc.

IDE/ATAPI would be doable.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on December 07, 2016 at 20:30

Thanks for your reply, This is my second attempt at developing the SATA to USB interface which is actually only a small part of my project (which in its entirety is a data storage box running on something like a raspberry pi that allows interfacing with various storage media). My first attempt actually used the TUSB9260 that you mentioned but I live in South Africa and having a PCB for that tiny chip manufactured proved difficult, on top of that my professor was not happy about me using a commercial SATA specific bridge to implement this interface and suggested using an FPGA or DSP to do it more from scratch. 

At this point the throughput is not important, I was just curious if the STM32 could communicate with a SATA hard drive at all by using GPIO pins to manually send the SATA opcodes and data or if specific data rates are required for the hard drive to even acknowledge the commands (which obviously would be too fast for the stm32). Another option would perhaps be to connect the SATA drive to a PCIe adapter and interface that to the STM32 as I've come across a handful of projects that seem to use PCIe with these controllers.

I'm not very familiar with FPGAs and have no idea how I would implement FAT32 on an FPGA so decided to go the MCU/DSP route first but if it's not possible to manually communicate with a SATA device at slower data rates using GPIO or make use of the PCIe method then I suppose I'll have to look at an FPGA implementation. Just to make sure I understand you, were you thinking that the whole SATA to USB device should be implemented on an FPGA or just the SATA side and then interface with the STM32 to do the file handling and USB?

Thanks again, I know this project is impractical and redundant but its a design challenge more than anything, not a commercial product development project.