annotate gsm-fw/services/dar/dar_watchdog.c @ 305:4dccc9d3305f

gsm-fw: checking in DAR from Leonardo source
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 16 Mar 2014 05:48:58 +0000
parents
children a7087f91c752
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /****************************************************************************/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 /* File Name: dar_watchdog.c */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 /* Purpose: This function contains the DAR watchdog functions */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 /* Version 0.1 */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 /* Date Modification */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 /* ------------------------------------ */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 /* 8 November 2001 Create */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 /* Author Stephanie Gerthoux */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 /* (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved*/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 /****************************************************************************/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 #include "rv/rv_defined_swe.h"
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 #ifdef RVM_DAR_SWE
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 #ifndef _WINDOWS
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 #include "config/swconfig.cfg"
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 #include "config/sys.cfg"
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 #include "config/chipset.cfg"
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 #endif
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 #include "rv/rv_general.h"
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28 #include "rvm/rvm_gen.h"
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 #include "rvm/rvm_priorities.h"
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 #include "dar/dar_api.h"
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 #include "dar/dar_gen.h"
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 #include "dar/dar_diagnose_i.h"
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 /**** Global variable ****/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 /* Get the dar_current status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 extern T_DAR_RECOVERY_STATUS dar_current_status;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 /********************************************************************************/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 /* Function Name: dar_watchdog_reset */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 /* Purpose: This function is called to reset the system when the general */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 /* general purpose timer expires */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 /* Input Parameters: */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 /* Pointer to the message to store */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 /* Data Format, */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49 /* Data level, */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 /* Data Use Id, */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 /* Output Parameters: */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 /* Validation of the function execution. */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 /* Note: */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 /* None */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 /********************************************************************************/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 void dar_watchdog_reset(void)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 /* Update the current status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63 dar_current_status = DAR_WATCHDOG;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 /* reset the system */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 dar_reset();
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 } /* dar_watchdog_reset */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 #endif /* #ifdef RVM_DAR_SWE */