application: remove watchdog because menues can block

This commit is contained in:
King Kévin 2018-01-17 12:27:32 +01:00
parent bffb766368
commit e064cce4f0
1 changed files with 0 additions and 19 deletions

View File

@ -20,23 +20,13 @@
/* standard libraries */
#include <stdint.h> // standard integer types
#include <stdlib.h> // standard utilities
#include <string.h> // string utilities
#include <math.h> // math utilities
/* STM32 (including CM3) libraries */
#include <libopencmsis/core_cm3.h> // Cortex M3 utilities
#include <libopencm3/cm3/scb.h> // vector table definition
#include <libopencm3/cm3/nvic.h> // interrupt utilities
#include <libopencm3/stm32/gpio.h> // general purpose input output library
#include <libopencm3/stm32/rcc.h> // real-time control clock library
#include <libopencm3/stm32/exti.h> // external interrupt utilities
#include <libopencm3/stm32/iwdg.h> // independent watchdog utilities
#include <libopencm3/stm32/dbgmcu.h> // debug utilities
#include <libopencm3/stm32/flash.h> // flash utilities
#include <libopencm3/stm32/desig.h> // design utilities
#include <libopencm3/stm32/adc.h> // ADC utilities
#include <libopencm3/stm32/dac.h> // DAC utilities
/* own libraries */
#include "global.h" // board definitions
@ -47,8 +37,6 @@
#include "busvoodoo_global.h" // BusVoodoo definitions
#include "busvoodoo_hiz.h" // BusVoodoo HiZ mode utilities
#define WATCHDOG_PERIOD 10000 /**< watchdog period in ms */
size_t putc(char c)
{
size_t length = 0; // number of characters printed
@ -180,15 +168,9 @@ void main(void)
#if DEBUG
// enable functionalities for easier debug
DBGMCU_CR |= DBGMCU_CR_IWDG_STOP; // stop independent watchdog counter when code is halted
DBGMCU_CR |= DBGMCU_CR_WWDG_STOP; // stop window watchdog counter when code is halted
DBGMCU_CR |= DBGMCU_CR_STANDBY; // allow debug also in standby mode (keep digital part and clock powered)
DBGMCU_CR |= DBGMCU_CR_STOP; // allow debug also in stop mode (keep clock powered)
DBGMCU_CR |= DBGMCU_CR_SLEEP; // allow debug also in sleep mode (keep clock powered)
#else
// setup watchdog to reset in case we get stuck (i.e. when an error occurred)
iwdg_set_period_ms(WATCHDOG_PERIOD); // set independent watchdog period
iwdg_start(); // start independent watchdog
#endif
board_setup(); // setup board
@ -229,7 +211,6 @@ void main(void)
char c = '\0'; // to store received character
bool char_flag = false; // a new character has been received
while (true) { // infinite loop
iwdg_reset(); // kick the dog
while (uart_received) { // data received over UART
action = true; // action has been performed
led_toggle(); // toggle LED