This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTX and watchdog monitoring

I wondering what method you're using to monitor the sanity state of the RTOS and activate a watchdog in case of failure.

Currently, I have a hardware watchdog feed in the lower priority task . But in some case it's not working :
The RTX can be OK but one task can be stuck , or buffers cannot be allocated or others reasons.

According to you , what is the best method ?

thanks in advance.

Parents
  • what you can do it kick your watchdog only if each and every task has set a dedicated bit to 1. if not, the system resets:

    #define SERVICE_WATCHDOG                                lock_mutex(APPLICATION_WATCHDOG_FLAG_DATA) ;\ 
                                                                                    g_application_alive_signals |= 1<<(os_tsk_self() - g_first_task_id) ;\ 
                                                                                    unlock_mutex(APPLICATION_WATCHDOG_FLAG_DATA) ;
    

    and

    
    __task void user_task(void)
    {
        for (;;)
        {
            SERVICE_WATCHDOG
        }
    }
    

Reply
  • what you can do it kick your watchdog only if each and every task has set a dedicated bit to 1. if not, the system resets:

    #define SERVICE_WATCHDOG                                lock_mutex(APPLICATION_WATCHDOG_FLAG_DATA) ;\ 
                                                                                    g_application_alive_signals |= 1<<(os_tsk_self() - g_first_task_id) ;\ 
                                                                                    unlock_mutex(APPLICATION_WATCHDOG_FLAG_DATA) ;
    

    and

    
    __task void user_task(void)
    {
        for (;;)
        {
            SERVICE_WATCHDOG
        }
    }
    

Children