2017-10-28 04:12 PM
Hi all,
I would like to report a bug of CubeMX.
I did generated simple project for STM32F103VEx. Project if fairly simple just uses USB in CDC mode.
I did generate similar project for same processor but only SPI3 using shared pins PB3 and PB4 with JTAG.
Each time while I did generated those projects CubeMX forces to distable whole debug communication JTAG +SWD
by adding line
/**DISABLE: JTAG-DP Disabled and SW-DP Disabled
*/ __HAL_AFIO_REMAP_SWJ_DISABLE();While SWD could be turned on since it does not conflicts with any of those peripherals. STM32 have options to disable only JTAG or either distable only NRJST pin in JTAG. Why CubeMX forces to kill all of the debug communication ?
Simple project attached. Example file located in testCDC/stm32f1xx_hal_msp.c function void HAL_MspInit(void)
https://community.st.com/tags♯/?tags=stm32%20cube%20mx
‌#bug-report #stm32-cube-mx #stm32f103-usb2017-10-30 02:45 AM
Hello,
Yo can refer to the RM0008 reference manual in the section ''JTAG/SWD alternate function remapping'' to have more details and clarification about your case, as mentioned prior to configure SPI3 that user has to disable the JTAG and use SWD interface or disable both JTAG/SWD.
Note: I think you are using an old version, so I recommend you to use the last version (4.23) updates to fix defects and enhancements implementation.
Kind Regards
Imen
2017-10-30 02:58 AM
Hi Imen,
Thanks for response. I was using CubeMX version 4.22.1, updated to 4.23 and same problem occurs.
I know about
RM0008 and JTAG/SWD remapping table. I am just concerns that clean project generated from CubeMX
does not switch off only JTAG but whole debug communication and does it in the non obvious part of code. I manage to make it work, but imagine people which try to do it first time and their evaluation board do not respond after first program.
I think this is a bug in CubeMX and it should switch off only those debug ports which is needed. In that case just JTAG while it turns off all of debug communication.
Best regards,
Rafal
2017-10-30 04:08 AM
Hi
Woloszyn.Rafal
,Thank you for your contribution.I raised this issue internally to CubeMx team.
Best Regards
Imen
2017-10-30 04:39 AM
Hi
DAHMEN.IMEN
, Thank you. Let's nail this problem for future users !R.
2023-12-01 12:32 AM
Upon enabling UART1 functionality within STM32CubeIDE, an unexpected behavior occurs: both JTAG-DP and SW_DP interfaces are simultaneously disabled. Consequently, this disrupts communication with the microcontroller via the ST-Link V2, rendering it unresponsive until I apply 3.3V to the Boot 1 pin for flash erasure.
Even after generating fresh code for flashing onto the STM32F103C8T6, this issue persists persistently. The repetitive nature of this problem significantly hampers my development activities, causing considerable disruption and delay.
I have diligently checked for software updates, reviewed hardware configurations to ensure correctness, and attempted various troubleshooting steps, but regrettably, the problem endures.
I am reaching out urgently to seek your immediate assistance and guidance in resolving this critical issue. Any insights, workarounds, or specific steps to rectify this situation would be immensely appreciated.
Given the urgency of this matter and its impact on my workflow, I kindly request your prompt attention and support in addressing this issue. Should there be any updates, patches, or known solutions, I would be grateful for information on how to implement them effectively.
2023-12-01 01:17 AM - edited 2023-12-01 04:04 AM
Temporary Solution for STM32CubeIDE Bug: Restoring JTAG-DP & SW_DP Functionality
Description:
Discover a temporary solution to the critical bug affecting STM32CubeIDE's peripheral configuration, disabling JTAG-DP and SW_DP interfaces for STM32F103C8T6 microcontrollers. In this video, Mahmoud Abdelraouf presents a workaround to restore functionality until STM releases a software update resolving this issue.
Video Link: Disabling JTAG-DP and SW_DP
2023-12-01 06:22 AM
> I am reaching out urgently to seek your immediate assistance and guidance in resolving this critical issue. Any insights, workarounds, or specific steps to rectify this situation would be immensely appreciated.
Re-enable them in a user code section so it isn't removed after regeneration.