ATA host to SATA disk adapter nightmares

I am trying to start using SATA drives in a system with a SOC chip which only has parallel ATA.

Got some adaptors (3 of them) from dealextreme and thought I'd just connect things to work initially. All based on the JM20330 part, found its datasheet, thought I'd route a board revision with this chip instead of with the ATA buffers eventually, lets first see how things work.

Or do not work. First the adaptor was with the *wrong* connector - female insetad of male (and the chip was configured as an ATA host SATA device). OK, I made a gender changer.

After a few hours of trying this and that, cutting 2 "jumper" traces and soldering them the other way I got some response. Another two days later it nearly works... but it does cable CRC errors in UDMA 2 mode (33 MB/S). It does not do these in the next lower mode - but none of the other devices does any cable CRC errors at all.

Then of the three units I bought one was with a different chip revision. Tried it hoping I had two bad ones. Only to discover it was even worse, did not get to cable CRC-ing as it was rejecting the SET FEATURES command setting the UDMA mode. In fact it rejected setting any mode. Did not try all of the "set features" to check if the command worked at all, probably not.

Anyone with experience? Has anyone been lucky enough to have an ATA -> SATA (SATA being the disk) convertor at reasonable ATA speeds (33MB/S would be fine for me)? I think there is at least one more convertor chip on the market, Marvell (good luck getting a datasheet of *that*...), anything? I am losing hope I can make this chip work. A while ago I shortened the cable (80 conductor ATA cable, cable CRC errors occur during read, i.e. the jm20330 output drivers are no good - and I did try various series terminations etc.), no luck.

Thanks,

Dimiter

------------------------------------------------------ Dimiter Popoff, TGI

formatting link

------------------------------------------------------

formatting link

Reply to
Dimiter_Popoff
Loading thread data ...

What SoC? Intel-based, or something else?

I did a lot of staring at datasheets when fitting an SSD into an old Pentium M/Centrino laptop. Generally the opinion was that JM20330 was a bit variable, there's a Marvell part that had better feedback (I think one of the Startech adaptors use it), and there are some others with better reputations (can't remember the brand, sorry). It appears ACARD has one, and I think the others were obscure Taiwanese vendors.

There's an IBM Thinkpad wiki somewhere with lots of info as many of them are still in use, with PATA to SATA converters.

That could be a problem: some of these adaptors are PATA disc to SATA host and some SATA disc to PATA host. Avoid the ones that are double-ended, they're less likely to work (from what I read).

Yes. The first adaptor I bought aiming to get a Marvell, turned out to have a JM20330, didn't fit in the target laptop (would have needed to cut a hole in the motherboard). I got a bit fed up at this point, and thought I'd risk a JM20330 board that was the right shape. That one worked fine with the SSD (Kingston 30GB), Linux boots great. I think it went up to 33MB/s but no more (laptop southbridge didn't like DMA for some reason).

It was from an ebay seller who doesn't seem to list it any more, but it looked a lot like this:

formatting link
I had to dismantle the SSD to get it to fit.

You sure it isn't just expecting you to behave like the BIOS does, and any they never tested anything else?

Theo

Reply to
Theo Markettos

Freescale, an MPC5200B.

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.

That is fairly astonishing. The JM20330 boards I got are unusable. Here are photos of them after my 2 if not 3 days efforts:

formatting link
,
formatting link
.

1 was the best, nearly worked (did cable CRC errors in a perhaps retry-able amount but still too many - as opposed to 0 by the other devices on that cable - and got stuck eventually). Unusable, though I managed to copy a not so large directory tree once. 2 was the worst, it did not accept the ATA "set features" command which sets the UDMA mode (rejected setting any mode actually, issuing the correct status about that...). Unusable. 3 behaved similarly to 1 but almost never managed no cable CRC error, completely unusable.

The text on the chip in 1 and 3 is the same (probably meaning same revision), however one is printed and the other is engraved. I think 1 was the painted one.

Well I can't possibly know what it expects, what I do know is that by following the ATA standard I have made 3 HDD models and perhaps

3 (if not 4 or 5) CD/DVD burners work seamlessly. Then I spent today in further investigation, looked at the bus signals etc., everything looks good. I played with the programmable timings (which I had played with 5-6 years ago when I did the ATA interface for the 5200B), there was just nothing to be had. Except if I slowed the speed down, but slowing down from 33 MB/S is not acceptable nowadays, I have a 500G 7200RPM drive which is probably faster than the 33 anyway (the 5200 won't do more).

Thanks for your reply, I have abandoned the JMicron chip efforts for now, will look for some Marvell based convertor to test - in a while, now I have other things to do, that JM sh.t ate the time I could afford to no sensible result.

Dimiter

------------------------------------------------------ Dimiter Popoff, TGI

formatting link

------------------------------------------------------

formatting link

Reply to
Dimiter_Popoff

I have this one from ...

On an old Gateway with 100mb/s IDE interface, I do get 80mb/s thruput. As for the Chip used I'd have to look, but I belive it is the JMxxxx chip.

Cheers

Reply to
Martin Riddle

Thanks, if it is JM this would mean they have working revisions after all. Or that the chips in the adaptors I have are fake, could well be really (given the wildly different behaviour observed). I got mine cheap, from dealextreme - have paid $13.60 for 3, they still have them:

formatting link

May be too cheap to be genuine (who would expect a chip like that to get faked.... go figure).

I'll get back to this in a few weeks time, I'll make ot work one way or the other - should be no rocket science to get a working part, they seem to sell in huge quantities, _some_ of them must be working. But the ones I got wasted me 3 days....

Dimiter

------------------------------------------------------ Dimiter Popoff, TGI

formatting link

------------------------------------------------------

formatting link

Reply to
Dimiter_Popoff

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).

Reply to
David Brown

Hi David,

it is still (just) possible, but the possibility is quickly going away. At the moment I am waiting for an ebay drive - which is unlikely to ever come, the seller first wanted a delay then marked it as shipped and probably sent nothing (that is a Samsung 160G drive, there are some alternatives I can also explore but they all are end of life). So I must do SATA; and once I get a working chip - they all seem to be qfp64-ish - it will take less space than the 4 xxxx245 buffers (3.3 5V etc.) I now have on the board. But I have yet to succeed in getting a working part.

Dimiter

------------------------------------------------------ Dimiter Popoff, TGI

formatting link

------------------------------------------------------

formatting link

Reply to
Dimiter_Popoff

I can still find a few available in webshops here in Norway - but it certainly seems to be difficult. I didn't think it was /that/ long since I last bought them, but perhaps it was. Certainly if you want to make lots of these systems then you are going to have a challenge.

The obvious other solution is to move up from the rather old MPC5200B - there are other MPC chips like the MPC5121e in the same family, but with SATA (and PATA). It's no small change, of course, but it will be a lot more future-proof than relying on PATA to SATA converters.

David

Reply to
David Brown

The 5121 is not much younger (if at all) than the 5200B. I looked into it a few years ago - it is a still born part. Look at the errata, there is one saying "SATA does not work as expected. Workaraound: do not use SATA..." (sort of, my wording but the message is this). Then they have tried to put in the same core as on the 5200B and got it nearly right - but it has a bug in the MMU, one can fix it in software but one does not have to do this on the 5200B. Both cores run at

400 MHz; but the 5121 internal buses go up to 66 (or was it 100) and the 5200B goes up to 133. And the 5200 has the smart DMA which the 5121 does not have. The 5200B is the best part one could use to make a HPGe spectrometer on the market and will likely remain thhat for many years to come; on the netmca-3 it manages all the filtering etc (using lots of FPU FMADD and many other things), run the complete OS, disk I/O and such, maintain its "screen" over tcp (often over more than one connection, this is how I do live customer support). No comparable product on the market and I do not see how I could improve a lot on it, there just is not much more one could possibly ask for. Obviously I will move forward using some of the QorIQ parts, I am eyeing some, but not in that application, the 5200B beats any chip for that hands down. It just needs a decent ATA host -> SATA drive chip which works, from what I hear people do use some and they do work so it is only a matter of locating the correct one.

Dimiter

------------------------------------------------------ Dimiter Popoff, TGI

formatting link

------------------------------------------------------

formatting link

Reply to
Dimiter_Popoff

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).

Did you try multiple drives, from different manufacturers? 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).

The other thing is you have three converters of identical design. While the firmware might be different, you aren't testing independent examples. If one of them has a stupid design fault, they all do.

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.

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

Reply to
Theo Markettos

I'd go a different way. Why not a Disk-on-module with a PATA interface?

formatting link

is one example. I'm sure you'd find others, such as

formatting link

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
Reply to
Doug McIntyre

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.

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.

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).

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.

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

formatting link

------------------------------------------------------

formatting link

Reply to
Dimiter_Popoff

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

formatting link

------------------------------------------------------

formatting link

Reply to
Dimiter_Popoff

Op Sat, 21 Jun 2014 02:53:26 +0200 schreef Dimiter_Popoff :

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/
Reply to
Boudewijn Dijkstra

Why not using a CF Card? They are IDE compatible and you need only a connector adapter (no active component involved):

Bye Jack

--
Yoda of Borg am I! Assimilated shall you be! Futile resistance is, hmm?
Reply to
Jack

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.

Reply to
David Brown

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

formatting link

------------------------------------------------------

formatting link

Reply to
Dimiter_Popoff

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

Reply to
Theo Markettos

Got back to that ATA SATA thing. Bought this one:

formatting link

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

formatting link

------------------------------------------------------

formatting link

Reply to
Dimiter_Popoff

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

formatting link

------------------------------------------------------

formatting link

Reply to
Dimiter_Popoff

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.