Contiki-NG

This file provides connectivity information on LEDs, Buttons, UART and other OpenMote-B peripherals. More...

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

Go to the source code of this file.

Macros

Serial Boot Loader Backdoor configuration
#define FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN   7
 Pin PA7 activates the boot loader.
 
#define FLASH_CCA_CONF_BOOTLDR_BACKDOOR_ACTIVE_HIGH   0
 A logic low level activates the boot loader.
 
OpenMote-B LED configuration

LEDs on the OpenMote-B are connected as follows:

  • LED1 (Red) -> PC4
  • LED2 (Yellow) -> PC6
  • LED3 (Green) -> PC7
  • LED4 (Orange) -> PC5
#define LEDS_ARCH_L1_PORT   GPIO_C_NUM
 
#define LEDS_ARCH_L1_PIN   4
 
#define LEDS_ARCH_L2_PORT   GPIO_C_NUM
 
#define LEDS_ARCH_L2_PIN   6
 
#define LEDS_ARCH_L3_PORT   GPIO_C_NUM
 
#define LEDS_ARCH_L3_PIN   7
 
#define LEDS_ARCH_L4_PORT   GPIO_C_NUM
 
#define LEDS_ARCH_L4_PIN   5
 
#define LEDS_CONF_RED   1
 
#define LEDS_CONF_YELLOW   2
 
#define LEDS_CONF_GREEN   4
 
#define LEDS_CONF_ORANGE   8
 
#define LEDS_CONF_COUNT   4
 
UART configuration

On the OpenMote-B, the UART is connected to the following ports/pins

  • RX: PA0
  • TX: PA1

We configure the port to use UART0.

#define UART0_RX_PORT   GPIO_A_NUM
 
#define UART0_RX_PIN   0
 
#define UART0_TX_PORT   GPIO_A_NUM
 
#define UART0_TX_PIN   1
 
OpenMote-B Button configuration

Buttons on the OpenMote-B are connected as follows:

  • BUTTON_USER -> PD5
#define BUTTON_USER_PORT   GPIO_D_NUM
 BUTTON_USER -> PD5.
 
#define BUTTON_USER_PIN   5
 
#define BUTTON_USER_VECTOR   GPIO_D_IRQn
 
#define PLATFORM_HAS_BUTTON   1
 
#define PLATFORM_SUPPORTS_BUTTON_HAL   1
 
SPI (SSI0) configuration

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

#define SPI_CLK_PORT   GPIO_A_NUM
 
#define SPI_CLK_PIN   2
 
#define SPI_MOSI_PORT   GPIO_A_NUM
 
#define SPI_MOSI_PIN   5
 
#define SPI_MISO_PORT   GPIO_A_NUM
 
#define SPI_MISO_PIN   4
 
SPI (SSI1) configuration

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

The SSI1 is currently not used.

#define SPI1_CLK_PORT   GPIO_C_NUM
 
#define SPI1_CLK_PIN   4
 
#define SPI1_TX_PORT   GPIO_C_NUM
 
#define SPI1_TX_PIN   5
 
#define SPI1_RX_PORT   GPIO_C_NUM
 
#define SPI1_RX_PIN   6
 
I2C configuration

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

#define I2C_SCL_PORT   GPIO_B_NUM
 
#define I2C_SCL_PIN   5
 
#define I2C_SDA_PORT   GPIO_B_NUM
 
#define I2C_SDA_PIN   4
 
OpenMote-B antenna switch configuration
#define ANTENNA_BSP_RADIO_BASE   GPIO_PORT_TO_BASE(GPIO_D_NUM)
 
#define ANTENNA_BSP_RADIO_INT   GPIO_PIN_MASK(3)
 
#define ANTENNA_BSP_RADIO_EXT   GPIO_PIN_MASK(4)
 
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   "OpenMote-B"
 

Detailed Description

This file provides connectivity information on LEDs, Buttons, UART and other OpenMote-B peripherals.

This file can be used as the basis to configure other platforms using the cc2538 SoC.

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.