![]() |
PDL for FM4
Version1.2
Peripheral Driverl Library for FM4
|
Data Structures | |
| struct | stc_reset_result |
| Datatype for Reset Cause return structure. More... | |
Typedefs | |
| typedef struct stc_reset_result | stc_reset_result_t |
| Datatype for Reset Cause return structure. More... | |
Functions | |
| en_result_t | Reset_GetCause (stc_reset_result_t *pstcResult) |
| Get current Reset Cause Register contents. More... | |
| en_result_t | Reset_GetStoredCause (stc_reset_result_t *pstcResult) |
| Get stored Reset Cause. More... | |
Variables | |
| stc_reset_result_t | stcStoredResetCause |
| Global reset cause register. More... | |
Provided functions of RESET module:
Reset_GetCause() reads the Reset Casue, clears the HW register, and stores the result in a global variable. This is needed, if the SystemInit function uses this function for retrieving the reset cause (for RTC, etc.), but the application itself also needs the reset cause. Reset_GetStoredCause() reads out the global reset cause variable, without touching the reset cause register. Reset_GetCause() must be called before.
This driver does not need any configuration structure, but uses a result structure stc_reset_result_t, which has to be provided by the caller.
| typedef struct stc_reset_result stc_reset_result_t |
Datatype for Reset Cause return structure.
| en_result_t Reset_GetCause | ( | stc_reset_result_t * | pstcResult | ) |
Get current Reset Cause Register contents.
This function reads the Reset Cause Register and stores the cause bits in the result structure pointer.
| [out] | pstcResult | Reset Cause result structure |
| Ok | Function done sucessfully |
Definition at line 108 of file reset.c.
References stc_reset_result::bAnomalousFrequency, stc_reset_result::bClockSupervisor, stc_reset_result::bHardwareWatchdog, stc_reset_result::bInitx, stc_reset_result::bLowVoltageDetection, stc_reset_result::bPowerOn, stc_reset_result::bSoftware, stc_reset_result::bSoftwareWatchdog, FALSE, Ok, and TRUE.
| en_result_t Reset_GetStoredCause | ( | stc_reset_result_t * | pstcResult | ) |
Get stored Reset Cause.
This function reads the gloabal Reset Cause Variable
| [out] | pstcResult | Reset Cause result structure |
| Ok | Function done sucessfully |
Definition at line 213 of file reset.c.
References Ok.
| stc_reset_result_t stcStoredResetCause |