47 #if SYS_CTRL_OSC32K_USE_XTAL 48 #define SYS_CTRL_OSCS 0 50 #define SYS_CTRL_OSCS SYS_CTRL_CLOCK_CTRL_OSC32K 57 SYS_CTRL_CLOCK_STA_RST_S;
63 static const char *reset_cause[] = {
67 "CLD or software reset" 78 #if SYS_CTRL_OSC32K_USE_XTAL 98 val = SYS_CTRL_OSCS | SYS_CTRL_CLOCK_CTRL_OSC_PD
99 | SYS_CTRL_IO_DIV | SYS_CTRL_SYS_DIV;
103 & (SYS_CTRL_CLOCK_STA_OSC32K | SYS_CTRL_CLOCK_STA_OSC))
106 #if SYS_CTRL_OSC32K_USE_XTAL 123 SYS_CTRL_CLOCK_STA_SYS_DIV);
130 SYS_CTRL_CLOCK_STA_IO_DIV) >> 8);
Header file for the cc2538 System Control driver.
const char * sys_ctrl_get_reset_cause_str(void)
Gets a string describing the cause of the last reset.
uint32_t sys_ctrl_get_io_clock(void)
Returns the actual io clock in Hz.
Header file with register and macro declarations for the cc2538 GPIO module.
Header file with declarations for the I/O Control module.
#define IOC_OVERRIDE_ANA
Analog Enable.
Header file with register manipulation macro definitions.
#define GPIO_PIN_MASK(PIN)
Converts a pin number to a pin mask.
#define GPIO_D_NUM
GPIO_D: 3.
#define GPIO_SOFTWARE_CONTROL(PORT_BASE, PIN_MASK)
Configure the pin to be software controlled with PIN_MASK of port with PORT_BASE. ...
int sys_ctrl_get_reset_cause(void)
Gets the cause of the last reset.
#define SYS_CTRL_CLOCK_STA
Clock status register.
void ioc_set_over(uint8_t port, uint8_t pin, uint8_t over)
Set Port:Pin override function.
#define GPIO_SET_INPUT(PORT_BASE, PIN_MASK)
Set pins with PIN_MASK of port with PORT_BASE to input.
Header file with prototypes for interrupt control on the cc2538 Cortex-M3 micro.
uint32_t sys_ctrl_get_sys_clock(void)
Returns the actual system clock in Hz.
#define SYS_CTRL_PWRDBG
Power debug register.
void sys_ctrl_init()
Initialises the System Control Driver.
#define GPIO_PORT_TO_BASE(PORT)
Converts a port number to the port base address.
#define SYS_CTRL_CLOCK_CTRL
Clock control register.
void sys_ctrl_reset()
Generates a warm reset through the SYS_CTRL_PWRDBG register.