SATA Errors on battery

Started by BMK, June 09, 2014, 03:53:17 PM

Previous topic - Next topic

BMK

Hi all,
I have an A20 micro with Li-Po and SATA HDD attached.

I am using the battery as a UPS to ensure I can shut the system down properly with no risk of corruption to the HDD.

I just noticed some dmesg when I disconnect the external DC supply, The drive makes some panicked rattling sounds and I get a bunch of stuff output to dmesg.

I checked the voltage on 5V_SATA with a good scopemeter and I can see that the voltage briefly dips to 4.8V for ~ 50mSec during the transition. I don't know what is happening but I would like to be sure the HDD is not going to be corrupted.

Problem replicated with 2 drives, Seagate and Toshiba.

The same problem seems to happen both when transitioning from DC to Li-Po and also when Li-Po to DC

For now I have solved this by putting a 470u Capacitor accross 5v_SATA, but I would like to understand what is going on.

*Edit* Capacitor keeps the drive alive during transition form Ext DC >> LiPO
But I still get the problem when transitioning back to External DC.

Below the debug output
root@a20-OLinuXino:~# <3>ata1: exception Emask 0x10 SAct 0x0 SErr 0x10200 action 0xe frozen
[145195.071978] ata1: exception Emask 0x10 SAct 0x0 SErr 0x10200 action 0xe frozen
<3>ata1: irq_stat 0x00400000, PHY RDY changed
[145195.084375] ata1: irq_stat 0x00400000, PHY RDY changed
<3>ata1: SError: { Persist PHYRdyChg }
[145195.094097] ata1: SError: { Persist PHYRdyChg }
<6>ata1: hard resetting link
[145195.102100] ata1: hard resetting link
<4>ata1: link is slow to respond, please be patient (ready=0)
[145200.980959] ata1: link is slow to respond, please be patient (ready=0)
<3>ata1: COMRESET failed (errno=-16)
[145205.158607] ata1: COMRESET failed (errno=-16)
<6>ata1: hard resetting link
[145205.165696] ata1: hard resetting link
<6>ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[145205.920354] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
<6>ata1.00: configured for UDMA/33
[145205.949019] ata1.00: configured for UDMA/33
<6>ata1: EH complete
[145205.955499] ata1: EH complete





BMK

I hate to bump threads..
But is there anyone here successfully using an A20 with a SATA hdd running from Li-po??

Youri

Hi,
I use SATA drive Seagate ST320LM001 (power consumption 0,95A at 5V) and LoPo battery 1400 mAh. No problem when connecting and disconnecting DC. The LCD is not connected, because it consumes a lot of current. If necessary, LCD can be powered from an external source of 5V.

BMK

Thanks Youri,

Ok so I have done more testing.

I have found a HDD that does not exhibit the problem.

It is a Toshiba HDD2H01 MK3252GSX.

The drive certainly has the problem is a Seagate ST9402115AS.

I have ruled out any software cause by simply leaving the SATA data cable unplugged. The drive can still be heard to momentarily spin down both when transitioning to and from Li-Po Power.

My Li-Po is 1400 also, Problem happens regardless of LCD or no LCD.

The voltages and timings I gave above are probably not accurate because the scopemeter I used only has a 500Hz front-end. I am going to re-do the measurement with an oscilloscope and post the results here.

For now it looks like the momentary dip on the 5V is simply causung the drive to 'panic' and try to spin down and park its heads.


BMK

See Link for screen grabs from my "Disney" oscilloscope...

It looks like 5V_SATA is dipping a little on both transitions. Drop is about ~0.7v and lasts between 1 and 3 mSec.

This must be triggering some kind of some dV/dT detection in the drive?

https://drive.google.com/folderview?id=0B00NaPMXJ84hZXBqaTgzNHFyV00&usp=sharing

I can dodge this problem by not using the drives that are affected. But who knows what drives are incompatible??


There is a space for a cpacitior (C213) accross the 5V SATA plug on the PCB. Maybe the designers had something in mind for this??

LubOlimex

Hello BMK,

If you can mount C213 - it might provide slight improvement to the voltage drops.

By the way, tests here show less than 0.2V drop after main power supply is removed (~5.2V->~5.0V).

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex