CW Nano code does not execute persistently

Hello,

I program a firmware for CPA on AES in CW Nano.
When I (User1) give this CW Nano board to another person (User2), it does not work until they flash the same hex and the run the CPA on AES script.

I checked the map file and it looks the the code is in 0x08… address, which is a ROM/Flash address.
Why does it seem like the code is not persistent across power cycles (code which was programmed by User1 before does not run until it is flashed again by the User2)

Hi,

Have you tried toggling the nrst pin?

What does it do? Toggle how (via code?)

nrst is the reset pin for the target. You can toggle it via

import time
scope.io.nrst = 0
time.sleep(0.1)
scope.io.nrst = None
time.sleep(0.1)

I don’t get it completely, i remove the hardware from one pc and plug it into another. Isn’t it equivalent to a cold power on reset?

No, they’re not the same since the capture side of the board, which notably provides the clock to the target, is also powering up at the same time.

Thanks, i will try this on Monday and let you know the result.

I tried and it works but could you please elaborate your reasoning?

“No, they’re not the same since the capture side of the board, which notably provides the clock to the target, is also powering up at the same time.”

It is not quite clear why CW Nano’s target does not reset on removing and plugging it back again.

The boot looks something like this:

  1. Board is plugged in and Nano/target boot
  2. Nano is unconfigured, so it doesn’t output any clock signal for the target
  3. Target looks for a clock upon boot, but it doesn’t get one so it stops running
  4. Even if you now provide a clock to the target, it may not run. Resetting will redo the target boot sequence, except now it finds a clock and boots normally