Skip to main content
AZube.2
Associate III
November 18, 2022
Solved

Error when I try to program my custom board

  • November 18, 2022
  • 4 replies
  • 4159 views

Hello,

I made my custom board with a STM32WLE5CC micro and I am trying to program it using the SW interface. I have a ST-LINK/V2 where I connect the SWDIO, SWCLK, TRACE_SWO, NRST, VCC and GND pins from my board.

When I try to program it using STM32CubeIDE, an error jumps when the programing is at 92% (almost completed) . This is the error:

 0693W00000WIobGQAT.pngWhen I try to connect to the device using STM32CubeProgrammer two things happen. First thing is what we can see in the following picture:

 0693W00000WIobfQAD.pngWhen I try to connect in Normal mode an error jumps saying: "Cannot connect to access port. If you are trying to connect to a device with TrustZone enabled please try to connect with HotPlug mode" (which is weird because I never programmed this chip before, never touched the TrustZone)

So, then I try to connect in HotPlug mode and works:

 0693W00000WIobuQAD.png 

However I still cannot debug my program trough STMCubeIDE because the first error persists. Besides, I guess that I should be able to connect using the normal mode.

Any help is appreciated, I am a bit lost here.

Thanks,

Asier

This topic has been closed for replies.
Best answer by AZube.2

Thanks a lot for the support @MM..1​. I finally found the problem and it was hardware. The reset line was connected to ground by mistake (there was an erroneous switch that made this connection). Once I unsoldered this component from the board, the programing/debugging started to work as usual!

4 replies

MM..1
Chief III
November 18, 2022

You config CubeIDE debug wth some error. try show screen or check it.

AZube.2
AZube.2Author
Associate III
November 18, 2022

I created a new project specific for my micro and used the default debug configuration:

0693W00000WIonqQAD.pngI also tried enabling and disabling the SWV (Serial Wire Viewer), but the result is exactly the same. I also tried using OpenOCD, but many more errors jump...

AZube.2
AZube.2Author
Associate III
November 18, 2022

@MM..1​ Thanks for the reply. I followed the steps in the document, but I am getting the same behavior

MM..1
Chief III
November 18, 2022

Realy you set connection under reset and enable low power mode debug ?

0693W00000WIpIyQAL.png

AZube.2
AZube.2AuthorBest answer
Associate III
November 21, 2022

Thanks a lot for the support @MM..1​. I finally found the problem and it was hardware. The reset line was connected to ground by mistake (there was an erroneous switch that made this connection). Once I unsoldered this component from the board, the programing/debugging started to work as usual!