Embedded projects are diverse. Every reader therefore has different ideas about what a typical embedded project looks like. RedAlert is our example project across to create a uniform reference for easier understanding.
RedAlert is a safety-critical system for recording, storing, and transmitting temperature values. It is designed to
- Record the temperature every second via a PT1000 sensor
- Transmit the current temperature value via CAN
- Detect a defective measurement process and switch on a red fail-safe LED in the event of a fault
- Add the date and time to the measured values and store them persistently every minute with a checksum
Hardware

The most important hardware components are
- an RP2040 microcontroller (Arm Cortex-M0+)
- a PT1000 sensor (MCU records measured value via ADC)
- an EEPROM (connected to MCU via SPI)
- an RTC real-time clock (connected to MCU via I2C)
- a CAN transceiver (connected to MCU via CAN)
You can take a look at the full schematics here.
Software

The RedAlert firmware for our example uses a structure with three separate layers:
- The hardware abstraction layer (HAL) makes the hardware functionalities accessible via a minimal set of functions. The CAN component in the HAL would, for example, offer a function for sending frames.
- The logic uses the HAL to implement a specific functionality. For example, the SafetySensor determines the current temperature from the raw ADC values and controls test currents via GPIO to detect faults.
- The application connects the individual logic parts with each other. In the example, a simple endless loop is used; for more complex applications, a real-time operating system can be used here.
Testing RedAlert
Start our online demo and look for the RedAlert folder in example/dut_specific/redalert.
You may also read the article about system testing for RedAlert.
