cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to run code STM32F411RET6

LBien.1
Associate II

Hi,

I'm unable to run code in my STM32F411RET6 when i'm running code, the debugger print :

"

Open On-Chip Debugger 0.11.0+dev-00449-g53fa0f7 (2022-06-09-09:40)

Licensed under GNU GPL v2

Info : Listening on port 6666 for tcl connections

Info : Listening on port 4444 for telnet connections

Info : connected to stlink-server

Info : stlink-server API v3, version 2.1.0

Info : STLINK V2J40M27 (API v2) VID:PID 0483:374B

Info : Target voltage: 3.280053

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

Info : clock speed 4000 kHz

Info : stlink_dap_op_connect(connect)

Info : SWD DPIDR 0x2ba01477

Info : STM32F411RETx.cpu: Cortex-M4 r0p1 processor detected

Info : STM32F411RETx.cpu: target has 6 breakpoints, 4 watchpoints

Info : STM32F411RETx.cpu: external reset detected

Info : starting gdb server for STM32F411RETx.cpu on 3333

Info : Listening on port 3333 for gdb connections

Info : accepting 'gdb' connection on tcp/3333

target halted due to debug-request, current mode: Thread

xPSR: 0x01000000 pc: 0x08000284 msp: 0x20020000

configuring PLL

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

Info : device id = 0x10006431

Info : flash size = 512 kbytes

Error: Failed to read memory at 0x20020004

Error: Failed to read memory at 0x20020020

Error: Failed to read memory at 0x20020004

Error: Failed to read memory at 0x20020020

Info : accepting 'gdb' connection on tcp/3333

Error: Failed to read memory at 0x20020004

Error: Failed to read memory at 0x20020020

Error: Failed to read memory at 0x20020004

Error: Failed to read memory at 0x20020020

target halted due to debug-request, current mode: Thread

xPSR: 0x01000000 pc: 0x08000284 msp: 0x20020000

configuring PLL

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

target halted due to debug-request, current mode: Thread

xPSR: 0x01000000 pc: 0x08000808 msp: 0x20020000

Info : dropped 'gdb' connection

shutdown command invoked

Info : dropped 'gdb' connection

"

And it put a breakpoint to "HAL_Init()", I don't know how this happens, yesterday when I running the blinked led example it worked, I can't provide you more information sorry, I'm a beginner.

1 ACCEPTED SOLUTION

Accepted Solutions

STM32F411RET6 that's a chip part number, you have that on a white NUCLEO board like in the video?

Does STM32 Cube Programmer indicate any sort of error?

Can you perhaps build an example, and write the .HEX or .ELF file directly using Cube Programmer?

STM32Cube_FW_F4_V1.24.0\Projects\STM32F411RE-Nucleo\Examples\GPIO\GPIO_IOToggle

I don't care for the GDB/OCD, the Keil or IAR tools are more reliable.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

5 REPLIES 5

>>I'm a beginner.

Ok, this gives you some leeway, but explain your situations with some contextual detail

Can you indicate what board this is?

Something you constructed, a NUCLEO-F411RE, Black Pill, something else?

How and what pins connect to the ST-LINK?

Are you following some tutorial? Cite it.

Presumably you're using something like STM32 CubeIDE ?

Is the board accessible with tools like STM32 Cube Programmer?

Did the board work at some point, and then stop? I see the LED thing had worked. Does the board have any jumpers or switches on it?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
LBien.1
Associate II

Thank you for your help.

The full reference is : STM32F411RET6, I have installed all software, CubeProgrammer, CubeMX, and CubeIDE.

I connect the ST-LINK with a mini USB A-B.

I don't follow any tutorial, just want to try to run new project without code (except code and config from new project in CubeIDE) without bugs.

Yes the board is accessible with CubeProgrammer, I have try to erase flash memory, but nothing change.

I have check hard fault and this is good.

In addition, the green led (in the board, named LD2) is not working..Originally it blink rapidly. Like that : https://youtu.be/oAwZ0cjlmN8?t=69

@Community member​ 

STM32F411RET6 that's a chip part number, you have that on a white NUCLEO board like in the video?

Does STM32 Cube Programmer indicate any sort of error?

Can you perhaps build an example, and write the .HEX or .ELF file directly using Cube Programmer?

STM32Cube_FW_F4_V1.24.0\Projects\STM32F411RE-Nucleo\Examples\GPIO\GPIO_IOToggle

I don't care for the GDB/OCD, the Keil or IAR tools are more reliable.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

It work ! I write the example using Cube Programmer and it's good. I think I will do the job with classical editor and Makefile generated by CubeMX.