unable to connect STM32F072RBT6 via stlink (usb cable )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-09-04 9:16 PM
Hi Team,
ST-Link Connection Issues with STM32F072RBT6 Discovery Board
Hi everyone,
I’m experiencing issues with my STM32F072RBT6 Discovery Board. It was working fine until recently when I started encountering errors with the ST-Link debugger.
Error Details:
- During Debug Mode: The debugger displays the error message "TARGET HALT" and disconnects.
- Flashing Code: When trying to flash the code, I receive the error "Debugger Disconnected."
- STM32CubeProgrammer: I also get a warning message saying "Connection to device 0x448 is lost," followed by "Disconnected from device."
I have attached screenshots of the errors for reference.
Steps I Have Tried:
- Verified hardware connections.
- Reset the STM32 board.
- Updated ST-Link firmware.
- Checked STM32CubeProgrammer and STM32CubeIDE settings.
- Confirmed stable power supply.
- Looked for hardware issues on the board.
- Attempted a full chip erase via STM32CubeProgrammer.
PFA (images)below including stm32cubeprogrammer logs.
Despite these efforts, the issue persists. Any advice or suggestions on how to resolve this problem would be greatly appreciated. Thank you!
Best regards,
Sudharshan
- Labels:
-
ST boards
-
ST-Link
-
STM32F0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-09-05 3:05 AM
So it's losing connection to the device.
Does your application put the CPU to sleep, and/or disable or reconfigure the SWD pins?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-09-05 3:34 AM
Hi,
The application/code doesn't put the CPU to sleep . The flashing or debugging is using a ST-Link (a USB wire). In STM32CubeIDE , during debug mode , i am facing this issue . Could you explain the disable or reconfigure the SWD pins mean here ?
Thanks
Sudarshan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-09-05 3:45 AM
@Sudharshan wrote:Could you explain the disable or reconfigure the SWD pins mean here ?
The SWD lines (SWDIO and SWCLK) are on PA13 and PA14:
So, if your code does anything to PA13 and/or PA14, it will break the debug connection.
https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-09-05 6:08 AM
Maybe hold BOOT0 high during reset, then connect over SWD with STM32CubeProgrammer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-09-05 12:36 PM
Bad USB cable?
TimerCallback tutorial! | UART and DMA Idle tutorial!
If you find my solution useful, please click the Accept as Solution so others see the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-09-05 2:18 PM
@Karl Yamashita wrote:Bad USB cable?
The screenshots suggest that it does initially make connection, but then loses it.
So could be a faulty USB cable with intermittent fault.
Maybe broken/loose USB connector on the Discovery Board - they are not the most robust things ...
A complex system designed from scratch never works and cannot be patched up to make it work.
