Loading...
Searching...
No Matches
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_sys_ctrl.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
40#define CPU_DEFAULT_IRQ_PRIO (1U)
41#define CPU_IRQ_NUMOF PERIPH_COUNT_IRQn
42#define CPU_FLASH_BASE FLASH_BASE
43#define CPU_HAS_BITBAND (1)
50#define FLASHPAGE_SIZE (2048U)
51/* Last page holds the Customer Configuration Area (CCA), this holds
52 the Bootloader Backdoor Configuration, Application Entry Point,
53 flashpage lock bits. For safety disable writing to that page by
54 default */
55#ifndef FLASHPAGE_CC2538_USE_CCA_PAGE
56#define FLASHPAGE_CC2538_USE_CCA_PAGE (0)
57#endif
58#if (IS_ACTIVE(MODULE_RIOTBOOT) || FLASHPAGE_CC2538_USE_CCA_PAGE)
59#define FLASHPAGE_NUMOF ((CC2538_FLASHSIZE / FLASHPAGE_SIZE))
60#else
61#define FLASHPAGE_NUMOF ((CC2538_FLASHSIZE / FLASHPAGE_SIZE) -1)
62#endif
63#define FLASH_ERASE_STATE (0x1)
64
65/* The minimum block size which can be written is 4B. However, the erase
66 * block is always FLASHPAGE_SIZE.
67 */
68#define FLASHPAGE_WRITE_BLOCK_SIZE (4U)
69/* Writing should be always 4 bytes aligned */
70#define FLASHPAGE_WRITE_BLOCK_ALIGNMENT (4U)
73#ifdef __cplusplus
74} /* end extern "C" */
75#endif
76
77#endif /* CPU_CONF_H */
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.