Skip to main content
Explorer
August 2, 2024
Question

Issue deploying and debugging on custom PCB

  • August 2, 2024
  • 3 replies
  • 1027 views

Hello,

Just to get the details out of the way, I am quite new to STM32CubeIDE. I have a SMT32L552CCUX microcontroller paired up with TDK ICM-42688-V IMU sensor on a custom PCB, this will be my motion sensor device. I am also using STLINK-V3MINIE in-circuit debugger and programmer to deploy the firmware and debug the device.

Debugger settings are all default.

John24ssj_0-1722602032371.png

I got PC connected to STLINK-V3MINIE and it's fully updated, its then connected to the pcb (powered on via a different source) via a ribbon cable. If I unplug it and try to debug I get this output:

 

STMicroelectronics ST-LINK GDB server. Version 7.8.0
Copyright (c) 2024, STMicroelectronics. All rights reserved.

Starting server with the following options:
 Persistent Mode : Disabled
 Logging Level : 1
 Listen Port Number : 61234
 Status Refresh Delay : 15s
 Verbose Mode : Disabled
 SWD Debug : Enabled
 InitWhile : Enabled

Target no device found

Error in initializing ST-LINK device.
Reason: No device found on target.

 

 

So I think my connection to the device is ok, but when I try to deploy and run the code, all I get is this:

 

STMicroelectronics ST-LINK GDB server. Version 7.8.0
Copyright (c) 2024, STMicroelectronics. All rights reserved.

Starting server with the following options:
 Persistent Mode : Disabled
 Logging Level : 1
 Listen Port Number : 61234
 Status Refresh Delay : 15s
 Verbose Mode : Disabled
 SWD Debug : Enabled
 InitWhile : Enabled

Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...

 

 

What is curious though that it does hit a breakpoint in file stm32l5xx_hal_pcd.c at line 1908:

 

if (ep->doublebuffer != 0U)

 

If I press continue nothing happens. I am not quite sure what I'm doing wrong. Any help would be highly appreciated.

 

    This topic has been closed for replies.

    3 replies

    Super User
    August 2, 2024

    It should be working with what you are doing.

    If connection drops like that, it probably is a hardware thing. Can you share the schematic? Is power rail stable and are decoupling capacitors present?

    If you upload a barebones simple code which doesn't modify clock at all, just blinks an LED, does that work?

    Super User
    August 2, 2024
    Graduate II
    August 2, 2024

    Start with the fact you can't connect.

    Does the ST-LINK/V3 have VTarget and GND connected.

    Double Check SWDIO/SWCLK connected to the right pins and the orientation of everything is correct.

    No connectivity can also mean the MCU isn't viable,most likely not powered, missing VDDA/VSSA

    Check NRST level, should normally be HIGH

    Provide Schematic of salient sections

    Use STM32 Cube Programmer to do this initial connection testing. Check what voltage it reports for VTarget