Getting Blinky to work on STM32 Value line Discovery board STM32F100RB

ProudPagan
Thu Feb 16, 2017 5:16 am
Hi All,

I have used the Arduino framework+IDE for AVR and ESP8266, but can’t get a blinky to work on the STM32 Value Line Discovery board STM32F100RB.

I have 2017.1.20 version of STM32F1xx Core installed. I see the code correctly compiled, linked and uploaded to the board:

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

ST-LINK SN : ST-Link/V1 on E:
ST-LINK Firmware version : V1J11S0 (Need Update)
Old ST-LINK firmware detected!
Please upgrade it from ST-LINK->'Firmware update' menu.
Connected via SWD.
Connection mode : Normal.
Device ID:0x420
Device flash Size : 128 Kbytes
Device family :STM32F100xx Low/Medium density Value Line

Loading file...
Flash Programming:
File : C:\Temp\arduino_build_193593\sketch_feb14a.ino.bin
Address : 0x08000000
Flash memory programming...
±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± 0%
0%ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 45%ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ 90%ÛÛÛÛÛ 100%
Flash memory programmed in 1s and 388ms.
Programming Complete.

MCU Reset.

Application started.


Pito
Sat Feb 18, 2017 8:24 pm
Did you compile for “Upload method STLink” ?

zmemw16
Sun Feb 19, 2017 12:36 am
tongue in cheek, maybe use the classic G Brown STM32 book for guidance.
i do know his sources and the SPL do compile and work on Linux. nod nod ;) ;)

stephen


ProudPagan
Tue Feb 21, 2017 8:29 am
Pito wrote:Did you compile for “Upload method STLink” ?

nikosx
Sun May 07, 2017 4:52 pm
Did you get the LEDS blink ? Had the same problem….

dannyf
Sun Jun 04, 2017 10:59 am
Any help would be greatly appreciated!

step through your code and see what changes to the gpio registers. pay particular attention to CR1/CR2.


KHODIDAS11
Fri Jan 26, 2018 9:51 am
I go t working, as i have selected board STM32VLD TO FLASH in ide. (borad has STM32F100RB and STM32F103 as stlink. it is a value line discovery kit from ST)

got function of blinky, pwm, and serial.

I find problem in serial, Serial pin is PA9-TX and PA10-Rx. I have changed crystal in Boards.txt as 10Mhz as mine board is having it.

I observed that on baud set 300 i am receiving data on 300 seems fin
on baud rate 600 i am receiving on 900
on baud rate 1200 i am receiving on 1800

why this happens,

if anyone can help


zmemw16
Fri Jan 26, 2018 11:27 am
try blinking the led at 30secs on and off and use a stopwatch ?

what was the crystal originally fitted ?

srp


KHODIDAS11
Fri Jan 26, 2018 11:47 am
I have checked it has to 8 Mhz, but i want to use 12Mhz and i FIxed it. Due to this probelm is occuring with baud rate.

Now , I wnat to change crystal setting in arduino ide from 8 to 12Mhz, how to do it?


zmemw16
Fri Jan 26, 2018 12:43 pm
you changed it from 8 to 12 and your serial has gone from 1200 to 1800, seems logical
apart from which why would you ?

fire up cubemx, set chip as stm32f100xx or whatever it is then play with the rcc peripheral to set crystal sources, then play in the clock configuration panel and see if you can actually get what you want.
if you can, then generate the code, check the clock setup for values, figure out where in the core to change.

no doubt there’s a better way

you might also do a forum search before all that above as i’m pretty sure 12MHz has come up before
stephen


mrburnette
Fri Jan 26, 2018 1:02 pm
Note: I have moved your post to a more appropriate forum

[ProudPagan – Thu Feb 16, 2017 5:16 am] –
Hi All,

I have used the Arduino framework+IDE for AVR and ESP8266, but can’t get a blinky to work on the STM32 Value Line Discovery board STM32F100RB.

I have 2017.1.20 version of STM32F1xx Core installed. I see the code correctly compiled, linked and uploaded to the board:
<…>

You are in luck in that the STM32VLDISCOVERY board is supported by this core: https://github.com/stm32duino/Arduino_Core_STM32

However IMO, your post should be posted in the Disco/Nucleo section of the forum: viewforum.php?f=48 (Moved)

Frederic Pillon (fpistm) can likely narrow down the issue quickly.

Ray


fpiSTM
Fri Jan 26, 2018 1:50 pm
Hi,
(Thanks Ray ;))
which core are you using? It is not clear?
This one is fully deprecated.
I have 2017.1.20 version of STM32F1xx Core installed

The STM32VLDISCOVERY is supported by this one:
https://github.com/stm32duino/Arduino_Core_STM32

If you change the Crystal then as Stephen said you have to configure the right clock setting.
You can do it by defining in your sketch the void SystemClock_Config(void)


Leave a Reply

Your email address will not be published. Required fields are marked *