Hi,
After a pleasant break away,
On 20/12/14 15:38, Jeremy Morse wrote:
> Unfortunately however, this isn't ready to ship yet: with the latest
> firmware revision, if you repeatedly make USB requests (reading
> voltage/current) then it quickly stalls USB in a permanent fashion. The
> libopencm3 state machine appears to get into an invalid state (it
> expects to be idle, then receives an output packet from the host). If
> you disable the call to output_poll() in the main loop, this goes away.
>
> I've no idea why this is after a few hours, and updating to a later
> version of libopencm3 seems to break usb enumeration. I'd be tempted to
> say it's a timing issue, however adding more usbd_poll() calls
> everywhere doesn't fix anything. So for the moment, I'm stumped.
This transpired to be a difference in my testing procedure: when one
attaches the power board directly to the root hub in my laptop (USB3 /
intel xhci) this fault presents itself. When there's a USB hub between
the laptop and the power board, it does not.
This seems to be the usual "compatibility? what compatibility?"
situation. xhci [0] is supposed to support USB full speed devices
completely, succeeds in operating the power board when not under load,
but stops working when loaded. Using a USB hub causes a different
transaction translator to translate down from high-speed USB to full
speed, and that works consistently. I'm really inclined to blame the
host controller / software for this (I don't have a non-USB3 machine
handy, sadly).
I also don't have an odroid handy to see if the same thing happens with
the host controller there. Worst case scenario, we tell people they have
to use the usb hubs to connect SR devices.
~
Anyhoo, I decided it'd be worth testing that the current limit triggered
when a power board output was short circuited. To test this, I attached
a power board to a battery (outside!), turned on the output terminals,
attached a camcon to a terminal (L2) with some long wires connected,
then struck the ends of the wires together. This is on the principal
that if something went wrong, the battery wouldn't be shorted for long.
The net effect was that the current limit did not trip: instead the
output-on LED dimmed for a bit. Short circuiting the terminal for entire
seconds at a time caused the LED to turn off. No other outputs were
affected. This was definitely the over-current / thermal limit detection
on the output driver kicking in. The output turned back on immediately
after the short was removed. There seems to be no damage to the power
board or terminal, it happily powers a motor board, although I don't
have a load to test it with right now.
I'm mildly disappointed that the current sense didn't register the short
(but please the power board is safe). I imagine the output driver
responds much faster than software can, so there's little chance of
registering the current. We could possibly detect the output rail being
off when it should be turned on, but there's no circuitry for that right
now.
[0] Which appears to be massively over engineered
--
Thanks,
Jeremy