1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-18 08:54:15 +01:00

OP-815 changed PIOS_WDG_RegisterFlag to reset the WDG to prevent timeouts during module initialization

This commit is contained in:
Alessio Morale 2013-01-26 11:43:28 +01:00
parent a4faa22c4b
commit 153db89663
3 changed files with 8 additions and 2 deletions

View File

@ -69,7 +69,7 @@ int main()
* (see pios_board.c for your arch)
* */
PIOS_Board_Init();
PIOS_WDG_Clear();
#ifdef ERASE_FLASH
PIOS_Flash_Jedec_EraseChip();
#if defined(PIOS_LED_HEARTBEAT)

View File

@ -94,6 +94,9 @@ uint16_t PIOS_WDG_Init()
*/
bool PIOS_WDG_RegisterFlag(uint16_t flag_requested)
{
// flag are being registered so we are in module initialization phase
// clear the WDG to prevent timeout while initializing modules. (OP-815)
PIOS_WDG_Clear();
/* Fail if flag already registered */
if(wdg_configuration.used_flags & flag_requested)

View File

@ -98,7 +98,10 @@ uint16_t PIOS_WDG_Init()
*/
bool PIOS_WDG_RegisterFlag(uint16_t flag_requested)
{
// flag are being registered so we are in module initialization phase
// clear the WDG to prevent timeout while initializing modules. (OP-815)
PIOS_WDG_Clear();
/* Fail if flag already registered */
if(wdg_configuration.used_flags & flag_requested)
return false;