Encoder position measurement [STM32 Nucleo]
The STM32 timer has a function to count up and down using encoder 2-phase output pulses as input. This section explains how to use this function to measure the amount of motor rotation from the reference position by up-down counting the pulses from the rotary encoder. Purpose: To measure the amount of rotational position by […]
Encoder speed measurement [STM32 Nucleo]
The STM32 timer has the ability to measure external pulses. Encoders are often used as sensors to detect the position and speed of actuators such as robots, etc. This section introduces a method to measure pulses that vary with rotation speed from encoders. Purpose: To count encoder pulses pulled up and input to CH1 of […]
Queue-based application [STM32 and FreeRTOS].
This application combines a task and a queue. This program is not practical, but it is a sample program for learning to understand the concept of queues in an easy-to-understand way.
Switching between multiple tasks, Part 2 [STM32 and FreeRTOS]
This is a sample program that combines task switching and USART communication, and manages task execution and suspension based on whether or not the command code given externally matches. Colum The '@' at the end of the command is to recognize the end of the input string. Instead of '@', an enter key (CR) input […]
Switching between multiple tasks, Part 1 [STM32 and FreeRTOS]
This is a sample program that switches between two tasks with an external switch. A dedicated task is provided to manage the switching.
Multitasking by registering multiple tasks [STM32 and FreeRTOS]
This is a sample program to execute two registered tasks simultaneously. Using RTOS, it is easy to execute completely different processes at the same time. As shown in the sample program, the RTOS can be easily executed with a simple description.
SPI communication application[SPI of STM32]
Application program to read and write to SPI specification EEPROM. Details of the peripherals are explained in Serial Communication SPI. Program Description
I2C communication application [I2C of STM32]
This application program reads and writes to the I2C specification type EEPROM of STM32 MCU. Details of the peripherals are explained in Serial Communication I2C. Program Description