The STM32 Family processors include general purpose timers that have a nice PWM function that can handle four channels of independently controlled duty cycles. In this article I will look at how to set these up for basic use suitable for the majority of applications that need PWM signals.
The CCRx registers can be set to directly produce regular clock pulses on one or more of the output pins. Square waves are especially simple and up to four channels can have variable phase relationships.
Timer 3 (TIM3) on the STM32 series of processors is one of only two timers present on all the processors in the range. Understanding this timer forms a good basis for all the other STM32 timers
The ARM cortex M4 and M3 processors all come with a systick timer that is part of the core. The other variants, such as the M0 may not have one. This timer is very useful for producing the main system event clock. Here I will show you how to set it up on the STM32F4xx processors… Read More »
When developing for the STM32F4, setting up a new project can be a pain. Without some kind of wizard or configuration tool, there are always loads of obscure settings that have to me made each time. The easiest way around this is to make a simple template for the STM32F4 that has all the basic… Read More »
While it was very good of ST to make the fantastically inexpensive and versatile STM32F4Discovery board, they have made things a little difficult in the choice of peripherals in places.
Most commonly, the speed and direction of the motors in a micromouse or other small robot will be read from quadrature encoders connected to the drive train. One of the great things about the STM32F4 processor is that it can read these directly.
Lucky students at Indiana University might like to enrol on the [C – H]335 Computer Structures course run by Geoffrey Brown. If they do, they will be treated to a great introduction to the STM32 processor. The lab manual for the course is freely available to download.
The commonly published approach to using the bit banding feature of the Cortex Mx family of processors is to use macros – see Bit Banding in the STM32. This post describes an alternate implementation that uses a dedicated RAM section for bit banding.
If you are taking the DIY approach to coding for the ARM processors, you probably use the GCC ARM embedded toolset. This is available from a number of places. I just came across another distribution of this ARM toolset. One immediate benefit is that they provide pre-compiled binaries for Windows, Linux and the Mac.