Getting Blinky to work on STM32 Value line Discovery board STM32F100RB

Any other STM32 based boards
Post Reply
ProudPagan
Posts: 3
Joined: Wed Feb 15, 2017 4:47 am

Getting Blinky to work on STM32 Value line Discovery board STM32F100RB

Post by 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:

Code: Select all

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.

But I don't see the LED flashing. I am using the on board LED connected to GPIO port PC9.

This is the code:

Code: Select all

const int MYPIN = PC9;


// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(MYPIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  
  digitalWrite(MYPIN  , HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1500);                       // wait for a second
  digitalWrite(MYPIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1500);                       // wait for a second

}
Any help would be greatly appreciated!

Thanks

PP

User avatar
Pito
Posts: 1273
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Getting Blinky to work on STM32 Value line Discovery board STM32F100RB

Post by Pito » Sat Feb 18, 2017 8:24 pm

Did you compile for "Upload method STLink" ?
Pukao Hats Cleaning Services Ltd.

zmemw16
Posts: 1265
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Getting Blinky to work on STM32 Value line Discovery board STM32F100RB

Post by 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
Posts: 3
Joined: Wed Feb 15, 2017 4:47 am

Re: Getting Blinky to work on STM32 Value line Discovery board STM32F100RB

Post by ProudPagan » Tue Feb 21, 2017 8:29 am

Pito wrote:Did you compile for "Upload method STLink" ?
Yes, I see only STLink as the upload method -- and I used that. I see lights on the board flashing for a few seconds, so I think upload
is done correctly.


Thanks for all help.

--PP

nikosx
Posts: 7
Joined: Sun May 07, 2017 4:33 pm

Re: Getting Blinky to work on STM32 Value line Discovery board STM32F100RB

Post by nikosx » Sun May 07, 2017 4:52 pm

Did you get the LEDS blink ? Had the same problem....

dannyf
Posts: 64
Joined: Wed May 11, 2016 4:29 pm

Re: Getting Blinky to work on STM32 Value line Discovery board STM32F100RB

Post by 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.

Post Reply

Who is online

Users browsing this forum: mitchmitchell and 2 guests