# Configure GPI as SPI

Source: [https://docs.qualcomm.com/doc/80-88500-1/topic/37_Configure_GPI_as_SPI.html](https://docs.qualcomm.com/doc/80-88500-1/topic/37_Configure_GPI_as_SPI.html)

## About this task

The general-purpose interface (GPI) is used to speed up the data process. To modify the GPI
        configuration, see the following protocol structure and modify the
          /slpi\_proc/core/settings/hwengines/gpi/config/chipset/slpi/gpi\_cfg\_kona.c
        file: 

    typedef enum
     {
        GPI_SPI_PROTOCOL   = 1,    
        GPI_UART_PROTOCOL  = 2,
        GPI_I2C_PROTOCOL   = 3,
        GPI_I3C_PROTOCOL   = 4,
     
        GPI_MAX_PROTOCOL
     }GPI_PROTOCOL;Copy to clipboard

Following are some of the configurable parameters:

    const tgt_gpi_config_type  tgt_gpi_config[] =
     {
         {
           /* .qup_type   */ 2,                      // QUP HW instance type (SSC)
           /* .gpii_id    */ 0,                      // GPII ID
           /* .protocol   */ 1,                      // Protocol running on this GPII
           /* .options    */ 0,                      // For future use. Options bitmask
           /* .ee         */ 0,                      // Local execution environment index
           /* .se         */ 0,                      // Serial Engine
           /* .irq        */ 12                      // Interrupt for this GPII in this EE
        },Copy to clipboard

**Parent Topic:** [SPI in QUP](https://docs.qualcomm.com/doc/80-88500-1/topic/30_SPI_in_QUP_v3.html)

Last Published: Aug 18, 2023

[Previous Topic
Update QUP serial engine firmware for SPI](https://docs.qualcomm.com/bundle/publicresource/80-88500-1/topics/36_Update_QUP_v3_serial_engine_firmware_for_SPI.md) [Next Topic
Enable SPI bus in TrustZone](https://docs.qualcomm.com/bundle/publicresource/80-88500-1/topics/38_Enable_SPI_bus_in_TrustZone.md)