Contiki-NG

Header file with definitions related to the I/O connections on the TI SmartRF06EB. More...

#include "dev/gpio.h"
#include "dev/nvic.h"

Go to the source code of this file.

Macros

SmartRF LED configuration

LEDs on the SmartRF06 (EB and BB) are connected as follows:

  • LED1 (Red) -> PC0
  • LED2 (Yellow) -> PC1
  • LED3 (Green) -> PC2
  • LED4 (Orange) -> PC3

LED1 shares the same pin with the USB pullup

#define LEDS_CONF_YELLOW   1
 
#define LEDS_CONF_GREEN   2
 
#define LEDS_CONF_ORANGE   4
 
#define LEDS_ARCH_L1_PORT   GPIO_C_NUM
 
#define LEDS_ARCH_L1_PIN   1
 
#define LEDS_ARCH_L2_PORT   GPIO_C_NUM
 
#define LEDS_ARCH_L2_PIN   2
 
#define LEDS_ARCH_L3_PORT   GPIO_C_NUM
 
#define LEDS_ARCH_L3_PIN   3
 
#define LEDS_ARCH_L4_PORT   GPIO_C_NUM
 
#define LEDS_ARCH_L4_PIN   0
 
#define LEDS_CONF_RED   8
 
#define LEDS_CONF_COUNT   4
 
USB configuration

The USB pullup is driven by PC0 and is shared with LED1

#define USB_PULLUP_PORT   GPIO_C_NUM
 
#define USB_PULLUP_PIN   0
 
UART configuration

On the SmartRF06EB, the UART (XDS back channel) is connected to the following ports/pins

  • RX: PA0
  • TX: PA1
  • CTS: PB0 (Can only be used with UART1)
  • RTS: PD3 (Can only be used with UART1)

We configure the port to use UART0. To use UART1, replace UART0_* with UART1_* below.

#define UART0_RX_PORT   GPIO_A_NUM
 
#define UART0_RX_PIN   0
 
#define UART0_TX_PORT   GPIO_A_NUM
 
#define UART0_TX_PIN   1
 
#define UART1_CTS_PORT   GPIO_B_NUM
 
#define UART1_CTS_PIN   0
 
#define UART1_RTS_PORT   GPIO_D_NUM
 
#define UART1_RTS_PIN   3
 
SmartRF Button configuration

Buttons on the SmartRF06 are connected as follows:

  • BUTTON_SELECT -> PA3
  • BUTTON_LEFT -> PC4
  • BUTTON_RIGHT -> PC5
  • BUTTON_UP -> PC6
  • BUTTON_DOWN -> PC7
#define BUTTON_SELECT_PORT   GPIO_A_NUM
 BUTTON_SELECT -> PA3.
 
#define BUTTON_SELECT_PIN   3
 
#define BUTTON_SELECT_VECTOR   GPIO_A_IRQn
 
#define BUTTON_LEFT_PORT   GPIO_C_NUM
 BUTTON_LEFT -> PC4.
 
#define BUTTON_LEFT_PIN   4
 
#define BUTTON_LEFT_VECTOR   GPIO_C_IRQn
 
#define BUTTON_RIGHT_PORT   GPIO_C_NUM
 BUTTON_RIGHT -> PC5.
 
#define BUTTON_RIGHT_PIN   5
 
#define BUTTON_RIGHT_VECTOR   GPIO_C_IRQn
 
#define BUTTON_UP_PORT   GPIO_C_NUM
 BUTTON_UP -> PC6.
 
#define BUTTON_UP_PIN   6
 
#define BUTTON_UP_VECTOR   GPIO_C_IRQn
 
#define BUTTON_DOWN_PORT   GPIO_C_NUM
 BUTTON_DOWN -> PC7.
 
#define BUTTON_DOWN_PIN   7
 
#define BUTTON_DOWN_VECTOR   GPIO_C_IRQn
 
#define PLATFORM_HAS_BUTTON   1
 
#define PLATFORM_SUPPORTS_BUTTON_HAL   1
 
ADC configuration

These values configure which CC2538 pins and ADC channels to use for the ADC inputs.

ADC inputs can only be on port A.

#define ADC_ALS_PWR_PORT   GPIO_A_NUM
 ALS power GPIO control port.
 
#define ADC_ALS_PWR_PIN   7
 ALS power GPIO control pin.
 
#define ADC_ALS_OUT_PIN   6
 ALS output ADC input pin on port A.
 
SPI configuration

These values configure which CC2538 pins to use for the SPI lines.

Both SPI instances can be used independently by providing the corresponding port / pin macros.

#define SPI0_IN_USE   0
 
#define SPI1_IN_USE   0
 
CC2538 TSCH configuration
#define RADIO_PHY_OVERHEAD   CC2538_PHY_OVERHEAD
 
#define RADIO_BYTE_AIR_TIME   CC2538_BYTE_AIR_TIME
 
#define RADIO_DELAY_BEFORE_TX   CC2538_DELAY_BEFORE_TX
 
#define RADIO_DELAY_BEFORE_RX   CC2538_DELAY_BEFORE_RX
 
#define RADIO_DELAY_BEFORE_DETECT   CC2538_DELAY_BEFORE_DETECT
 
Device string used on startup
#define BOARD_STRING   "TI SmartRF06 + cc2538EM"
 

Detailed Description

Header file with definitions related to the I/O connections on the TI SmartRF06EB.

Note
Do not include this file directly. It gets included by contiki-conf after all relevant directives have been set.

Definition in file board.h.