XMEGA serial Read timed out

I am using XMEGA board as target. I am trying to run example given in demos folder i.e http://localhost:8888/tree/jupyter/demos/.
Specifically I am executing
CW-Pro Using SAD (Analog Pattern) Trigger - Attacking AES.ipynb

I am getting following error

Kindly help me out to resolve this issue

Did you recompile and reprogram the target? By default, this lab uses simpleserial v1, but you’re using simpleserial v2.

I am running it from the start and faced no error. But on this line, I am facing this issue.

How to change SimpleSerial from V1 to V2?

Make sure SS_VER = SS_VER_2_1 is in the first code block and change

%%bash -s "$PLATFORM" "$CRYPTO_TARGET"
cd ../../hardware/victims/firmware/simpleserial-aes
make PLATFORM=$1 CRYPTO_TARGET=$2

Try running reset_target(scope) before the capture block as well.

Alex

to

%%bash -s "$PLATFORM" "$CRYPTO_TARGET" "$SS_VER"
cd ../../hardware/victims/firmware/simpleserial-aes
make PLATFORM=$1 CRYPTO_TARGET=$2 SS_VER=$3

@Alex_Dewar I have already tried to change the version in said lines, but I would try that again.

@Alex_Dewar I have changed these lines as your suggestion, but I am getting same error. My code is as follows:

SCOPETYPE = ‘OPENADC’
PLATFORM = ‘CWLITEXMEGA’
CRYPTO_TARGET = ‘AVRCRYPTOLIB’
SS_VER=‘SS_VER_2_1’
%%sh -s “$PLATFORM” “$CRYPTO_TARGET” “$SS_VER”
cd …/…/hardware/victims/firmware/simpleserial-aes
make PLATFORM=$1 CRYPTO_TARGET=$2 SS_VER=$3
%run “…/Setup_Scripts/Setup_Generic.ipynb”
fw_path = ‘…/…/hardware/victims/firmware/simpleserial-aes/simpleserial-aes-{}.hex’.format(PLATFORM)
cw.program_target(scope, prog, fw_path)
scope.clock.adc_src = “clkgen_x1”
scope.adc.basic_mode = “low”
scope.adc.samples=1000000
reset_target(scope)
ktp = cw.ktp.Basic()
key, text = ktp.next()
ret = cw.capture_trace(scope, target, text, key)

I am getting this error:

Kindly tell me if I need to do any changes regarding switches or jumpers on target board (red board) for XMEGA?

It doesn’t look like you’ve got stream mode activated. Also, you may want to try changing scope.adc.basic_mode to "high" instead of "low".

Alex

1 Like

Thanks @Alex_Dewar, I have figured this that:

Only by enabling stream mode doesn’t solve the issue. I have also edited make file for this purpose.

Again thanks a lot for guidance and quick response