1.. _bt510: 2 3Ezurio Sentrius BT510 Sensor 4############################ 5 6Overview 7******** 8 9The Sentrius™ BT510 Sensor is a battery powered, Bluetooth v5 Long Range integrated sensor that uses a Nordic Semiconductor nRF52840 ARM Cortex-M4F CPU. 10 11The sensor has the following features: 12 13* :abbr:`ADC (Analog to Digital Converter)` 14* CLOCK 15* FLASH 16* :abbr:`GPIO (General Purpose Input Output)` 17* :abbr:`I2C (Inter-Integrated Circuit)` 18* :abbr:`MPU (Memory Protection Unit)` 19* :abbr:`NVIC (Nested Vectored Interrupt Controller)` 20* :abbr:`PWM (Pulse Width Modulation)` 21* RADIO (Bluetooth Low Energy and 802.15.4) 22* :abbr:`RTC (nRF RTC System Clock)` 23* Segger RTT (RTT Console) 24* :abbr:`UART (Universal Asynchronous Receiver-Transmitter)` 25* :abbr:`WDT (Watchdog Timer)` 26 27.. figure:: img/bt510.jpg 28 :align: center 29 :alt: Sentrius BT510 Sensor, front view 30 31 Sentrius BT510 Sensor, front view 32 33.. figure:: img/bt510_back.jpg 34 :align: center 35 :alt: Sentrius BT510 Sensor, rear view 36 37 Sentrius BT510 Sensor, rear view 38 39More information about the board can be found at the 40`Sentrius BT510 website`_. 41 42Hardware 43******** 44 45Supported Features 46================== 47 48The BT510 Sensor supports the following 49hardware features: 50 51+-----------+------------+----------------------+ 52| Interface | Controller | Driver/Component | 53+===========+============+======================+ 54| ADC | on-chip | adc | 55+-----------+------------+----------------------+ 56| CLOCK | on-chip | clock_control | 57+-----------+------------+----------------------+ 58| FLASH | on-chip | flash | 59+-----------+------------+----------------------+ 60| GPIO | on-chip | gpio | 61+-----------+------------+----------------------+ 62| I2C(M) | on-chip | i2c | 63+-----------+------------+----------------------+ 64| MPU | on-chip | arch/arm | 65+-----------+------------+----------------------+ 66| NVIC | on-chip | arch/arm | 67+-----------+------------+----------------------+ 68| PWM | on-chip | pwm | 69+-----------+------------+----------------------+ 70| RADIO | on-chip | Bluetooth, | 71| | | ieee802154 | 72+-----------+------------+----------------------+ 73| RTC | on-chip | system clock | 74+-----------+------------+----------------------+ 75| RTT | Segger | console | 76+-----------+------------+----------------------+ 77| UART | on-chip | serial | 78+-----------+------------+----------------------+ 79| WDT | on-chip | watchdog | 80+-----------+------------+----------------------+ 81 82Connections and IOs 83=================== 84 85LED 86--- 87 88Two LEDs are visible through the BT510 housing lid. 89 90* LED_1A (green) = P0.22 91* LED_1B (red) = P0.20 92 93Push button 94------------ 95 96The BT510 housing lid also acts as a push button. 97 98* BUTTON_1 = SW1 = P1.10 99 100Magnetoresistive sensor 101----------------------- 102 103The BT510 incorporates a Honeywell SM351LT magnetoresistive sensor. Refer to the `Honeywell SM351LT datasheet`_ for further details. 104 105* MAG = P1.14 106 107Accelerometer 108------------- 109 110The BT510 incorporates an I2C ST Microelectronics LIS2DH accelerometer. Refer to the `ST Microelectronics LIS2DH datasheet`_ for further details. 111 112* SDA = P0.26 113* SCL = P0.27 114* INT_1 = P1.05 115* INT_2 = P1.12 116 117Temperature Sensor 118------------------ 119 120The BT510 incorporates an I2C Silabs SI7055 temperature sensor. Refer to the `Silabs 7055 datasheet`_ for further details. 121 122* SDA = P0.26 123* SCL = P0.27 124 125Programming and Debugging 126************************* 127 128Applications for the ``bt510`` board configuration can be built, flashed, and 129debugged in the usual way. See :ref:`build_an_application` and 130:ref:`application_run` for more details on building and running. 131 132The BT510 features a TagConnect 10 way socket for connection of a 133programmer/debugger, refer to `TagConnect TC2050 product page`_ 134for details of an appropriate TagConnect cable. 135 136A non-standard layout is used to include access to the sensor debug UART. 137 138+-----------+------------+----------------------+ 139| Pin No. | Name | Description | 140+===========+============+======================+ 141| 1 | Vcc | Power Supply, 3.3V | 142+-----------+------------+----------------------+ 143| 2 | SWDIO | SWD Data | 144+-----------+------------+----------------------+ 145| 3 | RXD | Debug UART RX Data | 146+-----------+------------+----------------------+ 147| 4 | SWDCLK | SWD Clock | 148+-----------+------------+----------------------+ 149| 5 | TM | Spare GPIO | 150+-----------+------------+----------------------+ 151| 6 | SWO | SWD Output | 152+-----------+------------+----------------------+ 153| 7 | N/C | Not Connected | 154+-----------+------------+----------------------+ 155| 8 | TXD | Debug UART TX Data | 156+-----------+------------+----------------------+ 157| 9 | GND | Ground | 158+-----------+------------+----------------------+ 159| 10 | RESET | Reset, Active Low | 160+-----------+------------+----------------------+ 161 162Connectivity to the programmer/debugger must be modified to match 163the pinout shown above. 164 165Ezurio provide the USB-SWD programming board (750-03239) that supports 166this connector layout, refer to the `USB SWD Programmer product page`_ 167. 168 169Flashing 170======== 171 172To connect the BT510 board for programming or debugging using the USB-SWD programming 173board, on the programming board set SW6 to the supply out position and SW5 to the 3V3 174position, ensure there is a jumper on J35 and that SW1 is in the debug position, then 175connect the BT510 to the board using the Tag-Connect cable via J3: 176 177.. figure:: img/bt510_prog.jpg 178 :align: center 179 :alt: Sentrius BT510 Sensor connected to programming board 180 181 Sentrius BT510 Sensor connected to programming board 182 183Then build and flash applications as usual (see :ref:`build_an_application` and 184:ref:`application_run` for more details). For example, to flash: 185 186.. code-block:: console 187 188 $ ninja flash 189 190Here is an example for the :ref:`hello_world` application. 191 192First, run your favorite terminal program to listen for output. 193 194NOTE: On the BT510, the UART lines are at TTL levels and must be passed through 195an appropriate line driver circuit for translation to RS232 levels. Refer to the `MAX3232 datasheet`_ 196for a suitable driver IC. The USB-SWD programming board has an in-built UART connected 197to the BT510 acting as a USB CDC port, on Linux and Windows 10 this driver should be 198installed automatically, for Windows 7, the MBED driver is required to use the serial 199port - see the `MBED Serial Driver`_ link for details and how to install the driver. 200 201.. code-block:: console 202 203 $ minicom -D <tty_device> -b 115200 204 205Replace :code:`<tty_device>` with the port where the bt510 can be found. For example, under Linux, :code:`/dev/ttyACM0`. 206 207Then build and flash the application in the usual way. 208 209.. zephyr-app-commands:: 210 :zephyr-app: samples/hello_world 211 :board: bt510 212 :goals: build flash 213 214Note that an external debugger is required to perform application flashing. 215 216Debugging 217========= 218 219The ``bt510`` board does not have an on-board J-Link debug IC 220as some nRF5x development boards, however, instructions from the 221:ref:`nordic_segger` page also apply to this board, with the additional step 222of connecting an external debugger. The USB-SWD programmer board has a CMSIS debugger 223compatible interface and debugging can be performed using pyocd, openocd or any other 224applications that support the CMSIS interface. 225 226Testing Bluetooth on the BT510 227*********************************** 228Many of the Bluetooth examples will work on the BT510. 229Try them out: 230 231* :ref:`ble_peripheral` 232* :ref:`bluetooth-eddystone-sample` 233* :ref:`bluetooth-ibeacon-sample` 234 235 236Testing the LEDs and buttons on the BT510 237***************************************** 238 239There are 2 samples that allow you to test that the buttons (switches) and LEDs on 240the board are working properly with Zephyr: 241 242* :zephyr:code-sample:`blinky` 243* :zephyr:code-sample:`button` 244 245You can build and flash the examples to make sure Zephyr is running correctly on 246your board. The button, LED and sensor device definitions can be found in 247:zephyr_file:`boards/ezurio/bt510/bt510.dts`. 248 249 250References 251********** 252 253.. target-notes:: 254 255.. _Sentrius BT510 website: https://www.ezurio.com/iot-devices/iot-sensors/bt510-bluetooth-5-long-range-ip67-multi-sensor 256.. _TagConnect TC2050 product page: https://www.tag-connect.com/product/tc2050-idc-050 257.. _USB SWD Programmer product page: https://www.ezurio.com/wireless-modules/programming-kits/usb-swd-programming-kit 258.. _MAX3232 datasheet: https://www.ti.com/lit/ds/symlink/max3232.pdf 259.. _Silabs 7055 datasheet: https://www.silabs.com/documents/public/data-sheets/Si7050-1-3-4-5-A20.pdf 260.. _ST Microelectronics LIS2DH datasheet: https://www.st.com/resource/en/datasheet/lis2dh.pdf 261.. _Honeywell SM351LT datasheet: https://sensing.honeywell.com/honeywell-sensing-nanopower-series-datasheet-50095501-c-en.pdf 262.. _MBED Serial Driver: https://os.mbed.com/docs/mbed-os/v6.8/program-setup/windows-serial-driver.html 263