cpu_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Loci Controls Inc.
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef CPU_CONF_H
20 #define CPU_CONF_H
21 
22 #include "kernel_defines.h"
23 #include "cpu_conf_common.h"
24 #include "cc2538.h"
25 #include "cc2538_gpio.h"
26 #include "cc2538_uart.h"
27 #include "cc2538_gptimer.h"
28 #include "cc2538_soc_adc.h"
29 #include "cc2538_ssi.h"
30 #include "cc2538_rfcore.h"
31 #include "cc2538_sys_ctrl.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
41 #define CPU_DEFAULT_IRQ_PRIO (1U)
42 #define CPU_IRQ_NUMOF PERIPH_COUNT_IRQn
43 #define CPU_FLASH_BASE FLASH_BASE
44 #define CPU_HAS_BITBAND (1)
45 
51 #define FLASHPAGE_SIZE (2048U)
52 /* Last page holds the Customer Configuration Area (CCA), this holds
53  the Bootloader Backdoor Configuration, Application Entry Point,
54  flashpage lock bits. For safety disable writing to that page by
55  default */
56 #ifndef FLASHPAGE_CC2538_USE_CCA_PAGE
57 #define FLASHPAGE_CC2538_USE_CCA_PAGE (0)
58 #endif
59 #if (IS_ACTIVE(MODULE_RIOTBOOT) || FLASHPAGE_CC2538_USE_CCA_PAGE)
60 #define FLASHPAGE_NUMOF ((CC2538_FLASHSIZE / FLASHPAGE_SIZE))
61 #else
62 #define FLASHPAGE_NUMOF ((CC2538_FLASHSIZE / FLASHPAGE_SIZE) -1)
63 #endif
64 #define FLASH_ERASE_STATE (0x1)
65 
66 /* The minimum block size which can be written is 4B. However, the erase
67  * block is always FLASHPAGE_SIZE.
68  */
69 #define FLASHPAGE_WRITE_BLOCK_SIZE (4U)
70 /* Writing should be always 4 bytes aligned */
71 #define FLASHPAGE_WRITE_BLOCK_ALIGNMENT (4U)
72 
74 #ifdef __cplusplus
75 } /* end extern "C" */
76 #endif
77 
78 #endif /* CPU_CONF_H */
79 
kernel_defines.h
Common macros and compiler attributes/pragmas configuration.
cc2538_gpio.h
Driver for the cc2538 GPIO controller.
cc2538_uart.h
CC2538 UART interface.
cc2538_ssi.h
CC2538 SSI interface.
cc2538.h
CC2538 MCU interrupt and register definitions.
cc2538_sys_ctrl.h
CC2538 System Control interface.
cc2538_gptimer.h
CC2538 General Purpose Timer (GPTIMER) driver.
cc2538_soc_adc.h
CC2538 SOC ADC interface.
cc2538_rfcore.h
CC2538 RF core interface.