Andrea
Andrea

Reputation: 87

Dump the current firmware from an STM32 microcontroller

I'm working with a commercial device which uses a STM32F103RBT6 microcontroller. I need to replace the firmware to customize some functionalities, but before I would like to dump the current one to be able to restore it if it's needed. I connected properly the board to my ST-Link v2 programmer, the device is powered by the programmer and in fact when I plug it on the USB the device starts correctly. The problem is that I don't manage to connect to the microcontroller using the ST-Link utility, I always get a "can't connect" error (error message), trying with different settings.

I need to reset the chip before? How?

Thanks!!

Upvotes: 3

Views: 10504

Answers (1)

phodina
phodina

Reputation: 1441

Please check you have connected the JTAG/SWD signals from ST-Link debugger to correct pins on the target.

Also ensure the board is power.

Then check settings in ST-Link utility, check JTAG/SWD connection, speed and connect under reset which assert the NRST pin on the target in order to allow connection on JTAG/SWD pins.

If this doesn't work then it can be also the case that the MCU is protected against reading by setting an option byte (look for RDP2 in reference manual). If this bit is set then you won't be able to connect.

Upvotes: 3

Related Questions