From c3464047fb5f1a00613c710a123ef7145751ffb3 Mon Sep 17 00:00:00 2001 From: Michael Lyle Date: Sat, 16 Jul 2016 22:47:57 -0700 Subject: [PATCH] brain/brainre1: make RCC flags like other targets This was preventing reset reasons from properly displaying-- because the reset reason flags were cleared before the alarms library was initialized. --- flight/targets/brain/fw/pios_board.c | 3 +-- flight/targets/brainre1/fw/pios_board.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/flight/targets/brain/fw/pios_board.c b/flight/targets/brain/fw/pios_board.c index d94092404f..fbfac3e733 100644 --- a/flight/targets/brain/fw/pios_board.c +++ b/flight/targets/brain/fw/pios_board.c @@ -263,8 +263,6 @@ void PIOS_Board_Init(void) { PIOS_HAL_Panic(PIOS_LED_ALARM, PIOS_HAL_PANIC_FILESYS); #endif /* PIOS_INCLUDE_FLASH */ - RCC_ClearFlag(); // The flags cleared after use - /* Initialize UAVObject libraries */ UAVObjInitialize(); @@ -285,6 +283,7 @@ void PIOS_Board_Init(void) { /* Initialize the alarms library */ AlarmsInitialize(); + PIOS_RESET_Clear(); /* Initialize the task monitor library */ TaskMonitorInitialize(); diff --git a/flight/targets/brainre1/fw/pios_board.c b/flight/targets/brainre1/fw/pios_board.c index 4563597676..149bc87b75 100644 --- a/flight/targets/brainre1/fw/pios_board.c +++ b/flight/targets/brainre1/fw/pios_board.c @@ -275,8 +275,6 @@ void PIOS_Board_Init(void) { #endif /* PIOS_INCLUDE_FLASH */ - RCC_ClearFlag(); // The flags cleared after use - /* Initialize UAVObject libraries */ UAVObjInitialize(); @@ -316,6 +314,7 @@ void PIOS_Board_Init(void) { /* Initialize the alarms library */ AlarmsInitialize(); + PIOS_RESET_Clear(); /* Initialize the task monitor library */ TaskMonitorInitialize();