Contiki-NG
|
Driver for the cc2538 System Control Module. More...
Files | |
file | sys-ctrl.c |
Implementation of the cc2538 System Control driver. | |
file | sys-ctrl.h |
Header file for the cc2538 System Control driver. | |
SysCtrl functions | |
int | sys_ctrl_get_reset_cause (void) |
Gets the cause of the last reset. More... | |
const char * | sys_ctrl_get_reset_cause_str (void) |
Gets a string describing the cause of the last reset. More... | |
void | sys_ctrl_init () |
Initialises the System Control Driver. More... | |
void | sys_ctrl_reset () |
Generates a warm reset through the SYS_CTRL_PWRDBG register. | |
uint32_t | sys_ctrl_get_sys_clock () |
Returns the actual system clock in Hz. | |
uint32_t | sys_ctrl_get_io_clock () |
Returns the actual io clock in Hz. | |
SYS_CTRL_RCGCSEC register bit masks | |
#define | SYS_CTRL_RCGCSEC_AES 0x00000002 |
AES clock enable, CPU running. | |
#define | SYS_CTRL_RCGCSEC_PKA 0x00000001 |
PKA clock enable, CPU running. | |
SYS_CTRL_SCGCSEC register bit masks | |
#define | SYS_CTRL_SCGCSEC_AES 0x00000002 |
AES clock enable, CPU IDLE. | |
#define | SYS_CTRL_SCGCSEC_PKA 0x00000001 |
PKA clock enable, CPU IDLE. | |
SYS_CTRL_DCGCSEC register bit masks | |
#define | SYS_CTRL_DCGCSEC_AES 0x00000002 |
AES clock enable, PM0. | |
#define | SYS_CTRL_DCGCSEC_PKA 0x00000001 |
PKA clock enable, PM0. | |
SYS_CTRL_SRSEC register bits | |
#define | SYS_CTRL_SRSEC_AES 0x00000002 |
AES is reset. | |
#define | SYS_CTRL_SRSEC_PKA 0x00000001 |
PKA is reset. | |
SYS_CTRL_PWRDBG register bits | |
#define | SYS_CTRL_PWRDBG_FORCE_WARM_RESET 0x00000008 |
SYS_CTRL_SCGCUART Register Bit-Masks | |
#define | SYS_CTRL_SCGCUART_UART1 0x00000002 |
UART1 Clock, CPU IDLE. | |
#define | SYS_CTRL_SCGCUART_UART0 0x00000001 |
UART0 Clock, CPU IDLE. | |
SYS_CTRL_SRUART register bits | |
#define | SYS_CTRL_SRUART_UART1 0x00000002 |
UART1 module is reset. | |
#define | SYS_CTRL_SRUART_UART0 0x00000001 |
UART0 module is reset | |
SysCtrl 32-kHz oscillator selection | |
Prefer the crystal oscillator for time accuracy, and the RC oscillator for cost and power consumption | |
#define | SYS_CTRL_OSC32K_USE_XTAL 0 |
Driver for the cc2538 System Control Module.
int sys_ctrl_get_reset_cause | ( | void | ) |
Gets the cause of the last reset.
SYS_CTRL_CLOCK_STA_RST_x
reset cause Definition at line 54 of file sys-ctrl.c.
Referenced by sys_ctrl_get_reset_cause_str().
const char * sys_ctrl_get_reset_cause_str | ( | void | ) |
Gets a string describing the cause of the last reset.
Definition at line 61 of file sys-ctrl.c.
References sys_ctrl_get_reset_cause().
void sys_ctrl_init | ( | ) |
Initialises the System Control Driver.
The main purpose of this function is to power up and select clocks and oscillators
Definition at line 74 of file sys-ctrl.c.
Referenced by soc_init().