3 New Notifications

New Badge Earned
Get 1K upvotes on your post
Life choices of my cat
Earned 210

Drag Images here or Browse from your computer.

Trending Posts
Sorted by Newest First

A new series of lessons. Study the STM32. Lesson 0

So taught we taught стм8, but we cannot stop, and who read the blog probably already saw that was very long ago already acquired STM32F4Discovery Board with STM32F407VG processor on Board. Actually with this card I will start to log the small steps into the world of STM32.

Yes, many may exclaim, — WHY? after all, there are long along and across the studied Megami with Atmel, Arduino and other almalatina and PIC etc.))). Someone even noted that ЅТМ32это stuff and need to go for expensive brother processors from Freescale, and the like. But then nobody calls something to jump on something to change. I like the products of STM all of its sides, and the fact that she captivated the world — this is its merit, as his Windows took over the world of computers. I'm here to teach STM32 , and who does not like it, go complain to your yard)))

Why СТМ32 not ATmega 2560 or AtXmega. To begin with, to start with, I advise you to see the prices. Here is a small example for comparison
СТМ32F030F4P6 -the kid in the lineup. Case TSSOP20, (48 MHz 16 KB Flash, 4 KB SRAM, 4 timers 16 bit, 11 channels 12-bit ADC 1 SPI, I2C and USART). Yes, of course, hard at first in this case to put on the Board, and the distance between tracks of 0.25 mm may be too hard to make, but this is just the cost.
Its price — 21грн

A new series of lessons Study the STM32 Lesson 0

Now let's try to find an alternative at least for simple type parameters memory
Attiny2313 — 36 UAH (1KB flash)
Atmega8 — 27 UAH (8KB flash)
Атмега16 — 52грн (16K flash)
STM8S003K3T6 — 21грн (8KB flash)
ATX Megi did not write as their price can not be folded

And now the whole thing Turkey-baste 32 bit math in a single cycle and get something that will not stop technical progress.

Who does not want to learn, one could in principle do all the logic to collect, it will work, but what if we all developed already.

So, what we all need to work with the STM32.
First — bought or processor, or as in my version — debug STM32 Discovery Board. I took one of the older boards in the line, so to say to have a "top" gun)) It then still useful.

Programmer
Who took — Discovery — to programmer. As in this case, the Board itself in addition to the debug and even performs the function of the programmer. You only need a USB->microUSB cable to work with a debug Board.

A new series of lessons Study the STM32 Lesson 0

For those who have no Discovery — for ridiculous money purchased here is a programmer ST-LINK V2 mini

A new series of lessons Study the STM32 Lesson 0

Also, for starters you can do a simple bootloader on the basis of UART Converter (FT232RL and the like), and fill the firmware via the UART, through ST-LINK Utility

Development environment
There is a choice of several options
IAR is a long — known but not paid (the free restriction code)
CooCox + GNU compiler — free option (one of the best)
Keil uVision 4\5 — paid, but possible options))

STM also made not quite long ago great decision STM32CubeMx program to set up all peripherals in any controller and receiving the finished project. the only thing simple this program cannot export the project in CooCox, but this is easily solved with a small dancing with a tambourine. BUT — SOLVED.

A new series of lessons Study the STM32 Lesson 0STM32CubeMX

This decision has become available since the release of the HAL library, which allows us for any STM32 processor with minimum changes to write the initialization of all of our peripherals, configure clocking, etc.

In the lessons I start with Keil and CooCox if you still like it — I will do your homework for the two environments.
At this point I think the entry can be finished (and what can I add on stuff). In the next lesson, Уроке1, we will study our program STM32CubeMX and create the first project of Hello World — blinking LEDs.

Thank you for your attention. Click the thumbs up!

214 Comments
Sort by:
s
starlifeofficial 31.07.19

First! Yay! Zhdems!

a
addelectronics 31.07.19

So, coke has got the accelerometer
The good people are already mudholes and realized that schmultzy put 2 LIS302DL (pryamougolnogo IN the square case.) In General it is necessary to understand, but I will say one thing only feeeee... dancing with a tambourine to reconcile with HAL, all the rest is of course kind of like more beautiful than keil. I might twist one and another and try to understand whether to bother on a particular compiler...

a
argoncik 31.07.19

No Cho don't know ! Got me into the dung, now to resolve ! :-))))

a
addelectronics 31.07.19

trying at the moment to have an accelerometer on Board kokosowski examples from the repository. The balalaika...
The values do not change for the life of me.

a
argoncik 31.07.19

Click I pulled the finger, but if not coconut, then waits for me wild sorrow (((

R
RavageR 31.07.19

I here do not rummage in electronica, read the blog for interesting

R
RavageR 31.07.19

Pieces for the machine. And recently became convinced that there are alternatives to industrial solutions.

Z
Zvir16 31.07.19

argoncik

Value it on the coconut until it is too late !

)))))

a
argoncik 31.07.19

I need to get out like that )))

a
addelectronics 31.07.19

No cheating)))

a
argoncik 31.07.19

Value it on the coconut until it is too late !

Z
Zvir16 31.07.19

All right, take out the fee and waiting for the next lesson! 5+

a
argoncik 31.07.19

It is the processor . It works according to the written program . And where you put it and that will make to do it is a private matter ))) One of the simplest examples www.drive2.ru/b/2142289/ it is Possible for a car to deliver, it is possible to switch on the TV or lights in the toilet ))

e
everkey 31.07.19

Yes it is clear that the crafts, the question is, is the chip tuning of the engine? or a bigger subwoofer doing?

a
argoncik 31.07.19

This article is for wrapped ))) Get a bag of happiness when something is done and it works . This is for example how to make a model of a high-rise building out of sticks, duct tape and something else . And when the customer wrote boiling water with delight, probably experiencing the same feelings ))))

e
everkey 31.07.19

like all words written in Russian letters... but like on a Chinese website visited with the characters. do not understand anything, but liked the style enjoyable.

V
VinserStyle 31.07.19

Waiting for the lessons, my boss at work makes learning programming a stm, but I have the 300 series. But basically all seems. About six months ago it got to the transmission via uart, now a bit forgotten, just read the lessons! Thanks!)\

w
wake-off 31.07.19

Don't like keil, I use eclipse+iar. Coconut is basically the same Eclipse.
What I don't like in STM-vskih stones, so it is documentation, at the same TI much easier.
As it was the case, with the same debug Board dabbled with EEPROMs tidy Passat)

a
addelectronics 31.07.19

Working on lesson number 1. Today I will lay out how to create a project in the cube, and move it to the coconut and blinked diode.

a
argoncik 31.07.19

Well, you see, and you were afraid . Now you only have to make the right decision in the direction of the coconut )))

a
addelectronics 31.07.19

All the LEDs blinked at HAL on the coconut

a
argoncik 31.07.19

All for you ! www.google.ru/?gws_rd=ssl...bs=lr:lang_1ru&lr=lang_ru

a
addelectronics 31.07.19

If I run HAL coke on the side of it

a
argoncik 31.07.19

Yeah, kanesh near Kyle dance is not necessary, tell also

w
wake-off 31.07.19

Stellaris launchpad Google

s
suvorovsurov 31.07.19

And ti is the replacement?

k
kilovoltik 31.07.19

well, again it depends. I in STM to dig in the scrap, but mater"Alec rules finger the top sticking out )))

a
addelectronics 31.07.19

This is actually three sewn)))

k
kilovoltik 31.07.19

2313 were made on a 5-transactions, but looking to build that, as for me every sculpts that are familiar

a
addelectronics 31.07.19

it is time...the time has come)))

R
RA1CAG 31.07.19

STM32F4Discovery lies a few years, all broke to study. Will follow :)

J
Jkill 31.07.19

thanks, I'll look

a
addelectronics 31.07.19

raspberry is as expensive as for this decision... стм32 head — so, 9 channels enough? processor stmf030f4p6 — savepic.org/7582180.jpg

J
Jkill 31.07.19

here you can see people in the thread, but I just have a noob question.
in your opinion what protovol database better, faster and easier :)) I know it's difficult combined
to do multichannel ADC, say, 5-10 channels with a normal resolution and log
STM, raspberry or maybe something else ?
binka dull and slow

M
Men-All 31.07.19

When moving to 16 and 32 bit Datasheet've realized that's not it, they are more sharpened by the media, but STM just under the car theme is very good, and a lot of brains now doing on the basis of STM. But in General, the core of them all one.

V
VakulyukMA 31.07.19

Thank you)

a
addelectronics 31.07.19

rusefi.com/wiki/index.php?title=Main_Page

rusefi.com/forum/viewforu...9e073540ccfe76d6d94090d8f

V
VakulyukMA 31.07.19

And can a reference on a thread of a similar project with the ECU? Interested) I was thinking Raspberry Pi's to master, the price is not very different from STM, and features a lot more. For comparison, Raspberry Pi — $ 2500 STM32 Discovery — 1500 R. average on Ebay. Correct me if I'm wrong.

a
addelectronics 31.07.19

Well, let's just say the network has a free project engine ECU (evolving) it was under this charge. So probably him and swung. But that's for the distant future. This monster can be used to build everything from home servers to monachovo brain to auto\aircraft\helicopter etc)))

V
VakulyukMA 31.07.19

I have a question — what do you build on it together?) Also like think about buying and learning this beast, but the hands are not reached. The speed of it are good, and the price I was not happy. I can't see anything what could not have done mega)

G
Gemini47 31.07.19

I also recently started working with semkami. Good controllers. I will follow with interest.

a
addelectronics 31.07.19

To collect for the machine projects on the STM32 controller. It is time to move on to serious projects not every morgalla\the tweeters

G
Gemini47 31.07.19

and what purpose? just study? or something to collect, for example, for the machine?

a
addelectronics 31.07.19

I know — very convenient feature! But thank you for reminding me, it is necessary to add to article

C
CEMA73 31.07.19

By the way, don't know or may not know, if the cube she had some leg to the periphery (e.g. USART1), you can hold down Ctrl and tyknut on this leg, and the cube will show at what pace you can reassign this leg USART1

a
addelectronics 31.07.19

CEMA73

Absolutely, choosing a microcontroller for a specific task, you need to imagine that it will be required at the moment and how you can develop the project on the current hardware. Again, if we make the simplest project, such as the extension turns, all we need is to monitor the status of the legs of the controller and, depending on a couple of conditions to change at a specified time as the other leg. Suppose we chose to тини13. And it will be enough even if you develop the project to the time delay state of one or the other leg. More in the extension of turns to do. With this task more than to cope with тини13. Besides, even the smallest, 32 nogi стм8 (in LQFP housing, TSSOP20 not consider :) ) we will create more inconveniences than 8-Nogaja тини13.

Another example: do the devil-box, which will over CAN-bus to communicate with the ECU and something to show, display, count, and so on... In this case will be much easier to use STM8AF6269 due to the built-in driver CAN and LIN bus (only need to agree on levels). While tiny and mega just so these tires will hook up hard.

For simple projects moved to the STM8 as they are at least 2 times cheaper with more capability. to write a project flashers under it — elementary.

A
ALL4SWAP 31.07.19

severely), the doctor told in a mortuary means in a mortuary! The pasta just has no choice ))

a
addelectronics 31.07.19

that any small spoon, such as for mustard etc .Sometimes the reverse side (flat) tweezer)))

A
ALL4SWAP 31.07.19

o_o
and how, too shy to ask, tinol from the jar into the syringe gets?

a
addelectronics 31.07.19

most dreary is the application of paste to the Board on the pads. Need a stencil of the mind to do, and then do one of the buzz Board to do. Well I have the old paint with a syringe with a cut needle.

A
ALL4SWAP 31.07.19

Unpleasantly surprised — the failure rate of products from the first batch ;-) due to cold soldering, bad tires, or something :-)

a
addelectronics 31.07.19

will be pleasantly surprised by the increased productivity of labor)))

A
ALL4SWAP 31.07.19

Thank you! somehow did not think to try. All the time only used it for the inverse problem

a
addelectronics 31.07.19

I solder a Hairdryer

A
ALL4SWAP 31.07.19

by air or in the oven?

a
addelectronics 31.07.19

the pasta — tinol — Smyk is not needed.

A
ALL4SWAP 31.07.19

and remover?

a
addelectronics 31.07.19

it is a matter of habit already. I use solder paste. Put circuits, heated — ready, next fee and it.d.

A
ALL4SWAP 31.07.19

manually soldering more difficult, especially if you need 10-20 pieces for the evening to collect

a
addelectronics 31.07.19

ALL4SWAP

Yes, in this project 8-nogi stone great benefit. By the way, why not consider SO20? In some cases it is better to have bigger legs and all settings are set via eeprom a stupid jumper, then selected clear just when looking at the cost, and even the dumbest user can easily change without quests in the style of dandy joystick (up-up-down-start-game 2 — COMBO!)

TSSOP-20 taxis))

C
CEMA73 31.07.19

And here is let the developers decide how and what it is better to do :) Someone prefer one, someone else... As they say, many people have many opinions :)

Someone makes the tuning buttons(oops). For example, the signaling STARLINE whole setup is button with j, and the indication of the selected menu items and values for those items displayed on regular diode signaling. The setting is on the table, and as these things often are configured once and for a long time, then this option is acceptable. And settings are stored in any case in EEPROM, either external or internal, either in one sector of flash [for example have no built-in STM32 eeprom].

A
ALL4SWAP 31.07.19

Yes, in this project 8-nogi stone great benefit. By the way, why not consider SO20? In some cases it is better to have bigger legs and all settings are set via eeprom a stupid jumper, then selected clear just when looking at the cost, and even the dumbest user can easily change without quests in the style of dandy joystick (up-up-down-start-game 2 — COMBO!)

C
CEMA73 31.07.19

Absolutely, choosing a microcontroller for a specific task, you need to imagine that it will be required at the moment and how you can develop the project on the current hardware. Again, if we make the simplest project, such as the extension turns, all we need is to monitor the status of the legs of the controller and, depending on a couple of conditions to change at a specified time as the other leg. Suppose we chose to тини13. And it will be enough even if you develop the project to the time delay state of one or the other leg. More in the extension of turns to do. With this task more than to cope with тини13. Besides, even the smallest, 32 nogi стм8 (in LQFP housing, TSSOP20 not consider :) ) we will create more inconveniences than 8-Nogaja тини13.

Another example: do the devil-box, which will over CAN-bus to communicate with the ECU and something to show, display, count, and so on... In this case will be much easier to use STM8AF6269 due to the built-in driver CAN and LIN bus (only need to agree on levels). While tiny and mega just so these tires will hook up hard.

A
ALL4SWAP 31.07.19

Why not стм8 then? After all, a simple project can suddenly escalate into a slightly less simple, and the price is comparable.

C
CEMA73 31.07.19

I agree :) But in this case I mean that STM for the simplest of projects is not the best choice, and that we must choose from something simpler :)

A
ALL4SWAP 31.07.19

for the simplest project better microchip
it can withstand more abuse before you die

C
CEMA73 31.07.19

Success in learning :-) I want to meet all rechasim: "ameeeeeeeen" and the like. STM, it's cool and for the money has many hardware peripherals, the stuff is powerful and voluminous (in terms of memory). And all she seemed good, But sometimes you really need to make a SIMPLE project where you really only need a diode to blink (and other stuff type of relux smooth ignition, extensions, turns, etc.) and then at an opportune choice has Datasheet (тини13, 2313, mega and someone like that), and everything is more complicated and more serious easier and faster to do on the STM. I govoryu as people working in this area :-)

A
AntoxaZ 31.07.19

stm cool stuff, especially F4. The IDE I recommend eclipse + GCC or coconut (it is on the basis of Eclipse made) in Keila poor text editor

p
pro5t 31.07.19

5 years ago moved from avroc on стм32 and peaks 24 and 32, there are a variety of designs on these percent: USPD my nook color modemy, Ethernet transmitters, 433 MHz radiomodem, computers, metering devices commercial. Aurki this last century. A couple of years ago, talked with Yuri Panchula, one of the developers of cores to peak 32 and he said what we have in Ukraine and Belarus are taught in the institutes initially Arki and transplant then someone is very difficult, my programmers move without problems and is now very happy!

o
ortst 31.07.19

in STM it is possible the ECU for the auto to do, the possibilities are impressive=)

D
Dominys 31.07.19

She will succeed! Important in STM to carefully read the documentation. After all, the whole power of the periphery, except that sometimes, in order to configure as you want, have pretty to smoke manuals.

a
argoncik 31.07.19

Here I am trying to get off the AVR , see what happens ))

D
Dominys 31.07.19

Himself sitting on STM. Very best thing! Atmeg difficult to climb, but then all happiness :)

o
ortst 31.07.19

Comment has been deleted

Really? when the time to do not heard...

A
AntoxaZ 31.07.19

Comment has been deleted

for each application their tools. Performance of f4 and f7 is sufficient for most applications except video perhaps. But if you consider the price then your good option. About the editor, the choice of someone that is convenient, after Eclipse in Keila in the past century feel

p
pro5t 31.07.19

Comment has been deleted

Well, maybe easy for you, it's fine, my programmer is also easy to move. When dealing with developers from all over the Union very difficult for many to move from AVR to pic or STM 32 24 and 32.

p
pro5t 31.07.19

Comment has been deleted

reliability is paramount and the price ol the series is less than that of cheap workstations

A
AntoxaZ 31.07.19

Comment has been deleted

I'm more for the controller software doing it, so Eclipse already familiar.

p
pro5t 31.07.19

Comment has been deleted

As shown by years of practice developments the reliability of the peaks apart from the competition, and cheap Armagh Klipat all and Sundry, where they are convenient somewhere not, for each percent your device and project. Prices mnogoseriyki including special different even from those you see on the manufacturer's website in the last row! And the topic here is not about the peaks, about a lesson on STM 32 so I'll bow out.

s
susskiy 31.07.19

that's for sure! while current master of piano))) although I understand that notes where it would be easier

a
argoncik 31.07.19

Here it is, or wear Pieniny, or worn notes ))))

s
susskiy 31.07.19

there is a cap! here is the current me with my stuff to sort out)))) and then there are 4 tidy, 2 living rooms and 2 full Pajero... when I mate this part to read if I don't have time to sleep))))

a
argoncik 31.07.19

Catch up until later forum-corolla.com/forum80/thread1538.html Sit with us on the train, and then fall behind )))

s
susskiy 31.07.19

After all of prochange and comments, I realized that I was even a soldering iron can't keep )))

G
Gazam 31.07.19

Oh, stm, I would like to try, but did not agree with toad)

f
f1y0rdie 31.07.19

With the FPGA to play more interesting...

a
addelectronics 31.07.19

the following lessons are read, everything is very razgovara

K
Kleetus 31.07.19

Not a fact, not a fact.Manual for dummies from beginning to your basics so to speak, and how what is programmed and what it's used for.

a
addelectronics 31.07.19

it means you don't need)

K
Kleetus 31.07.19

Oh damn my friend, I do not understand what is written here and why this is needed=)I Guess creepy vumnye.

D
Dreamer-nf 31.07.19

switched to STM32 with the Atmega is much easier, cheaper and faster. Very happy

a
andrey239 31.07.19

necessary to force yourself to take part :)

a
addelectronics 31.07.19

I saw, I know. Sometimes even a desire to participate)

S
SniZ 31.07.19

rusefi.com take a look

v
vovan256 31.07.19

Subscribe, count)) Can also change with the Datasheet.

a
addelectronics 31.07.19

I mean — if the training for a person to be humo sapiens is not in vain called himself

S
Slava771 31.07.19

what is all this for?

U
UA3MQJ 31.07.19

But maybe we're getting old, so the selection criteria for me was to study architecture over time, not gone (that knowledge in the trash not to throw). For this reason, I chose ARM and STM32 in particular, and not by comparing the frequency memory. At the time, tired of MK in principle, therefore, left to examine the FPGA — they are also universal and knowledge of them is not lost in time and during the transition, for example from Altera to Xilinx.

But the environment STM32CubeMx on the contrary — very much. In the first place so that you can all iron, all these fuzy that was to Atmel to configure visually and quickly. Plus, making sure that everything is correct (there is a lighting error). What setting clock frequency is! Separately want to say about FREE RTOS — parallel processes there are easier to create than on a PC.

In General, for what I don't love MK: need to read heaps of documentation (datasheets), the need for a lot of information to keep in mind, the sequence of work and impact of other software adding new blocks to the old. What type of made a light bulb, second, third, fourth and added all died. In short, all these problems are solved by the developers of the STM and can now focus on solving the problem, instead of struggling with the piece of iron.

We will continue to wait!

s
strvv 31.07.19

Comment has been deleted

try version control to use, as a significant commit... and immediately see step by step what he was doing.

s
strvv 31.07.19

ALL4SWAP

Miracles do not happen
No wonder STM automotive series is quite different money
Microchip has a deserved reputation of indestructible stone. What is this STM going to find out empirically

and car series — as I remember you have a Datasheet — it's just the inputs and outputs are additionally protected by external buffers from short-circuit to earth and Pitalovo and stands for nothing do you remember which manufacturer (some series of milandre toli toli niiet) power Manager — in short anything — goes Z condition on the inputs-outputs, but otherwise was a licensed clone of microchip felts felts Datasheet. but mikruhi for the gold price in the literal sense of the word.

s
strvv 31.07.19

it was all ancient chips. especially the wide application of type avrov and microchip. now it is not profitable — let them harness more of the position of producers.

A
ALL4SWAP 31.07.19

stm32 max 3.3 volt
And done they're probably more "subtle" manufacturing process than pic12/16/18

Two facts from the life of the microchip: withstands foot if the output short-circuit to ground, and short-term if you apply 12V on the input or output leg. I highly doubt that STM have similar properties.

But of course if you add protection and STM will normally live in the car.

s
strvv 31.07.19

basically take any old melkosopochnika, the same of K155, before they necrocom can also the odds to give.you have normally protected inputs-outputs, similar to do it from the STM and everything will be beam.
STM-Ki 1.8-5вольтовые, i.e. in principle should be OK. if not as a conventional processor to speed through currents (why are those almost all the time working in transition mode and guzzle energy into heat as the heaters), you're fine.

A
ALL4SWAP 31.07.19

Miracles do not happen
No wonder STM automotive series is quite different money
Microchip has a deserved reputation of indestructible stone. What is this STM going to find out empirically

s
strvv 31.07.19

this is long before C-C-szenczi happened. just microchip and al-stranded really just snickering at the domestic markets, which drew attention to this market and other players.
the fact that no other except the STM is until their marketing departments and strategic planning to sleep. by and large the core of cortexa simple, the cost is just no, and if STM in this segment will reach any significant volume, then begin a battle of the titans version N. M and will be dumping, then again all fall off, will stay 2-3 manufacturer in this market. prices grow. this was also seen on the PC market for 20 years. how many CPU and GPU manufacturers left, of sonicmega at least 2/3 of the market for 2! and to the point.

A
ALL4SWAP 31.07.19

Good stone
I do not know the sanctions or that, but from suppliers wonderful miracles are happening, 32-bit 48мгц STM is in 2 and more times is cheaper than an 8-bit microchip and have the same miserable Datasheet

a
addelectronics 31.07.19

taught

V
Vadimonchik 31.07.19

Let me ask - how do you know, self-taught or special education?

a
addelectronics 31.07.19

that is necessary as that to force myself to continue to write articles

T
Telfen 31.07.19

To get the website like about the car, and here's Klondike found) just Tmco gave to explore going to))