1. Example description

Simple example showing how to interface the DA14585/586 and DA14531 with the PRESSURE 5 CLICK Board™ which features the Bosch BMP388 Digital Pressure Sensor via I2C or SPI. When connected to a BLE central this example allows the measured pressure and temperature values to be read.

Note The example can be downloaded from Here.

2. HW and SW configuration

  • Hardware configuration

    • This example runs on the DA14585, DA14586 and DA14531 Bluetooth Smart SoC devices.

    • DA14585/DA14586 or DA14531 daughter board + DA145xxDEVKT-P PRO-Motherboard and a MikroBUS™ Pressure 5 Click Board™ are required.

  • Software configuration

    • This example requires:

      • SDK6.0.14.

      • SEGGER’s J-Link tools should be downloaded and installed.

The user manuals for the development kits can be found:

  • Here for the DA145xxDEVKT-P PRO-Motherboard.

3. How to run the example

Please refer to this section of the dialog support portal for details of how to install the example application before proceeding with the following instructions to setup and run the demo:

3.1. Hardware configuration DA14531 using DA145xxDEVKT-P PRO-Motherboard

Connect the Pressure 5 Click Board™ to the MikroBUS™ 2 interface on the Development Kit PRO motherboard (this will require soldering sockets into the locations for connectors J17 and J18):

Apply the jumper configuration of the image shown below.

Motherboard_Hardware_Configuration_DA14531

You’ll also need to connect the following jumper wire to the Development Kit PRO motherboard this is to connect the INT pin on the Pressure 5 Click to P0_8 on the DA14531 because the label of J18, pin 2 which indicated as P3_1 unconnected.

NOTE 1

The BMP388 has both SPI and I2C interfaces. By default, the MikroBUS™ board, and this example, are configured to use the SPI interface.

NOTE 2

When using the I2C interface, the JTAG/Debug interface will be no longer available because the P0_2 is shared between the SWCLK and the I2C clock. This is why you can programme the onboard SPI flash with the generated binary and remove after that the JTAG debug Jumpers (J1:21-22 and J1:23-24). You can refer to the section 16:SPI Flash Programmer to see how to program the SPI flash with the Smarsnippets Toolbox.

If you would like to use the JTAG interface for debug purpose you have to choose different i2C GPIOs configurations. Be sure to update the user_periph_setup.h with the following configuration as an example:

#define BMP388_I2C_SCL_PORT     GPIO_PORT_0
#define BMP388_I2C_SCL_PIN      GPIO_PIN_1
#define BMP388_I2C_SDA_PORT     GPIO_PORT_0
#define BMP388_I2C_SDA_PIN      GPIO_PIN_3

Then use jumpers wires to establish following connections between the DA145xxDEVKT-P PRO-Motherboard and the sensor click board:

- Connect Vdd to V3 on J2.
- Connect Gnd to ground on J2.
- Connect SCL to P21 on J2.
- Connect SDA to P23 on J2.

NOTE 3

If you want to use the I2C interface, you will also need to configure the example by changing the BMP interface type in the file bmp388.h as follows:

    #define BMP388_INTERFACE          BMP388_I2C

NOTE 4

Finally, you’ll need to change the jumper settings on the BMP388 MikroBUS™ board to use the I2C interface. See Pressure-5-click for further details.

3.2. Hardware configuration DA14585/DA14586 using DA145xxDEVKT-P PRO-Motherboard

Plug the Pressure 5 Click board™ to the MikroBUS™ 1 interface (J15-J16).

Motherboard_Hardware_Configuration_DA14585

NOTE 5

If you want to use the I2C interface, no jumpers wires are required, you can refer only to NOTE 3 and NOTE 4.

3.3. Setup

  • Setup a terminal (such as TeraTerm) so you can monitor the UART debug output from the DA14531:

      - baudrate: 115200
      - data: 8 bits
      - stop: 1 bit
      - parity: None
      - flow control: none
    
  • Build and download the example using the Keil IDE.

  • Run the example using the Keil debugger.

  • Monitor the debug output using the terminal you setup in step 3 and you should see the following:

Debug Output

  • Now connect to the device using a Smart Device running an App such as LightBlue. The example advertises with the name “DIALOG-BMP388”:

Advertisement

  • You’ll now be able to see a custom service with characteristics that allow reading of the current pressure and temperature levels read by the sensor.

Characteristic

4. Known Limitations

5. License


Copyright (c) 2021 Dialog Semiconductor. All rights reserved.

This software (“Software”) is owned by Dialog Semiconductor. By using this Software you agree that Dialog Semiconductor retains all intellectual property and proprietary rights in and to this Software and any use, reproduction, disclosure or distribution of the Software without express written permission or a license agreement from Dialog Semiconductor is strictly prohibited. This Software is solely for use on or in conjunction with Dialog Semiconductor products.

EXCEPT AS OTHERWISE PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIES OR AS REQUIRED BY LAW, THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. EXCEPT AS OTHERWISE PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIES OR BY LAW, IN NO EVENT SHALL DIALOG SEMICONDUCTOR BE LIABLE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE SOFTWARE.