[platform] support for Texas Instruments cc2652 (#2011)

* Add support for cc2652

Updated CC26XXware to latest release.
Moved CC26XXware to match the SimpleLink cc26x2 SDK directory structure.
Added CC2652 Platform support
This commit is contained in:
Seth Rickard
2017-07-25 10:04:42 -07:00
committed by Jonathan Hui
parent 1ff8824d18
commit 6a1851106a
474 changed files with 182956 additions and 7453 deletions
+1
View File
@@ -1,4 +1,5 @@
*.a
*.bak
*.db
*.gcda
*.gcno
+18
View File
@@ -113,6 +113,15 @@ set -x
make -f examples/Makefile-cc2650 || die
arm-none-eabi-size output/cc2650/bin/ot-cli-mtd || die
arm-none-eabi-size output/cc2650/bin/ot-ncp-mtd || die
git checkout -- . || die
git clean -xfd || die
./bootstrap || die
COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-cc2652 || die
arm-none-eabi-size output/cc2652/bin/ot-cli-ftd || die
arm-none-eabi-size output/cc2652/bin/ot-cli-mtd || die
arm-none-eabi-size output/cc2652/bin/ot-ncp-ftd || die
arm-none-eabi-size output/cc2652/bin/ot-ncp-mtd || die
}
[ $BUILD_TARGET != arm-gcc54 ] || {
@@ -160,6 +169,15 @@ set -x
make -f examples/Makefile-cc2650 || die
arm-none-eabi-size output/cc2650/bin/ot-cli-mtd || die
arm-none-eabi-size output/cc2650/bin/ot-ncp-mtd || die
git checkout -- . || die
git clean -xfd || die
./bootstrap || die
COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-cc2652 || die
arm-none-eabi-size output/cc2652/bin/ot-cli-ftd || die
arm-none-eabi-size output/cc2652/bin/ot-cli-mtd || die
arm-none-eabi-size output/cc2652/bin/ot-ncp-ftd || die
arm-none-eabi-size output/cc2652/bin/ot-ncp-mtd || die
}
[ $BUILD_TARGET != arm-gcc63 ] || {
+5 -4
View File
@@ -1,11 +1,11 @@
[![OpenThread][ot-logo]][ot-repo]
[![OpenThread][ot-logo]][ot-repo]
[![Build Status][ot-travis-svg]][ot-travis]
[![Build Status][ot-appveyor-svg]][ot-appveyor]
[![Coverage Status][ot-codecov-svg]][ot-codecov]
---
# What is OpenThread?
# What is OpenThread?
OpenThread is...
<a href="http://threadgroup.org/technology/ourtechnology#certifiedproducts">
@@ -97,6 +97,7 @@ OpenThread has been ported to several devices and platforms by both the OpenThre
* [Synopsys ARC EMSK with Microchip MRF24J40](https://github.com/openthread/openthread/wiki/Platforms#synopsys-arc-em-with-microchip-mrf24j40)
* [Texas Instruments CC2538](https://github.com/openthread/openthread/wiki/Platforms#texas-instruments-cc2538)
* [Texas Instruments CC2650](https://github.com/openthread/openthread/wiki/Platforms#texas-instruments-cc2650)
* [Texas Instruments CC2652](https://github.com/openthread/openthread/wiki/Platforms#texas-instruments-cc2652)
* [POSIX Emulation](https://github.com/openthread/openthread/wiki/Platforms#posix-emulation)
See the [Wiki Platform page](https://github.com/openthread/openthread/wiki/Platforms) for more detailed information on supported platforms.
@@ -180,6 +181,6 @@ OpenThread follows the [Semantic Versioning guidelines](http://semver.org/) for
# License
OpenThread is released under the [BSD 3-Clause license](https://github.com/openthread/openthread/blob/master/LICENSE). See the [`LICENSE`](https://github.com/openthread/openthread/blob/master/LICENSE) file for more information.
OpenThread is released under the [BSD 3-Clause license](https://github.com/openthread/openthread/blob/master/LICENSE). See the [`LICENSE`](https://github.com/openthread/openthread/blob/master/LICENSE) file for more information.
Please only use the OpenThread name and marks when accurately referencing this software distribution. Do not use the marks in a way that suggests you are endorsed by or otherwise affiliated with Nest, Google, or The Thread Group.
+11 -2
View File
@@ -1131,11 +1131,11 @@ AM_CONDITIONAL([OPENTHREAD_ENABLE_LINKER_MAP], [test "${enable_linker_map}" = "y
AC_ARG_WITH(examples,
[AS_HELP_STRING([--with-examples=TARGET],
[Specify the examples from one of: none, posix, cc2538, cc2650, da15000, efr32, emsk, gp712, kw41z, nrf52840 @<:@default=none@:>@.])],
[Specify the examples from one of: none, posix, cc2538, cc2650, cc2652, da15000, efr32, emsk, gp712, kw41z, nrf52840 @<:@default=none@:>@.])],
[
case "${with_examples}" in
none|posix|cc2538|cc2650|da15000|efr32|emsk|gp712|kw41z|nrf52840)
none|posix|cc2538|cc2650|cc2652|da15000|efr32|emsk|gp712|kw41z|nrf52840)
;;
*)
AC_MSG_ERROR([Invalid value ${with_examples} for --with-examples])
@@ -1163,6 +1163,11 @@ case ${with_examples} in
AC_DEFINE_UNQUOTED([OPENTHREAD_EXAMPLES_CC2650],[${OPENTHREAD_EXAMPLES_CC2650}],[Define to 1 if you want to use cc2650 examples])
;;
cc2652)
OPENTHREAD_EXAMPLES_CC2652=1
AC_DEFINE_UNQUOTED([OPENTHREAD_EXAMPLES_CC2652],[${OPENTHREAD_EXAMPLES_CC2652}],[Define to 1 if you want to use cc2652 examples])
;;
da15000)
OPENTHREAD_EXAMPLES_DA15000=1
AC_DEFINE_UNQUOTED([OPENTHREAD_EXAMPLES_DA15000],[${OPENTHREAD_EXAMPLES_DA15000}],[Define to 1 if you want to use da15000 examples])
@@ -1210,6 +1215,9 @@ AM_CONDITIONAL([OPENTHREAD_EXAMPLES_CC2538], [test "${OPENTHREAD_EXAMPLES}" = "c
AC_SUBST(OPENTHREAD_EXAMPLES_CC2650)
AM_CONDITIONAL([OPENTHREAD_EXAMPLES_CC2650], [test "${OPENTHREAD_EXAMPLES}" = "cc2650"])
AC_SUBST(OPENTHREAD_EXAMPLES_CC2652)
AM_CONDITIONAL([OPENTHREAD_EXAMPLES_CC2652], [test "${OPENTHREAD_EXAMPLES}" = "cc2652"])
AC_SUBST(OPENTHREAD_EXAMPLES_DA15000)
AM_CONDITIONAL([OPENTHREAD_EXAMPLES_DA15000], [test "${OPENTHREAD_EXAMPLES}" = "da15000"])
@@ -1386,6 +1394,7 @@ examples/apps/ncp/Makefile
examples/platforms/Makefile
examples/platforms/cc2538/Makefile
examples/platforms/cc2650/Makefile
examples/platforms/cc2652/Makefile
examples/platforms/da15000/Makefile
examples/platforms/efr32/Makefile
examples/platforms/emsk/Makefile
+1 -1
View File
@@ -55,7 +55,7 @@ include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/common-switches.mk
CC2650_MBEDTLS_CPPFLAGS = -DMBEDTLS_CONFIG_FILE='\"cc2650-mbedtls-config.h\"'
CC2650_MBEDTLS_CPPFLAGS += -I$(PWD)/examples/platforms/cc2650/crypto
CC2650_MBEDTLS_CPPFLAGS += -I$(PWD)/third_party/ti/cc26xxware
CC2650_MBEDTLS_CPPFLAGS += -I$(PWD)/third_party/ti/devices/cc26x0
CC2650_MBEDTLS_CPPFLAGS += -I$(PWD)/third_party/mbedtls
CC2650_MBEDTLS_CPPFLAGS += -I$(PWD)/third_party/mbedtls/repo/include
+293
View File
@@ -0,0 +1,293 @@
#
# Copyright (c) 2017, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
.NOTPARALLEL:
AR = arm-none-eabi-ar
CCAS = arm-none-eabi-as
CPP = arm-none-eabi-cpp
CC = arm-none-eabi-gcc
CXX = arm-none-eabi-g++
LD = arm-none-eabi-ld
STRIP = arm-none-eabi-strip
NM = arm-none-eabi-nm
RANLIB = arm-none-eabi-ranlib
OBJCOPY = arm-none-eabi-objcopy
BuildJobs ?= 10
configure_OPTIONS = \
--enable-cli-app=all \
--enable-ncp-app=all \
--with-ncp-bus=uart \
--enable-diag \
--with-examples=cc2652 \
--with-platform-info=cc2652 \
MBEDTLS_CPPFLAGS="$(CC2652_MBEDTLS_CPPFLAGS)" \
$(NULL)
DEFAULT_LOGGING ?= 1
include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/common-switches.mk
CC2652_MBEDTLS_CPPFLAGS = \
-DMBEDTLS_CONFIG_FILE='\"cc2652-mbedtls-config.h\"' \
-I$(PWD)/examples/platforms/cc2652/crypto \
-I$(PWD)/third_party/ti/devices/cc26x2 \
-I$(PWD)/third_party/mbedtls \
-I$(PWD)/third_party/mbedtls/repo/include \
$(NULL)
CC2652_CONFIG_FILE_CPPFLAGS = \
-DOPENTHREAD_PROJECT_CORE_CONFIG_FILE='\"openthread-core-cc2652-config.h\"' \
-I$(PWD)/examples/platforms/cc2652/ \
$(NULL)
COMMONCFLAGS := \
-fdata-sections \
-ffunction-sections \
-Os \
-g \
$(CC2652_CONFIG_FILE_CPPFLAGS) \
$(NULL)
CPPFLAGS += \
$(COMMONCFLAGS) \
$(target_CPPFLAGS) \
$(NULL)
CFLAGS += \
$(COMMONCFLAGS) \
$(target_CFLAGS) \
$(NULL)
CXXFLAGS += \
$(COMMONCFLAGS) \
$(target_CXXFLAGS) \
-fno-exceptions \
-fno-rtti \
$(NULL)
LDFLAGS += \
$(COMMONCFLAGS) \
$(target_LDFLAGS) \
-nostartfiles \
-specs=nano.specs \
-specs=nosys.specs \
-Wl,--gc-sections \
-Wl,-Map=map.map \
$(NULL)
ECHO := @echo
MAKE := make
MKDIR_P := mkdir -p
LN_S := ln -s
RM_F := rm -f
INSTALL := /usr/bin/install
INSTALLFLAGS := -p
TopSourceDir := $(dir $(shell readlink $(firstword $(MAKEFILE_LIST))))..
AbsTopSourceDir := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))..
BuildPath = build
TopBuildDir = $(BuildPath)
AbsTopBuildDir = $(PWD)/$(TopBuildDir)
ResultPath = output
TopResultDir = $(ResultPath)
AbsTopResultDir = $(PWD)/$(TopResultDir)
TargetTuple = cc2652
ARCHS = cortex-m4f
TopTargetLibDir = $(TopResultDir)/$(TargetTuple)/lib
ifndef BuildJobs
BuildJobs := $(shell getconf _NPROCESSORS_ONLN)
endif
JOBSFLAG := -j$(BuildJobs)
#
# configure-arch <arch>
#
# Configure OpenThread for the specified architecture.
#
# arch - The architecture to configure.
#
define configure-arch
$(ECHO) " CONFIG $(TargetTuple)..."
(cd $(BuildPath)/$(TargetTuple) \
&& $(AbsTopSourceDir)/configure \
INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
CPP="$(CPP)" \
CC="$(CC)" \
CXX="$(CXX)" \
OBJC="$(OBJC)" \
OBJCXX="$(OBJCXX)" \
AR="$(AR)" \
RANLIB="$(RANLIB)" \
NM="$(NM)" \
STRIP="$(STRIP)" \
CPPFLAGS="$(CPPFLAGS)" \
CFLAGS="$(CFLAGS)" \
CXXFLAGS="$(CXXFLAGS)" \
LDFLAGS="$(LDFLAGS)" \
--host=arm-none-eabi \
--prefix=/ \
--exec-prefix=/$(TargetTuple) \
$(configure_OPTIONS))
endef # configure-arch
#
# build-arch <arch>
#
# Build the OpenThread intermediate build products for the specified
# architecture.
#
# arch - The architecture to build.
#
define build-arch
$(ECHO) " BUILD $(TargetTuple)"
$(MAKE) \
$(JOBSFLAG) \
-C $(BuildPath)/$(TargetTuple) \
--no-print-directory \
all
endef # build-arch
#
# stage-arch <arch>
#
# Stage (install) the OpenThread final build products for the specified
# architecture.
#
# arch - The architecture to stage.
#
define stage-arch
$(ECHO) " STAGE $(TargetTuple)"
$(MAKE) \
$(JOBSFLAG) \
-C $(BuildPath)/$(TargetTuple) \
--no-print-directory \
DESTDIR=$(AbsTopResultDir) \
install
endef # stage-arch
#
# ARCH_template <arch>
#
# Define macros, targets and rules to configure, build, and stage the
# OpenThread for a single architecture.
#
# arch - The architecture to instantiate the template for.
#
define ARCH_template
CONFIGURE_TARGETS += configure-$(1)
BUILD_TARGETS += do-build-$(1)
STAGE_TARGETS += stage-$(1)
BUILD_DIRS += $(BuildPath)/$(TargetTuple)
DIRECTORIES += $(BuildPath)/$(TargetTuple)
configure-$(1): target_CPPFLAGS=$($(1)_target_CPPFLAGS)
configure-$(1): target_CFLAGS=$($(1)_target_CFLAGS)
configure-$(1): target_CXXFLAGS=$($(1)_target_CXXFLAGS)
configure-$(1): target_LDFLAGS=$($(1)_target_LDFLAGS)
configure-$(1): $(BuildPath)/$(TargetTuple)/config.status
$(BuildPath)/$(TargetTuple)/config.status: | $(BuildPath)/$(TargetTuple)
$$(call configure-arch,$(1))
do-build-$(1): configure-$(1)
do-build-$(1):
+$$(call build-arch,$(1))
stage-$(1): do-build-$(1)
stage-$(1): | $(TopResultDir)
$$(call stage-arch,$(1))
$(1): stage-$(1)
endef # ARCH_template
.DEFAULT_GOAL := all
all: stage
#
# cortex-m4f
#
cortex-m4f_target_ABI = cortex-m4f
cortex-m4f_target_CPPFLAGS = -mcpu=cortex-m4 -march=armv7e-m -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb
cortex-m4f_target_CFLAGS = -mcpu=cortex-m4 -march=armv7e-m -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb
cortex-m4f_target_CXXFLAGS = -mcpu=cortex-m4 -march=armv7e-m -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb
cortex-m4f_target_LDFLAGS = -mcpu=cortex-m4 -march=armv7e-m -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb
# Instantiate an architecture-specific build template for each target
# architecture.
$(foreach arch,$(ARCHS),$(eval $(call ARCH_template,$(arch))))
#
# Common / Finalization
#
configure: $(CONFIGURE_TARGETS)
build: $(BUILD_TARGETS)
stage: $(STAGE_TARGETS)
DIRECTORIES = $(TopResultDir) $(TopResultDir)/$(TargetTuple)/lib $(BUILD_DIRS)
CLEAN_DIRS = $(TopResultDir) $(BUILD_DIRS)
all: stage
$(DIRECTORIES):
$(ECHO) " MKDIR $@"
@$(MKDIR_P) "$@"
clean:
$(ECHO) " CLEAN"
@$(RM_F) -r $(CLEAN_DIRS)
help:
$(ECHO) "Simply type 'make -f $(firstword $(MAKEFILE_LIST))' to build OpenThread for the following "
$(ECHO) "architectures: "
$(ECHO) ""
$(ECHO) " $(ARCHS)"
$(ECHO) ""
$(ECHO) "To build only a particular architecture, specify: "
$(ECHO) ""
$(ECHO) " make -f $(firstword $(MAKEFILE_LIST)) <architecture>"
$(ECHO) ""
+22 -6
View File
@@ -78,20 +78,36 @@ endif # OPENTHREAD_EXAMPLES_CC2538
if OPENTHREAD_EXAMPLES_CC2650
CPPFLAGS_COMMON += \
-I$(top_srcdir)/third_party/ti/cc26xxware \
-I$(top_srcdir)/third_party/ti/devices/cc26x0 \
$(NULL)
LDADD_COMMON += \
$(top_builddir)/examples/platforms/cc2650/libopenthread-cc2650.a \
$(top_srcdir)/third_party/ti/cc26xxware/driverlib/bin/gcc/driverlib.a \
LDADD_COMMON += \
$(top_builddir)/examples/platforms/cc2650/libopenthread-cc2650.a \
$(top_srcdir)/third_party/ti/devices/cc26x0/driverlib/bin/gcc/driverlib.a \
$(NULL)
LDFLAGS_COMMON += \
-T $(top_srcdir)/third_party/ti/cc26xxware/linker_files/cc26x0f128.lds \
LDFLAGS_COMMON += \
-T $(top_srcdir)/third_party/ti/devices/cc26x0/linker_files/cc26x0f128.lds \
$(NULL)
endif #OPENTHREAD_EXAMPLES_CC2650
if OPENTHREAD_EXAMPLES_CC2652
CPPFLAGS_COMMON += \
-I$(top_srcdir)/third_party/ti/devices/cc26x2 \
$(NULL)
LDADD_COMMON += \
$(top_builddir)/examples/platforms/cc2652/libopenthread-cc2652.a \
$(top_srcdir)/third_party/ti/devices/cc26x2/driverlib/bin/gcc/driverlib.a \
$(NULL)
LDFLAGS_COMMON += \
-T $(top_srcdir)/third_party/ti/devices/cc26x2/linker_files/cc26x2r1f.lds \
$(NULL)
endif #OPENTHREAD_EXAMPLES_CC2652
if OPENTHREAD_EXAMPLES_DA15000
LDADD_COMMON += \
$(top_builddir)/examples/platforms/da15000/libopenthread-da15000.a \
+22 -6
View File
@@ -78,20 +78,36 @@ endif # OPENTHREAD_EXAMPLES_CC2538
if OPENTHREAD_EXAMPLES_CC2650
CPPFLAGS_COMMON += \
-I$(top_srcdir)/third_party/ti/cc26xxware \
-I$(top_srcdir)/third_party/ti/devices/cc26x0 \
$(NULL)
LDADD_COMMON += \
$(top_builddir)/examples/platforms/cc2650/libopenthread-cc2650.a \
$(top_srcdir)/third_party/ti/cc26xxware/driverlib/bin/gcc/driverlib.a \
LDADD_COMMON += \
$(top_builddir)/examples/platforms/cc2650/libopenthread-cc2650.a \
$(top_srcdir)/third_party/ti/devices/cc26x0/driverlib/bin/gcc/driverlib.a \
$(NULL)
LDFLAGS_COMMON += \
-T $(top_srcdir)/third_party/ti/cc26xxware/linker_files/cc26x0f128.lds \
LDFLAGS_COMMON += \
-T $(top_srcdir)/third_party/ti/devices/cc26x0/linker_files/cc26x0f128.lds \
$(NULL)
endif # OPENTHREAD_EXAMPLES_CC2650
if OPENTHREAD_EXAMPLES_CC2652
CPPFLAGS_COMMON += \
-I$(top_srcdir)/third_party/ti/devices/cc26x2 \
$(NULL)
LDADD_COMMON += \
$(top_builddir)/examples/platforms/cc2652/libopenthread-cc2652.a \
$(top_srcdir)/third_party/ti/devices/cc26x2/driverlib/bin/gcc/driverlib.a \
$(NULL)
LDFLAGS_COMMON += \
-T $(top_srcdir)/third_party/ti/devices/cc26x2/linker_files/cc26x2r1f.lds \
$(NULL)
endif # OPENTHREAD_EXAMPLES_CC2652
if OPENTHREAD_EXAMPLES_DA15000
LDADD_COMMON += \
$(top_builddir)/examples/platforms/da15000/libopenthread-da15000.a \
+6
View File
@@ -33,6 +33,7 @@ include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
DIST_SUBDIRS = \
cc2538 \
cc2650 \
cc2652 \
da15000 \
efr32 \
emsk \
@@ -57,6 +58,10 @@ if OPENTHREAD_EXAMPLES_CC2650
SUBDIRS += cc2650
endif
if OPENTHREAD_EXAMPLES_CC2652
SUBDIRS += cc2652
endif
if OPENTHREAD_EXAMPLES_DA15000
SUBDIRS += da15000
endif
@@ -90,6 +95,7 @@ endif
PRETTY_SUBDIRS = \
cc2538 \
cc2650 \
cc2652 \
da15000 \
efr32 \
emsk \
+5 -4
View File
@@ -28,7 +28,7 @@
include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
lib_LIBRARIES = libopenthread-cc2650.a
lib_LIBRARIES = libopenthread-cc2650.a
libopenthread_cc2650_a_CPPFLAGS = \
-I$(top_srcdir)/include \
@@ -36,7 +36,7 @@ libopenthread_cc2650_a_CPPFLAGS = \
-I$(top_srcdir)/src/core \
-I$(top_srcdir)/examples/platforms \
-I$(top_srcdir)/examples/platforms/cc2650 \
-I$(top_srcdir)/third_party/ti/cc26xxware \
-I$(top_srcdir)/third_party/ti/devices/cc26x0 \
-I$(top_srcdir)/third_party/mbedtls/repo/include \
$(MBEDTLS_CPPFLAGS) \
$(NULL)
@@ -51,12 +51,13 @@ libopenthread_cc2650_a_SOURCES = \
uart.c \
crypto/sha256_alt.c \
crypto/aes_alt.c \
cxx_helpers.c \
cc2650_ccfg.c \
cc2650_startup.c \
$(NULL)
libopenthread_cc2650_a_DEPENDENCIES = \
$(top_srcdir)/third_party/ti/cc26xxware/driverlib/bin/gcc/driverlib.a \
libopenthread_cc2650_a_DEPENDENCIES = \
$(top_srcdir)/third_party/ti/devices/cc26x0/driverlib/bin/gcc/driverlib.a \
$(NULL)
if OPENTHREAD_ENABLE_DIAG
+9 -1
View File
@@ -27,6 +27,14 @@
*/
/*
* Include the standard startup files for the gcc toolchain
* Include the standard startup files for the specified toolchain
* startup code is in 'third_party/ti'
*/
#if defined(__GNUC__)
#include <startup_files/startup_gcc.c>
#elif defined(__TI_ARM__)
#include <startup_files/startup_ccs.c>
#else
#error "Unknown compiler"
#endif
+54
View File
@@ -0,0 +1,54 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Helper functions for running c++ without the standard library
*/
__extension__ typedef int __guard __attribute__((mode(__DI__)));
int __cxa_guard_acquire(__guard *g)
{
return !*(char *)(g);
}
void __cxa_guard_release(__guard *g)
{
*(char *)g = 1;
}
void __cxa_guard_abort(__guard *g)
{
(void)g;
}
void __cxa_pure_virtual(void)
{
while (1);
}
+3 -2
View File
@@ -29,10 +29,11 @@
#include <stdio.h>
#include <openthread/types.h>
#include "platform-cc2650.h"
#include "inc/hw_ccfg_simple_struct.h"
extern const char __ccfg[];
extern const ccfg_t __ccfg;
const char *dummy_ccfg_ref = ((const char *)(&(__ccfg[0])));
void *dummy_ccfg_ref = ((void *)(&(__ccfg)));
/**
* Function documented in platform-cc2650.h
+1 -1
View File
@@ -1827,7 +1827,7 @@ void cc2650RadioProcess(otInstance *aInstance)
}
}
if (sState == cc2650_stateTransmitComplete || sTransmitError != OT_ERROR_NONE)
if (sState == cc2650_stateTransmitComplete || (sState == cc2650_stateTransmit && sTransmitError != OT_ERROR_NONE))
{
/* we are not looking for an ACK packet, or failed */
sState = cc2650_stateReceive;
+77
View File
@@ -0,0 +1,77 @@
#
# Copyright (c) 2017, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
lib_LIBRARIES = libopenthread-cc2652.a
libopenthread_cc2652_a_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/core \
-I$(top_srcdir)/examples/platforms \
-I$(top_srcdir)/examples/platforms/cc2652 \
-I$(top_srcdir)/third_party/ti/devices/cc26x2 \
-I$(top_srcdir)/third_party/mbedtls/repo/include \
$(MBEDTLS_CPPFLAGS) \
$(NULL)
libopenthread_cc2652_a_SOURCES = \
alarm.c \
flash.c \
misc.c \
platform.c \
radio.c \
random.c \
uart.c \
crypto/aes_alt.c \
cc2652_ccfg.c \
cc2652_startup.c \
cxx_helpers.c \
$(NULL)
libopenthread_cc2652_a_DEPENDENCIES = \
$(top_srcdir)/third_party/ti/devices/cc26x2/driverlib/bin/gcc/driverlib.a \
$(NULL)
if OPENTHREAD_ENABLE_DIAG
libopenthread_cc2652_a_SOURCES += \
diag.c \
$(NULL)
endif
noinst_HEADERS = \
platform-cc2652.h \
$(NULL)
Dash = -
libopenthread_cc2652_a_LIBADD = \
$(shell find $(top_builddir)/examples/platforms/utils $(Dash)type f $(Dash)name "*.o")
include $(abs_top_nlbuild_autotools_dir)/automake/post.am
+112
View File
@@ -0,0 +1,112 @@
# OpenThread on CC2652 Example
This directory contains example platform drivers for the [Texas Instruments
CC2652R1][cc2652r1].
The example platform drivers are intended to present the minimal code necessary
to support OpenThread. As a result, the example platform drivers do not
necessarily highlight the platform's full capabilities. Consult the [SimpleLink
CC26X2R1 SDK][cc26x2r1-sdk] for more development option. The platform drivers
were built for the [CC2652R1 LAUNCHXL][cc2652r1-launchxl], usage on other
boards with a cc2652r1 may require changes to the peripheral drivers.
[cc2652r1-launchxl]: http://www.ti.com/tool/launchxl-cc26x2r1
[cc26x2r1-sdk]: http://www.ti.com/tool/simplelink-cc26x2-sdk
<!---
TODO: Update link when cc2652 product page is live
[cc2652r1]: http://www.ti.com/product/cc2652r1
-->
[cc2652r1]: http://www.ti.com/tool/launchxl-cc26x2r1
## Toolchain
Building the examples for the cc2652 requires [GNU AutoConf][gnu-autoconf],
[GNU AutoMake][gnu-automake], [Python][python], and the [ARM gcc
toolchain][arm-toolchain].
With the exception of the arm toolchain, most of these tools are installed by
default on modern Posix systems. It is recommended to setup a Linux virtual
machine for building on a Windows host system. For help setting up VirtualBox
with Ubuntu, consult this [community help wiki
article][ubuntu-wiki-virtualbox].
[gnu-autoconf]: https://www.gnu.org/software/autoconf
[gnu-automake]: https://www.gnu.org/software/automake
[python]: https://www.python.org
[arm-toolchain]: https://launchpad.net/gcc-arm-embedded
[cygwin]: https://www.cygwin.com
[mingw]: http://www.mingw.org
[ubuntu-wiki-virtualbox]: https://help.ubuntu.com/community/VirtualBox
## Building
In a Bash terminal, follow these instructions to build the cc2652 examples.
```bash
$ cd <path-to-openthread>
$ ./bootstrap
$ make -f examples/Makefile-cc2652
```
## Flash Binaries
If the build completed successfully, the `elf` files may be found in
`<path-to-openthread>/output/cc2652/bin`.
Flash the images with [Uniflash][uniflash]. Make sure to deselect the binary
check-box, Uniflash assumes a file without an extension is a binary file.
[uniflash]: http://www.ti.com/tool/uniflash
## Interact
### CLI example
1. With a terminal client (PuTTY, minicom, etc.) open the com port associated
with the cc2652 UART. The serial port settings are:
* 115200 baud
* 8 data bits
* no parity bit
* 1 stop bit
2. Type `help` for a list of commands.
3. Follow the instructions in the [CLI README][cli-readme] for instructions on
setting up a network.
[cli-readme]: ../../../src/cli/README.md
```bash
> help
help
channel
childtimeout
contextreusedelay
extaddr
extpanid
ipaddr
keysequence
leaderweight
masterkey
mode
netdataregister
networkidtimeout
networkname
panid
ping
prefix
releaserouterid
rloc16
route
routerupgradethreshold
scan
start
state
stop
whitelist
```
### NCP example
Refer to the documentation in the [wpantund][wpantund] project for build
instructions and usage information.
[wpantund]: https://github.com/openthread/wpantund
+133
View File
@@ -0,0 +1,133 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @file
* This file implements the OpenThread platform abstraction for the alarm.
*
*/
#include <openthread/config.h>
#include <stdbool.h>
#include <stdint.h>
#include <driverlib/aon_rtc.h>
#include <openthread/openthread.h>
#include <openthread/platform/alarm-milli.h>
#include <openthread/platform/diag.h>
#include <openthread/platform/platform.h>
#include "platform-cc2652.h"
/* NOTE: we could use systick, but that would sacrifice atleast a few ops
* every ms, and not run when the processor is sleeping.
*/
static uint32_t sTime0 = 0;
static uint32_t sAlarmTime = 0;
static bool sIsRunning = false;
/**
* Function documented in platform-cc2652.h
*/
void cc2652AlarmInit(void)
{
/*
* NOTE: this will not enable the individual rtc alarm channels
*/
AONRTCEnable();
sIsRunning = true;
}
/**
* Function documented in platform/alarm-milli.h
*/
uint32_t otPlatAlarmMilliGetNow(void)
{
/*
* This is current value of RTC as it appears in the register.
* With seconds as the upper 32 bits and fractions of a second as the
* lower 32 bits <32.32>.
*/
uint64_t rtcVal = AONRTCCurrent64BitValueGet();
return ((rtcVal * 1000) >> 32);
}
/**
* Function documented in platform/alarm-milli.h
*/
void otPlatAlarmMilliStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt)
{
(void)aInstance;
sTime0 = aT0;
sAlarmTime = aDt;
sIsRunning = true;
}
/**
* Function documented in platform/alarm-milli.h
*/
void otPlatAlarmMilliStop(otInstance *aInstance)
{
(void)aInstance;
sIsRunning = false;
}
/**
* Function documented in platform-cc2652.h
*/
void cc2652AlarmProcess(otInstance *aInstance)
{
uint32_t offsetTime;
if (sIsRunning)
{
/* unsinged subtraction will result in the absolute offset */
offsetTime = otPlatAlarmMilliGetNow() - sTime0;
if (sAlarmTime <= offsetTime)
{
sIsRunning = false;
#if OPENTHREAD_ENABLE_DIAG
if (otPlatDiagModeGet())
{
otPlatDiagAlarmFired(aInstance);
}
else
#endif /* OPENTHREAD_ENABLE_DIAG */
{
otPlatAlarmMilliFired(aInstance);
}
}
}
}
+46
View File
@@ -0,0 +1,46 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Configure the Customer Configuration Area.
*/
// enable bootloader backdoor
#define SET_CCFG_BL_CONFIG_BOOTLOADER_ENABLE 0xC5 // Enable ROM boot loader
#define SET_CCFG_BL_CONFIG_BL_LEVEL 0x0 // Active low to open boot loader backdoor
#define SET_CCFG_BL_CONFIG_BL_PIN_NUMBER 0x0D // DIO13 (BTN-1 button) on CC2650 LaunchPad Board for boot loader backdoor
// #define SET_CCFG_BL_CONFIG_BL_PIN_NUMBER 0x0B // DIO11 (SELECT button) on CC2650DK (QFN48/7*7) for boot loader backdoor
#define SET_CCFG_BL_CONFIG_BL_ENABLE 0xC5 // Enabled boot loader backdoor
/*
* Include the default ccfg struct and configuration code.
*/
#include <startup_files/ccfg.c>
+199
View File
@@ -0,0 +1,199 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CC2652_RADIO_H_
#define CC2652_RADIO_H_
#include <driverlib/rf_ieee_cmd.h>
enum
{
IEEE802154_FRAME_TYPE_MASK = 0x7, ///< (IEEE 802.15.4-2006) PSDU.FCF.frameType
IEEE802154_FRAME_TYPE_ACK = 0x2, ///< (IEEE 802.15.4-2006) frame type: ACK
IEEE802154_FRAME_PENDING = (1<<4), ///< (IEEE 802.15.4-2006) PSDU.FCF.bFramePending
IEEE802154_ACK_REQUEST = (1<<5), ///< (IEEE 802.15.4-2006) PSDU.FCF.bAR
IEEE802154_DSN_OFFSET = 2, ///< (IEEE 802.15.4-2006) PSDU.sequenceNumber
IEEE802154_MAC_MIN_BE = 1, ///< (IEEE 802.15.4-2006) macMinBE
IEEE802154_MAC_MAX_BE = 5, ///< (IEEE 802.15.4-2006) macMaxBE
IEEE802154_MAC_MAX_CSMA_BACKOFFS = 4, ///< (IEEE 802.15.4-2006) macMaxCSMABackoffs
IEEE802154_MAC_MAX_FRAMES_RETRIES = 3, ///< (IEEE 802.15.4-2006) macMaxFrameRetries
IEEE802154_A_UINT_BACKOFF_PERIOD = 20, ///< (IEEE 802.15.4-2006 7.4.1) MAC constants
IEEE802154_A_TURNAROUND_TIME = 12, ///< (IEEE 802.15.4-2006 6.4.1) PHY constants
IEEE802154_PHY_SHR_DURATION = 10,
///< (IEEE 802.15.4-2006 6.4.2) PHY PIB attribute, specifically the O-QPSK PHY
IEEE802154_PHY_SYMBOLS_PER_OCTET = 2,
///< (IEEE 802.15.4-2006 6.4.2) PHY PIB attribute, specifically the O-QPSK PHY
IEEE802154_MAC_ACK_WAIT_DURATION = (IEEE802154_A_UINT_BACKOFF_PERIOD +
IEEE802154_A_TURNAROUND_TIME +
IEEE802154_PHY_SHR_DURATION +
( 6 * IEEE802154_PHY_SYMBOLS_PER_OCTET)),
///< (IEEE 802.15.4-2006 7.4.2) macAckWaitDuration PIB attribute
IEEE802154_SYMBOLS_PER_SEC = 62500 ///< (IEEE 802.15.4-2006 6.5.3.2) O-QPSK symbol rate
};
enum
{
CC2652_RAT_TICKS_PER_SEC = 4000000, ///< 4MHz clock
CC2652_INVALID_RSSI = 127,
CC2652_UNKNOWN_EUI64 = 0xFF,
///< If the EUI64 read from the ccfg is all ones then the customer did not set the address
};
/**
* TX Power dBm lookup table - values from SmartRF Studio
*/
typedef struct output_config
{
int dbm;
uint16_t value;
} output_config_t;
/* TODO: update with power measurments */
static const output_config_t rgOutputPower[] =
{
{ 5, 0x9330},
{ 4, 0x9324},
{ 3, 0x5a1c},
{ 2, 0x4e18},
{ 1, 0x4214},
{ 0, 0x3161},
{ -3, 0x2558},
{ -6, 0x1d52},
{ -9, 0x194e},
{ -12, 0x144b},
{ -15, 0x0ccb},
{ -18, 0x0cc9},
{ -21, 0x0cc7},
};
#define OUTPUT_CONFIG_COUNT (sizeof(rgOutputPower) / sizeof(rgOutputPower[0]))
/* Max and Min Output Power in dBm */
#define OUTPUT_POWER_MIN (rgOutputPower[OUTPUT_CONFIG_COUNT - 1].dbm)
#define OUTPUT_POWER_MAX (rgOutputPower[0].dbm)
#define OUTPUT_POWER_UNKNOWN 0xFFFF
/**
* return value used when searching the source match array
*/
#define CC2652_SRC_MATCH_NONE 0xFF
/**
* number of extended addresses used for source matching
*/
#define CC2652_EXTADD_SRC_MATCH_NUM 10
/**
* structure for source matching extended addresses
*/
typedef struct __attribute__((aligned(4))) ext_src_match_data
{
uint32_t srcMatchEn[((CC2652_EXTADD_SRC_MATCH_NUM + 31) / 32)];
uint32_t srcPendEn[((CC2652_EXTADD_SRC_MATCH_NUM + 31) / 32)];
uint64_t extAddrEnt[CC2652_EXTADD_SRC_MATCH_NUM];
} ext_src_match_data_t;
/**
* number of short addresses used for source matching
*/
#define CC2652_SHORTADD_SRC_MATCH_NUM 10
/**
* structure for source matching short addresses
*/
typedef struct __attribute__((aligned(4))) short_src_match_data
{
uint32_t srcMatchEn[((CC2652_SHORTADD_SRC_MATCH_NUM + 31) / 32)];
uint32_t srcPendEn[((CC2652_SHORTADD_SRC_MATCH_NUM + 31) / 32)];
rfc_shortAddrEntry_t extAddrEnt[CC2652_SHORTADD_SRC_MATCH_NUM];
} short_src_match_data_t;
/**
* size of length field in receive struct
*
* defined in Table 23-10 of the cc26xx TRM
*/
#define DATA_ENTRY_LENSZ_BYTE 1
/**
* address type for @ref rfCoreModifySourceMatchEntry()
*/
typedef enum cc2652_address
{
SHORT_ADDRESS = 1,
EXT_ADDRESS = 0,
} cc2652_address_t;
/**
* This enum represents the state of a radio.
* Initially, a radio is in the Disabled state.
*
* The following are valid radio state transitions for the cc2652:
*
* (Radio ON)
* +----------+ Enable() +-------+ Receive() +---------+ Transmit() +----------+
* | |----------->| |------------->| |-------------->| |
* | Disabled | | Sleep | | Receive | | Transmit |
* | |<-----------| |<-------------| |<--------------| |
* +----------+ Disable() | | Sleep() | |<-- Receive() +----------+
* | | (Radio OFF) +---------+ \ | transmit
* | | \-----\ | complete
* | | EnergyScan() +--------+ | V
* | |------------->| | +------------------+
* | | | EdScan | | |
* | |<-------------| | | TransmitComplete |
* | | signal ED | | | |
* +-------+ scan done +--------+ +------------------+
*
* These states slightly differ from the states in \ref include/platform/radio.h.
* The additional states the phy can be in are due to the asynchronous nature
* of the CM0 radio core.
*
* | state | description |
* |------------------|----------------------------------------------------|
* | Disabled | The rfcore powerdomain is off and the RFCPE is off |
* | Sleep | The RFCORE PD is on, and the RFCPE is in IEEE mode |
* | Receive | The RFCPE is running a CMD_IEEE_RX |
* | Transmit | The RFCPE is running a transmit command string |
* | TransmitComplete | The transmit command string has completed |
* | EdScan | The RFCPE is running a CMD_IEEE_ED_SCAN |
*
* \note The RAT start and Radio Setup commands may be moved to the Receive()
* and EnergyScan() transitions in the future.
*/
typedef enum cc2652_PhyState
{
cc2652_stateDisabled = 0,
cc2652_stateSleep,
cc2652_stateReceive,
cc2652_stateEdScan,
cc2652_stateTransmit,
cc2652_stateTransmitComplete,
} cc2652_PhyState_t;
#endif /* CC2652_RADIO_H_ */
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Include the standard startup files for the specified toolchain
* startup code is in 'third_party/ti'
*/
#if defined(__GNUC__)
#include <startup_files/startup_gcc.c>
#elif defined(__TI_ARM__)
#include <startup_files/startup_ccs.c>
#else
#error "Unknown compiler"
#endif
+199
View File
@@ -0,0 +1,199 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "mbedtls/aes.h"
#include "aes_alt.h"
#ifdef MBEDTLS_AES_ALT
#include <string.h>
#include <driverlib/crypto.h>
#include <driverlib/prcm.h>
#include <utils/code_utils.h>
#define CC2652_AES_KEY_UNUSED (-1)
#define CC2652_AES_CTX_MAGIC (0x7E)
/**
* bitmap of which key stores are currently used
*/
static uint8_t sUsedKeys = 0;
/**
* number of active contexts, used for power on/off of the crypto core
*/
static unsigned int sRefNum = 0;
/*
* Documented in aes_alt.h
*/
void mbedtls_aes_init(mbedtls_aes_context *ctx)
{
if (sRefNum++ == 0)
{
/* enable the crypto core */
/* The TRNG should already be running before we ever ask the AES core
* to do anything, if there is any scenario that the TRNG powers off
* the peripheral power domain use this code to repower it
PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH);
while (PRCMPowerDomainStatus(PRCM_DOMAIN_PERIPH) != PRCM_DOMAIN_POWER_ON);
*/
PRCMPeripheralRunEnable(PRCM_PERIPH_CRYPTO);
PRCMPeripheralSleepEnable(PRCM_PERIPH_CRYPTO);
PRCMPeripheralDeepSleepEnable(PRCM_PERIPH_CRYPTO);
PRCMLoadSet();
while (!PRCMLoadGet());
}
ctx->magic = CC2652_AES_CTX_MAGIC;
ctx->key_idx = CC2652_AES_KEY_UNUSED;
}
/*
* Documented in aes_alt.h
*/
void mbedtls_aes_free(mbedtls_aes_context *ctx)
{
otEXPECT(ctx->magic == CC2652_AES_CTX_MAGIC);
if (ctx->key_idx != CC2652_AES_KEY_UNUSED)
{
sUsedKeys &= ~(1 << ctx->key_idx);
}
if (--sRefNum == 0)
{
/* disable the crypto core */
/* The TRNG core needs the peripheral power domain powered on to
* function. if there is a situation where the power domain must be
* powered off, use this code to do so.
PRCMPowerDomainOff(PRCM_DOMAIN_PERIPH);
while (PRCMPowerDomainStatus(PRCM_DOMAIN_PERIPH) != PRCM_DOMAIN_POWER_OFF);
*/
PRCMPeripheralRunDisable(PRCM_PERIPH_CRYPTO);
PRCMPeripheralSleepDisable(PRCM_PERIPH_CRYPTO);
PRCMPeripheralDeepSleepDisable(PRCM_PERIPH_CRYPTO);
PRCMLoadSet();
while (!PRCMLoadGet());
}
memset((void *)ctx, 0x00, sizeof(ctx));
exit:
return;
}
/*
* Documented in aes_alt.h
*/
int mbedtls_aes_setkey_enc(mbedtls_aes_context *ctx, const unsigned char *key, unsigned int keybits)
{
unsigned char key_idx;
int retval = 0;
otEXPECT_ACTION(ctx->magic == CC2652_AES_CTX_MAGIC, retval = -1);
if (ctx->key_idx != CC2652_AES_KEY_UNUSED)
{
sUsedKeys &= ~(1 << ctx->key_idx);
}
/* our hardware only supports 128 bit keys */
otEXPECT_ACTION(keybits == 128u, retval = MBEDTLS_ERR_AES_INVALID_KEY_LENGTH);
for (key_idx = 0; ((sUsedKeys >> key_idx) & 0x01) != 0 && key_idx < 8; key_idx++);
/* we have no more room for this key */
otEXPECT_ACTION(key_idx < 8, retval = -2);
otEXPECT_ACTION(CRYPTOAesLoadKey((uint32_t *)key, key_idx) == AES_SUCCESS,
retval = MBEDTLS_ERR_AES_INVALID_KEY_LENGTH);
sUsedKeys |= (1 << key_idx);
ctx->key_idx = key_idx;
exit:
return retval;
}
/*
* Documented in aes_alt.h
*/
int mbedtls_aes_setkey_dec(mbedtls_aes_context *ctx, const unsigned char *key, unsigned int keybits)
{
unsigned char key_idx;
int retval = 0;
otEXPECT_ACTION(ctx->magic == CC2652_AES_CTX_MAGIC, retval = -1);
if (ctx->key_idx != CC2652_AES_KEY_UNUSED)
{
sUsedKeys &= ~(1 << ctx->key_idx);
}
/* our hardware only supports 128 bit keys */
otEXPECT_ACTION(keybits == 128u, retval = MBEDTLS_ERR_AES_INVALID_KEY_LENGTH);
for (key_idx = 0; ((sUsedKeys >> key_idx) & 0x01) != 0 && key_idx < 8; key_idx++);
/* we have no more room for this key */
otEXPECT_ACTION(key_idx < 8, retval = -2);
otEXPECT_ACTION(CRYPTOAesLoadKey((uint32_t *)key, key_idx) == AES_SUCCESS,
retval = MBEDTLS_ERR_AES_INVALID_KEY_LENGTH);
sUsedKeys |= (1 << key_idx);
ctx->key_idx = key_idx;
exit:
return retval;
}
/*
* Documented in aes_alt.h
*/
int mbedtls_aes_crypt_ecb(mbedtls_aes_context *ctx, int mode, const unsigned char input[16], unsigned char output[16])
{
int retval = -1;
retval = CRYPTOAesEcb((uint32_t *)input, (uint32_t *)output, ctx->key_idx, mode == MBEDTLS_AES_ENCRYPT, false);
otEXPECT(retval == AES_SUCCESS);
while ((retval = CRYPTOAesEcbStatus()) == AES_DMA_BSY);
CRYPTOAesEcbFinish();
exit:
return retval;
}
#endif /* MBEDTLS_AES_ALT */
+111
View File
@@ -0,0 +1,111 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef MBEDTLS_AES_ALT_H
#define MBEDTLS_AES_ALT_H
#ifndef MBEDTLS_CONFIG_FILE
#include "cc2652-mbedtls-config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#ifdef MBEDTLS_AES_ALT
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
uint8_t magic;
signed char key_idx;
} mbedtls_aes_context;
/**
* @brief Initialize AES context
*
* @param [in,out] ctx AES context to be initialized
*/
void mbedtls_aes_init(mbedtls_aes_context *ctx);
/**
* @brief Clear AES context
*
* @param [in,out] ctx AES context to be cleared
*/
void mbedtls_aes_free(mbedtls_aes_context *ctx);
/**
* @brief AES key schedule (encryption)
*
* @param [in,out] ctx AES context to be used
* @param [in] key Encryption key
* @param [in] keybits Must be 128
*
* @retval 0 If successful
* @retval MBEDTLS_ERR_AES_INVALID_KEY_LENGTH If keybits was not 128
*/
int mbedtls_aes_setkey_enc(mbedtls_aes_context *ctx, const unsigned char *key,
unsigned int keybits);
/**
* @brief AES key schedule (decryption)
*
* @param [in,out] ctx AES context to be used
* @param [in] key Decryption key
* @param [in] keybits Must be 128
*
* @retval 0 If successful
* @retval MBEDTLS_ERR_AES_INVALID_KEY_LENGTH If keybits was not 128
*/
int mbedtls_aes_setkey_dec(mbedtls_aes_context *ctx, const unsigned char *key,
unsigned int keybits);
/**
* \brief AES-ECB block encryption/decryption
*
* \param ctx AES context
* \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT
* \param input 16-byte input block
* \param output 16-byte output block
*
* @return The return value of @ref CRYPTOAesEcb.
* @retval 0 If successful
* @retval AES_KEYSTORE_READ_ERROR If the indicated keystore ram could not be read
*/
int mbedtls_aes_crypt_ecb(mbedtls_aes_context *ctx, int mode, const unsigned char input[16],
unsigned char output[16]);
#ifdef __cplusplus
}
#endif
#endif /* MBEDTLS_AES_ALT */
#endif /* MBEDTLS_AES_ALT_H */
File diff suppressed because it is too large Load Diff
+54
View File
@@ -0,0 +1,54 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Helper functions for running c++ without the standard library
*/
__extension__ typedef int __guard __attribute__((mode(__DI__)));
int __cxa_guard_acquire(__guard *g)
{
return !*(char *)(g);
}
void __cxa_guard_release(__guard *g)
{
*(char *)g = 1;
}
void __cxa_guard_abort(__guard *g)
{
(void)g;
}
void __cxa_pure_virtual(void)
{
while (1);
}
+88
View File
@@ -0,0 +1,88 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <openthread/config.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <openthread/openthread.h>
#include <openthread/platform/alarm-milli.h>
#include <openthread/platform/radio.h>
#include "platform-cc2652.h"
/**
* Diagnostics mode variables.
*
*/
static bool sDiagMode = false;
void otPlatDiagProcess(otInstance *aInstance, int argc, char *argv[], char *aOutput, size_t aOutputMaxLen)
{
(void) aInstance;
// Add more platform specific diagnostics features here.
if (argc > 1)
{
snprintf(aOutput, aOutputMaxLen, "diag feature '%s' is not supported\r\n", argv[0]);
}
}
void otPlatDiagModeSet(bool aMode)
{
sDiagMode = aMode;
}
bool otPlatDiagModeGet()
{
return sDiagMode;
}
void otPlatDiagChannelSet(uint8_t aChannel)
{
(void) aChannel;
}
void otPlatDiagTxPowerSet(int8_t aTxPower)
{
(void) aTxPower;
}
void otPlatDiagRadioReceived(otInstance *aInstance, otRadioFrame *aFrame, otError aError)
{
(void) aInstance;
(void) aFrame;
(void) aError;
}
void otPlatDiagAlarmCallback(otInstance *aInstance)
{
(void) aInstance;
}
+316
View File
@@ -0,0 +1,316 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <string.h>
#include <driverlib/aon_batmon.h>
#include <driverlib/flash.h>
#include <driverlib/interrupt.h>
#include <driverlib/vims.h>
#include <openthread/config.h>
#include <openthread-core-config.h>
#include <openthread/platform/alarm-milli.h>
#include <utils/code_utils.h>
#include "platform-cc2652.h"
/*
* The settings configuration base address *MUST* be defined in the core config
* file. The base address *MUST* be aligned on an 8K page boundary or the flash
* program calls will fail.
*/
#ifndef SETTINGS_CONFIG_BASE_ADDRESS
#error "SETTINGS_CONFIG_BASE_ADDRESS not defined in the OpenThread Core Config"
#endif /* SETTINGS_CONFIG_BASE_ADDRESS */
/*
* The settings configuration page size *MUST* be defined in the core config
* file. The page size *MUST* be 8K or the flash program calls will fail.
*/
#if (SETTINGS_CONFIG_PAGE_SIZE != 0x2000)
#error "SETTINGS_CONFIG_PAGE_SIZE must be defined in OpenThread Core Config"
#endif
/*
* The settings configuration page number _SHOULD_ be defined in the core
* config file.
*/
#ifndef SETTINGS_CONFIG_PAGE_NUM
#warn "SETTINGS_CONFIG_PAGE_NUM not defined in the OpenThread Core Config"
#endif /* SETTINGS_CONFIG_PAGE_NUM */
enum
{
MIN_VDD_FLASH = 0x18, /* 1.50 volts (0.50=128/256 -> 128=0x80) */
MAX_WRITE_INCREMENT = 8, /* maximum number of bytes to write at a time to
* avoid interrupt latency while in ROM
*/
};
/**
* Check if the Battery Monitor measurements and calculations are enabled.
*
* @return If the Battery Monitor is enabled.
* @retval true The Battery Monitor is on.
* @retval false The Battery Monitor is off.
*/
static bool isBatMonOn(void)
{
uint32_t batMonCtl = HWREG(AON_BATMON_BASE + AON_BATMON_O_CTL);
return ((batMonCtl & AON_BATMON_CTL_CALC_EN_M)
== AON_BATMON_CTL_CALC_EN
&& (batMonCtl & AON_BATMON_CTL_MEAS_EN_M)
== AON_BATMON_CTL_MEAS_EN);
}
/**
* Check if the supply voltage is high enough to support flash programming.
*
* @return If the Voltage is too low to support flash programming.
* @retval false The supply voltage is too low.
* @retval true The supply voltage is sufficient.
*/
static bool checkVoltage(void)
{
bool batMonWasOff = !isBatMonOn();
bool ret = false;
if (batMonWasOff)
{
AONBatMonEnable();
}
if (AONBatMonBatteryVoltageGet() >= MIN_VDD_FLASH)
{
ret = true;
}
if (batMonWasOff)
{
AONBatMonDisable();
}
return ret;
}
/**
* Disable Flash data caching and instruction pre-fetching.
*
* It is necessary to disable the caching and VIMS to ensure the cache has
* valid data while the program is executing.
*
* @return The VIMS state before being disabled.
*/
static uint32_t disableFlashCache(void)
{
uint32_t mode = VIMSModeGet(VIMS_BASE);
VIMSLineBufDisable(VIMS_BASE);
if (mode != VIMS_MODE_DISABLED)
{
VIMSModeSet(VIMS_BASE, VIMS_MODE_DISABLED);
while (VIMSModeGet(VIMS_BASE) != VIMS_MODE_DISABLED);
}
return mode;
}
/**
* Restore the Flash data caching and instruction pre-fetching.
*
* @param [in] mode The VIMS mode returned by @ref disableFlashCache.
*/
static void restoreFlashCache(uint32_t mode)
{
if (mode != VIMS_MODE_DISABLED)
{
VIMSModeSet(VIMS_BASE, mode);
}
VIMSLineBufEnable(VIMS_BASE);
}
/**
* Translate the errors from the Flash programming FSM to OpenThread error
* codes.
*
* @param [in] error Return from the Flash programming function.
*
* @return The corresponding OpenThread @ref otError value.
*/
static otError fsmErrorToOtError(uint32_t error)
{
otError ret = OT_ERROR_GENERIC;
switch (error)
{
case FAPI_STATUS_SUCCESS:
ret = OT_ERROR_NONE;
break;
case FAPI_STATUS_INCORRECT_DATABUFFER_LENGTH:
ret = OT_ERROR_INVALID_ARGS;
break;
case FAPI_STATUS_FSM_ERROR:
ret = OT_ERROR_FAILED;
break;
default:
break;
}
return ret;
}
/**
* Function documented in platforms/utils/flash.h
*/
otError utilsFlashInit(void)
{
return OT_ERROR_NONE;
}
/**
* Function documented in platforms/utils/flash.h
*/
uint32_t utilsFlashGetSize(void)
{
return FlashSizeGet();
}
/**
* Function documented in platforms/utils/flash.h
*/
otError utilsFlashErasePage(uint32_t aAddress)
{
uint32_t mode;
uint32_t fsmRet;
otError ret;
otEXPECT_ACTION(checkVoltage(), ret = OT_ERROR_FAILED);
mode = disableFlashCache();
fsmRet = FlashSectorErase(aAddress);
restoreFlashCache(mode);
ret = fsmErrorToOtError(fsmRet);
exit:
return ret;
}
/**
* Function documented in platforms/utils/flash.h
*/
otError utilsFlashStatusWait(uint32_t aTimeout)
{
uint32_t start = otPlatAlarmMilliGetNow();
otError ret = OT_ERROR_BUSY;
while ((otPlatAlarmMilliGetNow() - start) < aTimeout)
{
if (FlashCheckFsmForReady() == FAPI_STATUS_FSM_READY)
{
ret = OT_ERROR_NONE;
break;
}
}
return ret;
}
/**
* Function documented in platforms/utils/flash.h
*/
uint32_t utilsFlashWrite(uint32_t aAddress, uint8_t *aData, uint32_t aSize)
{
uint32_t mode;
uint32_t written = 0;
otEXPECT(checkVoltage());
mode = disableFlashCache();
while (written < aSize)
{
uint32_t toWrite = aSize - written;
uint8_t *data = aData + written;
uint32_t address = aAddress + written;
uint32_t fsmRet;
bool interruptsWereDisabled;
if (toWrite > MAX_WRITE_INCREMENT)
{
toWrite = MAX_WRITE_INCREMENT;
}
/* The CPU may not execute code from flash while a program is
* happening. We disable interrupts to ensure one does not preempt the
* ROM fsm.
*/
interruptsWereDisabled = IntMasterDisable();
fsmRet = FlashProgram(data, address, toWrite);
if (!interruptsWereDisabled)
{
IntMasterEnable();
}
if (fsmRet != FAPI_STATUS_SUCCESS)
{
break;
}
written += toWrite;
}
restoreFlashCache(mode);
exit:
return written;
}
/**
* Function documented in platforms/utils/flash.h
*/
uint32_t utilsFlashRead(uint32_t aAddress, uint8_t *aData, uint32_t aSize)
{
memcpy(aData, (void *)aAddress, (size_t)aSize);
return aSize;
}
+94
View File
@@ -0,0 +1,94 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <openthread/config.h>
#include <driverlib/sys_ctrl.h>
#include <openthread/platform/misc.h>
#include <openthread/types.h>
/*
* NOTE: if the system is flashed with Flash Programmer 2 or Uniflash, this
* reset will not work the first time. Both programs use the cJTAG module,
* which sets the halt in boot flag. The device must be manually reset the
* first time after being programmed through the JTAG interface.
*/
/**
* Function documented in platform/misc.h
*/
void otPlatReset(otInstance *aInstance)
{
(void)aInstance;
SysCtrlSystemReset();
}
/**
* Function documented in platform/misc.h
*/
otPlatResetReason otPlatGetResetReason(otInstance *aInstance)
{
(void)aInstance;
otPlatResetReason ret;
switch (SysCtrlResetSourceGet())
{
case RSTSRC_PWR_ON:
ret = OT_PLAT_RESET_REASON_POWER_ON;
break;
case RSTSRC_PIN_RESET:
ret = OT_PLAT_RESET_REASON_EXTERNAL;
break;
case RSTSRC_VDDS_LOSS:
case RSTSRC_VDD_LOSS:
case RSTSRC_VDDR_LOSS:
case RSTSRC_CLK_LOSS:
ret = OT_PLAT_RESET_REASON_CRASH;
break;
case RSTSRC_WARMRESET:
case RSTSRC_SYSRESET:
case RSTSRC_WAKEUP_FROM_SHUTDOWN:
ret = OT_PLAT_RESET_REASON_SOFTWARE;
break;
default:
ret = OT_PLAT_RESET_REASON_UNKNOWN;
break;
}
return ret;
}
void otPlatWakeHost(void)
{
// TODO: implement an operation to wake the host from sleep state.
}
@@ -0,0 +1,72 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef OPENTHREAD_CORE_CC2652_CONFIG_H_
#define OPENTHREAD_CORE_CC2652_CONFIG_H_
/**
* @def SETTINGS_CONFIG_BASE_ADDRESS
*
* The base address of the pages to be used for non-volatile-settings storage.
*/
#define SETTINGS_CONFIG_BASE_ADDRESS (0x52000)
/**
* @def SETTINGS_CONFIG_PAGE_SIZE
*
* The size in bytes of a page for the cc26x2 platform.
*
* @note *MUST BE* 8K.
*/
#define SETTINGS_CONFIG_PAGE_SIZE (0x2000)
/**
* @def SETTINGS_CONFIG_PAGE_NUM
*
* The number of flash pages to use for non-volatile settings storage.
*/
#define SETTINGS_CONFIG_PAGE_NUM (2)
/**
* @def OPENTHREAD_CONFIG_ENABLE_DEFAULT_LOG_OUTPUT
*
* Define to 1 to enable default log output.
*
*/
#define OPENTHREAD_CONFIG_ENABLE_DEFAULT_LOG_OUTPUT 1
/**
* @def OPENTHREAD_CONFIG_LEGACY_TRANSMIT_DONE
*
* Define to 1 if you want use legacy transmit done.
*
*/
#define OPENTHREAD_CONFIG_LEGACY_TRANSMIT_DONE 1
#endif /* OPENTHREAD_CORE_CC2650_CONFIG_H_ */
@@ -0,0 +1,82 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef PLATFORM_H_
#define PLATFORM_H_
#include <stdint.h>
#include "openthread/types.h"
#ifdef __cplusplus
extern "C" {
#endif
// Global OpenThread instance structure
extern otInstance *sInstance;
/**
* This method initializes the alarm service used by OpenThread.
*
*/
void cc2652AlarmInit(void);
/**
* This method performs alarm driver processing.
*
*/
void cc2652AlarmProcess(otInstance *aInstance);
/**
* This method initializes the radio service used by OpenThread.
*
*/
void cc2652RadioInit(void);
/**
* This method performs radio driver processing.
*
*/
void cc2652RadioProcess(otInstance *aInstance);
/**
* This method initializes the random number service used by OpenThread.
*
*/
void cc2652RandomInit(void);
/**
* This method performs radio driver processing.
*
*/
void cc2652UartProcess(void);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // PLATFORM_H_
+81
View File
@@ -0,0 +1,81 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @file
* @brief
* This file includes the platform-specific initializers.
*/
#include <openthread/config.h>
#include <stdio.h>
#include <openthread/types.h>
#include "platform-cc2652.h"
#include "inc/hw_types.h"
#include "inc/hw_ccfg.h"
#include "inc/hw_ccfg_simple_struct.h"
extern const ccfg_t __ccfg;
const char *dummy_ccfg_ref = ((const char *)(&(__ccfg)));
/**
* Function documented in platform-cc2652.h
*/
void PlatformInit(int argc, char *argv[])
{
(void) argc;
(void) argv;
while (dummy_ccfg_ref == NULL)
{
/*
* This provides a code reference to the customer configuration area of
* the flash, otherwise the data is skipped by the linker and not put
* into the final flash image.
*/
}
cc2652AlarmInit();
cc2652RandomInit();
cc2652RadioInit();
}
/**
* Function documented in platform-cc2652.h
*/
void PlatformProcessDrivers(otInstance *aInstance)
{
// should sleep and wait for interrupts here
cc2652UartProcess();
cc2652RadioProcess(aInstance);
cc2652AlarmProcess(aInstance);
}
File diff suppressed because it is too large Load Diff
+137
View File
@@ -0,0 +1,137 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <openthread/config.h>
#include <stddef.h>
#include <openthread/platform/random.h>
#include <openthread/types.h>
#include <utils/code_utils.h>
#include <driverlib/prcm.h>
#include <driverlib/trng.h>
enum
{
CC2652_TRNG_MIN_SAMPLES_PER_CYCLE = (1 << 6),
CC2652_TRNG_MAX_SAMPLES_PER_CYCLE = (1 << 24),
CC2652_TRNG_CLOCKS_PER_SAMPLE = 0,
};
/**
* \note if more than 32 bits of entropy are needed, the TRNG core produces
* 64 bits of random data, we just ignore the upper 32 bytes
*/
/**
* Function documented in platform-cc2652.h
*/
void cc2652RandomInit(void)
{
PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH);
while (PRCMPowerDomainStatus(PRCM_DOMAIN_PERIPH) != PRCM_DOMAIN_POWER_ON);
PRCMPeripheralRunEnable(PRCM_PERIPH_TRNG);
PRCMPeripheralSleepEnable(PRCM_DOMAIN_PERIPH);
PRCMPeripheralDeepSleepEnable(PRCM_DOMAIN_PERIPH);
PRCMLoadSet();
TRNGConfigure(CC2652_TRNG_MIN_SAMPLES_PER_CYCLE, CC2652_TRNG_MAX_SAMPLES_PER_CYCLE, CC2652_TRNG_CLOCKS_PER_SAMPLE);
TRNGEnable();
}
/**
* Function documented in platform/random.h
*/
uint32_t otPlatRandomGet(void)
{
while (!(TRNGStatusGet() & TRNG_NUMBER_READY));
return TRNGNumberGet(TRNG_LOW_WORD);
}
/**
* Fill an arbitrary area with random data.
*
* @param [out] aOutput Area to place the random data.
* @param [in] aLen Size of the area to place random data.
* @param [out] oLen How much of the output was written to.
*
* @return Indication of error.
* @retval 0 No error occurred.
*/
static int TRNGPoll(unsigned char *aOutput, size_t aLen)
{
size_t length = 0;
union
{
uint32_t u32[2];
uint8_t u8[8];
} buffer;
while (length < aLen)
{
if (length % 8 == 0)
{
/* we've run to the end of the buffer */
while (!(TRNGStatusGet() & TRNG_NUMBER_READY));
/*
* don't use TRNGNumberGet here because it will tell the TRNG to
* refill the entropy pool, instead we do it ourself.
*/
buffer.u32[0] = HWREG(TRNG_BASE + TRNG_O_OUT0);
buffer.u32[1] = HWREG(TRNG_BASE + TRNG_O_OUT1);
HWREG(TRNG_BASE + TRNG_O_IRQFLAGCLR) = 0x1;
}
aOutput[length] = buffer.u8[length % 8];
length++;
}
return 0;
}
/**
* Function documented in platform/random.h
*/
otError otPlatRandomGetTrue(uint8_t *aOutput, uint16_t aOutputLength)
{
otError error = OT_ERROR_NONE;
size_t length = aOutputLength;
otEXPECT_ACTION(aOutput, error = OT_ERROR_INVALID_ARGS);
otEXPECT_ACTION(TRNGPoll((unsigned char *)aOutput, length) == 0, error = OT_ERROR_FAILED);
exit:
return error;
}
+203
View File
@@ -0,0 +1,203 @@
/*
* Copyright (c) 2017, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @file
* This file implements the OpenThread platform abstraction for UART communication.
*
*/
#include <openthread/config.h>
#include <stddef.h>
#include <openthread/platform/uart.h>
#include <openthread/types.h>
#include <utils/code_utils.h>
#include <driverlib/ioc.h>
#include <driverlib/prcm.h>
#include <driverlib/sys_ctrl.h>
#include <driverlib/uart.h>
/**
* @note This will configure the uart for 115200 baud 8-N-1, no HW flow control
* RX pin IOID_2 TX pin IOID_3.
*/
enum
{
CC2652_RECV_CIRC_BUFF_SIZE = 256,
};
static uint8_t const *sSendBuffer = NULL;
static uint16_t sSendLen = 0;
static uint8_t sReceiveBuffer[CC2652_RECV_CIRC_BUFF_SIZE];
static uint16_t sReceiveHeadIdx = 0;
static uint16_t sReceiveTailIdx = 0;
void UART0_intHandler(void);
/**
* Function documented in platform/uart.h
*/
otError otPlatUartEnable(void)
{
PRCMPowerDomainOn(PRCM_DOMAIN_SERIAL);
while (PRCMPowerDomainStatus(PRCM_DOMAIN_SERIAL) != PRCM_DOMAIN_POWER_ON);
PRCMPeripheralRunEnable(PRCM_PERIPH_UART0);
PRCMPeripheralSleepEnable(PRCM_PERIPH_UART0);
PRCMPeripheralDeepSleepEnable(PRCM_PERIPH_UART0);
PRCMLoadSet();
while (!PRCMLoadGet());
IOCPinTypeUart(UART0_BASE, IOID_2, IOID_3, IOID_UNUSED, IOID_UNUSED);
UARTConfigSetExpClk(UART0_BASE, SysCtrlClockGet(), 115200,
UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE);
UARTIntEnable(UART0_BASE, UART_INT_RX | UART_INT_RT);
UARTIntRegister(UART0_BASE, UART0_intHandler);
UARTEnable(UART0_BASE);
return OT_ERROR_NONE;
}
/**
* Function documented in platform/uart.h
*/
otError otPlatUartDisable(void)
{
UARTDisable(UART0_BASE);
UARTIntUnregister(UART0_BASE);
UARTIntDisable(UART0_BASE, UART_INT_RX | UART_INT_RT);
IOCPortConfigureSet(IOID_2, IOC_PORT_GPIO, IOC_STD_INPUT);
IOCPortConfigureSet(IOID_3, IOC_PORT_GPIO, IOC_STD_INPUT);
PRCMPeripheralRunDisable(PRCM_PERIPH_UART0);
PRCMPeripheralSleepDisable(PRCM_PERIPH_UART0);
PRCMPeripheralDeepSleepDisable(PRCM_PERIPH_UART0);
PRCMLoadSet();
/**
* \warn this assumes that there are no other devices being used in the
* serial power domain
*/
PRCMPowerDomainOff(PRCM_DOMAIN_SERIAL);
return OT_ERROR_NONE;
}
/**
* Function documented in platform/uart.h
*/
otError otPlatUartSend(const uint8_t *aBuf, uint16_t aBufLength)
{
otError error = OT_ERROR_NONE;
otEXPECT_ACTION(sSendBuffer == NULL, error = OT_ERROR_BUSY);
sSendBuffer = aBuf;
sSendLen = aBufLength;
exit:
return error;
}
/**
* @brief process the receive side of the buffers
*/
static void processReceive(void)
{
while (sReceiveHeadIdx != sReceiveTailIdx)
{
uint16_t tailIdx;
if (sReceiveHeadIdx < sReceiveTailIdx)
{
tailIdx = sReceiveTailIdx;
otPlatUartReceived(&(sReceiveBuffer[sReceiveHeadIdx]), tailIdx - sReceiveHeadIdx);
sReceiveHeadIdx = tailIdx;
}
else
{
tailIdx = CC2652_RECV_CIRC_BUFF_SIZE;
otPlatUartReceived(&(sReceiveBuffer[sReceiveHeadIdx]), tailIdx - sReceiveHeadIdx);
sReceiveHeadIdx = 0;
}
}
}
/**
* @brief process the transmit side of the buffers
*/
static void processTransmit(void)
{
otEXPECT(sSendBuffer != NULL);
for (; sSendLen > 0; sSendLen--)
{
UARTCharPut(UART0_BASE, *sSendBuffer);
sSendBuffer++;
}
sSendBuffer = NULL;
sSendLen = 0;
otPlatUartSendDone();
exit:
return;
}
/**
* Function documented in platform-cc2652.h
*/
void cc2652UartProcess(void)
{
processReceive();
processTransmit();
}
/**
* @brief the interrupt handler for the uart interrupt vector
*/
void UART0_intHandler(void)
{
while (UARTCharsAvail(UART0_BASE))
{
uint32_t c = UARTCharGet(UART0_BASE);
/* XXX process error flags for this character ?? */
sReceiveBuffer[sReceiveTailIdx] = (uint8_t)c;
sReceiveTailIdx++;
if (sReceiveTailIdx >= CC2652_RECV_CIRC_BUFF_SIZE)
{
sReceiveTailIdx = 0;
}
}
}
+18 -13
View File
@@ -1,15 +1,10 @@
#CC26XXware
## URL
http://www.ti.com/tool/cc26xxware
*note*: This will redirect to http://www.ti.com/tool/ti-rtos because CC26XXware
is no longer distributed as its own package.
http://www.ti.com/tool/simplelink-cc26x2-sdk
## Version
2.24.0x
`driverlib_cc13xx_cc26xx_3_01_01_17779`
## License
@@ -21,15 +16,25 @@ BSD-3-Clause
## Documentation
This version of CC26XXware was copied from
[TI-RTOSv2.20.00.06](http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/2_20_00_06/exports/tirtos_full_2_20_00_06/docs/Documentation_Overview_cc13xx_cc26xx.html).
RF command files were added to support IEEE mode. The documentation was removed
from `cc26xxware/doc` and can be found
[here](http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/2_20_00_06/exports/tirtos_full_2_20_00_06/products/cc26xxware_2_24_02_17202/doc/doc_overview.html).
This version of cc26xxware is copied from the [SimpleLink CC26x2 Software
Development Kit](http://www.ti.com/tool/simplelink-cc26x2-sdk). Modifications
were made to the software package to support the GCC Automake pedantic build.
| file | change |
|-----------------------------------------------|------------------------------------------------------------------------------|
| `device/cc26x0/driverlib/bin/gcc/driverlib.a` | Renamed from `driverlib.lib` to allow Automake to recognize the library |
| `device/cc26x2/driverlib/bin/gcc/driverlib.a` | Renamed from `driverlib.lib` to allow Automake to recognize the library |
| `device/cc26x0/driverlib/cpu.h` | GCC asm extensions added to avoid unused variable warning in `CPUbasepriSet` |
| `device/cc26x2/driverlib/cpu.h` | GCC asm extensions added to avoid unused variable warning in `CPUbasepriSet` |
| `device/cc26x0/linker_files/cc26x0f128.lds` | `end` symbol added for GCC stdlib |
| `device/cc26x2/linker_files/cc26x2r1f.lds` | `end` symbol added for GCC stdlib |
Documentation can be found within the [SimpleLink CC26x2 Software Development
Kit](http://www.ti.com/tool/simplelink-cc26x2-sdk).
## Description
CC26XXware is the board support library for Texas Instruments' CC26X0 line of
CC26XXware is the board support library for Texas Instruments' CC26XX line of
connected MCUs for developers to easily leverage the hardware capabilities of
those platforms. Texas Instruments Incorporated recommends TI-RTOS and its
associated drivers for future development.
@@ -1,502 +0,0 @@
<!--
Texas Instruments Manifest Format 2.0␍
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<!-- @Start Style -->
<!-- Default style in case someone doesnt have Internet Access -->
<style type="text/css" id="internalStyle">
body, div, p {
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
font-size: 13px;
line-height: 1.3;
}
body {
margin: 20px;
}
h1 {
font-size: 150%;
}
h2 {
font-size: 120%;
}
h3 {
font-size: 100%;
}
img {
border: 0px;
vertical-align: middle;
}
table, th, td, tr {
border: 1px solid black;
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
font-size: 13px;
line-height: 1.3;
empty-cells: show;
padding: 5px;
}
table {
border-collapse: collapse;
width: 100%;
}
tr {
page-break-inside: avoid;
}
#TIlogoLeft {
background-color: black;
padding: 0;
width: 20%;
}
#TIlogoRight {
background-color: red;
padding: 0;
}
#ProductName {
text-align: center;
}
#ReleaseDate {
text-align: center;
}
.LogoSection {
margin: 0;
padding: 0;
}
.HeaderSection {
margin: 25px 0 25px 0;
padding: 0;
}
.LegendSection {
margin: 25px 0 25px 0;
}
.ExportSection {
margin: 25px 0 25px 0;
}
.DisclaimerSection {
margin: 25px 0 25px 0;
}
.CreditSection {
margin: 25px 0 25px 0;
}
.LicenseSection {
margin: 25px 0 25px 0;
}
.ManifestTable {
margin: 25px 0 25px 0;
}
</style>
<!-- Override style from TI if they have Internet Access -->
<link type="text/css" rel="stylesheet" href="timanifeststyle.css">
<!-- @End Style -->
<title>Texas Instruments Manifest</title>
</head>
<body><!-- Logo display, will need to fix up the URLs, this is just for testing.. Image alternate display not wporking well yet -->
<div class="LogoSection">
<table>
<tbody>
<tr>
<td id="TIlogoLeft">
<a href="http://www.ti.com/">
<!-- img src="tilogo.gif" alt="Texas Instruments Incorporated" -->
<img alt="" src="data:image/gif;base64,R0lGODlh3gA2AKIAAAAAAP///7u7u29vbz8/PwYGBujo6BgYGCH5BAAAAAAALAAAAADeADYAAAP/CLrc/jDKSau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRyyWw6n9CodHorDALYLIHKJVqz2q44eAUHtoDB4DBu48rgLQErcNtnX7NhMDcICIB3gix5ZmtqAAZZew8EAo+QkQIDNVZqiIM1cHGKZ4YPAmaiAWw0c1gFmZqjB3SbZ6kNe6WhsAeOlDV0qjSFAXUAp7lwuREFtVsFgMvLB7fNAM+BCs+lDLd8BNYOuxfV22PL0RiWlwO1u3kDqejAEsjR6GB86FsHoYwA6gxWnVgGEegUuIelWJk6jswAGlXQ36J1xBSoQwfulIEDr/6l+VeK/+AehrAGOHRnAWRBbbWegckXAV6wk4AeRQtDQBEaBYsYlMl2hUCsBt0iKgilT9EfAlfO7SmzdKkrkQUT/fqZSECqLCSlntH375IAA1tqGUilLIBSNVnU+NmJNBRVChlF1QwAdlRWBy5P3QymwCLBYhs73cTHYBq3X33nDQ2wcWuBgef0FRD4GK3jU3VCZZUJAIw1OGg0P+4bFiubOWoOsEP1+KvZn3wurDbZ6lfcuw3yYkFjRSeYzRe7ARAbW0K3PmGIMi0OFDG1Mmha+RnufAHn3xL9ha6uTZ/rXagZ1GKAtTsHeWb+FEQvHILuX4+mLzj2j2r4TrFesTwMbE5Cuv8JzbTSGuRV1xgfUJFC3WbA0JWFalcItpgf8YU2yT/qATaedent5cBb8zk0DzIitgfKbonRFV9Wp2xl3UXq5Ccibp05598BnRigiAIJmrZAexkJQIuBwzX4CB3SQbeYQkPVAUco63DI2HzsAdYAiAvEZdYlaVQ5wXs3+bQAjovEUoBRR9LVAFLaPXCcY/KMqVRasQB5kiJgLcYgTkJiuCWKC2ZpIY/z/LRhYefkBAGW1HTyRy2UjObLHxSAOZ948EUVGCSC3SLZbB7iZKOLc2GRRgMH/VhdHnJwFCgD8iEGx0VKvpqbO+hoaCppEg3UiTES1CTkhNaQ+Qs4LQGql07/lET4mIQ6SvTSVGZ9Bmhz/bkYzK+PFKtpje6wumRm1wrLZzSdQASoZvyswdmSuk7p616HfkjBTxZBQucFgqXCFKdn1NpiUlQJhs8kteBWG0AbATbXS2tBlaeoVkmJRova4KkGPmhMFdiSYmq8cbTRYhrlkiHaNufJ9mIgVqEXnAOJM5JE4sgjudQ8bF82x+cKBP4Iiedecyjgx2/WtMNjjhcL9h+S4xq9RYJgsbeeUbmdrPTSQbPccsyijEXOfI8xyuinVJH1wdkS/MQ2Bc5Iq08DyHYwGglvPyCilbz0fa8GLV7r9+Btb7CJ14Qnzg8HpdKoOOF5Py752JNXvrblNphzEHnmnF/a+ecTbA465qKPXnnppkuOeuqKr8465K+z7nrsfc9Ouyq23z5I7rrfwXvvbhSQAAA7" />
</a>
</td>
<td id="TILogoRight">
<!-- img src="titagline.gif" alt="Technology for Innovators(tm)"-->
<img alt="" src="data:image/gif;base64,R0lGODlhOgEaALMAAP8AAP////92dv+3t/+Njf/W1v/t7f8hIf/19f+jo//Hx/8/P/9cXP/j4//6+v/+/iH5BAAAAAAALAAAAAA6ARoAAAT/EMhJq7046827/2AojmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEgsGo/IpHLJbDqft0NDMCBQodis1jcADBKE7nYcCpjPgU5AQBKkVYOHAeRudqtXsh60/vRHdSoBBCGBNAkLe4o4f2psgG8pjR6GM5OLmDB/DA0GBoQADAgICRIBBQUOYgwGCg2kEgudBgUHAIGcBg0MsZ0NCnMGYgsBtqEGAbCynrW3AQONgcIFBgiErK6wAAfUtLbCscWiowoAyLDczLZu0AIJCAYOoJn0G38ObAwPEvLEts/O1vUhsA8AAjGonEmA9W6hGAVpEjiQoKBAhT8HJSRkVyEQQAAJ//a5YeMPQIFyACqCnJjSIgFCB4oB+HOSokWOAB6wIWCxnk8MfYh5QsYg5sVHfQLVMSqhztJIxWIaC6QzJy8KfZgqrNT0zR+nUNl8fSMvZ6IDwJCJRfoI7IR4Cub9nDsha6RwR02xUZpGq1utUWUq9FKgYV6/abgOHjt45tquEgY0SDDHoJg+fxhXolKNrmfH/EoR5EdAKmjQfB1qvPmGIQIJ3g4gC2egVF7LqxtP8Ng2cViTKFUCIGbNFKEEmB/VbDlYdqLRn+du8oTg6jjbmfe+CbTM2+BcuySgbQVtQoOCt7s3U8wbsqGs3ZppZLnylwFe8Uql825ogANPckUnYDoOCogxQGXADajggjcw4AA8DSSyTQASMmjhhTQscBWGHHbo4YcghijiiCSWaOKJKKao4oostugiFBEAADs=" />
</td>
</tr>
</tbody>
</table>
</div><div class="HeaderSection">
<h1 id="ProductName">
<!-- @Start Product -->
CC26xxWare Manifest␍
<!-- @End Product -->
</h1>
<h2 id="ReleaseDate">
<!-- @Start Date -->
06-02-2016␍
<!-- @End Date -->
</h2>
<h2 id="SRASID">
<!-- @Start Date -->
Manifest ID - SRAS00002936␍
<!-- @End Date -->
</h2>
</div><div class="LegendSection">
<h2>Legend</h2>
<p>(explanation of the fields in the Manifest Table below)</p>
<table>
<tbody>
<tr>
<td>
<b>Software Name </b>
</td>
<td>
The name of the application or file␍
</td>
</tr>
<tr>
<td>
<b>Version</b>
</td>
<td>
Version of the application or file␍
</td>
</tr>
<tr>
<td>
<b>License Type</b>
</td>
<td>
Type of license(s) under which TI will be providing␍
software to the licensee (e.g. BSD-3-Clause, GPL-2.0, TI TSPA License, TI␍
Commercial License). The license could be under Commercial terms or Open Source. See Open Source Reference License Disclaimer in␍
the Disclaimers Section. Whenever possible, TI will use an <a href="http://spdx.org/licenses/"> SPDX Short Identifier </a> for an Open Source␍
License. TI Commercial license terms are not usually included in the manifest and are conveyed through a variety ␍
of means such as a clickwrap license upon install, ␍
a signed license agreement and so forth.␍
</td>
</tr>
<tr>
<td>
<b>Location</b>
</td>
<td>
The directory name and path on the media or a specific file where the Software is located. Typically fully qualified path names ␍
are not used and instead the relevant top level directory of the application is given. ␍
A notation often used in the manifests is [as installed]/directory/*. Note that the asterisk implies that all␍
files under that directory are licensed as the License Type field denotes. Any exceptions to this will ␍
generally be denoted as [as installed]/directory/* except as noted below which means as shown in subsequent rows of ␍
the manifest.␍
</td>
</tr>
<tr>
<td>
<b>Delivered As</b>
</td>
<td>
This field will either be &#8220;Source&#8221;, &#8220;Binary&#8221; or &#8220;Source␍
and Binary&#8221; and is the primary form the content of the Software is delivered␍
in. If the Software is delivered in an archive format, this field␍
applies to the contents of the archive. If the word Limited is used␍
with Source, as in &#8220;Limited Source&#8221; or &#8220;Limited Source and Binary&#8221; then␍
only portions of the Source for the application are provided.␍
</td>
</tr>
<tr>
<td>
<b>Modified by TI</b>
</td>
<td>
This field will either be &#8220;Yes&#8221; or &#8220;No&#8221;. A &#8220;Yes&#8221; means␍
TI has made changes to the Software. A &#8220;No&#8221; means TI has not made any␍
changes. Note: This field is not applicable for Software &#8220;Obtained␍
from&#8221; TI.␍
</td>
</tr>
<tr>
<td>
<b>Obtained from</b>
</td>
<td>
This field specifies from where or from whom TI obtained␍
the Software. It may be a URL to an Open Source site, a 3<sup>rd</sup>
party licensor, or TI. See Links Disclaimer in the Disclaimers␍
Section.␍
</td>
</tr>
</tbody>
</table>
</div><div class="DisclaimerSection">
<h2>Disclaimers</h2>
<h3>Export Control Classification Number (ECCN)</h3>
<p>Any use of ECCNs listed in the Manifest is at the user&#8217;s risk␍
and without recourse to TI. Your␍
company, as the exporter of record, is responsible for determining the␍
correct classification of any item at␍
the time of export. Any export classification by TI of Software is for␍
TI&#8217;s internal use only and shall not be construed as a representation␍
or warranty␍
regarding the proper export classification for such Software or whether␍
an export␍
license or other documentation is required for exporting such Software</p>
<h3>Links in the Manifest</h3>
<p>Any␍
links appearing on this Manifest␍
(for example in the &#8220;Obtained from&#8221; field) were verified at the time␍
the Manifest was created. TI makes no guarantee that any listed links␍
will␍
remain active in the future.</p>
<h3>Open Source License References</h3>
<p>Your company is responsible for confirming the␍
applicable license terms for any open source Software␍
listed in this Manifest that was not &#8220;Obtained from&#8221; TI. Any open␍
source license␍
specified in this Manifest for Software that was␍
not &#8220;Obtained from&#8221; TI is for TI&#8217;s internal use only and shall not be␍
construed as a representation or warranty regarding the proper open␍
source license terms␍
for such Software.</p>
</div><div class="ExportSection">
<h2>Export Information</h2>
<p>ECCN for Software included in this release:</p>
Publicly Available - Open Source 5D002 TSU License Exception␍
</div><div class="ManifestTable">
<!-- h2>Manifest Table</h2 -->
<table>
<tbody>
<h2>
CC26xxWare Manifest Table
</h2>
<p>
See the Legend above for a description of these columns.
</p>
<table id="targetpackages" name="targetpackages">
<thead>
<tr>
<td><b>Software Name</b></td>
<td><b>Version</b></td>
<td><b>License Type</b></td>
<td><b>Delivered As</b></td>
<td><b>Modified by TI</b></td>
<td></td>
<td></td>
</tr>
</thead>
<tbody>
<tr>
<td id="name" name="name" rowspan="2">
driverlib
</td>
<td id="version" name="version" rowspan="2">
2.24.0x
</td>
<td id="license" name="license" rowspan="2">
BSD-3-Clause
</td>
<td id="delivered" name="delivered" rowspan="2">
Source and binary
</td>
<td id="modified" name="modified" rowspan="2">
N/A
</td>
<td><b>Location</b></td>
<td id="location" name="location">
driverlib, driverlib/bin
</td>
</tr>
<tr>
<td><b>Obtained from</b></td>
<td id="obtained" name="obtained">
TI
</td>
</tr>
<tbody>
<tr>
<td id="name" name="name" rowspan="2">
CC26xx RF patches
</td>
<td id="version" name="version" rowspan="2">
2.24.0x
</td>
<td id="license" name="license" rowspan="2">
BSD-3-Clause
</td>
<td id="delivered" name="delivered" rowspan="2">
Source
</td>
<td id="modified" name="modified" rowspan="2">
N/A
</td>
<td><b>Location</b></td>
<td id="location" name="location">
rf_patches
</td>
</tr>
<tr>
<td><b>Obtained from</b></td>
<td id="obtained" name="obtained">
TI
</td>
</tr>
<tbody>
<tr>
<td id="name" name="name" rowspan="2">
CC26xx hardware header files
</td>
<td id="version" name="version" rowspan="2">
2.24.0x
</td>
<td id="license" name="license" rowspan="2">
BSD-3-Clause
</td>
<td id="delivered" name="delivered" rowspan="2">
Source
</td>
<td id="modified" name="modified" rowspan="2">
N/A
</td>
<td><b>Location</b></td>
<td id="location" name="location">
inc
</td>
</tr>
<tr>
<td><b>Obtained from</b></td>
<td id="obtained" name="obtained">
TI
</td>
</tr>
<tbody>
<tr>
<td id="name" name="name" rowspan="2">
CC26xx startup files
</td>
<td id="version" name="version" rowspan="2">
2.24.0x
</td>
<td id="license" name="license" rowspan="2">
BSD-3-Clause
</td>
<td id="delivered" name="delivered" rowspan="2">
Source
</td>
<td id="modified" name="modified" rowspan="2">
N/A
</td>
<td><b>Location</b></td>
<td id="location" name="location">
startup_files
</td>
</tr>
<tr>
<td><b>Obtained from</b></td>
<td id="obtained" name="obtained">
TI
</td>
</tr>
<tbody>
<tr>
<td id="name" name="name" rowspan="2">
CC26xx linker files
</td>
<td id="version" name="version" rowspan="2">
2.24.0x
</td>
<td id="license" name="license" rowspan="2">
BSD-3-Clause
</td>
<td id="delivered" name="delivered" rowspan="2">
Source
</td>
<td id="modified" name="modified" rowspan="2">
N/A
</td>
<td><b>Location</b></td>
<td id="location" name="location">
linker_files
</td>
</tr>
<tr>
<td><b>Obtained from</b></td>
<td id="obtained" name="obtained">
TI
</td>
</tr>
<tbody>
<tr>
<td id="name" name="name" rowspan="2">
CC13xx/CC26xxWare Crypto
</td>
<td id="version" name="version" rowspan="2">
1.01.00.x
</td>
<td id="license" name="license" rowspan="2">
BSD-3-Clause
</td>
<td id="delivered" name="delivered" rowspan="2">
Source
</td>
<td id="modified" name="modified" rowspan="2">
N/A
</td>
<td><b>Location</b></td>
<td id="location" name="location">
utils/rom_crypto,driverlib
</td>
</tr>
<tr>
<td><b>Obtained from</b></td>
<td id="obtained" name="obtained">
TI
</td>
</tr>
<tbody>
<tr>
<td id="name" name="name" rowspan="2">
jquery.js
</td>
<td id="version" name="version" rowspan="2">
1.7.1
</td>
<td id="license" name="license" rowspan="2">
MIT
</td>
<td id="delivered" name="delivered" rowspan="2">
Source
</td>
<td id="modified" name="modified" rowspan="2">
No
</td>
<td><b>Location</b></td>
<td id="location" name="location">
doc/driverlib
</td>
</tr>
<tr>
<td><b>Obtained from</b></td>
<td id="obtained" name="obtained">
jquery.org
</td>
</tr>
</tbody>
</table>
</p>
</p>
<p>
</div><div class="CreditSection">
<h2>Credits</h2>
<BR> <BR><BR><BR><BR>
</div><div class="LicenseSection">
<h2>Licenses</h2>
<BR><h3><b> CC26xxWare Licenses </b></h3><BR> <BR><BR>BSD-3-Clause license:<BR>Copyright (c) 2016, Texas Instruments Incorporated<BR>All rights reserved.<BR><BR>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<BR><BR>1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.<BR><BR>2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.<BR><BR>3) Neither the name of the ORGANIZATION nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.<BR><BR>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<BR><BR><BR>MIT license:<BR><BR>Copyright 2011, John Resig<BR>Copyright 2011, The Dojo Foundation<BR>Permission is hereby granted, free of charge, to any person obtaining a copy<BR>of this software and associated documentation files (the "Software"), to deal<BR>in the Software without restriction, including without limitation the rights<BR>to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<BR>copies of the Software, and to permit persons to whom the Software is<BR>furnished to do so, subject to the following conditions:<BR>The above copyright notice and this permission notice shall be included in<BR>all copies or substantial portions of the Software.<BR>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<BR>IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<BR>FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<BR>AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<BR>LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<BR>OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN<BR>THE SOFTWARE.<BR><BR>
</div>
</body></html>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-3
View File
@@ -1,3 +0,0 @@
COMPILER_TOOL = "/cygdrive/c/Program Files (x86)/IAR Systems/IAR EWARMv7.60.1/arm/bin/iccarm.exe"
ARCHIVER_TOOL = "/cygdrive/c/Program Files (x86)/IAR Systems/IAR EWARMv7.60.1/arm/bin/iarchive.exe"
OBJ_MANIP_TOOL = "/cygdrive/c/Program Files (x86)/IAR Systems/IAR EWARMv7.60.1/arm/bin/iobjmanip.exe"
Binary file not shown.
-998
View File
@@ -1,998 +0,0 @@
/******************************************************************************
* Filename: hw_adi_0_rf_h
* Revised: 2016-03-14 09:20:59 +0100 (Mon, 14 Mar 2016)
* Revision: 45924
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1) Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2) Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3) Neither the name of the ORGANIZATION nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#ifndef __HW_ADI_0_RF_H__
#define __HW_ADI_0_RF_H__
//*****************************************************************************
//
// This section defines the register offsets of
// ADI_0_RF component
//
//*****************************************************************************
// Internal
#define ADI_0_RF_O_LNACTL0 0x00000000
// Internal
#define ADI_0_RF_O_LNACTL1 0x00000001
// Internal
#define ADI_0_RF_O_LNACTL2 0x00000002
// Internal
#define ADI_0_RF_O_IFAMPCTL0 0x00000003
// Internal
#define ADI_0_RF_O_IFAMPCTL1 0x00000004
// Internal
#define ADI_0_RF_O_IFAMPCTL2 0x00000005
// Internal
#define ADI_0_RF_O_PACTL0 0x00000006
// Internal
#define ADI_0_RF_O_PACTL1 0x00000007
// Internal
#define ADI_0_RF_O_PACTL2 0x00000008
// Internal
#define ADI_0_RF_O_RFLDO0 0x00000009
// Internal
#define ADI_0_RF_O_RFLDO1 0x0000000A
// Internal
#define ADI_0_RF_O_RFLDO2 0x0000000B
// Internal
#define ADI_0_RF_O_IFADCCTL0 0x0000000C
// Internal
#define ADI_0_RF_O_IFADCLFCFG0 0x0000000D
// Internal
#define ADI_0_RF_O_IFADCLFCFG1 0x0000000E
// Internal
#define ADI_0_RF_O_IFADCDAC 0x0000000F
// Internal
#define ADI_0_RF_O_IFADCQUANT0 0x00000010
// Internal
#define ADI_0_RF_O_IFADCCTL1 0x00000012
// Internal
#define ADI_0_RF_O_IFADCCTL2 0x00000013
// Internal
#define ADI_0_RF_O_IFALDO1 0x00000018
// Internal
#define ADI_0_RF_O_IFALDO2 0x00000019
// Internal
#define ADI_0_RF_O_IFALDO3 0x0000001A
// Internal
#define ADI_0_RF_O_IFDLDO1 0x0000001B
// Internal
#define ADI_0_RF_O_IFDLDO2 0x0000001C
// Internal
#define ADI_0_RF_O_IFDLDO3 0x0000001D
// Internal
#define ADI_0_RF_O_IFAMPCTL3 0x0000001E
// Internal
#define ADI_0_RF_O_STAT 0x0000001F
//*****************************************************************************
//
// Register: ADI_0_RF_O_LNACTL0
//
//*****************************************************************************
// Field: [7:4] MIX_AD
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// MIX_SE_RFN Internal. Only to be used through TI provided API.
// MIX_SE_RFP Internal. Only to be used through TI provided API.
// MIX_DIFF_MODE Internal. Only to be used through TI provided API.
#define ADI_0_RF_LNACTL0_MIX_AD_W 4
#define ADI_0_RF_LNACTL0_MIX_AD_M 0x000000F0
#define ADI_0_RF_LNACTL0_MIX_AD_S 4
#define ADI_0_RF_LNACTL0_MIX_AD_MIX_SE_RFN 0x000000A0
#define ADI_0_RF_LNACTL0_MIX_AD_MIX_SE_RFP 0x00000050
#define ADI_0_RF_LNACTL0_MIX_AD_MIX_DIFF_MODE 0x00000000
// Field: [3:2] LNA_AD
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// LNA_SE_RFN Internal. Only to be used through TI provided API.
// LNA_SE_RFP Internal. Only to be used through TI provided API.
// LNA_DIFF_MODE Internal. Only to be used through TI provided API.
#define ADI_0_RF_LNACTL0_LNA_AD_W 2
#define ADI_0_RF_LNACTL0_LNA_AD_M 0x0000000C
#define ADI_0_RF_LNACTL0_LNA_AD_S 2
#define ADI_0_RF_LNACTL0_LNA_AD_LNA_SE_RFN 0x00000008
#define ADI_0_RF_LNACTL0_LNA_AD_LNA_SE_RFP 0x00000004
#define ADI_0_RF_LNACTL0_LNA_AD_LNA_DIFF_MODE 0x00000000
// Field: [1] BIAS_DIS
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_LNACTL0_BIAS_DIS 0x00000002
#define ADI_0_RF_LNACTL0_BIAS_DIS_M 0x00000002
#define ADI_0_RF_LNACTL0_BIAS_DIS_S 1
// Field: [0] EN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_LNACTL0_EN 0x00000001
#define ADI_0_RF_LNACTL0_EN_M 0x00000001
#define ADI_0_RF_LNACTL0_EN_S 0
#define ADI_0_RF_LNACTL0_EN_EN 0x00000001
#define ADI_0_RF_LNACTL0_EN_DIS 0x00000000
//*****************************************************************************
//
// Register: ADI_0_RF_O_LNACTL1
//
//*****************************************************************************
// Field: [5:4] DEV_CTL
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_LNACTL1_DEV_CTL_W 2
#define ADI_0_RF_LNACTL1_DEV_CTL_M 0x00000030
#define ADI_0_RF_LNACTL1_DEV_CTL_S 4
// Field: [3:0] GAIN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// MAX Internal. Only to be used through TI provided API.
// MAX_MINUS_3 Internal. Only to be used through TI provided API.
// MAX_MINUS_6 Internal. Only to be used through TI provided API.
// MAX_MINUS_9 Internal. Only to be used through TI provided API.
// MAX_MINUS_12 Internal. Only to be used through TI provided API.
#define ADI_0_RF_LNACTL1_GAIN_W 4
#define ADI_0_RF_LNACTL1_GAIN_M 0x0000000F
#define ADI_0_RF_LNACTL1_GAIN_S 0
#define ADI_0_RF_LNACTL1_GAIN_MAX 0x0000000F
#define ADI_0_RF_LNACTL1_GAIN_MAX_MINUS_3 0x00000007
#define ADI_0_RF_LNACTL1_GAIN_MAX_MINUS_6 0x00000003
#define ADI_0_RF_LNACTL1_GAIN_MAX_MINUS_9 0x00000001
#define ADI_0_RF_LNACTL1_GAIN_MAX_MINUS_12 0x00000000
//*****************************************************************************
//
// Register: ADI_0_RF_O_LNACTL2
//
//*****************************************************************************
// Field: [7:6] RXTX_PIN
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_LNACTL2_RXTX_PIN_W 2
#define ADI_0_RF_LNACTL2_RXTX_PIN_M 0x000000C0
#define ADI_0_RF_LNACTL2_RXTX_PIN_S 6
// Field: [4] EXT_BIAS
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_LNACTL2_EXT_BIAS 0x00000010
#define ADI_0_RF_LNACTL2_EXT_BIAS_M 0x00000010
#define ADI_0_RF_LNACTL2_EXT_BIAS_S 4
// Field: [3:0] IB
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_LNACTL2_IB_W 4
#define ADI_0_RF_LNACTL2_IB_M 0x0000000F
#define ADI_0_RF_LNACTL2_IB_S 0
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFAMPCTL0
//
//*****************************************************************************
// Field: [7:3] TRIM
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFAMPCTL0_TRIM_W 5
#define ADI_0_RF_IFAMPCTL0_TRIM_M 0x000000F8
#define ADI_0_RF_IFAMPCTL0_TRIM_S 3
// Field: [2] BIAS_DIS
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFAMPCTL0_BIAS_DIS 0x00000004
#define ADI_0_RF_IFAMPCTL0_BIAS_DIS_M 0x00000004
#define ADI_0_RF_IFAMPCTL0_BIAS_DIS_S 2
// Field: [1] EN_Q
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFAMPCTL0_EN_Q 0x00000002
#define ADI_0_RF_IFAMPCTL0_EN_Q_M 0x00000002
#define ADI_0_RF_IFAMPCTL0_EN_Q_S 1
#define ADI_0_RF_IFAMPCTL0_EN_Q_EN 0x00000002
#define ADI_0_RF_IFAMPCTL0_EN_Q_DIS 0x00000000
// Field: [0] EN_I
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFAMPCTL0_EN_I 0x00000001
#define ADI_0_RF_IFAMPCTL0_EN_I_M 0x00000001
#define ADI_0_RF_IFAMPCTL0_EN_I_S 0
#define ADI_0_RF_IFAMPCTL0_EN_I_EN 0x00000001
#define ADI_0_RF_IFAMPCTL0_EN_I_DIS 0x00000000
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFAMPCTL1
//
//*****************************************************************************
// Field: [5:0] GAIN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// MAX Internal. Only to be used through TI provided API.
// MAX_MINUS_3 Internal. Only to be used through TI provided API.
// MAX_MINUS_6 Internal. Only to be used through TI provided API.
// MAX_MINUS_9 Internal. Only to be used through TI provided API.
// MAX_MINUS_12 Internal. Only to be used through TI provided API.
// MAX_MINUS_15 Internal. Only to be used through TI provided API.
// MAX_MINUS_18 Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFAMPCTL1_GAIN_W 6
#define ADI_0_RF_IFAMPCTL1_GAIN_M 0x0000003F
#define ADI_0_RF_IFAMPCTL1_GAIN_S 0
#define ADI_0_RF_IFAMPCTL1_GAIN_MAX 0x0000003F
#define ADI_0_RF_IFAMPCTL1_GAIN_MAX_MINUS_3 0x0000001F
#define ADI_0_RF_IFAMPCTL1_GAIN_MAX_MINUS_6 0x0000000F
#define ADI_0_RF_IFAMPCTL1_GAIN_MAX_MINUS_9 0x00000007
#define ADI_0_RF_IFAMPCTL1_GAIN_MAX_MINUS_12 0x00000003
#define ADI_0_RF_IFAMPCTL1_GAIN_MAX_MINUS_15 0x00000001
#define ADI_0_RF_IFAMPCTL1_GAIN_MAX_MINUS_18 0x00000000
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFAMPCTL2
//
//*****************************************************************************
// Field: [2:0] ATTN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// MINUS_21 Internal. Only to be used through TI provided API.
// MINUS_18 Internal. Only to be used through TI provided API.
// MINUS_15 Internal. Only to be used through TI provided API.
// MINUS_12 Internal. Only to be used through TI provided API.
// MINUS_9 Internal. Only to be used through TI provided API.
// MINUS_6 Internal. Only to be used through TI provided API.
// MINUS_3 Internal. Only to be used through TI provided API.
// MIN Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFAMPCTL2_ATTN_W 3
#define ADI_0_RF_IFAMPCTL2_ATTN_M 0x00000007
#define ADI_0_RF_IFAMPCTL2_ATTN_S 0
#define ADI_0_RF_IFAMPCTL2_ATTN_MINUS_21 0x00000007
#define ADI_0_RF_IFAMPCTL2_ATTN_MINUS_18 0x00000006
#define ADI_0_RF_IFAMPCTL2_ATTN_MINUS_15 0x00000005
#define ADI_0_RF_IFAMPCTL2_ATTN_MINUS_12 0x00000004
#define ADI_0_RF_IFAMPCTL2_ATTN_MINUS_9 0x00000003
#define ADI_0_RF_IFAMPCTL2_ATTN_MINUS_6 0x00000002
#define ADI_0_RF_IFAMPCTL2_ATTN_MINUS_3 0x00000001
#define ADI_0_RF_IFAMPCTL2_ATTN_MIN 0x00000000
//*****************************************************************************
//
// Register: ADI_0_RF_O_PACTL0
//
//*****************************************************************************
// Field: [7:3] TRIM
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_PACTL0_TRIM_W 5
#define ADI_0_RF_PACTL0_TRIM_M 0x000000F8
#define ADI_0_RF_PACTL0_TRIM_S 3
// Field: [2] PEAKDET_EN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_PACTL0_PEAKDET_EN 0x00000004
#define ADI_0_RF_PACTL0_PEAKDET_EN_M 0x00000004
#define ADI_0_RF_PACTL0_PEAKDET_EN_S 2
#define ADI_0_RF_PACTL0_PEAKDET_EN_EN 0x00000004
#define ADI_0_RF_PACTL0_PEAKDET_EN_DIS 0x00000000
// Field: [1] BIAS_DIS
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_PACTL0_BIAS_DIS 0x00000002
#define ADI_0_RF_PACTL0_BIAS_DIS_M 0x00000002
#define ADI_0_RF_PACTL0_BIAS_DIS_S 1
// Field: [0] EN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_PACTL0_EN 0x00000001
#define ADI_0_RF_PACTL0_EN_M 0x00000001
#define ADI_0_RF_PACTL0_EN_S 0
#define ADI_0_RF_PACTL0_EN_EN 0x00000001
#define ADI_0_RF_PACTL0_EN_DIS 0x00000000
//*****************************************************************************
//
// Register: ADI_0_RF_O_PACTL1
//
//*****************************************************************************
// Field: [7:6] GAIN
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_PACTL1_GAIN_W 2
#define ADI_0_RF_PACTL1_GAIN_M 0x000000C0
#define ADI_0_RF_PACTL1_GAIN_S 6
// Field: [5:0] IB
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_PACTL1_IB_W 6
#define ADI_0_RF_PACTL1_IB_M 0x0000003F
#define ADI_0_RF_PACTL1_IB_S 0
//*****************************************************************************
//
// Register: ADI_0_RF_O_PACTL2
//
//*****************************************************************************
// Field: [7:5] RXTX
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_PACTL2_RXTX_W 3
#define ADI_0_RF_PACTL2_RXTX_M 0x000000E0
#define ADI_0_RF_PACTL2_RXTX_S 5
// Field: [4:3] CM
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_PACTL2_CM_W 2
#define ADI_0_RF_PACTL2_CM_M 0x00000018
#define ADI_0_RF_PACTL2_CM_S 3
// Field: [2:0] AD
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_PACTL2_AD_W 3
#define ADI_0_RF_PACTL2_AD_M 0x00000007
#define ADI_0_RF_PACTL2_AD_S 0
//*****************************************************************************
//
// Register: ADI_0_RF_O_RFLDO0
//
//*****************************************************************************
// Field: [5] ATEST_I_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_RFLDO0_ATEST_I_EN 0x00000020
#define ADI_0_RF_RFLDO0_ATEST_I_EN_M 0x00000020
#define ADI_0_RF_RFLDO0_ATEST_I_EN_S 5
// Field: [4] ATEST_V_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_RFLDO0_ATEST_V_EN 0x00000010
#define ADI_0_RF_RFLDO0_ATEST_V_EN_M 0x00000010
#define ADI_0_RF_RFLDO0_ATEST_V_EN_S 4
// Field: [3] BYPASS_REG_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_RFLDO0_BYPASS_REG_EN 0x00000008
#define ADI_0_RF_RFLDO0_BYPASS_REG_EN_M 0x00000008
#define ADI_0_RF_RFLDO0_BYPASS_REG_EN_S 3
// Field: [2] RDY_EN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_RFLDO0_RDY_EN 0x00000004
#define ADI_0_RF_RFLDO0_RDY_EN_M 0x00000004
#define ADI_0_RF_RFLDO0_RDY_EN_S 2
#define ADI_0_RF_RFLDO0_RDY_EN_EN 0x00000004
#define ADI_0_RF_RFLDO0_RDY_EN_DIS 0x00000000
// Field: [1] BIAS_DIS
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// DIS Internal. Only to be used through TI provided API.
// EN Internal. Only to be used through TI provided API.
#define ADI_0_RF_RFLDO0_BIAS_DIS 0x00000002
#define ADI_0_RF_RFLDO0_BIAS_DIS_M 0x00000002
#define ADI_0_RF_RFLDO0_BIAS_DIS_S 1
#define ADI_0_RF_RFLDO0_BIAS_DIS_DIS 0x00000002
#define ADI_0_RF_RFLDO0_BIAS_DIS_EN 0x00000000
// Field: [0] EN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_RFLDO0_EN 0x00000001
#define ADI_0_RF_RFLDO0_EN_M 0x00000001
#define ADI_0_RF_RFLDO0_EN_S 0
#define ADI_0_RF_RFLDO0_EN_EN 0x00000001
#define ADI_0_RF_RFLDO0_EN_DIS 0x00000000
//*****************************************************************************
//
// Register: ADI_0_RF_O_RFLDO1
//
//*****************************************************************************
// Field: [6:0] TRIM_OUT
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_RFLDO1_TRIM_OUT_W 7
#define ADI_0_RF_RFLDO1_TRIM_OUT_M 0x0000007F
#define ADI_0_RF_RFLDO1_TRIM_OUT_S 0
//*****************************************************************************
//
// Register: ADI_0_RF_O_RFLDO2
//
//*****************************************************************************
// Field: [5:3] COMP_RES
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_RFLDO2_COMP_RES_W 3
#define ADI_0_RF_RFLDO2_COMP_RES_M 0x00000038
#define ADI_0_RF_RFLDO2_COMP_RES_S 3
// Field: [2:0] COMP_CAP
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_RFLDO2_COMP_CAP_W 3
#define ADI_0_RF_RFLDO2_COMP_CAP_M 0x00000007
#define ADI_0_RF_RFLDO2_COMP_CAP_S 0
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFADCCTL0
//
//*****************************************************************************
// Field: [7:4] INT2ADJ
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCCTL0_INT2ADJ_W 4
#define ADI_0_RF_IFADCCTL0_INT2ADJ_M 0x000000F0
#define ADI_0_RF_IFADCCTL0_INT2ADJ_S 4
// Field: [3:2] AAFCAP
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCCTL0_AAFCAP_W 2
#define ADI_0_RF_IFADCCTL0_AAFCAP_M 0x0000000C
#define ADI_0_RF_IFADCCTL0_AAFCAP_S 2
// Field: [1] BIAS_DIS
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// DIS Internal. Only to be used through TI provided API.
// EN Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCCTL0_BIAS_DIS 0x00000002
#define ADI_0_RF_IFADCCTL0_BIAS_DIS_M 0x00000002
#define ADI_0_RF_IFADCCTL0_BIAS_DIS_S 1
#define ADI_0_RF_IFADCCTL0_BIAS_DIS_DIS 0x00000002
#define ADI_0_RF_IFADCCTL0_BIAS_DIS_EN 0x00000000
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFADCLFCFG0
//
//*****************************************************************************
// Field: [7:4] FF1ADJ
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCLFCFG0_FF1ADJ_W 4
#define ADI_0_RF_IFADCLFCFG0_FF1ADJ_M 0x000000F0
#define ADI_0_RF_IFADCLFCFG0_FF1ADJ_S 4
// Field: [3:0] INT3ADJ
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCLFCFG0_INT3ADJ_W 4
#define ADI_0_RF_IFADCLFCFG0_INT3ADJ_M 0x0000000F
#define ADI_0_RF_IFADCLFCFG0_INT3ADJ_S 0
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFADCLFCFG1
//
//*****************************************************************************
// Field: [7:4] FF3ADJ
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCLFCFG1_FF3ADJ_W 4
#define ADI_0_RF_IFADCLFCFG1_FF3ADJ_M 0x000000F0
#define ADI_0_RF_IFADCLFCFG1_FF3ADJ_S 4
// Field: [3:0] FF2ADJ
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCLFCFG1_FF2ADJ_W 4
#define ADI_0_RF_IFADCLFCFG1_FF2ADJ_M 0x0000000F
#define ADI_0_RF_IFADCLFCFG1_FF2ADJ_S 0
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFADCDAC
//
//*****************************************************************************
// Field: [7] MODE
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// RTZ Internal. Only to be used through TI provided API.
// NRTZ Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCDAC_MODE 0x00000080
#define ADI_0_RF_IFADCDAC_MODE_M 0x00000080
#define ADI_0_RF_IFADCDAC_MODE_S 7
#define ADI_0_RF_IFADCDAC_MODE_RTZ 0x00000080
#define ADI_0_RF_IFADCDAC_MODE_NRTZ 0x00000000
// Field: [6:1] TRIM
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCDAC_TRIM_W 6
#define ADI_0_RF_IFADCDAC_TRIM_M 0x0000007E
#define ADI_0_RF_IFADCDAC_TRIM_S 1
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFADCQUANT0
//
//*****************************************************************************
// Field: [3] AUTOCAL_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCQUANT0_AUTOCAL_EN 0x00000008
#define ADI_0_RF_IFADCQUANT0_AUTOCAL_EN_M 0x00000008
#define ADI_0_RF_IFADCQUANT0_AUTOCAL_EN_S 3
// Field: [2:0] TH
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCQUANT0_TH_W 3
#define ADI_0_RF_IFADCQUANT0_TH_M 0x00000007
#define ADI_0_RF_IFADCQUANT0_TH_S 0
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFADCCTL1
//
//*****************************************************************************
// Field: [7:5] DITHERTRIM
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCCTL1_DITHERTRIM_W 3
#define ADI_0_RF_IFADCCTL1_DITHERTRIM_M 0x000000E0
#define ADI_0_RF_IFADCCTL1_DITHERTRIM_S 5
// Field: [4] ADCIEN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCCTL1_ADCIEN 0x00000010
#define ADI_0_RF_IFADCCTL1_ADCIEN_M 0x00000010
#define ADI_0_RF_IFADCCTL1_ADCIEN_S 4
#define ADI_0_RF_IFADCCTL1_ADCIEN_EN 0x00000010
#define ADI_0_RF_IFADCCTL1_ADCIEN_DIS 0x00000000
// Field: [3] ADCQEN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCCTL1_ADCQEN 0x00000008
#define ADI_0_RF_IFADCCTL1_ADCQEN_M 0x00000008
#define ADI_0_RF_IFADCCTL1_ADCQEN_S 3
#define ADI_0_RF_IFADCCTL1_ADCQEN_EN 0x00000008
#define ADI_0_RF_IFADCCTL1_ADCQEN_DIS 0x00000000
// Field: [2:1] DITHEREN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// ENG Internal. Only to be used through TI provided API.
// ENSD Internal. Only to be used through TI provided API.
// ENS Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCCTL1_DITHEREN_W 2
#define ADI_0_RF_IFADCCTL1_DITHEREN_M 0x00000006
#define ADI_0_RF_IFADCCTL1_DITHEREN_S 1
#define ADI_0_RF_IFADCCTL1_DITHEREN_ENG 0x00000006
#define ADI_0_RF_IFADCCTL1_DITHEREN_ENSD 0x00000004
#define ADI_0_RF_IFADCCTL1_DITHEREN_ENS 0x00000002
#define ADI_0_RF_IFADCCTL1_DITHEREN_DIS 0x00000000
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFADCCTL2
//
//*****************************************************************************
// Field: [7] RESETN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// DIS Internal. Only to be used through TI provided API.
// EN Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCCTL2_RESETN 0x00000080
#define ADI_0_RF_IFADCCTL2_RESETN_M 0x00000080
#define ADI_0_RF_IFADCCTL2_RESETN_S 7
#define ADI_0_RF_IFADCCTL2_RESETN_DIS 0x00000080
#define ADI_0_RF_IFADCCTL2_RESETN_EN 0x00000000
// Field: [6] CLKGENEN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCCTL2_CLKGENEN 0x00000040
#define ADI_0_RF_IFADCCTL2_CLKGENEN_M 0x00000040
#define ADI_0_RF_IFADCCTL2_CLKGENEN_S 6
#define ADI_0_RF_IFADCCTL2_CLKGENEN_EN 0x00000040
#define ADI_0_RF_IFADCCTL2_CLKGENEN_DIS 0x00000000
// Field: [5] ADCDIGCLKEN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCCTL2_ADCDIGCLKEN 0x00000020
#define ADI_0_RF_IFADCCTL2_ADCDIGCLKEN_M 0x00000020
#define ADI_0_RF_IFADCCTL2_ADCDIGCLKEN_S 5
#define ADI_0_RF_IFADCCTL2_ADCDIGCLKEN_EN 0x00000020
#define ADI_0_RF_IFADCCTL2_ADCDIGCLKEN_DIS 0x00000000
// Field: [1] INVCLKOUT
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFADCCTL2_INVCLKOUT 0x00000002
#define ADI_0_RF_IFADCCTL2_INVCLKOUT_M 0x00000002
#define ADI_0_RF_IFADCCTL2_INVCLKOUT_S 1
#define ADI_0_RF_IFADCCTL2_INVCLKOUT_EN 0x00000002
#define ADI_0_RF_IFADCCTL2_INVCLKOUT_DIS 0x00000000
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFALDO1
//
//*****************************************************************************
// Field: [4] ERR_AMP_ZERO_EN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFALDO1_ERR_AMP_ZERO_EN 0x00000010
#define ADI_0_RF_IFALDO1_ERR_AMP_ZERO_EN_M 0x00000010
#define ADI_0_RF_IFALDO1_ERR_AMP_ZERO_EN_S 4
#define ADI_0_RF_IFALDO1_ERR_AMP_ZERO_EN_EN 0x00000010
#define ADI_0_RF_IFALDO1_ERR_AMP_ZERO_EN_DIS 0x00000000
// Field: [3] BYPASS_REG_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFALDO1_BYPASS_REG_EN 0x00000008
#define ADI_0_RF_IFALDO1_BYPASS_REG_EN_M 0x00000008
#define ADI_0_RF_IFALDO1_BYPASS_REG_EN_S 3
// Field: [2] RDY_EN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFALDO1_RDY_EN 0x00000004
#define ADI_0_RF_IFALDO1_RDY_EN_M 0x00000004
#define ADI_0_RF_IFALDO1_RDY_EN_S 2
#define ADI_0_RF_IFALDO1_RDY_EN_EN 0x00000004
#define ADI_0_RF_IFALDO1_RDY_EN_DIS 0x00000000
// Field: [1] BIAS_DIS
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// DIS Internal. Only to be used through TI provided API.
// EN Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFALDO1_BIAS_DIS 0x00000002
#define ADI_0_RF_IFALDO1_BIAS_DIS_M 0x00000002
#define ADI_0_RF_IFALDO1_BIAS_DIS_S 1
#define ADI_0_RF_IFALDO1_BIAS_DIS_DIS 0x00000002
#define ADI_0_RF_IFALDO1_BIAS_DIS_EN 0x00000000
// Field: [0] EN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFALDO1_EN 0x00000001
#define ADI_0_RF_IFALDO1_EN_M 0x00000001
#define ADI_0_RF_IFALDO1_EN_S 0
#define ADI_0_RF_IFALDO1_EN_EN 0x00000001
#define ADI_0_RF_IFALDO1_EN_DIS 0x00000000
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFALDO2
//
//*****************************************************************************
// Field: [7:5] COMP_CAP
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFALDO2_COMP_CAP_W 3
#define ADI_0_RF_IFALDO2_COMP_CAP_M 0x000000E0
#define ADI_0_RF_IFALDO2_COMP_CAP_S 5
// Field: [4:0] TRIM_OUT
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFALDO2_TRIM_OUT_W 5
#define ADI_0_RF_IFALDO2_TRIM_OUT_M 0x0000001F
#define ADI_0_RF_IFALDO2_TRIM_OUT_S 0
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFALDO3
//
//*****************************************************************************
// Field: [4] ATEST_V_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFALDO3_ATEST_V_EN 0x00000010
#define ADI_0_RF_IFALDO3_ATEST_V_EN_M 0x00000010
#define ADI_0_RF_IFALDO3_ATEST_V_EN_S 4
// Field: [3] ATEST_I_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFALDO3_ATEST_I_EN 0x00000008
#define ADI_0_RF_IFALDO3_ATEST_I_EN_M 0x00000008
#define ADI_0_RF_IFALDO3_ATEST_I_EN_S 3
// Field: [2:0] COMP_RES
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFALDO3_COMP_RES_W 3
#define ADI_0_RF_IFALDO3_COMP_RES_M 0x00000007
#define ADI_0_RF_IFALDO3_COMP_RES_S 0
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFDLDO1
//
//*****************************************************************************
// Field: [3] BYPASS_REG_EN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFDLDO1_BYPASS_REG_EN 0x00000008
#define ADI_0_RF_IFDLDO1_BYPASS_REG_EN_M 0x00000008
#define ADI_0_RF_IFDLDO1_BYPASS_REG_EN_S 3
#define ADI_0_RF_IFDLDO1_BYPASS_REG_EN_EN 0x00000008
#define ADI_0_RF_IFDLDO1_BYPASS_REG_EN_DIS 0x00000000
// Field: [2] RDY_EN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFDLDO1_RDY_EN 0x00000004
#define ADI_0_RF_IFDLDO1_RDY_EN_M 0x00000004
#define ADI_0_RF_IFDLDO1_RDY_EN_S 2
#define ADI_0_RF_IFDLDO1_RDY_EN_EN 0x00000004
#define ADI_0_RF_IFDLDO1_RDY_EN_DIS 0x00000000
// Field: [1] BIAS_DIS
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// DIS Internal. Only to be used through TI provided API.
// EN Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFDLDO1_BIAS_DIS 0x00000002
#define ADI_0_RF_IFDLDO1_BIAS_DIS_M 0x00000002
#define ADI_0_RF_IFDLDO1_BIAS_DIS_S 1
#define ADI_0_RF_IFDLDO1_BIAS_DIS_DIS 0x00000002
#define ADI_0_RF_IFDLDO1_BIAS_DIS_EN 0x00000000
// Field: [0] EN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFDLDO1_EN 0x00000001
#define ADI_0_RF_IFDLDO1_EN_M 0x00000001
#define ADI_0_RF_IFDLDO1_EN_S 0
#define ADI_0_RF_IFDLDO1_EN_EN 0x00000001
#define ADI_0_RF_IFDLDO1_EN_DIS 0x00000000
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFDLDO2
//
//*****************************************************************************
// Field: [7:5] COMP_CAP
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFDLDO2_COMP_CAP_W 3
#define ADI_0_RF_IFDLDO2_COMP_CAP_M 0x000000E0
#define ADI_0_RF_IFDLDO2_COMP_CAP_S 5
// Field: [4:0] TRIM_OUT
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFDLDO2_TRIM_OUT_W 5
#define ADI_0_RF_IFDLDO2_TRIM_OUT_M 0x0000001F
#define ADI_0_RF_IFDLDO2_TRIM_OUT_S 0
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFDLDO3
//
//*****************************************************************************
// Field: [4] ATEST_V_EN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFDLDO3_ATEST_V_EN 0x00000010
#define ADI_0_RF_IFDLDO3_ATEST_V_EN_M 0x00000010
#define ADI_0_RF_IFDLDO3_ATEST_V_EN_S 4
#define ADI_0_RF_IFDLDO3_ATEST_V_EN_EN 0x00000010
#define ADI_0_RF_IFDLDO3_ATEST_V_EN_DIS 0x00000000
// Field: [3] ATEST_I_EN
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// EN Internal. Only to be used through TI provided API.
// DIS Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFDLDO3_ATEST_I_EN 0x00000008
#define ADI_0_RF_IFDLDO3_ATEST_I_EN_M 0x00000008
#define ADI_0_RF_IFDLDO3_ATEST_I_EN_S 3
#define ADI_0_RF_IFDLDO3_ATEST_I_EN_EN 0x00000008
#define ADI_0_RF_IFDLDO3_ATEST_I_EN_DIS 0x00000000
// Field: [2:0] COMP_RES
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFDLDO3_COMP_RES_W 3
#define ADI_0_RF_IFDLDO3_COMP_RES_M 0x00000007
#define ADI_0_RF_IFDLDO3_COMP_RES_S 0
//*****************************************************************************
//
// Register: ADI_0_RF_O_IFAMPCTL3
//
//*****************************************************************************
// Field: [6:4] AAF_CAP_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFAMPCTL3_AAF_CAP_EN_W 3
#define ADI_0_RF_IFAMPCTL3_AAF_CAP_EN_M 0x00000070
#define ADI_0_RF_IFAMPCTL3_AAF_CAP_EN_S 4
// Field: [3:0] IB
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_IFAMPCTL3_IB_W 4
#define ADI_0_RF_IFAMPCTL3_IB_M 0x0000000F
#define ADI_0_RF_IFAMPCTL3_IB_S 0
//*****************************************************************************
//
// Register: ADI_0_RF_O_STAT
//
//*****************************************************************************
// Field: [7:3] IFADC_CALVAL_OUT
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_STAT_IFADC_CALVAL_OUT_W 5
#define ADI_0_RF_STAT_IFADC_CALVAL_OUT_M 0x000000F8
#define ADI_0_RF_STAT_IFADC_CALVAL_OUT_S 3
// Field: [2] IFADC_CALDONE
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_STAT_IFADC_CALDONE 0x00000004
#define ADI_0_RF_STAT_IFADC_CALDONE_M 0x00000004
#define ADI_0_RF_STAT_IFADC_CALDONE_S 2
// Field: [1] IFLDOS_RDY
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_STAT_IFLDOS_RDY 0x00000002
#define ADI_0_RF_STAT_IFLDOS_RDY_M 0x00000002
#define ADI_0_RF_STAT_IFLDOS_RDY_S 1
// Field: [0] RF_LDO
//
// Internal. Only to be used through TI provided API.
#define ADI_0_RF_STAT_RF_LDO 0x00000001
#define ADI_0_RF_STAT_RF_LDO_M 0x00000001
#define ADI_0_RF_STAT_RF_LDO_S 0
#endif // __ADI_0_RF__
-320
View File
@@ -1,320 +0,0 @@
/******************************************************************************
* Filename: hw_adi_1_synth_h
* Revised: 2016-03-14 09:20:59 +0100 (Mon, 14 Mar 2016)
* Revision: 45924
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1) Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2) Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3) Neither the name of the ORGANIZATION nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#ifndef __HW_ADI_1_SYNTH_H__
#define __HW_ADI_1_SYNTH_H__
//*****************************************************************************
//
// This section defines the register offsets of
// ADI_1_SYNTH component
//
//*****************************************************************************
// Internal
#define ADI_1_SYNTH_O_VCOLDOCTL0 0x00000000
// Internal
#define ADI_1_SYNTH_O_VCOLDOCTL1 0x00000001
// Internal
#define ADI_1_SYNTH_O_VCOLDOCFG 0x00000002
// Internal
#define ADI_1_SYNTH_O_SLDOCTL0 0x00000003
// Internal
#define ADI_1_SYNTH_O_SLDOCTL1 0x00000004
// Internal
#define ADI_1_SYNTH_O_SYNTHCTLINIT 0x00000008
// Internal
#define ADI_1_SYNTH_O_ATESTCTL0 0x00000009
// Internal
#define ADI_1_SYNTH_O_ATESTCTL1 0x0000000A
// Internal
#define ADI_1_SYNTH_O_STAT 0x0000000F
//*****************************************************************************
//
// Register: ADI_1_SYNTH_O_VCOLDOCTL0
//
//*****************************************************************************
// Field: [4] ATEST_V_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_VCOLDOCTL0_ATEST_V_EN 0x00000010
#define ADI_1_SYNTH_VCOLDOCTL0_ATEST_V_EN_M 0x00000010
#define ADI_1_SYNTH_VCOLDOCTL0_ATEST_V_EN_S 4
// Field: [3] BYPASS_REG_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_VCOLDOCTL0_BYPASS_REG_EN 0x00000008
#define ADI_1_SYNTH_VCOLDOCTL0_BYPASS_REG_EN_M 0x00000008
#define ADI_1_SYNTH_VCOLDOCTL0_BYPASS_REG_EN_S 3
// Field: [2] RDY_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_VCOLDOCTL0_RDY_EN 0x00000004
#define ADI_1_SYNTH_VCOLDOCTL0_RDY_EN_M 0x00000004
#define ADI_1_SYNTH_VCOLDOCTL0_RDY_EN_S 2
// Field: [1] BIAS_DIS
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_VCOLDOCTL0_BIAS_DIS 0x00000002
#define ADI_1_SYNTH_VCOLDOCTL0_BIAS_DIS_M 0x00000002
#define ADI_1_SYNTH_VCOLDOCTL0_BIAS_DIS_S 1
// Field: [0] EN
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_VCOLDOCTL0_EN 0x00000001
#define ADI_1_SYNTH_VCOLDOCTL0_EN_M 0x00000001
#define ADI_1_SYNTH_VCOLDOCTL0_EN_S 0
//*****************************************************************************
//
// Register: ADI_1_SYNTH_O_VCOLDOCTL1
//
//*****************************************************************************
// Field: [6] ATEST_I_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_VCOLDOCTL1_ATEST_I_EN 0x00000040
#define ADI_1_SYNTH_VCOLDOCTL1_ATEST_I_EN_M 0x00000040
#define ADI_1_SYNTH_VCOLDOCTL1_ATEST_I_EN_S 6
// Field: [5:0] TRIM_OUT
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_VCOLDOCTL1_TRIM_OUT_W 6
#define ADI_1_SYNTH_VCOLDOCTL1_TRIM_OUT_M 0x0000003F
#define ADI_1_SYNTH_VCOLDOCTL1_TRIM_OUT_S 0
//*****************************************************************************
//
// Register: ADI_1_SYNTH_O_VCOLDOCFG
//
//*****************************************************************************
// Field: [6] DIV_BIAS_DIS
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_VCOLDOCFG_DIV_BIAS_DIS 0x00000040
#define ADI_1_SYNTH_VCOLDOCFG_DIV_BIAS_DIS_M 0x00000040
#define ADI_1_SYNTH_VCOLDOCFG_DIV_BIAS_DIS_S 6
// Field: [5:3] COMP_RES
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_VCOLDOCFG_COMP_RES_W 3
#define ADI_1_SYNTH_VCOLDOCFG_COMP_RES_M 0x00000038
#define ADI_1_SYNTH_VCOLDOCFG_COMP_RES_S 3
// Field: [2:0] COMP_CAP
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_VCOLDOCFG_COMP_CAP_W 3
#define ADI_1_SYNTH_VCOLDOCFG_COMP_CAP_M 0x00000007
#define ADI_1_SYNTH_VCOLDOCFG_COMP_CAP_S 0
//*****************************************************************************
//
// Register: ADI_1_SYNTH_O_SLDOCTL0
//
//*****************************************************************************
// Field: [6] COMP_CAP
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_SLDOCTL0_COMP_CAP 0x00000040
#define ADI_1_SYNTH_SLDOCTL0_COMP_CAP_M 0x00000040
#define ADI_1_SYNTH_SLDOCTL0_COMP_CAP_S 6
// Field: [5] ATEST_I_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_SLDOCTL0_ATEST_I_EN 0x00000020
#define ADI_1_SYNTH_SLDOCTL0_ATEST_I_EN_M 0x00000020
#define ADI_1_SYNTH_SLDOCTL0_ATEST_I_EN_S 5
// Field: [4] ATEST_V_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_SLDOCTL0_ATEST_V_EN 0x00000010
#define ADI_1_SYNTH_SLDOCTL0_ATEST_V_EN_M 0x00000010
#define ADI_1_SYNTH_SLDOCTL0_ATEST_V_EN_S 4
// Field: [2] RDY_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_SLDOCTL0_RDY_EN 0x00000004
#define ADI_1_SYNTH_SLDOCTL0_RDY_EN_M 0x00000004
#define ADI_1_SYNTH_SLDOCTL0_RDY_EN_S 2
// Field: [1] BIAS_DIS
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_SLDOCTL0_BIAS_DIS 0x00000002
#define ADI_1_SYNTH_SLDOCTL0_BIAS_DIS_M 0x00000002
#define ADI_1_SYNTH_SLDOCTL0_BIAS_DIS_S 1
// Field: [0] EN
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_SLDOCTL0_EN 0x00000001
#define ADI_1_SYNTH_SLDOCTL0_EN_M 0x00000001
#define ADI_1_SYNTH_SLDOCTL0_EN_S 0
//*****************************************************************************
//
// Register: ADI_1_SYNTH_O_SLDOCTL1
//
//*****************************************************************************
// Field: [5:0] TRIM_OUT
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_SLDOCTL1_TRIM_OUT_W 6
#define ADI_1_SYNTH_SLDOCTL1_TRIM_OUT_M 0x0000003F
#define ADI_1_SYNTH_SLDOCTL1_TRIM_OUT_S 0
//*****************************************************************************
//
// Register: ADI_1_SYNTH_O_SYNTHCTLINIT
//
//*****************************************************************************
// Field: [1] CLK_EN
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_SYNTHCTLINIT_CLK_EN 0x00000002
#define ADI_1_SYNTH_SYNTHCTLINIT_CLK_EN_M 0x00000002
#define ADI_1_SYNTH_SYNTHCTLINIT_CLK_EN_S 1
// Field: [0] DDI_RESET_N
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_SYNTHCTLINIT_DDI_RESET_N 0x00000001
#define ADI_1_SYNTH_SYNTHCTLINIT_DDI_RESET_N_M 0x00000001
#define ADI_1_SYNTH_SYNTHCTLINIT_DDI_RESET_N_S 0
//*****************************************************************************
//
// Register: ADI_1_SYNTH_O_ATESTCTL0
//
//*****************************************************************************
// Field: [7:0] TESTSEL
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// PEAKDETN_A1 Internal. Only to be used through TI provided API.
// RXOUTQN_A1 Internal. Only to be used through TI provided API.
// RXOUTIN_A1 Internal. Only to be used through TI provided API.
// LDOV_A0 Internal. Only to be used through TI provided API.
// IFADCP_A0 Internal. Only to be used through TI provided API.
// PEAKDETP_A0 Internal. Only to be used through TI provided API.
// RXOUTQP_A0 Internal. Only to be used through TI provided API.
// RXOUTIP_A0 Internal. Only to be used through TI provided API.
// NC Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_ATESTCTL0_TESTSEL_W 8
#define ADI_1_SYNTH_ATESTCTL0_TESTSEL_M 0x000000FF
#define ADI_1_SYNTH_ATESTCTL0_TESTSEL_S 0
#define ADI_1_SYNTH_ATESTCTL0_TESTSEL_PEAKDETN_A1 0x00000080
#define ADI_1_SYNTH_ATESTCTL0_TESTSEL_RXOUTQN_A1 0x00000040
#define ADI_1_SYNTH_ATESTCTL0_TESTSEL_RXOUTIN_A1 0x00000020
#define ADI_1_SYNTH_ATESTCTL0_TESTSEL_LDOV_A0 0x00000010
#define ADI_1_SYNTH_ATESTCTL0_TESTSEL_IFADCP_A0 0x00000008
#define ADI_1_SYNTH_ATESTCTL0_TESTSEL_PEAKDETP_A0 0x00000004
#define ADI_1_SYNTH_ATESTCTL0_TESTSEL_RXOUTQP_A0 0x00000002
#define ADI_1_SYNTH_ATESTCTL0_TESTSEL_RXOUTIP_A0 0x00000001
#define ADI_1_SYNTH_ATESTCTL0_TESTSEL_NC 0x00000000
//*****************************************************************************
//
// Register: ADI_1_SYNTH_O_ATESTCTL1
//
//*****************************************************************************
// Field: [7:2] RESEREVED2
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_ATESTCTL1_RESEREVED2_W 6
#define ADI_1_SYNTH_ATESTCTL1_RESEREVED2_M 0x000000FC
#define ADI_1_SYNTH_ATESTCTL1_RESEREVED2_S 2
// Field: [1:0] TESTSEL
//
// Internal. Only to be used through TI provided API.
// ENUMs:
// LDOITEST_A1 Internal. Only to be used through TI provided API.
// IFADCTESTN_A1 Internal. Only to be used through TI provided API.
// NC Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_ATESTCTL1_TESTSEL_W 2
#define ADI_1_SYNTH_ATESTCTL1_TESTSEL_M 0x00000003
#define ADI_1_SYNTH_ATESTCTL1_TESTSEL_S 0
#define ADI_1_SYNTH_ATESTCTL1_TESTSEL_LDOITEST_A1 0x00000002
#define ADI_1_SYNTH_ATESTCTL1_TESTSEL_IFADCTESTN_A1 0x00000001
#define ADI_1_SYNTH_ATESTCTL1_TESTSEL_NC 0x00000000
//*****************************************************************************
//
// Register: ADI_1_SYNTH_O_STAT
//
//*****************************************************************************
// Field: [2] SYNTH_TUNE_ACK
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_STAT_SYNTH_TUNE_ACK 0x00000004
#define ADI_1_SYNTH_STAT_SYNTH_TUNE_ACK_M 0x00000004
#define ADI_1_SYNTH_STAT_SYNTH_TUNE_ACK_S 2
// Field: [1] SLDO_RDY
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_STAT_SLDO_RDY 0x00000002
#define ADI_1_SYNTH_STAT_SLDO_RDY_M 0x00000002
#define ADI_1_SYNTH_STAT_SLDO_RDY_S 1
// Field: [0] LDOVCO_RDY
//
// Internal. Only to be used through TI provided API.
#define ADI_1_SYNTH_STAT_LDOVCO_RDY 0x00000001
#define ADI_1_SYNTH_STAT_LDOVCO_RDY_M 0x00000001
#define ADI_1_SYNTH_STAT_LDOVCO_RDY_S 0
#endif // __ADI_1_SYNTH__
@@ -1,96 +0,0 @@
/******************************************************************************
* Filename: standalone_rom_crypto.h
* Revised: $Date: 2015-03-19 15:37:11 +0100 (to, 19 mar 2015) $
* Revision: $Revision: 43051 $
*
* Description: Provide a simple initialization the common ROM-RAM system
* needed prior to using the ROM Encryption functions
* (ref. <driverlib/RomEncryption.h>)
*
* Copyright (c) 2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1) Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2) Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3) Neither the name of the ORGANIZATION nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include <stdint.h>
#include <inc/hw_chip_def.h>
// Note: Contents of the HelpFuncTable[] differ between the CC26xx and CC13xx chip family
uint32_t HelpFuncTable[] = {
0 , // [0] => offset 0x00
0 , // [1] => offset 0x04
0 , // [2] => offset 0x08
0x100046f7, // [3] => offset 0x0C
0 , // [4] => offset 0x10
0 // [5] => offset 0x14
};
uint32_t Rom2RomPatchTable[] = {
0x10016975, // [32] => offset 0x80
0x10016979, // [33] => offset 0x84
0x10016985, // [34] => offset 0x88
0x10016a99, // [35] => offset 0x8C
0x10016af5, // [36] => offset 0x90
0x10016b79, // [37] => offset 0x94
0x10016c29, // [38] => offset 0x98
0x10016c45, // [39] => offset 0x9C
0x10016c79, // [40] => offset 0xA0
0x10016d05, // [41] => offset 0xA4
0x10016d29, // [42] => offset 0xA8
0x10016da1, // [43] => offset 0xAC
0x10016dc9, // [44] => offset 0xB0
0x10016e8d, // [45] => offset 0xB4
0x10016ea1, // [46] => offset 0xB8
0x10016ed5, // [47] => offset 0xBC
0x10017365, // [48] => offset 0xC0
0x100174fd, // [49] => offset 0xC4
0x1001767d, // [50] => offset 0xC8
0x10017839, // [51] => offset 0xCC
0x10017895, // [52] => offset 0xD0
0x100178f5, // [53] => offset 0xD4
0x10017771, // [54] => offset 0xD8
0x100175ed, // [55] => offset 0xDC
0x10018b09, // [56] => offset 0xE0
0x10018a99, // [57] => offset 0xE4
0x10018ac5, // [58] => offset 0xE8
0x10018a19, // [59] => offset 0xEC
0x10018a35 // [60] => offset 0xF0
};
uint32_t commonROMScratchArea[ 53 ] @0x20004F2C;
extern void StandaloneRomCryptoInit( void )
{
for ( int i = 0 ; i < ( sizeof( commonROMScratchArea ) / sizeof( uint32_t )) ; i++ ) {
commonROMScratchArea[ i ] = 0;
}
commonROMScratchArea[ 3 ] = ((uint32_t)HelpFuncTable);
commonROMScratchArea[ 4 ] = ((uint32_t)Rom2RomPatchTable) - ( 32 * sizeof( uint32_t ));
}
+148
View File
@@ -0,0 +1,148 @@
/*
* Copyright (c) 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/** ============================================================================
* @file DeviceFamily.h
*
* @brief Infrastructure to select correct driverlib path and identify devices
*
* This module enables the selection of the correct driverlib path for the current
* device. It also facilitates the use of per-device conditional compilation
* to enable minor variations in drivers between devices.
*
* In order to use this functionality, DeviceFamily_XYZ must be defined as one of
* the supported values. The DeviceFamily_ID and DeviceFamily_DIRECTORY defines
* are set based on DeviceFamily_XYZ.
*/
#ifndef ti_devices_DeviceFamily__include
#define ti_devices_DeviceFamily__include
#ifdef __cplusplus
extern "C" {
#endif
/* List of DeviceFamily_ID_XYZ values.
* DeviceFamily_ID may be used in the preprocessor for conditional compilation.
* DeviceFamily_ID is set as one of these IDs is set based on the top
* level DeviceFamily_XYZ define.
*/
#define DeviceFamily_ID_CC26X0 0x00000001
#define DeviceFamily_ID_CC26X0R2 0x00000002
#define DeviceFamily_ID_CC26X2 0x00000004
#define DeviceFamily_ID_CC13X0 0x00000100
#define DeviceFamily_ID_CC13X2 0x00000200
#define DeviceFamily_ID_CC3200 0x00010000
#define DeviceFamily_ID_CC3220 0x00020000
#define DeviceFamily_ID_MSP432P401x 0x01000000
#define DeviceFamily_ID_MSP432P4x1xI 0x02000000
#define DeviceFamily_ID_MSP432P4x1xT 0x04000000
/* Lookup table that sets DeviceFamily_ID and DeviceFamily_DIRECTORY based on the existence
* of a DeviceFamily_XYZ define.
* If DeviceFamily_XYZ is undefined, a compiler error is thrown. If multiple DeviceFamily_XYZ
* are defined, the first one encountered is used.
*
* Currently supported values of DeviceFamily_XYZ are:
* - DeviceFamily_CC26X0
* - DeviceFamily_CC26X0R2
* - DeviceFamily_CC26X2
* - DeviceFamily_CC13X0
* - DeviceFamily_CC13X2
* - DeviceFamily_CC3200
* - DeviceFamily_CC3220
* - DeviceFamily_MSP432P401x
* - DeviceFamily_MSP432P4x1
*/
#if defined(DeviceFamily_CC26X0)
#define DeviceFamily_ID DeviceFamily_ID_CC26X0
#define DeviceFamily_DIRECTORY cc26x0
#elif defined(DeviceFamily_CC26X0R2)
#define DeviceFamily_ID DeviceFamily_ID_CC26X0R2
#define DeviceFamily_DIRECTORY cc26x0r2
#elif defined(DeviceFamily_CC26X2)
#define DeviceFamily_ID DeviceFamily_ID_CC26X2
#define DeviceFamily_DIRECTORY cc26x2
#elif defined(DeviceFamily_CC13X0)
#define DeviceFamily_ID DeviceFamily_ID_CC13X0
#define DeviceFamily_DIRECTORY cc13x0
#elif defined(DeviceFamily_CC13X2)
#define DeviceFamily_ID DeviceFamily_ID_CC13X2
#define DeviceFamily_DIRECTORY cc26x2
#elif defined(DeviceFamily_CC3200)
#define DeviceFamily_ID DeviceFamily_ID_CC3200
#define DeviceFamily_DIRECTORY cc32xx
#elif defined(DeviceFamily_CC3220)
#define DeviceFamily_ID DeviceFamily_ID_CC3220
#define DeviceFamily_DIRECTORY cc32xx
#elif defined(DeviceFamily_MSP432P401x) || defined(__MSP432P401R__)
#define DeviceFamily_ID DeviceFamily_ID_MSP432P401x
#define DeviceFamily_DIRECTORY msp432p4xx
#if !defined(__MSP432P401R__)
#define __MSP432P401R__
#endif
#elif defined(DeviceFamily_MSP432P4x1xI)
#define DeviceFamily_ID DeviceFamily_ID_MSP432P4x1xI
#define DeviceFamily_DIRECTORY msp432p4xx
#if !defined(__MSP432P4111__)
#define __MSP432P4111__
#endif
#elif defined(DeviceFamily_MSP432P4x1xT)
#define DeviceFamily_ID DeviceFamily_ID_MSP432P4x1xT
#define DeviceFamily_DIRECTORY msp432p4xx
#if !defined(__MSP432P4111__)
#define __MSP432P4111__
#endif
#else
#error "DeviceFamily_XYZ undefined. You must defined DeviceFamily_XYZ!"
#endif
/*!
* @brief Macro to include correct driverlib path.
*
* @pre DeviceFamily_XYZ which sets DeviceFamily_DIRECTORY must be defined first.
*
* @param x A token containing the path of the file to include based on the root
* device folder. The preceding forward slash must be omitted.
* For example:
* - #include DeviceFamily_constructPath(inc/hw_memmap.h)
* - #include DeviceFamily_constructPath(driverlib/ssi.h)
*
* @return Returns an include path.
*
*/
#define DeviceFamily_constructPath(x) <ti/devices/DeviceFamily_DIRECTORY/x>
#ifdef __cplusplus
}
#endif
#endif /* ti_devices_DeviceFamily__include */
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: adi.c
* Revised: 2015-12-15 10:40:56 +0100 (Tue, 15 Dec 2015)
* Revision: 45307
* Revised: 2016-11-17 16:39:28 +0100 (Thu, 17 Nov 2016)
* Revision: 47706
*
* Description: Driver for the ADI interface
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,18 +36,18 @@
*
******************************************************************************/
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_aux_smph.h>
#include <driverlib/adi.h>
#include <driverlib/cpu.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_aux_smph.h"
#include "adi.h"
#include "cpu.h"
//*****************************************************************************
//
// SafeHapiVoid() and SafeHapiAuxAdiSelect()
// Common wrapper functions for the Hapi functions needing the "bus arbitration
// issue" workaround.
// Common wrapper functions for the Hapi functions needing workaround for the
// "bus arbitration" issue.
//
//*****************************************************************************
void SafeHapiVoid( FPTR_VOID_VOID_T fPtr )
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: adi.h
* Revised: 2015-11-16 17:05:11 +0100 (Mon, 16 Nov 2015)
* Revision: 45087
* Revised: 2016-11-17 16:39:28 +0100 (Thu, 17 Nov 2016)
* Revision: 47706
*
* Description: Defines and prototypes for the ADI master interface.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,13 +61,13 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_uart.h>
#include <inc/hw_memmap.h>
#include <inc/hw_ints.h>
#include <inc/hw_adi.h>
#include <driverlib/debug.h>
#include <driverlib/ddi.h>
#include "../inc/hw_types.h"
#include "../inc/hw_uart.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_ints.h"
#include "../inc/hw_adi.h"
#include "debug.h"
#include "ddi.h"
//*****************************************************************************
//
@@ -76,18 +76,6 @@ extern "C"
//*****************************************************************************
#define ADI_SLAVE_REGS 16
//*****************************************************************************
//
// Defines that can be passed to the ADIConfigSet()
//
//*****************************************************************************
#define ADI_NO_WAIT 0x00000000
#define ADI_WAIT_FOR_ACK 0x00000004
#define ADI_SPEED_2 0x00000000
#define ADI_SPEED_4 0x00000001
#define ADI_SPEED_8 0x00000002
#define ADI_SPEED_16 0x00000003
#define ADI_CONFIG_MASK 0x00000007
//*****************************************************************************
//
@@ -160,15 +148,11 @@ ADIBaseValid(uint32_t ui32Base)
__STATIC_INLINE void
ADI8RegWrite(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val)
{
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
//
// Write the value to the register.
//
if (ui32Base==AUX_ADI4_BASE) {
AuxAdiDdiSafeWrite(ui32Base + ui32Reg, ui8Val, 1);
} else {
@@ -210,15 +194,11 @@ __STATIC_INLINE void
ADI16RegWrite(uint32_t ui32Base, uint32_t ui32Reg,
uint16_t ui16Val)
{
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
//
// Write the value to the register.
//
if (ui32Base==AUX_ADI4_BASE) {
AuxAdiDdiSafeWrite(ui32Base + (ui32Reg & 0xFE), ui16Val, 2);
} else {
@@ -259,15 +239,11 @@ ADI16RegWrite(uint32_t ui32Base, uint32_t ui32Reg,
__STATIC_INLINE void
ADI32RegWrite(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val)
{
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
//
// Write the value to the register.
//
if (ui32Base==AUX_ADI4_BASE) {
AuxAdiDdiSafeWrite(ui32Base + (ui32Reg & 0xFC), ui32Val, 4);
} else {
@@ -299,15 +275,11 @@ ADI32RegWrite(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val)
__STATIC_INLINE uint32_t
ADI8RegRead(uint32_t ui32Base, uint32_t ui32Reg)
{
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
//
// Read the register and return the value.
//
if (ui32Base==AUX_ADI4_BASE) {
return AuxAdiDdiSafeRead(ui32Base + ui32Reg, 1);
} else {
@@ -342,15 +314,11 @@ ADI8RegRead(uint32_t ui32Base, uint32_t ui32Reg)
__STATIC_INLINE uint32_t
ADI16RegRead(uint32_t ui32Base, uint32_t ui32Reg)
{
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
//
// Read the registers and return the value.
//
if (ui32Base==AUX_ADI4_BASE) {
return AuxAdiDdiSafeRead(ui32Base + (ui32Reg & 0xFE), 2);
} else {
@@ -383,15 +351,11 @@ ADI16RegRead(uint32_t ui32Base, uint32_t ui32Reg)
__STATIC_INLINE uint32_t
ADI32RegRead(uint32_t ui32Base, uint32_t ui32Reg)
{
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
//
// Read the registers and return the value.
//
if (ui32Base==AUX_ADI4_BASE) {
return AuxAdiDdiSafeRead(ui32Base + (ui32Reg & 0xFC), 4);
} else {
@@ -434,21 +398,15 @@ ADI8BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val)
{
uint32_t ui32RegOffset;
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
//
// Get the correct address of the first register used for setting bits
// in the ADI slave.
//
ui32RegOffset = ADI_O_SET;
//
// Set the selected bits.
//
if (ui32Base==AUX_ADI4_BASE) {
AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + ui32Reg, ui8Val, 1);
} else {
@@ -491,21 +449,15 @@ ADI16BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val)
{
uint32_t ui32RegOffset;
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
//
// Get the correct address of the first register used for setting bits
// in the ADI slave.
//
ui32RegOffset = ADI_O_SET;
//
// Set the selected bits.
//
if (ui32Base==AUX_ADI4_BASE) {
AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFE), ui16Val, 2);
} else {
@@ -548,21 +500,15 @@ ADI32BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val)
{
uint32_t ui32RegOffset;
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
//
// Get the correct address of the first register used for setting bits
// in the ADI slave.
//
ui32RegOffset = ADI_O_SET;
//
// Set the selected bits.
//
if (ui32Base==AUX_ADI4_BASE) {
AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFC), ui32Val, 4);
} else {
@@ -605,21 +551,15 @@ ADI8BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val)
{
uint32_t ui32RegOffset;
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
//
// Get the correct address of the first register used for setting bits
// in the ADI slave.
//
ui32RegOffset = ADI_O_CLR;
//
// Set the selected bits.
//
if (ui32Base==AUX_ADI4_BASE) {
AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + ui32Reg, ui8Val, 1);
} else {
@@ -662,21 +602,15 @@ ADI16BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val)
{
uint32_t ui32RegOffset;
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
//
// Get the correct address of the first register used for setting bits
// in the ADI slave.
//
ui32RegOffset = ADI_O_CLR;
//
// Set the selected bits.
//
if (ui32Base==AUX_ADI4_BASE) {
AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFE), ui16Val, 2);
} else {
@@ -719,21 +653,15 @@ ADI32BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val)
{
uint32_t ui32RegOffset;
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
//
// Get the correct address of the first register used for setting bits
// in the ADI slave.
//
ui32RegOffset = ADI_O_CLR;
//
// Set the selected bits.
//
if (ui32Base==AUX_ADI4_BASE) {
AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + (ui32Reg & 0xFC), ui32Val, 4);
} else {
@@ -780,23 +708,17 @@ ADI4SetValBit(uint32_t ui32Base, uint32_t ui32Reg, bool bWriteHigh,
{
uint32_t ui32RegOffset;
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
ASSERT(!(ui8Val & 0xF0));
ASSERT(!(ui8Mask & 0xF0));
//
// Get the correct address of the first register used for setting bits
// in the ADI slave.
//
ui32RegOffset = ADI_O_MASK4B + (ui32Reg << 1) + (bWriteHigh ? 1 : 0);
//
// Set the selected bits.
//
if (ui32Base==AUX_ADI4_BASE) {
AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui8Mask << 4) | ui8Val, 1);
} else {
@@ -838,23 +760,17 @@ ADI8SetValBit(uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Mask,
{
uint32_t ui32RegOffset;
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
ASSERT(!(ui16Val & 0xFF00));
ASSERT(!(ui16Mask & 0xFF00));
//
// Get the correct address of the first register used for setting bits
// in the ADI slave.
//
ui32RegOffset = ADI_O_MASK8B + (ui32Reg << 1);
//
// Set the selected bits.
//
if (ui32Base==AUX_ADI4_BASE) {
AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui16Mask << 8) | ui16Val, 2);
} else {
@@ -897,23 +813,17 @@ ADI16SetValBit(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask,
{
uint32_t ui32RegOffset;
//
// Check the arguments.
//
ASSERT(ADIBaseValid(ui32Base));
ASSERT(ui32Reg < ADI_SLAVE_REGS);
ASSERT(!(ui32Val & 0xFFFF0000));
ASSERT(!(ui32Mask & 0xFFFF0000));
//
// Get the correct address of the first register used for setting bits
// in the ADI slave.
//
ui32RegOffset = ADI_O_MASK16B + ((ui32Reg << 1) & 0xFC);
//
// Set the selected bits.
//
if (ui32Base==AUX_ADI4_BASE) {
AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui32Mask << 16) | ui32Val, 4);
} else {
@@ -921,6 +831,16 @@ ADI16SetValBit(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask,
}
}
//*****************************************************************************
//
// SafeHapiVoid() and SafeHapiAuxAdiSelect()
// Common wrapper functions for the Hapi functions needing workaround for the
// "bus arbitration" issue.
//
//*****************************************************************************
void SafeHapiVoid( FPTR_VOID_VOID_T fPtr );
void SafeHapiAuxAdiSelect( FPTR_VOID_UINT8_T fPtr, uint8_t ut8Signal );
//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
@@ -3,7 +3,7 @@
* Revised: 2016-03-30 13:03:59 +0200 (Wed, 30 Mar 2016)
* Revision: 45971
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aon_batmon.c
* Revised: 2015-12-07 16:22:56 +0100 (Mon, 07 Dec 2015)
* Revision: 45269
* Revised: 2016-10-06 17:21:09 +0200 (Thu, 06 Oct 2016)
* Revision: 47343
*
* Description: Driver for the AON Battery and Temperature Monitor
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,8 +36,8 @@
*
******************************************************************************/
#include <driverlib/aon_batmon.h>
#include <inc/hw_fcfg1.h>
#include "aon_batmon.h"
#include "../inc/hw_fcfg1.h"
//*****************************************************************************
//
@@ -63,17 +63,13 @@ AONBatMonTemperatureGetDegC( void )
int32_t tempCorrection ; // Voltage dependent temp correction with 8 fractional bits
int8_t voltageSlope ; // Signed byte value representing the TEMP slope with battery voltage, in degrees C/V, with 4 fractional bits.
//
// Shift left then right to sign extend the BATMON_TEMP field
//
signedTemp = ((((int32_t)HWREG( AON_BATMON_BASE + AON_BATMON_O_TEMP ))
<< ( 32 - AON_BATMON_TEMP_INT_W - AON_BATMON_TEMP_INT_S ))
>> ( 32 - AON_BATMON_TEMP_INT_W - AON_BATMON_TEMP_INT_S ));
//
// Typecasting voltageSlope to int8_t prior to assignment in order to make sure sign extension works properly
// Using byte read (HWREGB) in order to make more efficient code since voltageSlope is assigned to bits[7:0] of FCFG1_O_MISC_TRIM
//
voltageSlope = ((int8_t)HWREGB( FCFG1_BASE + FCFG1_O_MISC_TRIM ));
tempCorrection = (( voltageSlope * (((int32_t)HWREG( AON_BATMON_BASE + AON_BATMON_O_BAT )) - 0x300 )) >> 4 );
@@ -1,12 +1,12 @@
/******************************************************************************
* Filename: aon_batmon.h
* Revised: 2016-05-27 12:47:19 +0200 (Fri, 27 May 2016)
* Revision: 46535
* Revised: 2016-10-06 17:21:09 +0200 (Thu, 06 Oct 2016)
* Revision: 47343
*
* Description: Defines and prototypes for the AON Battery and Temperature
* Monitor
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -62,10 +62,10 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_aon_batmon.h>
#include <driverlib/debug.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_aon_batmon.h"
#include "debug.h"
//*****************************************************************************
//
@@ -122,9 +122,7 @@ extern "C"
__STATIC_INLINE void
AONBatMonEnable(void)
{
//
// Enable the measurements.
//
HWREG(AON_BATMON_BASE + AON_BATMON_O_CTL) =
AON_BATMON_CTL_CALC_EN |
AON_BATMON_CTL_MEAS_EN;
@@ -143,9 +141,7 @@ AONBatMonEnable(void)
__STATIC_INLINE void
AONBatMonDisable(void)
{
//
// Disable the measurements.
//
HWREG(AON_BATMON_BASE + AON_BATMON_O_CTL) = 0;
}
@@ -194,9 +190,7 @@ AONBatMonBatteryVoltageGet(void)
ui32CurrentBattery = HWREG(AON_BATMON_BASE + AON_BATMON_O_BAT);
//
// Return the current battery voltage measurement.
//
return (ui32CurrentBattery >> AON_BATMON_BAT_FRAC_S);
}
@@ -225,23 +219,17 @@ AONBatMonNewBatteryMeasureReady(void)
{
bool bStatus;
//
// Check the status bit.
//
bStatus = HWREG(AON_BATMON_BASE + AON_BATMON_O_BATUPD) &
AON_BATMON_BATUPD_STAT ? true : false;
//
// Clear status bit if set.
//
if(bStatus)
{
HWREG(AON_BATMON_BASE + AON_BATMON_O_BATUPD) = 1;
}
//
// Return status.
//
return (bStatus);
}
@@ -270,23 +258,17 @@ AONBatMonNewTempMeasureReady(void)
{
bool bStatus;
//
// Check the status bit.
//
bStatus = HWREG(AON_BATMON_BASE + AON_BATMON_O_TEMPUPD) &
AON_BATMON_TEMPUPD_STAT ? true : false;
//
// Clear status bit if set.
//
if(bStatus)
{
HWREG(AON_BATMON_BASE + AON_BATMON_O_TEMPUPD) = 1;
}
//
// Return status.
//
return (bStatus);
}
@@ -297,7 +279,7 @@ AONBatMonNewTempMeasureReady(void)
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include <driverlib/rom.h>
#include "../driverlib/rom.h"
#ifdef ROM_AONBatMonTemperatureGetDegC
#undef AONBatMonTemperatureGetDegC
#define AONBatMonTemperatureGetDegC ROM_AONBatMonTemperatureGetDegC
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aon_event.c
* Revised: 2016-03-04 16:49:38 +0100 (Fri, 04 Mar 2016)
* Revision: 45874
* Revised: 2017-04-26 16:53:03 +0200 (Wed, 26 Apr 2017)
* Revision: 48850
*
* Description: Driver for the AON Event fabric.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,7 @@
*
******************************************************************************/
#include <driverlib/aon_event.h>
#include "aon_event.h"
//*****************************************************************************
//
@@ -61,7 +61,7 @@
//*****************************************************************************
//
//! Select event source for the specified MCU wakeup programmable event
// Select event source for the specified MCU wakeup programmable event
//
//*****************************************************************************
void
@@ -69,9 +69,7 @@ AONEventMcuWakeUpSet(uint32_t ui32MCUWUEvent, uint32_t ui32EventSrc)
{
uint32_t ui32Ctrl;
//
// Check the arguments.
//
ASSERT((ui32MCUWUEvent == AON_EVENT_MCU_WU0) ||
(ui32MCUWUEvent == AON_EVENT_MCU_WU1) ||
(ui32MCUWUEvent == AON_EVENT_MCU_WU2) ||
@@ -106,7 +104,7 @@ AONEventMcuWakeUpSet(uint32_t ui32MCUWUEvent, uint32_t ui32EventSrc)
//*****************************************************************************
//
//! Get event source for the specified MCU wakeup programmable event
// Get event source for the specified MCU wakeup programmable event
//
//*****************************************************************************
uint32_t
@@ -114,9 +112,7 @@ AONEventMcuWakeUpGet(uint32_t ui32MCUWUEvent)
{
uint32_t ui32EventSrc;
//
// Check the arguments.
//
ASSERT((ui32MCUWUEvent == AON_EVENT_MCU_WU0) ||
(ui32MCUWUEvent == AON_EVENT_MCU_WU1) ||
(ui32MCUWUEvent == AON_EVENT_MCU_WU2) ||
@@ -145,16 +141,14 @@ AONEventMcuWakeUpGet(uint32_t ui32MCUWUEvent)
AON_EVENT_MCUWUSEL_WU3_EV_S);
}
//
// Should never get to this statement, but suppress warning.
//
ASSERT(0);
return(0);
}
//*****************************************************************************
//
//! Select event source for the specified AUX wakeup programmable event
// Select event source for the specified AUX wakeup programmable event
//
//*****************************************************************************
void
@@ -162,9 +156,7 @@ AONEventAuxWakeUpSet(uint32_t ui32AUXWUEvent, uint32_t ui32EventSrc)
{
uint32_t ui32Ctrl;
//
// Check the arguments.
//
ASSERT((ui32AUXWUEvent == AON_EVENT_AUX_WU0) ||
(ui32AUXWUEvent == AON_EVENT_AUX_WU1) ||
(ui32AUXWUEvent == AON_EVENT_AUX_WU2));
@@ -193,7 +185,7 @@ AONEventAuxWakeUpSet(uint32_t ui32AUXWUEvent, uint32_t ui32EventSrc)
//*****************************************************************************
//
//! Get event source for the specified AUX wakeup programmable event
// Get event source for the specified AUX wakeup programmable event
//
//*****************************************************************************
uint32_t
@@ -201,9 +193,7 @@ AONEventAuxWakeUpGet(uint32_t ui32AUXWUEvent)
{
uint32_t ui32EventSrc;
//
// Check the arguments.
//
ASSERT((ui32AUXWUEvent == AON_EVENT_AUX_WU0) ||
(ui32AUXWUEvent == AON_EVENT_AUX_WU1) ||
(ui32AUXWUEvent == AON_EVENT_AUX_WU2));
@@ -226,17 +216,15 @@ AONEventAuxWakeUpGet(uint32_t ui32AUXWUEvent)
AON_EVENT_AUXWUSEL_WU2_EV_S);
}
//
// Should never get to this statement, but suppress warning.
//
ASSERT(0);
return(0);
}
//*****************************************************************************
//
//! Select event source for the specified programmable event forwarded to the
//! MCU event fabric
// Select event source for the specified programmable event forwarded to the
// MCU event fabric
//
//*****************************************************************************
void
@@ -244,9 +232,7 @@ AONEventMcuSet(uint32_t ui32MCUEvent, uint32_t ui32EventSrc)
{
uint32_t ui32Ctrl;
//
// Check the arguments.
//
ASSERT((ui32MCUEvent == AON_EVENT_MCU_EVENT0) ||
(ui32MCUEvent == AON_EVENT_MCU_EVENT1) ||
(ui32MCUEvent == AON_EVENT_MCU_EVENT2));
@@ -275,8 +261,8 @@ AONEventMcuSet(uint32_t ui32MCUEvent, uint32_t ui32EventSrc)
//*****************************************************************************
//
//! Get source for the specified programmable event forwarded to the MCU event
//! fabric.
// Get source for the specified programmable event forwarded to the MCU event
// fabric.
//
//*****************************************************************************
uint32_t
@@ -284,9 +270,7 @@ AONEventMcuGet(uint32_t ui32MCUEvent)
{
uint32_t ui32EventSrc;
//
// Check the arguments.
//
ASSERT((ui32MCUEvent == AON_EVENT_MCU_EVENT0) ||
(ui32MCUEvent == AON_EVENT_MCU_EVENT1) ||
(ui32MCUEvent == AON_EVENT_MCU_EVENT2));
@@ -309,9 +293,7 @@ AONEventMcuGet(uint32_t ui32MCUEvent)
AON_EVENT_EVTOMCUSEL_AON_PROG2_EV_S);
}
//
// Should never get to this statement, but suppress warning.
//
ASSERT(0);
return(0);
}
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aon_event.h
* Revised: 2016-03-11 19:08:58 +0100 (Fri, 11 Mar 2016)
* Revision: 45917
* Revised: 2017-04-26 16:53:03 +0200 (Wed, 26 Apr 2017)
* Revision: 48850
*
* Description: Defines and prototypes for the AON Event fabric.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,11 +61,11 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_device.h>
#include <inc/hw_aon_event.h>
#include <driverlib/debug.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_device.h"
#include "../inc/hw_aon_event.h"
#include "debug.h"
//*****************************************************************************
//
@@ -95,10 +95,10 @@ extern "C"
// Note: Events are level-triggered active high
//
//*****************************************************************************
// AON_EVENT_DIO0 // Edge detect on DIO0. See hw_device.h for DIO-to-PAD mapping.
// AON_EVENT_DIO0 // Edge detect on DIO0. See hw_device.h
// ... // ...
// AON_EVENT_DIO31 // Edge detect on DIO31. See hw_device.h for DIO-to-PAD mapping.
#define AON_EVENT_IO 32 // Edge detect on any DIO
// AON_EVENT_DIO31 // Edge detect on DIO31. See hw_device.h
#define AON_EVENT_IO 32 // Edge detect on any DIO. Edge detect is enabled and configured in IOC.
// Event ID 33 is reserved for future use
// Event ID 34 is reserved for future use
#define AON_EVENT_RTC_CH0 35 // RTC channel 0
@@ -126,9 +126,7 @@ extern "C"
// Event ID 57-62 is reserved for future use
#define AON_EVENT_NONE 63 // No event, always low
//
// Keeping backward compatibility until major revision number is incremented
//
#define AON_EVENT_RTC0 ( AON_EVENT_RTC_CH0 )
//*****************************************************************************
@@ -137,19 +135,19 @@ extern "C"
// by AONEventMCUWakeUpGet().
//
//*****************************************************************************
#define AON_EVENT_MCU_WU0 0 // Programmable MCU wakeup event 0
#define AON_EVENT_MCU_WU1 1 // Programmable MCU wakeup event 1
#define AON_EVENT_MCU_WU2 2 // Programmable MCU wakeup event 2
#define AON_EVENT_MCU_WU3 3 // Programmable MCU wakeup event 3
#define AON_EVENT_MCU_WU0 0 // Programmable MCU wake-up event 0
#define AON_EVENT_MCU_WU1 1 // Programmable MCU wake-up event 1
#define AON_EVENT_MCU_WU2 2 // Programmable MCU wake-up event 2
#define AON_EVENT_MCU_WU3 3 // Programmable MCU wake-up event 3
//*****************************************************************************
//
// Values that can be passed to AONEventAuxWakeUpSet() and AONEventAuxWakeUpGet()
//
//*****************************************************************************
#define AON_EVENT_AUX_WU0 0 // Programmable AUX wakeup event 0
#define AON_EVENT_AUX_WU1 1 // Programmable AUX wakeup event 1
#define AON_EVENT_AUX_WU2 2 // Programmable AUX wakeup event 2
#define AON_EVENT_AUX_WU0 0 // Programmable AUX wake-up event 0
#define AON_EVENT_AUX_WU1 1 // Programmable AUX wake-up event 1
#define AON_EVENT_AUX_WU2 2 // Programmable AUX wake-up event 2
//*****************************************************************************
//
@@ -168,15 +166,15 @@ extern "C"
//*****************************************************************************
//
//! \brief Select event source for the specified MCU wakeup programmable event.
//! \brief Select event source for the specified MCU wake-up programmable event.
//!
//! The AON event fabric has a total of four programmable events that can
//! wake-up the MCU. The events are forwarded to the wakeup controller (WUC).
//! The AON event fabric has several programmable events that can
//! wake up the MCU. The events are forwarded to the wake-up controller (WUC).
//!
//! \note The four programmable event sources are effectively OR'ed together
//! \note The programmable event sources are effectively OR'ed together
//! to form a single wake-up event forwarded to the WUC.
//!
//! \param ui32MCUWUEvent is one of four programmable MCU wakeup event sources.
//! \param ui32MCUWUEvent is one of the programmable MCU wake-up event sources.
//! - \ref AON_EVENT_MCU_WU0
//! - \ref AON_EVENT_MCU_WU1
//! - \ref AON_EVENT_MCU_WU2
@@ -185,7 +183,7 @@ extern "C"
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
@@ -220,23 +218,19 @@ extern void AONEventMcuWakeUpSet(uint32_t ui32MCUWUEvent,
//*****************************************************************************
//
//! \brief Get event source for the specified MCU wakeup programmable event.
//! \brief Get event source for the specified MCU wake-up programmable event.
//!
//! The AON event fabric has a total of four programmable events that can
//! wake-up the MCU. The events are forwarded to the wakeup controller (WUC).
//!
//! \param ui32MCUWUEvent is one of four programmable MCU wakeup event sources.
//! \param ui32MCUWUEvent is one of the programmable MCU wake-up event sources.
//! - \ref AON_EVENT_MCU_WU0
//! - \ref AON_EVENT_MCU_WU1
//! - \ref AON_EVENT_MCU_WU2
//! - \ref AON_EVENT_MCU_WU3
//!
//! \return Returns an event source for the event AON fabric, i.e. one of the
//! following:
//! \return Returns the event source for the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
@@ -268,16 +262,16 @@ extern uint32_t AONEventMcuWakeUpGet(uint32_t ui32MCUWUEvent);
//*****************************************************************************
//
//! \brief Select event source for the specified AUX wakeup programmable event.
//! \brief Select event source for the specified AUX wake-up programmable event.
//!
//! The AON event fabric has a total of three programmable events that can
//! wake-up the AUX domain. The events are forwarded to the wakeup
//! wake-up the AUX domain. The events are forwarded to the wake-up
//! controller (WUC).
//!
//! \note The three programmable event sources are effectively OR'ed together
//! to form a single wake-up event forwarded to the WUC.
//!
//! \param ui32AUXWUEvent is one of three programmable AUX wakeup event sources.
//! \param ui32AUXWUEvent is one of three programmable AUX wake-up event sources.
//! - \ref AON_EVENT_AUX_WU0
//! - \ref AON_EVENT_AUX_WU1
//! - \ref AON_EVENT_AUX_WU2
@@ -285,7 +279,7 @@ extern uint32_t AONEventMcuWakeUpGet(uint32_t ui32MCUWUEvent);
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
@@ -320,22 +314,22 @@ extern void AONEventAuxWakeUpSet(uint32_t ui32AUXWUEvent,
//*****************************************************************************
//
//! \brief Get event source for the specified AUX wakeup programmable event.
//! \brief Get event source for the specified AUX wake-up programmable event.
//!
//! The AON event fabric has a total of three programmable events that can
//! wake-up the AUX domain. The events are forwarded to the wakeup
//! wake-up the AUX domain. The events are forwarded to the wake-up
//! controller (WUC).
//!
//! \param ui32AUXWUEvent is one of three programmable AUX wakeup event sources.
//! \param ui32AUXWUEvent is one of three programmable AUX wake-up event sources.
//! - \ref AON_EVENT_AUX_WU0
//! - \ref AON_EVENT_AUX_WU1
//! - \ref AON_EVENT_AUX_WU2
//!
//! \return Returns an event source for the event AON fabric, i.e. one of the following:
//! \return Returns the event source for the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
@@ -384,11 +378,11 @@ extern uint32_t AONEventAuxWakeUpGet(uint32_t ui32AUXWUEvent);
//! - \ref AON_EVENT_MCU_EVENT0
//! - \ref AON_EVENT_MCU_EVENT1
//! - \ref AON_EVENT_MCU_EVENT2
//! \param ui32EventSrc is event sources for the event AON fabric.
//! \param ui32EventSrc is an event source for the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
@@ -434,11 +428,11 @@ extern void AONEventMcuSet(uint32_t ui32MCUEvent, uint32_t ui32EventSrc);
//! - \ref AON_EVENT_MCU_EVENT1
//! - \ref AON_EVENT_MCU_EVENT2
//!
//! \return Returns an event source for the event AON fabric, i.e. one of the following:
//! \return Returns the event source for the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
@@ -475,11 +469,11 @@ extern uint32_t AONEventMcuGet(uint32_t ui32MCUEvent);
//! A programmable event can be forwarded to the AON real time clock
//! for triggering a capture event on RTC channel 1.
//!
//! \param ui32EventSrc is the event sources for the event AON fabric.
//! \param ui32EventSrc is an event source for the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
@@ -514,9 +508,7 @@ AONEventRtcSet(uint32_t ui32EventSrc)
{
uint32_t ui32Ctrl;
//
// Check the arguments.
//
ASSERT(ui32EventSrc <= AON_EVENT_NONE);
ui32Ctrl = HWREG(AON_EVENT_BASE + AON_EVENT_O_RTCSEL);
@@ -533,11 +525,11 @@ AONEventRtcSet(uint32_t ui32EventSrc)
//! A programmable event can be forwarded to the AON real time clock
//! for triggering a capture event on RTC channel 1.
//!
//! \return Returns an event source to the event AON fabric, i.e. one of the following:
//! \return Returns the event source to the event AON fabric.
//! - AON_EVENT_DIO0 : Edge detect on DIO0. See hw_device.h
//! - ...
//! - AON_EVENT_DIO31 : Edge detect on DIO31. See hw_device.h
//! - \ref AON_EVENT_IO : Edge detect on any DIO
//! - \ref AON_EVENT_IO : Edge detect on any DIO. Edge detect is enabled and configured in IOC.
//! - \ref AON_EVENT_RTC_CH0 : RTC channel 0
//! - \ref AON_EVENT_RTC_CH1 : RTC channel 1
//! - \ref AON_EVENT_RTC_CH2 : RTC channel 2
@@ -570,9 +562,7 @@ AONEventRtcGet(void)
{
uint32_t ui32EventSrc;
//
// Return the active event.
//
ui32EventSrc = HWREG(AON_EVENT_BASE + AON_EVENT_O_RTCSEL);
return ((ui32EventSrc & AON_EVENT_RTCSEL_RTC_CH1_CAPT_EV_M) >>
@@ -586,7 +576,7 @@ AONEventRtcGet(void)
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include <driverlib/rom.h>
#include "../driverlib/rom.h"
#ifdef ROM_AONEventMcuWakeUpSet
#undef AONEventMcuWakeUpSet
#define AONEventMcuWakeUpSet ROM_AONEventMcuWakeUpSet
@@ -1,9 +1,9 @@
/******************************************************************************
* Filename: aon_event_doc.h
* Revised: 2016-03-30 13:03:59 +0200 (Wed, 30 Mar 2016)
* Revision: 45971
* Revised: 2016-07-07 19:12:02 +0200 (Thu, 07 Jul 2016)
* Revision: 46848
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aon_ioc.c
* Revised: 2015-09-08 10:21:22 +0200 (Tue, 08 Sep 2015)
* Revision: 44526
* Revised: 2016-10-06 17:21:09 +0200 (Thu, 06 Oct 2016)
* Revision: 47343
*
* Description: Driver for the AON IO Controller
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,4 +36,4 @@
*
******************************************************************************/
#include <driverlib/aon_ioc.h>
#include "aon_ioc.h"
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aon_ioc.h
* Revised: 2015-09-08 16:38:55 +0200 (Tue, 08 Sep 2015)
* Revision: 44531
* Revised: 2016-10-06 17:21:09 +0200 (Thu, 06 Oct 2016)
* Revision: 47343
*
* Description: Defines and prototypes for the AON IO Controller
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,10 +61,10 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_aon_ioc.h>
#include <driverlib/debug.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_aon_ioc.h"
#include "debug.h"
//*****************************************************************************
//
@@ -145,9 +145,7 @@ AONIOCDriveStrengthSet(uint32_t ui32DriveLevel, uint32_t ui32DriveStrength)
(ui32DriveStrength == AONIOC_DRV_STR_7) ||
(ui32DriveStrength == AONIOC_DRV_STR_8));
//
// Set the drive strength.
//
HWREG(AON_IOC_BASE + ui32DriveLevel) = ui32DriveStrength;
}
@@ -182,16 +180,12 @@ AONIOCDriveStrengthSet(uint32_t ui32DriveLevel, uint32_t ui32DriveStrength)
__STATIC_INLINE uint32_t
AONIOCDriveStrengthGet(uint32_t ui32DriveLevel)
{
//
// Check the arguments.
//
ASSERT((ui32DriveLevel == AONIOC_DRV_LVL_MIN) ||
(ui32DriveLevel == AONIOC_DRV_LVL_MED) ||
(ui32DriveLevel == AONIOC_DRV_LVL_MAX));
//
// Return the drive strength value.
//
return( HWREG(AON_IOC_BASE + ui32DriveLevel) );
}
@@ -213,9 +207,7 @@ AONIOCDriveStrengthGet(uint32_t ui32DriveLevel)
__STATIC_INLINE void
AONIOCFreezeEnable(void)
{
//
// Set the AON IO latches as static.
//
HWREG(AON_IOC_BASE + AON_IOC_O_IOCLATCH) = 0x0;
}
@@ -236,9 +228,7 @@ AONIOCFreezeEnable(void)
__STATIC_INLINE void
AONIOCFreezeDisable(void)
{
//
// Set the AON IOC latches as transparent.
//
HWREG(AON_IOC_BASE + AON_IOC_O_IOCLATCH) = AON_IOC_IOCLATCH_EN;
}
@@ -258,9 +248,7 @@ AONIOCFreezeDisable(void)
__STATIC_INLINE void
AONIOC32kHzOutputDisable(void)
{
//
// Disable the LF clock output.
//
HWREG(AON_IOC_BASE + AON_IOC_O_CLK32KCTL) = AON_IOC_CLK32KCTL_OE_N;
}
@@ -280,9 +268,7 @@ AONIOC32kHzOutputDisable(void)
__STATIC_INLINE void
AONIOC32kHzOutputEnable(void)
{
//
// Enable the LF clock output.
//
HWREG(AON_IOC_BASE + AON_IOC_O_CLK32KCTL) = 0x0;
}
@@ -3,7 +3,7 @@
* Revised: 2016-03-30 11:01:30 +0200 (Wed, 30 Mar 2016)
* Revision: 45969
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aon_rtc.c
* Revised: 2016-02-29 13:43:37 +0100 (Mon, 29 Feb 2016)
* Revision: 45791
* Revised: 2016-10-06 17:21:09 +0200 (Thu, 06 Oct 2016)
* Revision: 47343
*
* Description: Driver for the AON RTC.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,8 +36,8 @@
*
******************************************************************************/
#include <driverlib/aon_rtc.h>
#include <driverlib/cpu.h>
#include "aon_rtc.h"
#include "cpu.h"
//*****************************************************************************
//
@@ -65,10 +65,8 @@ AONRTCCurrentCompareValueGet( void )
uint32_t ui32CurrentSubSec ;
uint32_t ui32SecondSecRead ;
//
// Reading SEC both before and after SUBSEC in order to detect if SEC incremented while reading SUBSEC
// If SEC incremented, we can't be sure which SEC the SUBSEC belongs to, so repeating the sequence then.
//
do {
ui32CurrentSec = HWREG( AON_RTC_BASE + AON_RTC_O_SEC );
ui32CurrentSubSec = HWREG( AON_RTC_BASE + AON_RTC_O_SUBSEC );
@@ -92,10 +90,8 @@ AONRTCCurrent64BitValueGet( void )
} currentRtc ;
uint32_t ui32SecondSecRead ;
//
// Reading SEC both before and after SUBSEC in order to detect if SEC incremented while reading SUBSEC
// If SEC incremented, we can't be sure which SEC the SUBSEC belongs to, so repeating the sequence then.
//
do {
currentRtc.secAndSubSec[ 1 ] = HWREG( AON_RTC_BASE + AON_RTC_O_SEC );
currentRtc.secAndSubSec[ 0 ] = HWREG( AON_RTC_BASE + AON_RTC_O_SUBSEC );
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aon_rtc.h
* Revised: 2016-03-01 11:33:29 +0100 (Tue, 01 Mar 2016)
* Revision: 45806
* Revised: 2016-10-06 17:21:09 +0200 (Thu, 06 Oct 2016)
* Revision: 47343
*
* Description: Defines and prototypes for the AON RTC
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,10 +61,10 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_aon_rtc.h>
#include <driverlib/debug.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_aon_rtc.h"
#include "debug.h"
//*****************************************************************************
//
@@ -173,9 +173,7 @@ extern "C"
__STATIC_INLINE void
AONRTCEnable(void)
{
//
// Enable RTC.
//
HWREGBITW(AON_RTC_BASE + AON_RTC_O_CTL, AON_RTC_CTL_EN_BITN) = 1;
}
@@ -196,9 +194,7 @@ AONRTCEnable(void)
__STATIC_INLINE void
AONRTCDisable(void)
{
//
// Disable RTC
//
HWREGBITW(AON_RTC_BASE + AON_RTC_O_CTL, AON_RTC_CTL_EN_BITN) = 0;
}
@@ -214,9 +210,7 @@ AONRTCDisable(void)
__STATIC_INLINE void
AONRTCReset(void)
{
//
// Reset RTC.
//
HWREGBITW(AON_RTC_BASE + AON_RTC_O_CTL, AON_RTC_CTL_RESET_BITN) = 1;
}
@@ -309,9 +303,7 @@ AONRTCDelayConfig(uint32_t ui32Delay)
{
uint32_t ui32Cfg;
//
// Check the arguments.
//
ASSERT(ui32Delay <= AON_RTC_CONFIG_DELAY_144);
@@ -346,9 +338,7 @@ AONRTCCombinedEventConfig(uint32_t ui32Channels)
{
uint32_t ui32Cfg;
//
// Check the arguments.
//
ASSERT( (ui32Channels & (AON_RTC_CH0 | AON_RTC_CH1 | AON_RTC_CH2)) ||
(ui32Channels == AON_RTC_CH_NONE) );
@@ -466,10 +456,8 @@ AONRTCEventGet(uint32_t ui32Channel)
__STATIC_INLINE uint32_t
AONRTCSecGet(void)
{
//
// The following read gets the seconds, but also latches the fractional
// part.
//
return(HWREG(AON_RTC_BASE + AON_RTC_O_SEC));
}
@@ -496,14 +484,12 @@ AONRTCSecGet(void)
__STATIC_INLINE uint32_t
AONRTCFractionGet(void)
{
//
// Note1: It is recommended to use AON RTCCurrentCompareValueGet() instead
// of this function if the <16.16> format is sufficient.
// Note2: AONRTCSecGet() must be called before this function to get a
// consistent reading.
// Note3: Interrupts must be disabled between the call to AONRTCSecGet() and this
// call since there are interrupt functions that reads AON_RTC_O_SEC
//
return(HWREG(AON_RTC_BASE + AON_RTC_O_SUBSEC));
}
@@ -919,7 +905,7 @@ AONRTCCaptureValueCh1Get(void)
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include <driverlib/rom.h>
#include "../driverlib/rom.h"
#ifdef ROM_AONRTCCurrentCompareValueGet
#undef AONRTCCurrentCompareValueGet
#define AONRTCCurrentCompareValueGet ROM_AONRTCCurrentCompareValueGet
@@ -3,7 +3,7 @@
* Revised: 2016-03-30 13:03:59 +0200 (Wed, 30 Mar 2016)
* Revision: 45971
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aon_wuc.c
* Revised: 2016-03-04 16:49:38 +0100 (Fri, 04 Mar 2016)
* Revision: 45874
* Revised: 2016-10-06 17:21:09 +0200 (Thu, 06 Oct 2016)
* Revision: 47343
*
* Description: Driver for the AON Wake-Up Controller.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,7 @@
*
******************************************************************************/
#include <driverlib/aon_wuc.h>
#include "aon_wuc.h"
//*****************************************************************************
//
@@ -95,9 +95,7 @@ AONWUCRechargeCtrlConfigSet(bool bAdaptEnable, uint32_t ui32AdaptRate,
uint32_t ui32Mantissa;
uint32_t ui32MaxMantissa;
//
// Check the arguments.
//
ASSERT((ui32AdaptRate >= RC_RATE_MIN) ||
(ui32AdaptRate <= RC_RATE_MAX));
@@ -105,23 +103,17 @@ AONWUCRechargeCtrlConfigSet(bool bAdaptEnable, uint32_t ui32AdaptRate,
ui32C2 = 0;
ui32Shift = 9;
//
// Clear the previous values.
//
ui32Reg = HWREG(AON_WUC_BASE + AON_WUC_O_RECHARGECFG);
ui32Reg &= ~(AON_WUC_RECHARGECFG_MAX_PER_M_M | AON_WUC_RECHARGECFG_MAX_PER_E_M |
AON_WUC_RECHARGECFG_ADAPTIVE_EN_M | AON_WUC_RECHARGECFG_PER_M_M |
AON_WUC_RECHARGECFG_PER_E_M | AON_WUC_RECHARGECFG_C1_M |
AON_WUC_RECHARGECFG_C2_M);
//
// Check if the recharge controller adaptation algorithm should be active.
//
if(bAdaptEnable)
{
//
// Calculate adaptation parameters.
//
while(ui32AdaptRate)
{
if(ui32AdaptRate & (1 << ui32Shift))
@@ -157,18 +149,14 @@ AONWUCRechargeCtrlConfigSet(bool bAdaptEnable, uint32_t ui32AdaptRate,
ui32C1 = 10 - ui32C1;
ui32C2 = 10 - ui32C2;
//
// Update the recharge rate parameters.
//
ui32Reg &= ~(AON_WUC_RECHARGECFG_C1_M | AON_WUC_RECHARGECFG_C2_M);
ui32Reg |= (ui32C1 << AON_WUC_RECHARGECFG_C1_S) |
(ui32C2 << AON_WUC_RECHARGECFG_C2_S) |
AON_WUC_RECHARGECFG_ADAPTIVE_EN_M;
}
//
// Resolve the period into an exponent and mantissa.
//
ui32Period = (ui32Period >> 4);
ui32Exponent = 0;
while(ui32Period > (AON_WUC_RECHARGECFG_PER_M_M >> AON_WUC_RECHARGECFG_PER_M_S))
@@ -178,9 +166,7 @@ AONWUCRechargeCtrlConfigSet(bool bAdaptEnable, uint32_t ui32AdaptRate,
}
ui32Mantissa = ui32Period;
//
// Resolve the max period into an exponent and mantissa.
//
ui32MaxPeriod = (ui32MaxPeriod >> 4);
ui32MaxExponent = 0;
while(ui32MaxPeriod > (AON_WUC_RECHARGECFG_MAX_PER_M_M >> AON_WUC_RECHARGECFG_MAX_PER_M_S))
@@ -190,9 +176,7 @@ AONWUCRechargeCtrlConfigSet(bool bAdaptEnable, uint32_t ui32AdaptRate,
}
ui32MaxMantissa = ui32MaxPeriod;
//
// Configure the controller.
//
ui32Reg |= ((ui32MaxMantissa << AON_WUC_RECHARGECFG_MAX_PER_M_S) |
(ui32MaxExponent << AON_WUC_RECHARGECFG_MAX_PER_E_S) |
(ui32Mantissa << AON_WUC_RECHARGECFG_PER_M_S) |
@@ -213,9 +197,7 @@ AONWUCOscConfig(uint32_t ui32Period)
uint32_t ui32Exponent;
uint32_t ui32Reg;
//
// Resolve the period into a exponent and mantissa.
//
ui32Period = (ui32Period >> 4);
ui32Exponent = 0;
while(ui32Period > (AON_WUC_OSCCFG_PER_M_M >> AON_WUC_OSCCFG_PER_M_S))
@@ -225,24 +207,18 @@ AONWUCOscConfig(uint32_t ui32Period)
}
ui32Mantissa = ui32Period;
//
// Update the period for the oscillator amplitude calibration.
//
HWREG(AON_WUC_BASE + AON_WUC_O_OSCCFG) =
(ui32Mantissa << AON_WUC_OSCCFG_PER_M_S) |
(ui32Exponent << AON_WUC_OSCCFG_PER_E_S);
//
// Set the maximum recharge period equal to the oscillator amplitude
// calibration period.
//
ui32Reg = HWREG(AON_WUC_BASE + AON_WUC_O_RECHARGECFG);
ui32Reg &= ~(AON_WUC_RECHARGECFG_MAX_PER_M_M | AON_WUC_RECHARGECFG_MAX_PER_E_M);
ui32Reg |= ((ui32Mantissa << AON_WUC_RECHARGECFG_MAX_PER_M_S) |
(ui32Exponent << AON_WUC_RECHARGECFG_MAX_PER_E_S));
//
// Write the configuration.
//
HWREG(AON_WUC_BASE + AON_WUC_O_RECHARGECFG) = ui32Reg;
}
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aon_wuc.h
* Revised: 2016-03-04 16:49:38 +0100 (Fri, 04 Mar 2016)
* Revision: 45874
* Revised: 2016-10-06 17:21:09 +0200 (Thu, 06 Oct 2016)
* Revision: 47343
*
* Description: Defines and prototypes for the AON Wake-Up Controller
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,13 +61,13 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_ints.h>
#include <inc/hw_aon_wuc.h>
#include <inc/hw_aon_rtc.h>
#include <driverlib/interrupt.h>
#include <driverlib/debug.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_ints.h"
#include "../inc/hw_aon_wuc.h"
#include "../inc/hw_aon_rtc.h"
#include "interrupt.h"
#include "debug.h"
//*****************************************************************************
//
@@ -227,15 +227,11 @@ AONWUCMcuPowerDownConfig(uint32_t ui32ClkSrc)
{
uint32_t ui32Reg;
//
// Check the arguments.
//
ASSERT((ui32ClkSrc == AONWUC_NO_CLOCK) ||
(ui32ClkSrc == AONWUC_CLOCK_SRC_LF));
//
// Set the clock source for the MCU domain when in power down.
//
ui32Reg = HWREG(AON_WUC_BASE + AON_WUC_O_MCUCLK);
ui32Reg &= ~AON_WUC_MCUCLK_PWR_DWN_SRC_M;
HWREG(AON_WUC_BASE + AON_WUC_O_MCUCLK) = ui32Reg |
@@ -332,15 +328,11 @@ AONWUCMcuSRamConfig(uint32_t ui32Retention)
{
uint32_t ui32Reg;
//
// Check the arguments.
//
ASSERT(ui32Retention & MCU_RAM_BLOCK_RETENTION);
ASSERT(!(ui32Retention & ~MCU_RAM_BLOCK_RETENTION));
//
// Configure the retention.
//
ui32Reg = HWREG(AON_WUC_BASE + AON_WUC_O_MCUCFG) & ~MCU_RAM_BLOCK_RETENTION;
ui32Reg |= ui32Retention;
HWREG(AON_WUC_BASE + AON_WUC_O_MCUCFG) = ui32Reg;
@@ -370,9 +362,7 @@ AONWUCMcuSRamConfig(uint32_t ui32Retention)
__STATIC_INLINE uint32_t
AONWUCAuxClockConfigGet(void)
{
//
// Return the clock divider value.
//
return ((HWREG(AON_WUC_BASE + AON_WUC_O_AUXCLK) &
AON_WUC_AUXCLK_SCLK_HF_DIV_M) >>
AON_WUC_AUXCLK_SCLK_HF_DIV_S);
@@ -401,15 +391,11 @@ AONWUCAuxPowerDownConfig(uint32_t ui32ClkSrc)
{
uint32_t ui32Reg;
//
// Check the arguments.
//
ASSERT((ui32ClkSrc == AONWUC_NO_CLOCK) ||
(ui32ClkSrc == AONWUC_CLOCK_SRC_LF));
//
// Set the clock source for the AUX domain when in power down.
//
ui32Reg = HWREG(AON_WUC_BASE + AON_WUC_O_AUXCLK);
ui32Reg &= ~AON_WUC_AUXCLK_PWR_DWN_SRC_M;
HWREG(AON_WUC_BASE + AON_WUC_O_AUXCLK) = ui32Reg |
@@ -555,9 +541,7 @@ AONWUCAuxImageInvalid(void)
__STATIC_INLINE uint32_t
AONWUCPowerStatusGet(void)
{
//
// Return the power status.
//
return (HWREG(AON_WUC_BASE + AON_WUC_O_PWRSTAT));
}
@@ -655,15 +639,11 @@ AONWUCDomainPowerDownDisable(void)
__STATIC_INLINE void
AONWUCMcuResetClear(uint32_t ui32Status)
{
//
// Check the arguments.
//
ASSERT((ui32Status & AONWUC_MCU_RESET_SRC) ||
(ui32Status & AONWUC_MCU_WARM_RESET));
//
// Clear the status bits.
//
HWREG(AON_WUC_BASE + AON_WUC_O_CTL1) = ui32Status;
}
@@ -679,9 +659,7 @@ AONWUCMcuResetClear(uint32_t ui32Status)
__STATIC_INLINE uint32_t
AONWUCMcuResetStatusGet(void)
{
//
// Return the current status.
//
return (HWREG(AON_WUC_BASE + AON_WUC_O_CTL1));
}
@@ -755,9 +733,7 @@ extern void AONWUCRechargeCtrlConfigSet(bool bAdaptEnable,
__STATIC_INLINE uint32_t
AONWUCRechargeCtrlConfigGet(void)
{
//
// Return the current configuration.
//
return(HWREG(AON_WUC_BASE + AON_WUC_O_RECHARGECFG));
}
@@ -815,9 +791,7 @@ extern void AONWUCOscConfig(uint32_t ui32Period);
__STATIC_INLINE void
AONWUCJtagPowerOff(void)
{
//
// Request the power off of the Jtag domain
//
HWREG(AON_WUC_BASE + AON_WUC_O_JTAGCFG) = 0;
}
@@ -829,7 +803,7 @@ AONWUCJtagPowerOff(void)
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include <driverlib/rom.h>
#include "../driverlib/rom.h"
#ifdef ROM_AONWUCAuxReset
#undef AONWUCAuxReset
#define AONWUCAuxReset ROM_AONWUCAuxReset
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aux_adc.c
* Revised: 2016-03-04 16:49:38 +0100 (Fri, 04 Mar 2016)
* Revision: 45874
* Revised: 2017-04-26 18:27:45 +0200 (Wed, 26 Apr 2017)
* Revision: 48852
*
* Description: Driver for the AUX Time to Digital Converter interface.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,12 +36,12 @@
*
******************************************************************************/
#include <driverlib/aux_adc.h>
#include <inc/hw_memmap.h>
#include <inc/hw_aux_wuc.h>
#include <inc/hw_fcfg1.h>
#include <driverlib/adi.h>
#include <driverlib/event.h>
#include "aux_adc.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_aux_wuc.h"
#include "../inc/hw_fcfg1.h"
#include "adi.h"
#include "event.h"
//*****************************************************************************
//
@@ -80,7 +80,7 @@
//*****************************************************************************
//
//! \brief Disables the ADC
// Disables the ADC
//
//*****************************************************************************
void
@@ -1,12 +1,12 @@
/******************************************************************************
* Filename: aux_adc.h
* Revised: 2015-07-16 12:12:04 +0200 (Thu, 16 Jul 2015)
* Revision: 44151
* Revised: 2016-09-19 10:36:17 +0200 (Mon, 19 Sep 2016)
* Revision: 47179
*
* Description: Defines and prototypes for the AUX Analog-to-Digital
* Converter
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -62,13 +62,13 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_event.h>
#include <inc/hw_adi.h>
#include <inc/hw_adi_4_aux.h>
#include <inc/hw_aux_anaif.h>
#include <driverlib/rom.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_event.h"
#include "../inc/hw_adi.h"
#include "../inc/hw_adi_4_aux.h"
#include "../inc/hw_aux_anaif.h"
#include "rom.h"
//*****************************************************************************
//
@@ -515,7 +515,7 @@ extern int32_t AUXADCUnadjustValueForGainAndOffset(int32_t adcValue, int32_t gai
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include <driverlib/rom.h>
#include "../driverlib/rom.h"
#ifdef ROM_AUXADCDisable
#undef AUXADCDisable
#define AUXADCDisable ROM_AUXADCDisable
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aux_smph.c
* Revised: 2015-01-13 16:59:55 +0100 (Tue, 13 Jan 2015)
* Revision: 42365
* Revised: 2016-09-19 10:36:17 +0200 (Mon, 19 Sep 2016)
* Revision: 47179
*
* Description: Driver for the AUX Semaphore.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,6 +36,6 @@
*
******************************************************************************/
#include <driverlib/aux_smph.h>
#include "aux_smph.h"
// See aux_smph.h for implementation
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aux_smph.h
* Revised: 2015-07-16 12:12:04 +0200 (Thu, 16 Jul 2015)
* Revision: 44151
* Revised: 2016-10-06 17:21:09 +0200 (Thu, 06 Oct 2016)
* Revision: 47343
*
* Description: Defines and prototypes for the AUX Semaphore
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,10 +61,10 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_aux_smph.h>
#include <inc/hw_memmap.h>
#include <driverlib/debug.h>
#include "../inc/hw_types.h"
#include "../inc/hw_aux_smph.h"
#include "../inc/hw_memmap.h"
#include "debug.h"
//*****************************************************************************
//
@@ -124,9 +124,7 @@ extern "C"
__STATIC_INLINE void
AUXSMPHAcquire(uint32_t ui32Semaphore)
{
//
// Check the arguments.
//
ASSERT((ui32Semaphore == AUX_SMPH_0) ||
(ui32Semaphore == AUX_SMPH_1) ||
(ui32Semaphore == AUX_SMPH_2) ||
@@ -136,11 +134,9 @@ AUXSMPHAcquire(uint32_t ui32Semaphore)
(ui32Semaphore == AUX_SMPH_6) ||
(ui32Semaphore == AUX_SMPH_7));
//
// Wait for semaphore to be released such that it can be claimed
// Semaphore register reads 1 when lock was acquired otherwise 0
// (i.e. AUX_SMPH_CLAIMED).
//
while(HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0 + 4 * ui32Semaphore) ==
AUX_SMPH_CLAIMED)
{
@@ -178,9 +174,7 @@ AUXSMPHTryAcquire(uint32_t ui32Semaphore)
{
uint32_t ui32SemaReg;
//
// Check the arguments.
//
ASSERT((ui32Semaphore == AUX_SMPH_0) ||
(ui32Semaphore == AUX_SMPH_1) ||
(ui32Semaphore == AUX_SMPH_2) ||
@@ -190,10 +184,8 @@ AUXSMPHTryAcquire(uint32_t ui32Semaphore)
(ui32Semaphore == AUX_SMPH_6) ||
(ui32Semaphore == AUX_SMPH_7));
//
// AUX Semaphore register reads 1 if lock was acquired
// (i.e. SMPH_FREE when read) but subsequent reads will read 0.
//
ui32SemaReg = HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0 + 4 * ui32Semaphore);
return (ui32SemaReg == AUX_SMPH_FREE);
@@ -230,9 +222,7 @@ AUXSMPHTryAcquire(uint32_t ui32Semaphore)
__STATIC_INLINE void
AUXSMPHRelease(uint32_t ui32Semaphore)
{
//
// Check the arguments.
//
ASSERT((ui32Semaphore == AUX_SMPH_0) ||
(ui32Semaphore == AUX_SMPH_1) ||
(ui32Semaphore == AUX_SMPH_2) ||
@@ -242,10 +232,8 @@ AUXSMPHRelease(uint32_t ui32Semaphore)
(ui32Semaphore == AUX_SMPH_6) ||
(ui32Semaphore == AUX_SMPH_7));
//
// No check before release. It is up to the application to provide the
// conventions for who and when a semaphore can be released.
//
HWREG(AUX_SMPH_BASE + AUX_SMPH_O_SMPH0 + 4 * ui32Semaphore) =
AUX_SMPH_FREE;
}
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aux_tdc.c
* Revised: 2015-01-13 16:59:55 +0100 (Tue, 13 Jan 2015)
* Revision: 42365
* Revised: 2017-04-26 18:27:45 +0200 (Wed, 26 Apr 2017)
* Revision: 48852
*
* Description: Driver for the AUX Time to Digital Converter interface.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,7 @@
*
******************************************************************************/
#include <driverlib/aux_tdc.h>
#include "aux_tdc.h"
//*****************************************************************************
//
@@ -53,41 +53,33 @@
//*****************************************************************************
//
//! Configure the operation of the AUX TDC
// Configure the operation of the AUX TDC
//
//*****************************************************************************
void
AUXTDCConfigSet(uint32_t ui32Base, uint32_t ui32StartCondition,
uint32_t ui32StopCondition)
{
//
// Check the arguments.
//
ASSERT(AUXTDCBaseValid(ui32Base));
//
// Make sure the AUX TDC is in the idle state before changing the
// configuration.
//
while(!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) ==
AUX_TDC_STAT_STATE_IDLE))
{
}
//
// Clear previous results.
//
HWREG(ui32Base + AUX_TDC_O_CTL) = 0x0;
//
// Change the configuration.
//
HWREG(ui32Base + AUX_TDC_O_TRIGSRC) = ui32StartCondition | ui32StopCondition;
}
//*****************************************************************************
//
//! Check if the AUX TDC is done measuring
// Check if the AUX TDC is done measuring
//
//*****************************************************************************
uint32_t
@@ -96,14 +88,10 @@ AUXTDCMeasurementDone(uint32_t ui32Base)
uint32_t ui32Reg;
uint32_t ui32Status;
//
// Check the arguments.
//
ASSERT(AUXTDCBaseValid(ui32Base));
//
// Check if the AUX TDC is done measuring.
//
ui32Reg = HWREG(ui32Base + AUX_TDC_O_STAT);
if(ui32Reg & AUX_TDC_STAT_DONE)
{
@@ -118,8 +106,6 @@ AUXTDCMeasurementDone(uint32_t ui32Base)
ui32Status = AUX_TDC_BUSY;
}
//
// Return the status.
//
return (ui32Status);
}
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aux_tdc.h
* Revised: 2015-11-03 09:54:47 +0100 (Tue, 03 Nov 2015)
* Revision: 44933
* Revised: 2017-03-28 11:12:40 +0200 (Tue, 28 Mar 2017)
* Revision: 48729
*
* Description: Defines and prototypes for the AUX Time-to-Digital Converter
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,11 +61,11 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_ints.h>
#include <inc/hw_aux_tdc.h>
#include <driverlib/debug.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_ints.h"
#include "../inc/hw_aux_tdc.h"
#include "debug.h"
//*****************************************************************************
//
@@ -270,14 +270,10 @@ AUXTDCBaseValid(uint32_t ui32Base)
__STATIC_INLINE uint32_t
AUXTDCStatusGet(uint32_t ui32Base)
{
//
// Check the arguments.
//
ASSERT(AUXTDCBaseValid(ui32Base));
//
// Return the status value for the correct ADI Slave.
//
return((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) >>
AUX_TDC_STAT_STATE_S);
}
@@ -398,14 +394,10 @@ extern void AUXTDCConfigSet(uint32_t ui32Base, uint32_t ui32StartCondition,
__STATIC_INLINE bool
AUXTDCIdle(uint32_t ui32Base)
{
//
// Check the arguments.
//
ASSERT(AUXTDCBaseValid(ui32Base));
//
// Check if the AUX TDC is in the Idle state.
//
return (((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) ==
AUX_TDC_STAT_STATE_IDLE) ? true : false);
}
@@ -442,16 +434,12 @@ AUXTDCIdle(uint32_t ui32Base)
__STATIC_INLINE void
AUXTDCEnable(uint32_t ui32Base, uint32_t ui32RunMode)
{
//
// Check the arguments.
//
ASSERT(AUXTDCBaseValid(ui32Base));
ASSERT((ui32RunMode == AUX_TDC_RUN) ||
(ui32RunMode == AUX_TDC_RUNSYNC));
//
// Enable the AUX TDC.
//
HWREG(ui32Base + AUX_TDC_O_CTL) = ui32RunMode;
}
@@ -474,14 +462,10 @@ AUXTDCEnable(uint32_t ui32Base, uint32_t ui32RunMode)
__STATIC_INLINE void
AUXTDCIdleForce(uint32_t ui32Base)
{
//
// Check the arguments
//
ASSERT(AUXTDCBaseValid(ui32Base));
//
// Abort operation of AUX TDC and force into Idle mode.
//
HWREG(ui32Base + AUX_TDC_O_CTL) = AUX_TDC_CTL_CMD_ABORT;
}
@@ -520,14 +504,10 @@ extern uint32_t AUXTDCMeasurementDone(uint32_t ui32Base);
__STATIC_INLINE uint32_t
AUXTDCMeasurementGet(uint32_t ui32Base)
{
//
// Check the arguments.
//
ASSERT(AUXTDCBaseValid(ui32Base));
//
// Return the measurement.
//
return (HWREG(ui32Base + AUX_TDC_O_RESULT));
}
@@ -566,15 +546,11 @@ AUXTDCMeasurementGet(uint32_t ui32Base)
__STATIC_INLINE void
AUXTDCLimitSet(uint32_t ui32Base, uint32_t ui32Limit)
{
//
// Check the arguments.
//
ASSERT(AUXTDCBaseValid(ui32Base));
ASSERT(ui32Limit < AUXTDC_NUM_SAT_VALS);
//
// Set the saturation limit.
//
HWREG(ui32Base + AUX_TDC_O_SATCFG) = ui32Limit;
}
@@ -608,14 +584,10 @@ AUXTDCLimitSet(uint32_t ui32Base, uint32_t ui32Limit)
__STATIC_INLINE uint32_t
AUXTDCLimitGet(uint32_t ui32Base)
{
//
// Check the arguments.
//
ASSERT(AUXTDCBaseValid(ui32Base));
//
// Return the saturation limit.
//
return (HWREG(ui32Base + AUX_TDC_O_SATCFG));
}
@@ -643,29 +615,21 @@ AUXTDCLimitGet(uint32_t ui32Base)
__STATIC_INLINE bool
AUXTDCCounterEnable(uint32_t ui32Base)
{
//
// Check the arguments.
//
ASSERT(AUXTDCBaseValid(ui32Base));
//
// Check if the AUX TDC is in idle mode. If not in Idle mode, the counter
// will not be enabled.
//
if(!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) ==
AUX_TDC_STAT_STATE_IDLE))
{
return false;
}
//
// Enable the counter.
//
HWREG(ui32Base + AUX_TDC_O_TRIGCNTCFG) = AUX_TDC_TRIGCNTCFG_EN;
//
// Counter successfully enabled.
//
return true;
}
@@ -687,29 +651,21 @@ AUXTDCCounterEnable(uint32_t ui32Base)
__STATIC_INLINE bool
AUXTDCCounterDisable(uint32_t ui32Base)
{
//
// Check the arguments.
//
ASSERT(AUXTDCBaseValid(ui32Base));
//
// Check if the AUX TDC is in Idle mode. If not in Idle mode, the counter
// will not be disabled.
//
if(!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) ==
AUX_TDC_STAT_STATE_IDLE))
{
return false;
}
//
// Disable the counter.
//
HWREG(ui32Base + AUX_TDC_O_TRIGCNTCFG) = 0;
//
// Counter successfully disabled.
//
return true;
}
@@ -736,29 +692,21 @@ AUXTDCCounterDisable(uint32_t ui32Base)
__STATIC_INLINE bool
AUXTDCCounterSet(uint32_t ui32Base, uint32_t ui32Events)
{
//
// Check the arguments.
//
ASSERT(AUXTDCBaseValid(ui32Base));
//
// Check if the AUX TDC is in idle mode. If not in idle mode, the counter
// will not be disabled.
//
if(!((HWREG(ui32Base + AUX_TDC_O_STAT) & AUX_TDC_STAT_STATE_M) ==
AUX_TDC_STAT_STATE_IDLE))
{
return false;
}
//
// Update the reset counter value.
//
HWREG(ui32Base + AUX_TDC_O_TRIGCNTLOAD) = ui32Events;
//
// Counter successfully updated.
//
return true;
}
@@ -783,14 +731,10 @@ AUXTDCCounterSet(uint32_t ui32Base, uint32_t ui32Events)
__STATIC_INLINE uint32_t
AUXTDCCounterGet(uint32_t ui32Base)
{
//
// Check the arguments.
//
ASSERT(AUXTDCBaseValid(ui32Base));
//
// Return the current counter value.
//
return (HWREG(ui32Base + AUX_TDC_O_TRIGCNT));
}
@@ -801,7 +745,7 @@ AUXTDCCounterGet(uint32_t ui32Base)
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include <driverlib/rom.h>
#include "../driverlib/rom.h"
#ifdef ROM_AUXTDCConfigSet
#undef AUXTDCConfigSet
#define AUXTDCConfigSet ROM_AUXTDCConfigSet
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aux_timer.c
* Revised: 2016-02-24 14:08:55 +0100 (Wed, 24 Feb 2016)
* Revision: 45767
* Revised: 2017-05-03 15:10:31 +0200 (Wed, 03 May 2017)
* Revision: 48885
*
* Description: Driver for the AUX Timer Module
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,7 @@
*
******************************************************************************/
#include <driverlib/aux_timer.h>
#include "aux_timer.h"
//*****************************************************************************
//
@@ -59,7 +59,7 @@
//*****************************************************************************
//
//! Configure AUX timer
// Configure AUX timer
//
//*****************************************************************************
void
@@ -67,132 +67,70 @@ AUXTimerConfigure(uint32_t ui32Timer, uint32_t ui32Config)
{
uint32_t ui32Val;
//
// Check the arguments.
//
ASSERT((ui32Timer == AUX_TIMER_0) || (ui32Timer == AUX_TIMER_1) ||
(ui32Timer == AUX_TIMER_BOTH));
ASSERT(((ui32Config & 0x0000000F) == AUX_TIMER_CFG_ONE_SHOT) ||
((ui32Config & 0x0000000F) == AUX_TIMER_CFG_PERIODIC) ||
((ui32Config & 0x0000000F) == AUX_TIMER_CFG_ONE_SHOT_EDGE_COUNT) ||
((ui32Config & 0x0000000F) == AUX_TIMER_CFG_PERIODIC_EDGE_COUNT) ||
((ui32Config & 0x000000F0) == AUX_TIMER_CFG_RISING_EDGE) ||
((ui32Config & 0x000000F0) == AUX_TIMER_CFG_FALLING_EDGE) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_RTC_EVENT) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_CMP_A) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_CMP_B) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_TDCDONE) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_TIMER0_EVENT) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_TIMER1_EVENT) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_SMPH_RELEASE) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_ADC_DONE) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO0) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO1) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO2) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO3) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO4) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO5) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO6) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO7) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO8) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO9) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO10) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO11) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO12) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO13) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO14) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_AIO15) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_ACLK_REF) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_MCU_EVENT) ||
((ui32Config & 0x00000F00) == AUX_TIMER_CFG_TICK_SRC_ADC_IRQ));
//
// Configure Timer 0.
//
if(ui32Timer & AUX_TIMER_0)
{
//
// Stop timer 0.
//
HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T0CTL) = 0;
//
// Set mode.
//
ui32Val = HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T0CFG);
ui32Val &= ~(AUX_TIMER_T0CFG_MODE_M | AUX_TIMER_T0CFG_RELOAD_M);
ui32Val |= (ui32Config & (AUX_TIMER_T0CFG_MODE_M |
AUX_TIMER_T0CFG_RELOAD_M));
HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T0CFG) = ui32Val;
//
// If edge counter, set rising/falling edge and tick source.
//
if(ui32Config & AUX_TIMER_T0CFG_MODE_M)
{
ui32Val = HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T0CFG);
ui32Val &= ~(AUX_TIMER_T0CFG_TICK_SRC_POL_M |
AUX_TIMER_T0CFG_TICK_SRC_M);
//
// Set edge polarity.
//
if(ui32Config & AUX_TIMER_CFG_FALLING_EDGE)
{
ui32Val |= AUX_TIMER_T0CFG_TICK_SRC_POL;
}
//
// Set tick source.
//
ui32Val |= ((ui32Config & 0x00000F00) >> 8) <<
AUX_TIMER_T0CFG_TICK_SRC_S;
ui32Val |= (ui32Config & AUX_TIMER_T0CFG_TICK_SRC_M);
HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T0CFG) = ui32Val;
}
}
//
// Configure Timer 1.
//
if(ui32Timer & AUX_TIMER_1)
{
//
// Stop timer 1.
//
HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T1CTL) = 0;
//
// Set mode.
//
ui32Val = HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T1CFG);
ui32Val &= ~(AUX_TIMER_T1CFG_MODE_M | AUX_TIMER_T1CFG_RELOAD_M);
ui32Val |= ((ui32Config) & (AUX_TIMER_T1CFG_MODE_M |
AUX_TIMER_T1CFG_RELOAD_M));
HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T1CFG) = ui32Val;
//
// If edge counter, set rising/falling edge and tick source.
//
if(ui32Config & AUX_TIMER_T1CFG_MODE)
{
ui32Val = HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T1CFG);
ui32Val &= ~(AUX_TIMER_T1CFG_TICK_SRC_POL_M |
AUX_TIMER_T1CFG_TICK_SRC_M);
//
// Set edge polarity.
//
if(ui32Config & AUX_TIMER_CFG_FALLING_EDGE)
{
ui32Val |= AUX_TIMER_T1CFG_TICK_SRC_POL;
}
//
// Set tick source.
//
ui32Val |= ((ui32Config & 0x00000F00) >> 8) <<
AUX_TIMER_T1CFG_TICK_SRC_S;
ui32Val |= (ui32Config & AUX_TIMER_T1CFG_TICK_SRC_M);
HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T1CFG) = ui32Val;
}
}
@@ -200,69 +138,57 @@ AUXTimerConfigure(uint32_t ui32Timer, uint32_t ui32Config)
//*****************************************************************************
//
//! Start AUX timer
// Start AUX timer
//
//*****************************************************************************
void
AUXTimerStart(uint32_t ui32Timer)
{
//
// Check the arguments.
//
ASSERT((ui32Timer == AUX_TIMER_0) ||
(ui32Timer == AUX_TIMER_1) ||
(ui32Timer == AUX_TIMER_BOTH));
if(ui32Timer & AUX_TIMER_0)
{
//
// Start timer 0.
//
HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T0CTL) = AUX_TIMER_T0CTL_EN;
}
if(ui32Timer & AUX_TIMER_1)
{
//
// Start timer 1.
//
HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T1CTL) = AUX_TIMER_T1CTL_EN;
}
}
//*****************************************************************************
//
//! Stop AUX timer
// Stop AUX timer
//
//*****************************************************************************
void
AUXTimerStop(uint32_t ui32Timer)
{
//
// Check the arguments.
//
ASSERT((ui32Timer == AUX_TIMER_0) ||
(ui32Timer == AUX_TIMER_1) ||
(ui32Timer == AUX_TIMER_BOTH));
if(ui32Timer & AUX_TIMER_0)
{
//
// Stop timer 0.
//
HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T0CTL) = 0;
}
if(ui32Timer & AUX_TIMER_1)
{
//
// Stop timer 1.
//
HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T1CTL) = 0;
}
}
//*****************************************************************************
//
//! Set AUX timer prescale value
// Set AUX timer prescale value
//
//*****************************************************************************
void
@@ -270,18 +196,14 @@ AUXTimerPrescaleSet(uint32_t ui32Timer, uint32_t ui32PrescaleDiv)
{
uint32_t ui32Val;
//
// Check the arguments.
//
ASSERT((ui32Timer == AUX_TIMER_0) || (ui32Timer == AUX_TIMER_1) ||
(ui32Timer == AUX_TIMER_BOTH));
ASSERT(ui32PrescaleDiv <= AUX_TIMER_PRESCALE_DIV_32768);
if(ui32Timer & AUX_TIMER_0)
{
//
// Set timer 0 prescale value.
//
ui32Val = HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T0CFG);
ui32Val &= ~AUX_TIMER_T0CFG_PRE_M;
ui32Val |= ui32PrescaleDiv << AUX_TIMER_T0CFG_PRE_S;
@@ -289,9 +211,7 @@ AUXTimerPrescaleSet(uint32_t ui32Timer, uint32_t ui32PrescaleDiv)
}
if(ui32Timer & AUX_TIMER_1)
{
//
// Set timer 1 prescale value.
//
ui32Val = HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T1CFG);
ui32Val &= ~AUX_TIMER_T1CFG_PRE_M;
ui32Val |= ui32PrescaleDiv << AUX_TIMER_T1CFG_PRE_S;
@@ -301,7 +221,7 @@ AUXTimerPrescaleSet(uint32_t ui32Timer, uint32_t ui32PrescaleDiv)
//*****************************************************************************
//
//! Get AUX timer prescale value
// Get AUX timer prescale value
//
//*****************************************************************************
uint32_t
@@ -310,25 +230,19 @@ AUXTimerPrescaleGet(uint32_t ui32Timer)
uint32_t ui32Val;
uint32_t ui32PrescaleDiv;
//
// Check the arguments.
//
ASSERT((ui32Timer == AUX_TIMER_0) || (ui32Timer == AUX_TIMER_1));
ui32Val = (HWREG(AUX_TIMER_BASE + AUX_TIMER_O_T0CFG));
if(ui32Timer & AUX_TIMER_0)
{
//
// Get timer 0 prescale value.
//
ui32PrescaleDiv =
(ui32Val & AUX_TIMER_T0CFG_PRE_M) >> AUX_TIMER_T0CFG_PRE_S;
}
else
{
//
// Get timer 1 prescale value.
//
ui32PrescaleDiv =
(ui32Val & AUX_TIMER_T1CFG_PRE_M) >> AUX_TIMER_T1CFG_PRE_S;
}
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aux_timer.h
* Revised: 2016-02-24 14:08:55 +0100 (Wed, 24 Feb 2016)
* Revision: 45767
* Revised: 2017-05-03 14:53:24 +0200 (Wed, 03 May 2017)
* Revision: 48884
*
* Description: Defines and prototypes for the AUX Timer
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,12 +61,12 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_ints.h>
#include <inc/hw_memmap.h>
#include <inc/hw_aux_timer.h>
#include <driverlib/debug.h>
#include <driverlib/interrupt.h>
#include "../inc/hw_types.h"
#include "../inc/hw_ints.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_aux_timer.h"
#include "debug.h"
#include "interrupt.h"
//*****************************************************************************
//
@@ -93,8 +93,6 @@ extern "C"
//
// Values that can be passed to AUXTimerConfigure().
//
// Requires timer0 and timer1 to use same enumerations and values!
//
//*****************************************************************************
#define AUX_TIMER_CFG_ONE_SHOT (AUX_TIMER_T0CFG_RELOAD_MAN) // One-shot timer mode
#define AUX_TIMER_CFG_PERIODIC (AUX_TIMER_T0CFG_RELOAD_CONT) // Period timer mode
@@ -236,8 +234,9 @@ extern "C"
//!
//! The mode, event polarity and event source are configured by setting the
//! \c ui32Config parameter as the bitwise OR of the various settings.
//! I.e. (\ref AUX_TIMER_CFG_ONE_SHOT_EDGE_COUNT | \ref AUX_TIMER_CFG_RISING_EDGE |
//! \ref AUX_TIMER_CFG_TICK_SRC_RTC_EVENT).
//! Example: (\ref AUX_TIMER_CFG_ONE_SHOT_EDGE_COUNT |
//! \ref AUX_TIMER_CFG_RISING_EDGE |
//! \ref AUX_TIMER_CFG_TICK_SRC_RTC_EVENT).
//!
//! \note When used as an edge counter the prescaler should be set to
//! \ref AUX_TIMER_PRESCALE_DIV_1.
@@ -249,6 +248,7 @@ extern "C"
//! \param ui32Timer is the timer to configure.
//! - \ref AUX_TIMER_0
//! - \ref AUX_TIMER_1
//! - \ref AUX_TIMER_BOTH
//! \param ui32Config is the timer configuration.
//!
//! \return None
@@ -320,9 +320,7 @@ AUXTimerTargetValSet(uint32_t ui32Timer, uint32_t ui32Target)
{
uint32_t ui32Addr;
//
// Check the arguments.
//
ASSERT((ui32Timer == AUX_TIMER_0) || (ui32Timer == AUX_TIMER_1));
ASSERT(((ui32Timer & AUX_TIMER_0) && (ui32Target <= 65535)) ||
((ui32Timer & AUX_TIMER_1) && (ui32Target <= 255)));
@@ -354,9 +352,7 @@ AUXTimerTargetValSet(uint32_t ui32Timer, uint32_t ui32Target)
__STATIC_INLINE uint32_t
AUXTimerTargetValGet(uint32_t ui32Timer)
{
//
// Check the arguments.
//
ASSERT((ui32Timer == AUX_TIMER_0) || (ui32Timer == AUX_TIMER_1));
return(HWREG((ui32Timer & AUX_TIMER_0) ?
@@ -379,6 +375,7 @@ AUXTimerTargetValGet(uint32_t ui32Timer)
//! \param ui32Timer is the timer to set the prescale on.
//! - \ref AUX_TIMER_0
//! - \ref AUX_TIMER_1
//! - \ref AUX_TIMER_BOTH
//! \param ui32PrescaleDiv is the prescaler division ratio.
//! - \ref AUX_TIMER_PRESCALE_DIV_1 : Prescale division ratio 1
//! - \ref AUX_TIMER_PRESCALE_DIV_2 : Prescale division ratio 2
@@ -442,7 +439,7 @@ extern uint32_t AUXTimerPrescaleGet(uint32_t ui32Timer);
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include <driverlib/rom.h>
#include "../driverlib/rom.h"
#ifdef ROM_AUXTimerConfigure
#undef AUXTimerConfigure
#define AUXTimerConfigure ROM_AUXTimerConfigure
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aux_wuc.c
* Revised: 2016-02-24 14:08:55 +0100 (Wed, 24 Feb 2016)
* Revision: 45767
* Revised: 2016-12-08 10:34:56 +0100 (Thu, 08 Dec 2016)
* Revision: 47910
*
* Description: Driver for the AUX Wakeup Controller.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,7 @@
*
******************************************************************************/
#include <driverlib/aux_wuc.h>
#include "aux_wuc.h"
//*****************************************************************************
//
@@ -63,9 +63,7 @@
void
AUXWUCClockEnable(uint32_t ui32Clocks)
{
//
// Check the arguments.
//
ASSERT((ui32Clocks & AUX_WUC_ADI_CLOCK) ||
(ui32Clocks & AUX_WUC_OSCCTRL_CLOCK) ||
(ui32Clocks & AUX_WUC_TDCIF_CLOCK) ||
@@ -78,15 +76,11 @@ AUXWUCClockEnable(uint32_t ui32Clocks)
(ui32Clocks & AUX_WUC_ADC_CLOCK) ||
(ui32Clocks & AUX_WUC_REF_CLOCK));
//
// Enable some of the clocks in the clock register.
//
HWREG(AUX_WUC_BASE + AUX_WUC_O_MODCLKEN0) |= (ui32Clocks &
AUX_WUC_MODCLK_MASK);
//
// Check the rest.
//
if(ui32Clocks & AUX_WUC_ADC_CLOCK)
{
HWREG(AUX_WUC_BASE + AUX_WUC_O_ADCCLKCTL) =
@@ -112,9 +106,7 @@ AUXWUCClockEnable(uint32_t ui32Clocks)
void
AUXWUCClockDisable(uint32_t ui32Clocks)
{
//
// Check the arguments.
//
ASSERT((ui32Clocks & AUX_WUC_ADI_CLOCK) ||
(ui32Clocks & AUX_WUC_OSCCTRL_CLOCK) ||
(ui32Clocks & AUX_WUC_TDCIF_CLOCK) ||
@@ -127,15 +119,11 @@ AUXWUCClockDisable(uint32_t ui32Clocks)
(ui32Clocks & AUX_WUC_ADC_CLOCK) ||
(ui32Clocks & AUX_WUC_REF_CLOCK));
//
// Disable some of the clocks in the clock register.
//
HWREG(AUX_WUC_BASE + AUX_WUC_O_MODCLKEN0) &= ~(ui32Clocks &
AUX_WUC_MODCLK_MASK);
//
// Check the rest.
//
if(ui32Clocks & AUX_WUC_ADC_CLOCK)
{
HWREG(AUX_WUC_BASE + AUX_WUC_O_ADCCLKCTL) &=
@@ -164,9 +152,7 @@ AUXWUCClockStatus(uint32_t ui32Clocks)
bool bClockStatus;
uint32_t ui32ClockRegister;
//
// Check the arguments.
//
ASSERT((ui32Clocks & AUX_WUC_ADI_CLOCK) ||
(ui32Clocks & AUX_WUC_OSCCTRL_CLOCK) ||
(ui32Clocks & AUX_WUC_TDCIF_CLOCK) ||
@@ -181,14 +167,10 @@ AUXWUCClockStatus(uint32_t ui32Clocks)
bClockStatus = true;
//
// Read the status registers.
//
ui32ClockRegister = HWREG(AUX_WUC_BASE + AUX_WUC_O_MODCLKEN0);
//
// Check all requested clocks
//
if(ui32Clocks & AUX_WUC_ADI_CLOCK)
{
bClockStatus = bClockStatus && (ui32ClockRegister &
@@ -259,9 +241,7 @@ AUXWUCClockStatus(uint32_t ui32Clocks)
true : false);
}
//
// Return the clock status.
//
return bClockStatus ? AUX_WUC_CLOCK_READY : AUX_WUC_CLOCK_OFF;
}
@@ -273,16 +253,12 @@ AUXWUCClockStatus(uint32_t ui32Clocks)
void
AUXWUCPowerCtrl(uint32_t ui32PowerMode)
{
//
// Check the arguments.
//
ASSERT((ui32PowerMode == AUX_WUC_POWER_OFF) ||
(ui32PowerMode == AUX_WUC_POWER_DOWN) ||
(ui32PowerMode == AUX_WUC_POWER_ACTIVE));
//
// Power on/off.
//
if(ui32PowerMode == AUX_WUC_POWER_OFF)
{
HWREG(AUX_WUC_BASE + AUX_WUC_O_PWROFFREQ) = AUX_WUC_PWROFFREQ_REQ;
@@ -294,13 +270,10 @@ AUXWUCPowerCtrl(uint32_t ui32PowerMode)
HWREG(AUX_WUC_BASE + AUX_WUC_O_PWROFFREQ) = 0x0;
}
//
// Power down/active.
//
if(ui32PowerMode == AUX_WUC_POWER_DOWN)
{
HWREG(AUX_WUC_BASE + AUX_WUC_O_PWRDWNREQ) =
AUX_WUC_PWRDWNREQ_REQ;
HWREG(AUX_WUC_BASE + AUX_WUC_O_PWRDWNREQ) = AUX_WUC_PWRDWNREQ_REQ;
HWREG(AUX_WUC_BASE + AUX_WUC_O_MCUBUSCTL) = AUX_WUC_MCUBUSCTL_DISCONNECT_REQ;
}
else
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: aon_wuc.h
* Revised: 2016-02-24 14:08:55 +0100 (Wed, 24 Feb 2016)
* Revision: 45767
* Revised: 2017-03-28 11:12:40 +0200 (Tue, 28 Mar 2017)
* Revision: 48729
*
* Description: Defines and prototypes for the AUX Wakeup Controller
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,10 +61,10 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_aux_wuc.h>
#include <driverlib/debug.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_aux_wuc.h"
#include "debug.h"
//*****************************************************************************
//
@@ -231,15 +231,11 @@ extern uint32_t AUXWUCClockStatus(uint32_t ui32Clocks);
__STATIC_INLINE void
AUXWUCClockFreqReq(uint32_t ui32ClockFreq)
{
//
// Check the arguments.
//
ASSERT((ui32ClockFreq == AUX_WUC_CLOCK_HIFREQ) ||
(ui32ClockFreq == AUX_WUC_CLOCK_LOFREQ));
//
// Set the request
//
HWREG(AUX_WUC_BASE + AUX_WUC_O_CLKLFREQ) = ui32ClockFreq;
}
@@ -278,9 +274,7 @@ extern void AUXWUCPowerCtrl(uint32_t ui32PowerMode);
__STATIC_INLINE void
AUXWUCFreezeEnable(void)
{
//
// Set the AUX WUC latches as static.
//
HWREG(AUX_WUC_BASE + AUX_WUC_O_AUXIOLATCH) = 0x0;
}
@@ -303,9 +297,7 @@ AUXWUCFreezeEnable(void)
__STATIC_INLINE void
AUXWUCFreezeDisable(void)
{
//
// Set the AUX WUC latches as transparent.
//
HWREG(AUX_WUC_BASE + AUX_WUC_O_AUXIOLATCH) = AUX_WUC_AUXIOLATCH_EN;
}
@@ -316,7 +308,7 @@ AUXWUCFreezeDisable(void)
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include <driverlib/rom.h>
#include "../driverlib/rom.h"
#ifdef ROM_AUXWUCClockEnable
#undef AUXWUCClockEnable
#define AUXWUCClockEnable ROM_AUXWUCClockEnable
Binary file not shown.
+111
View File
@@ -0,0 +1,111 @@
# Get directory of this makefile
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
# Specify the default makedefs file, which can be overridden at the command line
MAKEDEFS = $(MAKEFILE_DIR)makedefs
include $(MAKEDEFS)
# Always builds phony rules
.PHONY: all clean
# Builds driverlib.lib
all :
@ rm -f $(MAKEFILE_DIR)driverlib.lib
@ rm -f $(MAKEFILE_DIR)*.obj
$(COMPILER_TOOL) --compiler_revision
@ echo CCS: Compile adi.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/adi.c"
@ echo CCS: Compile aon_batmon.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/aon_batmon.c"
@ echo CCS: Compile aon_event.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/aon_event.c"
@ echo CCS: Compile aon_ioc.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/aon_ioc.c"
@ echo CCS: Compile aon_rtc.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/aon_rtc.c"
@ echo CCS: Compile aon_wuc.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/aon_wuc.c"
@ echo CCS: Compile aux_adc.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/aux_adc.c"
@ echo CCS: Compile aux_smph.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/aux_smph.c"
@ echo CCS: Compile aux_tdc.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/aux_tdc.c"
@ echo CCS: Compile aux_timer.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/aux_timer.c"
@ echo CCS: Compile aux_wuc.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/aux_wuc.c"
@ echo CCS: Compile ccfgread.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/ccfgread.c"
@ echo CCS: Compile chipinfo.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/chipinfo.c"
@ echo CCS: Compile cpu.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/cpu.c"
@ echo CCS: Compile crypto.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/crypto.c"
@ echo CCS: Compile ddi.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/ddi.c"
@ echo CCS: Compile debug.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/debug.c"
@ echo CCS: Compile driverlib_release.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/driverlib_release.c"
@ echo CCS: Compile event.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/event.c"
@ echo CCS: Compile flash.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/flash.c"
@ echo CCS: Compile gpio.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/gpio.c"
@ echo CCS: Compile i2c.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/i2c.c"
@ echo CCS: Compile i2s.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/i2s.c"
@ echo CCS: Compile interrupt.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/interrupt.c"
@ echo CCS: Compile ioc.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/ioc.c"
@ echo CCS: Compile osc.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/osc.c"
@ echo CCS: Compile prcm.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/prcm.c"
@ echo CCS: Compile pwr_ctrl.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/pwr_ctrl.c"
@ echo CCS: Compile rfc.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/rfc.c"
@ echo CCS: Compile rom_crypto.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/rom_crypto.c"
@ echo CCS: Compile setup.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/setup.c"
@ echo CCS: Compile setup_rom.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/setup_rom.c"
@ echo CCS: Compile smph.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/smph.c"
@ echo CCS: Compile ssi.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/ssi.c"
@ echo CCS: Compile sw_chacha.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/sw_chacha.c"
@ echo CCS: Compile sw_poly1305-donna.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/sw_poly1305-donna.c"
@ echo CCS: Compile systick.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/systick.c"
@ echo CCS: Compile sys_ctrl.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/sys_ctrl.c"
@ echo CCS: Compile timer.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/timer.c"
@ echo CCS: Compile trng.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/trng.c"
@ echo CCS: Compile uart.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/uart.c"
@ echo CCS: Compile udma.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/udma.c"
@ echo CCS: Compile vims.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/vims.c"
@ echo CCS: Compile watchdog.c
@ $(COMPILER_TOOL) --silicon_version=7M3 --code_state=16 --abi=eabi -me --opt_level=4 --opt_for_speed=0 --include_path=$(COMPILER_INCL) -g --gcc --define=ccs --display_error_number --diag_warning=225 --gen_func_subsections=on --preproc_with_compile "$(MAKEFILE_DIR)../../../driverlib/watchdog.c"
@ echo CCS: Archive driverlib.lib
@ $(ARCHIVER_TOOL) r "driverlib.lib" "$(MAKEFILE_DIR)adi.obj" "$(MAKEFILE_DIR)aon_batmon.obj" "$(MAKEFILE_DIR)aon_event.obj" "$(MAKEFILE_DIR)aon_ioc.obj" "$(MAKEFILE_DIR)aon_rtc.obj" "$(MAKEFILE_DIR)aon_wuc.obj" "$(MAKEFILE_DIR)aux_adc.obj" "$(MAKEFILE_DIR)aux_smph.obj" "$(MAKEFILE_DIR)aux_tdc.obj" "$(MAKEFILE_DIR)aux_timer.obj" "$(MAKEFILE_DIR)aux_wuc.obj" "$(MAKEFILE_DIR)ccfgread.obj" "$(MAKEFILE_DIR)chipinfo.obj" "$(MAKEFILE_DIR)cpu.obj" "$(MAKEFILE_DIR)crypto.obj" "$(MAKEFILE_DIR)ddi.obj" "$(MAKEFILE_DIR)debug.obj" "$(MAKEFILE_DIR)driverlib_release.obj" "$(MAKEFILE_DIR)event.obj" "$(MAKEFILE_DIR)flash.obj" "$(MAKEFILE_DIR)gpio.obj" "$(MAKEFILE_DIR)i2c.obj" "$(MAKEFILE_DIR)i2s.obj" "$(MAKEFILE_DIR)interrupt.obj" "$(MAKEFILE_DIR)ioc.obj" "$(MAKEFILE_DIR)osc.obj" "$(MAKEFILE_DIR)prcm.obj" "$(MAKEFILE_DIR)pwr_ctrl.obj" "$(MAKEFILE_DIR)rfc.obj" "$(MAKEFILE_DIR)rom_crypto.obj" "$(MAKEFILE_DIR)setup.obj" "$(MAKEFILE_DIR)setup_rom.obj" "$(MAKEFILE_DIR)smph.obj" "$(MAKEFILE_DIR)ssi.obj" "$(MAKEFILE_DIR)sw_chacha.obj" "$(MAKEFILE_DIR)sw_poly1305-donna.obj" "$(MAKEFILE_DIR)systick.obj" "$(MAKEFILE_DIR)sys_ctrl.obj" "$(MAKEFILE_DIR)timer.obj" "$(MAKEFILE_DIR)trng.obj" "$(MAKEFILE_DIR)uart.obj" "$(MAKEFILE_DIR)udma.obj" "$(MAKEFILE_DIR)vims.obj" "$(MAKEFILE_DIR)watchdog.obj"
@ rm -f $(MAKEFILE_DIR)*.obj
# Deletes previous output and temporary files
clean :
@ rm -fR $(MAKEFILE_DIR)*.obj
@ rm -fR $(MAKEFILE_DIR)*.lib
Binary file not shown.
+111
View File
@@ -0,0 +1,111 @@
# Get directory of this makefile
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
# Specify the default makedefs file, which can be overridden at the command line
MAKEDEFS = $(MAKEFILE_DIR)makedefs
include $(MAKEDEFS)
# Always builds phony rules
.PHONY: all clean
# Builds driverlib.lib
all :
@ rm -f $(MAKEFILE_DIR)driverlib.lib
@ rm -f $(MAKEFILE_DIR)*.o
$(COMPILER_TOOL) --version
@ echo GCC: Compile adi.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "adi.o" $(MAKEFILE_DIR)../../../driverlib/adi.c
@ echo GCC: Compile aon_batmon.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "aon_batmon.o" $(MAKEFILE_DIR)../../../driverlib/aon_batmon.c
@ echo GCC: Compile aon_event.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "aon_event.o" $(MAKEFILE_DIR)../../../driverlib/aon_event.c
@ echo GCC: Compile aon_ioc.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "aon_ioc.o" $(MAKEFILE_DIR)../../../driverlib/aon_ioc.c
@ echo GCC: Compile aon_rtc.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "aon_rtc.o" $(MAKEFILE_DIR)../../../driverlib/aon_rtc.c
@ echo GCC: Compile aon_wuc.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "aon_wuc.o" $(MAKEFILE_DIR)../../../driverlib/aon_wuc.c
@ echo GCC: Compile aux_adc.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "aux_adc.o" $(MAKEFILE_DIR)../../../driverlib/aux_adc.c
@ echo GCC: Compile aux_smph.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "aux_smph.o" $(MAKEFILE_DIR)../../../driverlib/aux_smph.c
@ echo GCC: Compile aux_tdc.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "aux_tdc.o" $(MAKEFILE_DIR)../../../driverlib/aux_tdc.c
@ echo GCC: Compile aux_timer.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "aux_timer.o" $(MAKEFILE_DIR)../../../driverlib/aux_timer.c
@ echo GCC: Compile aux_wuc.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "aux_wuc.o" $(MAKEFILE_DIR)../../../driverlib/aux_wuc.c
@ echo GCC: Compile ccfgread.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "ccfgread.o" $(MAKEFILE_DIR)../../../driverlib/ccfgread.c
@ echo GCC: Compile chipinfo.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "chipinfo.o" $(MAKEFILE_DIR)../../../driverlib/chipinfo.c
@ echo GCC: Compile cpu.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "cpu.o" $(MAKEFILE_DIR)../../../driverlib/cpu.c
@ echo GCC: Compile crypto.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "crypto.o" $(MAKEFILE_DIR)../../../driverlib/crypto.c
@ echo GCC: Compile ddi.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "ddi.o" $(MAKEFILE_DIR)../../../driverlib/ddi.c
@ echo GCC: Compile debug.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "debug.o" $(MAKEFILE_DIR)../../../driverlib/debug.c
@ echo GCC: Compile driverlib_release.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "driverlib_release.o" $(MAKEFILE_DIR)../../../driverlib/driverlib_release.c
@ echo GCC: Compile event.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "event.o" $(MAKEFILE_DIR)../../../driverlib/event.c
@ echo GCC: Compile flash.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "flash.o" $(MAKEFILE_DIR)../../../driverlib/flash.c
@ echo GCC: Compile gpio.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "gpio.o" $(MAKEFILE_DIR)../../../driverlib/gpio.c
@ echo GCC: Compile i2c.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "i2c.o" $(MAKEFILE_DIR)../../../driverlib/i2c.c
@ echo GCC: Compile i2s.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "i2s.o" $(MAKEFILE_DIR)../../../driverlib/i2s.c
@ echo GCC: Compile interrupt.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "interrupt.o" $(MAKEFILE_DIR)../../../driverlib/interrupt.c
@ echo GCC: Compile ioc.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "ioc.o" $(MAKEFILE_DIR)../../../driverlib/ioc.c
@ echo GCC: Compile osc.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "osc.o" $(MAKEFILE_DIR)../../../driverlib/osc.c
@ echo GCC: Compile prcm.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "prcm.o" $(MAKEFILE_DIR)../../../driverlib/prcm.c
@ echo GCC: Compile pwr_ctrl.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "pwr_ctrl.o" $(MAKEFILE_DIR)../../../driverlib/pwr_ctrl.c
@ echo GCC: Compile rfc.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "rfc.o" $(MAKEFILE_DIR)../../../driverlib/rfc.c
@ echo GCC: Compile rom_crypto.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "rom_crypto.o" $(MAKEFILE_DIR)../../../driverlib/rom_crypto.c
@ echo GCC: Compile setup.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "setup.o" $(MAKEFILE_DIR)../../../driverlib/setup.c
@ echo GCC: Compile setup_rom.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "setup_rom.o" $(MAKEFILE_DIR)../../../driverlib/setup_rom.c
@ echo GCC: Compile smph.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "smph.o" $(MAKEFILE_DIR)../../../driverlib/smph.c
@ echo GCC: Compile ssi.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "ssi.o" $(MAKEFILE_DIR)../../../driverlib/ssi.c
@ echo GCC: Compile sw_chacha.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "sw_chacha.o" $(MAKEFILE_DIR)../../../driverlib/sw_chacha.c
@ echo GCC: Compile sw_poly1305-donna.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "sw_poly1305-donna.o" $(MAKEFILE_DIR)../../../driverlib/sw_poly1305-donna.c
@ echo GCC: Compile systick.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "systick.o" $(MAKEFILE_DIR)../../../driverlib/systick.c
@ echo GCC: Compile sys_ctrl.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "sys_ctrl.o" $(MAKEFILE_DIR)../../../driverlib/sys_ctrl.c
@ echo GCC: Compile timer.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "timer.o" $(MAKEFILE_DIR)../../../driverlib/timer.c
@ echo GCC: Compile trng.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "trng.o" $(MAKEFILE_DIR)../../../driverlib/trng.c
@ echo GCC: Compile uart.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "uart.o" $(MAKEFILE_DIR)../../../driverlib/uart.c
@ echo GCC: Compile udma.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "udma.o" $(MAKEFILE_DIR)../../../driverlib/udma.c
@ echo GCC: Compile vims.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "vims.o" $(MAKEFILE_DIR)../../../driverlib/vims.c
@ echo GCC: Compile watchdog.c
@ $(COMPILER_TOOL) -mthumb -mcpu=cortex-m3 -Os -Wall -fno-strict-aliasing -pedantic -ffunction-sections -fdata-sections -std=c99 -c --asm -g -o "watchdog.o" $(MAKEFILE_DIR)../../../driverlib/watchdog.c
@ echo GCC: Archive driverlib.lib
@ $(ARCHIVER_TOOL) rcs $(MAKEFILE_DIR)driverlib.lib $(MAKEFILE_DIR)adi.o $(MAKEFILE_DIR)aon_batmon.o $(MAKEFILE_DIR)aon_event.o $(MAKEFILE_DIR)aon_ioc.o $(MAKEFILE_DIR)aon_rtc.o $(MAKEFILE_DIR)aon_wuc.o $(MAKEFILE_DIR)aux_adc.o $(MAKEFILE_DIR)aux_smph.o $(MAKEFILE_DIR)aux_tdc.o $(MAKEFILE_DIR)aux_timer.o $(MAKEFILE_DIR)aux_wuc.o $(MAKEFILE_DIR)ccfgread.o $(MAKEFILE_DIR)chipinfo.o $(MAKEFILE_DIR)cpu.o $(MAKEFILE_DIR)crypto.o $(MAKEFILE_DIR)ddi.o $(MAKEFILE_DIR)debug.o $(MAKEFILE_DIR)driverlib_release.o $(MAKEFILE_DIR)event.o $(MAKEFILE_DIR)flash.o $(MAKEFILE_DIR)gpio.o $(MAKEFILE_DIR)i2c.o $(MAKEFILE_DIR)i2s.o $(MAKEFILE_DIR)interrupt.o $(MAKEFILE_DIR)ioc.o $(MAKEFILE_DIR)osc.o $(MAKEFILE_DIR)prcm.o $(MAKEFILE_DIR)pwr_ctrl.o $(MAKEFILE_DIR)rfc.o $(MAKEFILE_DIR)rom_crypto.o $(MAKEFILE_DIR)setup.o $(MAKEFILE_DIR)setup_rom.o $(MAKEFILE_DIR)smph.o $(MAKEFILE_DIR)ssi.o $(MAKEFILE_DIR)sw_chacha.o $(MAKEFILE_DIR)sw_poly1305-donna.o $(MAKEFILE_DIR)systick.o $(MAKEFILE_DIR)sys_ctrl.o $(MAKEFILE_DIR)timer.o $(MAKEFILE_DIR)trng.o $(MAKEFILE_DIR)uart.o $(MAKEFILE_DIR)udma.o $(MAKEFILE_DIR)vims.o $(MAKEFILE_DIR)watchdog.o
@ rm -f $(MAKEFILE_DIR)*.o
# Deletes previous output and temporary files
clean :
@ rm -fR $(MAKEFILE_DIR)*.o
@ rm -fR $(MAKEFILE_DIR)*.lib
Binary file not shown.
@@ -0,0 +1,3 @@
COMPILER_TOOL = "/cygdrive/c/Program Files (x86)/IAR Systems/iar_ewarm_8_11_1/arm/bin/iccarm.exe"
ARCHIVER_TOOL = "/cygdrive/c/Program Files (x86)/IAR Systems/iar_ewarm_8_11_1/arm/bin/iarchive.exe"
OBJ_MANIP_TOOL = "/cygdrive/c/Program Files (x86)/IAR Systems/iar_ewarm_8_11_1/arm/bin/iobjmanip.exe"
+160
View File
@@ -0,0 +1,160 @@
# Get directory of this makefile
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
# Specify the default makedefs file, which can be overridden at the command line
MAKEDEFS = $(MAKEFILE_DIR)makedefs
include $(MAKEDEFS)
# Always builds phony rules
.PHONY: all clean
ifndef ADD_PARAM
ADD_PARAM=
endif
# Builds driverlib.lib
all :
@ rm -f $(MAKEFILE_DIR)driverlib.lib
@ rm -f $(MAKEFILE_DIR)*.o
@ echo ADD_PARAM = \"$(ADD_PARAM)\"
$(COMPILER_TOOL) --version
@ echo IAR: Compile adi.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/adi.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)adi.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)adi.o $(MAKEFILE_DIR)adi.o
@ echo IAR: Compile aon_batmon.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/aon_batmon.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)aon_batmon.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)aon_batmon.o $(MAKEFILE_DIR)aon_batmon.o
@ echo IAR: Compile aon_event.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/aon_event.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)aon_event.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)aon_event.o $(MAKEFILE_DIR)aon_event.o
@ echo IAR: Compile aon_ioc.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/aon_ioc.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)aon_ioc.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)aon_ioc.o $(MAKEFILE_DIR)aon_ioc.o
@ echo IAR: Compile aon_rtc.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/aon_rtc.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)aon_rtc.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)aon_rtc.o $(MAKEFILE_DIR)aon_rtc.o
@ echo IAR: Compile aon_wuc.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/aon_wuc.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)aon_wuc.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)aon_wuc.o $(MAKEFILE_DIR)aon_wuc.o
@ echo IAR: Compile aux_adc.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/aux_adc.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)aux_adc.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)aux_adc.o $(MAKEFILE_DIR)aux_adc.o
@ echo IAR: Compile aux_smph.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/aux_smph.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)aux_smph.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)aux_smph.o $(MAKEFILE_DIR)aux_smph.o
@ echo IAR: Compile aux_tdc.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/aux_tdc.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)aux_tdc.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)aux_tdc.o $(MAKEFILE_DIR)aux_tdc.o
@ echo IAR: Compile aux_timer.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/aux_timer.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)aux_timer.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)aux_timer.o $(MAKEFILE_DIR)aux_timer.o
@ echo IAR: Compile aux_wuc.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/aux_wuc.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)aux_wuc.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)aux_wuc.o $(MAKEFILE_DIR)aux_wuc.o
@ echo IAR: Compile ccfgread.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/ccfgread.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)ccfgread.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)ccfgread.o $(MAKEFILE_DIR)ccfgread.o
@ echo IAR: Compile chipinfo.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/chipinfo.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)chipinfo.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)chipinfo.o $(MAKEFILE_DIR)chipinfo.o
@ echo IAR: Compile cpu.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/cpu.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)cpu.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)cpu.o $(MAKEFILE_DIR)cpu.o
@ echo IAR: Compile crypto.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/crypto.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)crypto.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)crypto.o $(MAKEFILE_DIR)crypto.o
@ echo IAR: Compile ddi.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/ddi.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)ddi.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)ddi.o $(MAKEFILE_DIR)ddi.o
@ echo IAR: Compile debug.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/debug.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)debug.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)debug.o $(MAKEFILE_DIR)debug.o
@ echo IAR: Compile driverlib_release.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/driverlib_release.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)driverlib_release.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)driverlib_release.o $(MAKEFILE_DIR)driverlib_release.o
@ echo IAR: Compile event.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/event.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)event.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)event.o $(MAKEFILE_DIR)event.o
@ echo IAR: Compile flash.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/flash.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)flash.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)flash.o $(MAKEFILE_DIR)flash.o
@ echo IAR: Compile gpio.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/gpio.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)gpio.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)gpio.o $(MAKEFILE_DIR)gpio.o
@ echo IAR: Compile i2c.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/i2c.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)i2c.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)i2c.o $(MAKEFILE_DIR)i2c.o
@ echo IAR: Compile i2s.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/i2s.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)i2s.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)i2s.o $(MAKEFILE_DIR)i2s.o
@ echo IAR: Compile interrupt.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/interrupt.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)interrupt.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)interrupt.o $(MAKEFILE_DIR)interrupt.o
@ echo IAR: Compile ioc.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/ioc.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)ioc.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)ioc.o $(MAKEFILE_DIR)ioc.o
@ echo IAR: Compile osc.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/osc.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)osc.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)osc.o $(MAKEFILE_DIR)osc.o
@ echo IAR: Compile prcm.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/prcm.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)prcm.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)prcm.o $(MAKEFILE_DIR)prcm.o
@ echo IAR: Compile pwr_ctrl.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/pwr_ctrl.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)pwr_ctrl.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)pwr_ctrl.o $(MAKEFILE_DIR)pwr_ctrl.o
@ echo IAR: Compile rfc.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/rfc.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)rfc.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)rfc.o $(MAKEFILE_DIR)rfc.o
@ echo IAR: Compile rom_crypto.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/rom_crypto.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)rom_crypto.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)rom_crypto.o $(MAKEFILE_DIR)rom_crypto.o
@ echo IAR: Compile setup.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/setup.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)setup.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)setup.o $(MAKEFILE_DIR)setup.o
@ echo IAR: Compile setup_rom.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/setup_rom.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)setup_rom.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)setup_rom.o $(MAKEFILE_DIR)setup_rom.o
@ echo IAR: Compile smph.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/smph.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)smph.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)smph.o $(MAKEFILE_DIR)smph.o
@ echo IAR: Compile ssi.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/ssi.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)ssi.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)ssi.o $(MAKEFILE_DIR)ssi.o
@ echo IAR: Compile sw_chacha.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/sw_chacha.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)sw_chacha.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)sw_chacha.o $(MAKEFILE_DIR)sw_chacha.o
@ echo IAR: Compile sw_poly1305-donna.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/sw_poly1305-donna.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)sw_poly1305-donna.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)sw_poly1305-donna.o $(MAKEFILE_DIR)sw_poly1305-donna.o
@ echo IAR: Compile systick.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/systick.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)systick.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)systick.o $(MAKEFILE_DIR)systick.o
@ echo IAR: Compile sys_ctrl.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/sys_ctrl.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)sys_ctrl.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)sys_ctrl.o $(MAKEFILE_DIR)sys_ctrl.o
@ echo IAR: Compile timer.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/timer.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)timer.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)timer.o $(MAKEFILE_DIR)timer.o
@ echo IAR: Compile trng.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/trng.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)trng.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)trng.o $(MAKEFILE_DIR)trng.o
@ echo IAR: Compile uart.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/uart.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)uart.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)uart.o $(MAKEFILE_DIR)uart.o
@ echo IAR: Compile udma.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/udma.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)udma.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)udma.o $(MAKEFILE_DIR)udma.o
@ echo IAR: Compile vims.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/vims.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)vims.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)vims.o $(MAKEFILE_DIR)vims.o
@ echo IAR: Compile watchdog.c
@ $(COMPILER_TOOL) $(MAKEFILE_DIR)../../../driverlib/watchdog.c -D nDEBUG $(ADD_PARAM) -o $(MAKEFILE_DIR)watchdog.o --no_clustering --debug --endian=little --cpu=Cortex-M3 -e --fpu=None -Ohz --require_prototypes --silent
@ $(OBJ_MANIP_TOOL) --remove_file_path --remove_section ".comment" --silent $(MAKEFILE_DIR)watchdog.o $(MAKEFILE_DIR)watchdog.o
@ echo IAR: Archive driverlib.lib
@ $(ARCHIVER_TOOL) $(MAKEFILE_DIR)adi.o $(MAKEFILE_DIR)aon_batmon.o $(MAKEFILE_DIR)aon_event.o $(MAKEFILE_DIR)aon_ioc.o $(MAKEFILE_DIR)aon_rtc.o $(MAKEFILE_DIR)aon_wuc.o $(MAKEFILE_DIR)aux_adc.o $(MAKEFILE_DIR)aux_smph.o $(MAKEFILE_DIR)aux_tdc.o $(MAKEFILE_DIR)aux_timer.o $(MAKEFILE_DIR)aux_wuc.o $(MAKEFILE_DIR)ccfgread.o $(MAKEFILE_DIR)chipinfo.o $(MAKEFILE_DIR)cpu.o $(MAKEFILE_DIR)crypto.o $(MAKEFILE_DIR)ddi.o $(MAKEFILE_DIR)debug.o $(MAKEFILE_DIR)driverlib_release.o $(MAKEFILE_DIR)event.o $(MAKEFILE_DIR)flash.o $(MAKEFILE_DIR)gpio.o $(MAKEFILE_DIR)i2c.o $(MAKEFILE_DIR)i2s.o $(MAKEFILE_DIR)interrupt.o $(MAKEFILE_DIR)ioc.o $(MAKEFILE_DIR)osc.o $(MAKEFILE_DIR)prcm.o $(MAKEFILE_DIR)pwr_ctrl.o $(MAKEFILE_DIR)rfc.o $(MAKEFILE_DIR)rom_crypto.o $(MAKEFILE_DIR)setup.o $(MAKEFILE_DIR)setup_rom.o $(MAKEFILE_DIR)smph.o $(MAKEFILE_DIR)ssi.o $(MAKEFILE_DIR)sw_chacha.o $(MAKEFILE_DIR)sw_poly1305-donna.o $(MAKEFILE_DIR)systick.o $(MAKEFILE_DIR)sys_ctrl.o $(MAKEFILE_DIR)timer.o $(MAKEFILE_DIR)trng.o $(MAKEFILE_DIR)uart.o $(MAKEFILE_DIR)udma.o $(MAKEFILE_DIR)vims.o $(MAKEFILE_DIR)watchdog.o --create -o $(MAKEFILE_DIR)driverlib.lib
@ rm -f $(MAKEFILE_DIR)*.o
# Deletes previous output and temporary files
clean :
@ rm -fR $(MAKEFILE_DIR)*.o
@ rm -fR $(MAKEFILE_DIR)*.lib
Binary file not shown.
@@ -0,0 +1,111 @@
# Get directory of this makefile
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
# Specify the default makedefs file, which can be overridden at the command line
MAKEDEFS = $(MAKEFILE_DIR)makedefs
include $(MAKEDEFS)
# Always builds phony rules
.PHONY: all clean
# Builds driverlib.lib
all :
@ rm -f $(MAKEFILE_DIR)driverlib.lib
@ rm -f $(MAKEFILE_DIR)*.o
$(COMPILER_TOOL) --version_number
@ echo KEIL: Compile adi.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "adi.o" $(MAKEFILE_DIR)../../../driverlib/adi.c
@ echo KEIL: Compile aon_batmon.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "aon_batmon.o" $(MAKEFILE_DIR)../../../driverlib/aon_batmon.c
@ echo KEIL: Compile aon_event.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "aon_event.o" $(MAKEFILE_DIR)../../../driverlib/aon_event.c
@ echo KEIL: Compile aon_ioc.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "aon_ioc.o" $(MAKEFILE_DIR)../../../driverlib/aon_ioc.c
@ echo KEIL: Compile aon_rtc.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "aon_rtc.o" $(MAKEFILE_DIR)../../../driverlib/aon_rtc.c
@ echo KEIL: Compile aon_wuc.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "aon_wuc.o" $(MAKEFILE_DIR)../../../driverlib/aon_wuc.c
@ echo KEIL: Compile aux_adc.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "aux_adc.o" $(MAKEFILE_DIR)../../../driverlib/aux_adc.c
@ echo KEIL: Compile aux_smph.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "aux_smph.o" $(MAKEFILE_DIR)../../../driverlib/aux_smph.c
@ echo KEIL: Compile aux_tdc.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "aux_tdc.o" $(MAKEFILE_DIR)../../../driverlib/aux_tdc.c
@ echo KEIL: Compile aux_timer.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "aux_timer.o" $(MAKEFILE_DIR)../../../driverlib/aux_timer.c
@ echo KEIL: Compile aux_wuc.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "aux_wuc.o" $(MAKEFILE_DIR)../../../driverlib/aux_wuc.c
@ echo KEIL: Compile ccfgread.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "ccfgread.o" $(MAKEFILE_DIR)../../../driverlib/ccfgread.c
@ echo KEIL: Compile chipinfo.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "chipinfo.o" $(MAKEFILE_DIR)../../../driverlib/chipinfo.c
@ echo KEIL: Compile cpu.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "cpu.o" $(MAKEFILE_DIR)../../../driverlib/cpu.c
@ echo KEIL: Compile crypto.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "crypto.o" $(MAKEFILE_DIR)../../../driverlib/crypto.c
@ echo KEIL: Compile ddi.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "ddi.o" $(MAKEFILE_DIR)../../../driverlib/ddi.c
@ echo KEIL: Compile debug.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "debug.o" $(MAKEFILE_DIR)../../../driverlib/debug.c
@ echo KEIL: Compile driverlib_release.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "driverlib_release.o" $(MAKEFILE_DIR)../../../driverlib/driverlib_release.c
@ echo KEIL: Compile event.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "event.o" $(MAKEFILE_DIR)../../../driverlib/event.c
@ echo KEIL: Compile flash.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "flash.o" $(MAKEFILE_DIR)../../../driverlib/flash.c
@ echo KEIL: Compile gpio.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "gpio.o" $(MAKEFILE_DIR)../../../driverlib/gpio.c
@ echo KEIL: Compile i2c.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "i2c.o" $(MAKEFILE_DIR)../../../driverlib/i2c.c
@ echo KEIL: Compile i2s.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "i2s.o" $(MAKEFILE_DIR)../../../driverlib/i2s.c
@ echo KEIL: Compile interrupt.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "interrupt.o" $(MAKEFILE_DIR)../../../driverlib/interrupt.c
@ echo KEIL: Compile ioc.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "ioc.o" $(MAKEFILE_DIR)../../../driverlib/ioc.c
@ echo KEIL: Compile osc.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "osc.o" $(MAKEFILE_DIR)../../../driverlib/osc.c
@ echo KEIL: Compile prcm.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "prcm.o" $(MAKEFILE_DIR)../../../driverlib/prcm.c
@ echo KEIL: Compile pwr_ctrl.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "pwr_ctrl.o" $(MAKEFILE_DIR)../../../driverlib/pwr_ctrl.c
@ echo KEIL: Compile rfc.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "rfc.o" $(MAKEFILE_DIR)../../../driverlib/rfc.c
@ echo KEIL: Compile rom_crypto.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "rom_crypto.o" $(MAKEFILE_DIR)../../../driverlib/rom_crypto.c
@ echo KEIL: Compile setup.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "setup.o" $(MAKEFILE_DIR)../../../driverlib/setup.c
@ echo KEIL: Compile setup_rom.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "setup_rom.o" $(MAKEFILE_DIR)../../../driverlib/setup_rom.c
@ echo KEIL: Compile smph.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "smph.o" $(MAKEFILE_DIR)../../../driverlib/smph.c
@ echo KEIL: Compile ssi.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "ssi.o" $(MAKEFILE_DIR)../../../driverlib/ssi.c
@ echo KEIL: Compile sw_chacha.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "sw_chacha.o" $(MAKEFILE_DIR)../../../driverlib/sw_chacha.c
@ echo KEIL: Compile sw_poly1305-donna.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "sw_poly1305-donna.o" $(MAKEFILE_DIR)../../../driverlib/sw_poly1305-donna.c
@ echo KEIL: Compile systick.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "systick.o" $(MAKEFILE_DIR)../../../driverlib/systick.c
@ echo KEIL: Compile sys_ctrl.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "sys_ctrl.o" $(MAKEFILE_DIR)../../../driverlib/sys_ctrl.c
@ echo KEIL: Compile timer.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "timer.o" $(MAKEFILE_DIR)../../../driverlib/timer.c
@ echo KEIL: Compile trng.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "trng.o" $(MAKEFILE_DIR)../../../driverlib/trng.c
@ echo KEIL: Compile uart.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "uart.o" $(MAKEFILE_DIR)../../../driverlib/uart.c
@ echo KEIL: Compile udma.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "udma.o" $(MAKEFILE_DIR)../../../driverlib/udma.c
@ echo KEIL: Compile vims.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "vims.o" $(MAKEFILE_DIR)../../../driverlib/vims.c
@ echo KEIL: Compile watchdog.c
@ $(COMPILER_TOOL) -c --cpu=Cortex-M3 -D__EVAL --li -O3 -Ospace --apcs=interwork --c99 --reduce_paths -Drvmdk -o "watchdog.o" $(MAKEFILE_DIR)../../../driverlib/watchdog.c
@ echo KEIL: Archive driverlib.lib
@ $(ARCHIVER_TOOL) --create $(MAKEFILE_DIR)driverlib.lib $(MAKEFILE_DIR)adi.o $(MAKEFILE_DIR)aon_batmon.o $(MAKEFILE_DIR)aon_event.o $(MAKEFILE_DIR)aon_ioc.o $(MAKEFILE_DIR)aon_rtc.o $(MAKEFILE_DIR)aon_wuc.o $(MAKEFILE_DIR)aux_adc.o $(MAKEFILE_DIR)aux_smph.o $(MAKEFILE_DIR)aux_tdc.o $(MAKEFILE_DIR)aux_timer.o $(MAKEFILE_DIR)aux_wuc.o $(MAKEFILE_DIR)ccfgread.o $(MAKEFILE_DIR)chipinfo.o $(MAKEFILE_DIR)cpu.o $(MAKEFILE_DIR)crypto.o $(MAKEFILE_DIR)ddi.o $(MAKEFILE_DIR)debug.o $(MAKEFILE_DIR)driverlib_release.o $(MAKEFILE_DIR)event.o $(MAKEFILE_DIR)flash.o $(MAKEFILE_DIR)gpio.o $(MAKEFILE_DIR)i2c.o $(MAKEFILE_DIR)i2s.o $(MAKEFILE_DIR)interrupt.o $(MAKEFILE_DIR)ioc.o $(MAKEFILE_DIR)osc.o $(MAKEFILE_DIR)prcm.o $(MAKEFILE_DIR)pwr_ctrl.o $(MAKEFILE_DIR)rfc.o $(MAKEFILE_DIR)rom_crypto.o $(MAKEFILE_DIR)setup.o $(MAKEFILE_DIR)setup_rom.o $(MAKEFILE_DIR)smph.o $(MAKEFILE_DIR)ssi.o $(MAKEFILE_DIR)sw_chacha.o $(MAKEFILE_DIR)sw_poly1305-donna.o $(MAKEFILE_DIR)systick.o $(MAKEFILE_DIR)sys_ctrl.o $(MAKEFILE_DIR)timer.o $(MAKEFILE_DIR)trng.o $(MAKEFILE_DIR)uart.o $(MAKEFILE_DIR)udma.o $(MAKEFILE_DIR)vims.o $(MAKEFILE_DIR)watchdog.o
@ rm -f $(MAKEFILE_DIR)*.o
# Deletes previous output and temporary files
clean :
@ rm -fR $(MAKEFILE_DIR)*.o
@ rm -fR $(MAKEFILE_DIR)*.lib
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: ccfgread.c
* Revised: 2015-08-04 11:44:20 +0200 (Tue, 04 Aug 2015)
* Revision: 44329
* Revised: 2016-09-19 10:36:17 +0200 (Mon, 19 Sep 2016)
* Revision: 47179
*
* Description: API for reading CCFG.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,6 +36,6 @@
*
******************************************************************************/
#include <driverlib/ccfgread.h>
#include "ccfgread.h"
// See ccfgread.h for implementation
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: ccfgread.h
* Revised: 2016-01-07 20:08:22 +0100 (Thu, 07 Jan 2016)
* Revision: 45400
* Revised: 2016-09-13 14:21:40 +0200 (Tue, 13 Sep 2016)
* Revision: 47152
*
* Description: API for reading CCFG.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,9 +61,9 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_ccfg.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_ccfg.h"
//*****************************************************************************
//
@@ -3,7 +3,7 @@
* Revised: 2016-03-30 13:03:59 +0200 (Wed, 30 Mar 2016)
* Revision: 45971
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: chipinfo.c
* Revised: 2016-05-24 15:42:33 +0200 (Tue, 24 May 2016)
* Revision: 46464
* Revised: 2017-01-06 12:37:45 +0100 (Fri, 06 Jan 2017)
* Revision: 48166
*
* Description: Collection of functions returning chip information.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,7 @@
*
******************************************************************************/
#include <driverlib/chipinfo.h>
#include "chipinfo.h"
//*****************************************************************************
//
@@ -55,8 +55,8 @@
#define ChipInfo_GetChipFamily NOROM_ChipInfo_GetChipFamily
#undef ChipInfo_GetHwRevision
#define ChipInfo_GetHwRevision NOROM_ChipInfo_GetHwRevision
#undef ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated
#define ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated NOROM_ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated
#undef ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated
#define ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated NOROM_ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated
#endif
//*****************************************************************************
@@ -70,7 +70,6 @@ ChipInfo_GetSupportedProtocol_BV( void )
return ((ProtocolBitVector_t)( HWREG( PRCM_BASE + 0x1D4 ) & 0x0E ));
}
//*****************************************************************************
//
// ChipInfo_GetPackageType()
@@ -84,8 +83,8 @@ ChipInfo_GetPackageType( void )
FCFG1_USER_ID_PKG_M ) >>
FCFG1_USER_ID_PKG_S ) ;
if (( packType < PACKAGE_4x4 ) ||
( packType > PACKAGE_WCSP ) )
if (( packType < PACKAGE_4x4 ) ||
( packType > PACKAGE_7x7_Q1 ) )
{
packType = PACKAGE_Unknown;
}
@@ -101,27 +100,24 @@ ChipInfo_GetPackageType( void )
ChipFamily_t
ChipInfo_GetChipFamily( void )
{
ChipFamily_t chipFam = FAMILY_Unknown ;
uint32_t waferId ;
ChipFamily_t chipFam = FAMILY_Unknown ;
waferId = (( HWREG( FCFG1_BASE + FCFG1_O_ICEPICK_DEVICE_ID ) &
FCFG1_ICEPICK_DEVICE_ID_WAFER_ID_M ) >>
FCFG1_ICEPICK_DEVICE_ID_WAFER_ID_S ) ;
FCFG1_ICEPICK_DEVICE_ID_WAFER_ID_M ) >>
FCFG1_ICEPICK_DEVICE_ID_WAFER_ID_S ) ;
if ( waferId == 0xB99A ) {
if ( ChipInfo_GetDeviceIdHwRevCode() == 0xB ) {
chipFam = FAMILY_CC26xx_R2 ;
chipFam = FAMILY_CC26x0R2 ;
} else {
chipFam = FAMILY_CC26xx ;
chipFam = FAMILY_CC26x0 ;
}
} else if ( waferId == 0xB9BE ) chipFam = FAMILY_CC13xx ;
else if ( waferId == 0xBB41 ) chipFam = FAMILY_CC26xx_Aga ;
else if ( waferId == 0xBB20 ) chipFam = FAMILY_CC26xx_Liz ;
}
return ( chipFam );
}
//*****************************************************************************
//
// ChipInfo_GetChipType()
@@ -130,45 +126,40 @@ ChipInfo_GetChipFamily( void )
ChipType_t
ChipInfo_GetChipType( void )
{
ChipType_t chipType = CHIP_TYPE_Unknown ;
uint32_t fcfg1UserId = ChipInfo_GetUserId();
uint32_t fcfg1Protocol = (( fcfg1UserId & FCFG1_USER_ID_PROTOCOL_M ) >>
FCFG1_USER_ID_PROTOCOL_S ) ;
ChipType_t chipType = CHIP_TYPE_Unknown ;
ChipFamily_t chipFam = ChipInfo_GetChipFamily() ;
uint32_t fcfg1UserId = ChipInfo_GetUserId() ;
uint32_t fcfg1Protocol = (( fcfg1UserId & FCFG1_USER_ID_PROTOCOL_M ) >>
FCFG1_USER_ID_PROTOCOL_S ) ;
switch( ChipInfo_GetChipFamily() ) {
case FAMILY_CC26xx :
if ( chipFam == FAMILY_CC26x0 ) {
switch ( fcfg1Protocol ) {
case 0x2 :
chipType = CHIP_TYPE_CC2620 ;
chipType = CHIP_TYPE_CC2620 ;
break;
case 0x4 :
chipType = CHIP_TYPE_CC2630 ;
case 0xC :
chipType = CHIP_TYPE_CC2630 ;
break;
case 0x1 :
case 0x9 :
chipType = CHIP_TYPE_CC2640 ;
if ( fcfg1UserId & ( 1 << 23 )) {
chipType = CHIP_TYPE_CUSTOM_1;
chipType = CHIP_TYPE_CUSTOM_1 ;
}
break;
case 0xF :
chipType = CHIP_TYPE_CC2650 ;
if ( fcfg1UserId & ( 1 << 24 )) {
chipType = CHIP_TYPE_CUSTOM_0;
chipType = CHIP_TYPE_CUSTOM_0 ;
}
break;
}
break;
default :
chipType = CHIP_TYPE_Unknown ;
break;
}
return ( chipType );
}
//*****************************************************************************
//
// ChipInfo_GetHwRevision()
@@ -180,70 +171,41 @@ ChipInfo_GetHwRevision( void )
HwRevision_t hwRev = HWREV_Unknown ;
uint32_t fcfg1Rev = ChipInfo_GetDeviceIdHwRevCode() ;
uint32_t minorHwRev = ChipInfo_GetMinorHwRev() ;
ChipFamily_t chipFam = ChipInfo_GetChipFamily() ;
switch( ChipInfo_GetChipFamily() ) {
case FAMILY_CC26xx :
if ( chipFam == FAMILY_CC26x0 ) {
switch ( fcfg1Rev ) {
case 1 : // CC26xx PG1.0
case 1 : // CC26x0 PG1.0
hwRev = HWREV_1_0;
break;
case 3 : // CC26xx PG2.0
case 3 : // CC26x0 PG2.0
hwRev = HWREV_2_0;
break;
case 7 : // CC26xx PG2.1
case 7 : // CC26x0 PG2.1
hwRev = HWREV_2_1;
break;
case 8 : // CC26xx PG2.2 (or later)
case 8 : // CC26x0 PG2.2 (or later)
hwRev = (HwRevision_t)(((uint32_t)HWREV_2_2 ) + minorHwRev );
break;
}
break;
case FAMILY_CC13xx :
switch ( fcfg1Rev ) {
case 0 : // CC13xx PG1.0
hwRev = HWREV_1_0;
break;
case 2 : // CC13xx PG2.0 (or later)
hwRev = (HwRevision_t)(((uint32_t)HWREV_2_0 ) + minorHwRev );
break;
}
break;
case FAMILY_CC26xx_Liz :
case FAMILY_CC26xx_Aga :
switch ( fcfg1Rev ) {
case 0 : // CC26xx_Liz or CC26xx_Aga PG1.0 (or later)
hwRev = (HwRevision_t)(((uint32_t)HWREV_1_0 ) + minorHwRev );
break;
}
break;
case FAMILY_CC26xx_R2 :
hwRev = (HwRevision_t)(((uint32_t)HWREV_1_0 ) + minorHwRev );
break;
default :
// GCC gives warning if not handling all options explicitly in a "switch" on a variable of type "enum"
break;
}
return ( hwRev );
}
//*****************************************************************************
// ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated()
// ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated()
//*****************************************************************************
void
ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated( void )
ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated( void )
{
if (( ! ChipInfo_ChipFamilyIsCC26xx() ) ||
if (( ! ChipInfo_ChipFamilyIs_CC26x0() ) ||
( ! ChipInfo_HwRevisionIs_GTEQ_2_2() ) )
{
while(1)
{
//
// This driverlib version is for CC26xx PG2.2 and later
// This driverlib version is for CC26x0 PG2.2 and later
// Do nothing - stay here forever
//
}
}
}
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: chipinfo.h
* Revised: 2016-05-24 15:42:33 +0200 (Tue, 24 May 2016)
* Revision: 46464
* Revised: 2017-01-19 13:55:31 +0100 (Thu, 19 Jan 2017)
* Revision: 48292
*
* Description: Collection of functions returning chip information.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,9 +61,9 @@ extern "C"
#include <stdint.h>
#include <stdbool.h>
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_fcfg1.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_fcfg1.h"
//*****************************************************************************
//
@@ -84,7 +84,7 @@ extern "C"
#define ChipInfo_GetChipType NOROM_ChipInfo_GetChipType
#define ChipInfo_GetChipFamily NOROM_ChipInfo_GetChipFamily
#define ChipInfo_GetHwRevision NOROM_ChipInfo_GetHwRevision
#define ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated NOROM_ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated
#define ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated NOROM_ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated
#endif
//*****************************************************************************
@@ -113,7 +113,6 @@ typedef enum {
//*****************************************************************************
extern ProtocolBitVector_t ChipInfo_GetSupportedProtocol_BV( void );
//*****************************************************************************
//
//! \brief Returns true if the chip supports the BLE protocol.
@@ -156,19 +155,22 @@ ChipInfo_SupportsPROPRIETARY( void )
return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_Proprietary ) != 0 );
}
//*****************************************************************************
//
//! \brief Package type enumeration
//!
//! \note
//! Packages available for a specific device are shown in the device datasheet.
//
//*****************************************************************************
typedef enum {
PACKAGE_Unknown = -1, //!< -1 means that current chip type is unknown.
PACKAGE_4x4 = 0, //!< 0 means that this is a 4x4mm chip.
PACKAGE_5x5 = 1, //!< 1 means that this is a 5x5mm chip.
PACKAGE_7x7 = 2, //!< 2 means that this is a 7x7mm chip.
PACKAGE_WAFER = 3, //!< 3 means that this is a wafer sale chip (naked die).
PACKAGE_WCSP = 4 //!< 4 means that this is a WCSP chip (flip chip).
PACKAGE_Unknown = -1, //!< -1 means that current package type is unknown.
PACKAGE_4x4 = 0, //!< 0 means that this is a 4x4 mm QFN (RHB) package.
PACKAGE_5x5 = 1, //!< 1 means that this is a 5x5 mm QFN (RSM) package.
PACKAGE_7x7 = 2, //!< 2 means that this is a 7x7 mm QFN (RGZ) package.
PACKAGE_WAFER = 3, //!< 3 means that this is a wafer sale package (naked die).
PACKAGE_WCSP = 4, //!< 4 means that this is a 2.7x2.7 mm WCSP (YFV).
PACKAGE_7x7_Q1 = 5 //!< 5 means that this is a 7x7 mm QFN package with Wettable Flanks.
} PackageType_t;
//*****************************************************************************
@@ -251,6 +253,19 @@ ChipInfo_PackageTypeIsWCSP( void )
return ( ChipInfo_GetPackageType() == PACKAGE_WCSP );
}
//*****************************************************************************
//
//! \brief Returns true if this is a 7x7 Q1 chip.
//!
//! \return
//! Returns \c true if this is a 7x7 Q1 chip, \c false otherwise.
//
//*****************************************************************************
__STATIC_INLINE bool
ChipInfo_PackageTypeIs7x7Q1( void )
{
return ( ChipInfo_GetPackageType() == PACKAGE_7x7_Q1 );
}
//*****************************************************************************
//
@@ -291,7 +306,6 @@ ChipInfo_GetMinorHwRev( void )
return( minorRev );
}
//*****************************************************************************
//
//! \brief Returns the 32 bits USER_ID field
@@ -308,7 +322,6 @@ ChipInfo_GetUserId( void )
return ( HWREG( FCFG1_BASE + FCFG1_O_USER_ID ));
}
//*****************************************************************************
//
//! \brief Chip type enumeration
@@ -323,7 +336,8 @@ typedef enum {
CHIP_TYPE_CC2640 = 4, //!< 4 means that this is a CC2640 chip.
CHIP_TYPE_CC2650 = 5, //!< 5 means that this is a CC2650 chip.
CHIP_TYPE_CUSTOM_0 = 6, //!< 6 means that this is a CUSTOM_0 chip.
CHIP_TYPE_CUSTOM_1 = 7 //!< 7 means that this is a CUSTOM_1 chip.
CHIP_TYPE_CUSTOM_1 = 7, //!< 7 means that this is a CUSTOM_1 chip.
CHIP_TYPE_CC2640R2 = 8 //!< 4 means that this is a CC2640R2 chip.
} ChipType_t;
//*****************************************************************************
@@ -336,19 +350,18 @@ typedef enum {
//*****************************************************************************
extern ChipType_t ChipInfo_GetChipType( void );
//*****************************************************************************
//
//! \brief Chip family enumeration
//
//*****************************************************************************
typedef enum {
FAMILY_Unknown = -1, //!< -1 means that the chip's family member is unknown.
FAMILY_CC26xx = 0, //!< 0 means that the chip is a CC26x0 family member.
FAMILY_CC13xx = 1, //!< 1 means that the chip is a CC13x0 family member.
FAMILY_CC26xx_Liz = 2, //!< 2 means that the chip is a CC26x1 family member.
FAMILY_CC26xx_Aga = 3, //!< 3 means that the chip is a CCxxx2/xxx4 family member.
FAMILY_CC26xx_R2 = 4 //!< 4 means that the chip is a CC26x0_R2 family (new ROM contents).
FAMILY_Unknown = -1, //!< -1 means that the chip's family member is unknown.
FAMILY_CC26x0 = 0, //!< 0 means that the chip is a CC26x0 family member.
FAMILY_CC13x0 = 1, //!< 1 means that the chip is a CC13x0 family member.
FAMILY_CC26x1 = 2, //!< 2 means that the chip is a CC26x1 family member.
FAMILY_CC26x0R2 = 3, //!< 3 means that the chip is a CC26x0R2 family (new ROM contents).
FAMILY_CC13x2_13x4_26x2_26x4 = 4 //!< 4 means that the chip is a CC13x2, CC13x4, CC26x2, CC26x4 family member.
} ChipFamily_t;
//*****************************************************************************
@@ -363,75 +376,74 @@ extern ChipFamily_t ChipInfo_GetChipFamily( void );
//*****************************************************************************
//
//! \brief Returns true if this chip is member of the CC26xx family.
//! \brief Returns true if this chip is member of the CC13x0 family.
//!
//! \return
//! Returns \c true if this chip is member of the CC26xx family, \c false otherwise.
//! Returns \c true if this chip is member of the CC13x0 family, \c false otherwise.
//
//*****************************************************************************
__STATIC_INLINE bool
ChipInfo_ChipFamilyIsCC26xx( void )
ChipInfo_ChipFamilyIs_CC13x0( void )
{
return ( ChipInfo_GetChipFamily() == FAMILY_CC26xx );
return ( ChipInfo_GetChipFamily() == FAMILY_CC13x0 );
}
//*****************************************************************************
//
//! \brief Returns true if this chip is member of the CC13xx family.
//! \brief Returns true if this chip is member of the CC26x0 family.
//!
//! \return
//! Returns \c true if this chip is member of the CC13xx family, \c false otherwise.
//! Returns \c true if this chip is member of the CC26x0 family, \c false otherwise.
//
//*****************************************************************************
__STATIC_INLINE bool
ChipInfo_ChipFamilyIsCC13xx( void )
ChipInfo_ChipFamilyIs_CC26x0( void )
{
return ( ChipInfo_GetChipFamily() == FAMILY_CC13xx );
return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0 );
}
//*****************************************************************************
//
//! \brief Returns true if this chip is member of the CC26xx_R2 family.
//! \brief Returns true if this chip is member of the CC26x0R2 family.
//!
//! \return
//! Returns \c true if this chip is member of the CC26xx_R2 family, \c false otherwise.
//! Returns \c true if this chip is member of the CC26x0R2 family, \c false otherwise.
//
//*****************************************************************************
__STATIC_INLINE bool
ChipInfo_ChipFamilyIsCC26xx_R2( void )
ChipInfo_ChipFamilyIs_CC26x0R2( void )
{
return ( ChipInfo_GetChipFamily() == FAMILY_CC26xx_R2 );
return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0R2 );
}
//*****************************************************************************
//
//! \brief Returns true if this chip is member of the CC26xx_Liz family.
//! \brief Returns true if this chip is member of the CC26x1 family.
//!
//! \return
//! Returns \c true if this chip is member of the CC26xx_Liz family, \c false otherwise.
//! Returns \c true if this chip is member of the CC26x1 family, \c false otherwise.
//
//*****************************************************************************
__STATIC_INLINE bool
ChipInfo_ChipFamilyIsCC26xx_Liz( void )
ChipInfo_ChipFamilyIs_CC26x1( void )
{
return ( ChipInfo_GetChipFamily() == FAMILY_CC26xx_Liz );
return ( ChipInfo_GetChipFamily() == FAMILY_CC26x1 );
}
//*****************************************************************************
//
//! \brief Returns true if this chip is member of the CC26xx_Aga family.
//! \brief Returns true if this chip is member of the CC13x2, CC13x4, CC26x2, CC26x4 family.
//!
//! \return
//! Returns \c true if this chip is member of the CC26xx_Aga family, \c false otherwise.
//! Returns \c true if this chip is member of the CC13x2, CC13x4, CC26x2, CC26x4 family, \c false otherwise.
//
//*****************************************************************************
__STATIC_INLINE bool
ChipInfo_ChipFamilyIsCC26xx_Aga( void )
ChipInfo_ChipFamilyIs_CC13x2_13x4_26x2_26x4( void )
{
return ( ChipInfo_GetChipFamily() == FAMILY_CC26xx_Aga );
return ( ChipInfo_GetChipFamily() == FAMILY_CC13x2_13x4_26x2_26x4 );
}
//*****************************************************************************
//
//! \brief HW revision enumeration.
@@ -440,10 +452,12 @@ ChipInfo_ChipFamilyIsCC26xx_Aga( void )
typedef enum {
HWREV_Unknown = -1, //!< -1 means that the chip's HW revision is unknown.
HWREV_1_0 = 10, //!< 10 means that the chip's HW revision is 1.0
HWREV_1_1 = 11, //!< 10 means that the chip's HW revision is 1.0
HWREV_2_0 = 20, //!< 20 means that the chip's HW revision is 2.0
HWREV_2_1 = 21, //!< 21 means that the chip's HW revision is 2.1
HWREV_2_2 = 22, //!< 22 means that the chip's HW revision is 2.2
HWREV_2_3 = 23 //!< 23 means that the chip's HW revision is 2.3
HWREV_2_3 = 23, //!< 23 means that the chip's HW revision is 2.3
HWREV_2_4 = 24 //!< 24 means that the chip's HW revision is 2.4
} HwRevision_t;
//*****************************************************************************
@@ -568,15 +582,28 @@ ChipInfo_HwRevisionIs_GTEQ_2_3( void )
return ( ChipInfo_GetHwRevision() >= HWREV_2_3 );
}
//*****************************************************************************
//
//! \brief Returns true if HW revision for this chip is 2.4 or greater.
//!
//! \return
//! Returns \c true if HW revision for this chip is 2.4 or greater, \c false otherwise.
//
//*****************************************************************************
__STATIC_INLINE bool
ChipInfo_HwRevisionIs_GTEQ_2_4( void )
{
return ( ChipInfo_GetHwRevision() >= HWREV_2_4 );
}
//*****************************************************************************
//
//! \brief Verifies that current chip is built for CC26xx HwRev 2.2 or later and never returns if violated.
//! \brief Verifies that current chip is CC26x0 HwRev 2.2 or later and never returns if violated.
//!
//! \return None
//
//*****************************************************************************
extern void ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated( void );
extern void ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated( void );
//*****************************************************************************
//
@@ -585,7 +612,7 @@ extern void ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated( void );
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include <driverlib/rom.h>
#include "../driverlib/rom.h"
#ifdef ROM_ChipInfo_GetSupportedProtocol_BV
#undef ChipInfo_GetSupportedProtocol_BV
#define ChipInfo_GetSupportedProtocol_BV ROM_ChipInfo_GetSupportedProtocol_BV
@@ -606,9 +633,9 @@ extern void ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated( void );
#undef ChipInfo_GetHwRevision
#define ChipInfo_GetHwRevision ROM_ChipInfo_GetHwRevision
#endif
#ifdef ROM_ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated
#undef ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated
#define ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated ROM_ThisCodeIsBuiltForCC26xxHwRev22AndLater_HaltIfViolated
#ifdef ROM_ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated
#undef ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated
#define ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated ROM_ThisLibraryIsFor_CC26x0_HwRev22AndLater_HaltIfViolated
#endif
#endif
@@ -1,12 +1,12 @@
/******************************************************************************
* Filename: cpu.c
* Revised: 2016-05-30 10:10:45 +0200 (Mon, 30 May 2016)
* Revision: 46548
* Revised: 2017-01-16 19:17:22 +0100 (Mon, 16 Jan 2017)
* Revision: 48249
*
* Description: Instruction wrappers for special CPU instructions needed by
* the drivers.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,7 @@
*
******************************************************************************/
#include <driverlib/cpu.h>
#include "cpu.h"
//*****************************************************************************
//
@@ -60,24 +60,26 @@
//*****************************************************************************
//
//! Disable all external interrupts
// Disable all external interrupts
//
//*****************************************************************************
#if defined(__IAR_SYSTEMS_ICC__)
#if defined(DOXYGEN)
uint32_t
CPUcpsid(void)
{
// This function is written in assembly. See cpu.c for compiler specific implementation.
}
#elif defined(__IAR_SYSTEMS_ICC__)
uint32_t
CPUcpsid(void)
{
//
// Read PRIMASK and disable interrupts.
//
__asm(" mrs r0, PRIMASK\n"
" cpsid i\n");
//
// "Warning[Pe940]: missing return statement at end of non-void function"
// is suppressed here to avoid putting a "bx lr" in the inline assembly
// above and a superfluous return statement here.
//
#pragma diag_suppress=Pe940
}
#pragma diag_default=Pe940
@@ -85,31 +87,25 @@ CPUcpsid(void)
__asm uint32_t
CPUcpsid(void)
{
//
// Read PRIMASK and disable interrupts.
//
mrs r0, PRIMASK;
cpsid i;
bx lr
}
#elif defined(__TI_COMPILER_VERSION__) || defined(DOXYGEN)
#elif defined(__TI_COMPILER_VERSION__)
uint32_t
CPUcpsid(void)
{
//
// Read PRIMASK and disable interrupts.
//
__asm(" mrs r0, PRIMASK\n"
" cpsid i\n"
" bx lr\n");
//
// The following keeps the compiler happy, because it wants to see a
// return value from this function. It will generate code to return
// a zero. However, the real return is the "bx lr" above, so the
// return(0) is never executed and the function returns with the value
// you expect in R0.
//
return(0);
}
#else
@@ -118,43 +114,41 @@ CPUcpsid(void)
{
uint32_t ui32Ret;
//
// Read PRIMASK and disable interrupts
//
__asm(" mrs r0, PRIMASK\n"
" cpsid i\n"
" bx lr\n"
: "=r"(ui32Ret));
//
// The return is handled in the inline assembly, but the compiler will
// still complain if there is not an explicit return here (despite the fact
// that this does not result in any code being produced because of the
// naked attribute).
//
return(ui32Ret);
}
#endif
//*****************************************************************************
//
//! Get the current interrupt state
// Get the current interrupt state
//
//*****************************************************************************
#if defined(__IAR_SYSTEMS_ICC__)
#if defined(DOXYGEN)
uint32_t
CPUprimask(void)
{
// This function is written in assembly. See cpu.c for compiler specific implementation.
}
#elif defined(__IAR_SYSTEMS_ICC__)
uint32_t
CPUprimask(void)
{
//
// Read PRIMASK.
//
__asm(" mrs r0, PRIMASK\n");
//
// "Warning[Pe940]: missing return statement at end of non-void function"
// is suppressed here to avoid putting a "bx lr" in the inline assembly
// above and a superfluous return statement here.
//
#pragma diag_suppress=Pe940
}
#pragma diag_default=Pe940
@@ -162,29 +156,23 @@ CPUprimask(void)
__asm uint32_t
CPUprimask(void)
{
//
// Read PRIMASK.
//
mrs r0, PRIMASK;
bx lr
}
#elif defined(__TI_COMPILER_VERSION__) || defined(DOXYGEN)
#elif defined(__TI_COMPILER_VERSION__)
uint32_t
CPUprimask(void)
{
//
// Read PRIMASK.
//
__asm(" mrs r0, PRIMASK\n"
" bx lr\n");
//
// The following keeps the compiler happy, because it wants to see a
// return value from this function. It will generate code to return
// a zero. However, the real return is the "bx lr" above, so the
// return(0) is never executed and the function returns with the value
// you expect in R0.
//
return(0);
}
#else
@@ -193,43 +181,41 @@ CPUprimask(void)
{
uint32_t ui32Ret;
//
// Read PRIMASK
//
__asm(" mrs r0, PRIMASK\n"
" bx lr\n"
: "=r"(ui32Ret));
//
// The return is handled in the inline assembly, but the compiler will
// still complain if there is not an explicit return here (despite the fact
// that this does not result in any code being produced because of the
// naked attribute).
//
return(ui32Ret);
}
#endif
//*****************************************************************************
//
//! Enable all external interrupts
// Enable all external interrupts
//
//*****************************************************************************
#if defined(__IAR_SYSTEMS_ICC__)
#if defined(DOXYGEN)
uint32_t
CPUcpsie(void)
{
// This function is written in assembly. See cpu.c for compiler specific implementation.
}
#elif defined(__IAR_SYSTEMS_ICC__)
uint32_t
CPUcpsie(void)
{
//
// Read PRIMASK and enable interrupts.
//
__asm(" mrs r0, PRIMASK\n"
" cpsie i\n");
//
// "Warning[Pe940]: missing return statement at end of non-void function"
// is suppressed here to avoid putting a "bx lr" in the inline assembly
// above and a superfluous return statement here.
//
#pragma diag_suppress=Pe940
}
#pragma diag_default=Pe940
@@ -237,31 +223,25 @@ CPUcpsie(void)
__asm uint32_t
CPUcpsie(void)
{
//
// Read PRIMASK and enable interrupts.
//
mrs r0, PRIMASK;
cpsie i;
bx lr
}
#elif defined(__TI_COMPILER_VERSION__) || defined(DOXYGEN)
#elif defined(__TI_COMPILER_VERSION__)
uint32_t
CPUcpsie(void)
{
//
// Read PRIMASK and enable interrupts.
//
__asm(" mrs r0, PRIMASK\n"
" cpsie i\n"
" bx lr\n");
//
// The following keeps the compiler happy, because it wants to see a
// return value from this function. It will generate code to return
// a zero. However, the real return is the "bx lr" above, so the
// return(0) is never executed and the function returns with the value
// you expect in R0.
//
return(0);
}
#else
@@ -270,43 +250,41 @@ CPUcpsie(void)
{
uint32_t ui32Ret;
//
// Read PRIMASK and enable interrupts.
//
__asm(" mrs r0, PRIMASK\n"
" cpsie i\n"
" bx lr\n"
: "=r"(ui32Ret));
//
// The return is handled in the inline assembly, but the compiler will
// still complain if there is not an explicit return here (despite the fact
// that this does not result in any code being produced because of the
// naked attribute).
//
return(ui32Ret);
}
#endif
//*****************************************************************************
//
//! Get the interrupt priority disable level
// Get the interrupt priority disable level
//
//*****************************************************************************
#if defined(__IAR_SYSTEMS_ICC__)
#if defined(DOXYGEN)
uint32_t
CPUbasepriGet(void)
{
// This function is written in assembly. See cpu.c for compiler specific implementation.
}
#elif defined(__IAR_SYSTEMS_ICC__)
uint32_t
CPUbasepriGet(void)
{
//
// Read BASEPRI.
//
__asm(" mrs r0, BASEPRI\n");
//
// "Warning[Pe940]: missing return statement at end of non-void function"
// is suppressed here to avoid putting a "bx lr" in the inline assembly
// above and a superfluous return statement here.
//
#pragma diag_suppress=Pe940
}
#pragma diag_default=Pe940
@@ -314,29 +292,23 @@ CPUbasepriGet(void)
__asm uint32_t
CPUbasepriGet(void)
{
//
// Read BASEPRI.
//
mrs r0, BASEPRI;
bx lr
}
#elif defined(__TI_COMPILER_VERSION__) || defined(DOXYGEN)
#elif defined(__TI_COMPILER_VERSION__)
uint32_t
CPUbasepriGet(void)
{
//
// Read BASEPRI.
//
__asm(" mrs r0, BASEPRI\n"
" bx lr\n");
//
// The following keeps the compiler happy, because it wants to see a
// return value from this function. It will generate code to return
// a zero. However, the real return is the "bx lr" above, so the
// return(0) is never executed and the function returns with the value
// you expect in R0.
//
return(0);
}
#else
@@ -345,34 +317,34 @@ CPUbasepriGet(void)
{
uint32_t ui32Ret;
//
// Read BASEPRI.
//
__asm(" mrs r0, BASEPRI\n"
" bx lr\n"
: "=r"(ui32Ret));
//
// The return is handled in the inline assembly, but the compiler will
// still complain if there is not an explicit return here (despite the fact
// that this does not result in any code being produced because of the
// naked attribute).
//
return(ui32Ret);
}
#endif
//*****************************************************************************
//
//! Provide a small delay
// Provide a small delay
//
//*****************************************************************************
#if defined(__IAR_SYSTEMS_ICC__)
#if defined(DOXYGEN)
void
CPUdelay(uint32_t ui32Count)
{
// This function is written in assembly. See cpu.c for compiler specific implementation.
}
#elif defined(__IAR_SYSTEMS_ICC__)
void
CPUdelay(uint32_t ui32Count)
{
//
// Delay the specified number of times (3 cycles pr. loop)
//
__asm("CPUdelay:\n"
" subs r0, #1\n"
" bne.n CPUdelay\n"
@@ -384,22 +356,17 @@ CPUdelay(uint32_t ui32Count)
__asm void
CPUdelay(uint32_t ui32Count)
{
//
// Delay the specified number of times (3 cycles pr. loop)
//
CPUdel
subs r0, #1;
bne CPUdel;
bx lr;
}
#elif defined(__TI_COMPILER_VERSION__) || defined(DOXYGEN)
//
// For CCS implement this function in pure assembly. This prevents the TI
// compiler from doing funny things with the optimizer.
//
//
#elif defined(__TI_COMPILER_VERSION__)
// For CCS implement this function in pure assembly. This prevents the TI
// compiler from doing funny things with the optimizer.
// Delay the specified number of times (3 cycles pr. loop)
//
__asm(" .sect \".text:NOROM_CPUdelay\"\n"
" .clink\n"
" .thumbfunc NOROM_CPUdelay\n"
@@ -413,15 +380,9 @@ __asm(" .sect \".text:NOROM_CPUdelay\"\n"
void __attribute__((naked))
CPUdelay(uint32_t ui32Count)
{
//
// Delay the specified number of times (3 cycles pr. loop)
//
__asm(" subs %0, #1\n"
__asm(" subs r0, #1\n"
" bne NOROM_CPUdelay\n"
" bx lr"
: "+r" (ui32Count)
:
:
);
" bx lr");
}
#endif
@@ -1,12 +1,12 @@
/******************************************************************************
* Filename: cpu.h
* Revised: 2016-01-06 15:55:48 +0100 (Wed, 06 Jan 2016)
* Revision: 45385
* Revised: 2017-01-16 19:01:21 +0100 (Mon, 16 Jan 2017)
* Revision: 48248
*
* Description: Defines and prototypes for the CPU instruction wrapper
* functions.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -62,9 +62,9 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_cpu_scs.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_cpu_scs.h"
//*****************************************************************************
//
@@ -131,213 +131,6 @@ extern uint32_t CPUprimask(void);
//*****************************************************************************
extern uint32_t CPUcpsie(void);
//*****************************************************************************
//
//! \brief Wait for interrupt.
//!
//! Use this function to let the System CPU wait for the next interrupt. This
//! function is implemented as a wrapper function for the WFI instruction.
//!
//! \return None
//
//*****************************************************************************
#if defined(__IAR_SYSTEMS_ICC__)
__STATIC_INLINE void
CPUwfi(void)
{
//
// Wait for the next interrupt.
//
__asm(" wfi\n");
}
#elif defined(__CC_ARM) || defined(__ARMCC_VERSION)
__asm __STATIC_INLINE void
CPUwfi(void)
{
//
// Wait for the next interrupt.
//
wfi;
bx lr
}
#elif defined(__TI_COMPILER_VERSION__) || defined(DOXYGEN)
__STATIC_INLINE void
CPUwfi(void)
{
//
// Wait for the next interrupt.
//
__asm(" wfi\n");
}
#else
__STATIC_INLINE void __attribute__((always_inline))
CPUwfi(void)
{
//
// Wait for the next interrupt.
//
__asm(" wfi\n");
}
#endif
//*****************************************************************************
//
//! \brief Wait for event.
//!
//! Use this function to let the System CPU wait for the next event. This
//! function is implemented as a wrapper function for the WFE instruction.
//!
//! \return None
//
//*****************************************************************************
#if defined(__IAR_SYSTEMS_ICC__)
__STATIC_INLINE void
CPUwfe(void)
{
//
// Wait for the next event.
//
__asm(" wfe\n");
}
#elif defined(__CC_ARM) || defined(__ARMCC_VERSION)
__asm __STATIC_INLINE void
CPUwfe(void)
{
//
// Wait for the next event.
//
wfe;
bx lr
}
#elif defined(__TI_COMPILER_VERSION__) || defined(DOXYGEN)
__STATIC_INLINE void
CPUwfe(void)
{
//
// Wait for the next event.
//
__asm(" wfe\n");
}
#else
__STATIC_INLINE void __attribute__((always_inline))
CPUwfe(void)
{
//
// Wait for the next event.
//
__asm(" wfe\n");
}
#endif
//*****************************************************************************
//
//! \brief Send event.
//!
//! Use this function to let the System CPU send an event. This function is
//! implemented as a wrapper function for the SEV instruction.
//!
//! \return None
//
//*****************************************************************************
#if defined(__IAR_SYSTEMS_ICC__)
__STATIC_INLINE void
CPUsev(void)
{
//
// Send event.
//
__asm(" sev\n");
}
#elif defined(__CC_ARM) || defined(__ARMCC_VERSION)
__asm __STATIC_INLINE void
CPUsev(void)
{
//
// Send event.
//
sev;
bx lr
}
#elif defined(__TI_COMPILER_VERSION__) || defined(DOXYGEN)
__STATIC_INLINE void
CPUsev(void)
{
//
// Send event.
//
__asm(" sev\n");
}
#else
__STATIC_INLINE void __attribute__((always_inline))
CPUsev(void)
{
//
// Send event.
//
__asm(" sev\n");
}
#endif
//*****************************************************************************
//
//! \brief Update the interrupt priority disable level.
//!
//! Use this function to change the level of priority that will disable
//! interrupts with a lower priority level.
//!
//! \param ui32NewBasepri is the new basis priority level to set.
//!
//! \return None
//
//*****************************************************************************
#if defined(__IAR_SYSTEMS_ICC__)
__STATIC_INLINE void
CPUbasepriSet(uint32_t ui32NewBasepri)
{
//
// Set the BASEPRI register.
//
__asm(" msr BASEPRI, r0\n");
}
#elif defined(__CC_ARM) || defined(__ARMCC_VERSION)
__asm __STATIC_INLINE void
CPUbasepriSet(uint32_t ui32NewBasepri)
{
//
// Set the BASEPRI register.
//
msr BASEPRI, r0;
bx lr
}
#elif defined(__TI_COMPILER_VERSION__) || defined(DOXYGEN)
__STATIC_INLINE void
CPUbasepriSet(uint32_t ui32NewBasepri)
{
//
// Set the BASEPRI register.
//
__asm(" msr BASEPRI, r0\n");
}
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wattributes"
__STATIC_INLINE void __attribute__ ((naked))
CPUbasepriSet(uint32_t ui32NewBasepri)
{
//
// Set the BASEPRI register.
//
__asm(" msr BASEPRI, %0\n"
" bx lr\n"
:
: "r" (ui32NewBasepri)
:
);
}
#pragma GCC diagnostic pop
#endif
//*****************************************************************************
//
//! \brief Get the interrupt priority disable level.
@@ -367,6 +160,205 @@ extern uint32_t CPUbasepriGet(void);
//*****************************************************************************
extern void CPUdelay(uint32_t ui32Count);
//*****************************************************************************
//
//! \brief Wait for interrupt.
//!
//! Use this function to let the System CPU wait for the next interrupt. This
//! function is implemented as a wrapper function for the WFI instruction.
//!
//! \return None
//
//*****************************************************************************
#if defined(DOXYGEN)
__STATIC_INLINE void
CPUwfi(void)
{
// This function is written in assembly. See cpu.h for compiler specific implementation.
}
#elif defined(__IAR_SYSTEMS_ICC__)
__STATIC_INLINE void
CPUwfi(void)
{
// Wait for the next interrupt.
__asm(" wfi\n");
}
#elif defined(__CC_ARM) || defined(__ARMCC_VERSION)
__asm __STATIC_INLINE void
CPUwfi(void)
{
// Wait for the next interrupt.
wfi;
bx lr
}
#elif defined(__TI_COMPILER_VERSION__)
__STATIC_INLINE void
CPUwfi(void)
{
// Wait for the next interrupt.
__asm(" wfi\n");
}
#else
__STATIC_INLINE void __attribute__((always_inline))
CPUwfi(void)
{
// Wait for the next interrupt.
__asm(" wfi\n");
}
#endif
//*****************************************************************************
//
//! \brief Wait for event.
//!
//! Use this function to let the System CPU wait for the next event. This
//! function is implemented as a wrapper function for the WFE instruction.
//!
//! \return None
//
//*****************************************************************************
#if defined(DOXYGEN)
__STATIC_INLINE void
CPUwfe(void)
{
// This function is written in assembly. See cpu.h for compiler specific implementation.
}
#elif defined(__IAR_SYSTEMS_ICC__)
__STATIC_INLINE void
CPUwfe(void)
{
// Wait for the next event.
__asm(" wfe\n");
}
#elif defined(__CC_ARM) || defined(__ARMCC_VERSION)
__asm __STATIC_INLINE void
CPUwfe(void)
{
// Wait for the next event.
wfe;
bx lr
}
#elif defined(__TI_COMPILER_VERSION__)
__STATIC_INLINE void
CPUwfe(void)
{
// Wait for the next event.
__asm(" wfe\n");
}
#else
__STATIC_INLINE void __attribute__((always_inline))
CPUwfe(void)
{
// Wait for the next event.
__asm(" wfe\n");
}
#endif
//*****************************************************************************
//
//! \brief Send event.
//!
//! Use this function to let the System CPU send an event. This function is
//! implemented as a wrapper function for the SEV instruction.
//!
//! \return None
//
//*****************************************************************************
#if defined(DOXYGEN)
__STATIC_INLINE void
CPUsev(void)
{
// This function is written in assembly. See cpu.h for compiler specific implementation.
}
#elif defined(__IAR_SYSTEMS_ICC__)
__STATIC_INLINE void
CPUsev(void)
{
// Send event.
__asm(" sev\n");
}
#elif defined(__CC_ARM) || defined(__ARMCC_VERSION)
__asm __STATIC_INLINE void
CPUsev(void)
{
// Send event.
sev;
bx lr
}
#elif defined(__TI_COMPILER_VERSION__)
__STATIC_INLINE void
CPUsev(void)
{
// Send event.
__asm(" sev\n");
}
#else
__STATIC_INLINE void __attribute__((always_inline))
CPUsev(void)
{
// Send event.
__asm(" sev\n");
}
#endif
//*****************************************************************************
//
//! \brief Update the interrupt priority disable level.
//!
//! Use this function to change the level of priority that will disable
//! interrupts with a lower priority level.
//!
//! \param ui32NewBasepri is the new basis priority level to set.
//!
//! \return None
//
//*****************************************************************************
#if defined(DOXYGEN)
__STATIC_INLINE void
CPUbasepriSet(uint32_t ui32NewBasepri)
{
// This function is written in assembly. See cpu.h for compiler specific implementation.
}
#elif defined(__IAR_SYSTEMS_ICC__)
__STATIC_INLINE void
CPUbasepriSet(uint32_t ui32NewBasepri)
{
// Set the BASEPRI register.
__asm(" msr BASEPRI, r0\n");
}
#elif defined(__CC_ARM) || defined(__ARMCC_VERSION)
__asm __STATIC_INLINE void
CPUbasepriSet(uint32_t ui32NewBasepri)
{
// Set the BASEPRI register.
msr BASEPRI, r0;
bx lr
}
#elif defined(__TI_COMPILER_VERSION__)
__STATIC_INLINE void
CPUbasepriSet(uint32_t ui32NewBasepri)
{
// Set the BASEPRI register.
__asm(" msr BASEPRI, r0\n");
}
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wattributes"
__STATIC_INLINE void __attribute__ ((naked))
CPUbasepriSet(uint32_t ui32NewBasepri)
{
// Set the BASEPRI register.
__asm(" msr BASEPRI, %0\n"
" bx lr\n"
:
: "r" (ui32NewBasepri)
:
);
}
#pragma GCC diagnostic pop
#endif
//*****************************************************************************
//
//! \brief Disable CPU write buffering (recommended for debug purpose only).
@@ -414,7 +406,7 @@ CPU_WriteBufferEnable( void )
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include <driverlib/rom.h>
#include "../driverlib/rom.h"
#ifdef ROM_CPUcpsid
#undef CPUcpsid
#define CPUcpsid ROM_CPUcpsid
@@ -3,7 +3,7 @@
* Revised: 2016-03-30 13:03:59 +0200 (Wed, 30 Mar 2016)
* Revision: 45971
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
File diff suppressed because it is too large Load Diff
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: crypto.h
* Revised: 2016-04-24 00:47:02 +0200 (Sun, 24 Apr 2016)
* Revision: 46129
* Revised: 2016-10-06 17:21:09 +0200 (Thu, 06 Oct 2016)
* Revision: 47343
*
* Description: AES header file.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,13 +61,13 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_ints.h>
#include <inc/hw_crypto.h>
#include <driverlib/debug.h>
#include <driverlib/interrupt.h>
#include <driverlib/cpu.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_ints.h"
#include "../inc/hw_crypto.h"
#include "debug.h"
#include "interrupt.h"
#include "cpu.h"
//*****************************************************************************
//
@@ -351,10 +351,8 @@ extern uint32_t CRYPTOAesEcbStatus(void);
__STATIC_INLINE void
CRYPTOAesEcbFinish(void)
{
//
// Result has already been copied to the output buffer by DMA.
// Disable master control/DMA clock and clear the operating mode.
//
HWREG(CRYPTO_BASE + CRYPTO_O_ALGSEL) = 0x00000000;
HWREG(CRYPTO_BASE + CRYPTO_O_AESCTL) = 0x00000000;
}
@@ -374,10 +372,8 @@ CRYPTOAesEcbFinish(void)
__STATIC_INLINE void
CRYPTOAesCbcFinish(void)
{
//
// Result has already been copied to the output buffer by DMA.
// Disable master control/DMA clock and clear the operating mode.
//
HWREG(CRYPTO_BASE + CRYPTO_O_ALGSEL) = 0x00000000;
HWREG(CRYPTO_BASE + CRYPTO_O_AESCTL) = 0x00000000;
}
@@ -557,9 +553,7 @@ extern uint32_t CRYPTOCcmInvAuthDecryptResultGet(uint32_t ui32AuthLength,
__STATIC_INLINE uint32_t
CRYPTODmaStatus(void)
{
//
// Return the value of the status register.
//
return (HWREG(CRYPTO_BASE + CRYPTO_O_DMASTAT));
}
@@ -611,20 +605,14 @@ extern void CRYPTODmaDisable(uint32_t ui32Channels);
__STATIC_INLINE void
CRYPTOIntEnable(uint32_t ui32IntFlags)
{
//
// Check the arguments.
//
ASSERT((ui32IntFlags & CRYPTO_DMA_IN_DONE) |
(ui32IntFlags & CRYPTO_RESULT_RDY));
//
// Using level interrupt.
//
HWREG(CRYPTO_BASE + CRYPTO_O_IRQTYPE) = CRYPTO_IRQTYPE_LEVEL;
//
// Enable the specified interrupts.
//
HWREG(CRYPTO_BASE + CRYPTO_O_IRQEN) |= ui32IntFlags;
}
@@ -646,15 +634,11 @@ CRYPTOIntEnable(uint32_t ui32IntFlags)
__STATIC_INLINE void
CRYPTOIntDisable(uint32_t ui32IntFlags)
{
//
// Check the arguments.
//
ASSERT((ui32IntFlags & CRYPTO_DMA_IN_DONE) |
(ui32IntFlags & CRYPTO_RESULT_RDY));
//
// Disable the specified interrupts.
//
HWREG(CRYPTO_BASE + CRYPTO_O_IRQEN) &= ~ui32IntFlags;
}
@@ -680,10 +664,8 @@ CRYPTOIntStatus(bool bMasked)
{
uint32_t ui32Mask;
//
// Return either the interrupt status or the raw interrupt status as
// requested.
//
if(bMasked)
{
ui32Mask = HWREG(CRYPTO_BASE + CRYPTO_O_IRQEN);
@@ -728,15 +710,11 @@ CRYPTOIntStatus(bool bMasked)
__STATIC_INLINE void
CRYPTOIntClear(uint32_t ui32IntFlags)
{
//
// Check the arguments.
//
ASSERT((ui32IntFlags & CRYPTO_DMA_IN_DONE) |
(ui32IntFlags & CRYPTO_RESULT_RDY));
//
// Clear the requested interrupt sources,
//
HWREG(CRYPTO_BASE + CRYPTO_O_IRQCLR) = ui32IntFlags;
}
@@ -761,14 +739,10 @@ CRYPTOIntClear(uint32_t ui32IntFlags)
__STATIC_INLINE void
CRYPTOIntRegister(void (*pfnHandler)(void))
{
//
// Register the interrupt handler.
//
IntRegister(INT_CRYPTO_RESULT_AVAIL_IRQ, pfnHandler);
//
// Enable the UART interrupt.
//
IntEnable(INT_CRYPTO_RESULT_AVAIL_IRQ);
}
@@ -790,14 +764,10 @@ CRYPTOIntRegister(void (*pfnHandler)(void))
__STATIC_INLINE void
CRYPTOIntUnregister(void)
{
//
// Disable the interrupt.
//
IntDisable(INT_CRYPTO_RESULT_AVAIL_IRQ);
//
// Unregister the interrupt handler.
//
IntUnregister(INT_CRYPTO_RESULT_AVAIL_IRQ);
}
@@ -808,7 +778,7 @@ CRYPTOIntUnregister(void)
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include <driverlib/rom.h>
#include "../driverlib/rom.h"
#ifdef ROM_CRYPTOAesLoadKey
#undef CRYPTOAesLoadKey
#define CRYPTOAesLoadKey ROM_CRYPTOAesLoadKey
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: ddi.c
* Revised: 2016-05-09 12:05:02 +0200 (Mon, 09 May 2016)
* Revision: 46315
* Revised: 2017-04-26 18:27:45 +0200 (Wed, 26 Apr 2017)
* Revision: 48852
*
* Description: Driver for the DDI master interface
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,7 @@
*
******************************************************************************/
#include <driverlib/ddi.h>
#include "ddi.h"
//*****************************************************************************
//
@@ -59,28 +59,24 @@
//*****************************************************************************
//
//! Write a 32 bit value to a register in the DDI slave.
// Write a 32 bit value to a register in the DDI slave.
//
//*****************************************************************************
void
DDI32RegWrite(uint32_t ui32Base, uint32_t ui32Reg,
uint32_t ui32Val)
{
//
// Check the arguments.
//
ASSERT(DDIBaseValid(ui32Base));
ASSERT(ui32Reg < DDI_SLAVE_REGS);
//
// Write the value to the register.
//
AuxAdiDdiSafeWrite(ui32Base + ui32Reg, ui32Val, 4);
}
//*****************************************************************************
//
//! Write a single bit using a 16-bit maskable write
// Write a single bit using a 16-bit maskable write
//
//*****************************************************************************
void
@@ -90,41 +86,31 @@ DDI16BitWrite(uint32_t ui32Base, uint32_t ui32Reg,
uint32_t ui32RegAddr;
uint32_t ui32Data;
//
// Check the arguments.
//
ASSERT(DDIBaseValid(ui32Base));
ASSERT(!((ui32Mask & 0xFFFF0000) ^ (ui32Mask & 0x0000FFFF)));
ASSERT(!(ui32WrData & 0xFFFF0000));
//
// DDI 16-bit target is on 32-bit boundary so double offset
//
ui32RegAddr = ui32Base + (ui32Reg << 1) + DDI_O_MASK16B;
//
// Adjust for target bit in high half of the word.
//
if(ui32Mask & 0xFFFF0000)
{
ui32RegAddr += 4;
ui32Mask >>= 16;
}
//
// Write mask if data is not zero (to set mask bit), else write '0'.
//
ui32Data = ui32WrData ? ui32Mask : 0x0;
//
// Update the register.
//
AuxAdiDdiSafeWrite(ui32RegAddr, (ui32Mask << 16) | ui32Data, 4);
}
//*****************************************************************************
//
//! Write a bitfield via the DDI using 16-bit maskable write
// Write a bitfield via the DDI using 16-bit maskable write
//
//*****************************************************************************
void
@@ -135,19 +121,13 @@ DDI16BitfieldWrite(uint32_t ui32Base, uint32_t ui32Reg,
uint32_t ui32RegAddr;
uint32_t ui32WrData;
//
// Check the arguments.
//
ASSERT(DDIBaseValid(ui32Base));
//
// 16-bit target is on 32-bit boundary so double offset.
//
ui32RegAddr = ui32Base + (ui32Reg << 1) + DDI_O_MASK16B;
//
// Adjust for target bit in high half of the word.
//
if(ui32Shift >= 16)
{
ui32Shift = ui32Shift - 16;
@@ -155,20 +135,16 @@ DDI16BitfieldWrite(uint32_t ui32Base, uint32_t ui32Reg,
ui32Mask = ui32Mask >> 16;
}
//
// Shift data in to position.
//
ui32WrData = ui32Data << ui32Shift;
//
// Write data.
//
AuxAdiDdiSafeWrite(ui32RegAddr, (ui32Mask << 16) | ui32WrData, 4);
}
//*****************************************************************************
//
//! Read a bit via the DDI using 16-bit READ.
// Read a bit via the DDI using 16-bit READ.
//
//*****************************************************************************
uint16_t
@@ -177,44 +153,32 @@ DDI16BitRead(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask)
uint32_t ui32RegAddr;
uint16_t ui16Data;
//
// Check the arguments.
//
ASSERT(DDIBaseValid(ui32Base));
//
// Calculate the address of the register.
//
ui32RegAddr = ui32Base + ui32Reg + DDI_O_DIR;
//
// Adjust for target bit in high half of the word.
//
if(ui32Mask & 0xFFFF0000)
{
ui32RegAddr += 2;
ui32Mask = ui32Mask >> 16;
}
//
// Read a halfword on the DDI interface.
//
ui16Data = AuxAdiDdiSafeRead(ui32RegAddr, 2);
//
// Mask data.
//
ui16Data = ui16Data & ui32Mask;
//
// Return masked data.
//
return(ui16Data);
}
//*****************************************************************************
//
//! Read a bitfield via the DDI using 16-bit read.
// Read a bit field via the DDI using 16-bit read.
//
//*****************************************************************************
uint16_t
@@ -224,19 +188,13 @@ DDI16BitfieldRead(uint32_t ui32Base, uint32_t ui32Reg,
uint32_t ui32RegAddr;
uint16_t ui16Data;
//
// Check the arguments.
//
ASSERT(DDIBaseValid(ui32Base));
//
// Calculate the register address.
//
ui32RegAddr = ui32Base + ui32Reg + DDI_O_DIR;
//
// Adjust for target bit in high half of the word.
//
if(ui32Shift >= 16)
{
ui32Shift = ui32Shift - 16;
@@ -244,19 +202,13 @@ DDI16BitfieldRead(uint32_t ui32Base, uint32_t ui32Reg,
ui32Mask = ui32Mask >> 16;
}
//
// Read the register.
//
ui16Data = AuxAdiDdiSafeRead(ui32RegAddr, 2);
//
// Mask data and shift into place.
//
ui16Data &= ui32Mask;
ui16Data >>= ui32Shift;
//
// Return data.
//
return(ui16Data);
}
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: ddi.h
* Revised: 2016-05-09 12:05:02 +0200 (Mon, 09 May 2016)
* Revision: 46315
* Revised: 2016-10-06 17:21:09 +0200 (Thu, 06 Oct 2016)
* Revision: 47343
*
* Description: Defines and prototypes for the DDI master interface.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,12 +61,12 @@ extern "C"
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <inc/hw_memmap.h>
#include <inc/hw_ddi.h>
#include <inc/hw_aux_smph.h>
#include <driverlib/debug.h>
#include <driverlib/cpu.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_ddi.h"
#include "../inc/hw_aux_smph.h"
#include "debug.h"
#include "cpu.h"
//*****************************************************************************
//
@@ -230,15 +230,11 @@ DDIBaseValid(uint32_t ui32Base)
__STATIC_INLINE uint32_t
DDI32RegRead(uint32_t ui32Base, uint32_t ui32Reg)
{
//
// Check the arguments.
//
ASSERT(DDIBaseValid(ui32Base));
ASSERT(ui32Reg < DDI_SLAVE_REGS);
//
// Read the register and return the value.
//
return AuxAdiDdiSafeRead(ui32Base + ui32Reg, 4);
}
@@ -269,21 +265,15 @@ DDI32BitsSet(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val)
{
uint32_t ui32RegOffset;
//
// Check the arguments.
//
ASSERT(DDIBaseValid(ui32Base));
ASSERT(ui32Reg < DDI_SLAVE_REGS);
//
// Get the correct address of the first register used for setting bits
// in the DDI slave.
//
ui32RegOffset = DDI_O_SET;
//
// Set the selected bits.
//
AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + ui32Reg, ui32Val, 4);
}
@@ -310,21 +300,15 @@ DDI32BitsClear(uint32_t ui32Base, uint32_t ui32Reg,
{
uint32_t ui32RegOffset;
//
// Check the arguments.
//
ASSERT(DDIBaseValid(ui32Base));
ASSERT(ui32Reg < DDI_SLAVE_REGS);
//
// Get the correct address of the first register used for setting bits
// in the DDI slave.
//
ui32RegOffset = DDI_O_CLR;
//
// Clear the selected bits.
//
AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset + ui32Reg, ui32Val, 4);
}
@@ -361,23 +345,17 @@ DDI8SetValBit(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Byte,
{
uint32_t ui32RegOffset;
//
// Check the arguments.
//
ASSERT(DDIBaseValid(ui32Base));
ASSERT(ui32Reg < DDI_SLAVE_REGS);
ASSERT(!(ui16Val & 0xFF00));
ASSERT(!(ui16Mask & 0xFF00));
//
// Get the correct address of the first register used for setting bits
// in the DDI slave.
//
ui32RegOffset = DDI_O_MASK8B + (ui32Reg << 1) + (ui32Byte << 1);
//
// Set the selected bits.
//
AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui16Mask << 8) | ui16Val, 2);
}
@@ -414,23 +392,17 @@ DDI16SetValBit(uint32_t ui32Base, uint32_t ui32Reg, bool bWriteHigh,
{
uint32_t ui32RegOffset;
//
// Check the arguments.
//
ASSERT(DDIBaseValid(ui32Base));
ASSERT(ui32Reg < DDI_SLAVE_REGS);
ASSERT(!(ui32Val & 0xFFFF0000));
ASSERT(!(ui32Mask & 0xFFFF0000));
//
// Get the correct address of the first register used for setting bits
// in the DDI slave.
//
ui32RegOffset = DDI_O_MASK16B + (ui32Reg << 1) + (bWriteHigh ? 4 : 0);
//
// Set the selected bits.
//
AuxAdiDdiSafeWrite(ui32Base + ui32RegOffset, (ui32Mask << 16) | ui32Val, 4);
}
@@ -548,7 +520,7 @@ extern uint16_t DDI16BitfieldRead(uint32_t ui32Base, uint32_t ui32Reg,
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include <driverlib/rom.h>
#include "../driverlib/rom.h"
#ifdef ROM_DDI32RegWrite
#undef DDI32RegWrite
#define DDI32RegWrite ROM_DDI32RegWrite
@@ -1,9 +1,9 @@
/******************************************************************************
* Filename: ddi_doc.h
* Revised: 2016-03-30 13:03:59 +0200 (Wed, 30 Mar 2016)
* Revision: 45971
* Revised: 2016-08-30 14:34:13 +0200 (Tue, 30 Aug 2016)
* Revision: 47080
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1,12 +1,12 @@
/******************************************************************************
* Filename: debug.c
* Revised: 2015-07-16 12:12:04 +0200 (Thu, 16 Jul 2015)
* Revision: 44151
* Revised: 2017-04-26 18:27:45 +0200 (Wed, 26 Apr 2017)
* Revision: 48852
*
* Description: Driver for the Debug functionality (NB. This is a stub which
* should never be included in a release).
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -39,14 +39,12 @@
#include <stdbool.h>
#include <stdint.h>
#include <inc/hw_types.h>
#include <driverlib/debug.h>
#include "../inc/hw_types.h"
#include "debug.h"
//*****************************************************************************
//
//!
//! Function stub for allowing compile with DRIVERLIB_DEBUG flag asserted.
//!
// Function stub for allowing compile with DRIVERLIB_DEBUG flag asserted.
//
//*****************************************************************************
void
@@ -55,7 +53,5 @@ __error__(char *pcFilename, uint32_t ui32Line)
// Error catching.
// User can implement custom error handling for failing ASSERTs.
// Setting breakpoint here allows tracing of the failing ASSERT.
(void)pcFilename;
(void)ui32Line;
while( true );
}
@@ -1,11 +1,11 @@
/******************************************************************************
* Filename: debug.h
* Revised: 2015-07-16 12:12:04 +0200 (Thu, 16 Jul 2015)
* Revision: 44151
* Revised: 2017-04-26 18:27:45 +0200 (Wed, 26 Apr 2017)
* Revision: 48852
*
* Description: Macros for assisting debug of the driver library.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -50,8 +50,7 @@
//*****************************************************************************
//
// Prototype for the function that is called when an invalid argument is passed
// to an API. This is only used when doing a DRIVERLIB_DEBUG build.
//! Function stub for allowing compile with DRIVERLIB_DEBUG flag asserted.
//
//*****************************************************************************
extern void __error__(char *pcFilename, uint32_t ui32Line);
@@ -1,12 +1,12 @@
/******************************************************************************
* Filename: driverlib_release.c
* Revised: $Date: 2015-03-11 11:25:46 +0100 (Wed, 11 Mar 2015) $
* Revision: $Revision: 42932 $
* Revised: $Date: 2016-09-13 14:21:40 +0200 (Tue, 13 Sep 2016) $
* Revision: $Revision: 47152 $
*
* Description: Provides macros for ensuring that a specfic release of
* DriverLib is used.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,10 +36,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
#include <driverlib/driverlib_release.h>
#include "../driverlib/driverlib_release.h"
/// Declare the current DriverLib release
DRIVERLIB_DECLARE_RELEASE(0, 46593);
DRIVERLIB_DECLARE_RELEASE(0, 48919);
@@ -6,7 +6,7 @@
* Description: Provides macros for ensuring that a specfic release of
* DriverLib is used.
*
* Copyright (c) 2015 - 2016, Texas Instruments Incorporated
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -63,7 +63,7 @@ extern "C"
/// DriverLib release group number
#define DRIVERLIB_RELEASE_GROUP 0
/// DriverLib release build number
#define DRIVERLIB_RELEASE_BUILD 46593
#define DRIVERLIB_RELEASE_BUILD 48919
@@ -83,7 +83,7 @@ extern "C"
const volatile uint8_t driverlib_release_##group##_##build
/// External declaration of the DriverLib release locking object
extern DRIVERLIB_DECLARE_RELEASE(0, 46593);
extern DRIVERLIB_DECLARE_RELEASE(0, 48919);
@@ -135,7 +135,7 @@ extern DRIVERLIB_DECLARE_RELEASE(0, 46593);
//
//*****************************************************************************
#define DRIVERLIB_ASSERT_CURR_RELEASE() \
DRIVERLIB_ASSERT_RELEASE(0, 46593)
DRIVERLIB_ASSERT_RELEASE(0, 48919)

Some files were not shown because too many files have changed in this diff Show More