|
Contiki 3.x
|
Header file with definitions related to the I/O connections on the Muntjac platform, cc2538-based. More...
Go to the source code of this file.
Macros | |
Muntjac LED configuration | |
LEDs on the Muntjac are connected in the same way as the RE-Mote:
LED pins are not exposed on the external headers. | |
| #define | LEDS_GREEN (1 << 4) |
| LED1 (Green) -> PD4. | |
| #define | LEDS_BLUE (1 << 3) |
| LED2 (Blue) -> PD3. | |
| #define | LEDS_RED (1 << 5) |
| LED3 (Red) -> PD5. | |
| #define | LEDS_CONF_ALL (LEDS_GREEN | LEDS_BLUE | LEDS_RED) |
| #define | LEDS_LIGHT_BLUE (LEDS_GREEN | LEDS_BLUE) |
| Green + Blue (24) | |
| #define | LEDS_YELLOW (LEDS_GREEN | LEDS_RED) |
| Green + Red (48) | |
| #define | LEDS_PURPLE (LEDS_BLUE | LEDS_RED) |
| Blue + Red (40) | |
| #define | LEDS_WHITE LEDS_ALL |
| Green + Blue + Red (56) | |
| #define | PLATFORM_HAS_LEDS 1 |
UART configuration | |
On the Muntjac, the UARTs are connected to the following ports/pins:
UART0 and UART1 are both configured without HW pull-up resistor and neither port supports CTS or RTS. UART0 and UART1 are exposed on the east port. UART0 is also exposed on the south port. | |
| #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) |
| #define | RS485_UART 1 |
| #define | RS485_UART_BASE UART_1_BASE |
| #define | UART1_CONF_BAUD_RATE 9600 |
ADC configuration | |
These values configure which CC2538 pins and ADC channels to use for the ADC inputs. The Muntjac has three accessible ADCs exposed on the north port. ADC 1 and ADC 3 are connected next to 3.3V and ground so that they can be used with phidget-like connectors. All of the exposed ADCs support 3.3V operation only.
The other ADC channels of the CC2538 are not available for use as the pins are used for the user button and the SD card. | |
| #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, 3V3. | |
| #define | ADC_SENSORS_ADC2_PIN 4 |
| ADC2 to PA4, 3V3. | |
| #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 3 |
| Maximum sensors. | |
Muntjac Button configuration | |
Buttons on the RE-Mote are connected as follows:
| |
| #define | BUTTON_USER_PORT GPIO_A_NUM |
| BUTTON_USER -> PA3. | |
| #define | BUTTON_USER_PIN 3 |
| #define | BUTTON_USER_VECTOR NVIC_INT_GPIO_PORT_A |
| #define | PLATFORM_HAS_BUTTON 1 |
Muntjac RAIN_INT configuration | |
The RAIN_INT is connected to the USD_DETECT as a bodge becausewe forgot to hook up the real pin and are now out. | |
| #define | RAIN_INT_PORT USD_DETECT_PORT |
| #define | RAIN_INT_PIN USD_DETECT_PIN |
| #define | RAIN_INT_VECTOR NVIC_INT_GPIO_PORT_B |
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 exposed on the east port but their use for anything else should be avoided. 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 by the micro SD card and M25P16 flash. This bus is exposed on the south port. No pins are available for external CSn without sacrificing other functionality. 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, also available as testpoints T2 (PC2) and T3 (PC3). The I2C bus is used for the RTC on MS1/MS2 and is shared with the on-board TMP102. The I2C is exposed on the east port. Due to pin limitations, no interrupt pin is exposed. | |
| #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 (-1) |
| #define | I2C_INT_PIN (-1) |
| #define | I2C_INT_VECTOR (-1) |
CC1200 configuration | |
These values configure the required pins to drive the CC1200 These pins are exposed on the east port but their use for anything else should be avoided. | |
| #define | RADIO_SPI_CLK_PORT SPI0_CLK_PORT |
| #define | RADIO_SPI_CLK_PIN SPI0_CLK_PIN |
| #define | RADIO_SPI_MOSI_PORT SPI0_TX_PORT |
| #define | RADIO_SPI_MOSI_PIN SPI0_TX_PIN |
| #define | RADIO_SPI_MISO_PORT SPI0_RX_PORT |
| #define | RADIO_SPI_MISO_PIN SPI0_RX_PIN |
| #define | RADIO_SPI_CSN_PORT GPIO_B_NUM |
| #define | RADIO_SPI_CSN_PIN 5 |
| #define | RADIO_RESET_PORT GPIO_C_NUM |
| #define | RADIO_RESET_PIN 7 |
| #define | RADIO_GPIO0_PORT GPIO_B_NUM |
| #define | RADIO_GPIO0_PIN 4 |
| #define | RADIO_GPIO2_PORT GPIO_B_NUM |
| #define | RADIO_GPIO2_PIN 0 |
| #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 NVIC_INT_GPIO_PORT_B |
Misc Peripheral Control control | |
These values configure the pins used to control peripherals on the Muntjac and MS1/MS2. PWR_RADIO_EN is used to control power to the on-board CC1200. PWR_SENSE_EN is used to control sensors/sensor power supplies. RS485_TXEN is used to put the half-duplex RS485 transciever into TX. | |
| #define | PWR_RADIO_EN_PORT GPIO_D_NUM |
| #define | PWR_RADIO_EN_PIN 2 |
| #define | PWR_SD_EN_PORT GPIO_A_NUM |
| #define | PWR_SD_EN_PIN 6 |
| #define | PWR_SENSE_EN_PORT GPIO_D_NUM |
| #define | PWR_SENSE_EN_PIN 1 |
| #define | RS485_TXEN_PORT GPIO_D_NUM |
| #define | RS485_TXEN_PIN 0 |
Storage Configuration | |
These values configure the required pins to drive the built-in flash storage. The Muntjac has the facility for both a microSD card and an on-board M25P16 2MB flash. Both are connected to SSI1/SPI1. PA6 is used to disable power to the SD card. The M25P16 is always powered. The control and data lines for the SD card are buffered through a level translator to prevent the SD card drawing (mA +) quiescent current through CSn and the SPI bus. PB7 is used for SD card presence detection, but can be used for !HOLD on the M25P16 with a hardware modification if required. | |
| #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_DETECT_PORT GPIO_B_NUM |
| #define | USD_DETECT_PIN 7 |
| #define | FLASH_CSN_PORT GPIO_B_NUM |
| #define | FLASH_CSN_PIN 6 |
| #define | FLASH_SPI_INSTANCE 1 |
On-board external WDT | |
The Muntjac does not feature an on-board external WDT like the RE-Mote. | |
| #define | EXT_WDT_PORT (-1) |
| #define | EXT_WDT_PIN (-1) |
Device string used on startup | |
| #define | BOARD_STRING "UoS Muntjac platform" |
Header file with definitions related to the I/O connections on the Muntjac platform, cc2538-based.
Definition in file board.h.
1.8.6