EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

ATA host to SATA disk adapter nightmares

Started by Dimiter_Popoff June 20, 2014
David Brown <david.brown@hesbynett.no> writes:
>On 21/06/14 02:53, Dimiter_Popoff wrote: >> I am trying to start using SATA drives in a system with a SOC >> chip which only has parallel ATA.
>I may be asking the obvious, but is it not possible just to continue >using PATA drives? They are seldom as big as SATA drives, and cost a >little more, but it's not long since I last bought some (as reserve >drives for old PC's).
I'd go a different way. Why not a Disk-on-module with a PATA interface? http://www.integralmemory.com/product/integral-pata-dom-pata-flash-module is one example. I'm sure you'd find others, such as http://www.amazon.com/128GB-KingSpec-2-5-inch-SM2236-Controller/dp/B0091T4ZWU and having a 2.5" to 3.5" adapter is a passive pinout changer, not electronics. Granted, it probably is a higher cost than a spinny disk, but if we are talking one-offs, your time alone put into this is probably long past the point of return, if you can get 128GB for $126. -- Doug McIntyre doug@themcintyres.us
On 22.6.2014 &#1075;. 23:12, Theo Markettos wrote:
> Dimiter_Popoff <dp@tgi-sci.com> wrote: >> The chip is meant to do both ways but it is wired as >> host ATA -> device SATA. That with a female connector.... and no >> series termination at least on the control signals, IORDY at >> the very least. Not that it was much help when I put them though, >> but it was noticeable, the problem was halved (if not better), >> still no good though. > > Did they work in a PC? That's the first test for any kind of 'consumer' > kit. If not, they're junk. If so, you're doing something wrong (or their > idea of 'working' is narrower than yours).
Never tried, the only PC I have here is a laptop dedicated to browsing, reading datasheets etc. I have a USB to ATA box, but it has a 2mm pitch connector, that would mean more pain and at the end of the day what I am after is a part working within my devices, not on a PC. I expect to have it work just like I have had many other devices work, ATA, SCSI, without ever using a wintel PC.
> Did you try multiple drives, from different manufacturers?
No, just one SATA drive. But all 3 worked fine over the SATA link, they have a LED saying "SATA link OK" and it is stable on. Then the issue I have is an ATA issue, cable CRC error (UDMA transfers do CRC over the cable), and it goes away if I lower the speed to 25 MB/S on one of the 3 "identical" units I have.
> Again, > implementation may vary. I remember an issue with WDC drives in the early > 1990s - they wouldn't respond unless you called the SET CAPACITY command > with the size reported by the IDENTIFY information. I have no idea why they > were that dumb, but maybe all BIOSes at the time just did that. > (This might have been the 'implement just enough firmware until Windows > boots, then ship' school of firmware development).
Oh earlier ATA drives may well have been that bad, I switched to ATA around 2000 - when the 2.5" SCSI drives disappeared (they stopped at 810 megabytes).
> > It sounds like getting the soldering iron out is probably not a good first > step. Check them in the environment they're intended for first (booting > Windows) and build up from there.
Well I want them to work in my environment, I don't really care if they work elsewhere. Given that everything else I have tried (several brands) there is no need really to test it again - and I am quite sure they will fail miserably doing anything other than slow PIO in any environment, I know that much about them already.
> If you're putting the chip on the board then the Marvell chip probably makes > more sense: I'd trust Marvell more with security of supply than outfits who > will probably shift production to (say) USB3 to SATA converters once the > PATA market declines. > > Theo >
Yes, from your feedback - and from what stories I have read on the net written by consumer people who have less understanding of what is going on than we here do - it seems the Marvell chip is the way to go. I should be able to route it on my board the way it is routed on an adaptor (I know they'll never let a datasheet out, beats me why but this is how the PC industry works). Dimiter ------------------------------------------------------ Dimiter Popoff, TGI http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/
On 23.6.2014 &#1075;. 00:33, Doug McIntyre wrote:
> David Brown <david.brown@hesbynett.no> writes: >> On 21/06/14 02:53, Dimiter_Popoff wrote: >>> I am trying to start using SATA drives in a system with a SOC >>> chip which only has parallel ATA. > >> I may be asking the obvious, but is it not possible just to continue >> using PATA drives? They are seldom as big as SATA drives, and cost a >> little more, but it's not long since I last bought some (as reserve >> drives for old PC's). > > I'd go a different way. Why not a Disk-on-module with a PATA interface? > > http://www.integralmemory.com/product/integral-pata-dom-pata-flash-module > > is one example. I'm sure you'd find others, such as > http://www.amazon.com/128GB-KingSpec-2-5-inch-SM2236-Controller/dp/B0091T4ZWU > > and having a 2.5" to 3.5" adapter is a passive pinout changer, not electronics. > > Granted, it probably is a higher cost than a spinny disk, but if we > are talking one-offs, your time alone put into this is probably long > past the point of return, if you can get 128GB for $126. > > >
Oh sure I could use any ATA part available, but the future 5-10 years it will be SATA with ATA declining and probably disappearing altogether, so have to switchh to SATA. This is not a one-off by any means, we have sold netmca units in 5 different countries so far and we expect to grow. Dimiter ------------------------------------------------------ Dimiter Popoff, TGI http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/
Op Sat, 21 Jun 2014 02:53:26 +0200 schreef Dimiter_Popoff <dp@tgi-sci.com>:
> I am trying to start using SATA drives in a system with a[MPC5200B] > which only has parallel ATA.
Out of curiosity: why not use PCI or USB? Would that require a big software effort? -- (Remove the obvious prefix to reply privately.) Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
Dimiter_Popoff <dp@tgi-sci.com> wrote:

> I am trying to start using SATA drives in a system with a SOC > chip which only has parallel ATA.
Why not using a CF Card? They are IDE compatible and you need only a connector adapter (no active component involved): <http://www.dx.com/p/compact-flash-cf-flash-memory-card-to-2-5-ide-pata-hard-drive-adapter-card-19494#.U6gy8xbbzJg> Bye Jack -- Yoda of Borg am I! Assimilated shall you be! Futile resistance is, hmm?
On 23/06/14 14:30, Boudewijn Dijkstra wrote:
> Op Sat, 21 Jun 2014 02:53:26 +0200 schreef Dimiter_Popoff <dp@tgi-sci.com>: >> I am trying to start using SATA drives in a system with a[MPC5200B] >> which only has parallel ATA. > > Out of curiosity: why not use PCI or USB? Would that require a big > software effort? >
The processor he has only supports USB 1.1, which would be very slow here. I don't know off-hand if it supports PCI, but no disks support PCI (though a PCI SATA controller might be a possibility). Some SSD's have PCIe interfaces, which is a different thing.
On 23.6.2014 &#1075;. 15:30, Boudewijn Dijkstra wrote:
> Op Sat, 21 Jun 2014 02:53:26 +0200 schreef Dimiter_Popoff <dp@tgi-sci.com>: >> I am trying to start using SATA drives in a system with a[MPC5200B] >> which only has parallel ATA. > > Out of curiosity: why not use PCI or USB? Would that require a big > software effort? > >
As David said, USB would be too slow. PCI is an option but would mean routing another 20+ signals to where now the ATA buffers are on the board; replacing the four 24 pin, 0.5mm pitch lvxwhatever245-s with a tqfp64 would be quite easy to do. Then a PCI <-> ATA adapter chip would likely be harder to get, these ATA <-> SATa convertors are commodity stuff and some of them must work; replacing 4 MSOP (not sure what they are called) 24 buffers with a single tqfp64 is a design improvement in my book. As long as the tqfp64 works, that is :D . Dimiter ------------------------------------------------------ Dimiter Popoff, TGI http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/
Dimiter_Popoff <dp@tgi-sci.com> wrote:
> Never tried, the only PC I have here is a laptop dedicated to browsing, > reading datasheets etc. I have a USB to ATA box, but it has a 2mm pitch > connector, that would mean more pain and at the end of the day what I am > after is a part working within my devices, not on a PC. > I expect to have it work just like I have had many other devices work, > ATA, SCSI, without ever using a wintel PC.
I've gained long and bitter experience with such 'consumer products'. I might write more on the subject at some point, but suffice it to say you can't treat them the same as a $500 purchase from a big-name store. They were $5 including shipping from China, sometimes they just don't work. You have to treat such purchases probabilistically, which is a different way to approach them. A pile of research will improve the odds, but at the end of the day you have to take the risk. Generally I'm winning in my 'gambling', but that's what it is. It is not the kind of thing you buy if you want a steady, reliable supply chain. But you can win the game if you're prepared to play. Theo
On 28.6.2014 &#1075;. 01:24, Theo Markettos wrote:
> Dimiter_Popoff <dp@tgi-sci.com> wrote: >> Never tried, the only PC I have here is a laptop dedicated to browsing, >> reading datasheets etc. I have a USB to ATA box, but it has a 2mm pitch >> connector, that would mean more pain and at the end of the day what I am >> after is a part working within my devices, not on a PC. >> I expect to have it work just like I have had many other devices work, >> ATA, SCSI, without ever using a wintel PC. > > I've gained long and bitter experience with such 'consumer products'. I > might write more on the subject at some point, but suffice it to say you > can't treat them the same as a $500 purchase from a big-name store. They > were $5 including shipping from China, sometimes they just don't work. > > You have to treat such purchases probabilistically, which is a different way > to approach them. A pile of research will improve the odds, but at the end > of the day you have to take the risk. Generally I'm winning in my > 'gambling', but that's what it is. It is not the kind of thing you buy if > you want a steady, reliable supply chain. But you can win the game if > you're prepared to play. > > Theo >
Got back to that ATA <-> SATA thing. Bought this one: http://www.amazon.co.uk/gp/product/B000ZLM9IA/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1 It has a Marvell chip inside, 88SA8052, i.e. the latest they have. Works much better than the jmicron part; however, it still has issues driving an ATA cable which "normal" ATA devices on that cable do not have. Cable CRC errors occur at a manageable rate, a few times per megabyte. At a 4M buffer, which is retried from the beginning if an error occurs, there is no hope at all - it never makes it without an error. Whereas normal ATA devices on that same cable never had a cable CRC error for years... I would have thought this is because the buffers driving the cable are 3.3V powered (vs. supposedly 5V on normal ATA drives, not that I have measured how these are powered on any of the drives I have had). But this is still a "no", my board has a 3.3V coolrunner CPLD as a buffer and there are no write errors (when my 3.3V cpld drives the cable), only read ones. Anyway, this is at least usable. Retrying only the failed udma bursts should take care of it, I'll do it and perhaps will have more to report on the ATA <-> SATA chip. The funny part is, in the product I intend to put such an ATA <-> SATA chip instead of four 16 bit buffers there is no cable at all (drive is mounted on the board).... :-) . Dimiter ------------------------------------------------------ Dimiter Popoff, TGI http://www.tgi-sci.com ------------------------------------------------------ https://www.flickr.com/photos/didi_tgi/
On 31.7.2014 &#1075;. 17:58, Dimiter_Popoff wrote:
> On 28.6.2014 &#1075;. 01:24, Theo Markettos wrote: >> Dimiter_Popoff <dp@tgi-sci.com> wrote: >>> Never tried, the only PC I have here is a laptop dedicated to browsing, >>> reading datasheets etc. I have a USB to ATA box, but it has a 2mm pitch >>> connector, that would mean more pain and at the end of the day what I am >>> after is a part working within my devices, not on a PC. >>> I expect to have it work just like I have had many other devices work, >>> ATA, SCSI, without ever using a wintel PC. >> >> I've gained long and bitter experience with such 'consumer products'. I >> might write more on the subject at some point, but suffice it to say you >> can't treat them the same as a $500 purchase from a big-name store. They >> were $5 including shipping from China, sometimes they just don't work. >> >> You have to treat such purchases probabilistically, which is a >> different way >> to approach them. A pile of research will improve the odds, but at >> the end >> of the day you have to take the risk. Generally I'm winning in my >> 'gambling', but that's what it is. It is not the kind of thing you >> buy if >> you want a steady, reliable supply chain. But you can win the game if >> you're prepared to play. >> >> Theo >> > > Got back to that ATA <-> SATA thing. > Bought this one: > > http://www.amazon.co.uk/gp/product/B000ZLM9IA/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1 > > > It has a Marvell chip inside, 88SA8052, i.e. the latest they have. > > Works much better than the jmicron part; however, it still has > issues driving an ATA cable which "normal" ATA devices on that > cable do not have. Cable CRC errors occur at a manageable rate, > a few times per megabyte. At a 4M buffer, which is retried from > the beginning if an error occurs, there is no hope at all - it > never makes it without an error. Whereas normal ATA devices on > that same cable never had a cable CRC error for years... > I would have thought this is because the buffers driving the > cable are 3.3V powered (vs. supposedly 5V on normal ATA drives, > not that I have measured how these are powered on any of the drives > I have had). > But this is still a "no", my board has a 3.3V coolrunner CPLD as > a buffer and there are no write errors (when my 3.3V cpld drives > the cable), only read ones. > > Anyway, this is at least usable. Retrying only the failed udma bursts > should take care of it, I'll do it and perhaps will have more > to report on the ATA <-> SATA chip. > The funny part is, in the product I intend to put such an > ATA <-> SATA chip instead of four 16 bit buffers there is no cable at > all (drive is mounted on the board).... :-) . > > Dimiter > > ------------------------------------------------------ > Dimiter Popoff, TGI http://www.tgi-sci.com > ------------------------------------------------------ > https://www.flickr.com/photos/didi_tgi/ > > > >
I was too hasty with my post yesterday, probably being a bit overexcited of having found a working solution. Then the symptoms I saw were similar to these with the jmicron jm20330 chip. Unlike it the Marvell 88SA8052 has no problem driving the ATA cable, none at all. The cable CRC errors were due to the higher speed than with the normal ATA devices I had ever had, none of these did much over 20MB/S sustained (though the udma bursts were at 33 MB/S). Now this 7200 RPM 500G drive is faster than that and, at times, the ATA FIFO was overflowing... this resulting also in a cable CRC error (which is what was reported). I finetuned internal bus priorities and FIFO thresholds somewhat (the MPC5200B has a huge amount of such capabilities) and the errors went to a negligible level. Still have to retry this or that but not much more than once or twice per minute sustained transfer. So this will be it, the 88SA8052 has actually a smaller footprint than just one of the 4 16 bit buffers it will replace :-). Dimiter ------------------------------------------------------ Dimiter Popoff, TGI http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/

The 2024 Embedded Online Conference