Timer on bootloader
Posted: Mon Sep 10, 2018 9:53 am
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
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