cancel
Showing results for 
Search instead for 
Did you mean: 

"Target is not responding, retrying..." due to configuration edit (but reverting the edit doesn't fix it)

brummie
Visitor

I've just bought a NUCLEO-F103RB board, and installed STM32CubeIDE 1.19.0.

I've gone through the following steps:

  1. Made a simple application (File->New->STM32 Project)
  2. PA5 configured as a GPIO output (for the green LED LD2), and PC13 as a GPIO input (for the blue button B1)
  3. The c code is a simple "if button pressed then turn on LED, otherwise turn LED off". All works as expected.
  4. I then double clicked on the ioc file to use the GUI to edit the pin configuration, and under Pinout & Configuration I enabled USART2 (changing it from mode Disable to Asynchronous). All other parameters were left untouched.
  5. After using the cog icon (Device Configuration Tool Code Generation) I rebuilt the project and used Run As to download it to the board.
  6.  As usual the console in the IDE reports "Download in Progress, File download complete, Verifying..., Download verified successfully", but then repeatedly prints "Target is not responding, retrying...". I assumed I'd made a mistake in enabling this USART.
  7. I went back into the GUI and reverted USART2 back to Disable, hit the cog icon, rebuilt, and tried running it again. However, I still get the "Target is not responding, retrying..." error.

I then created a new project, and repeated steps 1 to 3. This new application works as expected.

The source code of the two applications are identical, and the appearance of the GUI (showing the ioc files) also appears to be the same.

However, a diff of the ioc files shows that the failing application does have differences; as if reverting the USART2 setting did not completely undo all the changes.

The differences between the files (other than the obvious project names) are:

 

BADGOOD

Mcu.IP2=SYS
Mcu.IPNb=3

Mcu.IPNb=2

Mcu.Pin2=VP_SYS_VS_ND
Mcu.Pin3=VP_SYS_VS_Systick
Mcu.PinsNb=4

Mcu.PinsNb=2
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_USART2_UART_Init-USART2-false-HAL-trueProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false

VP_SYS_VS_ND.Mode=No_Debug
VP_SYS_VS_ND.Signal=SYS_VS_ND
VP_SYS_VS_Systick.Mode=SysTick
VP_SYS_VS_Systick.Signal=SYS_VS_Systick

n/a

 

I then performed steps 4 to 7 on the new project, and sure enough that breaks it in the same way.

If I quit the IDE, and manually revert the ioc file back to its original state then I can get the application working again. But this does seem like an odd bug (that can break an application); unless I've misunderstood something about editing the configuration using the GUI?

0 REPLIES 0