cancel
Showing results for 
Search instead for 
Did you mean: 

How to get started on projects with the f030r8 - where to beign and code to use

Tejkaran Samra
Associate II
Posted on December 08, 2017 at 11:24

Hi guys

I will give a quick run down so you can gauge my ability, as well as how you can help - which I would very much appreciate

equipment I am using:

Nucleo F030R8

ST-Link v2

STM32CubeMX

Keil uVision5

I started using the Nucleo recently, and it has been a big step up . In the past I used the Arduino comfortably. I made an app for the iphone to control LED lights connected to a Teensy(Arduino adaptation in simple) via bluetooth. I also touched upon the ESP8266 and hosted a webpage.

Since stepping up to the Nucleo I have struggled. I use the STM32CubeMX and downland to Keil. I have done a basic �Hello World� program which is to light up LD2 on my Nucleo. Success (link I used-

http://www.instructables.com/id/STM32F103-Blink-LED/).

However, I feel stuck and unsure of what to do now. I do not know the commands to do things. When the code was downloaded to Keil there is a line that reads:

HAL_GPIO_TogglePin(LD2_GPIO_Port,LD2_Pin);

My understanding is this sets off the light when the button is pressed. However, how do I know what all the other commands are?

If I want to turn on the light, what do I do. and to turn off?

If I wanted turn on for 2 seconds, turn off for 1, how would I do that?

Then to advance, if i wanted to light up an external led on a breadboard, how would I go about that? and finally are there any projects you recommend I do to get stuck in?

Many thanks in advance, and I will reply as soon as I can

#code #beginner #f030r8
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on December 11, 2017 at 22:31

The file is part of the CubeF0 package, you can either unpack it directly, or use CubeMX and have that install it under the repository directory.

http://www.st.com/en/embedded-software/stm32cubef0.html

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

7 REPLIES 7
Posted on December 09, 2017 at 13:51

If you want to use the Cube HAL library, read its documentation

http://www.st.com/resource/en/user_manual/dm00154093.pdf

JW

Posted on December 09, 2017 at 15:17

Examples under the Cube F0 tree that toggles LED, one on board, but could be changed to use pin on Arduino header, etc

\STM32Cube_FW_F0_V1.9.0\Projects\STM32F030R8-Nucleo\Examples\GPIO\GPIO_IOToggle\Src\main.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on December 11, 2017 at 22:04

Hi JW,

thank you, however, do you know any shortened guides, or resources which focus on using the LED's?

Posted on December 11, 2017 at 22:05

Hi, I dont have the following file path on my computer.

also, I dont want to use an Arduino in any form, just Nucleo

Posted on December 11, 2017 at 22:31

The file is part of the CubeF0 package, you can either unpack it directly, or use CubeMX and have that install it under the repository directory.

http://www.st.com/en/embedded-software/stm32cubef0.html

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on December 11, 2017 at 22:39

The pin headers, including the Arduino header, provide an arbitrary point to which to connect a breadboard or LEDs.

I would suspect YouTube to be a good source of videos, tutorials and the like.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on December 11, 2017 at 22:44

Clive

thanks for the help, this is what i need...for now.

I have looked around for youtube videos, and maybe I am looking in the wrong places, but I did not find them so useful, or not aimed at the f030r8.

The file you said to download is a great starting point, and I am sure when I dig into it further I will begin to get a greater understanding

thank you!