STM32 programming options the easy way

Every time you start with new microcontroller, you have to deal with new ways of programming them. You may need to purchase and learn new tools and so on. But once you’ve done this process with any microcontroller, learning new is easy. So if you are in to STM32 microcontrollers Shawon have written pretty god guide on programming them. Since ARM Cortex micrcontrollers are flexible devices in terms of developing, debugging and flashing, you have several options of getting your code up and running. Like most manufacturers do, ST devices can be programmed and debugged with special ST-link adapter/debugger which works in JTAG or in SWD mode. Most development boards like discovery already have ST-link debugger integrated so the only thing is needed to run software and load your code. Other covered option is using built in bootloader which can be accessed through serial interface. ST have special software Flash Loader Demonstrator for programming in this mode. When programing with bootloader, special pins have to be pulled up or low in order to access it. This resource is great to… Continue reading

ST-LinkV2 Programmer for the STM32

STM32 is the basic kit which everyone looks forward to when they need an exposure to 32-bit set of controllers. The good thing is that it’s cheap powerful and you get support from all over the world. Although a lot of debugger exist in the market from low cost t to some that are very costly. This programmer is a low cost programmer as well as debugger and have the basic necessity function. The debugger is small as well as easy to carry and not clumsy like the existing programmers. The board takes power from the USB and hence no external adaptor is needed. Once you have installed the necessary drivers, you are ready to go.  For those interested in the project, a schematic has been provided and the source code can eb requested from the owner. However if you are too lazy to build one yourself, you can get it directly from the owner since he has some spare copies of the programmer. Continue reading

STM32 Nucleo boards enable faster prototyping

ST decided to enter the Arduino and mbed ecosystem with their new STM32 Nucleo boards. I think this is good decision if you want to get more activity with your products. Before we had to figure things out with their discovery boards. Now we have more options to develop ARM applications. First of all Nucleo boards have Arduino like shape that allows plugging most of Arduino shields and instantly have long list of expandability. Another feature is so called “mbed-enabled”. This means that you have option to develop programs using this great open source software platform and online tools. Nucleo boards come with all I/Os available next to Arduino headers. Also you have integrates ST-Link debugger programmer. So you can program, debug without additional tools. If you like you can use it as great prototyping board and use your old skills with regular tools like GCC. Nucleo boards come in several flavors that feature different microcontrollers like F30R8, F103RB, F401RE and L152RE. More boards are to come. Prices start from $10.32 per unit. Continue reading

Custom car ECU based on STM32

Practically all cars have Engine control unites. Older ones are simpler, while new are stuffed with sensors and actuators. But his didn’t scared Andrey to build his own Engine Control Unit (ECU) which would take all work from original unit. Most of his work was reverse engineering of original Ford Aspire 1996 ECU where he could determine signals coming from sensors and control data. Right now it controls fuel injection, ignitions, fuel pump, idle air valve solenoid. As input it reads MAF signal, fuel and timing. Clearly there is much work to do before it could be claimed simple and understandable so it could be used as aftermarket engine control unit. But video proves it working and that’s a good start. Continue reading

STM32 and 320×240 LCD with touch screen is a great combination

Graphical LCDs gives a huge advantage in embedded project. When it comes with touch screen things get more interesting. Zizzle shares his tutorial project on how to set up STM32 microcontroller to work with 320×240 LCD with touch screen. As he states running such LCDs on smaller scale microcontrollers like AVR (Arduino) is possible but eats to much of resources without leaving them for real applications. Using ARM is what at least is needed along with additional memory for buffering screen images. You can choose lots of boards that are already built for you like these on ebay based on STM32F103, Project setup consist of Ubuntu where ARM toolchain is running. Eclipse C++ IDE is obvious selection. Openocd was chosen for programming and debugging. Another nice accent in code that it is FreeRTOS based. So this gives a great template for further development of various projects. Continue reading

Espruino – JavaScript interpreter for micros

We usually program microcontrollers with some language like C, ASM, then compile it in to binary and upload to execute. But this is not the only way to do this. We can have a piece of code running inside MCU and execute new commands sent to them. If you put these commands in to single file – you get script. One good example is BASIC where we used to write programs for PC based interpreters. JavaSript is high level language with lots of handy features compared to BASIC. It has map, object, garbage collection. JavaSript is still intensively used in webpages for dynamic content. So there is plenty of code examples and tutorials. Why we would need an interpreter for MCU? Simply speaking this is great way in testing simple things on hardware. You can run single commands, run loops by simply sending those over serial terminal. It currently is designed for STM32VLDiscovery board but other hardware support should be there soon. Continue reading