Add support for SmarfRF06 + CC1310EM

This commit updates the srf06-cc26xx platform by adding support for the CC1310EM.

We generalise the way this platform selects CPU/board so that we can easily add more combinations in the future. These changes have implication on how to build for different devices, so make sure to have a look at the updated README
This commit is contained in:
Jonas Olsson 2015-08-16 16:55:44 +01:00
parent 01e36532c2
commit 3d19b0036e
21 changed files with 387 additions and 104 deletions

View file

@ -6,15 +6,14 @@ endif
### Board and BSP selection
ifeq ($(BOARD),)
BOARD=srf06
BOARD=srf06/cc26xx
endif
### Configure the build for the board and pull in board-specific sources
CONTIKI_TARGET_DIRS += . $(BOARD)
PLATFORM_ROOT_DIR = $(CONTIKI)/platform/$(TARGET)
CONTIKI_TARGET_DIRS += .
### Include the board dir if one exists
-include $(PLATFORM_ROOT_DIR)/$(BOARD)/Makefile.$(BOARD)
### Include the board-specific makefile
PLATFORM_ROOT_DIR = $(CONTIKI)/platform/$(TARGET)
-include $(PLATFORM_ROOT_DIR)/$(BOARD)/Makefile.$(notdir $(BOARD))
CONTIKI_TARGET_SOURCEFILES += contiki-main.c
CONTIKI_TARGET_SOURCEFILES += sensors.c leds.c
@ -29,8 +28,10 @@ ifndef SMALL
SMALL = 0
endif
### Define the CPU directory
CONTIKI_CPU=$(CONTIKI)/cpu/cc26xx
include $(CONTIKI_CPU)/Makefile.cc26xx
### Define the CPU directory and pull in the correct CPU makefile. This will
### be defined by one of the makefiles included above and it can be either
### Makefile.cc26xx or Makefile.cc13xx
CONTIKI_CPU=$(CONTIKI)/cpu/cc26xx-cc13xx
include $(CONTIKI_CPU)/Makefile.$(CPU_FAMILY)
MODULES += core/net core/net/mac core/net/mac/contikimac core/net/llsec

View file

@ -4,11 +4,11 @@ Getting Started with Contiki for TI CC26xx
This guide's aim is to help you start using Contiki for TI's CC26xx. The
platform supports two different boards:
* SmartRF 06 Evaluation Board with a CC26xx Evaluation Module (relevant files
and drivers are under `srf06/`)
* CC26xx SensorTag 2.0 (relevant drivers under `sensortag/`)
* SmartRF 06 Evaluation Board with a CC26xx or CC13xx Evaluation Module
(relevant files and drivers are under `srf06/`)
* CC2650 SensorTag 2.0 (relevant drivers under `sensortag/cc2650`)
The CPU code, common for both platforms, can be found under `$(CONTIKI)/cpu/cc26xx`.
The CPU code, common for both platforms, can be found under `$(CONTIKI)/cpu/cc26xx-cc13xx`.
The port was developed and tested with CC2650s, but the intention is for it to
work with the CC2630 as well. Thus, bug reports are welcome for both chips.
Bear in mind that the CC2630 does not have BLE capability.
@ -25,6 +25,7 @@ The platform has the following key features:
* Deep Sleep support with RAM retention for ultra-low energy consumption.
* Support for CC26xx RF in IEEE as well as BLE mode (BLE support is very basic
since Contiki does not provide a BLE stack).
* Support for CC13xx prop mode: IEEE 802.15.4g-compliant sub GHz operation
In terms of hardware support, the following drivers have been implemented:
@ -61,6 +62,8 @@ To use the port you need:
* TI's CC26xxware sources. The correct version will be installed automatically
as a submodule when you clone Contiki.
* TI's CC13xxware sources. The correct version will be installed automatically
as a submodule when you clone Contiki.
* Software to program the nodes. Use TI's SmartRF Flash Programmer
* A toolchain to build firmware: The port has been developed and tested with
GNU Tools for ARM Embedded Processors <https://launchpad.net/gcc-arm-embedded>.
@ -85,12 +88,18 @@ From `cpu/cc26xx/lib/cc26xxware/driverlib/timer.c` to `driverlib-timer.c`
Sensortag vs Srf06
==================
To build for the sensortag, set `BOARD=sensortag`. You can do that by exporting
it as an environment variable, by adding it to your Makefile or by adding it to
your make command as an argument
To build for the sensortag, you will need to set the `BOARD` make variable as
follows:
If the `BOARD` variable is not equal to `sensortag`, an image for the Srf06
CC26XXEM will be built instead.
* Srf06+CC26xxEM: Set `BOARD=srf06/cc26xx`
* Srf06+CC13xxEM: Set `BOARD=srf06/cc13xx`
* CC2650 tag: Set `BOARD=sensortag/cc2650`
You can do that by exporting `BOARD` as an environment variable, by adding it
to your Makefile or by adding it to your make command as an argument.
If the `BOARD` variable is unspecified, an image for the Srf06 CC26XXEM will be
built.
If you want to switch between building for one platform to the other, make
certain to `make clean` before building for the new one, or you will get linker

View file

@ -44,16 +44,6 @@
#include PROJECT_CONF_H
#endif /* PROJECT_CONF_H */
/*---------------------------------------------------------------------------*/
/**
* \name CC26xx flavour selection
* @{
*/
#ifndef CC26XX_MODEL_CONF_CPU_VARIANT
#define CC26XX_MODEL_CONF_CPU_VARIANT 2650 /**< 2650 => CC2650, 2630 => CC2630 */
#endif
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \name Network Stack Configuration
*
@ -76,8 +66,7 @@
#endif
/* Configure NullRDC for when it's selected */
#define NULLRDC_802154_AUTOACK 1
#define NULLRDC_802154_AUTOACK_HW 1
#define NULLRDC_CONF_802154_AUTOACK 1
/* Configure ContikiMAC for when it's selected */
#define CONTIKIMAC_CONF_WITH_CONTIKIMAC_HEADER 0
@ -92,7 +81,35 @@
#define NETSTACK_CONF_FRAMER framer_802154
#endif
#define NETSTACK_CONF_RADIO cc26xx_rf_driver
#if CPU_FAMILY_CC13XX
#define NETSTACK_CONF_RADIO prop_mode_driver
#ifndef RF_CORE_CONF_CHANNEL
#define RF_CORE_CONF_CHANNEL 0
#endif
#define NULLRDC_CONF_ACK_WAIT_TIME (RTIMER_SECOND / 400)
#define NULLRDC_CONF_AFTER_ACK_DETECTED_WAIT_TIME (RTIMER_SECOND / 1000)
#define NULLRDC_CONF_802154_AUTOACK_HW 0
#define NULLRDC_CONF_SEND_802154_ACK 1
#define CONTIKIMAC_CONF_CCA_CHECK_TIME (RTIMER_ARCH_SECOND / 1600)
#define CONTIKIMAC_CONF_CCA_SLEEP_TIME (RTIMER_ARCH_SECOND / 210)
#define CONTIKIMAC_CONF_LISTEN_TIME_AFTER_PACKET_DETECTED (RTIMER_ARCH_SECOND / 20)
#define CONTIKIMAC_CONF_SEND_SW_ACK 1
#define CONTIKIMAC_CONF_AFTER_ACK_DETECTECT_WAIT_TIME (RTIMER_SECOND / 1000)
#define CONTIKIMAC_CONF_INTER_PACKET_INTERVAL (RTIMER_SECOND / 280)
#else
#define NETSTACK_CONF_RADIO ieee_mode_driver
#ifndef RF_CORE_CONF_CHANNEL
#define RF_CORE_CONF_CHANNEL 25
#endif
#define NULLRDC_CONF_802154_AUTOACK_HW 1
#define NULLRDC_CONF_SEND_802154_ACK 0
#endif
#define NETSTACK_RADIO_MAX_PAYLOAD_LEN 125
/* 6LoWPAN */
@ -136,37 +153,20 @@
#define IEEE802154_CONF_PANID 0xABCD /**< Default PAN ID */
#endif
#ifndef CC26XX_RF_CONF_CHANNEL
#define CC26XX_RF_CONF_CHANNEL 25 /**< Default RF channel */
#ifndef IEEE_MODE_CONF_AUTOACK
#define IEEE_MODE_CONF_AUTOACK 1 /**< RF H/W generates ACKs */
#endif
#ifndef CC26XX_RF_CONF_AUTOACK
#define CC26XX_RF_CONF_AUTOACK 1 /**< RF H/W generates ACKs */
#ifndef IEEE_MODE_CONF_PROMISCOUS
#define IEEE_MODE_CONF_PROMISCOUS 0 /**< 1 to enable promiscous mode */
#endif
#ifndef CC26XX_RF_CONF_PROMISCOUS
#define CC26XX_RF_CONF_PROMISCOUS 0 /**< 1 to enable promiscous mode */
#ifndef RF_BLE_CONF_ENABLED
#define RF_BLE_CONF_ENABLED 0 /**< 0 to disable BLE support */
#endif
#ifndef CC26XX_RF_CONF_BLE_SUPPORT
#define CC26XX_RF_CONF_BLE_SUPPORT 0 /**< 0 to disable BLE support */
#endif
/*
* Patch Management for the CPE itself and for BLE and IEEE modes
*
* Don't change these unless you know what you're doing
*/
#ifndef CC26XX_CONF_CPE_HAS_PATCHES
#define CC26XX_CONF_CPE_HAS_PATCHES 0 /**< 1 to enable patching the CPE */
#endif
#ifndef CC26XX_CONF_BLE_HAS_PATCHES
#define CC26XX_CONF_BLE_HAS_PATCHES 0 /**< 1 to enable patching BLE mode */
#endif
#ifndef CC26XX_CONF_IEEE_HAS_PATCHES
#define CC26XX_CONF_IEEE_HAS_PATCHES 0 /**< 1 to enable patching IEEE mode */
#ifndef PROP_MODE_CONF_SNIFFER
#define PROP_MODE_CONF_SNIFFER 0 /**< 1 to enable sniffer mode */
#endif
/** @} */
/*---------------------------------------------------------------------------*/
@ -259,6 +259,11 @@
#define CC26XX_UART_CONF_BAUD_RATE 115200 /**< Default UART0 baud rate */
#endif
/* Enable I/O over the Debugger Devpack - Only relevant for the SensorTag */
#ifndef BOARD_CONF_DEBUGGER_DEVPACK
#define BOARD_CONF_DEBUGGER_DEVPACK 1
#endif
/* Turn off example-provided putchars */
#define SLIP_BRIDGE_CONF_NO_PUTCHAR 1
#define SLIP_RADIO_CONF_NO_PUTCHAR 1

View file

@ -32,11 +32,12 @@
* \addtogroup cc26xx-platforms
* @{
*
* \defgroup cc26xx-srf-tag SmartRF+CC26xx EM and the CC26xx SensorTag 2.0
* \defgroup cc26xx-srf-tag SmartRF+CC13xx/CC26xx EM and the CC2650 SensorTag
*
* This platform supports two different boards:
* 1) A standard TI SmartRF06EB with a CC26xx EM mounted on it and
* 2) The new TI SensorTag2.0
* This platform supports a number of different boards:
* - A standard TI SmartRF06EB with a CC26xx EM mounted on it
* - A standard TI SmartRF06EB with a CC1310 EM mounted on it
* - The new TI SensorTag2.0
* @{
*/
#include "ti-lib.h"
@ -49,10 +50,9 @@
#include "dev/oscillators.h"
#include "ieee-addr.h"
#include "vims.h"
#include "cc26xx-model.h"
#include "dev/cc26xx-uart.h"
#include "dev/cc26xx-rtc.h"
#include "dev/cc26xx-rf.h"
#include "dev/soc-rtc.h"
#include "rf-core/rf-core.h"
#include "sys_ctrl.h"
#include "uart.h"
#include "sys/clock.h"
@ -66,6 +66,9 @@
#include <stdio.h>
/*---------------------------------------------------------------------------*/
/** \brief Board specific iniatialisation */
void board_init(void);
/*---------------------------------------------------------------------------*/
static void
fade(unsigned char l)
{
@ -102,7 +105,7 @@ set_rf_params(void)
NETSTACK_RADIO.set_value(RADIO_PARAM_PAN_ID, IEEE802154_PANID);
NETSTACK_RADIO.set_value(RADIO_PARAM_16BIT_ADDR, short_addr);
NETSTACK_RADIO.set_value(RADIO_PARAM_CHANNEL, CC26XX_RF_CHANNEL);
NETSTACK_RADIO.set_value(RADIO_PARAM_CHANNEL, RF_CORE_CHANNEL);
NETSTACK_RADIO.set_object(RADIO_PARAM_64BIT_ADDR, ext_addr, 8);
NETSTACK_RADIO.get_value(RADIO_PARAM_CHANNEL, &val);
@ -123,7 +126,7 @@ set_rf_params(void)
/**
* \brief Main function for CC26xx-based platforms
*
* The same main() is used for both Srf+CC26xxEM as well as for the SensorTag
* The same main() is used for all supported boards
*/
int
main(void)
@ -157,7 +160,7 @@ main(void)
ti_lib_int_master_enable();
cc26xx_rtc_init();
soc_rtc_init();
clock_init();
rtimer_init();
@ -176,7 +179,7 @@ main(void)
printf("Starting " CONTIKI_VERSION_STRING "\n");
printf("With DriverLib v%u.%u\n", DRIVERLIB_RELEASE_GROUP,
DRIVERLIB_RELEASE_BUILD);
printf(BOARD_STRING " using CC%u\n", CC26XX_MODEL_CPU_VARIANT);
printf(BOARD_STRING "\n");
process_start(&etimer_process, NULL);
ctimer_init();

View file

@ -1,7 +1,9 @@
CFLAGS += -DBOARD_SENSORTAG=1
CFLAGS += -DBACKDOOR_IOID=0x00000000
BOARD_SOURCEFILES += leds-arch.c sensortag-sensors.c sensor-common.c
CONTIKI_TARGET_DIRS += sensortag
BOARD_SOURCEFILES += sensortag-sensors.c sensor-common.c
BOARD_SOURCEFILES += bmp-280-sensor.c tmp-007-sensor.c opt-3001-sensor.c
BOARD_SOURCEFILES += hdc-1000-sensor.c mpu-9250-sensor.c button-sensor.c
BOARD_SOURCEFILES += reed-relay.c ext-flash.c buzzer.c

View file

@ -79,9 +79,6 @@ board_i2c_wakeup()
ti_lib_prcm_load_set();
while(!ti_lib_prcm_load_get());
/* Reset the I2C controller */
ti_lib_hapi_reset_peripheral(PRCM_PERIPH_I2C0);
/* Enable and initialize the I2C master module */
ti_lib_i2c_master_init_exp_clk(I2C0_BASE, ti_lib_sys_ctrl_clock_get(),
true);

View file

@ -55,7 +55,7 @@
/*---------------------------------------------------------------------------*/
#define BUTTON_GPIO_CFG (IOC_CURRENT_2MA | IOC_STRENGTH_AUTO | \
IOC_IOPULL_UP | IOC_SLEW_DISABLE | \
IOC_HYST_ENABLE | IOC_BOTH_EDGES | \
IOC_HYST_DISABLE | IOC_BOTH_EDGES | \
IOC_INT_ENABLE | IOC_IOMODE_NORMAL | \
IOC_NO_WAKE_UP | IOC_INPUT_ENABLE)
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,11 @@
### Add to the source list
BOARD_SOURCEFILES += leds-arch.c
### Will allow the inclusion of the correct CPU makefile
CPU_FAMILY = cc26xx
### Add to the source dirs
CONTIKI_TARGET_DIRS += sensortag/cc2650
### Include the common sensortag makefile
include $(PLATFORM_ROOT_DIR)/sensortag/Makefile.sensortag

View file

@ -33,13 +33,13 @@
*
* \defgroup sensortag-cc26xx-peripherals Sensortag Peripherals
*
* Defines related to the Sensortag-CC26XX
* Defines related to the CC2650 Sensortag
*
* This file provides connectivity information on LEDs, Buttons, UART and
* other peripherals
*
* This file can be used as the basis to configure other boards using the
* CC26XX code as their basis.
* CC13xx/CC26xx code as their basis.
*
* This file is not meant to be modified by the user.
* @{
@ -103,8 +103,13 @@
#define BOARD_IOID_DP4_UARTRX IOID_28
#define BOARD_IOID_DP5_UARTTX IOID_29
#if BOARD_CONF_DEBUGGER_DEVPACK
#define BOARD_IOID_UART_RX BOARD_IOID_DP4_UARTRX
#define BOARD_IOID_UART_TX BOARD_IOID_DP5_UARTTX
#else
#define BOARD_IOID_UART_RX IOID_17
#define BOARD_IOID_UART_TX IOID_16
#endif
#define BOARD_IOID_UART_CTS IOID_UNUSED
#define BOARD_IOID_UART_RTS IOID_UNUSED
@ -231,13 +236,6 @@
*/
#define BOARD_STRING "TI CC2650 SensorTag"
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \brief Board specific iniatialisation
* @{
*/
void board_init(void);
/** @} */
/*---------------------------------------------------------------------------*/
#endif /* BOARD_H_ */

View file

@ -1,3 +1,5 @@
CFLAGS += -DBOARD_SMARTRF06EB=1
CONTIKI_TARGET_DIRS += srf06
BOARD_SOURCEFILES += leds-arch.c srf06-sensors.c button-sensor.c board.c

View file

@ -28,13 +28,18 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*---------------------------------------------------------------------------*/
/** \addtogroup srf06-cc26xx-peripherals
/** \addtogroup cc26xx-srf-tag
* @{
*
* \file
* Header file with definitions related to the Srf06EB peripherals
* \defgroup srf06-common-peripherals SmartRF06EB + CC13xx/CC26xx common
*
* \note Do not include this file directly.
* Defines related to the SmartRF06 Evaluation Board irrespective of the EM
* mounted on it
*
* This file provides connectivity information on LEDs, Buttons, UART and
* other peripherals
*
* @{
*/
/*---------------------------------------------------------------------------*/
#ifndef BOARD_PERIPHERALS_H_
@ -45,5 +50,6 @@
#endif /* BOARD_PERIPHERALS_H_ */
/*---------------------------------------------------------------------------*/
/**
* @}
* @}
*/

View file

@ -29,11 +29,11 @@
*/
/*---------------------------------------------------------------------------*/
/**
* \addtogroup sensortag-cc26xx-peripherals
* \addtogroup sensortag-common-peripherals
* @{
*
* \file
* Board-initialisation for the Srf06EB with a CC26xx EM.
* Board-initialisation for the Srf06EB with a CC13xx/CC26xx EM.
*/
/*---------------------------------------------------------------------------*/
#include "contiki-conf.h"

View file

@ -29,11 +29,11 @@
*/
/*---------------------------------------------------------------------------*/
/**
* \addtogroup srf06-cc26xx-peripherals
* \addtogroup srf06-common-peripherals
* @{
*
* \file
* Driver for the SmartRF06EB buttons when a CC26xxEM is mounted on the board
* Driver for the SmartRF06EB buttons when a CC13xx/CC26xxEM is mounted on it
*/
/*---------------------------------------------------------------------------*/
#include "contiki.h"
@ -55,7 +55,7 @@
/*---------------------------------------------------------------------------*/
#define BUTTON_GPIO_CFG (IOC_CURRENT_2MA | IOC_STRENGTH_AUTO | \
IOC_IOPULL_UP | IOC_SLEW_DISABLE | \
IOC_HYST_ENABLE | IOC_BOTH_EDGES | \
IOC_HYST_DISABLE | IOC_BOTH_EDGES | \
IOC_INT_ENABLE | IOC_IOMODE_NORMAL | \
IOC_NO_WAKE_UP | IOC_INPUT_ENABLE)
/*---------------------------------------------------------------------------*/

View file

@ -29,11 +29,11 @@
*/
/*---------------------------------------------------------------------------*/
/**
* \addtogroup srf06-cc26xx-peripherals
* \addtogroup srf06-common-peripherals
* @{
*
* \file
* Header file for the SmartRF06EB + CC26xxEM Button Driver
* Header file for the SmartRF06EB + CC13xx/CC26xxEM Button Driver
*/
/*---------------------------------------------------------------------------*/
#ifndef BUTTON_SENSOR_H_

View file

@ -0,0 +1,7 @@
### Will allow the inclusion of the correct CPU makefile
CPU_FAMILY = cc13xx
### Include the common sensortag makefile
include $(PLATFORM_ROOT_DIR)/srf06/Makefile.srf06
CONTIKI_TARGET_DIRS += srf06/cc13xx

View file

@ -0,0 +1,242 @@
/*
* Copyright (c) 2014, Texas Instruments Incorporated - http://www.ti.com/
* 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.
*/
/*---------------------------------------------------------------------------*/
/** \addtogroup cc26xx-srf-tag
* @{
*
* \defgroup srf06-cc13xx-peripherals Peripherals for the SmartRF06EB + CC1310EM
*
* Defines related to the SmartRF06 Evaluation Board with a CC1310EM
*
* This file provides connectivity information on LEDs, Buttons, UART and
* other peripherals
*
* This file can be used as the basis to configure other boards using the
* CC13xx/CC26xx code as their basis.
*
* This file is not meant to be modified by the user.
* @{
*
* \file
* Header file with definitions related to the I/O connections on the TI
* SmartRF06 Evaluation Board with a CC1310EM
*
* \note Do not include this file directly. It gets included by contiki-conf
* after all relevant directives have been set.
*/
/*---------------------------------------------------------------------------*/
#ifndef BOARD_H_
#define BOARD_H_
/*---------------------------------------------------------------------------*/
#include "ioc.h"
/*---------------------------------------------------------------------------*/
/**
* \name LED configurations
*
* Those values are not meant to be modified by the user
* @{
*/
/* Some files include leds.h before us, so we need to get rid of defaults in
* leds.h before we provide correct definitions */
#undef LEDS_GREEN
#undef LEDS_YELLOW
#undef LEDS_RED
#undef LEDS_CONF_ALL
#define LEDS_RED 1 /**< LED1 (Red) */
#define LEDS_YELLOW 2 /**< LED2 (Yellow) */
#define LEDS_GREEN 4 /**< LED3 (Green) */
#define LEDS_ORANGE 8 /**< LED4 (Orange) */
#define LEDS_CONF_ALL 15
/* Notify various examples that we have LEDs */
#define PLATFORM_HAS_LEDS 1
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \name LED IOID mappings
*
* Those values are not meant to be modified by the user
* @{
*/
#define BOARD_IOID_LED_1 IOID_25
#define BOARD_IOID_LED_2 IOID_27
#define BOARD_IOID_LED_3 IOID_7
#define BOARD_IOID_LED_4 IOID_6
#define BOARD_LED_1 (1 << BOARD_IOID_LED_1)
#define BOARD_LED_2 (1 << BOARD_IOID_LED_2)
#define BOARD_LED_3 (1 << BOARD_IOID_LED_3)
#define BOARD_LED_4 (1 << BOARD_IOID_LED_4)
#define BOARD_LED_ALL (BOARD_LED_1 | BOARD_LED_2 | BOARD_LED_3 | \
BOARD_LED_4)
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \name UART IOID mapping
*
* Those values are not meant to be modified by the user
* @{
*/
#define BOARD_IOID_UART_RX IOID_2
#define BOARD_IOID_UART_TX IOID_3
#define BOARD_IOID_UART_CTS IOID_UNUSED
#define BOARD_IOID_UART_RTS IOID_UNUSED
#define BOARD_UART_RX (1 << BOARD_IOID_UART_RX)
#define BOARD_UART_TX (1 << BOARD_IOID_UART_TX)
#define BOARD_UART_CTS (1 << BOARD_IOID_UART_CTS)
#define BOARD_UART_RTS (1 << BOARD_IOID_UART_RTS)
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \name Button IOID mapping
*
* Those values are not meant to be modified by the user
* @{
*/
#define BOARD_IOID_KEY_LEFT IOID_15
#define BOARD_IOID_KEY_RIGHT IOID_18
#define BOARD_IOID_KEY_UP IOID_19
#define BOARD_IOID_KEY_DOWN IOID_12
#define BOARD_IOID_KEY_SELECT IOID_11
#define BOARD_KEY_LEFT (1 << BOARD_IOID_KEY_LEFT)
#define BOARD_KEY_RIGHT (1 << BOARD_IOID_KEY_RIGHT)
#define BOARD_KEY_UP (1 << BOARD_IOID_KEY_UP)
#define BOARD_KEY_DOWN (1 << BOARD_IOID_KEY_DOWN)
#define BOARD_KEY_SELECT (1 << BOARD_IOID_KEY_SELECT)
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \name 3.3V domain IOID mapping
*
* Those values are not meant to be modified by the user
* @{
*/
#define BOARD_IOID_3V3_EN IOID_13
#define BOARD_3V3_EN (1 << BOARD_IOID_3V3_EN)
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \name SPI IOID mapping
*
* Those values are not meant to be modified by the user
* @{
*/
#define BOARD_IOID_SPI_SCK IOID_10
#define BOARD_IOID_SPI_MOSI IOID_9
#define BOARD_IOID_SPI_MISO IOID_8
#define BOARD_SPI_SCK (1 << BOARD_IOID_SPI_SCK)
#define BOARD_SPI_MOSI (1 << BOARD_IOID_SPI_MOSI)
#define BOARD_SPI_MISO (1 << BOARD_IOID_SPI_MISO)
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \name LCD IOID mapping
*
* Those values are not meant to be modified by the user
* @{
*/
#define BOARD_IOID_LCD_MODE IOID_4
#define BOARD_IOID_LCD_RST IOID_5
#define BOARD_IOID_LCD_CS IOID_14
#define BOARD_IOID_LCD_SCK BOARD_IOID_SPI_SCK
#define BOARD_IOID_LCD_MOSI BOARD_IOID_SPI_MOSI
#define BOARD_LCD_MODE (1 << BOARD_IOID_LCD_MODE)
#define BOARD_LCD_RST (1 << BOARD_IOID_LCD_RST)
#define BOARD_LCD_CS (1 << BOARD_IOID_LCD_CS)
#define BOARD_LCD_SCK BOARD_SPI_SCK
#define BOARD_LCD_MOSI BOARD_SPI_MOSI
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \name SD Card IOID mapping
*
* Those values are not meant to be modified by the user
* @{
*/
#define BOARD_IOID_SDCARD_CS IOID_30
#define BOARD_SDCARD_CS (1 << BOARD_IOID_SDCARD_CS)
#define BOARD_IOID_SDCARD_SCK BOARD_IOID_SPI_SCK
#define BOARD_SDCARD_SCK BOARD_SPI_SCK
#define BOARD_IOID_SDCARD_MOSI BOARD_IOID_SPI_MOSI
#define BOARD_SDCARD_MOSI BOARD_SPI_MOSI
#define BOARD_IOID_SDCARD_MISO BOARD_IOID_SPI_MISO
#define BOARD_SDCARD_MISO BOARD_SPI_MISO
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \name ALS IOID mapping
*
* Those values are not meant to be modified by the user
* @{
*/
#define BOARD_IOID_ALS_PWR IOID_26
#define BOARD_IOID_ALS_OUT IOID_23
#define BOARD_ALS_PWR (1 << BOARD_IOID_ALS_PWR)
#define BOARD_ALS_OUT (1 << BOARD_IOID_ALS_OUT)
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \name ACC IOID mapping
*
* Those values are not meant to be modified by the user
* @{
*/
#define BOARD_IOID_ACC_PWR IOID_20
#define BOARD_IOID_ACC_INT IOID_28
#define BOARD_IOID_ACC_INT1 IOID_28
#define BOARD_IOID_ACC_INT2 IOID_29
#define BOARD_IOID_ACC_CS IOID_24
#define BOARD_ACC_PWR (1 << BOARD_IOID_ACC_PWR)
#define BOARD_ACC_INT (1 << BOARD_IOID_ACC_INT)
#define BOARD_ACC_INT1 (1 << BOARD_IOID_ACC_INT1)
#define BOARD_ACC_INT2 (1 << BOARD_IOID_ACC_INT2)
#define BOARD_ACC_CS (1 << BOARD_IOID_ACC_CS)
#define BOARD_IOID_ACC_SCK BOARD_IOID_SPI_SCK
#define BOARD_ACC_SCK BOARD_SPI_SCK
#define BOARD_IOID_ACC_MOSI BOARD_IOID_SPI_MOSI
#define BOARD_ACC_MOSI BOARD_SPI_MOSI
#define BOARD_IOID_ACC_MISO BOARD_IOID_SPI_MISO
#define BOARD_ACC_MISO BOARD_SPI_MISO
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \name Device string used on startup
* @{
*/
#define BOARD_STRING "TI SmartRF06EB + CC13xx EM"
/** @} */
/*---------------------------------------------------------------------------*/
#endif /* BOARD_H_ */
/*---------------------------------------------------------------------------*/
/**
* @}
* @}
*/

View file

@ -0,0 +1,7 @@
### Will allow the inclusion of the correct CPU makefile
CPU_FAMILY = cc26xx
### Include the common makefile
include $(PLATFORM_ROOT_DIR)/srf06/Makefile.srf06
CONTIKI_TARGET_DIRS += srf06/cc26xx

View file

@ -39,7 +39,7 @@
* other peripherals
*
* This file can be used as the basis to configure other boards using the
* CC26xx code as their basis.
* CC13xx/CC26xx code as their basis.
*
* This file is not meant to be modified by the user.
* @{
@ -231,14 +231,7 @@
* \name Device string used on startup
* @{
*/
#define BOARD_STRING "TI SmartRF06EB+CC26xx EM"
/** @} */
/*---------------------------------------------------------------------------*/
/**
* \brief Board specific iniatialisation
* @{
*/
void board_init(void);
#define BOARD_STRING "TI SmartRF06EB + CC26xx EM"
/** @} */
/*---------------------------------------------------------------------------*/
#endif /* BOARD_H_ */

View file

@ -29,11 +29,11 @@
*/
/*---------------------------------------------------------------------------*/
/**
* \addtogroup srf06-cc26xx-peripherals
* \addtogroup srf06-common-peripherals
* @{
*
* \file
* Driver for the SmartRF06EB LEDs when a CC26xx is mounted on the board
* Driver for the SmartRF06EB LEDs when a CC13xx/CC26xx EM is mounted on it
*/
/*---------------------------------------------------------------------------*/
#include "contiki.h"

View file

@ -29,7 +29,7 @@
*/
/*---------------------------------------------------------------------------*/
/**
* \addtogroup srf06-cc26xx-peripherals
* \addtogroup srf06-common-peripherals
* @{
*
* \file