FreeRTOS base Question (stm32f HID/VCP)

hi~ I have several Question like below. <specification>
h/w : STM32F
s/w : based FreeRTOS , HID/VCP
My Program have been 5 tasks( HID/VCP TX , HID/VCP RX , UART TX, UART RX,** test **) 1. I would like to know method to check test task periodically.
    I want to check test task works well.     Except vTaskList function. ( because : This function will disable interrupts for its duration. It is not intended for normal application runtime use but as a debug aid ) 2. when coding below method(2.1 and 2.2), system became pause(stop). Is pause(stop) Action normal? 2.1 after same task duplicate create(same handle) , duplicate delete  ==> system pause(stop)
    ex> xTaskHandle xHandle;            xTaskCreate( , , , , , &xHandle )
           xTaskCreate( , , , , , &xHandle )
           vTaskDelete(xHandle);                      // system live
           vTaskDelete(xHandle);                      // system pause(stop) 2.2 without task create, when random task handle delete.  ===>  system pause(stop)
    ex> xTaskHandle xHandle;            vTaskDelete(xHandle);                      // system pause(stop) 3. I can communication this method ( STM32F USB HID <-> Window ).
    I want communication this method ( STM32F USB HID <-> android ). Is it possible ????
    If possible , I know method. Help Me. please, because of Short English , explanation is diffcult. sorry.

FreeRTOS base Question (stm32f HID/VCP)

1. I would like to know method to check test task periodically.
    I want to check test task works well.
What is it you want to know about the test task, and when do you want to know it? If you want a snapshot view of the task then you could use a state viewer plug-in if you are using IAR or an Eclipse based IDE.  That will tell you the stack usage at least. You can also code the task to monitor itself, if you want continuous monitoring.
xTaskCreate( , , , , , &xHandle )
           xTaskCreate( , , , , , &xHandle )
           vTaskDelete(xHandle);                      // system live
           vTaskDelete(xHandle);                      // system pause(stop)
Is xHandle the same variable?  A task handle can only reference one task at a time.  It will reference the first task created after the first call to xTaskCreate(), but then that reference will be lost and it will instead reference the second task created after the second call to xTaskCreate. Then, after the first call to vTaskDelete() xHandle will not reference any valid task (the task it did reference is not deleted), so the second call to vTaskDelete() will be invalid.
I want communication this method ( STM32F USB HID <-> android ). Is it possible ????
I know some vendors provide software with this functionality (NXP do I think, for example), but it is way outside of my knowledge space and not FreeRTOS released. Regards.

FreeRTOS base Question (stm32f HID/VCP)

first, thanks you. richardbarry. thanks 1. Answer , Add a Reply -> I don’t want like IAR viewr plug-in.     Just need to confirm test task.
    I want to know test task imformation whether live or die.
    I want to know test task imformation whether working or not working.     You can also code the task to monitor itself, if you want continuous monitoring.
    -> This answer is good.
       but, need to more detail imformation.
       I don’t know to use what FreeRTOS API function for monitor itself.       please, one more, 

FreeRTOS base Question (stm32f HID/VCP)

Most of the standard FreeRTOS demos use a set of common tasks that monitor themselves and update a counter if they are running correctly.  A check task then monitors all the counters to ensure that all the tasks are running as expected.  This is just one way of doing it though. The best way of doing it depends on what your task is doing.  For example…if the task is supposed to run every second, then have the task read the time each time it executes so the task knows if it is running at the correct rate or not.  If it detects that it is running at the correct rate it can communicate the error to whatever is monitoring the system.  You can also use the hardware watchdog by having the task kick the watchdog if it is running and running correctly, and have it not kick the watchdog if it is not running or running incorrectly. Regards.

FreeRTOS base Question (stm32f HID/VCP)

One thing I do to check if tasks are running is I have each task I care about set a bit in my global FLAGS variable.  Periodically (slowly) I run a Housekeeping task and one of the things it does is check the flags (easy to do with a bit mask).  If all is well it clears the flags and continues.  Otherwise it skips touching the watchdog timer so the system will reset. Note that on setting and clearing flag bits in a global FLAGS variable I have two short functions that enter critical task while doing the change to prevent being swapped out in mid-change and messing up the global FLAGS. FlagSet(bit_mask);  // OR in the bit
FlagClear(bit_mask);  // AND out the bit