Topic : cortex_pgm fails to program STM32F401

Forum : ARM

Original Post
Post Information Post
May 2, 2014 - 5:02pm
Guest

Hi,
I need help with the command line utility: cortex_pgm. I am getting one of two errors when programming an STM32F401RCT6 device. The following are the logs from cortex_pgm for each error, please note the change in the target between the two commands.
Command: cortex_pgm TSTM32F401xC O1,0xFF,0xFFFF P"Bootloader.hex"
Cortex_pgm:
software for programming Cortex microcontrollers using a RLink.
Copyright (c) KEOLABS S.A.S. 1987-2013. All rights reserved. Raisonance is a KEO
LABS brand.

(0)
Selecting target: STM32F401xC...
(0)
Selecting Option Bytes to write: RDP=Protected, USER=0xFF, WRP=FFFF
(0)
Configuring RLink Driver... OK

Connecting to RLink... OK
Connecting to target STM32F401xC ... OK
Silicon Revision Id: 0x00006423.
Option bytes: RDP=0xAA, USER=0xEF, WRP=0x3000
Measured Target Voltage : 3.3V.
OK
(1)
Programming file Bootloader.hex to Flash and Configuration...
(8) !!! Error 102:
Timeout error when programming Flash.
or
Command: cortex_pgm TSTM32F401RCT6 O1,0xFF,0xFFFF P"Bootloader.hex"
Cortex_pgm:
software for programming Cortex microcontrollers using a RLink.
Copyright (c) KEOLABS S.A.S. 1987-2013. All rights reserved. Raisonance is a KEO
LABS brand.

(0)
Selecting target: STM32F401RCT6...
(0)
Selecting Option Bytes to write: RDP=Protected, USER=0xFF, WRP=FFFF
(0)
Configuring RLink Driver... OK
Connecting to RLink... OK
Connecting to target STM32F401RCT6 ... OK
Option bytes: RDP=0xAA, USER=0xEF, WRP=0x3000
Measured Target Voltage : 3.2V.
OK
(0)
Programming file Bootloader.hex to Flash and Configuration...
(6) !!! Error 103:
Timeout error when synchronizing with plugin after launching it.
RLink is connected to my target processor using the STM32F401's SWM lines. What is confusing to me is that the RFlasher7 is able to read and program the device without issue.
Has anyone else experienced this issue, and has a solution?
Is there a different command line utility which will allow me to program an STM32F401 device?

Rlink Standard Device Firmware Version: 0.0.3
RKit for ARM Version: 1.52.13.0324 (RKit-ARM_1.52.13.0324)
Ride7 Version: 7.48.13.0324 (Ride7_7.48.13.0324)
Thanks in advance!

Replies
Post Information Post
+1
0
-1
May 7, 2014 - 4:32pm
Raisonance Support Team

hello,

Please, first of all you must erase your flash and next try to add "user" and "WRP"options byte in default mode (0xEF, 0x3FFF)
ex:
cortex_pgm TSTM32F401xC E BC O1,0xEF,0x3FFF PBootloader.hex

Let use know if it solved the issue.

Regards,