diff --git a/arch/arm/src/tiva/cc13xx/cc13xx_gpio.h b/arch/arm/src/tiva/cc13xx/cc13xx_gpio.h index 0ad837cf54..7ae9691b3d 100644 --- a/arch/arm/src/tiva/cc13xx/cc13xx_gpio.h +++ b/arch/arm/src/tiva/cc13xx/cc13xx_gpio.h @@ -52,7 +52,7 @@ /* Encoding: * - * PPPP PPIO WCCR SSHS PPAA GIII EEVD DDDD + * PPPP PPIO WCCR SSHS PPAA GIII EEVD DDDD * * PPPPPP - 6 bits. Port ID (see definitions in hardware/c13x0/c13x0_ioc.h * and hardware.cc13x2_cc26x2/cc13x2_cc26x2_ioc) @@ -74,14 +74,14 @@ * 2 - 1 bit Edge asserts AON_PROG2 (CC13x2/CC26x only) NOTE 1 * V - 1 bit GPIO output initial value * DDDDD - 5 bits DIO 0-31 - *t + * * NOTE 1: Not currently implemented because no bits are available in * the uint32_t. We need more bits! */ /* Port ID * - * PPPP PP.. .... .... .... .... .... .... + * PPPP PP.. .... .... .... .... .... .... * * See PORTID definitions in the IOC register definitions file. */ @@ -92,21 +92,23 @@ /* Input Enable: * - * .... ..I. .... .... .... .... .... .... + * .... ..I. .... .... .... .... .... .... */ #define GPIO_IE (1 << 25) /* Bit 25: Input Enable */ -[ + /* GPIO output: * - * .... ...O .... .... .... .... .... .... + * .... ...O .... .... .... .... .... .... + * + * Valid only if Port ID=IOC_IOCFG_PORTID_GPIO */ #define GPIO_OUTPUT (1 << 24) /* Bit 24: Input Enable */ /* Wakeup enable (CC13x2/CC26x only): * - * .... .... W... .... .... .... .... .... + * .... .... W... .... .... .... .... .... */ #define GPIO_WUEN (1 << 23) /* Bit 23: Input edge asserts MCU_WU event */ @@ -169,7 +171,7 @@ /* Current mode: * - * .... .... .... .... ..AA .... .... .... + * .... .... .... .... ..AA .... .... .... */ #define GPIO_IOCURR_SHIFT (12) /* Bits 12-13: I/O current mode */ @@ -180,14 +182,14 @@ /* Enable edge interrupt generation: * - * .... .... .... .... .... G... .... .... + * .... .... .... .... .... G... .... .... */ #define GPIO_EDGE_IRQEN (1 << 11) /* Bit 11: Enable edge interrupt generation */ /* I/O mode: * - * .... .... .... .... .... .III .... .... + * .... .... .... .... .... .III .... .... */ #define GPIO_IOMODE_SHIFT (8) /* Bits 8-10: I/O Mode */ @@ -201,7 +203,7 @@ /* Edge detect mode * - * .... .... .... .... .... .... EE.. .... + * .... .... .... .... .... .... EE.. .... */ #define GPIO_EDGE_SHIFT (6) /* Bits 6-7: Enable edge events generation */ @@ -214,7 +216,7 @@ #if 0 /* Need more bits! */ /* Edge asserts AON_PROG0/1/2 (CC13x2/CC26x only): * - * .... .... .... .... .... .... .... .... + * .... .... .... .... .... .... .... .... */ #define GPIO_AON_PROG0 (1 << xx) /* Bit xx: Input edge asserts AON_PROG0 */ @@ -225,7 +227,9 @@ /* GPIO output initial value: * - * .... .... .... .... .... .... ..V. .... + * .... .... .... .... .... .... ..V. .... + * + * Valid only if Port ID=IOC_IOCFG_PORTID_GPIO and GPIO_OUTPUT selected. */ #define GPIO_VALUE_SHIFT 8 /* Bit 5: If output, inital value of output */ @@ -235,7 +239,7 @@ /* DIO: * - * .... .... .... .... .... .... ...D DDDD + * .... .... .... .... .... .... ...D DDDD */ #define GPIO_DIO_SHIFT (0) /* Bits 0-4: DIO */ diff --git a/arch/arm/src/tiva/hardware/cc13x0/cc13x0_timer.h b/arch/arm/src/tiva/hardware/cc13x0/cc13x0_timer.h new file mode 100644 index 0000000000..090b31de2a --- /dev/null +++ b/arch/arm/src/tiva/hardware/cc13x0/cc13x0_timer.h @@ -0,0 +1,67 @@ +/************************************************************************************ + * arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_timer.h + * + * Copyright (C) 2018 Gregory Nutt. All rights reserved. + * Authors: Gregory Nutt + * + * 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 NuttX 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_TIVA_HARDWARE_CC13X2_CC26X2_CC13X2_CC26X2_TIMER_H +#define __ARCH_ARM_SRC_TIVA_HARDWARE_CC13X2_CC26X2_CC13X2_CC26X2_TIMER_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* TIMER Register Offsets ***********************************************************/ + +/* TIMER Register Addresses *********************************************************/ + +/* TIMER Register Bitfield Definitions **********************************************/ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_TIVA_HARDWARE_CC13X2_CC26X2_CC13X2_CC26X2_TIMER_H */ diff --git a/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_timer.h b/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_timer.h new file mode 100644 index 0000000000..090b31de2a --- /dev/null +++ b/arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_timer.h @@ -0,0 +1,67 @@ +/************************************************************************************ + * arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_timer.h + * + * Copyright (C) 2018 Gregory Nutt. All rights reserved. + * Authors: Gregory Nutt + * + * 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 NuttX 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_TIVA_HARDWARE_CC13X2_CC26X2_CC13X2_CC26X2_TIMER_H +#define __ARCH_ARM_SRC_TIVA_HARDWARE_CC13X2_CC26X2_CC13X2_CC26X2_TIMER_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* TIMER Register Offsets ***********************************************************/ + +/* TIMER Register Addresses *********************************************************/ + +/* TIMER Register Bitfield Definitions **********************************************/ + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_TIVA_HARDWARE_CC13X2_CC26X2_CC13X2_CC26X2_TIMER_H */ diff --git a/arch/arm/src/tiva/tiva_gpio.h b/arch/arm/src/tiva/tiva_gpio.h index 64eb7183f4..9e130d05d4 100644 --- a/arch/arm/src/tiva/tiva_gpio.h +++ b/arch/arm/src/tiva/tiva_gpio.h @@ -66,10 +66,8 @@ # include "lm/lm4f_gpio.h" #elif defined(CONFIG_ARCH_CHIP_TM4C) # include "tm4c/tm4c_gpio.h" -#elif defined(CONFIG_ARCH_CHIP_CC13X0) -# include "cc13x0/cc13x0_gpio.h" -#elif defined(CONFIG_ARCH_CHIP_CC13X2) -# include "cc13x2_cc26x2/cc13x2_cc26x2_gpio.h" +#elif defined(CONFIG_ARCH_CHIP_CC13X0) || defined(CONFIG_ARCH_CHIP_CC13X2) +# include "cc13xx/cc13xx_gpio.h" #else # error "Unsupported Tiva/Stellaris system GPIO" #endif diff --git a/configs/launchxl-cc1312r1/include/board.h b/configs/launchxl-cc1312r1/include/board.h index 2282adddd5..7971fda575 100644 --- a/configs/launchxl-cc1312r1/include/board.h +++ b/configs/launchxl-cc1312r1/include/board.h @@ -102,6 +102,16 @@ /* Pin Disambiguation *******************************************************/ +/* UART0: + * + * The on-board XDS110 Debugger provide a USB virtual serial console using + * UART0 (PA0/U0RX and PA1/U0TX). + */ + +#define GPIO_UART0_RX (GPIO_PORTID(IOC_IOCFG_PORTID_UART0_RX) | IOC_IOCFG_IE | \ + GPIO_DIO(0)) +#define GPIO_UART0_TX (GPIO_PORTID(IOC_IOCFG_PORTID_UART0_TX) | GPIO_DIO(1)) + /* DMA **********************************************************************/ #endif /* __CONFIG_NUCLEO_F303ZE_INCLUDE_BOARD_H */