53#define DIECFG0 0x400d3014
54#define DIECFG0_SRAM_SIZE_OFS 7
55#define DIECFG0_SRAM_SIZE_SZ 3
56#define DIECFG0_SRAM_SIZE_MSK (((1 << DIECFG0_SRAM_SIZE_SZ) - 1) << \
57 DIECFG0_SRAM_SIZE_OFS)
58#define DIECFG2 0x400d301c
59#define DIECFG2_DIE_REV_OFS 8
60#define DIECFG2_DIE_REV_SZ 8
61#define DIECFG2_DIE_REV_MSK (((1 << DIECFG2_DIE_REV_SZ) - 1) << \
63#define DIECFG2_AES_EN 0x00000002
64#define DIECFG2_PKA_EN 0x00000001
68#define LOG_MODULE "CC2538 SoC"
69#define LOG_LEVEL LOG_LEVEL_NONE
74 uint8_t rev = (REG(DIECFG2) & DIECFG2_DIE_REV_MSK) >> DIECFG2_DIE_REV_OFS;
85 uint32_t size_code = (REG(DIECFG0) & DIECFG0_SRAM_SIZE_MSK) >>
86 DIECFG0_SRAM_SIZE_OFS;
88 return size_code <= 1 ? (2 - size_code) << 13 : 32 << 10;
94 return REG(DIECFG2) & (DIECFG2_AES_EN | DIECFG2_PKA_EN);
103 LOG_DBG(
"CC2538: ID: 0x%04" PRIx32
", rev.: PG%d.%d, Flash: %" PRIu32
" KiB, "
104 "SRAM: %" PRIu32
" KiB, AES/SHA: %u, ECC/RSA: %u\n"
105 "System clock: %" PRIu32
" Hz\n"
106 "I/O clock: %" PRIu32
" Hz\n"
108 rom_util_get_chip_id(),
109 rev >> 4, rev & 0x0f,
110 rom_util_get_flash_size() >> 10,
129#if CSPRNG_ENABLED && LPM_CONF_ENABLE && (LPM_CONF_MAX_PM >= LPM_PM2)
SRAM-based CSPRNG seeder.
Header file with register, macro and function declarations for the cc2538 low power module.
Header file for the GPIO HAL.
void clock_init(void)
Arch-specific implementation of clock_init for the cc2538.
void ioc_init()
Initialise the IOC driver.
void nvic_init()
Initialises the NVIC driver.
void soc_print_info(void)
Prints SoC information.
void soc_init()
Common initialisation routine for all CC2538-based platforms.
#define SOC_FEATURE_ECC_RSA
Security HW ECC/RSA.
#define SOC_FEATURE_AES_SHA
Security HW AES/SHA.
uint8_t soc_get_rev(void)
Gets the SoC revision.
uint32_t soc_get_sram_size(void)
Gets the SRAM size of the SoC.
uint32_t soc_get_features(void)
Gets the hardware features of the SoC that are enabled.
const char * sys_ctrl_get_reset_cause_str(void)
Gets a string describing the cause of the last reset.
uint32_t sys_ctrl_get_sys_clock(void)
Returns the actual system clock in Hz.
uint32_t sys_ctrl_get_io_clock(void)
Returns the actual io clock in Hz.
void sys_ctrl_init()
Initialises the System Control Driver.
void cc2538_sram_seeder_seed(void)
This function will feed the CSPRNG with a new seed.
void gpio_hal_init()
Initialise the GPIO HAL.
#define rtimer_init()
Initialize the real-time scheduler.
Header file with declarations for the I/O Control module.
Header file for the logging system.
Header file for the ARM Nested Vectored Interrupt Controller.
Header file with register manipulation macro definitions.
Header file for the cc2538 ROM utility function library driver.
Header file with macro and function declarations for the cc2538 SoC.
Header file for the cc2538 System Control driver.