Exemple #1
0
void _machine_restart(void)
{
	__wdt_select_extalclk();
	__wdt_select_clk_div64();
	__wdt_set_data(100);
	__wdt_set_count(0);
	__tcu_start_wdt_clock();
	__wdt_start();
	while(1);

}
Exemple #2
0
static int _do_reset(void)
{
    dgprintf( "##Reseting ...\n\n" );
    __wdt_select_extalclk();
    __wdt_select_clk_div64();
    __wdt_set_data(100);
    __wdt_set_count(0);
    __tcu_start_wdt_clock();
    __wdt_start();
    REG_EMC_DMCR |= EMC_DMCR_RMODE | EMC_DMCR_RFSH;

    dgprintf("To exit\n");
    //while(1);
    dgprintf("*** reset failed ***\n");

    return 0;
}