I2C-to-BLE Bridge using the EZ-BLE™ PRoC™ Module – KBA97000

Version: *A

 

Question:

Is it possible to implement an I2C-to-BLE bridge using the EZ-BLE PRoC Module (CYBLE-022001-00)? Does Cypress provide any example projects to demonstrate this application?

 

Answer:

Yes, it is possible to implement an I2C-to-BLE bridge using the EZ-BLE PRoC Module (CYBLE-022001-00). Cypress provides two example projects (available for the EZ-BLE PRoC Module) to demonstrate this application.

  1. I2C-to-BLE Peripheral Example Project   

      

    Figure 1: I2C-to-BLE Peripheral Example Project

      

    The I2C component is configured as an I2C slave. The BLE component is configured for the BLE GAP peripheral and GATT server roles. A custom BLE profile using two custom services is implemented in the project:

      
        
    • I2C_Write: To receive data from any central device via write without response commands on the I2C_Write_data custom characteristic
    •   
    • I2C_Read: To transmit data to any central device via notifications on the I2C_Read_data custom characteristic
    •  
      

    This project can programmed and debugged using the EZ-BLE PRoC Evaluation Board (CYBLE-022001-EVAL) and the BLE Pioneer Kit (CY8CKIT-042-BLE). The PSoC 5LP on the BLE Pioneer Kit or any other external MCU can be used as the I2C master.

      

    This project can be tested with:

      
        
    • The CySmart PC tool, connected to the CySmart USB dongle (CY5670), emulating a BLE central device or
    •   
    • The I2C-to-BLE central project described in the following section, programmed on a BLE Pioneer Kit, acting as the BLE central device
    •  
  2. I2C-to-BLE Central Example Project  

      

    Figure 2: I2C-to-BLE Central Example Project

      

    The I2C component is configured as an I2C slave. The BLE component is configured for the BLE GAP central and GATT client roles. A custom BLE profile is implemented in the project that discovers and uses two custom services:

      
        
    • I2C_Write: To transmit data to any peripheral device via write without response commands on the I2C_Write_data custom characteristic
    •   
    • I2C_Read: To receive data from any central device via notifications on the I2C_Read_data custom characteristic
    •  
      

    This project can programmed and debugged using the EZ-BLE PRoC Evaluation Board (CYBLE-022001-EVAL) and the BLE Pioneer Kit (CY8CKIT-042-BLE). The PSoC 5LP on the BLE Pioneer Kit or any other external MCU can be used as the I2C master. This project can be tested with the I2C-to-BLE peripheral project (described earlier), programmed on a BLE Pioneer Kit, acting as the BLE peripheral device.

Location of Example Projects

Downloading the Example Projects

The following steps should be followed to downlo ad the complete project and corresponding user guide:

  1. Go to the example project page on github.com (location in above section) and select the desired project - “I2C_BLE_Central.zip” or “I2C_BLE_Peripheral.zip”. The following figure shows an example of downloading the I2C_BLE_Central project.  

  2. Select “Raw” button, as shown in the following figure. All the project files and corresponding user guide will be downloaded as a .zip file.  

Supported Kits and Software

                                                                                                                                                    
ProjectPSoC Creator
    Version
CompilerDevelopment Kits
V3.1
    SP2
V3.1
    SP1 or
    lower
GCCMDKRVDSCY8CKIT-042-BLE
    with CYBLE-
    022011-EVAL
CY8CKIT-042-BLE
    with PRoC BLE
    module (CY5671
    or CY5674)
CY8CKIT-042-BLE with
    PSoC 4 BLE module
    (CY8CKIT-142 or
    CY8CKIT-141)
I2C-to-BLE peripheral projectYESNOYESYESYESYESNONO
I2C-to-BLE central projectYESNOYESYESYESYESNONO

Note:

The example projects support up to 1 MHz speed on the I2C bus. The throughput of the bridge project is dependent on the environment and quality of the BLE link.