Compare commits
2 Commits
c6fedbd759
...
e46a75f99f
Author | SHA1 | Date |
---|---|---|
Oskar Winkels | e46a75f99f | |
Oskar Winkels | 0195578317 |
|
@ -144,6 +144,7 @@ mission_t mission = M_NONE;
|
|||
#ifdef WATCHDOG_STM
|
||||
bool pHeartbeat = false;
|
||||
bool WD_OK = false;
|
||||
bool WD_initialized = false;
|
||||
#endif
|
||||
|
||||
/* USER CODE END PV */
|
||||
|
@ -192,11 +193,16 @@ int main(void)
|
|||
|
||||
/* USER CODE END SysInit */
|
||||
|
||||
MX_GPIO_Init();
|
||||
MX_CAN_Init();
|
||||
|
||||
#if false
|
||||
/* Initialize all configured peripherals */
|
||||
MX_GPIO_Init();
|
||||
MX_CAN_Init();
|
||||
MX_IWDG_Init();
|
||||
/* USER CODE BEGIN 2 */
|
||||
#endif
|
||||
|
||||
// Ensure we start with SDC disabled
|
||||
HAL_GPIO_WritePin(Watchdog_GPIO_Port, Watchdog_Pin, GPIO_PIN_RESET);
|
||||
|
@ -247,6 +253,9 @@ int main(void)
|
|||
// Important to prevent bus error state while ABX is starting up
|
||||
HAL_Delay(1000);
|
||||
|
||||
MX_IWDG_Init();
|
||||
WD_initialized = true;
|
||||
|
||||
while (true) {
|
||||
|
||||
bool TS_activate_MUXed = HAL_GPIO_ReadPin(TS_activate_MUXed_GPIO_Port, TS_activate_MUXed_Pin) == GPIO_PIN_RESET;
|
||||
|
@ -485,7 +494,8 @@ void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan) {
|
|||
#ifdef WATCHDOG_STM
|
||||
|
||||
if (rxData.signals.heartbeat != pHeartbeat) {
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
if (WD_initialized)
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
WD_OK = true;
|
||||
HAL_GPIO_WritePin(Watchdog_GPIO_Port, Watchdog_Pin, GPIO_PIN_SET);
|
||||
}
|
||||
|
|
|
@ -911,7 +911,7 @@
|
|||
)
|
||||
|
||||
(symbol (lib_id "Device:R") (at 142.24 88.9 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(in_bom yes) (on_board yes) (dnp yes)
|
||||
(uuid 86666e00-6522-42d9-8c50-ddbe3c590e94)
|
||||
(property "Reference" "R3" (at 140.462 90.0684 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
|
@ -989,7 +989,7 @@
|
|||
)
|
||||
|
||||
(symbol (lib_id "Device:C") (at 148.59 93.98 90) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(in_bom yes) (on_board yes) (dnp yes)
|
||||
(uuid e0f15250-bd20-4545-ac0d-527fe10e2cdb)
|
||||
(property "Reference" "C17" (at 147.4216 91.059 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
|
@ -1042,7 +1042,7 @@
|
|||
)
|
||||
|
||||
(symbol (lib_id "Device:R") (at 142.24 99.06 180) (unit 1)
|
||||
(in_bom yes) (on_board yes) (dnp no)
|
||||
(in_bom yes) (on_board yes) (dnp yes)
|
||||
(uuid fe93d30d-de39-4ca8-8ec8-dbd2cc54f863)
|
||||
(property "Reference" "R7" (at 140.462 100.2284 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
|
|
Loading…
Reference in New Issue