KETCube
Data Structures | Typedefs | Enumerations | Functions
KETCube resetMan

KETCube Core reset manager. More...

Data Structures

struct  ketCube_resetMan_dbg_t
 KETCube reset-dbg information. More...
 
struct  ketCube_resetMan_t
 KETCube RESET manager info struct. More...
 

Typedefs

typedef enum ketCube_resetMan_reason_t ketCube_resetMan_reason_t
 KETCube reset reason list. More...
 
typedef struct ketCube_resetMan_dbg_t ketCube_resetMan_dbg_t
 KETCube reset-dbg information. More...
 
typedef struct ketCube_resetMan_t ketCube_resetMan_t
 KETCube RESET manager info struct. More...
 

Enumerations

enum  ketCube_resetMan_reason_t {
  KETCUBE_RESETMAN_REASON_UNKNOWN, KETCUBE_RESETMAN_REASON_LOW_POWER, KETCUBE_RESETMAN_REASON_WWDG, KETCUBE_RESETMAN_REASON_IWDG,
  KETCUBE_RESETMAN_REASON_EXTPIN, KETCUBE_RESETMAN_REASON_POR, KETCUBE_RESETMAN_REASON_BOR, KETCUBE_RESETMAN_REASON_USER_RQ,
  KETCUBE_RESETMAN_REASON_USER_REMOTE_TERM, KETCUBE_RESETMAN_REASON_ERROR_HANDLER, KETCUBE_RESETMAN_REASON_PORSW, KETCUBE_RESETMAN_REASON_HARDFAULT
}
 KETCube reset reason list. More...
 

Functions

void ketCube_resetMan_requestReset (ketCube_resetMan_reason_t reason)
 Request software reset. More...
 
void ketCube_resetMan_info (void)
 Provide reset reasoning to user if necessary. More...
 
void ketCube_resetMan_getResetCause (void)
 Get RESET reason. More...
 

Detailed Description

KETCube Core reset manager.

Typedef Documentation

◆ ketCube_resetMan_dbg_t

KETCube reset-dbg information.

Note
The Segger's appnote https://www.segger.com/downloads/application-notes/AN00016 has been used to define dbg struct for HardFault reasoning

◆ ketCube_resetMan_reason_t

KETCube reset reason list.

Note
HW reset causes are taken from HW flags, SW reset causes are handled by a custom mechanism

◆ ketCube_resetMan_t

KETCube RESET manager info struct.

This struct survives soft-reset in RAM and thus provide useful information in case of failure without the need of external debugger usage

Enumeration Type Documentation

◆ ketCube_resetMan_reason_t

KETCube reset reason list.

Note
HW reset causes are taken from HW flags, SW reset causes are handled by a custom mechanism
Enumerator
KETCUBE_RESETMAN_REASON_UNKNOWN 

Unknown RESET reason.

KETCUBE_RESETMAN_REASON_LOW_POWER 

LP reset.

KETCUBE_RESETMAN_REASON_WWDG 

window watchdog

KETCUBE_RESETMAN_REASON_IWDG 

independent watchdog

KETCUBE_RESETMAN_REASON_EXTPIN 

external reset PIN

KETCUBE_RESETMAN_REASON_POR 

POR.

KETCUBE_RESETMAN_REASON_BOR 

BOR.

KETCUBE_RESETMAN_REASON_USER_RQ 

RESET requested by USER (e.g. reload command)

KETCUBE_RESETMAN_REASON_USER_REMOTE_TERM 

RESET requested by USER (e.g. reload command)

KETCUBE_RESETMAN_REASON_ERROR_HANDLER 

RESET caused by call from KETCube_ErrorHandler()

KETCUBE_RESETMAN_REASON_PORSW 

automatic (SW) RESET rerquested by core after POR

KETCUBE_RESETMAN_REASON_HARDFAULT 

automatic (SW) RESET after HardFault with debugInfo included

Function Documentation

◆ ketCube_resetMan_getResetCause()

void ketCube_resetMan_getResetCause ( void  )

Get RESET reason.

This function saves reset cause into core's configuration structure

◆ ketCube_resetMan_info()

void ketCube_resetMan_info ( void  )

Provide reset reasoning to user if necessary.

◆ ketCube_resetMan_requestReset()

void ketCube_resetMan_requestReset ( ketCube_resetMan_reason_t  reason)

Request software reset.

Parameters
reasonreset reason