"Failed to detect chip" error

In the notebook 1 “connecting to hardware” when i use SAM4S i dont face any error, but when i switch to stm32f connected to cw313 with chipwhisperer husky and i try to programm the target as shown bellow

image

i get the following error

Failed to detect chip. Check following: 
   1. Connections and device power. 
   2. Device has valid clock (or remove clock entirely for internal osc).
   3. On Rev -02 CW308T-STM32Fx boards, BOOT0 is routed to PDIC.

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
Cell In[16], line 2
      1 fw_path = "../../../firmware/mcu/simpleserial-base/simpleserial-base-CWLITEARM.hex"
----> 2 cw.program_target(scope,cw.programmers.STM32FProgrammer, fw_path)

File ~\ChipWhisperer\chipwhisperer\software\chipwhisperer\__init__.py:181, in program_target(scope, prog_type, fw_path, **kwargs)
    179 prog._logging = None
    180 prog.open()
--> 181 prog.find()
    182 prog.erase()
    183 prog.program(fw_path, memtype="flash", verify=True)

File ~\ChipWhisperer\chipwhisperer\software\chipwhisperer\capture\api\programmers.py:129, in save_and_restore_pins.<locals>.func_wrapper(self, *args, **kwargs)
    126 target_logger.debug('Changing {} pin configuration'.format(pin_setup))
    128 try:
--> 129     val = func(self, *args, **kwargs)
    130 finally:
    131     target_logger.debug('Restoring {} pin configuration'.format(pin_setup))

File ~\ChipWhisperer\chipwhisperer\software\chipwhisperer\capture\api\programmers.py:420, in STM32FProgrammer.find(self)
    418         target_logger.warning("(tio1, tio2) != ('serial_rx', 'serial_tx')")
    419         target_logger.warning("Did you forget to call scope.default_setup()?")
--> 420 sig, chip = stm32f.find()

File ~\ChipWhisperer\chipwhisperer\software\chipwhisperer\hardware\naeusb\programmer_stm32fserial.py:38, in close_on_fail.<locals>.func_wrapper(self, *args, **kwargs)
     35 @wraps(func)
     36 def func_wrapper(self, *args, **kwargs):
     37     try:
---> 38         return func(self, *args, **kwargs)
     39     except:
     40         self.close_port()

File ~\ChipWhisperer\chipwhisperer\software\chipwhisperer\hardware\naeusb\programmer_stm32fserial.py:174, in STM32FSerial.find(self, logfunc)
    171     logfunc = print_fun
    173 try:
--> 174     self.initChip()
    175 except IOError:
    176     logfunc("Failed to detect chip. Check following: ")

File ~\ChipWhisperer\chipwhisperer\software\chipwhisperer\hardware\naeusb\programmer_stm32fserial.py:38, in close_on_fail.<locals>.func_wrapper(self, *args, **kwargs)
     35 @wraps(func)
     36 def func_wrapper(self, *args, **kwargs):
     37     try:
---> 38         return func(self, *args, **kwargs)
     39     except:
     40         self.close_port()

File ~\ChipWhisperer\chipwhisperer\software\chipwhisperer\hardware\naeusb\programmer_stm32fserial.py:354, in STM32FSerial.initChip(self)
    351         fails += 1
    353 self.releaseChip()
--> 354 raise IOError("Could not detect STM32F, check connections, BOOT MODE entry setup")

OSError: Could not detect STM32F, check connections, BOOT MODE entry setup

In a similar topic in the forum the problem is a previous version used, but i currently use the 6.0 so i dont know what is wrong.

Which STM32 target are you using, and can you post a picture of the setup.

Yes here some photos of the setup and i used the stm that came with the kit for the husky

Can you post a picture of the solder connections on the bottom of your adapter board?

I found one fault solder connection and i fixed that but still when i try to communicate with the target i get this error

should i open a new topic ?

You’ve not posted the picture we requested. Most likely you have a bad connection on the I/O lines.

Here some photos of the solder side

Did you successfully program the STM32F4’s firmware? What is the output of the cw.program_target() call?

Also, try simply resetting the target after it’s been programmed.

yes i successfully programmed the stm as shown bellow. also i tried reseting the target but still no result

You haven’t programmed the correct firmware. The CWLITEARM is for STM32F3 boards, while you have an STM32F4. You need to clone the chipwhisperer-fw-extra submodule in firmware/mcu/hal/ and build with PLATFORM=CW308_STM32F4.