BM70 MCU Interface

The BM70 provides a flexible MCU interface, which can be tailored to your specific needs. The most basic interface requires only two UART interface signals. Two additional control signals are also recommended: one to reset the module, the other to enable BM70 firmware/configuration programming.

The BM70 is configured and controlled via binary packet communications over a UART interface. The BLEDK3 Command Set Users Guide contains a complete command/event/response listing and details of the interface. Additionally, the module provides status indication/control via several programmable GPIO pins, simplifying MCU firmware and state-machine development.

Further documentation on the MCU interface and available GPIO pin functions may be found in the BM70/71 device data sheet, as well as the BLEDK3 release notes

"BLEDK3" refers to the name of the application firmware running in the BM70 module.

All BM70 functionality referred to on this page requires v1.06 firmware. Instructions for updating module firmware may be found here.

Binary Packet Communications

The MCU host sends specially formatted "Command" packets to the module. Depending on the command, the module will issue "Event" response packets, and eventually a "Command Complete" response packet as shown:

packet-communications-overview.png

Commands cover the following operational categories:

  • Common (Reading basic device information)
  • GAP Commands (BLE Connection Management)
  • GATT Client (BLE Data Exchange)
  • GATT Server (BLE Data Exchange)
  • GATT Transparent
  • Pairing

Please refer to the BLEDK3 Command Set Users Guide for complete details.

Command Packet

command-packet.png

A checksum is used to test data integrity on command packets.

To calculate:

  • Sign-extend to 16-bits, then add, all required bytes,
  • Calculate the 2's complement on the lower 8-bits of the result

Response Packet ("Command Complete")

command-complete-packet.png

A checksum may be used to test data integrity on response packets.

To verify:

  • Sign-extend to 16-bits, then add, all required bytes (including the checksum byte),
  • If there are no errors, the result will be 0xXX00

Example

The following depicts a command/response sequence for the "Read Local Information" command:

read-local-information-sequence.png
read-local-information-tx.png
read-local-information-rx.png

Basic Interface (Manual Pattern Mode)

In the simplest configuration, the module requires two UART interface signals (TX & RX). Two additional control signals are also recommended: one to reset the module, the other to enable BM70 firmware/configuration programming:

bm70-mcu-connection-basic-manual-pattern.png

RST_N (Reset)

The Reset input pin (RST_N) is used to Reset the BM70/71 with an active-low pulse with a minimum pulse width of 63 ns.

An internal pull-up is enabled on this input, however, an external pull-up resistor of 4.7 kOhm is recommended.

P2_0 (System Configuration)

This pin is used to enable module firmware/configuration updates:

bm70-mcu-connection-p20-table.png

P2_0 has an internal pull-up, enabling Application mode by default.

HCI_TXD / HCI_RXD

UART data output / input signals.

The default port configuration for the UART is described in the table below:

Parameter Value
Baud Rate 115200
Data Bits 8
Parity None
Stop Bits 1
Flow Control None

Basic Interface (Auto Pattern Mode)

The basic signal interface for Auto Pattern mode (Transparent UART) adds 2 active-low UART flow control signals, P3_6/UART_RTS and P0_0/UART_CTS:

bm70-mcu-connection-basic-auto-pattern.png

BM70 UART RTS/CTS signals are reserved for Auto Pattern Mode operation only.

bm70-rts-cts-timing.png

Special Function Pins

Several additional programmable GPIO signals are available to be interfaced with the host MCU. Some of these are used for control, while others may be used to monitor module state as an alternative to UART event packets.

bm70-mcu-connection-full.png

Some of these pin functions are dedicated, however, most can be re-programmed with the UI Configuration Tool.

P2_3 (WAKEUP Pin - Dedicated)

This active-low input pin function can be used to wake up the module after it has been placed in a SHUTDOWN state.

wakeup-pin-timing-diagram.png

After wakeup from shutdown, BLEDK3 enters into standby mode in auto pattern.
After wakeup from shutdown, BLEDK3 enters into idle mode in manual pattern.

P3_3 (UART_RX_IND Pin - Programmable)

When enabled, this active-low input pin function can be used to reduce the active current consumption of the module by disabling the UART HCI_RXD pin function. When enabled, the host MCU needs to insert a ~3mS delay before sending a command packet as shown:

uart-rx-ind-pin-timing-diagram.png

UART_RX_IND pin function is enabled and assigned to a pin using the UI Configuration Tool.

P3_4 (PAIRING_KEY Pin - Programmable)

During an active BLE connection, this active-low input pin function can be used to force the module to terminate the link and enter into standby mode. This signal needs to be applied for at least 160mS as shown:

pairing-key-pin-timing-diagram.png

PAIRING_KEY pin function is assigned to a pin using the UI Configuration Tool.

P3_2 (LINK_DROP Pin - Programmable)

During an active BLE connection, this active-low input pin function can be used to force the module to terminate the link and enter into shutdown mode. This signal needs to be applied for at least 10mS as shown:

link-drop-pin-timing-diagram.png

LINK_DROP pin function is assigned to a pin using the UI Configuration Tool.

P0_2 (LED0 Pin - Dedicated)

This active-low output pin function can be used to signal various BLE connection states. Options are also provided to flash this output at various rates.

LED0 pin toggle functionality is configured using the UI Configuration Tool.

P2_7 (UART_TX_IND Pin - Dedicated)

This active-low output pin function can be used to signal the host MCU that data will be transmitted out of the HCI_TXD pin after a specific interval:

uart-tx-ind-pin-timing-diagram.png

TWakeup_External_MCU_Wait_Time is configured using the UI Configuration Tool.

P1_0/P1_1 (STATUS2/STATUS1 Pins - Programmable)

When enabled, these output pin functions indicate a variety module connection states, as shown in the following table:
STATUS1 STATUS2 Status Description
H H Shutdown Mode BM70 is shutdown
H L Standby Mode BM70 sends advertising packets and is discoverable and connectable
L L Connected Mode BLE Link is established (BLE GATT Operating Mode)
L H Connected Mode BLE Link is established (Transparent UART Service Operating Mode)

STATUS2/STATUS1 pin functions are assigned to GPIO pins using the UI Configuration Tool.

P0_7 (LOW_BATTERY_IND Pin - Programmable)

This active-low output pin function can be used to signal a low battery condition on VBAT. Additionally, the module can be configured to enter shutdown if the battery voltage remains low for a certain time interval.

LOW_BATTERY_IND pin functionality is enabled using the UI Configuration Tool.

Related UI Config Tool Parameters:

  • Battery Detection Interval
  • Low Battery Level
  • Normal Battery Level
  • Low-Battery-to-Shutdown Time

P3_1 (RSSI_IND Pin - Programmable)

If enabled, this output pin function can be used to signal the BLE connection link quality. The module checks two link quality levels which can be configured using the UI Configuration Tool. If link quality is lower than "RSSI Weak Threshold", then RSSI_IND output is low. If link quality is higher than "RSSI Normal Threshold", then RSSI_IND output is high, as shown here:

rssi-ind-pin-timing-diagram.png

RSSI_IND pin functionality is configured using the UI Configuration Tool.

Related UI Configuration Tool Parameters:

  • Link Quality Detection
  • RSSI Normal Threshold
  • RSSI Weak Threshold
© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.