0
0
FreeRTOSprogramming~20 mins

Health monitoring and heartbeat in FreeRTOS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Heartbeat Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Purpose of Heartbeat in FreeRTOS

What is the main purpose of implementing a heartbeat mechanism in a FreeRTOS-based embedded system?

ATo reduce the memory usage of the system
BTo increase the CPU clock speed dynamically
CTo monitor task execution and detect if any task has stopped responding
DTo automatically update the firmware over the network
Attempts:
2 left
💡 Hint

Think about how the system knows if a task is alive or stuck.

💻 Command Output
intermediate
1:30remaining
Output of Health Check Task Status

Given a FreeRTOS system with a health monitoring task that prints task statuses, what will be the output if the 'SensorTask' has stopped sending heartbeats?

FreeRTOS
Task Name: SensorTask, Heartbeat Received: No
Task Name: LoggerTask, Heartbeat Received: Yes
Task Name: CommTask, Heartbeat Received: Yes
ASensorTask is flagged as unresponsive
BAll tasks are reported as healthy
CSystem resets immediately without any message
DLoggerTask is flagged as unresponsive
Attempts:
2 left
💡 Hint

Look at which task missed the heartbeat.

Configuration
advanced
2:00remaining
Configuring Heartbeat Interval

Which FreeRTOS configuration setting controls the timing for a heartbeat or health check task to run periodically every 500 milliseconds?

AvTaskDelay(pdMS_TO_TICKS(500));
BvTaskDelay(pdMS_TO_TICKS(50));
CvTaskDelay(pdMS_TO_TICKS(5000));
DvTaskDelay(pdMS_TO_TICKS(5));
Attempts:
2 left
💡 Hint

Convert milliseconds to ticks using the FreeRTOS macro.

Troubleshoot
advanced
2:00remaining
Diagnosing Missing Heartbeats

A FreeRTOS health monitoring task reports missing heartbeats from a critical task. Which of the following is the most likely cause?

AThe critical task is running too fast
BThe health monitoring task has a higher priority than the critical task
CThe system clock frequency is too high
DThe critical task is blocked or stuck and not running
Attempts:
2 left
💡 Hint

Think about why a task would fail to send a heartbeat.

🔀 Workflow
expert
3:00remaining
Sequence of Steps for Implementing Heartbeat Monitoring

What is the correct sequence of steps to implement a heartbeat monitoring system in FreeRTOS?

A2,1,3,4
B1,3,2,4
C3,1,2,4
D1,2,3,4
Attempts:
2 left
💡 Hint

Think about setting up the mechanism before checking it.