Skip to main content
Bruno Hu
Associate II
December 18, 2017
Question

stm32cubemx V4.23.0 bug report.

  • December 18, 2017
  • 2 replies
  • 648 views
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.

    This topic has been closed for replies.

    2 replies

    ST Technical Moderator
    December 18, 2017
    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

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
    Bruno Hu
    Bruno HuAuthor
    Associate II
    January 23, 2018
    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 */