Author Topic: Bare microcontroller development  (Read 6287 times)

0 Members and 1 Guest are viewing this topic.

Offline pyrohaz

  • Regular Contributor
  • *
  • Posts: 186
  • Country: gb
    • Harris' Electronics!
Bare microcontroller development
« on: December 18, 2013, 01:53:29 am »
Hi,

I've been using my STM32F4 discovery board for quite a while but after reading the ST licensing files, I can't use the whole discovery board inside of products. As I don't need any of the other peripherals onboard and solely the STM32F407 chip, I was thinking of designing my own board. I've already got an STlink/V2.

All I'm really wondering is once I've purchased the chip and attached it to my custom PCB, can I program it by connecting the ST Link to the corresponding pins? Is there anything else other than the crystals and boot pins that I'll need to take into account?

Thanks,
Harris
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 7448
  • Country: us
    • SiliconValleyGarage
Re: Bare microcontroller development
« Reply #1 on: December 18, 2013, 02:36:00 am »
 power, ground and the interface pins + a crystal is all you need.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2038
  • Country: au
Re: Bare microcontroller development
« Reply #2 on: December 18, 2013, 02:52:17 am »
... and for a guide look at the schematics for your particular dev board
 

Offline pyrohaz

  • Regular Contributor
  • *
  • Posts: 186
  • Country: gb
    • Harris' Electronics!
Re: Bare microcontroller development
« Reply #3 on: December 18, 2013, 03:03:04 am »
Brilliant!

Thanks a lot :)
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 892
  • Country: us
Re: Bare microcontroller development
« Reply #4 on: December 18, 2013, 04:26:48 pm »
power, ground and the interface pins + a crystal is all you need.
They'll boot up just fine without crystals if you want. Be sure to put an external pulldown resistor on BOOT0.
 

Offline AndreasF

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: gb
    • mind-dump.net
Re: Bare microcontroller development
« Reply #5 on: December 18, 2013, 08:51:45 pm »
Even though you already have an STLink/V2, it might be worth mentioning that the Discovery board itself can be used as an STLink/V2 programmer/debugger for external ST chips using SMD. All you need to do is disconnect the jumpers in the top half of the board (next to the ST logo).
my random ramblings mind-dump.net
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 12136
  • Country: gb
    • Mike's Electric Stuff
Re: Bare microcontroller development
« Reply #6 on: December 18, 2013, 09:22:22 pm »
Hi,
I've been using my STM32F4 discovery board for quite a while but after reading the ST licensing files, I can't use the whole discovery board inside of products.
Yes you can. Such restrictions are bullshit.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2024
  • Country: nl
Re: Bare microcontroller development
« Reply #7 on: December 18, 2013, 09:32:59 pm »
Hi,
I've been using my STM32F4 discovery board for quite a while but after reading the ST licensing files, I can't use the whole discovery board inside of products.
Yes you can. Such restrictions are bullshit.
ST licensing files, what ST licensing files? All I recall is buying several stm32f4 disco boards, and using them as products I own. Also, they are mine. So I use them inside of products, on top of products, it is awesome!
 
 

Online hans

  • Super Contributor
  • ***
  • Posts: 1078
  • Country: nl
Re: Bare microcontroller development
« Reply #8 on: December 18, 2013, 10:16:56 pm »
License on hardware? What? :bullshit:

Back to your question, the STM32 requires this:
- Digital Supply with decoupling caps
- Analog Supply with decoupling caps, and if you care about the signal quality some filtering (like a series resistor or ferrite bead)
- A decent sized (4.7 / 10uF) ceramic capacitor on VCAP pins (there are 2).
- ST-LINK via the SWD pins. You don't need SWO for general debugging/programming (it's for trace), only the SWDIO/SWCLK (PA13/14) lines, plus reset+pullup. So it's a 5-pin connector to the ST-link/v2 of a discovery board.
You can still connect SWO if you want, but I haven't had the need for it so far.

- There are 2 boot pins. If you pull BOOT0 pin low at reset, it will start from internal flash. BOOT1 is don't care. This is generally all you need.

You can pull it high at reset, and only then it will look at BOOT1 which is multiplexed with an I/O pin (PB2). If it's low, it will start up with "System Memory" which is the STM Bootloader I believe. If BOOT1 is high at boot, it will run of embedded SRAM.

That's about it. You can hook up a crystal at PH0/PH1 if you need it.
The rest of the peripherals is in the long long STM32 datasheet, but this covers the basics of for this processor.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 3516
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Bare microcontroller development
« Reply #9 on: December 18, 2013, 10:56:42 pm »
The STM32F4xx (407VG lqfp100 ) is not very plug&play-ish, there are lots of traps for quick people.

There are some pins, which need to be pulled up/down.
Pin 99 is one of them, most schematic symbols do not show this as Vss yet.
Also Vbat must be powered. And there are some other pins that like not to be floating.

Proper power caps near the power pins are required otherwise you cannot start your pll, or your Analog is worthless. They might even suggest a ferrite bead and/or inductor, however I've never used those before.

I suggest you take a good look at the STM32F4 Discovery schematics.
And possibly find some other working examples, from Keil for example.

http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF252419

 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Bare microcontroller development
« Reply #10 on: December 18, 2013, 11:55:17 pm »
ST licensing files, what ST licensing files? All I recall is buying several stm32f4 disco boards, and using them as products I own. Also, they are mine. So I use them inside of products, on top of products, it is awesome!

License on hardware? What? :bullshit:

Yes, ST at some point tried to shove a license, the "Evaluation Product License Agreement" up your behind, where they try to dictate what you can and can't do with their boards. The license disappeared from the discovery boards documents. But they still mention it in some manuals.

The license was a hilarious piece of lawyer crap. The reserved ownership of the hardware - although you just had bought the board. They demanded that you used it only in a lab and by skilled professionals. They also required that you labeled any device build with a dev board with a kind of warning. Really, finest piece of lawyer crap.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 892
  • Country: us
Re: Bare microcontroller development
« Reply #11 on: December 19, 2013, 01:46:39 am »
They demanded that you used it only in a lab and by skilled professionals.
Heh. Imagine if the Arduino people required the same.  :-DD
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: Bare microcontroller development
« Reply #12 on: December 19, 2013, 03:10:39 am »
They demanded that you used it only in a lab and by skilled professionals.
Heh. Imagine if the Arduino people required the same.  :-DD

The only restriction that I've seen for Arduino is that it can't be used for vehicle engine management or safety. (I forget the exact verbiage)
The larger the government, the smaller the citizen.
 

Offline PedroDaGr8

  • Super Contributor
  • ***
  • Posts: 1283
  • Country: us
  • A sociable geek chemist
Re: Re: Bare microcontroller development
« Reply #13 on: December 19, 2013, 04:12:08 am »
They demanded that you used it only in a lab and by skilled professionals.
Heh. Imagine if the Arduino people required the same.  :-DD

The only restriction that I've seen for Arduino is that it can't be used for vehicle engine management or safety. (I forget the exact verbiage)

Which honestly makes sense. I'd hate to have an arduino running my car. Oh shit someone forgot to #include brakes.h

Sent from my EVO using Tapatalk

The very existence of flamethrowers proves that some time, somewhere, someone said to themselves, "You know, I want to set those people over there on fire, but I'm just not close enough to get the job done." -George Carlin
 

Offline pyrohaz

  • Regular Contributor
  • *
  • Posts: 186
  • Country: gb
    • Harris' Electronics!
Re: Bare microcontroller development
« Reply #14 on: December 20, 2013, 06:44:46 pm »
Hi,
I've been using my STM32F4 discovery board for quite a while but after reading the ST licensing files, I can't use the whole discovery board inside of products.
Yes you can. Such restrictions are bullshit.
ST licensing files, what ST licensing files? All I recall is buying several stm32f4 disco boards, and using them as products I own. Also, they are mine. So I use them inside of products, on top of products, it is awesome!

Right at the bottom of the ST page is the license file!
http://www.st.com/st-web-ui/static/active/en/resource/legal/legal_agreement/license_agreement/EvaluationProductLicenseAgreement.pdf

"If the Evaluation Product is incorporated in a demonstration
system, the demonstration system may be used by You solely for your evaluation and
testing purposes. Such demonstration system may not be offered for sale or lease or sold,
leased or otherwise distributed and must be accompanied by a conspicuous notice as
follows: “This device is not, and may not be, offered for sale or lease, or sold or leased or
otherwise distributed”. "

Its a shame, otherwise I'd definitely use the STM32F4 discovery board for everything!

License on hardware? What? :bullshit:

Back to your question, the STM32 requires this:
- Digital Supply with decoupling caps
- Analog Supply with decoupling caps, and if you care about the signal quality some filtering (like a series resistor or ferrite bead)
- A decent sized (4.7 / 10uF) ceramic capacitor on VCAP pins (there are 2).
- ST-LINK via the SWD pins. You don't need SWO for general debugging/programming (it's for trace), only the SWDIO/SWCLK (PA13/14) lines, plus reset+pullup. So it's a 5-pin connector to the ST-link/v2 of a discovery board.
You can still connect SWO if you want, but I haven't had the need for it so far.

- There are 2 boot pins. If you pull BOOT0 pin low at reset, it will start from internal flash. BOOT1 is don't care. This is generally all you need.

You can pull it high at reset, and only then it will look at BOOT1 which is multiplexed with an I/O pin (PB2). If it's low, it will start up with "System Memory" which is the STM Bootloader I believe. If BOOT1 is high at boot, it will run of embedded SRAM.

That's about it. You can hook up a crystal at PH0/PH1 if you need it.
The rest of the peripherals is in the long long STM32 datasheet, but this covers the basics of for this processor.

I've looked at the supply caps, when I get round to making my PCB incorporating this MCU, I'll probably be following the placement of the discovery board quite a lot! The schematic shows that the BOOT0 pin is pulled down by a 510R resistor though apparently there is a  potential solder bridge area to set this high.
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Bare microcontroller development
« Reply #15 on: December 20, 2013, 07:25:00 pm »
Right at the bottom of the ST page is the license file!
http://www.st.com/st-web-ui/static/active/en/resource/legal/legal_agreement/license_agreement/EvaluationProductLicenseAgreement.pdf

What, they still use that lawyer crap? I honestly thought they gave up on it for the discovery boards.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1156
  • Country: fi
Re: Bare microcontroller development
« Reply #16 on: December 21, 2013, 12:10:30 pm »
What, they still use that lawyer crap? I honestly thought they gave up on it for the discovery boards.
Got to cover their ass. If you put it into a product, and it breaks, it's not their fault.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf