cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX - problem after F1 FW package actualisation

samat0513
Associate II
Posted on July 10, 2016 at 21:43

Hello,

I've got a problem with connection error to the target in ST-Link Utility in every program generated by CubeMX with newest FW package for STM32 F1 family (1.4.0). After download program to uC there is error and information that I should choose option ''Connect Under Reset'', but it doesn't work correctly. I checked my program under F1 1.3.1 package on my colleague's PC nad everything is ok. How to back to previous FW? When I uninstal actual FW and install 1.3.1 Cube still want 1.4.0 FW.

#stm32-f1-firmware
4 REPLIES 4
Posted on July 10, 2016 at 22:01

Start perhaps by assuming the problem isn't with CubeMX, but rather with the ST-LINK and it's connection to your board. Make sure you have the most current firmware and drivers for the ST-LINK, by downloading and using the ST-LINK Utilities.

You don't mention a specific board, but you'd want to double check the connectivity if it has a problem restarting and downloading code.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
samat0513
Associate II
Posted on July 10, 2016 at 22:46

I've got Nucleo-F103RB. I'm sure that fault is on STM32CubeMX side. ST-Link works great. Here is console for project using F1 FW 1.3.1:

22:40:50 : [przycisk_dioda.bin] opened successfully.

22:40:50 : [przycisk_dioda.bin] checksum : 0x000647BE 

22:40:51 : ST-LINK SN : 066BFF545454885087244619

22:40:51 : ST-LINK Firmware version : V2J24M10

22:40:51 : Connected via SWD.

22:40:51 : SWD Frequency = 1,8 MHz.

22:40:51 : Connection mode : Connect Under Reset.

22:40:51 : Debug in Low Power mode enabled.

22:40:51 : Device ID:0x410 

22:40:51 : Device flash Size : 128KBytes

22:40:51 : Device family :STM32F10xx Medium-density

22:40:53 : Memory programmed in 0s and 516ms.

22:40:53 : Verification...OK

22:40:53 : Programmed memory Checksum: 0x000647BE

22:41:18 : ST-LINK SN : 066BFF545454885087244619

22:41:18 : ST-LINK Firmware version : V2J24M10

22:41:18 : Connected via SWD.

22:41:18 : SWD Frequency = 1,8 MHz.

22:41:19 : Connection mode : Normal.

22:41:19 : Device ID:0x410 

22:41:19 : Device flash Size : 128KBytes

22:41:19 : Device family :STM32F10xx Medium-density

22:41:23 : Flash memory erased.

22:41:26 : Memory programmed in 0s and 531ms.

22:41:26 : Verification...OK

22:41:26 : Programmed memory Checksum: 0x000647BE

And here is console for the same program but using F1 FW 1.4.0:

22:43:40 : [test.bin] opened successfully.

22:43:40 : [test.bin] checksum : 0x0004ECE0 

22:43:44 : Memory programmed in 0s and 500ms.

22:43:44 : Verification...OK

22:43:44 : Programmed memory Checksum: 0x0004ECE0

22:43:44 : Disconnected from device.

22:43:44 : Connection to device is lost: check power supply and debug connection.

22:43:44 : If the target is in low power mode, please enable ''Debug in Low Power mode'' option from Target->settings menu.

The problem is that I can't back to F1 FW 1.3.1. I can use 1.3.1 for working project, because I click on Continue (without migration to 1.4.0). When I create a new project I have only 1.4.0.

Program in uC works but connection is lost. After download F1 FW 1.4.0 program to uC next connection can be realised only in ''Connect under reset'' mode and anyway there is always the same error as above and program downloaded to uC works. I can't use STM Studio because of connection error to the target. 
Posted on July 10, 2016 at 23:31

This doesn't seem to be current ST-LINK firmware, please update that so we don't have to relitigate old issues.

Disconnection can occur if the chip goes into low power mode, or the GPIO pins used by the ST-LINK are altered or remapped. Make sure the pin definitions for PA13 and PA14 are committed to the debug interface, and debug mode for SWD is selected, within Cube.

There are several posts on the forum related to the debug interface and Cube.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
samat0513
Associate II
Posted on July 11, 2016 at 22:58

My ST-LINK has the latest firmware now. I created a project in Cube for this particular board, not just for same uC as before. There are SWD pins defined in uC's pin view. Problem after downloading program to uC is the same. Nothing new. The configuration steps in Cube are the same as I always did.

________________

Attachments :

swd.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzRX&d=%2Fa%2F0X0000000bLy%2FN9SsW_Ft59NLXZGiYLs5PNWlMMdaUkLcllvt8qFfTT4&asPdf=false