cpu_conf.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2014 Loci Controls Inc.
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
18 #include "kernel_defines.h"
19 #include "cpu_conf_common.h"
20 #include "cc2538.h"
21 #include "cc2538_gpio.h"
22 #include "cc2538_uart.h"
23 #include "cc2538_gptimer.h"
24 #include "cc2538_soc_adc.h"
25 #include "cc2538_ssi.h"
26 #include "cc2538_sys_ctrl.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
36 #define CPU_DEFAULT_IRQ_PRIO (1U)
37 #define CPU_IRQ_NUMOF PERIPH_COUNT_IRQn
38 #define CPU_FLASH_BASE FLASH_BASE
39 #define CPU_HAS_BITBAND (1)
46 #define FLASHPAGE_SIZE (2048U)
47 /* Last page holds the Customer Configuration Area (CCA), this holds
48  the Bootloader Backdoor Configuration, Application Entry Point,
49  flashpage lock bits. For safety disable writing to that page by
50  default */
51 #ifndef FLASHPAGE_CC2538_USE_CCA_PAGE
52 #define FLASHPAGE_CC2538_USE_CCA_PAGE (0)
53 #endif
54 #if (IS_ACTIVE(MODULE_RIOTBOOT) || FLASHPAGE_CC2538_USE_CCA_PAGE)
55 #define FLASHPAGE_NUMOF ((CC2538_FLASHSIZE / FLASHPAGE_SIZE))
56 #else
57 #define FLASHPAGE_NUMOF ((CC2538_FLASHSIZE / FLASHPAGE_SIZE) -1)
58 #endif
59 #define FLASH_ERASE_STATE (0x1)
60 
61 /* The minimum block size which can be written is 4B. However, the erase
62  * block is always FLASHPAGE_SIZE.
63  */
64 #define FLASHPAGE_WRITE_BLOCK_SIZE (4U)
65 /* Writing should be always 4 bytes aligned */
66 #define FLASHPAGE_WRITE_BLOCK_ALIGNMENT (4U)
69 #ifdef __cplusplus
70 } /* end extern "C" */
71 #endif
72 
CC2538 MCU interrupt and register definitions.
Driver for the cc2538 GPIO controller.
CC2538 General Purpose Timer (GPTIMER) driver.
CC2538 SOC ADC interface.
CC2538 SSI interface.
CC2538 System Control interface.
CC2538 UART interface.
Common macros and compiler attributes/pragmas configuration.