Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
MAXREFDES101 USER ADOPTION GUIDE FOR MAX32664GWEB Jun 2019
MAXREFDES101 User Adoption Guide
Maxim Integrated 2
©2019 Maxim Integrated Products, Inc. All rights reserved.
Rev. 0.04
No part of this documentation may be reproduced nor distributed in any form or by any means, graphic, electronic, or mechanical, including but not limited to photocopying, scanning, recording, taping, e-mailing, or storing in information storage and retrieval systems without the written permission of Maxim Integrated Products, Inc. (hereafter, “Maxim”). Products that are referenced in this document such as Microsoft Windows® may be trademarks and/or registered trademarks of their respective owners. Maxim makes no claim to these trademarks. While every precaution has been taken in the preparation of this document, individually, as a series, in whole, or in part, Maxim, the publisher, and the author assume no responsibility for errors or omissions, including any damages resulting from the express or implied application of information contained in this document or from the use of products, services, or programs that may accompany it. In no event shall Maxim, publishers, authors, or editors of this guide be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document.
MAXREFDES101 User Adoption Guide
Maxim Integrated 3
1. Introduction to MAXREFDES101
MAXREFDES101 is a unique evaluation and development platform in a wrist-worn wearable
form factor that demonstrates the functions of a wide range of Maxim’s products for
health-sensing applications. It integrates a PPG analog-front-end (AFE) sensor (MAX86141),
a biopotential AFE (MAX30001), a human body temperature sensor (MAX30205), a host
microcontroller (MAX32630), a power-management IC (MAX20303), along with a sensor
hub (MAX32664). MAX32664 is a sensor hub family with embedded firmware and
algorithms for wearables. It seamlessly enables customer desired sensor functionality,
including communication with Maxim’s optical sensor solutions and delivering raw or
calculated data to the outside world. This is achieved while keeping overall system power
consumption in check.
MAXREFDES101 system diagram is shown below:
MAXREFDES101 User Adoption Guide
Maxim Integrated 4
Figure 1: MAXREDES101 System Diagram
MAX30001ECG AFE
HostMicrocontroller
MAX32630
ARM CortexTM
M4F MCU
MAX30205
TEMPERATURE SENSOR
BMP280
BAROMETRIC PRESSURE
BMI160
ACCELEROMETER/GYRO
MAX20303
POWER MANAGEMENT IC
MAX30001ECG AFE
PAN1326B
BLUETOOTH/BLE
USB-C CONNECTOR
I2C
I2C
QSPIMX25U12835FZ2I-10G
32MB FLASH MEMORY
MAX32664
ARM CortexTM
M4F MCU
MAX86141
OPTICAL SENSOR
Sensor Board
Biometric Sensor Hub
I2C
UART
BootLoader
Microcontroller Board
I2C
HR Algorithm
KX122
3-AXISACCEL(optional)
SPI1
SPI0
SPI0
Display Sharp
LS013B7DH03SPI
Pushbutton 1
Pushbutton 2
Pushbutton 3
In this design, MAX32630 is used as the host controller. A display and three pushbuttons are
connected to the microcontroller. The sensor hub microcontroller is the MAX32664 which
has the pre-programmed wearable heart rate and SpO2 algorithms1. The MAX86141 optical
AFE sensor and the KX-122 accelerometer are connected to the sensor hub.
MAXREFDES101 hardware and software reference designs are available for Maxim
customers on Maxim’s product webpage and on the respective mbed OS webpages.
The protocol for communicating with the MAX32664 sensor hub is defined in the
MAX32664 User Guide.
1 MAX32664 has several variants. Please contact Maxim sales to find the part that best suits your algorithm needs.
MAXREFDES101 User Adoption Guide
Maxim Integrated 5
2. MAXREFDES101-based watch reference design
MAXREFDES101 EV-Kit software comes complete with the following:
- MAX32664 firmware with embedded health-sensing algorithm (Wrist Heart Rate
Monitor(WHRM))
- MAX32630 host firmware, which provides communication between MAX32664 and the
Windows or Android visualization/debugging application
- A Windows or Android GUI application for evaluation and debugging
PC GUI
MAX32630(uController
Host)
MAX32664(Embedded Algorithm)
Comms between MAX32664 and GUI
Wearable Heart Rate and Blood
Oxygen Monitoring(WHRM, WSpO2)
Command and controls for MAX32664
MAXREFDES101 Watch
Figure 2: MAXREFDES101 software components
MAXREFDES101 reference design can also be used by our customers to design their own
system, which may require a different set of software. An example design can be as follows:
uController Host
MAX32664(Embedded Algorithm)
Command and controls for MAX32664
Wearable Heart Rate and Blood
Oxygen Monitoring(WHRM, WSpO2)
Customer Wearable Design
Figure 3:Customer's wearable design software components
In this case, MAX32664 is now fully controlled by the embedded microcontroller. A typical
system diagram for a MAXREFDES101-based watch design will then look like the following:
MAXREFDES101 User Adoption Guide
Maxim Integrated 6
MAX30001ECG AFE
HostMicrocontroller
MAX32664B
ARM CortexTM
M4F MCU
MAX86141
OPTICAL SENSOR
Sensor Board
Biometric Sensor Hub
I2C
BootLoader
Customer Board for Watch
WHRM Algorithm
KX122
3-AXISACCEL(optional)
SPI1
Display
Pushbutton 1
Figure 4: Typical customer watch design based on MAXREFDES101
This reference design software includes:
- Sample host (microcontroller) software
- MAX32664 firmware algorithm (WHRM) binary
3. Sample host (microcontroller) software
MAXREFDES101 User Adoption Guide
Maxim Integrated 7
The sample host software consists of three modules:
- Watch GUI & controls
- SH Communications
- Algorithm Report using SH configured with MAX8614X
Host Software
SH Communications
Algorithm Report using SH(MAX8614X)
Watch GUI & Controls
Figure 5: Sample host software modules
3.1. Hardware abstraction in sample host software
The sample host controller software is layered to provide hardware abstraction. This
layered approach will allow most of the software modules to be cut and pasted into our
customer’s target platform. Hardware dependent modules may require modifications to
match your target microcontroller.
The sample host controller software is divided up into three layers:
1) The hardware libraries, which are the microcontroller specific code to support the hardware devices such as interrupts, I2C, and GPIOs.
2) The sensor hub communications layer, which include procedures to read/write data from/to the sensor hub, change the sensor hub mode to either application mode or bootloader mode, and to initialize the MAX32664 sensor hub.
3) The application layer, which has procedures for the user interface interactions to the display and pushbutton and procedures to stream processed data from the sensor hub.
MAXREFDES101 User Adoption Guide
Maxim Integrated 8
Peripheral Libraries
Sensor Hub Interface
Application Layer
User Interface
Sensor Hub CommunicationsSH MAX86141, Algorithm
UI DisplayUI Select Algo using
Pushbutton
SH Change Mode
SH Enable/Disable
SH Read/Write
MAX86141 Read/Write Register
MAX86141 Enable/Disable
Digital IO
SH Init Hw
Get WHRM Report Data
InterruptsSPII2CPushbuttonDisplay
Figure 6: Sample host software layered design
MAXREFDES101 User Adoption Guide
Maxim Integrated 9
3.2. Sample host software flowchart
We utilize MAXREFDES101 hardware (watch form factor) to demonstrate our sample
software. Below is the flowchart:
Update display
with HR data
Retrieve HR data from FIFO
Enable HR
Algorithm
START
InItialization:
MAX86141, KX-122
PushButton, Display,
Sensor Hub Communications
Figure 7: Sample host software flowchart
MAXREFDES101 User Adoption Guide
Maxim Integrated 10
4. Data Flow Diagram The drawing below is the Data Flow Diagram for the displaying of the data for the host software.
Display
FIFO Data from Sensor Hub
Parse HR data
Report FIFO Data
Sensor Hub Interface
Send Data to
Display
User Interface
Figure 8: Sample host software layered design
MAXREFDES101 User Adoption Guide
Maxim Integrated 11
5. Mbed code repository
The source code for the MAX32630 is located at: https://os.mbed.com/teams/MaximIntegrated/code/Host_Software_MAX32664GWEB_HR_wrist/ It is compatible w/ the .msbl file listed in the Compatibility section.
6. Display and Button Interface
6.1. Display
The watch display will display the user heart rate when turned on and strapped to the user wrist:
Figure 9: Heart Rate displayed
6.2. Software Reset Button When the upper right button is pressed twice, the software is reinitialized:
Figure 10: Top Right button pressed once.
6.3. Off Buttons
When the upper left button and the upper right button are both pressed for about thirteen seconds, the MAXREFDES101 will be turned off.
MAXREFDES101 User Adoption Guide
Maxim Integrated 12
Figure 11: MAXREFDES101 Off
7. Serial Interface
Plug in the USB-C cable to the MAXREFDES101. Use a serial terminal application such as Terra Term to connect to the USB Serial Device, 115200 baud, 8N1N.
7.1. Serial terminal data stream
After the serial terminal application is correctly connected, the heart rate, confidence, and algorithm status are displayed:
Figure 12: Serial terminal displays heart rate, confidence and status
7.2. Stopping the data stream
Enter the command “stop” or cut and paste “stop” into the terminal window and press <Enter>.
Figure 133: Serial terminal stopped
7.3. Enabling visibility of serial inputs
In the terminal window, type “set_host_echomode 1” and then press <Enter>.
Figure 144: Serial terminal echomode set to 1
7.4. Read a register from the MAX86141
MAXREFDES101 User Adoption Guide
Maxim Integrated 13
In the terminal window, type “get_reg ppgsensor 0xff” and then press <Enter>.
Figure 153: Register read command
7.5. Enable the data stream
In the terminal window, type “enable_measurement whrm” and then press <Enter>.
Figure 164: Streaming data enabled
7.6. Serial Command List and Description
stop stops the serial data streaming
enable_measurement whrm starts the serial data streaming
set_host_echomode [visible] visible=1: Enables the visibility of the user typing visible=0: Disables the visibility of the user typing
get_hub_fwversion Displays the sensor hub version.
get_host_opmode Displays whether the mode is APPMODE or BOOTLOADERMODE
set_host_opmode 1 Changes the mode to bootloader mode
get_reg ppgsensor [reg] reg = [0..0xff]: address of the register to display
set_reg ppgsensor [reg] [val] val=[0..0xff]: set the register to this value. reg=[0..0xff]: set the value of this register to [val].
get_cfg whrm aecenable 1: AEC is enabled 0: AEC is disabled
set_cfg whrm aecenable [enable]
MAXREFDES101 User Adoption Guide
Maxim Integrated 14
enable=1: enable AEC disable=0: disable AEC
get_cfg whrm scdenable 1: SCD is enabled 0: SCD is disabled
get_cfg whrm scdadjperiod period of time to adjust the target PD, 16-bit unsigned, seconds
set_cfg whrm scdadjperiod [period] period = [0..0XFFFF]: Period of time to adjust the target PD, 16-bit unsigned, seconds
get_cfg whrm scddebouncewin Displays the debounce for SCD, which is number of consecutive results of skin contact status to be reflected in the final output.
set_cfg whrm scddebouncewin [dbwin] dbwin=[0..0XFFFF]: The motion magnitude threshold for Motion Detector LSB=0.1g, 16-bit unsigned.
get_cfg whrm motionthreshold Displays the motion magnitude threshold for Motion Detector LSB=0.1g, 16-bit unsigned.
set_cfg whrm motionthreshold [threshold] threshold=[0..0XFFFF]: The motion magnitude threshold for Motion Detector, LSB=0.1g, 16-bit unsigned.
get_cfg whrm minpdcurrent Displays the minimum PD current, LSB=0.1mA, 16-bit unsigned.
set_cfg whrm minpdcurrent [mincurr] mincurr=[0..0XFFFF]: The minimum PD current, LSB=0.1mA, 16-bit unsigned.
get_cfg whrm pdconfig Displays the minimum PD configuration: 1=PD1, 2=PD2, 3=Both PD1&PD2
set_cfg whrm pdconfig [pdcfg] pdcfg: The PD configuration: 1=PD1, 2=PD2, 3=Both PD1&PD2.
8. Compatibility Matrix
Mbed MAX32664GWEB Sample Host Release
Host Notes .msbl application algorithm/driver file
3/25/19 Mbed Files at revision
3:b8989dab0f88 https://os.mbed.com/teams/MaximIntegrated/code/Host_Software_MAX32664GWEB_HR_EXTENDED/
Additional features added to the Heart Rate display program: serial commands, msbl flashing code,
9/1/18 MAX32664WGEZ_SmartSensor_HSP2_v1.8.3.msbl