ChipWhisperer Husky appears to crash after connecting

Hi,

I’m having a problem where the Chipwhisperer Husky appears to crash and the usb /dev disappears. Any guidance would be appreciated.

I used the Husky without issue last year so it has worked in the past. I was attempting to use the PicoEMP on an external target the other day when the problems started. Hopefully I didn’t fry something.

The information below is on macOS (M1, but not seeing any arch issues) but I’ve also tried on an Ubuntu machine with similar symptoms. This is a using a fresh clone of chipwhisperer repo as of today.

I’ve reset the device firmware using the button and successfully flashed a fresh firmware with:
import chipwhisperer as cw
cw.program_sam_firmware(hardware_type=‘cwhusky’)

When I plug in the Husky (without the CW313 board or anything else attached) these devices show up as expected:
/dev/cu.usbmodem2102
/dev/tty.usbmodem2102

The status light blinks, capturing, adc and glitch are lit. All good.

When I run the following tiny snippet from a debug notebook:
SCOPETYPE = ‘OPENADC’
PLATFORM=“CWHUSKY”
SS_VER = ‘SS_VER_2_1’
%run “./Setup_Scripts/Setup_Generic.ipynb”

Everything initially looks good:
INFO: Found ChipWhisperer😍
scope.gain.mode changed from low to high
scope.gain.gain changed from 0 to 22
scope.gain.db changed from 15.0 to 25.091743119266056
scope.adc.samples changed from 131124 to 5000
scope.clock.clkgen_freq changed from 0 to 7370129.87012987
scope.clock.adc_freq changed from 0 to 29480519.48051948
scope.clock.extclk_monitor_enabled changed from True to False
scope.clock.extclk_tolerance changed from 1144409.1796875 to 13096723.705530167
scope.io.tio1 changed from serial_tx to serial_rx
scope.io.tio2 changed from serial_rx to serial_tx
scope.io.hs2 changed from None to clkgen
scope.io.cdc_settings changed from bytearray(b’\x01\x00\x00\x00’) to bytearray(b’\x00\x00\x00\x00’)
scope.glitch.phase_shift_steps changed from 0 to 4592
scope.trace.capture.trigger_source changed from trace trigger, rule #0 to firmware trigger

However just a few seconds later the usb devices disappear from /dev.
All the LEDs on the Husky are off. I can unplug and replug the husky and redo the same thing with the same results. I’ve tried another USB cable as well.

Any information on how to debug what exactly is happening inside the Husky as it crashes would be appreciated.

Hi,

Did you see this behaviour start before or after reflashing the firmware on your device?

Alex

This happened before reflashing the firmware. I mostly did that as part of a full reset to get back to what I hoped was a good state.

Another note: after reflashing the firmware I can execute the basic setup of:
import chipwhisperer as cw
scope = cw.scope()

without the /dev/usb disappearing.

Ah so it’s only after running the later parts of the setup that the issue occurs? Do you think you could go through the following calls and see which one causes the issue?

target = cw.target(scope)
scope.gain.db = 25
scope.adc.samples = 5000
scope.clock.clkgen_freq = 7370129.87012987
scope.clock.extclk_monitor_enabled = False
scope.io.tio1 changed = 'serial_rx'
scope.io.tio2 changed = 'serial_tx'
scope.io.hs2 changed = 'clkgen'
scope.io.cdc_settings = bytearray(b’\x00\x00\x00\x00’)

Sorry for the slow reply, Thanksgiving etc.

There seems to be some timing aspect to this. After a reflash of the firmware, plug in the husky and I ran the first scope = cw.scope() again. This time I waited approximately 2 minutes before I was about to run the next command above, but the device disappears. It is also getting a bit warm, not sure if it is overheating perhaps?

That could be the case; can you run this to see how hot the FPGA gets until it disconnects:

maxtemp = 0
while True:
    temp = scope.XADC.get_temp()
    if temp > maxtemp:
        maxtemp = temp
        print(maxtemp)

Just ran this with a cold device and it took quite a while for the /dev/ to disappear, about 8 minutes. The final temperature printed before it died was ~65.6. It kept steadily increasing from an initial ~29 even with no workload running or anything plugged in to the husky. I’m very curious what might cause this behavior.

Thanks for running this; definitely not normal, idle temperature should be lower than that. Email sales@newae.com and we’ll take the next steps from there.

Thanks everyone for the help diagnosing this! Email sent.