boards/cc1352-launchpad: Add support for CC1352R Launchpad

Signed-off-by: Anton Gerasimov <tossel@gmail.com>
This commit is contained in:
Anton Gerasimov 2018-06-10 23:31:27 +02:00
parent 1659a71ed0
commit a60d8f471f
10 changed files with 315 additions and 0 deletions

View File

@ -0,0 +1,3 @@
MODULE = board
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1,7 @@
CPU = cc13x2
CPU_MODEL = cc1352r1
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart

View File

@ -0,0 +1,11 @@
export XDEBUGGER = XDS110
# set default port depending on operating system
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
# setup serial terminal
include $(RIOTMAKE)/tools/serial.inc.mk
# configure the flash tool
include $(RIOTMAKE)/tools/uniflash.inc.mk

View File

@ -0,0 +1,34 @@
/*
* Copyright (C) 2016 Nicholas Jackson
* 2017 HAW Hamburg
*
* This file is subject to the terms and conditions of the GNU Lesser General
* Public License v2.1. See the file LICENSE in the top level directory for more
* details.
*/
/**
* @ingroup boards_cc1352_launchpad
* @{
*
* @file
* @brief Board specific implementations for TI CC1352 LaunchPad
*
* @author Nicholas Jackson <nicholas.jackson@griffithuni.edu.au>
* @author Sebastian Meiling <s@mlng.net>
*/
#include "cpu.h"
#include "board.h"
/**
* @brief Initialise the board.
*/
void board_init(void)
{
cpu_init();
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
}

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configurations XML_version="1.2" id="configurations_0">
<configuration XML_version="1.2" id="configuration_0">
<instance XML_version="1.2" desc="Texas Instruments XDS110 USB Debug Probe" href="connections/TIXDS110_Connection.xml" id="Texas Instruments XDS110 USB Debug Probe" xml="TIXDS110_Connection.xml" xmlpath="connections"/>
<connection XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe">
<instance XML_version="1.2" href="drivers/tixds510icepick_c.xml" id="drivers" xml="tixds510icepick_c.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds510cs_dap.xml" id="drivers" xml="tixds510cs_dap.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds510cortexM.xml" id="drivers" xml="tixds510cortexM.xml" xmlpath="drivers"/>
<property Type="choicelist" Value="1" id="Debug Probe Selection">
<choice Name="Select by serial number" value="0">
<property Type="stringfield" Value="L41003KF" id="-- Enter the serial number"/>
</choice>
</property>
<property id="Power Selection" Type="choicelist" Value="1">
<choice Name="Target supplied power" value="0">
<property id="Voltage Selection" Type="choicelist" Value="1">
<choice Name="User specified value" value="1">
<property id="Voltage Level" Type="stringfield" Value="3.3"/>
</choice>
</property>
</choice>
<choice Name="Probe supplied power" value="1">
<property id="Voltage Level" Type="stringfield" Value="3.3"/>
</choice>
</property>
<property Type="choicelist" Value="0" id="JTAG Signal Isolation"/>
<property id="SWD Mode Settings" desc="JTAG / SWD / cJTAG Mode" Type="choicelist" Value="4">
<choice Name="cJTAG (1149.7) 2-pin advanced modes" value="enable">
<property id="XDS110 Aux Port" desc="Auxiliary COM Port Connection" Type="choicelist" Value="1"/>
</choice>
</property>
<platform XML_version="1.2" id="platform_0">
<instance XML_version="1.2" desc="CC1352R1F3" href="devices/cc1352r1f3.xml" id="CC1352R1F3" xml="cc1352r1f3.xml" xmlpath="devices"/>
</platform>
</connection>
</configuration>
</configurations>

View File

@ -0,0 +1,41 @@
# config version=3.5
$ sepk
pod_drvr=libjioxds110.so
pod_port=0
pod_supply=1
pod_voltage_selection=1
pod_voltage=3.3
$ /
$ product
title="Texas Instruments XDS110 USB"
alias=TI_XDS110_USB
name=XDS110
$ /
$ uscif
tdoedge=FALL
tclk_program=DEFAULT
tclk_frequency=2.5MHz
jtag_isolate=disable
$ /
$ dot7
dts_usage=enable
dts_type=xds110
dts_program=emulator
dts_frequency=1.0MHz
ts_format=oscan2
ts_pin_width=only_two
$ /
$ swd
swd_debug=disabled
swo_data=tdo_pin
$ /
@ icepick_c family=icepick_c irbits=6 drbits=1 subpaths=2
& subpath_2 address=0 default=no custom=yes force=yes pseudo=no cancelreset=0x0
@ bypass_0 family=bypass irbits=4 drbits=1
& subpath_0 address=16 default=no custom=yes force=yes pseudo=no cancelreset=0x0
@ cs_dap_0 family=cs_dap irbits=4 drbits=1 subpaths=1 identify=0x4BA00477 revision=Legacy systemresetwhileconnected=1
& subpath_1 type=debug address=0 default=no custom=yes force=yes pseudo=no
@ cortex_m4_0 family=cortex_mxx irbits=0 drbits=0 identify=0x02000000 traceid=0x0
& /
& /
# /

View File

@ -0,0 +1,6 @@
mem 0x00 0x58000 ro 32 nocache
mem 0x10000000 0x10020000 ro 32 nocache
mem 0x20000000 0x20005000 rw 32 nocache
mem 0x40000000 0x400E1028 rw 32 nocache
mem 0xE000E000 0xE000F000 rw 32 nocache
target remote localhost:3333

View File

@ -0,0 +1,5 @@
/**
* @defgroup boards_cc1352_launchpad TI CC1352 LaunchPad
* @ingroup boards
* @brief Texas Instruments SimpleLink(TM) CC1352 Wireless MCU LaunchPad(TM) Kit
*/

View File

@ -0,0 +1,78 @@
/*
* Copyright (C) 2016 Nicholas Jackson
* 2017 Sebastian Meiling
* 2018 Anton Gerasimov
*
* This file is subject to the terms and conditions of the GNU Lesser General
* Public License v2.1. See the file LICENSE in the top level directory for more
* details.
*/
/**
* @ingroup boards_cc1352_launchpad
* @{
*
* @file
* @brief Board specific definitions for TI CC1352 LaunchPad
*
* @author Nicholas Jackson <nicholas.jackson@griffithuni.edu.au>
* @author Sebastian Meiling <s@mlng.net>
* @author Anton Gerasimov <tossel@gmail.com>
*/
#ifndef BOARD_H
#define BOARD_H
#include "periph/gpio.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name xtimer configuration
* @{
*/
#define XTIMER_WIDTH (16)
#define XTIMER_BACKOFF (25)
#define XTIMER_ISR_BACKOFF (20)
/** @} */
/**
* @name On-board button configuration
* @{
*/
#define BTN0_PIN GPIO_PIN(0, 13)
#define BTN0_MODE GPIO_IN_PU
#define BTN1_PIN GPIO_PIN(0, 14)
#define BTN1_MODE GPIO_IN_PU
/** @} */
/**
* @brief On-board LED configuration and controlling
* @{
*/
#define LED0_PIN GPIO_PIN(0, 6) /**< red */
#define LED1_PIN GPIO_PIN(0, 7) /**< green */
#define LED0_ON gpio_set(LED0_PIN)
#define LED0_OFF gpio_clear(LED0_PIN)
#define LED0_TOGGLE gpio_toggle(LED0_PIN)
#define LED1_ON gpio_set(LED1_PIN)
#define LED1_OFF gpio_clear(LED1_PIN)
#define LED1_TOGGLE gpio_toggle(LED1_PIN)
/** @} */
/**
* @brief Initialize board specific hardware
*/
void board_init(void);
#ifdef __cplusplus
}
#endif
#endif /* BOARD_H */
/** @} */

View File

@ -0,0 +1,92 @@
/*
* Copyright (C) 2016 Nicholas Jackson
* 2017 HAW Hamburg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_cc2650_launchpad
* @{
*
* @file
* @brief Peripheral MCU configuration for TI CC2650 LaunchPad
*
* @author Nicholas Jackson <nicholas.jackson@griffithuni.edu.au>
* @author Sebastian Meiling <s@mlng.net>
*/
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H
#include "periph_cpu.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Clock configuration
* @{
*/
/* the main clock is fixed to 48MHZ */
#define CLOCK_CORECLOCK (48000000U)
/** @} */
/**
* @name Timer configuration
*
* General purpose timers (GPT[0-3]) are configured consecutively and in order
* (without gaps) starting from GPT0, i.e. if multiple timers are enabled.
*
* @{
*/
static const timer_conf_t timer_config[] = {
{
.cfg = GPT_CFG_16T,
.chn = 2,
},
{
.cfg = GPT_CFG_32T,
.chn = 1,
},
{
.cfg = GPT_CFG_16T,
.chn = 2,
},
{
.cfg = GPT_CFG_32T,
.chn = 1,
}
};
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
/** @} */
/**
* @name UART configuration
*
* The used CC26x0 CPU only supports a single UART device, so all we need to
* configure are the RX and TX pins.
*
* Optionally we can enable hardware flow control, by setting UART_HW_FLOW_CTRL
* to 1 and defining pins for UART_CTS_PIN and UART_RTS_PIN.
* @{
*/
#define UART_NUMOF (1)
#define UART0_RX_PIN (12)
#define UART0_TX_PIN (13)
/* Not implemented in launchpad, define if using external transceiver */
#define UART1_RX_PIN (0)
#define UART1_TX_PIN (0)
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* PERIPH_CONF_H */
/** @} */