Traces not getting collected when used same bitstream in a different PC

Hi, I am a beginner and using CW1200 and CW305 for the first time. My Friend gave it to me and it was working fine in his laptop when he collected the traces but when I used the same bitstream, it says device failed to ack.

While uploading the bitstream I am also getting an error which says Verilog defines not found in default location and has forward and backward slashes’ together in the path. can someone help me with this please. Thanks in Advance.

First things first – the warning shows that your CW305 firmware is ancient. Upgrade your chipwhisperer software installation to the latest release, then upgrade your CW1200 and CW305 firmware.

If, after doing these upgrades, you still have issues, I’ll need to know more about what you are trying to do (e.g. are you trying to run one of our notebooks? which one?).

When I am trying to update CW305 firmware, it throws an error saying Could not find bootloader serial port When I checked it in troubleshoot methods, it says ensure the device is plugged in. It is plugged in and I can see the device in device manager too. Can you help me with this?

With the CW305 powered on, short the JP5 header (next to the Atmel chip).
Then power it off and back on.
Then:

import chipwhisperer as cw
cw.program_sam_firmware(hardware_type='cw305')

After Shorting JP5, I can see some changes on the board, the power indicator shows 998, LED 4 is turned on. Yet it shows the same error.

In your device manager, with the CW305 connected, do you have anything like this under “Ports”?

No

Hey, I am sorry. I was using a USB hub. Now I can see it under COM ports and successfully upgraded my Firmware. I am testing the bitstream once again.

So, I was using this jupyter notebook from CW305 ARM Design Start.

There is a slight modification in the code to collect the traces in a loop

#Capture Traces
from tqdm import tnrange, trange
import numpy as np
import time

ktp = cw.ktp.Basic()
ktp.fixed_key = False
ktp.fixed_text = False
traces = []
N = 1000  # Number of traces
    
for i in trange(N, desc='Capturing traces'):
    key, text = ktp.next()  # manual creation of a key, text pair can be substituted here

    trace = cw.capture_trace(scope, target, text, key)
    if trace is None:
        continue
    traces.append(trace)
#     plot.send(trace)

#Convert traces to numpy arrays
trace_array = np.asarray([trace.wave for trace in traces])
# textin_array = np.asarray([trace.textin for trace in traces])
# known_keys = np.asarray([trace.key for trace in traces])  # for fixed key, these keys are all the same

The problem still exists

That is just a warning and it’s fine.
Which notebook are you actually running? You linked to the setup script.

Which firmware are you running on the target? Did you compile it and update the FPGA bitfile following the instructions here?

I apologize for the delay, I have created this custom Jupyter Notebook which is similar to what my friend has used in his computer to collect traces.

The repo also consists of the bitstream file I am trying to run.

Apart from these, I have followed all the instructions from the link you have sent yet this error shows up.

There’s a list of things to try here.

Also see this note about resetting the target.

Hey, Thanks that worked. Resetting the target solved the issue.

Hey, Just wanted to inform that it stopped working again, all of a sudden. The reset solved the problem before but after leaving it idle for a while it started throwing the same error despite not changing anything in the hardware/software. Tried to reset entire system and FPGA as well but there is no change in the error.

UPDATE: I followed these steps and it resolves the problem:

  1. Press the “FPGA R1 USR SW4” Button
  2. Use the “FPGA POWER” switch to turn it off and back on
  3. Press the “FPGA R1 USR SW4” Button again
  4. Now insert the bitstream