Electronics - FreeRTOS - SPI, I2C, UART with stack watermark and IWDG watchdog on STM32F3Discovery

Two sensors, two buses, six tasks, one watchdog.

This tutorial makes a firmware production-ready: strict periodic scheduling, stack size validation, and hardware-level crash recovery.

Ready? Let's go.

Electronics - FreeRTOS - Timer, task notification and event group on STM32F3Discovery with I2C and UART

Mutexes protect, semaphores signal.

But in some situations you need a bit more: A callback that fires on its own schedule, a direct line between an ISR and a task, and a way to say "do not start until everything is ready."

Electronics - FreeRTOS - Semaphore and mutex on STM32F3Discovery with I2C and UART

Tasks are great, queues as well.

But as soon as several tasks want to use the same resource at the same time, things get messy fast.

Electronics - FreeRTOS - Scheduler, task and queue on STM32F3Discovery

When it comes to dividing the time to share tasks, a simple microcontroller sometimes needs a friend.

This friend is called FreeRTOS and will help our dear STM32 to dispatch tasks as if each one was written for the CPU entirely.

Let's see this.

Electronics - STM32 - I2C communication between STM32F3Discovery and LSM303DLHC accelerometer

Every smartphone is nowadays provided with an accelerometer.

In this tutorial we are going to see how to retrieve X, Y and Z values from the LSM303DLHC accelerometer on the STM32F3Discovery board.

And to achieve this goal we'll use I2C bus communication.

Electronics - STM32 - Reading gyroscope data with SPI on STM32F3Discovery

So far we have blinked LEDs, rotated them with a timer, caught a button interrupt, and sent text over UART.

Time to talk to an external chip.

Electronics - STM32 - UART printf debugging with FTDI on STM32F3Discovery

At some point, blinking LEDs are not enough to understand what your code is actually doing.

You need to print things.

This tutorial shows how to redirect printf() to a serial port on the STM32F3Discovery with a FTDI TTL adapter.

Electronics - STM32 - User button as EXTI with the STM32F3Discovery board

Santa is impressed by the rotating LEDs but now he wants to control them.

Let's add a push button with the EXTI (External Interrupt).

Electronics - STM32 - STM32F3Discovery LED ring rotation with TIM2 and NVIC

Our Christmas tree is almost ready.

In our previous tutorial we saw how to blink all LEDs at the same time.

The lights are blinking but Santa thinks it's too static.

Let's make them rotate.

Electronics - STM32 - Blinking all F3Discovery LEDs at the same time

Christmas is near (only 6 months), so we have to prepare our xmas tree.

What a better option than using our dear STM32F3Discovery board as a Christmas lights?

Let's see this in this tutorial.

(And yes, Santa Claus is watching you, so be kind.)

Pages

Subscribe to BadproG.com RSS