add PIC watchdog

This commit is contained in:
2023-09-05 11:06:23 +02:00
parent 32f1bd73b4
commit e0b94c5250
6 changed files with 169 additions and 41 deletions

View File

@@ -57,6 +57,9 @@
#include "tmr0.h"
#include "ecan.h"
#define WDTCWS 7
#define WDTCCS 48
#define WDTCPS 12
/**
@@ -98,6 +101,84 @@ void OSCILLATOR_Initialize(void);
*/
void PMD_Initialize(void);
/**
* @Param
none
* @Returns
none
* @Description
Initializes the WWDT to the default states configured in the
* MCC GUI
* @Example
WWDT_Initialize();
*/
void WWDT_Initialize(void);
/**
* @Param
none
* @Returns
none
* @Description
Enable the WWDT by setting the SEN bit.
* @Example
WWDT_SoftEnable();
*/
void WWDT_SoftEnable(void);
/**
* @Param
none
* @Returns
none
* @Description
Disable the WWDT by clearing the SEN bit.
* @Example
WWDT_SoftDisable();
*/
void WWDT_SoftDisable(void);
/**
* @Param
none
* @Returns
none
* @Description
Disable the interrupt, arm the WWDT by reading back the WDTCON0 register
* clear the WWDT and enable the interrupt.
* @Example
WWDT_TimerClear();
*/
void WWDT_TimerClear(void);
/**
* @Param
none
* @Returns
High --> WWDT reset has not occurred.
* Low --> WWDT reset has occurred.
* @Description
Returns the status of whether the WWDT reset has occurred or not.
* @Example
if(WWDT_TimeOutStatusGet())
*/
bool WWDT_TimeOutStatusGet(void);
/**
* @Param
none
* @Returns
High --> WWDT window violation reset has not occurred.
* Low --> WWDT window violation reset has occurred.
* @Description
Returns the status of, whether the WWDT window violation
* reset has occurred or not.
* @Example
if(WWDT_WindowViolationStatusGet())
*/
bool WWDT_WindowViolationStatusGet(void);
#endif /* MCC_H */
/**