Bare microcontroller development - Page 1
Forum section: electronics / general

author: pyrohaz
author_rank: Regular Contributor
timestamp: December 18, 2013, 01:53:29 am
content: 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

author: free_electron
author_rank: Super Contributor
timestamp: December 18, 2013, 02:36:00 am
content: power, ground and the interface pins + a crystal is all you need.

author: AlfBaz
author_rank: Super Contributor
timestamp: December 18, 2013, 02:52:17 am
content: ... and for a guide look at the schematics for your particular dev board

author: pyrohaz
author_rank: Regular Contributor
timestamp: December 18, 2013, 03:03:04 am
content: Brilliant!Thanks a lot

author: andyturk
author_rank: Frequent Contributor
timestamp: December 18, 2013, 04:26:48 pm
content: Quote from: free_electron on December 18, 2013, 02:36:00 amThey'll boot up just fine without crystals if you want. Be sure to put an external pulldown resistor on BOOT0.

author: AndreasF
author_rank: Frequent Contributor
timestamp: December 18, 2013, 08:51:45 pm
content: 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).

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: December 18, 2013, 09:22:22 pm
content: Quote from: pyrohaz on December 18, 2013, 01:53:29 amYes you can. Such restrictions are bullshit.

author: mrflibble
author_rank: Super Contributor
timestamp: December 18, 2013, 09:32:59 pm
content: Quote from: mikeselectricstuff on December 18, 2013, 09:22:22 pmST 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!

author: hans
author_rank: Super Contributor
timestamp: December 18, 2013, 10:16:56 pm
content: License on hardware? What?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.

author: Jeroen3
author_rank: Super Contributor
timestamp: December 18, 2013, 10:56:42 pm
content: 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

author: Bored@Work
author_rank: Super Contributor
timestamp: December 18, 2013, 11:55:17 pm
content: Quote from: mrflibble on December 18, 2013, 09:32:59 pmQuote from: hans on December 18, 2013, 10:16:56 pmYes, 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.

author: andyturk
author_rank: Frequent Contributor
timestamp: December 19, 2013, 01:46:39 am
content: Quote from: Bored@Work on December 18, 2013, 11:55:17 pmHeh. Imagine if the Arduino people required the same.

author: Stonent
author_rank: Super Contributor
timestamp: December 19, 2013, 03:10:39 am
content: Quote from: andyturk on December 19, 2013, 01:46:39 amThe 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)

author: PedroDaGr8
author_rank: Super Contributor
timestamp: December 19, 2013, 04:12:08 am
content: Quote from: Stonent on December 19, 2013, 03:10:39 amWhich honestly makes sense. I'd hate to have an arduino running my car. Oh shit someone forgot to #include brakes.hSent from my EVO using Tapatalk

author: pyrohaz
author_rank: Regular Contributor
timestamp: December 20, 2013, 06:44:46 pm
content: Quote from: mrflibble on December 18, 2013, 09:32:59 pmRight 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 demonstrationsystem, the demonstration system may be used by You solely for your evaluation andtesting 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 asfollows: “This device is not, and may not be, offered for sale or lease, or sold or leased orotherwise distributed”. "Its a shame, otherwise I'd definitely use the STM32F4 discovery board for everything!Quote from: hans on December 18, 2013, 10:16:56 pmI'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.

author: Bored@Work
author_rank: Super Contributor
timestamp: December 20, 2013, 07:25:00 pm
content: Quote from: pyrohaz on December 20, 2013, 06:44:46 pmWhat, they still use that lawyer crap? I honestly thought they gave up on it for the discovery boards.

author: andersm
author_rank: Super Contributor
timestamp: December 21, 2013, 12:10:30 pm
content: Quote from: Bored@Work on December 20, 2013, 07:25:00 pmGot to cover their ass. If you put it into a product, and it breaks, it's not their fault.