cancel
Showing results for 
Search instead for 
Did you mean: 

stm32cubemx V4.23.0 bug report.

Bruno Hu
Associate II
Posted on December 18, 2017 at 07:18

when used the 103 series MCU,  the SWD port will been disabled in follow step.

1) enable the SWD interface.

2) enable tim3 CH1 PWM function and remapping the output pin to PB4.

3) when the tim3 init code run to __HAL_AFIO_REMAP_TIM3_PARTIAL(), the SWD debug interface will been disable.

4) this bug can be reappear in STM32F103RCT and STM32F103ZET.

5) the software used IAR.

2 REPLIES 2
Imen.D
ST Employee
Posted on December 18, 2017 at 16:36

Hello

Hu.Bruno

,

Please in thestm32f1xx_hal_msp.c file,comment this line:

/**DISABLE: JTAG-DP Disabled and SW-DP Disabled

*/

__HAL_AFIO_REMAP_SWJ_DISABLE();

Then tell me if this workaround resolve your issue or you still have problems.

Meanwhile, I will raise this issue internally to the appropriate team or further check.

Best Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on January 23, 2018 at 03:30

Hello Imen,

the workaround you provided didn't work.

BTW,  I found the workaround works well.

modify the file stm32f1xx_hal_msp.c

1) find the function HAL_MspInit(void)

2) comment the line  __HAL_AFIO_REMAP_SWJ_NOJTAG();

3) add new line 

__HAL_AFIO_REMAP_SWJ_NONJTRST();

the detail as below.

/**NOJTAG: JTAG-DP Disabled and SW-DP Enabled

*/

//__HAL_AFIO_REMAP_SWJ_NOJTAG();

__HAL_AFIO_REMAP_SWJ_NONJTRST();

/* USER CODE BEGIN MspInit 1 */