Hello EMBEDIN viewers,

Platform Setup

After evaluating several options for setting up a development platform for this series, I chose ESP32C6 board with VSCode and ESP-IDF (FreeRTOS v10.5.1) on Ubuntu x86_64. This option provides an excellent balance of ease of programming, straightforward setup, and a robust debugging environment.

Steps to Set Up the Platform

To get started with the ESP32C6 MCU board using VSCode and ESP-IDF on Ubuntu, follow these steps:

  1. Install VSCode: Download and install Visual Studio Code from the VSCode.
  2. Set Up ESP-IDF:
  • Follow the detailed instructions provided in the ESP-IDF setup guide available ESP-IDF.
  • This guide covers all necessary steps including installing prerequisites, configuring the ESP-IDF environment, and integrating it with VSCode.
  • Getting started
  • Datasheet
  1. Connect your ESP32C6 board: Ensure your development board is properly connected to your development machine.
  2. Create ans build your first project: Use the VSCode ESP-IDF extension to create a new project, write your code, and build it.
  3. Debugging: Utilize the integrated debugging tools within VSCode to streamline your development process.

Software Timers in FreeRTOS

Software timers are an essential feature in FreeRTOS, allowing for precise timing and delayed execution of tasks without consuming hardware timer resources. For a quick overview, please refer: SW-Timers

Let’s first design basic software timers:

  • One-Shot Timer: A timer that is set up to fire only once.
  • Periodic Timer: A timer that fires at regular intervals.

Implementation

GitHub

Output

Output

Timer Manager Module for FreeRTOS on ESP32C6

This Timer Manager module is designed to handle software timers using FreeRTOS on ESP32C6 MCU. It provides a generic interface for creating, starting, and stopping timers, making it easy to manage multiple timers within an application.

Features

  • Generic interface for handling software timers
  • Utilizes FreeRTOS tasks for timer management
  • Easy-to-use API for creating, starting, and stopping timers

Implementation

GitHub

Output

Output

Thank you. Hope you liked it, stay tuned for more such posts.

Widget is loading comments...