Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Watchdog timer kick with semaphores in vApplicationIdleHook()?

Posted by nicholasd on June 5, 2018

I am currently using vApplicationIdleHook() to simply reset the Watchdog timer (WDT) on my target device. This technique works well so far, but there is no way of checking the proper functioning of other threads, so I would instead like to have my two other threads each give their own WDT binary semaphore, and vApplicationIdleHook() will only reset the WDT once both semaphores have been given by each task, otherwise the watchdog timer will reset.

I've noted that blocking functions like vTaskDelay(), xSemaphoreTake(), etc. are not usable in vApplicationIdleHook(), but I would like to hear any other suggestions of how to implement this sort of WDT functionality using vApplicationIdleHook().



Watchdog timer kick with semaphores in vApplicationIdleHook()?

Posted by richard_damon on June 5, 2018

What I have done is have each thread that needs to be verified that it is running set a global variable to a specific value if it is running properly, and the idle hook can check those values, and if all are set, kick the watchdog and reset the values to 0.

Another method that can be used is when each task 'makes progress' it saves a time stamp, and the idle task can then check that every task either has no work to do or has made progress recently.

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS v10.2.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo & Nuvoton Cortex-M23 demo.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers





STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner