Changeset 540
- Timestamp:
- 04/24/08 20:09:54 (3 weeks ago)
- Files:
-
- nano-RK/projects/SAMPL/client/nrk_cfg.h (modified) (1 diff)
- nano-RK/projects/SAMPL/gateway/nrk_cfg.h (modified) (1 diff)
- nano-RK/src/kernel/source/nrk.c (modified) (2 diffs)
- nano-RK/src/kernel/source/nrk_error.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nano-RK/projects/SAMPL/client/nrk_cfg.h
r537 r540 13 13 // #define NRK_HALT_ON_ERROR 14 14 //#define NRK_HALT_AND_LOOP_ON_ERROR 15 #define NRK_REBOOT_ON_ERROR 16 17 15 18 #define NRK_WATCHDOG 16 19 // NRK_STACK_CHECK adds a little check to see if the bottom of the stack nano-RK/projects/SAMPL/gateway/nrk_cfg.h
r354 r540 8 8 // NRK_REPORT_ERRORS will cause the kernel to print out information about 9 9 // missed deadlines or reserve violations 10 #define NRK_REPORT_ERRORS10 //#define NRK_REPORT_ERRORS 11 11 // NRK_HALT_ON_ERRORS will cause the kernel to freeze on errors so that 12 12 // it is easier to see debugging messages. 13 13 // #define NRK_HALT_ON_ERROR 14 14 //#define NRK_HALT_AND_LOOP_ON_ERROR 15 16 #define NRK_REBOOT_ON_ERROR 15 17 16 18 #define NRK_WATCHDOG nano-RK/src/kernel/source/nrk.c
r431 r540 71 71 { 72 72 73 int i;73 uint8_t i; 74 74 // unsigned char *stkc; 75 75 … … 82 82 #ifdef NRK_STARTUP_VOLTAGE_CHECK 83 83 if(nrk_voltage_status()==0) nrk_kernel_error_add(NRK_LOW_VOLTAGE,0); 84 #endif 85 86 #ifdef NRK_REBOOT_ON_ERROR 87 #ifndef NRK_WATCHDOG 88 while(1) 89 { 90 nrk_kprintf( PSTR("KERNEL CONFIG CONFLICT: NRK_REBOOT_ON_ERROR needs watchdog!\r\n") ); 91 for (i = 0; i < 100; i++) 92 nrk_spin_wait_us (1000); 93 } 94 #endif 84 95 #endif 85 96 nano-RK/src/kernel/source/nrk_error.c
r412 r540 78 78 if (error_num == 0) 79 79 return 0; 80 80 81 #ifndef NRK_REBOOT_ON_ERROR 81 82 #ifdef NRK_HALT_ON_ERROR 82 83 nrk_int_disable (); … … 84 85 nrk_watchdog_disable(); 85 86 #endif 86 87 #endif /* */88 87 #endif 88 #endif 89 89 90 #ifdef NRK_HALT_AND_LOOP_ON_ERROR 90 91 nrk_int_disable (); … … 170 171 putchar ('\r'); 171 172 putchar ('\n'); 172 173 174 #ifdef NRK_REBOOT_ON_ERROR 175 // wait for watchdog to kick in 176 nrk_int_enable(); 177 while(1); 178 #endif 179 173 180 //t=error_num; 174 181 #ifdef NRK_HALT_AND_LOOP_ON_ERROR
