Hexiwear is powered by a Kinetis K64 microcontroller based on the ARM Cortex-M4 core. Another Kinetis wireless MCU, the KW40Z, provides Bluetooth Low Energy connectivity. Hexiwear also integrates a wide variety of sensors, as well as a user interface consisting of a 1.1” 96px x 96px full color OLED display and six capacitive buttons with haptic feedback.
- Eye-catching Smart Watch form factor with powerful, low power Kinetis K6x MCU and 6 on-board sensors.
- Designed for wearable applications with the onboard rechargeable battery, OLED screen and onboard sensors such as optical heart rate, accelerometer, magnetometer and gyroscope.
- Designed for IoT end node applications with the onboard sensor’s such as temperature, pressure, humidity and ambient light.
- Flexibility to let you add the sensors of your choice nearly 200 additional sensors through click boards.
- Main MCU: NXP Kinetis K64x (ARM Cortex-M4, 120 MHz, 1M Flash, 256K SRAM)
- Wireless MCU: NXP Kinetis KW4x (ARM Cortex-M0+, Bluetooth Low Energy & 802.15.4 radio)
- 6-axis combo Accelerometer and Magnetometer NXP FXOS8700
- 3-Axis Gyroscope: NXP FXAS21002
- Absolute Pressure sensor NXP MPL3115
- Li-Ion/Li-Po Battery Charger NXP MC34671
- Optical heart rate sensor Maxim MAX30101
- Ambient Light sensor, Humidity and Temperature sensor
- 1.1” full color OLED display
- Haptic feedback engine
- 190 mAh 2C Li-Po battery
- Capacitive touch interface
- RGB LED
For more information about the K64F SoC and Hexiwear board:
- K64F Website
- K64F Datasheet
- K64F Reference Manual
- Hexiwear Website
- Hexiwear Fact Sheet
- Hexiwear Schematics
The hexiwear_k64 board configuration supports the following hardware features:
|NVIC||on-chip||nested vector interrupt controller|
|UART||on-chip||serial port-polling; serial port-interrupt|
|SENSOR||off-chip||fxos8700 polling; fxos8700 trigger; fxas21002 polling; fxas21002 trigger; max30101 polling|
The default configuration can be found in the defconfig file:
Other hardware features are not currently supported by the port.
Connections and IOs¶
The K64F SoC has five pairs of pinmux/gpio controllers.
|PTB0||I2C0_SCL||I2C / MAX30101|
|PTB1||I2C0_SDA||I2C / MAX30101|
|PTC8||GPIO / PWM||Red LED|
|PTC9||GPIO / PWM||Green LED|
|PTC10||I2C1_SCL||I2C / FXOS8700 / FXAS21002|
|PTC11||I2C1_SDA||I2C / FXOS8700 / FXAS21002|
|PTC14||GPIO||Battery sense enable|
|PTD0||GPIO / PWM||Blue LED|
|PTE24||UART4_RX||UART BT HCI|
|PTE25||UART4_TX||UART BT HCI|
The K64F SoC is configured to use the 12 MHz external oscillator on the board with the on-chip PLL to generate a 120 MHz system clock.
The K64F SoC has six UARTs. One is configured for the console, another for BT HCI, and the remaining are not used.
Programming and Debugging¶
The Hexiwear docking station includes the NXP OpenSDA serial and debug adapter built into the board to provide debugging, flash programming, and serial communication over USB.
To use the pyOCD tools with OpenSDA, follow the instructions in the
pyOCD page using the DAPLink Hexiwear Firmware. The pyOCD
tools are the default for this board, therefore it is not necessary to set
OPENSDA_FW=daplink explicitly when using the default flash and debug
To use the Segger J-Link tools with OpenSDA, follow the instructions in the
Segger J-Link page using the Segger J-Link OpenSDA V2.1 Firmware.
The Segger J-Link tools are not the default for this board, therefore it is
necessary to set
OPENSDA_FW=jlink explicitly in the environment before
programming and debugging.
The OpenSDA adapter is shared between the K64 and the KW40Z via switches, therefore only one SoC can be flashed, debugged, or have an open console at a time.
Configure the docking station switches to route the desired SoC signals to the OpenSDA adapter:
# On Linux/macOS cd $ZEPHYR_BASE/samples/hello_world mkdir build && cd build # On Windows cd %ZEPHYR_BASE%\samples\hello_world mkdir build & cd build # Use cmake to configure a Ninja-based build system: cmake -GNinja -DBOARD=hexiwear_k64 .. # Now run ninja on the generated build system: ninja flash
Open a serial terminal (minicom, putty, etc.) with the following settings:
- Speed: 115200
- Data: 8 bits
- Parity: None
- Stop bits: 1
Reset the board and you should be able to see on the corresponding Serial Port the following message:
Hello World! arm
You can debug an application in the usual way. Here is an example for the Hello World application.
# On Linux/macOS cd $ZEPHYR_BASE/samples/hello_world # If you already made a build directory (build) and ran cmake, just 'cd build' instead. mkdir build && cd build # On Windows cd %ZEPHYR_BASE%\samples\hello_world # If you already made a build directory (build) and ran cmake, just 'cd build' instead. mkdir build & cd build # If you already made a build directory (build) and ran cmake, just 'cd build' instead. # Use cmake to configure a Ninja-based build system: cmake -GNinja -DBOARD=hexiwear_k64 .. # Now run ninja on the generated build system: ninja debug
Configure the KW40Z as a Bluetooth controller¶
The K64 can support Zephyr Bluetooth host applications when you configure the KW40Z as a Bluetooth controller.
- Download and install the KW40Z Connectivity Software. This package contains Bluetooth controller application for the KW40Z.
- Flash the file
tools/binaries/BLE_HCI_Modem.binto the KW40Z.
Now you can build and run the sample Zephyr Bluetooth host applications on the K64. You do not need to repeat this step each time you flash a new Bluetooth host application to the K64.
Peripheral Heart Rate Sensor¶
Navigate to the Zephyr
application, then build and flash it to the Hexiwear K64. Make sure
the OpenSDA switches on the docking station are configured for the
# On Linux/macOS cd $ZEPHYR_BASE/samples/bluetooth/peripheral_hr mkdir build && cd build # On Windows cd %ZEPHYR_BASE%\samples\bluetooth\peripheral_hr mkdir build & cd build # Use cmake to configure a Ninja-based build system: cmake -GNinja -DBOARD=hexiwear_k64 .. # Now run ninja on the generated build system: ninja ninja flash
Reset the KW40Z and the K64 using the push buttons on the docking station.
Install the Kinetis BLE Toolbox on your smartphone:
Open the app, tap the Heart Rate feature, and you should see a Zephyr Heartrate Sensor device. Tap the Zephyr Heartrate Sensor device and you will then see a plot of the heart rate data that updates once per second.