2018-12-03 18:40:57 +01:00
|
|
|
/****************************************************************************
|
2019-08-16 15:40:59 +02:00
|
|
|
* boards/arm/tiva/launchxl-cc1312r1/include/board.h
|
2018-12-03 18:40:57 +01:00
|
|
|
*
|
2021-03-17 18:14:12 +01:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2018-12-03 18:40:57 +01:00
|
|
|
*
|
2021-03-17 18:14:12 +01:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2018-12-03 18:40:57 +01:00
|
|
|
*
|
2021-03-17 18:14:12 +01:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2018-12-03 18:40:57 +01:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2019-08-16 15:40:59 +02:00
|
|
|
#ifndef __BOARDS_ARM_TIVA_LAUNCHXL_CC1312R1_INCLUDE_BOARD_H
|
|
|
|
#define __BOARDS_ARM_TIVA_LAUNCHXL_CC1312R1_INCLUDE_BOARD_H
|
2018-12-03 18:40:57 +01:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Pre-processor Definitions
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* Clocking *****************************************************************/
|
|
|
|
|
2018-12-05 00:21:59 +01:00
|
|
|
/* Frequency of the ARM core clock */
|
|
|
|
|
|
|
|
#define SYSCLK_FREQUENCY 48000000
|
|
|
|
|
2018-12-09 20:35:42 +01:00
|
|
|
/* Peripheral Clock (PCLK)
|
|
|
|
*
|
|
|
|
* Same frequency as the SYSCLK
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define PCLK_FREQUENCY SYSCLK_FREQUENCY
|
|
|
|
|
2018-12-03 18:40:57 +01:00
|
|
|
/* LED definitions **********************************************************/
|
|
|
|
|
2018-12-05 16:11:55 +01:00
|
|
|
/* The LaunchXL-cc1312R1 and two LEDs controlled by software: DIO7_GLED (CR1)
|
|
|
|
* and DIO6_RLED (CR2). A high output value illuminates an LED.
|
|
|
|
*
|
|
|
|
* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in
|
|
|
|
* any way. The following definitions are used to access individual LEDs.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* LED index values for use with board_userled() */
|
|
|
|
|
|
|
|
#define BOARD_GLED 0
|
|
|
|
#define BOARD_RLED 1
|
|
|
|
#define BOARD_NLEDS 2
|
|
|
|
|
|
|
|
/* LED bits for use with board_userled_all() */
|
|
|
|
|
|
|
|
#define BOARD_GLED_BIT (1 << BOARD_GLED)
|
|
|
|
#define BOARD_RLED_BIT (1 << BOARD_RLED)
|
|
|
|
|
|
|
|
/* These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
|
|
|
|
* defined. In that case, the usage by the board port is defined in
|
|
|
|
* include/board.h and src/cc1312_autoleds.c. The LEDs are used to
|
|
|
|
* encode OS-related events as follows:
|
|
|
|
*
|
|
|
|
* ------------------- ---------------------------- ---- ----
|
|
|
|
* SYMBOL Meaning GLED RLED
|
2019-08-16 15:40:59 +02:00
|
|
|
* ------------------- ---------------------------- ---- ----
|
|
|
|
*/
|
2018-12-05 16:11:55 +01:00
|
|
|
|
|
|
|
#define LED_STARTED 0 /* NuttX has been started OFF OFF */
|
|
|
|
#define LED_HEAPALLOCATE 1 /* Heap has been allocated OFF ON */
|
|
|
|
#define LED_IRQSENABLED 1 /* Interrupts enabled OFF ON */
|
|
|
|
#define LED_STACKCREATED 2 /* Idle stack created ON OFF */
|
|
|
|
#define LED_INIRQ 3 /* In an interrupt N/C GLOW */
|
|
|
|
#define LED_SIGNAL 3 /* In a signal handler N/C GLOW */
|
|
|
|
#define LED_ASSERTION 3 /* An assertion failed N/C GLOW */
|
|
|
|
#define LED_PANIC 4 /* The system has crashed OFF BLINK */
|
|
|
|
#undef LED_IDLE /* MCU is is sleep mode -Not used- */
|
|
|
|
|
|
|
|
/* Thus iF GLED is statically on, NuttX has successfully booted and is,
|
|
|
|
* apparently, running normally. A soft glow of the RLED means that the
|
|
|
|
* board is taking interrupts. If GLED is off and GLED is flashing at
|
|
|
|
* approximately 2Hz, then a fatal error has been detected and the system
|
|
|
|
* has halted.
|
|
|
|
*/
|
|
|
|
|
2018-12-03 18:40:57 +01:00
|
|
|
/* Button definitions *******************************************************/
|
|
|
|
|
2019-02-10 22:33:54 +01:00
|
|
|
/* The LaunchXL-CC1312R1 has two push-puttons:
|
|
|
|
*
|
|
|
|
* DIO13_BTN1 SW1 Low input sensed when depressed
|
|
|
|
* DIO14_BTN2 SW2 Low input sensed when depressed
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define BUTTON_SW1 0
|
|
|
|
#define BUTTON_SW2 1
|
|
|
|
#define NUM_BUTTONS 2
|
|
|
|
|
|
|
|
#define BUTTON_SW1_BIT (1 << BUTTON_SW1)
|
|
|
|
#define BUTTON_SW2_BIT (1 << BUTTON_SW2)
|
|
|
|
|
2018-12-09 16:06:57 +01:00
|
|
|
/* Pin configuration ********************************************************/
|
2018-12-03 18:40:57 +01:00
|
|
|
|
2018-12-09 16:06:57 +01:00
|
|
|
#ifdef CONFIG_TIVA_UART0
|
2018-12-06 15:09:15 +01:00
|
|
|
/* UART0:
|
|
|
|
*
|
|
|
|
* The on-board XDS110 Debugger provide a USB virtual serial console using
|
2019-02-12 23:35:14 +01:00
|
|
|
* UART0 (DIO2_RXD and DIO3_TXD).
|
2018-12-06 15:09:15 +01:00
|
|
|
*/
|
|
|
|
|
2018-12-09 16:06:57 +01:00
|
|
|
# define GPIO_UART0_RX &g_gpio_uart0_rx
|
|
|
|
# define GPIO_UART0_TX &g_gpio_uart0_tx
|
|
|
|
#endif
|
2018-12-06 15:09:15 +01:00
|
|
|
|
2018-12-03 18:40:57 +01:00
|
|
|
/* DMA **********************************************************************/
|
|
|
|
|
2018-12-09 16:06:57 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Data
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* Pin configuration ********************************************************/
|
|
|
|
|
2019-01-22 22:21:58 +01:00
|
|
|
struct cc13xx_pinconfig_s; /* Forward reference */
|
2018-12-09 16:06:57 +01:00
|
|
|
|
|
|
|
#ifdef CONFIG_TIVA_UART0
|
2019-01-22 22:21:58 +01:00
|
|
|
extern const struct cc13xx_pinconfig_s g_gpio_uart0_rx;
|
|
|
|
extern const struct cc13xx_pinconfig_s g_gpio_uart0_tx;
|
2018-12-09 16:06:57 +01:00
|
|
|
#endif
|
|
|
|
|
2019-08-16 15:40:59 +02:00
|
|
|
#endif /* __BOARDS_ARM_TIVA_LAUNCHXL_CC1312R1_INCLUDE_BOARD_H */
|