Page 1 of 1

Timer on bootloader

Posted: Mon Sep 10, 2018 9:53 am
by asihvo
Hi,
I have tried usleep and timers on secondary bootloader but nothing seems to delay the execution. Either the bootloader is not executed at all or timer of delay_milliseconds() just does not work on bootloader. As you might guess I am trying to implement uart on bootloader to controll the boot process. Any advice appriciated.
void init(void)
{

if (uart_rx())
{
booting_to=NORMAL;
uart_tx();
return ;
}

if (! memcmp(buffer,"FACTORY",sizeof(buffer)))
{
booting_to=FACTORY;
uart_tx();
return ;
}
booting_to=NORMAL;
}

BR
AP Sihvonen

Re: Timer on bootloader

Posted: Mon Sep 10, 2018 1:12 pm
by mon2
Can you try to slow down the CPU clock speed? Assuming you are using one of the XCORE-200 devices, you have more flexibility:

http://www.xcore.com/viewtopic.php?t=4528

Code: Select all

http://www.xcore.com/viewtopic.php?t=4528

and also

http://www.xcore.com/viewtopic.php?t=5665

Code: Select all

http://www.xcore.com/viewtopic.php?t=5665