Hi,
I have last version (5.1.1) of chipwhisperer software, I’m on Windows 10 64bit, and I use the ChipWhisperer-Pro (CW1200).
I manage with no problems to erase, flash and use the STM32F3 ufo board, but when I try to flash the STM32F4 ufo board I’m not able to erase the flash, having the following errors:
Detected known STMF32: STM32F40xxx/41xxx
Extended erase (0x44), this can take ten seconds or more
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
c:\chipwhisperer\software\chipwhisperer\hardware\naeusb\programmer_stm32fserial.py in _wait_for_ask(self, info)
286 try:
--> 287 ask = self.sp.read(1)[0]
288 except:
IndexError: list index out of range
During handling of the above exception, another exception occurred:
CmdException Traceback (most recent call last)
<ipython-input-2-9a4a378942c6> in <module>
1 ### PROGRAM THE TARGET
2
----> 3 cw.program_target(scope, prog, fw_path, slow_prog=True)
4 #cw.program_target(scope, prog, fw_path)
c:\chipwhisperer\software\chipwhisperer\__init__.py in program_target(scope, prog_type, fw_path, **kwargs)
52 prog.open()
53 prog.find()
---> 54 prog.erase()
55 prog.program(fw_path, memtype="flash", verify=True)
56 prog.close()
c:\chipwhisperer\software\chipwhisperer\capture\api\programmers.py in func_wrapper(self, *args, **kwargs)
68 self.scope.io.nrst = 'high_z'
69 try:
---> 70 val = func(self, *args, **kwargs)
71 finally:
72 logging.debug('Restoring pdic, pdid, and nrst pin configuration')
c:\chipwhisperer\software\chipwhisperer\capture\api\programmers.py in erase(self)
322 self.log("Erasing Chip")
323 stm32f = self.stm32prog()
--> 324 stm32f.cmdEraseMemory()
325
326 @save_and_restore_pins
c:\chipwhisperer\software\chipwhisperer\hardware\naeusb\programmer_stm32fserial.py in cmdEraseMemory(self, sectors)
425 def cmdEraseMemory(self, sectors=None):
426 if self.extended_erase:
--> 427 return self.cmdExtendedEraseMemory()
428
429 if self.cmdGeneric(0x43):
c:\chipwhisperer\software\chipwhisperer\hardware\naeusb\programmer_stm32fserial.py in cmdExtendedEraseMemory(self)
457 self.sp.timeout = 30000
458 print("Extended erase (0x44), this can take ten seconds or more")
--> 459 self._wait_for_ask("0x44 erasing failed")
460 self.sp.timeout = tmp
461 logging.info(" Extended Erase memory done")
c:\chipwhisperer\software\chipwhisperer\hardware\naeusb\programmer_stm32fserial.py in _wait_for_ask(self, info)
287 ask = self.sp.read(1)[0]
288 except:
--> 289 raise CmdException("Can't read port or timeout (%s). Target didn't respond when an ack was expected." % traceback.format_exc())
290 else:
291 if ask == 0x79:
CmdException: Can't read port or timeout (Traceback (most recent call last):
File "c:\chipwhisperer\software\chipwhisperer\hardware\naeusb\programmer_stm32fserial.py", line 287, in _wait_for_ask
ask = self.sp.read(1)[0]
IndexError: list index out of range
). Target didn't respond when an ack was expected.
I tried several fixes, with no success:
- Following this page, where they have the same problem (in the Nano, and not Pro) but in a later step (flashing and not erasing).
I tried to call the program_target with several parameters likeslow_prog=True
and orbaud=XXX
, trying severalXXX
- trying the solution proposed in this thread and post
- trying on a Ubuntu 16.04 machine with the same ChipWhisperer sw (5.1.1)
EDIT: I tried to upgrade the CW software, from the last release to the develop branch: same results.
Do you have some hint to solve the problem?
Thanks in advance
Matteo