Contiki-NG
|
Header file with definitions related to the I/O connections on the Zolertia's RE-Mote platform (revision B), cc2538-based. More...
Go to the source code of this file.
Macros | |
RE-Mote LED configuration | |
LEDs on the RE-Mote are exposed in the JP6 port as follows:
The LEDs are connected to a MOSFET to minimize current draw. The LEDs can be disabled by removing resistors R12, R13 and R14. | |
#define | LEDS_ARCH_L1_PORT GPIO_D_NUM |
#define | LEDS_ARCH_L1_PIN 4 |
#define | LEDS_ARCH_L2_PORT GPIO_B_NUM |
#define | LEDS_ARCH_L2_PIN 7 |
#define | LEDS_ARCH_L3_PORT GPIO_B_NUM |
#define | LEDS_ARCH_L3_PIN 6 |
#define | LEDS_CONF_RED 1 |
#define | LEDS_CONF_GREEN 2 |
#define | LEDS_CONF_BLUE 4 |
#define | LEDS_CONF_COUNT 3 |
UART configuration | |
On the RE-Mote, the UARTs are connected to the following ports/pins:
We configure the port to use UART0 and UART1, CTS/RTS only for UART1, both without a HW pull-up resistor UART0 and UART1 pins are exposed over the JP6 connector | |
#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_RX_PORT GPIO_C_NUM |
#define | UART1_RX_PIN 1 |
#define | UART1_TX_PORT GPIO_C_NUM |
#define | UART1_TX_PIN 0 |
#define | UART1_CTS_PORT (-1) |
#define | UART1_CTS_PIN (-1) |
#define | UART1_RTS_PORT (-1) |
#define | UART1_RTS_PIN (-1) |
ADC configuration | |
These values configure which CC2538 pins and ADC channels to use for the ADC inputs. By default the RE-Mote allows two out-of-the-box ADC ports with a phidget-like 3-pin connector (GND/VDD/ADC) The RE-Mote allows both 3.3V and 5V analogue sensors as follow:
Also there are other ADC channels shared by default with Micro SD card and user button implementations:
ADC inputs can only be on port A. All ADCx are exposed in JP5 connector, but only ADC1 and ADC3 have GND and VDD (3/5V) pins next to it, so these can be exposed into a 3-pin phidget-like connector, for ADC2 either solder a wire to connect, or use a 4-pin connector to expose both ADC1 and ADC2 in a single connector, but this will leave no space for a ADC3 connector. The internal ADC reference is 1190mV, use either a voltage divider as input, or a different voltage reference, like AVDD5, or externally using PA7/AIN7 and PA6/AIN6 configurable as differential reference, by removing the R26 and R33 0Ohm resistors to disconnect off the Micro-SD, and those will be accessible from JP5 connector. To enable the ADC[2,4-6], remove any 0Ohm resistors if required (see above), and define in your application Warning: if using ADC6 (PA3), you will need to disable the bootloader by making FLASH_CCA_CONF_BOOTLDR_BACKDOOR equal to zero | |
#define | ADC_SENSORS_PORT GPIO_A_NUM |
ADC GPIO control port. | |
#define | ADC_SENSORS_ADC1_PIN 5 |
ADC1 to PA5, 3V3. | |
#define | ADC_SENSORS_ADC3_PIN 2 |
ADC3 to PA2, 5V. | |
#define | ADC_SENSORS_ADC2_PIN (-1) |
ADC2 no declared. | |
#define | ADC_SENSORS_ADC4_PIN (-1) |
ADC4 not declared. | |
#define | ADC_SENSORS_ADC5_PIN (-1) |
ADC5 not declared. | |
#define | ADC_SENSORS_ADC6_PIN (-1) |
ADC6 not declared. | |
#define | ADC_SENSORS_MAX 2 |
Maximum sensors. | |
RE-Mote Button configuration | |
Buttons on the RE-Mote are connected as follows:
| |
#define | BUTTON_USER_PORT GPIO_A_NUM |
#define | BUTTON_USER_PIN 3 |
#define | BUTTON_USER_VECTOR GPIO_A_IRQn |
#define | PLATFORM_HAS_BUTTON !(ADC_SENSORS_ADC6_PIN == 3) |
SPI (SSI0) configuration | |
These values configure which CC2538 pins to use for the SPI (SSI0) lines, reserved exclusively for the CC1200 RF transceiver. These pins are not exposed to any connector, and should be avoid to use it. TX -> MOSI, RX -> MISO | |
#define | SPI0_CLK_PORT GPIO_B_NUM |
#define | SPI0_CLK_PIN 2 |
#define | SPI0_TX_PORT GPIO_B_NUM |
#define | SPI0_TX_PIN 1 |
#define | SPI0_RX_PORT GPIO_B_NUM |
#define | SPI0_RX_PIN 3 |
SPI (SSI1) configuration | |
These values configure which CC2538 pins to use for the SPI (SSI1) lines, shared with the microSD and exposed over JP5 connector. TX -> MOSI, RX -> MISO | |
#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, exposed over JP6 connector. The I2C bus is shared with the on-board RTC and the Low-Power PIC The I2C is exposed over the JP6 header, using a 5-pin connector with 2.54 mm spacing, providing also D+3.3V, GND and PD0 pin that can be used as an interrupt pin if required | |
#define | I2C_SCL_PORT GPIO_C_NUM |
#define | I2C_SCL_PIN 3 |
#define | I2C_SDA_PORT GPIO_C_NUM |
#define | I2C_SDA_PIN 2 |
#define | I2C_INT_PORT GPIO_D_NUM |
#define | I2C_INT_PIN 0 |
#define | I2C_INT_VECTOR GPIO_D_IRQn |
Antenna switch configuration | |
These values configure the required pin to drive the RF antenna switch, to either enable the sub-1Ghz RF interface (power-up the CC1200) or the 2.4GHz RF interface of the CC2538, both alternatively routed to a RP-SMA connector to allow using an external antenna for both cases. Note it is also possible to enable both RF interfaces at the same time, by switching On the sub-1GHz RF interface, and placing an 0Ohm resistor (R19), to select between using a ceramic chip antenna (not mounted), or to connect and external antenna over a pigtail to the U.Fl connector (not mounted). RF switch state:
| |
#define | ANTENNA_RF_SW_PORT GPIO_D_NUM |
#define | ANTENNA_RF_SW_PIN 2 |
Dual RF interface support | |
Enables support for dual band operation (both CC1200 and 2.4GHz enabled). The driver checks the selected Radio stack, and forces the antenna switch to either position. Enabling the definition below forces to skip this check. | |
#define | REMOTE_DUAL_RF_ENABLED 0 |
CC1200 configuration | |
These values configure the required pins to drive the CC1200 None of the following pins are exposed to any connector, kept for internal use only | |
#define | CC1200_SPI_INSTANCE 0 |
#define | CC1200_SPI_SCLK_PORT SPI0_CLK_PORT |
#define | CC1200_SPI_SCLK_PIN SPI0_CLK_PIN |
#define | CC1200_SPI_MOSI_PORT SPI0_TX_PORT |
#define | CC1200_SPI_MOSI_PIN SPI0_TX_PIN |
#define | CC1200_SPI_MISO_PORT SPI0_RX_PORT |
#define | CC1200_SPI_MISO_PIN SPI0_RX_PIN |
#define | CC1200_SPI_CSN_PORT GPIO_B_NUM |
#define | CC1200_SPI_CSN_PIN 5 |
#define | CC1200_GDO0_PORT GPIO_B_NUM |
#define | CC1200_GDO0_PIN 4 |
#define | CC1200_GDO2_PORT GPIO_B_NUM |
#define | CC1200_GDO2_PIN 0 |
#define | CC1200_RESET_PORT GPIO_C_NUM |
#define | CC1200_RESET_PIN 7 |
#define | CC1200_GPIOx_VECTOR GPIO_B_IRQn |
microSD configuration | |
These values configure the required pins to drive the built-in microSD external module, to be used with SSI1. USD_CSN and USD_SEL are shared with ADC4/ADC5, but it is disabled by default as there are 0Ohm resistors connecting the PA6/PA7 pins to the microSD (see ADC block above for comments) The USD_SEL pin can be used both as output and input, to detect if there is a microSD in the slot, or when connected to disable the microSD to save power | |
#define | USD_SPI_INSTANCE 1 |
#define | USD_CLK_PORT SPI1_CLK_PORT |
#define | USD_CLK_PIN SPI1_CLK_PIN |
#define | USD_MOSI_PORT SPI1_TX_PORT |
#define | USD_MOSI_PIN SPI1_TX_PIN |
#define | USD_MISO_PORT SPI1_RX_PORT |
#define | USD_MISO_PIN SPI1_RX_PIN |
#define | USD_CSN_PORT GPIO_A_NUM |
#define | USD_CSN_PIN 7 |
#define | USD_SEL_PORT GPIO_A_NUM |
#define | USD_SEL_PIN 6 |
Power management and shutdown mode | |
The shutdown mode is an ultra-low power operation mode that effectively powers-down the entire RE-Mote (CC2538, CC1200, attached sensors, etc) and only keeps running a the on-board RTC and an ultra-low power consumption MCU The Shutdown mode allows:
As commented above, S3 can be used to restart the entire board (power management block included), or to kick the board out of shutdown mode by reconnecting the battery. | |
#define | PM_ENABLE_PORT GPIO_D_NUM |
#define | PM_ENABLE_PIN 1 |
On-board RTCC | |
The on-board RTCC (real time clock-calendar) is powered over USB/battery, and it will remain powered in shutdown mode with the Low-Power PIC. The RTC_INT1 is connected to the CC2538, so it is possible to receive interrupts from a pre-configured alarm, even waking up the CC2538 from PM3. A second interruption pin (RTC_INT2) is connected to the Low-Power PIC, after configuring the RTCC the Low-Power PIC can drive the board to shutdown mode, and enter into low-power mode (sleep), being the RTCC interrupt the waking up source to resume operation. | |
#define | PLATFORM_HAS_RTC 1 |
#define | RTC_SDA_PORT I2C_SDA_PORT |
#define | RTC_SDA_PIN I2C_SDA_PIN |
#define | RTC_SCL_PORT I2C_SCL_PORT |
#define | RTC_SCL_PIN I2C_SCL_PIN |
#define | RTC_INT1_PORT GPIO_D_NUM |
#define | RTC_INT1_PIN 3 |
#define | RTC_INT1_VECTOR GPIO_D_IRQn |
On-board external WDT | |
The RE-Mote features an on-board external WDT and battery monitor, which adds more robustness and prevents the mote to run wild if any unexpected problem shows-up. The external WDT requires a short pulse (<1ms) to be sent before a 2-second period. The battery monitor keeps the device in Reset if the voltage input is lower than 2.5V. The external WDT can be disabled by removing the R34 0Ohm resistor. As default the Texas Instrument's TPS3823 WDT is not mounted. Alternatively the testpoint or unused WDT's pad can be used to re-use as GPIO | |
#define | EXT_WDT_PORT GPIO_D_NUM |
#define | EXT_WDT_PIN 5 |
Device string used on startup | |
#define | BOARD_STRING "Zolertia RE-Mote revision B platform" |
Header file with definitions related to the I/O connections on the Zolertia's RE-Mote platform (revision B), cc2538-based.
Definition in file board.h.