Skip to main content
Andrey Vieira
Associate
November 26, 2017
Solved

[BUG] CubeMX 4.20.0 - Access to board is blocked

  • November 26, 2017
  • 1 reply
  • 921 views
Posted on November 26, 2017 at 12:30

My settings:

Board: STM32F100RB

OS: Windows 10 x64

Version: STM32Cube V1.0 - 4.20.0

IDE: Coocox CoIDE 1.7.8 

Problem:

   I noticed that after regenerating the code I just couldn't access the board, messages like 'Please, connnect the cable' or  'Board was not found' started prompting after downloading others code to the board. The only way to restore the access was using STLink Utility (Holding the reset button (Black button,RST, in the board) and erasing all the memory).

   However, this issue also happened when checking the option to Create peripheral separate pairs in .c and .h, something like that, this time the code blocks the access just after the download.

   In both cases the code keeps running but you cannot debug, reset or download new ones. 

Solution: 

   After some trial and error, comparing the good code with the evil one, I could solve this changing the following file:

SRC folder  ==>  stm32f1xx_hal_msp.c

Look for __HAL_AFIO_REMAP_SWJ_DISABLE(); and just delete this line.

#bug-report #stm32-vl-discovery #cube-mx #stm32f1xx
This topic has been closed for replies.
Best answer by Khouloud GARSI
Posted on November 27, 2017 at 16:45

Hello

Vieira.Andrey

,

F

rom STM32CubeMx 'Pinout' view, go to the 'SYS' peripheral andchange 'No Debug' to any other mode. This should resolve your issue.

PS:

http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-configurators-and-code-generators/stm32cubemx.html

is now available on ST website. It offerssome enhancements and bug fixes. I advise you to use it.

Khouloud.

1 reply

Khouloud GARSI
Technical Moderator
November 27, 2017
Posted on November 27, 2017 at 16:45

Hello

Vieira.Andrey

,

F

rom STM32CubeMx 'Pinout' view, go to the 'SYS' peripheral andchange 'No Debug' to any other mode. This should resolve your issue.

PS:

http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-configurators-and-code-generators/stm32cubemx.html

is now available on ST website. It offerssome enhancements and bug fixes. I advise you to use it.

Khouloud.

Andrey Vieira
Associate
December 3, 2017
Posted on December 03, 2017 at 00:17

Yeah, it worked too.