Skip to content

Commit

Permalink
Resolved #7
Browse files Browse the repository at this point in the history
- add watchdog
  • Loading branch information
hooni1020 committed Jan 11, 2019
1 parent 2a0f92f commit 0a94dc1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion WIZ550SR_App/src/common.h
Expand Up @@ -6,7 +6,7 @@

#define MAJOR_VER 1
#define MINOR_VER 1
#define MAINTENANCE_VER 8
#define MAINTENANCE_VER 9

#define SOCK_DATA 0
#define SOCK_TFTP 1
Expand Down
10 changes: 10 additions & 0 deletions WIZ550SR_App/src/main.c
Expand Up @@ -25,6 +25,7 @@
#include "dhcp_cb.h"
#include "i2cHandler.h"
#include "eepromHandler.h"
#include "stm32f10x_iwdg.h"

// ----------------------------------------------------------------------------
//
Expand Down Expand Up @@ -172,7 +173,16 @@ int main(int argc, char* argv[])
atc_init();

op_mode = OP_DATA;

IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);
IWDG_SetPrescaler(IWDG_Prescaler_256);
IWDG_SetReload(156);
IWDG_ReloadCounter();
IWDG_Enable();

while (1) {
IWDG_ReloadCounter();

if(op_mode == OP_COMMAND) { // Command Mode
atc_run();
sockwatch_run();
Expand Down

0 comments on commit 0a94dc1

Please sign in to comment.