예제 #1
0
파일: main.c 프로젝트: svn2github/freertos
/*---------------------------------------------------------------------------
 * The below callback function is called from Delayed ISR if configUSE_IDLE_HOOK 
 * is configured as 1.
 *---------------------------------------------------------------------------*/
void vApplicationIdleHook( void )
{
	#if WATCHDOG == WTC_IN_IDLE
	Kick_Watchdog();
	#endif
	#if ( INCLUDE_StartFlashCoRoutines == 1 || INCLUDE_StartHookCoRoutines == 1 )
	vCoRoutineSchedule();
	#endif
}
예제 #2
0
	void vApplicationTickHook( void )
	{
		/* Are we using the tick to kick the watchdog?  See watchdog.h
		for watchdog kicking options.  Note this is for demonstration
		only and is not a suggested method of servicing the watchdog in
		a real application. */
		#if WATCHDOG == WTC_IN_TICK
			Kick_Watchdog();
		#endif
	}
예제 #3
0
	void vApplicationIdleHook( void )
	{
		/* Are we using the idle task to kick the watchdog?  See watchdog.h
		for watchdog kicking options. Note this is for demonstration only
		and is not a suggested method of servicing the watchdog in a real
		application. */
		#if WATCHDOG == WTC_IN_IDLE
			Kick_Watchdog();
		#endif

		vCoRoutineSchedule();
	}
예제 #4
0
/*------------------------------------------------------------------------
  DefaultIRQHandler()

  This function is a placeholder for all vector definitions. Either use
  your own placeholder or add necessary code here.
-------------------------------------------------------------------------*/
__interrupt
void DefaultIRQHandler (void)
{
    /* RB_SYNC; */						/* Synchronisation with R-Bus   */
    /* May be required, if there is */
    /* no R-Bus access after the	*/
    /* reset of the interrupt flag  */

    __DI();								/* disable interrupts		   */
    while(1) {
        Kick_Watchdog();				/* feed hardware watchdog	   */
    }
    /* halt system */
}
예제 #5
0
static void prvWatchdogTask( void *pvParameters )
{
	const portTickType	xFrequency = WTC_CLR_PER;
	portTickType		xLastWakeTime;
	( void ) pvParameters;

	/* Get currrent tick count */
	xLastWakeTime = xTaskGetTickCount();

	for( ;; )
	{
		/* Get currrent tick count */
		xLastWakeTime = xTaskGetTickCount();

		Kick_Watchdog();

		/* Block the task for WTC_CLR_PER ticks (1s) at watchdog overflow period of WTC_PER_2_23 CLKMC cycles */
		vTaskDelayUntil( &xLastWakeTime, xFrequency );
	}
}