Hi @jpthibault
I tried several USB ports. Did not make a difference.
First ran pytest ./test_husky.py
with nothing connected. Only failures were with the fw version:
=================================== FAILURES=================================
___________________________________ test_fw_version ----------__________________________
test_husky.py:483: in test_fw_version
assert scope.sam_build_date == '13:17:41 Feb 9 2023'
E AssertionError: assert '21:32:05 Jan 31 2023' == '13:17:41 Feb 9 2023'
E - 13:17:41 Feb 9 2023
E + 21:32:05 Jan 31 2023
========================== short test summary info ==================================
FAILED test_husky.py::test_fw_version - AssertionError: assert '21:32:05 Jan 31 2023' == '13:17:41 Feb 9 2023'
================== 1 failed, 34 passed, 111 skipped in 17.92s =============================
Then ran pytest ./test_husky.py --fulltest
with nothing connected. Only failures where with the fw version as before (took ~4 minutes only. I guess 20 minutes is when the target is attached?)
Then I hooked the target up and tried to program it but I kept on getting the following error:
File chipwhisperer/software/chipwhisperer/hardware/naeusb/bootloader_sam3u.py:330, in Samba.read_word(self, addr)
328 if len(resp) < 4:
329 target_logger.debug("Timeout on read from {:04X}".format(addr))
--> 330 raise IOError("timeout")
332 value = (resp[3] << 24 | resp[2] << 16 | resp[1] << 8 | resp[0] << 0)
333 target_logger.debug("Read {:04X} from {:02X}".format(value, addr))
OSError: timeout
So I run what worked for me before when running LAB 2_1B:
SCOPETYPE = 'OPENADC'
PLATFORM = 'CW308_SAM4S'
SS_VER = 'SS_VER_2_1'
%run "../../Setup_Scripts/Setup_Generic.ipynb"
prog = cw.programmers.SAM4SProgrammer
cw.program_target(scope, prog, "../../../hardware/victims/firmware/simpleserial-trace/simpleserial-trace-CW308_SAM4S.hex")
Not sure what that does that fixes the issue but this did not give an error.
So started the full test again:
HUSKY_TARGET_PLATFORM=sam4s pytest ./test_husky.py --fulltest
Final results:
============================= FAILURES ====================================
____________________________ test_fw_version ___________________________
test_husky.py:483: in test_fw_version
assert scope.sam_build_date == '13:17:41 Feb 9 2023'
E AssertionError: assert '21:32:05 Jan 31 2023' == '13:17:41 Feb 9 2023'
E - 13:17:41 Feb 9 2023
E + 21:32:05 Jan 31 2023
______ test_segments[0-0-90-False-7370000.0-4-False-20-0-segments_trigger_no_offset] _________
test_husky.py:1136: in test_segments
assert errors == 0, "Ratios = %s; errors: %s, params = %s" % (ratios, scope.adc.errors, funcparams)
E AssertionError: Ratios = [1.0407061733948049, 1.0112685270828163, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]; errors: slow FIFO underflow, , params = {'fulltest': True, 'offset': 0, 'presamples': 0, 'samples': 90, 'stream': False, 'clock': 7370000.0, 'adcmul': 4, 'seg_count': False, 'segs': 20, 'segcycs': 0, 'desc': 'segments_trigger_no_offset'}
E assert 38 == 0
============================ short test summary info ================================
FAILED test_husky.py::test_fw_version - AssertionError: assert '21:32:05 Jan 31 2023' == '13:17:41 Feb 9 2023'
FAILED test_husky.py::test_segments[0-0-90-False-7370000.0-4-False-20-0-segments_trigger_no_offset] - AssertionError: Ratios = [1.0407061733948049, 1.0112685270828163, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]; errors: slow FIFO underflow, , params = {'fulltest': True, 'offset': 0, 'presample...
========================= 2 failed, 138 passed, 6 skipped in 782.07s (0:13:02)
I also got some warnings and some skipped tests:
test_husky.py::test_segments[0-0-90-False-7370000.0-4-False-20-0-segments_trigger_no_offset] (ChipWhisperer Target WARNING|File SimpleSerial.py:410) Unexpected start to command: z
FAILED
test_husky.py::test_segments[0-10-90-False-7370000.0-4-False-20-0-segments_trigger_no_offset_presamp] (ChipWhisperer Target WARNING|File SimpleSerial.py:410) Unexpected start to command: z
PASSED
test_husky.py::test_segments[10-0-90-False-7370000.0-4-False-20-0-segments_trigger_offset10_SLOW] (ChipWhisperer Target WARNING|File SimpleSerial.py:410) Unexpected start to command: z
PASSED
test_husky.py::test_segments[50-0-90-False-7370000.0-4-False-20-0-segments_trigger_offset50_SLOW] (ChipWhisperer Target WARNING|File SimpleSerial.py:410) Unexpected start to command: z
PASSED
test_husky.py::test_segments[50-20-90-False-7370000.0-4-False-20-0-segments_trigger_offset50_presamp] PASSED
test_husky.py::test_segments[0-0-100-True-7370000.0-4-False-2000-0-segments_trigger_stream_SLOW] PASSED
test_husky.py::test_segments[0-0-90-False-7370000.0-4-True-20-32500-segments_counter_no_offset] (ChipWhisperer Target WARNING|File SimpleSerial.py:410) Unexpected start to command: z
PASSED
test_husky.py::test_segments[0-30-90-False-7370000.0-4-True-20-32500-segments_counter_no_offset_presamp_SLOW] (ChipWhisperer Target WARNING|File SimpleSerial.py:410) Unexpected start to command: z
PASSED
test_husky.py::test_segments[10-0-90-False-7370000.0-4-True-20-32500-segments_counter_offset10_SLOW] (ChipWhisperer Target WARNING|File SimpleSerial.py:410) Unexpected start to command: z
PASSED
test_husky.py::test_segments[50-0-90-False-7370000.0-4-True-20-32500-segments_counter_offset50_SLOW] (ChipWhisperer Target WARNING|File SimpleSerial.py:410) Unexpected start to command: z
PASSED
test_husky.py::test_segments[50-40-90-False-7370000.0-4-True-20-32500-segments_counter_offset50_presamp] (ChipWhisperer Target WARNING|File SimpleSerial.py:410) Unexpected start to command: z
PASSED
test_husky.py::test_trace[False-swo-firmware trigger-pattern-matched SWO trace, target-triggered] SKIPPED (No target detected or incorrect FW.)
test_husky.py::test_trace[True-swo-firmware trigger-raw SWO trace, target-triggered] SKIPPED (No target detected or incorrect FW.)
test_husky.py::test_trace[False-swo-0-pattern-matched SWO trace, trace-triggered] SKIPPED (No target detected or incorrect FW.)
test_husky.py::test_segment_trace[swo-1-1triggers] SKIPPED (No target detected or incorrect FW.)
test_husky.py::test_segment_trace[swo-10-10triggers] SKIPPED (No target detected or incorrect FW.)
test_husky.py::test_segment_trace[swo-21-21triggers] SKIPPED (No target detected or incorrect FW.)