Close
0%
0%

ARM Microcontroller Bare Chip Tutorial Series

ARM tutorial series aimed at serious developers wanting to learn programming and circuit building techniques for the production level.

Similar projects worth following
Ok, it's time to break off of the Arduino one-off projects and get more advanced and get into the ARM programming and circuit building. Even the beginner can get started. I use a bare chip technique, so you will be prepared if you want to get a real job in this field, or want to make real consumer electronics that are efficient, more functional and cost effective.

Since you are starting with the bare chip, you don't need to be clouded by all of the components that are on typical development boards like Arduinos. You build the circuits from scratch and no reverse engineering needed. Products need to have minimal components that perform the function most effectively for high volume production lines.

Real development is more that just putting disparate modules together and adding libraries to code. Critical functions may be needed requiring the full attention of the MCU where more advanced techniques may be needed. C/C++ coding is taught in this tutorial series.

So, you've been on the Arduino train for years. You finally had that mind-blowing idea and you want to sell it to the masses! But, you have this development board and you need to make your project cost effective (not contain every component on the Arduino board and on all of the shields globbed onto it).

Better yet, you went out on the job hunt, only to find nobody will hire you because you don't have real coding and product development experience (coding without using ready-made libraries that may be less efficient or doesn't let you get control of the registers and make real efficient state machine interrupt driven code used in critical applications).

Whether you are an engineering student trying to figure all of this stuff out (the tutorials are in plain English and are geared for the beginner) or you are a maker or tinkerer wanting to get to the next level and become unstoppable! This tutorial series is for you!

When you learn from the bare chip, adding components only when you need them on the board, you will have the power to build your own schematics and board layouts, minimizing the components needed in the product design and the size of the board.

When you code from the ground up, making YOUR OWN libraries, you will be in command of the code and you will be able to have full control of how the controller is able to monitor sensors, control peripheral components and devices in response to the sensors, make sure sensing and control is not hindered by code not well thought out (because you are in the drivers seat), and provide communication with protocols that way you want to.

I will be posting these videos here for your convenience, but consider going to Newbiehack.com to get more detail if needed.

View all 6 project logs

  • 1
    Step 1

    Getting Started! Setup the IDE and establish a link to the ARM Microcontroller.

    After you get familiar with the powerful ARM microcontroller, you will need to set up your IDE (Integrated Development Environment) where you do the programming and the communications link to the microcontroller. The Sketch Environment is cool and all, but there are a wealth of other IDEs out there that you can use to code. I only show you one way, using the CoIDE by CooCox. This IDE is based around Eclipse, but makes it a bit easier to start.

    You will also need to get familiar with the device (ST-Link) used to flash the microcontroller. It's a bit different than the Arduino where you simply plug the USB into the board (the stuff that you would need to remove for your consumer product anyway).

    Starting a new projects is only a few clicks. Note: when adding the libraries, you will see the main library with the _boot suffix. That has been changed to _CUBELIB.

    Here is the first part where you really get your hands dirty! The development environment is setup, it's now time to setup the physical environment.

  • 2
    Step 2

    GPIO Output

    Get our feet wet! Let's start Coding and Seeing Real Output

    Starting with the GPIO is the easiest and will get you familiar with register level code writing. Don't let the register thing scare you. Imagine you are in front of a big control panel and everything is labeled for you. You will be turning on and off those switches (bits) on sets of controls (registers). Some of the registers relate directly to the actual pins of the ARM microcontroller and some of the registers control the way the pins work, or how internal features of the chip work.

    Part 1

    Part 2

    Part 3

  • 3
    Step 3

    Issues that you may encounter.

    Let's say, you made this awesome program, but you accidentally programmed the programming pins (the pins that are used to flash the chip) as GPIO or other non-programming function. I will post any videos here that relate to solving such problems.

View all 7 instructions

Enjoy this project?

Share

Discussions

Tim wrote 01/25/2018 at 21:20 point

What software are you using to show your notes/annotations?

It looks like you are using a 3D mouse for control, right?

  Are you sure? yes | no

Patrick Hood-Daniel wrote 01/25/2018 at 22:19 point

Hey Tim,  

Actually, the 3D mouse is for my design work at buildyourcnc.com designing machines. I use a pen based software called Leonardo (Getleonardo.com) which features an infinite canvas and works well for these videos and all kinds of other things.  Love the software.

  Are you sure? yes | no

Tim wrote 01/26/2018 at 23:59 point

Thanks! I noticed how smooth it all looks. These videos are great and your effort certainly shows!

  Are you sure? yes | no

rewsiffer wrote 06/13/2017 at 00:52 point

Hi, currently the download speed for CoIDE is painfully slow (9+ hours). It's not my internet connection, must be their servers. Anyway, do you know of any external mirrors where it is available for download? Thanks.

  Are you sure? yes | no

Patrick Hood-Daniel wrote 06/13/2017 at 06:04 point

Wow, that is crazy! I don't personally know of a mirror, unfortunately.  I just downloaded the updated 1/17 2017 version and was finished in about 10 minutes.  The server must have been choking when you tried.

  Are you sure? yes | no

Patrick Hood-Daniel wrote 06/06/2017 at 22:01 point

Thanks for the kind words.  

The Co IDE is closely based around the Eclipse IDE which will run under Linux.  I haven't gotten to the depth of modifying the makefile so I haven't tried the Eclipse IDE yet.  However, I have seen many examples of others using the Eclipse IDE with the STM32 ARM Microcontroller.

There is nothing wrong with using the Blue Pill versus my STM32 board.  My prototyping board is just the component used for the tutorial and in production, you would use the STM32 bare chip which is extremely inexpensive.  That is the aim of this tutorial series. To learn with the bare chip and provide a clear understanding of how the chip works and developing your own components so the production process is more straight forward. And in the end, you would only be using the STM32 chip in production, not my prototyping board.

  Are you sure? yes | no

Wassim wrote 06/06/2017 at 19:30 point

This is great, thanks for bringing people closer to the real embedded world.

If I'm not wrong, CoIDE is windows only, let me know otherwise and I would update my review

https://hackaday.io/page/3033-6-ides-to-debug-the-2-stm32-bluepill

For someone interested to enrich user's experience, not at first step, but at second, Gnu Arm Eclipse would be something I recommend.

The bare HW chip is something I respect, but in the learning process, if I may one comment, why a purpule STM32 pill that's just 5x the cost of a Blue pill ? Well, I admit the bluepill is M3, and there is no equivalent like yours for the M0, that's true.

So for my STM32 learning experience I started with the #STM32 Blue pill IoT expansion boards, and important aspect of it is the mbed-OS that I would highly recommend as it is really a professional grade solution compared to arduino. With mbed-os, not only people could learn how to use a real time os, and not only they also have all of the registers exposed, but they also learn how to develop clean drivers with a standardised abstraction : cmsis which is namely CMSIS = Cortex M Software Interface Standard.

I have 16 Hello_World examples so far (servos, RF, ultrasound, gesture with APDS-9960,...) shared here https://github.com/wassfila/STM32_IoT_HelloWorld, and some raspberry pi interface code that talks with the STM32 firmware with the extension boards here https://github.com/wassfila/STM32_IoT_Boards. I did not touch the CMSIS so far but that's something for the HW Capture that the mbed-os does not have yet.

If you find any of that content interesting to pursue your goal of growing the STM32 community, please feel free to use it without any restriction in any way you want.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates