Mesh4all
May the mesh be with you

Board specific definitions for the VS203 board. More...

#include "cpu.h"
#include "periph/gpio.h"
#include "cc2538_eui_primary.h"
+ Include dependency graph for board.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void board_init (void)
 Initialize board specific hardware, including clock, LEDs and std-IO.
 

LED pin definitions and handlers

#define LED0_PIN   GPIO_PIN(PORT_B, 1)
 
#define LED0_ON   gpio_set(LED0_PIN)
 
#define LED0_OFF   gpio_clear(LED0_PIN)
 
#define LED0_TOGGLE   gpio_toggle(LED0_PIN)
 
#define LED1_PIN   GPIO_PIN(PORT_B, 2)
 
#define LED1_ON   gpio_set(LED1_PIN)
 
#define LED1_OFF   gpio_clear(LED1_PIN)
 
#define LED1_TOGGLE   gpio_toggle(LED1_PIN)
 
#define LED2_PIN   GPIO_PIN(PORT_B, 3)
 
#define LED2_ON   gpio_set(LED2_PIN)
 
#define LED2_OFF   gpio_clear(LED2_PIN)
 
#define LED2_TOGGLE   gpio_toggle(LED2_PIN)
 
#define LED3_PIN   GPIO_PIN(PORT_B, 4)
 
#define LED3_ON   gpio_set(LED3_PIN)
 
#define LED3_OFF   gpio_clear(LED3_PIN)
 
#define LED3_TOGGLE   gpio_toggle(LED3_PIN)
 

User button SW0 pin definition, labeled K1 on the board

#define BTN0_PIN   GPIO_PIN(PORT_C, 7)
 
#define BTN0_MODE   GPIO_IN_PU
 

Flash Customer Configuration Area (CCA) parameters

#define UPDATE_CCA   1
 
#define CCA_BACKDOOR_ENABLE   1
 
#define CCA_BACKDOOR_PORT_A_PIN   7
 
#define CCA_BACKDOOR_ACTIVE_LEVEL   0
 

xtimer configuration

#define XTIMER_WIDTH   (16)
 
#define XTIMER_BACKOFF   (50)
 
#define XTIMER_ISR_BACKOFF   (40)
 

RF Front-End configuration

The FE CC2592 is controlled by the CC2538 with 3 pins, both are connected as follow:

CC2538 (MCU) CC2592 (FE) Description
PORT_D, 2 HGM_EN High Gain Mode (enabled/disabled)
PORT_C, 2 LNA_EN Low Noise Amplifier (enabled/disabled)
PORT_C, 3 PA_EN Power Amplifier (enabled/disabled)

The CC2538 RF Core needs to use "observable signals" to drive the LNA_EN and the PA_EN pins

#define CONFIG_CC2538_RF_OBS_SIG_0_PCX   3
 
#define CONFIG_CC2538_RF_OBS_SIG_1_PCX   2
 
#define CONFIG_CC2538_RF_OBS_SIG_2_PCX   0
 
#define HGM_PIN   GPIO_PIN(PORT_D, 2)
 
#define HGM_ON   gpio_set(HGM_PIN)
 
#define HGM_OFF   gpio_clear(HGM_PIN)
 
#define HGM_TOGGLE   gpio_toggle(HGM_PIN)
 

Detailed Description

Board specific definitions for the VS203 board.

Author
Ian Martin ian@l.nosp@m.ocic.nosp@m.ontro.nosp@m.ls.c.nosp@m.om
Luis A. Ruiz luisa.nosp@m.n00@.nosp@m.hotma.nosp@m.il.c.nosp@m.om

Definition in file board.h.

Macro Definition Documentation

◆ BTN0_MODE

#define BTN0_MODE   GPIO_IN_PU

Pin mode

Definition at line 61 of file board.h.

◆ BTN0_PIN

#define BTN0_PIN   GPIO_PIN(PORT_C, 7)

It's routed to PC7 pin

Definition at line 60 of file board.h.

◆ CCA_BACKDOOR_ACTIVE_LEVEL

#define CCA_BACKDOOR_ACTIVE_LEVEL   0

Active when signal is low: 0

Definition at line 74 of file board.h.

◆ CCA_BACKDOOR_ENABLE

#define CCA_BACKDOOR_ENABLE   1

On/Off the backdoor on boot

Definition at line 72 of file board.h.

◆ CCA_BACKDOOR_PORT_A_PIN

#define CCA_BACKDOOR_PORT_A_PIN   7

Boot button is PORT_A, 7 (PA7)

Definition at line 73 of file board.h.

◆ CONFIG_CC2538_RF_OBS_SIG_0_PCX

#define CONFIG_CC2538_RF_OBS_SIG_0_PCX   3

tx active to PC3, it controls the PA

Definition at line 100 of file board.h.

◆ CONFIG_CC2538_RF_OBS_SIG_1_PCX

#define CONFIG_CC2538_RF_OBS_SIG_1_PCX   2

rx active to PC2, it controls the LNA

Definition at line 101 of file board.h.

◆ CONFIG_CC2538_RF_OBS_SIG_2_PCX

#define CONFIG_CC2538_RF_OBS_SIG_2_PCX   0

rssi valid, routed to the on board red LED PC0

Definition at line 102 of file board.h.

◆ HGM_OFF

#define HGM_OFF   gpio_clear(HGM_PIN)

HGM off handler

Definition at line 106 of file board.h.

◆ HGM_ON

#define HGM_ON   gpio_set(HGM_PIN)

HGM on handler

Definition at line 105 of file board.h.

◆ HGM_PIN

#define HGM_PIN   GPIO_PIN(PORT_D, 2)

High Gain Mode (HGM) pin

Definition at line 104 of file board.h.

◆ HGM_TOGGLE

#define HGM_TOGGLE   gpio_toggle(HGM_PIN)

HGM toggle handler

Definition at line 107 of file board.h.

◆ LED0_OFF

#define LED0_OFF   gpio_clear(LED0_PIN)

LED0 Off handler

Definition at line 37 of file board.h.

◆ LED0_ON

#define LED0_ON   gpio_set(LED0_PIN)

LED0 On handler

Definition at line 36 of file board.h.

◆ LED0_PIN

#define LED0_PIN   GPIO_PIN(PORT_B, 1)

LED0 () routed to PB1 pin

Definition at line 35 of file board.h.

◆ LED0_TOGGLE

#define LED0_TOGGLE   gpio_toggle(LED0_PIN)

LED0 Toggle handler

Definition at line 38 of file board.h.

◆ LED1_OFF

#define LED1_OFF   gpio_clear(LED1_PIN)

LED1 Off handler

Definition at line 42 of file board.h.

◆ LED1_ON

#define LED1_ON   gpio_set(LED1_PIN)

LED1 On handler

Definition at line 41 of file board.h.

◆ LED1_PIN

#define LED1_PIN   GPIO_PIN(PORT_B, 2)

LED1 () routed to PB2 pin

Definition at line 40 of file board.h.

◆ LED1_TOGGLE

#define LED1_TOGGLE   gpio_toggle(LED1_PIN)

LED1 Toggle handler

Definition at line 43 of file board.h.

◆ LED2_OFF

#define LED2_OFF   gpio_clear(LED2_PIN)

LED2 Off handler

Definition at line 47 of file board.h.

◆ LED2_ON

#define LED2_ON   gpio_set(LED2_PIN)

LED2 On handler

Definition at line 46 of file board.h.

◆ LED2_PIN

#define LED2_PIN   GPIO_PIN(PORT_B, 3)

LED2 () routed to PB3 pin

Definition at line 45 of file board.h.

◆ LED2_TOGGLE

#define LED2_TOGGLE   gpio_toggle(LED2_PIN)

LED2 Toggle handler

Definition at line 48 of file board.h.

◆ LED3_OFF

#define LED3_OFF   gpio_clear(LED3_PIN)

LED3 Off handler

Definition at line 52 of file board.h.

◆ LED3_ON

#define LED3_ON   gpio_set(LED3_PIN)

LED3 On handler

Definition at line 51 of file board.h.

◆ LED3_PIN

#define LED3_PIN   GPIO_PIN(PORT_B, 4)

LED3 () routed to PB4 pin

Definition at line 50 of file board.h.

◆ LED3_TOGGLE

#define LED3_TOGGLE   gpio_toggle(LED3_PIN)

LED3 Toggle handler

Definition at line 53 of file board.h.

◆ UPDATE_CCA

#define UPDATE_CCA   1

On/Off Customer Configuration Area should be updated

Definition at line 69 of file board.h.

◆ XTIMER_BACKOFF

#define XTIMER_BACKOFF   (50)

ToDo

Definition at line 82 of file board.h.

◆ XTIMER_ISR_BACKOFF

#define XTIMER_ISR_BACKOFF   (40)

ToDo

Definition at line 83 of file board.h.

◆ XTIMER_WIDTH

#define XTIMER_WIDTH   (16)

ToDo

Definition at line 81 of file board.h.