Programming Nucleo F302R8

STM32F103 Nucleo boards e.g. STM Nucleo F103RB
Post Reply
Boian Mitov
Posts: 14
Joined: Sun Jul 09, 2017 9:03 pm

Programming Nucleo F302R8

Post by Boian Mitov » Sun Jul 09, 2017 9:09 pm

Hello everyone,
I am trying to program Blink on Nucleo F302R8.
It seems to upload successfully:

STM32 ST-LINK CLI v2.1.0
STM32 ST-LINK Command Line Interface

ST-LINK SN : 066EFF495056805087162434
ST-LINK Firmware version : V2J22M5
Connected via SWD.
SWD Frequency = 1800K.
Connection mode : Normal.
Device ID:0x439
Device flash Size : 64 Kbytes
Device family :STM32F301x4-x6-x8/F302x4-x6-x8/F318xx

Loading file...
Flash Programming:
File : C:\Users\mitov\AppData\Local\Temp\arduino_build_554753\Blink.ino.bin
Address : 0x08000000
Flash memory programming...
±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± 0%
0%ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100%
Flash memory programmed in 0s and 469ms.
Programming Complete.

MCU Reset.

Application started.

However there is no blinking :-( . I tried PA5, D13 and 13 as LED pins. None of them works :-(
Any suggestions?
I used the only available option from the menu - STM Nucleo F103B (STLink).

victor_pv
Posts: 1740
Joined: Mon Apr 27, 2015 12:12 pm

Re: Programming Nucleo F302R8

Post by victor_pv » Mon Jul 10, 2017 1:58 am

Boian Mitov wrote:
Sun Jul 09, 2017 9:09 pm

I used the only available option from the menu - STM Nucleo F103B (STLink).
That's the wrong option for programing and F302, the F1 and F3 series are not exactly the same.
Try selecting another F3 board better.

Boian Mitov
Posts: 14
Joined: Sun Jul 09, 2017 9:03 pm

Re: Programming Nucleo F302R8

Post by Boian Mitov » Mon Jul 10, 2017 6:10 pm

I installed the latest support from teh board manager:
https://github.com/stm32duino/wiki/wiki/Boards-Manager

Using:
https://github.com/stm32duino/BoardMana ... index.json

And installing:
STM32 Cores

The closest board I see seems to be :
Nucleo-64 / F303RE

I upload using the STLink.
It still does not work with it :-(

Sketch uses 10456 bytes (1%) of program storage space. Maximum is 524288 bytes.
Global variables use 3072 bytes (4%) of dynamic memory, leaving 62464 bytes for local variables. Maximum is 65536 bytes.
C:\Users\mitov\AppData\Local\Arduino15\packages\STM32\tools\STM32Tools\2017.5.12/tools/win/stlink_upload.bat COM12 {upload.altID} {upload.usbID} C:\Users\mitov\AppData\Local\Temp\arduino_build_585240/Blink.ino.bin
STM32 ST-LINK CLI v2.1.0
STM32 ST-LINK Command Line Interface

ST-LINK SN : 066EFF495056805087162434
ST-LINK Firmware version : V2J22M5
Connected via SWD.
SWD Frequency = 1800K.
Connection mode : Normal.
Device ID:0x439
Device flash Size : 64 Kbytes
Device family :STM32F301x4-x6-x8/F302x4-x6-x8/F318xx

Loading file...
Flash Programming:
File : C:\Users\mitov\AppData\Local\Temp\arduino_build_585240\Blink.ino.bin
Address : 0x08000000
Flash memory programming...
±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± 0%
0%ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 100%
Flash memory programmed in 0s and 657ms.
Programming Complete.

MCU Reset.

Application started.

What is strange on the USB Port now it shows it as :
COM12(Nucleo F103RB)
It could be because before I uploaded code generated for the F103RB.
What should I do?

Boian Mitov
Posts: 14
Joined: Sun Jul 09, 2017 9:03 pm

Re: Programming Nucleo F302R8

Post by Boian Mitov » Mon Jul 10, 2017 6:12 pm

This is how the Arduino IR reports the board now:

BN: Nucleo F103RB
VID: 0483
PID: 374B
SN: 066EFF495056805087162434

victor_pv
Posts: 1740
Joined: Mon Apr 27, 2015 12:12 pm

Re: Programming Nucleo F302R8

Post by victor_pv » Tue Jul 11, 2017 4:02 am

You are using the official STM core, so you may want to post here, that's the forum for that core:
http://www.stm32duino.com/viewforum.php?f=48

About seeing the 103rb serial, it could be that or it could be the virtual serial port from the stlink in that board.

vargham
Posts: 19
Joined: Thu Jan 26, 2017 3:49 pm

Re: Programming Nucleo F302R8

Post by vargham » Tue Jul 11, 2017 5:24 am

> The closest board I see seems to be: Nucleo-64 / F303RE
The MCU must be exactly the same.

Boian Mitov
Posts: 14
Joined: Sun Jul 09, 2017 9:03 pm

Re: Programming Nucleo F302R8

Post by Boian Mitov » Tue Jul 11, 2017 9:25 pm

vargham wrote:
Tue Jul 11, 2017 5:24 am
> The closest board I see seems to be: Nucleo-64 / F303RE
The MCU must be exactly the same.
As you can see from my post the F303RE fails :-( .
I may have damaged the firmware on the board. How to update the Firmware?

vargham
Posts: 19
Joined: Thu Jan 26, 2017 3:49 pm

Re: Programming Nucleo F302R8

Post by vargham » Wed Jul 12, 2017 3:50 am

I may have damaged the firmware on the board.
I don't think. There are two MCUs on the board. The target: STM32F302, and the debugger: STM32F103. The debugger has its own firmware. You can alway upload new firmware to the target MCU. Try to connect with ST-Link utility to check debugger. http://www.st.com/en/embedded-software/ ... nk004.html

The fastest and easiest way to check your board:
Register at https://developer.mbed.org
Add Nucleo F302 to your boards https://developer.mbed.org/platforms/ST-Nucleo-F302R8/.
Import Nucleo blink led to online compiler https://developer.mbed.org/teams/ST/cod ... 0/main.cpp.
Compile, and upload the bin to the board. You can use the USB mass storage mode or ST-Link Utility.

Or, here is the compiled blinky for you:
Nucleo_blink_led_NUCLEO_F302R8.bin.txt
(21.2 KiB) Downloaded 14 times
You have to remove .txt from the end.

Post Reply