cancel
Showing results for 
Search instead for 
Did you mean: 

How can I go about making my own Microcontroller development board?

Sashvat
Associate II

Hi guys, there are a lot of MCU development boards in the market, I have bought a STM32 bluepill and started programming it with the Arduino IDE. I have a few questions I want to ask.

1) I have asked other online forums when I wanted to create my own MC dev board from scratch and all they said was start with an already existing Microcontroller development board and program it, but I don't know where to start, which tutorials to look at, what to begin with etc, I want to be a pro in Microcontroller programming, can you suggest me any videos/websites/tutorials to program the bluepill like a pro starting from the basics?

2) Now that I have the Arduino IDE to program my STM32F103C8T6 processor, I want to be able to program other MCU's of STM32, program the bare chips by making a PCB breakout board for that particular STM32 MCU, be able to place this MCU breakout board on a breadboard, add the necessary components etc. As I have asked before, How can I approach this? What videos, tutorials, websites would you suggest me to look at?

I think I have asked previous questions like this, I am sorry to keep asking the same question again and again, please dont get angry with me, I just keep getting confused when I ask one forum to another one. If you are tired of explaining me, please, send me some links that I could read to be able to program bare chips and become a pro at MC programming.

Thanks all for your patience with me.

10 REPLIES 10
Danish1
Lead II

I suppose one thing that a pro will be happy to do is to spend money. For someone who makes a living at these things, time is money so buying something to save time / effort / errors is a major shortcut. In my case I bought a good Integrated Debugging Environment (IDE); in my case this was Rowley Crossworks. When I was starting out the choice of free IDEs was very restricted (largely Eclipse-based). Things are better now, but I don't know where to direct the hobbyist.

You'll also need a programming interface, such as JTAG. ST have their own 2-wire interface SWD, and such an interface is built into many of the ST Nucleo boards for example.

And after that, for designing your own board, there are the ST-written "Getting started with <Processor Series> hardware development" application notes. Such as AN4555 for stm32L4, stm32L4+.

Hope this helps,

Danish

I have bought the ST link V2 as my ICSP and consider using Keil-MDK or atomic studio as my IDE's (integrated development environments) would that be good enough to program a blue pill and my own, designed from scratch made at home MC dev board work?

Do you know of any tutorials for writing code? any websites to help me code the MCU?

Danish1
Lead II

ST link v2 should suit you well.

Keil MDK - I guess you're going for the free version which is limited to 32K of code. It will get you started, but quickly gets eaten up if you're doing anything clever such as wireless comms, USB, SD-cards. After that you have to pay money.

Atomic studio - do you mean atollic studio? Their website redirects you to Stm32CubeIDE, which says it is Eclipse based. When I started, Eclipse was too slow for my liking. Computers are faster nowadays so why not give it a try. I assume it will limit you to ST's offerings of microcontrollers; a "pro" might not want such a restriction in case one of his customers has chosen a different arm platform. But ST's offerings are all I've needed since I switched to them 10 years ago.

For your comment about made at home MC dev board:

If you're designing your own pcb, you'll need CAD software (I use a commercial package but there are free offerings). I wouldn't consider making my own bare pcb - there are places that do it in a under a week pretty cheaply. And you have to remember that most arm microcontrollers have very fine pitch pins (or worse BGA) so I wouldn't want to be without a solder-resist layer.

I have and do hand-solder prototype pcbs. For me commercial prototype assembly is too slow and/or expensive except where there is BGA or 0603 or smaller components. But lead-free solder is not easy to use at 0.5 mm pitch.

As to writing software - I'll leave that to other people.

ST's Cube has example code which you could start playing with. You'd be amazed about how many things have to be right just to flash a single LED.

  • Danish

>> I want to be a pro in Microcontroller programming

Well that's not going to happen overnight.

Why would building your own board make the process easier? There won't been any tutorial videos for it. The BluePill has a schematic, can you derive functionality from that?

>>I don't know where to start

Start simple. Start by understanding existing designs. Look at the EVAL and DISCO board designs, see how they come together. Relate that to the BSP source code and drivers for various peripherals. Do the programming side of your goals first.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thanks a ton, I finally got some clarity, but for the IDE, you're saying Rowley Crossworks IDE is the best correct because I am not restricted to STM32 MCU's but also other chip manufacturers and there's no limitation on the space of the code right? And Yes I meant Atollic Studio, sorry my bad xD

And I don't understand when you meant, "Eclipse was too slow for my liking", why? Was it because the application was slow or uploading code to the MCU was slow?

one small clarification, STM32CUBEIDE is an IDE like Atollic's TrueStudio or Keil-MDK?? So that means, I can download STM32CUBE IDE and write programs and upload it to my STM32 MCU?

A reason you won't recommend using the STM32CUBE IDE is because its only restricted to STM32 MCU and not other, correct?

I have found this amazing playlist on youtube by this guy- https://www.youtube.com/watch?v=R6SstBoXjKc&list=PL6PplMTH29SHgRPDufZhfMRoFwRAIrzOp but he uses CooCox IDE, I was wondering if the steps he shows us to set up the IDE and write the code are all the same for other IDE's?

Well yes of course, I am ready to do the hardwork for becoming a pro, I am really passionate about all this.

Yes the Blue pill is a boon to me, but some chips like the STM32F334K4T6 which has a FPU, is what I want to work and experiment with, so which is why I need to be able to make my own board at home with my chips.

And thanks a lot I got some clarity 🙂

S.Ma
Principal

Define the key components you want on your board.

Look at datasheets and schematics of simplest board using it.

For the STM32, grab the nucleo board which schematic is available, including in Altium format. (PCB CAD design too;).

This one will provide regulator, oscillator and decoupling caps baseline.

Remove the STLink part of it and you have a QFP package version schematic and layout baseline.

Now, you need to assign the pins of the MCU package to your satellite components.

Usually this requires to print the DMA Stream Table (reference manual) and the GPIO pin list and alternate fucntion table from the datasheet.

Then assign the pins from the most specific (analog or alternate functions) to the most generic ones.

You will need to make a connector to plug a STLink V2 or V3 to flash and debug your application too. TAG Connect, or IDF14 or the big JTAG 20 pin connector.

S.Ma
Principal

On the software side, use C language, understand how the compiler generate assembly, look at the linker generated MAP file, learn the linker configuration file, stack size settings. Most importantly, get familiar with interrupts and peripheral HW features to SW assist and minimize clock constrains. Find the way to run your app at lowest operating frequency (power), discover the low power modes.

The trickiest part to me is to evaluate the interrupt durations, their maximum acceptable latency, prioritize them, define the core frequency, making sure the system is glitch free. A microcontroller is merely replacing ASIC instant HW function by SW execution time... as long as it is "tolerable".

But for the software which IDE should I use with no limitation of code or such thing?