Dave takes a look at the ST STM32 L1 series low power ARM chips, and gets a cheap STM32L152C development board up and running with the IAR Embedded workbench compiler and STLINK/V2 interface.
Also a look at the STMcubeMX code initialisation application.
http://amzn.to/29CrU47
32L152CDISCOVERY http://bit.ly/29wtzqH
Schematic & User Manual: http://bit.ly/2aaEXWo
System Workbench for STM32
http://bit.ly/29TikGi
PIC32MX: http://www.microchip.com/wwwproducts/en/PIC32MX320F128L
Forum: http://www.eevblog.com/forum/blog/eevblog-900-stm32-arm-development-board/'>http://www.eevblog.com/forum/blog/eevblog-900-stm32-arm-development-board/
EEVblog Main Web Site: http://www.eevblog.com
The 2nd EEVblog Channel: http://www.youtube.com/EEVblog2
Support the EEVblog through Patreon!
http://www.patreon.com/eevblog
EEVblog Amazon Store (Dave gets a cut):
http://astore.amazon.com/eevblogstore-20
T-Shirts: http://teespring.com/stores/eevblog
💗 Likecoin – Coins for Likes: https://likecoin.pro/ @eevblog/dil9/hcq3

Hi Today we're going to take a look at the St Stm32 Arm Cortex-m 3 chipset and a very low cost development tool for this. This is basically for me to get up to speed for the Stm32 ARM Cortex our chipset the development system. things like that because one of my new products is going to be using this chip and I'll mention that in a minute now. I've got a new set up today I'm obviously doing a webcam capture here at my desk and I can do funky stuff like go over to my screen capture and embed my little head down in the corner and hello I can play around with the actual board and this is the board that we've actually got here today.

it's the let's go over it is the Stm32 El Discovery Kit and this thing is only here it is. It's only 13 bucks 83 on digi-key so it cost bugger-all I Got it from local art files that cost a bit more but they had it available so it's extremely low cost. They're practically giving the thing away and it's a very powerful art micro which we'll take a look at now. this is what we've got.

the Stm32 El Discovery Kit. This is for the Stm32 El series not to be confused with a regular Stm32 series St and most of the manufacturers out there have a plethora of different chip sets and different series and this subtle variations between them. but this is the El and if you might be able to guess what that stands for stands for low-power and some of the features aren't this is why I'm particularly choosing this chip as I'll go into in a minute is its low power functionality. but this is a nice little board with the chip set the programmer and debugger built in and also a little arm LCD as well because I'm using it in an LCD application and we're going to try and get this thing up and running and see what it can do.

Now somewhat confusingly, this is the 32 L 1, 5, 2 C and that is different from the actual chipset I'm using product which is the D chipset, the one-five 2d and they are different chips. You can actually get a development board for the one V 2d, but it's like 300 bucks here and well, yeah, no, but this C version here is practically an identical eye chipset and it's 13 bucks. It's just crazy. and it's got an in circuit our programmer built into the thing as well and if we actually have a look at the data sheet for the differences between the one V 2d and the C one, that they're basically very, very similar.

The only difference is that the D version that I'm using my product comes in well. it's got more memory. it's got a 384 K a flash, but it comes in 144 PL QFP package there l whereas the one the C version that we're looking at only goes up to 256 K and only goes up to a hundred pin QFP package. But apart from that, they're you know, very basically identical chips.

really. Now let's take a look at some of the functionality of the Stm32 L chipset and obviously ultra-low power. They've put that like first, right up the top of the datasheet. There's a reason for that is because it is pretty done low power and it operates from one point 6 5 volts to 3 point 6 volts Point 219 nano amps in standby mode.
it's got three different wakeup pins: one point One five amps, micro amps, micro amps standby mode including the internal real-time clock. that's very good. 440 nano amps stop mode and it's can use 16 different lines to wake the thing up like if you press a button or something like that. That's what the wake up lines mean.

If you hook up a button to one of the external inputs, for example, you have a keypad then that can wake it up out of that and it's got an eight point six micro amp low-power run mode. So that would be using the internal like 32 Kilohertz oscillator to do that. but when you're using external crystal 185 micro amps per megahertz run mode, the D version is actually a bit more. It's 230 micro amps per megahertz in run mode.

It's a bigger processor, it's got more memory and stuff, but apart from that, they're pretty identical. in our 10 nano amps, I/o leakage, and all that sort of stuff. Anyway, it's an Arm Cortex M3 processor. works from 32k up to 32 megahertz.

Yeah, the MIPS per megahertz if you're into that sort of thing. It's got a memory protection unit, blah blah blah, ultra-low voltage detector, all that sort of stuff. It's got an internal 32 Kilohertz oscillator with RTC and it's also got an internal high speed oscillator as well. plus minus one percent.

That's pretty done. handy. And as I said, the low-power 37 Kilohertz 30 I think I said 30 before 37 kilohertz RC mode and it's got a internal PLL as well for USB operation USB and you are supported for boot loaders and things like that. Fantastic! My product is going to use a boot loader and load firmware images from an SD card, which I'm going to hook up to it so you'll see more about that in the future, no doubt.

JT Trace debugging all that sort of stuff. 70 iOS of 5 volt are tolerant so that's very nice so you can don't need any interface voltage translation chips or anything like that. It's got 32 K of RAM This version that we've got here for our 13 buckboard is 256 K a flash memory with ECC It's got a squared prom built in which is one of the advantages that I will be making use of. And also a big reason why I chose this chip in the product is that it has an LCD driver as well 8 by 40 segments which is pretty much what I need I think I need like 36 segments or something like that.

So and it's got decent analogue stuff as well. It's got two Op amps are building not sure the performance of those I don't think I'm going to be able to use those at all. Our 12 bit ADC excellent at 1 Meg samples per second with 25 channels. Fantastic! It's got a DAC as well.

A lot of micros don't have Dax but it's got a 12 bit DAC with a two-channel DAC Awesome! So you can do like stereo audio or something like that perhaps with output buffers and to ultra-low-power comparators as Mel well with wake up capability DMA controls if you're into that sort of thing. USB 2 3 You Arts built-in 8 up to 8 SP is depending on the chip that you use or to I two S's it's got to I squared C buses, 11 timers, blah blah blah 6 16-bit timers, all that sort of stuff and it's got um, capacitive touch sensing as well. up to 23 channels and CRC calculation as well. So as you can see, it's a very powerful and versatile Arm micro.
Sol and you can get the development board for 13 bucks. Amazing! When I was a boy and just as a bit of background, my original product design actually used a pic 24. it used a 24, FJ 64, GA 310 and I've actually got a several prototypes here actually using that, but we decided to. We needed more memory, more functionality, all that sort of stuff.

So we looked to move to the 32 bit pick and well, the third pick 32 MX and I I Liked them. They're decent parts and things like that, but the problem is you'll notice the features here. Nowhere does it really mention low power. It's got a bit of power management modes, but like it's not Tooting its own horn when it comes to that.

And you read the datasheet here where you know they're not Tooting the horn of the low-power functionality. Whereas if you go to the data sheet for the STM look Stm32 ELLs there it is. BAM These are low-power parts they're selling that. It's the big selling point right up there.

It turns out I think you have to go I won't go into it, but I provide links down below if you want to have a look. The Pic32 Mx3 Oh something that we were looking at using actually has like five times the power consumption or something like that. It's a huge drastic difference in that and that power consumption is really very important in the product I'm developing. The other thing about the Microchip 1 the 32 is that it did not have a building LCD controllers.

Who would have had to use an external LCD But the company I'm doing this company in this design in combination with they had used an external LCD controller before so that wouldn't have been a drama. But the original Pic 24 I had actually had the LCD driver built in and it actually had the nano watt Xlp thing and it was very low power in fact slower power and then then then St Arm 32 Stm32 this is 150 micrograms per megahertz run mode and if you remember, this one was 185 microns per megahertz run mode. So technically the Pic 24 F at lower power 400 nano a real time clock and calendar operation 400 nano amps if we go over here, it was a standby mode plus RTC There you go. It's like almost triple the consumption, but it's still bugger.

All the Stm32 L series in particular still more than good enough to up meet the specs. but if you're going for real ultra-low power like the best you can get in the industry, you probably wouldn't be using something like this. but for my purpose is good enough and it's probably I don't know. Three to five times better than the Pic32 and it's got all the LCD driver and everything built in beauty.
Now you might be asking, what do we need to actually program these Stm32 Il micros? Well you only need one of these things. If you don't have the development board, you only are you get the St-link the two here it's called and it's 22 bucks 61 and it looks like you get all the adapter cables and serial cables and everything with it. Beautiful! It costs bug roar because as you'll see, there's bugger all in here. Now there is actually an ISO well I sold version of this.

This is just exactly the same thing, but it has an isolated USB port in it. and if you're worried about, you know if you've got a ground reference product and things like that how not to blow up your oscilloscope? I've done a video on that I might have to link that one in then you want the isolated version. But anyway, the good thing is is that this kit comes with essentially that thing built in there. Well there we go on board St-link V2 with selection mode link to use the kit as a stand-alone programmer.

So I don't even have to go by the program. If you've got this development board, you'll notice the header on the side here. Now we can go over to here. You'll notice that the header there it is right there and that can.

You can just jump that over to your product and it does exactly the same thing as the programming tool. Unbelievable. So other stuff we've got on here can be powered from the USB As we'll find out, we'll plug it in in a minute. We can measure the chip current.

the Idd current. Fantastic. That's what the little jumper link down there will be for. It's got a alphanumeric LCD on there, a 14 segment, LCD on the thing, and got LEDs and push buttons and stuff like that.

Anyway, it's exactly what I want uses. the chipset, allows me to play around with the software programming tools and measure current consumption and typical current consumption and stuff like that. So we know I like it. Let's power it up see if it does something.

Hopefully it comes pre-programmed and if we actually have a look at the pack that it came in, there's nothing else in there except the board and you wouldn't expect it for a 13 bucks. but it looks like it has some operational stuff on the back and here we go. I'm going to plug it in and hopefully it does something. it says to put the link in.

well there's there's different positions. we'll plug it in there. Tada, look at that. There we go.

Discovery. Boom! JP one is on, that's JP one there. You can probably see that and we've got lights flashing and it's measuring the supply voltage. So obviously it looks like it's got a three volt voltage regulator on there and that is very nice.

So let's um, let's just repower that or reset it. Yep, Beautiful! and can we play with the slider? No slider doesn't do anything at this stage. Let's see if we can change mode, shall we? Sorry? I've got this propped up on a box and I have no idea what percentage what that means. Not quite sure what's that.
It's not some sort of counter. Hello Sleep mode point Oh Run mode. It looks like it's cycling through and measuring the power consumption. This is fantastic.

This is great Sleep mode 260 micro amps Run mode. Ah Beautiful! Let's push this again so it comes pre-loaded air. We go that's using the low-power oscillator. 3.7 micro amps Low Power runs 7.6 micro amps in the low power run mode.

There you go and the card here actually tells you what the what the different modes are there for. My auto focus on my Logitech C920 webcam is not working that great. I had to set the other one manually. the one on the left there for the board anyway.

Um, you have got the different modes and that's great. It measures I didn't expect it to measure the power consumption I Thought I'd have to take the jumper link off. that's very common on these development boards. You take the jumper link off and then you insert your current meter in there and measure it.

but that's that's terrific. Beautiful. It's exactly what you want if you're into low power. If you want to low power arm processor, this one's great.

I presume that's a live measurement. Let's see if we find the schematic. Let's press that button one more time though. Did we go into another Mo one point? Now What's that? These are all the different modes I Mean these modern processors have so many different mo, it's on them.

Standby? Yep. Standby. Wake up. Okay.

360 nano amps? Beautiful! I Love to know if that's a real live measurement of that. Anyway, we're back there. We go back from the future. Let's change the jumper link here.

It restarted the process because it interrupts the thing and it looks like so anything different. It's the same. That's the same. That's different.

It's Milliamp mode. It's displaying the current in Milliamps now. 0.03 Yeah. 30 micro amps.

So it looks like jumper up is my cramps and numb jumper. Down below is Milliamp. So there you go at night. Yeah, well, it's displaying my cramps now.

but it's like that's 20 nano amps Wow nights down in the that's interesting I Want to have a look at the schematic and seen exactly how it's measuring this and doing this because there's nothing else on the board. You'll note that it's got. it's got the main processor. The external crystal isn't fitted, so if you want to put in your own external crystal, no where as you can, it's got a 32.

K It's got a 32 Kilohertz external crystal here. It's hard not look at the screen 32 Kilohertz external crystal and there's basically nothing else. There's like there's nothing on the bottom of the board, by the way, so you can't actually hook up a battery. By the looks of it, That's nice.
It's not some reserve stuff up the top. don't know that what that is. We'll have to read the manual. have to.

RTFM I wonder if we can use the slider? The sliders got a piece of perspex on there, which is quite nice. So anyway I Love how it measures the current consumption. It's beautiful. and if I follow the link on, there are St.com STM 3 - One L Discovery It takes me to this page here Here it is and this has what's this: STM cube or one I don't know, they keep throwing names at me I don't know embedded software I use low level drivers USB Filesystem artists Wow touch sensing graphic coming with examples run on ST boards.

Cube is an STM original initiative to ease developers line to reduce development effort blah blah blah right? So the quarter STM cube and that's their initiative to ease development I Don't get it anyway. Consistent and complete embedded software offer that frees the user from dependency issues. Excellent. Alright to play here SEM Cube Overview: Oh, we can watch this.

Hopefully the audio comes through and we've got different video showing you. Alright anyway, generates high-level code and all that sort of jazz which is great. sorry it uses high-level GUI to generate initialization code for your micro bit Oh shoosh because one of the problems with developing for micro, especially for the first time. If you're not used to it is all the initialization and setup stuff of all the registers and everything else you need to do just to do basic stuff.

So if you can get a high level GUI interface that takes care of all that stuff for you then yeah. Great! You'll be up and running much quicker so can actually go down to get software here and we can get the software version for 15.1 Get software. Oh yeah, blah blah blah except ah bite me, this is just when a company's gonna learn. This just pisses people off.

Took this. sign you up to it. They're just going to use crap an email addresses anyway and names and fake names and everything. and to like I've got now going to go to my email to get the link to now Oh Hate this crap.

So while that's downloading about 150 Meg or so, what development tool chains does it use? What uses the IAR are embedded workbench which I've used a long time ago in a galaxy far far away keel Arm. I don't think I've ever used the keel software and the GCC one as well. So there you go. but it's not like there's nothing obvious you know you go to like the product page here and there's got like there's technical documents and descriptions and things like that, but there's nothing.

ah that, sort of. You know, maybe you got to watch the videos and go through step by step. but there's nothing like download this and it just includes let the GCC compiler for example by default with all the stuff already set up for this particular micro and things like that so it's not, you know. And if so, for a beginner coming in, or how do I use this these ARM chips, it's you know there are certainly better options out there to actually do it.
So yeah, I'm going to have to figure out exactly what I need here are whether or not I'll use the GCC or whether or not I'll use the IAR embedded workbench because I think you get a free version up to 32 K or something is it? Don't quote me on that, but you get a anyway. I think it is I Think you might get a free version of the IAR and maybe it's got some optimizations disabled or something like that. But anyway, I I Have not used the GCC arm compiler before, so I don't know. But they do have these things getting started with the software development tool chain, document and things like that.

but there is no you know, like click here to download the software kind of thing. So it's it's just not there. They've got that code compiler which I'm downloading at the moment. that's actually not a code initialization thing, but that's just to generate initialization code.

It's not I don't believe it will include any compiler in there at all. Um, and by the way, no schematic. I can get the Gerber files I can get the Bill of material. So I downloaded the Gerber files.

they're all there. so that's hunky-dory but where's the original PCB our file. it's not there if you wanted that. Um and the schematic: I can't find it, it ain't here.

And if I actually go over to Digi-key here it does have look there it is the Stm32 L15 to see Disko schematic. I click on that and wha? Now did link through to the page for the discovery firmware package which is what we want I want the code for this thing to see exactly how it's doing the current measurement and things like that. If I can't get the schematic, still don't know where that is. Um, look, they got some documents here.

current consumption, measurement and touching, touch sensing demonstration of firmware. so if we have a look at that here, it is. Here's the application note tells you all about it. Fantastic! So their documentation is pretty good.

Here's the look: It's got separate Idd measurement circuitry on here so that's the you know block diagram. and don't have the schematic. haven't checked further on but Tada. So here it is.

We've got two current sense resistors there and it looks like look a digital switch there that is controlled via counter. Down here it looks like like a separate counter chip because that's the Stm32 L15 there. And then there's an external differential amplifier with a gain of 15. other electronic Switch: Another electronic switch here.

Um, where's all this circuitry? I Was very curious so the only place left for it was Tada. There it is. Sneaky buggers. Ah, but anyway, is the schematic in here? Okay, no, no schematic at all.
Bummer. does it? Is it? LinkedIn Down the bottom reference documents, updated clock section. Nah not. But hey, this is neat.

It tells you how it all works and the algorithms to actually do it. Sweet. And if you have a look at the IDB jumper, P one must be placing the on position except for bias Current record operation. So I think we saw bias current pop up on the LCD when we had the jumper in the other position there.

So what bias currents are we measuring Because bias current is not static current. So anyway can do to compensate errors due to the bias current. Okay, right. Bias Current Record: Okay, so that's like a calibration feature by the looks of it.

Bias Current: This operation consists of storing the bias current values of operational amplifier. a Hey, they've thought of everything. compensating for the error in the times, Fifty amplifier in their suite and bias current mode. There we go.

GP One off. yep, you betcha and release the switch and it tells us the bias current. There we go. Bingo, it's stored it.

Oh well. I Yep. I Believe it's now stir well. Point one: Six Jumping around a bit.

Anyway, it's now compensated. So now I repower that and it is in. it's stored in there. By the way, this is the slider.

This is a percentage slider like that, so that seems to work reasonably well. Go in there and that just. it's a crude slider like that, but that's this is a great example board. And now these are the actual wire measurements in the various are modes.

So 260 micro amps they're run mode 740 micro amps, 280 My cramps beauty and we can go into those. This is a winner winner chicken dinner, right? So let's run this Cube MX thing and see what happens next. I Accept bla bla bla bla bla. We don't have to use this and we can just use the compiler directly.

but yeah, we haven't gotten there yet. I Want to try this out. Target directory will become yeah, right. Create shortcuts Yep, right or users.

Yep. and here it is looks pretty boring. Load projects. Do we have example projects? New project Here we go.

Oh hey, this is what we want BAM Straight in. Thank you very much Board selector here we go. Here's all their boards Here we go: Discovery Wow umm the 1 5 2 Where is it? Stm32 El Discovery 1 5 2 Disco That's the one where disco in all right so we can I guess Go like that Oh yeah. ok.

Peripherals Connected Selection initialize all IP or vendor up. there's only the one vendor ST Micro boards. Ok, so we've chosen our board. Fantastic! It supports very comprehensive, supports all their development boards.

Ah isn't that sweet. Look at that. I Love these GUI Or can use my mouse wheel to scroll in and out there. Look at that graphical representation for the chip that's actually on there.

It's the Stm32 L15 to our CTX. It knows exactly what chips on there. It's pulled it up and now look, can we go in and click on the individual pins? Can we do anything? No. It just hovers over and tells us what that does, Are there we go? Yep.
So the I/o so Pb-7 We can then change Pb-7 to do anything we want. We can change each individual pin to be configured by default. These: This is what the configuration for this chip is for this particular demo board, right? So as you can see, it's already set up for all the segments, comms and everything for the LCD. So the segment's anywhere using 3 Commons for the LCD there but looks of it and there's the green LED and the blue LED on the board and Wow Wow that that is great.

That is excellent. So there you go. we can configure all this stuff. Middlewares configure a shin middlewares looking south Corner fat so there's a fat filesystem I Guess if we had like an SD card to come configure, it's got a free Artis I don't know what the what which free are? well is it called Free Artists and the Fat filesystem I guess some if the st you've written there a fat file system which allows you to so you can include that.

Then you can go in and you can configure all your clocks. Look at the block diagram I'm sorry this stuff you usually when you're developing for micros. this sort of stuff is in buried in page 300 of the datasheet and you've got to go in there and look it up. You know you've got to know that all internal registers such-and-such to select the input on this.

MUX Here you know you've got to do all that, but this is can I? Yeah, yeah, there we go. I can just select which channel of my MUX I want that's nice and then I can add divided by 8 thing. so the system timer for the clocks and everything else Wow Wow, it's almost too powerful. You could get lost in here but that is that is absolutely brilliant.

That's what you want as a beginner. You don't want to, you know going into the data sheets and try to find this stuff as a real pain in the butt. So other configuration stuff RDMA Okay so there's all the DMA stuff not really interested in GPIO real-time clock. There we go.

Instructional: at calibre there your calibration values for your real-time clock RC o RC C No, that's not RTC that's some. RC C What's that? That's something else analog? Not there. What are they called middlewares? That's hilarious. So time base or there's your timer.

Its watchdog. Power Consumption Calculator: Brilliant. So it will give you an estimate of that. This is very common in the F eg, a field and stuff like that when you want to estimate how much you desire, how much current your design is going to take.

Now in this case, we're not. You know, generating various and using macro, macro cells and things inside, but we are turning on certain functions. We are like a certain chipset, peripherals and things like that. So each each peripheral you turn on and enable and use is going to take extra current.
What frequency are operating at which clock you're using, All that sort of stuff. It even takes into account the ambient temperature, which supply voltage you're doing. Um, and you can select. Ah, look at this.

You can select your battery Cr2032 Wow Wow So it will. It give you the battery life. It'll self discharge point one two percent per month. Normal capacity for Cr2032 225 if you've got one or two in series or parallel.

Wow Is that this is neat I Like current consumption calculators. A bit of a current consumption calculator fan. Boy, if you didn't know, so that is neat. like I Won't go I Could spend all day here.

but the fact that it's got that that is great. So that is an excellent configuration thing. So here we go so we can generate the code. power transitions, checker or looks like Andy You can do sequences and stuff.

This power Consumption calculator might be more powerful than I think so if it's pretty good as I thought. but yeah, look, you can add in steps. There you go. so you can add steps as you change things.

So if you're going into sleep mode and things like that, you can I believe it should be able to calculate all that. Wow Okay, I'm thoroughly impressed. Alright this Stm32 cube MX Winner Winner chicken dinner! Anyway, we can generate code for all of our current pin outs. So what you do is you set up when you got a new project.

You set up what pins, do what, and like. You might want to change them on the fly of course, but this is like the initialization code. What this software does is generate your initialization code to get your micro up and running and to be able to do something when you first power it up when you enter your main function. for example, before it gets to the main function in your code.

so we can generate a report. like to generate Oh create generate code, test project, location, test, and then we choose our tool chain. Oh yeah, it's a where's GCC I get no, that's the hmm. Okay, no unless there's another name for it other tool chains.

Anyway, okay. Code Generator Advanced Settings All right, let's just you know, project location cannot be found. Our guy? Give me a break. Yeah, yeah.

Open Firmware package or one of its dependencies requires not available in the do you wish to download this now? Yeah, Okay, okay. why didn't it include it? download STM Cube Firmware I don't know why it needs to do this I'll get back to you. Okay, it downloaded that fine. Took a little bit, but it downloaded and then kept going and compiling the code.

and it generated the code. Then I could have opened the project or in this case I've opened the source. So here we go. Main: Just open this in notepad here and bingo Here we go.

It's generated all the code. There it is. and yep, there we go. There's our oscillator, initialization code.

all that sort of stuff. See, all of this sort of stuff you would have had to have figured out from the datasheet and done manually. Otherwise, your micro sits there and does nothing. It just won't work.
And that's you know. a huge hurdle for microcontroller development. That's why Arduino is and things like that is so popular. Every you know it's much higher level than that.

All all this sort of stuff, register level stuff is that taken care of for you. But then there we go. It sets up the pins and well, it's telling you how the pins are going to be set up and then it goes in and and it's set in pull-ups. Yep, it's yeah.

pull-ups and speed. So you can set the GPIO speed, you can set the GPIO pull-up and then you can set the GPI Omo it look at like you know there's a lot of initialization code here that that GUI has generated for you. Thank you Mister GUI That is brilliant. Huge thumbs up and on that to firmware page.

I Was actually able to download the actual firmware source code for this particular demo board. downloaded. No problems. Here's like the LCD Here are the files on here and we can have a look there.

There we go. Stm32 Discovery. All it's all in there and this is like the code for the LCD for example and very well documented. Here's the 14 segment mapping and stuff like that, How they actually map the things in there and that's terrific.

So all the example source code is there so you can recommit. Should be able to recompile this for yourself and then play around with this. Maybe use this as a basis for your own project. But as I said before, where is like the link to just download the GCC compiler or something like that? With everything set up, it's not at all obvious.

it's not for the beginner. This thing like this is the product page for this development board and okay, looks like we're going to have to go in here and read this. getting started or getting started with the software development tool chains I'm gonna have to read a PDF document before we can just go in there at like you know so first sort of. You know experienced users like me who have used another micro for example but haven't really used Arm before like this? then like I want to know where's the programmer software, where's the compiler software, and I want it all there on the product page so I can download it and start running with this thing.

but no. looks like we have to read some documents. Hmm. bummer.

And unfortunately, look. this document provides an introduction on how to use the following software development environments: Iar, Embedded Workbench, The Key, or one true studio I've never heard that by a taluk I Don't know. Maybe there's a few italic fanboys out there all tasking which I know fairly well because they used to work at dumb Altium tasking A good compile is used in primarily like the automotive industry and stuff like that. really big in the automotive industry.
but I don't think you know outside of there it's not that huge but really good compilers from out Iam hi do the tasks in group at Out Iam still in the Netherlands I believe Anyway are the yeah but where the emission wears GCC like if I did my project if want to go, everyone will just assume that I'm going to use GCC Everyone uses GCC right? It's you know it's the thing to use but this is the getting started guide for this discovery board and it does not tell you how to use GCC doesn't tell you where to get it from. it doesn't matter, tell you you know like links to a compiled version of it. there's the St-link thing. so yeah, looks like we're going to have to use IAR embedded Workbench which is fine.

I've used IAR before. they're excellent. Excellent tool I Love their GUI interface and things like that. Have used it for like the Atmel another once but I haven't used it for arm before.

but yeah, that's disappointing that GCC is not in there. That's a huge oversight. So I'm on the IAR Embedded Workbench website 62,000 users. is that all thought that I've more than that? Anyway that support 11,000 devices, blah blah blah 30-day free trial, blah blah blah blah.

But look at this. you go to the by page wha-wha-wha request for quotation. Seriously, are you that dumb Ia I Just put the freaking price there. a PayPal Buy It Now button or whatever.

Have different tiers of software if you want sure if you've got some it needs enterprise version for you know, a thousand seats at your company or something. Fine Okay quotation for that. but me by my little $15 you know embedded discovery thing. um this is where the documents point me towards Iar.

They're sure there's some others, but I Come here and go. Quotation: What's all this? No fail And it turns out they've actually got a ton of different versions just for arm. Look at this, they've got functional safety standard Cortex Cortex M0 limited baseline versions, blah blah blah blah blah. Anyway, what we want to do is go into the free trials here and take a look.

Now here's where I said before. you do get a size limited kick-start license without any time limit or you get a 30-day full. You know pretty much the full thing for 30 days so you can choose which one you want. Arm the size limiter Kickstart one.

As I said before our 32k restriction, all 16 K for Cortex versions I saw there's no source code I You don't get the mistress II Support see run is not a valve, don't not see runners and limited technical support. but anyway, that allow us to get up and run in anyway. But anyway, we'll download that and even with you know 32 I'm K Size limit and you know, might not include optimizations and all the other stuff or does include debugging. Doesn't say anything about debugging limitations and things like that, but you still do a lot in 32.
K So yeah, that's only a one gig download anyway. I've got a reasonable connection so it's already one tenth of the way there. Yay! I Will show you my desktop just for fun while we are all the time away. Look at this.

There's an option for dongle drivers. I Don't think I need to install dongle drivers. did I a come with a dongle back in the day? anyway. I'll just install the St-link yep, you guessed it.

online, formed and register for your time limited or code size limited version. Alrighty, so after loading it in, I got the license keys and all that sort of jazz. I can open a workspace and I've downloaded the firmware which you were saw before and if we go into the discovery pack firmware projects, let's look at the current consumption touch one that's I inside which is the demo that we're actually running on the board and AW arm. Here we go.

so it's got all the different versions here. Ok and bingo there's the you file. let's open it. Will it work? My workspace is up.

Yep, there we go. There we go. we're in like Flynn and I just tried the make function sorry I wasn't recording and it went through with no errors. Ok, so it did actually make that project without error.

So what I'm going to do here is I'm going to I'm in the main I'm in user and then the main dot see here and it looks like we can just change the text message that is presumably displayed on the LCD. So I might simply change that to E V Blog I could change it to Hello World but you know me. L So what? you and else do that I don't know that one can be Hello World. There you go.

Everyone wants the exclamation mark and then we can make this again. So if we're going to make here, we go. Building tree blah blah blah blah blah. Converting number here is 0.

Okay, let's try and download it. So remember I have not used this before I have not read any instructions whatsoever, are simply loaded in the project. This is the best way to get sup set up. loading the existing project that compiles with no errors and then start playing around with it and then you know, learn that way it's you know it's one of the best ways to do it anyway.

There's some little buttons up here. Hang on there we go. Download and debug download without debug. Without downloading we want to download and debug.

We just want to download. but anyway, we'll download and debug. Ah so it didn't automatically detect my installed. it was supposed to install the drivers, the St-link drivers and it just not not not happy at all.

Let's go into projects here: Download and debug debug without downloading, download, download, active actual application MA Well, it was supposed to be that easy I'm here it is for the E WM tool chain which is what I'm using. Basically I'm open the workspace which is what I did got. The example demonstration was what I did rebuild all well I did make maybe I've got to rebuild all. Anyone should have done the business and there no, but that's what I got Total number of errors and warnings and everything so that's fine and dandy and then not include I didn't do project options C++ compiler Why do I have to do that Anyway in the are to change the project sentence, don't have to do it There you go.
a download and debug. That's all you had to do. Download and debug I hit that button Exactly what I thought and there you go. It's supposed to download and debug, but it hasn't and that's it.

That's the entire instructions for the Um for the IAR embedded workbench thing. That's it and it didn't work. Thumbs down! I know I think it's a Peb kak. Looks like I missed a step after installing the W arm.

The user should install the St-link V2 driver. the original St-link not the V2. The original one does not need a driver apparently, but the St-link 2 does see like this should be on the brake a it's in the document. okay, but it's yeah.

alright. I'll stop complain and it's in there I Probably should have read it. so you have to do this after you install the IAR workbench. So let's do that so it's supposed to be in C IR Systems embedded workbench.

Arm Drivers St-link Tada St-link upgrade No, it says to run thee no Ok Windows I guess I've got to go into Windows 7 No St-link Nope, doesn't match the description. There you go: St-link St-link V to underscore USB Driver It doesn't match that description. Ok, so I ran the batch file here and it's going to let me install the drivers I'll probably have to remind have to reconnect it of course, but it may take some time to complete thank you very much. But once you know the little things where it doesn't match the description and it's buried away, you've got to know like they need to have a more compelling first-time user experience because you know you can be left scratching your head if you.

If you manage to figure out how to download Iar and all that that open the workspace and all that you're following this truck. Sandman doesn't kind of work and then no, what is one of these error messages down here mean that at fatal error, failed search for probes, ensure that the USB drivers are install late. You know? Yeah, it just occurred to me you remember way back at the start where I was installing this thing and it said do you wish to install like the U.s. Like the Dongle, right? That dongle thing was that Is that what they're talking about? Maybe.

If so, that's you know dodgy terminology. Anyway, hopefully it'll work now. Can we just do it? Can we just do it? Yes. Well, that it's flashing, it's downloading.

Will we get eevblog? Hello Run. It worked I didn't have to reconnect it did. I accidentally set up a breakpoint toggle breakpoint I don't know. no.

Why is it pointing to int main there? Anyway, it downloaded. maybe I saw an option leave target running here. we got like so all this is enabled now so leave target running Is that? no? Maybe if I hit the reset button. Hey Eevblog, we know Weena Chicken dinner.
So there you have it. This has been long enough. sorry for the length of this. It was sort of like a me going through it.

Sort of like first try just to see how good the how easy the tools were to set up and well ultimately it took like a few hours to do this. Granted I'm shooting a video and doing you know everything else but me and I'm around. but hey, you know it wasn't the best first impression. Not suitable for a complete beginner and maybe some things might be a little bit you know, annoying for like an experienced person like me, but somebody who hasn't touched the arm toolchain like this before.

So anyway I was quite surprised that there is no support or it doesn't look like I'll stand to be corrected. No support for the GCC or whatever or you know, like I don't know how to use GCC with this thing yet I'm sure everyone's screaming. It's easy to set up the command line. Do this.

Do that. Yeah, whatever. Okay, I got arm the IAR embedded workbench. working fine as long as they followed the silly instructions to the letter and installed the drivers and everything's hunky-dory I'm up and running now, so you know yeah, it's not the best first impression I Mean if you go over to the you know, just the website for this thing, it's a little bit quirky, doesn't really have everything, it's not.

You know everything's not in the one place stuff like that. I mean this is the main page for the discovery kit and you know it leaves a bit to be desired. but ultimately you know after a couple of hours of mucking around, anyone should be able to get a tool chain up and running for this thing. GCC or something.

might be a bit more confusing or take longer. They will don't have the step-by-step instructions for that I think they should, but anyway, you can get a 32k version of the IAR embedded workbench. You can do some decent stuff with that. although this thing's this board has 256 K so you know Anyway, if you want the full version, you pay the money, etc.

But for a 13 dollar arm development board and this part what what it can actually do is is very impressive. The functionality for it and everything else it it's an absolute winner. What is the what is the price on these? The Stm32 L15 - I won't include the rest of it and integrated circuits. There we go.

What do we got? Sort by price. They're not cheap in one offs. All right there we go. Yep, the one five to see that we're looking at I Don't know if it's exactly the same one, but two bucks thirty, you know.

Oh Actually that's fifteen hundred quantity. So yeah, we have to go down before we can get to anyway. you know, a few bucks. It's not the cheapest, but it is a high end.
you know, quite a powerful Arm micro. and for a 13 buck development board, yeah, why the hell not? I Like its low power modes and everything supports LCD and all sorts of stuff. and hopefully you'll see some more upcoming videos. All those supporters might actually see those videos before or find out information on that before the regular audience because the product I'm working on is not general knowledge yet.

So anyway, um, that ultimately worked in the end. Just a few little quirks. the odd peb CAC or two as to be expected. So if you combine that low-cost development ball which is really nice with the power management and the LCD and everything else, the low cost of programming tools for them easily available.

They've gotten even an isolated version which is very nice, which is still even reasonably priced. And then when you combine in, the awesome are Stm32 Y Cube MX Software like configuration software that's absolutely brilliant looks to be very comprehensive, very powerful, and then I think they've got a winner here and combine that with the chip. The capabilities of these Arm STM chips I'm I think I might be a Stm32 fanboy and certainly like this Solo Power Series. Anyway, very comprehensive capabilities, so well worth a look at it.

If you're right in to develop, there might be ones that are slightly easier to get started, but this one's very compelling in the arms. No worries. anyway. I Hope you enjoyed that.

You want to discuss the arm development tools and tell me Dave's you're doing it all wrong? Yeah, go ahead. comments down below. Catch you next time. Hi! In this video, we're going to take a look at a couple of affordable Fpga starter kits to get you into FPGAs But before I jump into that, I thought I'd just do a quick little primer here on exactly how easy is it to hook up and use an Fpga As I mentioned in my previous videos which I'll link in, the answer is not very easy at all.

Take for example, your classic micro controller. Here, you pick your Avi, you.

Avatar photo

By YTB

21 thoughts on “Eevblog #900 – stm32 arm development board”
  1. Avataaar/Circle Created with python_avatars Aldifa Julian says:

    Excuse me, does anyone have tutorial about using this STM32L Discovery Board ? thank you

  2. Avataaar/Circle Created with python_avatars Henri Coderre says:

    Hi Dave. STM32Cube is a combination of software tools and embedded software libraries: A full set of PC software tools addressing all the needs of a complete project development cycle. By the way, I can't know when this video was posted because I don't see the date anywhere. If you posted this video years ago, you might have found out by now, so I'm no help at all.

  3. Avataaar/Circle Created with python_avatars Engr. M A Kabir Arif says:

    STM32 price now very high

  4. Avataaar/Circle Created with python_avatars John Coppola says:

    Going down the rabbit hole… I'm probably going with STM32 series board. Then I can choose linux RTLinux or ThreadX or Azure RTOS

  5. Avataaar/Circle Created with python_avatars reboot says:

    how often stm32l151 normally die?

  6. Avataaar/Circle Created with python_avatars Brumby0 says:

    Excellnt presentation!

  7. Avataaar/Circle Created with python_avatars offensiveBias says:

    So u can use it on your product and sell it ?

  8. Avataaar/Circle Created with python_avatars импотениа кальман был п says:

    Where are display drivers? Jung

  9. Avataaar/Circle Created with python_avatars Florian says:

    The STM32CubeIDE package has gotten a lot better as of late, it's still a bit slow in situations where it shouldn't be (downloading/unpacking firmware packages etc) but it makes development a lot less painful with project generation and debugging all integrated into the IDE. I used it to write the firmware for a smoothly dimmable flashlight with battery feedback etc and after project generation all that was left to do was writing like 50 lines of code to get the desired functionality, all the boilerplate-code was configured beforehand in the CubeMX GUI.

  10. Avataaar/Circle Created with python_avatars Dantali0n says:

    I want to come back and emphasize that it now supports makefiles using GCC and the whole STM32 stack has also been integrated into PlatformIO.

  11. Avataaar/Circle Created with python_avatars Marcus K says:

    Glad it's easier to install now a days. GCC was so easy.

  12. Avataaar/Circle Created with python_avatars Dan Shepherd says:

    STM has a free eclipse based IDE called System Workbench

  13. Avataaar/Circle Created with python_avatars Conor Stewart says:

    Its much easier now using the stm32CubeIDE which includes gcc and the gui interface and is really easy to get started

  14. Avataaar/Circle Created with python_avatars Andrew Gurinovich says:

    new STM32 nucleos have mbed support – online ide and compiler, online libraries, online docs and this is freaking awesome.

  15. Avataaar/Circle Created with python_avatars Abdurrahman Yaman says:

    This is a very good example how engineering works. Thanks Dave. 👍

  16. Avataaar/Circle Created with python_avatars hack huck says:

    Every Linux user can download the gcc compiler and compile the code.
    There is no problem at all.

  17. Avataaar/Circle Created with python_avatars Nelson Santander says:

    I really like your videos, I wanted to tell you that pressing the "F5" key will run your program, regards

  18. Avataaar/Circle Created with python_avatars christopher békési says:

    "It's not for beginners" Well.. everything is not for beginners. Everyone can't focus on beginners, otherwise we wouldn't have any progress at all. They have obviously spent most of the time developing their IDE software and chipset

  19. Avataaar/Circle Created with python_avatars Joe Herbert says:

    This is exactly my experience with anything based on Eclipse. Poor documentation and nothing ever works out of the box.

  20. Avataaar/Circle Created with python_avatars xDR1TeK says:

    I still can't add the toolchain to eclipse, the System Workbench for STM32 launches eclipse and it works there, haven't compiled anything there yet. I got the compiler also from ARM site. They have 2 links, one being the compiler, the other being the toolchain. Not sure what the difference is yet. Eclipse lately has some new packaging system that uses xpack and node stuff. Getting things to download and run was just terrible. The missing out of the box experience is just slowing things down and raising that learning curve steaply.

    EDIT: use the Eclipse market place (Help menu) to locate the GNU MCU ECLIPSE 4.6.1. It will ask you to select your controller manufacturers. I am sure there are many steps for multiple options. I would suggest to stick to SWSTM32 for now, unless you can get IAR or KEIL uVision MDK. Most importantly, the ARM Compiler would prove useful. One day.

  21. Avataaar/Circle Created with python_avatars xDR1TeK says:

    2019 now, and i can't download content because my country is embargoed. However, I can download anything in the US. STupid ST crap.

Leave a Reply

Your email address will not be published. Required fields are marked *