cancel
Showing results for 
Search instead for 
Did you mean: 

Please help a confused soul

luch
Associate III

Hello everybody!

I've been watching/reading this forum for a while now, trying to enlighten myself, but without success. So, this is my first question...

While not being new to electronics, microcontrollers and programming, I am new to ARM. I've spent the last (more than) two weeks reading hundreds of pages (reference&technical manuals, etc.), forums, blogs, tutorials, you name it! At the end of all this, I thought I understood something... but it looks like the more I read, the more overwhelmed and confused I am... Anyways, I tried to apply my new and hard gained knowledge by writing some simple programs.

But how?! The some chaotic (to me) mountain of information about these micros, reigns in the software domain too. There is a myriad of IDEs and command line tools to choose from, then HAL/LL/Standard Library, etc. I've tried quite a few of them (Keil uVision, Eclipse, Cube[F1|MX]) without great reasonable results.

What I am trying to achieve is some intimate knowledge of the peripherals of these amazing micros and a set of software tools that would allow me to write decent programs for them. It would be great if the software would be able to simulate the programs, so I can run them step by step and... observe and learn!

I've purchased already a few boards (STM32F1 Value line discovery, STM32L476 Nucleo-64 and a couple of BluePills w. STM32F103C8T6), a Logic Analizer, a scope, etc. In other words, I'm ready! Only my mind refuses to participate!

And here come the question: where/with what should I start? what should I read/learn and, more important, what should I not? what tools do you recommend (I know this is a hard one)? By the way, while I use Ubuntu daily and I am not allergic to command line tools, I would prefer Windows and an IDE... Not because I don't hate myself enough, but because at least now, while learning, I'd like to be focused more on the controller itself than on the tools.

I apologize for the length of this post (it shows my frustration) and I'm looking forward to hearing your opinions!

Many thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hello @luch​ ,

I recommend you to review the online-education program: STM32 step-by-step makes the programming of STM32 and learning of ecosystem installation basics easier.

https://community.st.com/s/question/0D50X00009nKcgoSAC/do-you-know-stm32-stepbystep-

Kind Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

13 REPLIES 13
S.Ma
Principal

Start from the nucleo. Read the reference manual and datasheet of the chip first.

The reference manual describes the IPs in the chip

The datasheet describes for a specific device and package the memory mapping, the pinouts and alternate functions (going to peripherals) and electrical/timing tables.

Install cubemx.

Browse the cube, find the nucleo and example code.

There are several examples per peripherals showing the different ways to handle a peripheral.

Examples demonstrate the peripheral functionality.

To build an application with STM32 talking to other chips will be the next step.

AvaTar
Lead

If Cube is a the best thing to start with is a matter of debate. But the most often sought use cases should work, and relieve from poring over docs initially.

I used to investigate the details of certain peripherals only after I got a ST example up and running. At that time, with the StandardLib, not yet Cube.

> I've purchased already a few boards (STM32F1 Value line discovery, ...

I would consider the VL discovery as obsolete. The STLink V1 on that board is a mess.

> By the way, while I use Ubuntu daily and I am not allergic to command line tools, I would prefer Windows and an IDE...

I suggest to check out Crossworks for ARM (Rowley). It supports Windows and Linux (and Mac), and has a limited free Versions. And, it has very reasonable prized private licenses.

I'm using it mostly under Linux, but even the private license allows you to have multiple installations on different platforms.

Whichever IDE, I'd recommend to get a loopdelay-based blinky (aka embedded hello world) up and running as soon as possible. And evolve from that through timer-polled, timer-interrupt, direct-timer-output etc.

I recommend against using Cube or any other such "library", as they IMO unnecessarily get into way so any initial perceived "speed gain" is paid back later often several times later; but my view is considered here extreme.

JW

[erased double post]

Imen.D
ST Employee

Hello @luch​ ,

I recommend you to review the online-education program: STM32 step-by-step makes the programming of STM32 and learning of ecosystem installation basics easier.

https://community.st.com/s/question/0D50X00009nKcgoSAC/do-you-know-stm32-stepbystep-

Kind Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
luch
Associate III

Thanks for answering! Wow! - I started actually from the other (low) end - VLDiscovery. I thought learning things in increased complexity would be easier and faster. You might be right: once such a M4 beast is well understood, it would be probably child's play to learn the M3 league...

I already have 'the Cube' installed; and speaking of - that's just another confusion - I have 2 installed: the CubeMX and the Cube1, which allegedly 'refers specifically to the STM32F1xx members of the family'. It is still not clear to me if this setup makes sense.

luch
Associate III

Thanks AvaTar! I agree with you about Cube - it kind of walks you blind to a destination - it might be fast, but not necessarily optimal or helpful for learning. But I think I can ignore that for now - like you said, I need to get a simple (blinky) program running and start from there investigating the peripherals (Intrerupts, DMA, Timers, USART, ADC, etc.). It sounds simple, but it isn't quite! Once I've got there, using CubeMX and HAL, i was stumped at writing the first line of code: how do I refer to a peripheral? using HAL? LL? STDLib? what functions are available? were are they?...

Thanks! I agree with you: this is also how I usually learn. I am old school - I prefer to read a (well written) book and take the time to understand it well, instead watching some half-backed 'explanation' on YouTube!

And yes, nowadays, such an approach would be considered 'extreme'!

However, like I mentioned in my answers to our other members, I would just use the Cube to reach my goals for now, being aware of its shortcomings.

luch
Associate III

Thanks Imen! I'm checking that right now. It looks interesting!