Author Topic: Any good learning resources for STM32?  (Read 3392 times)

0 Members and 1 Guest are viewing this topic.

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Any good learning resources for STM32?
« on: December 21, 2015, 11:16:40 pm »
I'm looking for a good resource for learning to use the STM32F0x series.

There is the datasheet, programming manual and reference manual, but they are more useful as references than as a way to learn the basics. There's a lot of forum posts, blog posts and code examples around, but picking up knowledge from such fragmentet sources is a confusing way to get started.

Are there any good books, comprehensive tutorials, online courses etc.?
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Any good learning resources for STM32?
« Reply #1 on: December 21, 2015, 11:54:35 pm »
It really depends on what you are trying to learn and how you intend to use the chips (and how comfortable you are with coding a mcu).

Generally speaking, the datasheet (reference manual in this case) is really the only good way (and in my view the best way) to learn about a chip. Yes, the learning curve is quite steep but after awhile you get your way around it.

Most of those chips are not meant to be coded in assembly. So unless you are doing something extraordinary, reading the ARM instruction book (and the "definitive guides" from Yiu) is of no practical value to a practitioner - I have all of them and I rarely read them.

Most of those chips are programmed through libraries, mostly with OEM libraries and sometimes with proprietary firm-specific libraries. Generally speaking, there is no good resource for those libraries - you pretty much have to reverse engineer the code by cross-referencing the code to the datasheet(=reference manual here). The level of difficulties here depends greatly on the quality of the libraries you use and examples provided by the library vendors. Unfortunately, ST isn't well known for providing quality libraries, to put it mildly if you stick with the OEM library (=standard peripheral library. The Cube is far worse and in my view should be avoided at all cost).

So the best advice I can give you is to read the datasheet/reference manual as many times as you can, and then practice coding as much as you can.
================================
https://dannyelectronics.wordpress.com/
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4195
  • Country: us
Re: Any good learning resources for STM32?
« Reply #2 on: December 22, 2015, 06:51:02 am »
The datasheet ("reference manual") isn't too bad, especially with several different libraries to compare it to (by looking at the source code.)
An additional problem with the libraries is that they aren't documented well enough to EXPLAIN the hardware, and they're not abstract enough to permit you to get by without understanding the hardware.  The 32f0xx chips should be relatively simple compared to the bigger chips, I think.
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: Any good learning resources for STM32?
« Reply #3 on: December 22, 2015, 08:35:26 am »
I'm looking for a good resource for learning to use the STM32F0x series.
There is the datasheet, programming manual and reference manual, (..)
Are there any good books, comprehensive tutorials, online courses etc.?
I'd start from listing of thorough understanding of ANSI C (and friends), then comes tweaking of the toolchain (that is: compiler, linker, librarian, simulator, debugger) and accompanying environment (at least: make, version control and unit testing suite). After that there is the underlying Cortex M core (M0 in your case) and finally the peripherals on top.

If your question is about the peripherals then bare metal Standard Peripheral Libraries (SPL) from STM are quite easy to understand and well documented, each peripheral comes with number of dumb 101 examples.

However, Cortex-M are designed to operate with OS (to reduce development cost) so bare metal SPL clearly stands in contradiction with that. You can Hello World or blink a LED with SPL but forget about running multiple threads on one uC with SPL - no concurrency, no reentrancy, no resource protection.
So STM released the Cube version of peripheral libraries that do support OS environment (with protection) and although you can theoretically use Cube for bare metal and ignore the OS mechanisms involved, that is not what it was designed for. Using Cube requires deeper understanding of what is going on than dumb SPL because it involves a lot of OS-necessary code (that can be ignored or even commented-out for bare metal stuff).

If you are already proficient in underlying vendor-independent stuff then I'd suggest the SPL and examples there as next.

EDIT: The new OS-aware peripheral library from STM Cube is called "HAL Library", which stands for: Hardware Abstraction Layer.
Whatever.
« Last Edit: December 22, 2015, 05:09:03 pm by Brutte »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf