38 #include "contiki-conf.h"
47 #define DIECFG0 0x400d3014
48 #define DIECFG0_SRAM_SIZE_OFS 7
49 #define DIECFG0_SRAM_SIZE_SZ 3
50 #define DIECFG0_SRAM_SIZE_MSK (((1 << DIECFG0_SRAM_SIZE_SZ) - 1) << \
51 DIECFG0_SRAM_SIZE_OFS)
52 #define DIECFG2 0x400d301c
53 #define DIECFG2_DIE_REV_OFS 8
54 #define DIECFG2_DIE_REV_SZ 8
55 #define DIECFG2_DIE_REV_MSK (((1 << DIECFG2_DIE_REV_SZ) - 1) << \
57 #define DIECFG2_AES_EN 0x00000002
58 #define DIECFG2_PKA_EN 0x00000001
63 uint8_t rev = (REG(DIECFG2) & DIECFG2_DIE_REV_MSK) >> DIECFG2_DIE_REV_OFS;
74 uint32_t size_code = (REG(DIECFG0) & DIECFG0_SRAM_SIZE_MSK) >>
75 DIECFG0_SRAM_SIZE_OFS;
77 return size_code <= 1 ? (2 - size_code) << 13 : 32 << 10;
83 return REG(DIECFG2) & (DIECFG2_AES_EN | DIECFG2_PKA_EN);
92 printf(
"CC2538: ID: 0x%04lx, rev.: PG%d.%d, Flash: %lu KiB, SRAM: %lu KiB, "
93 "AES/SHA: %u, ECC/RSA: %u\n"
94 "System clock: %lu Hz\n"
97 rom_util_get_chip_id(),
99 rom_util_get_flash_size() >> 10,
uint32_t soc_get_sram_size(void)
Gets the SRAM size of the SoC.
Header file with register manipulation macro definitions.
#define SOC_FEATURE_AES_SHA
Security HW AES/SHA.
const char * sys_ctrl_get_reset_cause_str(void)
Gets a string describing the cause of the last reset.
uint32_t soc_get_features(void)
Gets the hardware features of the SoC that are enabled.
Header file for the cc2538 ROM utility function library driver.
uint32_t sys_ctrl_get_io_clock(void)
Returns the actual io clock in Hz.
Header file for the cc2538 System Control driver.
uint8_t soc_get_rev(void)
Gets the SoC revision.
Header file with macro and function declarations for the cc2538 SoC.
uint32_t sys_ctrl_get_sys_clock(void)
Returns the actual system clock in Hz.
#define SOC_FEATURE_ECC_RSA
Security HW ECC/RSA.
void soc_print_info(void)
Prints SoC information.