void user_init(void)
{
uint32 delay=200000;
// Configure the UART
uart_init(BIT_RATE_115200, BIT_RATE_115200);
// ets_wdt_init(100000);
ets_wdt_enable();
// ets_wdt_disable();
wdt_feed();
ets_uart_printf("START\r\n");
wdt_feed();
// for(;;) //gets wdt_reset after very short time.
for(;;) // no wdt resets at all
{
ets_delay_us(delay);
delay+=200000;
wdt_feed();
ets_uart_printf("%d\r\n",delay);
wdt_feed();
}
In the above the comments are not helping but anyway the code below is the code that has a chance of working
since it feeds the wdt inside the loop that is consuming time however since the time between wdt feeds is increasing
at some point the delay will be sufficient to trigger a wdt reset.
for(;;) // no wdt resets at all
{
ets_delay_us(delay);
delay+=200000;
wdt_feed();
ets_uart_printf("%d\r\n",delay);
wdt_feed();
}
Question
Your commented code says [quote// no wdt resets at all][/quote] so it is true or not true that there were no wdt resets?
If it is somewhat true ( small delays didn't trigger a reset) how large did the delay have to be to trigger a wdt reset ( expectation is around 1 elapsed second )?
Or are you saying in spite of the code comments that resets occur whether the wdt is fed or not ( feeding is broken)?