> For the complete documentation index, see [llms.txt](https://alfredo-reyes-montero.gitbook.io/iot-bosch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alfredo-reyes-montero.gitbook.io/iot-bosch/devices/bosch-xdk-110/xdk-extension-bus.md).

# XDK Extension Bus

The XDK comes with an interface 26-pin interface for the XDK Gateway. The extension bus allows access to the XDK’s micocontroller unit (MCU) pins and thus attaching external devices such as sensors or actuators to it. All MCU pins are GPIOs and can be configured freely within the limitations of the MCU.

## MCU pins on the Extension Bus <a href="#id-3" id="id-3"></a>

The extension bus I/O pins are labelled with the respective MCU pin designator. Since all pins of XDK’s MCU are general purpose pins, alternative functionality can be configured for each pin. For example, if a pin is labelled as a Timer, it can also be configured to be used for a pulse counter, and so on. The different functionalities of these pins are described in the data sheet of the EFM32GG390.

The following table describes the selected functionalities for each pin.

| Connector Pin | MCU Pin | Suggested Use                      | Multiplex Location | Macro                       |
| ------------- | ------- | ---------------------------------- | ------------------ | --------------------------- |
| A1            | PA0     | Timer0 compare                     | TIMER0 #4          | EXTENSION\_TIM0\_CC0        |
| A2            | PC0     | Timer0 compare                     | TIMER0 #4          | EXTENSION\_TIM0\_CC1        |
| A3            | PC1     | Timer0 compare                     | TIMER0 #4          | EXTENSION\_TIM0\_CC2        |
| A4            | PC2     | Timer0 Dead time insertion         | TIMER0 #4          | EXTENSION\_TIM0\_CDTI0      |
| A5            | PC3     | Timer0 Dead time insertion         | TIMER0 #4          | EXTENSION\_TIM0\_CDTI1      |
| A6            | PC4     | Timer0 Dead time insertion         | TIMER0 #4          | EXTENSION\_TIM0\_CDTI2      |
| A7            | PC8     | Timer2 Capture operations          | TIMER2 #2          | EXTENSION\_TIM2\_CC0        |
| A8            | PC9     | Timer2 Capture operations          | TIMER2 #2          | EXTENSION\_TIM2\_CC1        |
| A9            | PC10    | Timer2 Capture operations          | TIMER2 #2          | EXTENSION\_TIM2\_CC2        |
| A10           | PD6     | ADC0 Channel6                      | n/a                | EXTENSION\_ADC0\_CH6        |
| A11           | PD5     | ADC0 Channel5                      | n/a                | EXTENSION\_ADC0\_CH5        |
| A12           | PA1     | General purpose I/O                | n/a                | EXTENSION\_GPIO\_IN\_OUT\_0 |
| A13           | PE2     | General purpose I/O                | n/a                | EXTENSION\_GPIO\_IN\_OUT\_1 |
| B1            | PB9     | UART1 TX                           | UART1 #2           | EXTENSION\_UART1\_TX        |
| B2            | PB10    | UART1 RX                           | UART1 #2           | EXTENSION\_UART1\_RX        |
| B3            | PB2     | UART1 RTS                          | n/a                | EXTENSION\_UART1\_RTS       |
| B4            | PF6     | UART1 CTS                          | n/a                | EXTENSION\_UART1\_CTS       |
| B5            | PB4     | SPI MISO                           | USART2 #1          | EXTENSION\_US2\_MISO        |
| B6            | PB3     | SPI MOSI                           | USART2 #1          | EXTENSION\_US2\_MOSI        |
| B7            | PB5     | SPI Clock                          | USART2 #1          | EXTENSION\_US2\_SCK         |
| B8            | PD8     | SPI Chip select                    | n/a                | EXTENSION\_US2\_CS          |
| B9            | PB11    | I2C1 data line (pull-up)           | I2C1 #1            | EXTENSION\_I2C1\_SDA        |
| B10           | PB12    | I2C1 clock line (pull-up)          | I2C1 #1            | EXTENSION\_I2C1\_SCL        |
| B11           | 2V5     | Power; Limit 100mA continuous/peak | n/a                | n/a                         |
| B12           | 3V3     | Power; Limit 100mA continuous/peak | n/a                | n/a                         |
| B13           | GND     | Power                              | n/a                | n/a                         |

However, due to shared resources with internal components, restrictions apply to the possible configurations of certain extension bus pins through internal modification.

The following pins differ in their electrical behavior due to other components on the signal paths:

* Pins B9 and B10 are equipped with an internal pull-up resistor of 3.32 kOhm and are therefore usable for I2C communication only.
* Pins PD5 and PD6 have anti-alias (low-pass) filters with a cut off frequency of \~400 MHz. These are mainly used as single input ADC pins.

  Additionally, please keep the following general characteristics of the pins on the extension bus in mind:
* The pins of the extension bus are protected against electrostatic discharge (ESD) up to 4 kV. This includes a serial resistance of 40 Ohm on the signal path. While this is no problem for communication, it has to be considered when powering external components via GPIO, e.g. an LED.
* Any pin you intend to use will have to be configured accordingly. Most of the pins are assigned with default modes and values. For more information, please refer to SDK/xdk110/Platform/BSP/ source/BSP\_BoardSettings.h and SDK/xdk110/Platform/BSP/source/BSP\_BoardExtSettings.h.
* The 2.5 V and 3.3 V power supply pins can provide up to 100 mA supply current. Please note that these limitations apply to the maximal peak current, too. By default, the 3V3 supply pin is in a disabled state. For your application, please use the function `Board_EnablePowerSupply3V3(EXTENSION_BOARD)` from the interface `BSP_BoardShared.h` to enable the 3V3 pin on the extension bus.

**Before you connect external components to the XDK, please note the following limitations.**

The pin voltage of every general purpose extension bus pin is 2.5 V. If you connect external components that operate on a different voltage, a level shifter has to be used to ensure communication with the MCU will work. Failing to do so can cause permanent damage to the MCU!
