Contiki-NG
Loading...
Searching...
No Matches

Files

file  board.c
 Board-initialisation for the Zolertia's Firefly platform.
 
file  board.h
 Header file with definitions related to the I/O connections on the Zolertia's Firefly platform, Zoul-based.
 
file  board.c
 Board-initialisation for the Zolertia's Firefly platform.
 
file  board.h
 Header file with definitions related to the I/O connections on the Zolertia's Firefly platform, Zoul-based.
 

Functions

void board_init ()
 Board specific iniatialisation.
 

UART configuration

On the Firefly, the UARTs are connected to the following ports/pins:

  • UART0:
    • RX: PA0, connected to CP2104 serial-to-usb converter TX pin
    • TX: PA1, connected to CP2104 serial-to-usb converter RX pin
  • UART1:
    • RX: PC1
    • TX: PC0
    • CTS: not used, one suggestion however is to use PD1
    • RTS: not used, one suggestion however is to use PD0

We configure the port to use UART0 and UART1, CTS/RTS only for UART1, both without a HW pull-up resistor. UART0 is not exposed anywhere, UART1 pins are exposed over the JP3 connector.

#define UART1_CTS_PORT   (-1)
 GPIO_D_NUM.
 
#define UART1_CTS_PIN   (-1)
 1
 
#define UART1_RTS_PORT   (-1)
 GPIO_D_NUM.
 
#define UART1_RTS_PIN   (-1)
 0
 
#define UART1_CTS_PORT   (-1)
 GPIO_D_NUM.
 
#define UART1_CTS_PIN   (-1)
 1
 
#define UART1_RTS_PORT   (-1)
 GPIO_D_NUM.
 
#define UART1_RTS_PIN   (-1)
 0
 

ADC configuration

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

There pins are suggested as they can be changed, but note that only pins from PA can be configured as ADC.

  • ADC1: up to 3.3V.
  • ADC2: up to 3.3V.
  • ADC3: up to 3.3V.
  • ADC4: up to 3.3V.
  • ADC5: up to 3.3V.
  • ADC6: up to 3.3V, shared with user button.

Only ADC1 and ADC3 are enabled as default.

The internal ADC reference is 1190mV, use either a voltage divider as input, or a different voltage reference, like AVDD5 or other externally (AIN7 or AIN6).

#define ADC_SENSORS_PORT   GPIO_A_NUM
 ADC GPIO control port.
 
#define ADC_SENSORS_ADC1_PIN   5
 ADC1 to PA5

 
#define ADC_SENSORS_ADC2_PIN   4
 ADC2 to PA4

 
#define ADC_SENSORS_ADC3_PIN   2
 ADC3 to PA2

 
#define ADC_SENSORS_ADC4_PIN   6
 ADC4 to PA6

 
#define ADC_SENSORS_ADC5_PIN   7
 ADC5 to PA7

 
#define ADC_SENSORS_ADC6_PIN   (-1)
 ADC6 not declared

 
#define ADC_SENSORS_MAX   5
 Maximum sensors

 
#define ADC_SENSORS_PORT   GPIO_A_NUM
 ADC GPIO control port.
 
#define ADC_SENSORS_ADC1_PIN   5
 ADC1 to PA5

 
#define ADC_SENSORS_ADC2_PIN   4
 ADC2 to PA4

 
#define ADC_SENSORS_ADC3_PIN   2
 ADC3 to PA2

 
#define ADC_SENSORS_ADC4_PIN   6
 ADC4 to PA6

 
#define ADC_SENSORS_ADC5_PIN   7
 ADC5 to PA7

 
#define ADC_SENSORS_ADC6_PIN   (-1)
 ADC6 not declared

 
#define ADC_SENSORS_MAX   5
 Maximum sensors

 

Firefly Button configuration

Buttons on the Firefly are connected as follows:

  • BUTTON_USER -> PA3, S1 user button, shared with bootloader
  • BUTTON_RESET -> RESET_N line
#define BUTTON_USER_PORT   GPIO_A_NUM
 BUTTON_USER -> PA3.
 
#define BUTTON_USER_PORT   GPIO_A_NUM
 BUTTON_USER -> PA3.
 

Detailed Description

The Zolertia Firefly is the most down-to-core development platform, exposing the Zoul core functionalities and features, with a slick design to allow a flexible and easier user experience.

Defines related to the Firefly platform: a Zoul-based breakout board

This file provides connectivity information on LEDs, Buttons, UART and other peripherals

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