Side note:
I’m running through the fault1 app. I cannot use the the CWNANO, as I cannot get a good hardware test run on them. I have tried 3 different Nanos. That is in thread [Problem with CWNANO course SCA-101 - #2 by osok].
So I’m using my CWLite. I only call this out because maybe it has an impact on some of the default settings. I’m not aware that that is leading to the cause of my problems, it’s just a thought.
I have multiple LPC1114 boards.
I have one that is fully modified as show in the instructions, either on this workbook and in the Hardware Hacking Book.
I have a few others that are not modified
Using 1 that is not modified, I can run everything in step 3. I do get an error in the third block of step three.
scope.glitch.width = 40
scope.io.tio1 = "serial_rx"
scope.io.tio2 = "serial_tx"
scope.adc.basic_mode = "rising_edge"
scope.clock.clkgen_freq = 100000000 * freq_multiplier
scope.glitch.clk_src = "clkgen"
scope.glitch.trigger_src = "ext_single"
scope.glitch.output = "enable_only"
target.baud = 38400
#target.key_cmd = ""
#target.go_cmd = ""
#target.output_cmd = ""
I had to comment out the three commands at the end because I was getting an error if I didn’t.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-45-a94bd34db73a> in <module>
9
10 target.baud = 38400
---> 11 target.key_cmd = ""
12 #target.go_cmd = ""
13 #target.output_cmd = ""
~/work/projects/chipwhisperer/software/chipwhisperer/common/utils/util.py in __setattr__(self, name, value)
350 def __setattr__(self, name, value):
351 if hasattr(self, '_new_attributes_disabled') and self._new_attributes_disabled and not hasattr(self, name): # would this create a new attribute?
--> 352 raise AttributeError("Attempt to set unknown attribute in %s"%self.__class__, name)
353 super(DisableNewAttr, self).__setattr__(name, value)
354
AttributeError: ("Attempt to set unknown attribute in <class 'chipwhisperer.capture.targets.SimpleSerial.SimpleSerial'>", 'key_cmd')
The fourth block runs ok.
The fifth block, the one that tests communication using nxpprog.
- That worked with the non modified LPC1114 dev board,
- but didn’t work with the Modified board.
Step 4
block two
%matplotlib notebook
import matplotlib.pylab as plt
import numpy as np
nxpdev = CWDevice(scope, target)
trace_1s = capture_crp(nxpdev, 0xffffffff)
trace_0s = capture_crp(nxpdev, 0)
plt.plot(trace_1s - trace_0s)
I got the following errors
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-47-75eb550200cc> in <module>
5 nxpdev = CWDevice(scope, target)
6
----> 7 trace_1s = capture_crp(nxpdev, 0xffffffff)
8 trace_0s = capture_crp(nxpdev, 0)
9
<ipython-input-46-7f86f2b960e4> in capture_crp(nxpdev, value, num_tries, bypass_oserror)
34 """
35 nxpdev.isp_mode()
---> 36 nxpp = nxpprog.NXP_Programmer("lpc1114", nxpdev, 12000)
37 try:
38 set_crp(nxpp, value)
~/work/projects/chipwhisperer/jupyter/courses/faultapp1/external/nxpprog.py in __init__(self, cpu, device, osc_freq, verify)
520 self.cpu = cpu
521
--> 522 self.connection_init(osc_freq)
523
524 self.banks = self.get_cpu_parm("flash_bank_addr", 0)
~/work/projects/chipwhisperer/jupyter/courses/faultapp1/external/nxpprog.py in connection_init(self, osc_freq)
530
531 def connection_init(self, osc_freq):
--> 532 self.sync(osc_freq)
533
534 if self.cpu == "autodetect":
~/work/projects/chipwhisperer/jupyter/courses/faultapp1/external/nxpprog.py in sync(self, osc)
627 s = self.dev_readline()
628 if not s:
--> 629 panic("Sync timeout")
630 if s != self.sync_str:
631 panic("No sync string")
~/work/projects/chipwhisperer/jupyter/courses/faultapp1/external/nxpprog.py in panic(str)
394
395 def panic(str):
--> 396 raise IOError(str)
397
398
OSError: Sync timeout
I get the following error when running the next block
`---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-43-9b1bd305865f> in <module>
5 nxpdev = CWDevice(scope, target)
6
----> 7 trace_unlocked = capture_crp(nxpdev, 0x87654321) #Wrong order - unlocked
<ipython-input-39-7f86f2b960e4> in capture_crp(nxpdev, value, num_tries, bypass_oserror)
34 """
35 nxpdev.isp_mode()
---> 36 nxpp = nxpprog.NXP_Programmer("lpc1114", nxpdev, 12000)
37 try:
38 set_crp(nxpp, value)
~/work/projects/chipwhisperer/jupyter/courses/faultapp1/external/nxpprog.py in __init__(self, cpu, device, osc_freq, verify)
520 self.cpu = cpu
521
--> 522 self.connection_init(osc_freq)
523
524 self.banks = self.get_cpu_parm("flash_bank_addr", 0)
~/work/projects/chipwhisperer/jupyter/courses/faultapp1/external/nxpprog.py in connection_init(self, osc_freq)
530
531 def connection_init(self, osc_freq):
--> 532 self.sync(osc_freq)
533
534 if self.cpu == "autodetect":
~/work/projects/chipwhisperer/jupyter/courses/faultapp1/external/nxpprog.py in sync(self, osc)
627 s = self.dev_readline()
628 if not s:
--> 629 panic("Sync timeout")
630 if s != self.sync_str:
631 panic("No sync string")
~/work/projects/chipwhisperer/jupyter/courses/faultapp1/external/nxpprog.py in panic(str)
394
395 def panic(str):
--> 396 raise IOError(str)
397
398
OSError: Sync timeout
I both of those I see
~/work/projects/chipwhisperer/jupyter/courses/faultapp1/external/nxpprog.py in __init__(self, cpu, device, osc_freq, verify)
520 self.cpu = cpu
521
**--> 522 self.connection_init(osc_freq)**
523
524 self.banks = self.get_cpu_parm("flash_bank_addr", 0)
The osc_frequency is set here
nxpp = nxpprog.NXP_Programmer("lpc1114", nxpdev, 12000)