cancel
Showing results for 
Search instead for 
Did you mean: 

How do I learn STM32 programing?

Ken Inoue
Associate III
Posted on March 12, 2017 at 15:15

I'm Japanese student, so I'm poor english.

How do I learn STM32 programing? I want to learn how to use ADC, PWM, 

Interrupt handling etc. Is there document or Video/Web seminar for novice? I want documents and video that is very easy to understand.

I have 

NUCLEO-F334R8, 

Discovery kit with STM32F334C8 and 

NUCLEO-F103RB. I have installed STM32Cube MX and IAR Embedded Workbench and I can run example code. 

#how-do-i-learn-stm32 #how-to-start
17 REPLIES 17
Posted on March 12, 2017 at 15:46

I would suspect YouTube would be a good place to start.

The Cube install has a lot of example code installed underneath it, if you have other programming and C coding experience you should review those

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
abdou si
Associate III
Posted on March 12, 2017 at 16:42

i thik you have to start programming your stm32 whith  

https://developer.mbed.org/

   you can found a lot of exemples 
S.Ma
Principal
Posted on March 12, 2017 at 17:34

It depends on your current know-how and past experience, known programming language and if the interest is in the C embedded programming or driving HW components from STM32. Do you have oscilloscope access?

(Logic Analyser would be the common tool for linux user and oscilloscope for microcontoller users 

If coming from linux background, a soft start on microcontroller could be by using Javascript or Python on STM32.

Posted on March 13, 2017 at 02:10

Thank you for your reply. Which should I choose mbed or HAL?

Posted on March 13, 2017 at 02:46

Thank you for your reply. I have written C language in class. I have used a PIC microcomputer in class. I want to make electronic circuits with STM32. For example, buck converter. Buck converter is a power conversion circuit. I have 

oscilloscope access. I'm Windows user. How do I learn STM32 programing? 

Thank you for taking time to reply.

Imen.D
ST Employee
Posted on March 13, 2017 at 10:52

Hi inoue.ken,

Welcome to STM32 community.

As novice user, refer to this

http://www.st.com/content/ccc/resource/sales_and_marketing/presentation/product_presentation/37/55/ff/bc/a8/71/4f/c5/stm32_embedded_software_offering.pdf/files/stm32_embedded_software_offering.pdf/jcr:content/translations/en.stm32_embedded_software_offering.pdf

to have more idea about STM32 Embedded Software offer (feature and limitation of Cube LL , SPL, CubeHAL, Mbed ... ) 

This will help you to decide what solution to choose.

I recommend you to use STM32 Nucelo board is a low-cost and easy-to-use development platform used to quickly evaluate and start a development with an STM32.

I'd highly recommend you also to have a look to these two documents, they provide guidelines on how to build and run a sample application around the STM32 Nucleo board.

• 

http://www.st.com/content/ccc/resource/technical/document/user_manual/1b/03/1b/b4/88/20/4e/cd/DM00105928.pdf/files/DM00105928.pdf/jcr:content/translations/en.DM00105928.pdf

•

http://www.st.com/content/ccc/resource/technical/document/user_manual/98/2e/fa/4b/e0/82/43/b7/DM00105823.pdf/files/DM00105823.pdf/jcr:content/translations/en.DM00105823.pdf

STMicroelectronics STM32 families of 32-bit ARM® Cortex® -M core-based microcontrollers are supported by a complete range of 

http://www.st.com/ja/development-tools/stm32-software-development-tools.html?querycriteria=productId=SC2106

.

You may have a look to the 'Getting started' manuals which allow you to go step by step to install tools and start your project.

Regarding the way to start in order to develop your application, you have various choices:

To have idea about mbed and supported features, you can have a look on mbed docs, cookbook.

More that, you may find on

http://www.st.com/content/st_com/en/support/learning/video-page.html?q=STM32&page=1

many videos about STM32.

Hope this helps you

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on March 13, 2017 at 11:19

Hello Inoue, 

Have a look at the STM32F334 Discovery board which has digital power supply HW and SW. It may be a good starting point.

http://www.st.com/en/evaluation-tools/32f3348discovery.html

 
Henrik Sandaker Palm
Associate II
Posted on March 16, 2017 at 18:51

I've had great help from this book/e-book:

Mastering STM32

A step-by-step guide to the most complete ARM Cortex-M platform, using a free and powerful development environment based on Eclipse and GCC

https://s3.amazonaws.com/avatars.leanpub.com/avatars/546701/tiny/io1.jpg?1445068020

https://leanpub.com/u/carminenoviello

https://leanpub.com/mastering-stm32

Posted on March 16, 2017 at 18:58

I suggest that you choose a small project to get you started. Not complex. A single goal. As a suggestion, a 5 kHz square wave, with a 30% on and 70% off duty cycle. Your second project could be more ambitious, possibly responding to a high to low event with an interrupt that signals the event by turning on an LED.

There are two free tools that you can write this code with, Atollic True Studio or SW4STM32 (System Workbench for STM32) AC6. True Studio has the advantage that when you upgrade to the Pro version, your code does not need to be modified for a different tool.

STM32Cube set's up all of the complex clocks inside the STM32 device for you, and is a good starting point. There are numerous example code samples and projects within each STM32Cube Library for each of the STM32 chips, you ca examine these to see how things are done.

The very first code sample I created was on the STM32F4 Discovery board, flashing the LEDs at different rates, and responding to the blue pushbutton.

I wish you the best, the STM32 family is a solid blending of ARM and Peripherals.