host interface guide for health sensor platform 2start/stop the algorithm and streaming data. the...

19
Maxim Integrated Page 1 of 19 Host Interface Guide for Health Sensor Platform 2.0 Abstract The Health Sensor Platform 2.0 is a unique evaluation and development platform in a wearable form factor that demonstrates the functions of a wide range of Maxim’s products for health- sensing applications. The platform includes biosensors, power-management ICs (PMIC), and microcontrollers that capture bio-signals important to healthcare. A number of embedded algorithms are available for this platform to calculate heart rate, SpO2, or blood pressure. This document describes the commands and settings to communicate with this platform.

Upload: others

Post on 12-Feb-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

  • Maxim Integrated Page 1 of 19

    Host Interface Guide for Health Sensor Platform 2.0

    Abstract

    The Health Sensor Platform 2.0 is a unique evaluation and development platform in a wearable

    form factor that demonstrates the functions of a wide range of Maxim’s products for health-

    sensing applications. The platform includes biosensors, power-management ICs (PMIC), and

    microcontrollers that capture bio-signals important to healthcare. A number of embedded

    algorithms are available for this platform to calculate heart rate, SpO2, or blood pressure. This

    document describes the commands and settings to communicate with this platform.

  • Maxim Integrated Page 2 of 19

    Table of Contents

    Introduction ................................................................................................................................... 3

    1 Architecture ................................................................................................................................ 4

    2 Communication Setup ................................................................................................................ 5

    2.1 PC to Platform Command Format .................................................................................. 5

    2.2 Platform Response Format ............................................................................................. 5

    3 Commands and Settings ............................................................................................................ 7

    3.1 Host Commands to Control Sensor Hub (All Variants) ................................................... 7

    3.2 Host Commands for MAX32664A ................................................................................ 10

    3.3 Host Commands for MAX32664B and MAX32664C .................................................... 11

    3.4 Host Commands for MAX32664D ................................................................................ 17

    List of Figures

    Figure 1. Architecture diagram 4

    List of Tables

    Table 1. Health Sensor Platform Variants .............................................................................................. 4

    Table 2. Error Status Code Description .................................................................................................. 6

    Table 3. Host Commands: General for All Variants .............................................................................. 7

    Table 4. Host Commands: MAX32664A ............................................................................................... 10

    Table 5. Host Commands: MAX32664B and MAX32664C ............................................................... 11

    Table 6. Host Commands: MAX32664D .............................................................................................. 18

  • Maxim Integrated Page 3 of 19

    Introduction

    The Health Sensor Platform is a unique evaluation and development platform in a wearable form

    factor. It includes a sensor (e.g., MAX86141, or MAX30101), a variant of the MAX32664 to run

    the algorithm firmware (e.g., MAX32664A, B, C, or D depending on the algorithm), a 6-axis

    accelerometer/gyroscope, a PMIC, and a host microcontroller (MAX32630) communicating with

    the MAX32664 sensor hub through an I2C. The host microcontroller firmware has a set of

    commands, accessible through the serial port, to configure the MAX32664 and sensors, and to

    start/stop the algorithm and streaming data. The same interface commands are used by the

    DeviceStudio PC GUI to communicate with the platform.

    This document describes the protocols and commands to interface the host microcontroller

    firmware, including the:

    • Generic commands common to all variants.

    • Variant specific commands and settings.

  • Maxim Integrated Page 4 of 19

    1. Architecture

    The Health Sensor platform is architected as in Figure 1. It can include different biosensors and

    algorithms based on the variant (Table 1). A Host MCU bridges the user interface to the sensors

    and algorithms (Figure 1) with a set of commands through the UART or BLE. The user can launch

    the DeviceStudio GUI to communicate with the platform with a graphical interface. Alternatively,

    a terminal program like teraterm can provide more flexibility to directly send/receive

    commands/responses to/from the host.

    Figure 1. Architecture diagram.

    Table 1. Health Sensor Platform Variants

    PLATFORM SENSOR HUB

    VARIANT SENSOR FEATURE

    MAXREFDES220 MAX32664A MAX30101/2 Heart-rate, SpO2 using the fingertip

    MAXREFDES101 MAX32664B MAX86140/1 Heart-rate using wrist

    MAXREFDES103 MAX32664C MAX86140/1 Heart-rate, SpO2 using wrist

    MAXREFDES220-BPT MAX32664D MAX30101/2 Heart-rate, SpO2, blood pressure using fingertip

  • Maxim Integrated Page 5 of 19

    2. Communication Setup

    The PC connection is established using a serial to USB cable or BLE interface. The COM port

    connection is set to:

    • baud = 115200 or 230400

    • parity = None

    • data bits = 8

    • stop bits = One

    The PC client application (GUI or terminal) can send commands to the platform and can also

    listen for asynchronous messages from the platform after a connection is established. Such

    messages include responses to commands as well as streaming data sent to PC automatically

    when a sensor is active.

    Each command/message to/from the platform must be terminated by a new-line character \n.

    The PC/platform connection uses a command + response format with the PC acting as the

    master. The PC can request data, send configuration parameters, etc., and the platform responds

    with the requested data and confirmation.

    There are two custom characteristics for the Android app:

    • Command Characteristic: 00001027-1212-efde-1523-785feabcd123 • Response Characteristic: 00001011-1212-efde-1523-785feabcd123

    The app sends commands to the device through the Command Characteristics and receives command responses and data stream from the device through Response Characteristics.

    2.1. PC to Platform Command Format

    A typical command includes the command string followed by a number of parameters (if required)

    separated by space:

    2.2. Platform Response Format

    The platform responds to a command by echoing the command itself, followed by any necessary

    token/value pair, a mandatory err/value pair, and finally a mandatory newline (\n) character.

    = … = err=\n

    The item/value pairs are embraced in {} and are separated by commas if the value of a token is

    a list of items/values (for example dumping registers of a sensor).

    = {,},{,},…,

    {,}, err=\n

    The error code =0 represents a successful command. Other values represent an error type (Table

    2).

    Example: reset

    reset err=0

  • Maxim Integrated Page 6 of 19

    get_device_info

    get_device_info platform=SmartSensor_MAX32660 firmware_ver=HSP2SPO2_3_2.0

    sensors=ppg algo_ver_ppg=unknown part_name_ppg=max8614x hub_firm_ver=30.6.0

    fw_algos=agc,scd,aec,wspo2,whrm err=0

    dump_reg ppg

    dump_reg ppg reg_val={0,0},{1,0},{2,0},{3,0},{4,0},{5,0},{6,0},

    {8,F},{9,0},{A,0},{B,0},{C,0},{D,0},{E,0},{F,0},{10,0},{11,0},{12,0},{13,F},{

    14,FF},{15,FF},{16,FF},{17,FF},{18,0},{19,0},{1A,0},{1B,0},{1C,7C},{1D,7E},{1

    E,1},{1F,20},{20,0},{21,0},{30,0},{FE,6},{FF,15} err=0

    Table 2. Error Status Code Description

    ERROR CODE DESCRIPTION

    0 Success

    -1 Unspecified error

    -2 File access error

    -3 I2C error

    -4 No driver error

    -5 No device error

    -6 No library/algorithm error

    -7 No memory error

    -8 General driver error

    -254 Invalid or missing parameter error

    -255 Unknown command error

  • Maxim Integrated Page 7 of 19

    3. Commands and Settings

    3.1. Host Commands to Control Sensor Hub (All Variants)

    The following commands are generally used in the different variants of the platform (Table 3).

    The response to a command includes the echoed command, list of tokens/values (shown in the

    table) followed by the error status as described in the previous section.

    Table 3. Host Commands: General for All Variants FORMAT RESPONSE TOKEN/VALUE LIST (HEX)

    reset Resets the MAX32664 Sensor Hub (Host is not restarted)

    get_device_info Gets information about the connected platform, sensors, and algorithms. Response includes: Platform, Platform ver, Sensors List, Algorithm ver, Algorithm list

    read Starts algorithm/sensor. Streaming begins after this command :

    • ppg: sensor platform for heart rate or SpO2 • bpt: sensor platform for blood pressure trending

    :

    • Streaming type. See the following sections for the Sensor Hub variant commands and more information.

  • Maxim Integrated Page 8 of 19

    get_format Shows the streaming report format in a comma separate list tagging each field. :

    • ppg: sensor platform for heart rate or SpO2 • bpt: sensor platform for blood pressure trending

    :

    • Streaming type. See the following sections for the Sensor Hub variant commands and more information.

    ASCII mode example: get_format ppg 4

    format=smpleCnt,grnCnt,led2,led3,grn2Cnt,irCnt,red

    Cnt,accelX,accelY,accelZ,opMode,hr,hrconf,rr,rrcon

    f,activity,r,wspo2conf,spo2,wspo2percentcomplete,w

    spo2lowSNR,wspo2motion,wspo2lowpi,wspo2unreliableR

    ,wspo2state,scdstate err=0

    Binary mode example. The data is packed with unit32 binary. The first number after the field name inside of the opening brace signifies the number of bits packed, and the second number if present must be ignored. Refer to the AN6924 (Measuring SpO2 and Heart Rate Using MAX32664C) for the latest units. typedef struct __attribute__((packed)) { uint32_t start_byte :8; uint32_t sample_cnt :8; uint32_t sampleTime; uint32_t grnCnt :20; uint32_t grn2Cnt :20; uint32_t irCnt :20; uint32_t redCnt :20; uint32_t accel_x :14; uint32_t accel_y :14; uint32_t accel_z :14; … uint32_t spo2State :4; uint32_t scdState :4; uint8_t :0; uint8_t crc8 :8; } ds_pkt_mode_extended_report_whrm_wspo2_suite; get_format ppg 4 enc=bin cs=1

    format={smpleCnt,8},{smpleTime,32},{grnCnt,20},{gr

    n2Cnt,20},{irCnt,20},{redCnt,20},{accelX,14,3},{ac

    celY,14,3},{accelZ,14,3},{opMode,4},{hr,12},{hrcon

    f,8},{rr,14,1},{rrconf,8},{activity,4},{wSteps,32}

    ,{rSteps,32},{kCal,32,1},{totalActEnergy,32,1},{is

    Led1CurrentAdj,1},{adjLed1Current,11},{isLed2Curre

    ntAdj,1},{adjLed2Current,11},{isLed3CurrentAdj,1},

    {adjLed3Current,11},{isTAdj,1},{adjT,2},{isFAdj,1}

    ,{adjF,3},{smpAve,3},{hrmAfeState,2},{isHighMotion

    ,1},{r,12,3},{wspo2conf,8},{spo2,11,1},{wspo2perce

    ntcomplete,8},{wspo2lowSNR,1},{wspo2motion,1},{wsp

    o2lowpi,1},{wspo2unreliableR,1},{wspo2state,4},{sc

    dstate,4} err=0

    See the Quick Start Guide for the appropriate Sensor Hub variant for the description of each field and to execute the get_format for the latest format.

    Stop Stops the algorithm and sensors streaming data.

    https://www.maximintegrated.com/en/design/technical-documents/userguides-and-manuals/6/6924.htmlhttps://www.maximintegrated.com/en/design/technical-documents/userguides-and-manuals/6/6924.html

  • Maxim Integrated Page 9 of 19

    pause Disables the display of the streaming data in the terminal, :

    • 0: Turn off pause (resume displaying data) • 1:Turn on pause (pause displaying data)

    get_reg Gets the value of a sensor register (in hexadecimal): :

    • ppg: sensor platform for heart-rate or SpO2 • bpt: sensor platform for blood pressure trending

    :

    • address of register in hex*.

    set_reg

    Sets the value of a sensor register (in hexadecimal): :

    • ppg: sensor platform for heart-rate or SpO2 • bpt: sensor platform for blood pressure trending

    :

    • address of register in hex*. :

    • value of register in hex*.

    dump_reg Dumps all the registers and their values for a sensor register (in hexadecimal): :

    • ppg: sensor platform for heart-rate or SpO2 • bpt: sensor platform for blood pressure trending

    Response includes a list of comma separated {reg,val} pairs, e.g. {0,0},{1,FF},{2,F0},etc

    *Refer to the sensor data sheet.

  • Maxim Integrated Page 10 of 19

    3.2. Host Commands for the MAX32664A

    The commands in Table 4 are specific to the MAX32664A Sensor Hub. The are

    entered in hexadecimals unless otherwise specified.

    Note: Each host command can invoke one or more MAX32664 Sensor Hub commands to

    complete the desired action. Refer to the variants User Guide for the list of Sensor Hub

    commands and the description of the fields in the streaming data.

    Example: set_cfg ppg agc 1

    read ppg 0

    stop

    Table 4. Host Commands: MAX32664A FORMAT RESPONSE TOKEN/VALUE LIST (HEX)

    CONFIGURATION: ALGORITHM

    set_cfg ppg agc Enables/disables AGC.

    STREAMING RELATED COMMANDS:

    read ppg 0 Algorithm (heart-rate + SpO2) + Sensor Hub accelerometer + sensor streaming @ 100Hz. Use get_format ppg 0 for streaming format.

    read ppg 1 Algorithm (heart-rate + SpO2) streaming @ 100Hz (Sensor Hub accelerometer is enabled). Use get_format ppg 1 for streaming format.

    read ppg 2 Algorithm (heart-rate + SpO2) + Host side accelerometer + sensor streaming @ 100Hz. Use get_format ppg 2 for streaming format.

    read ppg 3 Algorithm (heart-rate + SpO2) + sensor streaming @ 100Hz, no accelerometer is used. Use get_format ppg 3 for streaming format.

    read ppg 4 Algorithm (heart-rate + SpO2) + Sensor Hub accelerometer + sensor streaming @ 100Hz, Extended report. Use get_format ppg 4 for streaming format.

    read ppg 5 Algorithm (heart-rate + SpO2) + Host side accelerometer + sensor streaming @ 100Hz, Extended report. Use get_format ppg 5 for streaming format.

    read ppg 6 Algorithm (heart-rate + SpO2) + sensor streaming @ 100Hz, Extended report, no accelerometer is used. Use get_format ppg 6 for streaming format.

    https://www.maximintegrated.com/en/products/interface/sensor-interface/MAX32664.html/tb_tab2

  • Maxim Integrated Page 11 of 19

    3.3 .Host Commands for the MAX32664B and MAX32664C

    The commands in Table 5 are specific to both the MAX32664B and MAX32664C Sensor Hub,

    except SpO2 related commands only supported by the MAX32664C. The are entered

    in hexadecimals unless otherwise specified.

    Note: Each host command can invoke one or more MAX32664 Sensor Hub commands to

    complete the desired action. Refer to the variants User Guide for the list of Sensor Hub

    commands and the description of the fields in the streaming data.

    Example:

    set_cfg accel_sh 1

    set_cfg stream ascii

    read ppg 4

    stop

    Table 5. Host Commands: MAX32664B and MAX32664C FORMAT RESPONSE TOKEN/VALUE LIST (HEX)

    CONFIGURATION: SENSOR HUB

    set_cfg stream

    Defines the format of the streaming data as: • ascii: suitable when using terminal

    bin: when using GUI (automatically set by GUI) [default]

    set_cfg report Sets the type of streaming report as: • 1: brief report [default]

    2: extended report with more info (subject to FW support)

    set_cfg accel_sh Sets the type of accelerometer as in Figure 1, : • 0: Host side accelerometer • 1: Sensor Hub side accelerometer [default]

    set_cfg flash log Enables/disables the logging streaming data in flash.

    set_cfg i2c_addr Changes the MAX32664 I2C slave address from default (0xAA) to . The new address is effective only AFTER sending the response of this command to the host. This must only be used if multiple I2C slaves are connected to the host.

    set_cfg sh_mode Use this command with = 1 to shutdown MAX32664. Restart is only possible by power cycle or toggling RSTN.

    get_cfg sh_counter Reads the internal 32-bit counter of Sensor Hub for debugging. The LS byte represents a chip revision (A1 or A2).

    https://www.maximintegrated.com/en/products/interface/sensor-interface/MAX32664.html/tb_tab2

  • Maxim Integrated Page 12 of 19

    set_cfg hubaccel op_cfg

    Enables/disables the wake up on motion detection for the Sensor Hub KX122 accelerometer (three 8-bit values): : Enable wake up on motion:

    • 0: Disabled • 1: Enabled

    : WUFC*: the time in seconds in which motion should be present before a wakeup interrupt. WUFC = desired time (s) x 25 : ATH*: the motion level threshold ATH = Desired threshold (g) x 16 Example: For a 0.2s time, and 0.5g set WUFC to 5 and ATH to 8: set_cfg hubaccel op_cfg 01 05 08

    Disables wake up on motion: set_cfg hubaccel op_cfg 00 FF FF.

    set_cfg ppg hr_conf_level

    get_cfg ppg hr_conf_level

    Sets/Gets the minimum heart-rate confidence level (unsigned 8-bit) to update heart-rate (for platform display only). Values are in decimal.

    set_cfg ppg hr_expiration

    get_cfg ppg hr_expiration

    Sets/Gets the heart-rate value expiration duration (unsigned 8-bit) in sec (for platform display only). Values are in decimal.

    CONFIGURATION: ALGORITHM

    set_cfg wearablesuite spo2cal

    get_cfg wearablesuite spo2cal

    Sets/Gets SpO2 calibration coefficients A, B, and C as described in the MAX32664C Quick Start Guide. , , and are space separated 32-bit signed integer values, equal to 105 x measured float calibration coefficient A, B, and C. Values are in hexadecimals. Get response is [valueA|ValueB|ValueC] Only supported by MAX32664C.

    set_cfg wearablesuite

    spo2motionperiod

    get_cfg wearablesuite

    spo2motionperiod

    Sets/Gets SpO2 motion-detection period (unsigned 16-bit int) [sec] Only supported by MAX32664C.

    set_cfgwearablesuite

    spo2motionthareshold

    get_cfg wearablesuite

    spo2motionthreshold

    Sets/Gets SpO2 motion-detection threshold (signed 32-bit int, equal to 105 x actual float threshold value; value1: MSB in 4 bytes signed int, value4: LSB in 4 bytes signed int) Only supported by MAX32664C.

    set_cfg wearablesuite

    spo2afecontrltimeout

    get_cfg wearablesuite

    spo2afecontrltimeout

    Sets/Gets SpO2 AGC Timeout (unsigned 8-bit) [sec] Only supported by MAX32664C.

    https://www.maximintegrated.com/en/app-notes/index.mvp/id/6924

  • Maxim Integrated Page 13 of 19

    set_cfg wearablesuite

    spo2timeout

    get_cfg wearablesuite

    spo2timeout

    Sets/Gets SpO2 Algorithm Timeout (unsigned 8-bit) [sec] Only supported by MAX32664C.

    set_cfg wearablesuite initialhr

    get_cfg wearablesuite initialhr

    Sets/Gets Initial HR value (unsigned 8-bit)

    set_cfg wearablesuite

    personheight

    get_cfg wearablesuite

    personheight

    Sets/Gets Height (unsigned 16-bit) [cm]

    set_cfg wearablesuite

    personweight

    get_cfg wearablesuite

    personweight

    Sets/Gets Weight (unsigned 16-bit) [kg

    set_cfg wearablesuite personage

    get_cfg wearablesuite personage

    Sets/Gets Age (unsigned 8-bit) [years]

    set_cfg wearablesuite

    persongender

    get_cfg wearablesuite

    persongender

    Sets/Gets Gender • 00: Male • 01: Female

    set_cfg wearablesuite algomode

    get_cfg wearablesuite algomode

    Sets/Gets Algorithm operation mode (can be switched in runtime):

    • 00: Continuous HRM + Continuous SpO2 [default] • 01: Continuous HRM + One-Shot SpO2 • 02: Continuous HRM • 03: Sampled HRM • 04: Sampled HRM + One-Shot SpO2 • 05: Activity Tracking ONLY • 06: SpO2 Calibration

    Note: Mode 0,1,4 and 6 are only supported by MAX32664C.

    set_cfg wearablesuite aecenable

    get_cfg wearablesuite aecenable

    Sets/Gets AEC enable: • 00: Disable • 01: Enable [default]

    set_cfg wearablesuite scdenable

    get_cfg wearablesuite scdenable

    Sets/Gets SCD enable: • 00: Disable • 01: Enable [default]

    set_cfg wearablesuite

    targetpdperiod

    get_cfg wearablesuite

    targetpdperiod

    Sets/Gets adjusted target PD current period in seconds (16-bit unsigned).

  • Maxim Integrated Page 14 of 19

    set_cfg wearablesuite

    motionthreshold

    get_cfg wearablesuite

    motionthreshold

    Sets/Gets Motion magnitude threshold in 0.001g (16-bit unsigned).

    set_cfg wearablesuite

    minpdcurrent

    get_cfg wearablesuite

    minpdcurrent

    Sets/Gets minimum PD current in 0.1mA (16-bit unsigned).

    set_cfg wearablesuite

    initpdcurrent

    get_cfg wearablesuite

    initpdcurrent

    Sets/Gets initial PD current in 0.1mA (16-bit unsigned).

    set_cfg wearablesuite

    targetpdcurrent

    get_cfg wearablesuite

    targetpdcurrent

    Sets/Gets target PD current in 0.1mA (16-bit unsigned). Works only if Auto Target PD Current Calculation is enabled.

    set_cfg wearablesuite

    autopdcurrentenable

    get_cfg wearablesuite

    autopdcurrentenable

    Sets/Gets automatic calculation of target PD current: • 00: Disable • 01: Enable [default]

    set_cfg wearablesuite

    mintintoption

    get_cfg wearablesuite

    mintintoption

    Sets/Gets minimum integration time: • 00: 14.8μs • 01: 29.4μs • 02: 58.7μs • 03: 117.3μs

    set_cfg wearablesuite

    minfsmpoption

    get_cfg wearablesuite

    minfsmpoption

    Sets/Gets minimum sampling rate and averaging: • 00: 25sps, avg = 1 • 01: 50sps, avg = 2 • 02: 100sps, avg = 4 • 03: 200sps, avg = 8 • 03: 400sps, avg = 16

    set_cfg wearablesuite

    maxtintoption

    get_cfg wearablesuite

    maxtintoption

    Sets/Gets maximum integration time: • 0: 14.8μs • 1: 29.4μs • 2: 58.7μs • 3: 117.3μs

    set_cfg wearablesuite

    maxfsmpoption

    get_cfg wearablesuite

    maxfsmpoption

    Sets/Gets maximum sampling rate and averaging: • 0: 25sps, avg = 1 • 1: 50sps, avg = 2 • 2: 100sps, avg = 4 • 3: 200sps, avg = 8 • 4: 400sps, avg = 16

  • Maxim Integrated Page 15 of 19

    set_cfg wearablesuite

    whrmledpdconfig

    get_cfg wearablesuite

    whrmledpdconfig

    Sets/Gets LED PD configuration for two channels of WHRM (MS byte channel 1, and LS byte channel 2): For each channel, 4-bit MSB is LED # and 4-bit LSB is PD #: - LED #: 0–2 for LED1–LED3; 7: LED not used - PD #: 0–1 for PD1–PD2; 3: PD not used

    Use the appropriate settings for channel 1 in case of a single channel. Set LED and PD for channel 2 as unused (0x73).

    set_cfg wearablesuite

    spo2ledpdconfig

    get_cfg wearablesuite

    spo2ledpdconfig

    Sets/Gets the LED PD configuration for the SpO2 (MS byte:

    IR channel; LS byte: red channel): For each red or IR channel, 4-bit MSB is LED # and 4-bit LSB is PD #: - LED #: 0–2 for LED1–LED3; 7: LED not used - PD #: 0–1 for PD1–PD2; 3: PD not used

    set_cfg wearablesuite

    ledfiringconfig

    get_cfg wearablesuite

    ledfiringconfig

    Set/Get slots are used to fire the LED. =UVWXYZ U is Slot 1 V is Slot 2 W is Slot 3 X is Slot 4 Y is Slot 5 Z is Slot 6 U, V, W, X, Y, Z are defined as: 0: No LED firing 1: LED1 firing 2: LED2 firing 3: LED3 firing 4: LED4 firing 5: LED5 firing 6: LED6 firing 7: LED1 and LED2 firing 8: LED1 and LED3 firing 9: LED2 and LED3 firing

    STREAMING RELATED COMMANDS:

    read ppg 4 Algorithm + sensor streaming @ 25Hz: Enable the accelerometer, sensor, and algorithm; set report period to 1 and start data streaming at 25Hz rate. Use get_format ppg 4 for the streaming format.

    read ppg 5 Algorithm streaming @ 1Hz: Enable the accelerometer, sensor, and algorithm; set report period to 25 and start data streaming at 1Hz rate. Only the algorithm data streams. Use get_format ppg 5 for the streaming format.

    read ppg 6 Raw sensor data streaming @ 25Hz: Enable the accelerometer and sensor; set report period to 1 and start data streaming raw data (algorithm not running) at 25Hz rate.

  • Maxim Integrated Page 16 of 19

    read ppg 9 Packed Binary Format: Extended algorithm + sensor streaming @ 25Hz: Enable the accelerometer, sensor, and algorithm; set report period to 1 and start data streaming at 25Hz rate using extended algorithm report. Use get_format ppg 9 for the streaming format.

    set_cfg report_period

    get_cfg report_period

    Configures the report period per number of samples. For example, if the value is 1 (default), the report is generated every sample (40ms). If the value is 25, the report is generated once every 25 samples (1s). Note: This command must be sent AFTER streaming starts to change the report period for read ppg 4 or 5. Example to generate report once every 10s:

    pause 1

    read ppg 4

    set_cfg report_period FA

    pause 0

    set_cfg scdpowersaving

    Enables and initializes the SCD-based power-saving mode.: : 0/1 for disable/enable : Initial LED off time in probing state in 10xsec. (it tries three times before going to the off-skin state and off time doubles each time) : Off-skin state timeout in 10xsec Use set_cfg accel_sh to choose the Sensor Hub or host side accelerometer for motion detection before enabling this feature. This command invokes streaming. Streaming continues if there is a skin contact event. Otherwise, it performs according to the SCD state machine and resumes streaming if there is a motion or skin contact. Refer to the MAX32664C Quick Start Guide for more information on the SCD State and Motion Detection for Power Saving.

    stop_sensors Stops sensors streaming data if read ppg 6 is used.

    *Defined in the KX122 data sheet.

    https://www.maximintegrated.com/en/app-notes/index.mvp/id/6924https://www.maximintegrated.com/en/app-notes/index.mvp/id/6924

  • Maxim Integrated Page 17 of 19

    3.4. Host Commands for the MAX32664D

    The commands in Table 6 are specific to the MAX32664D Sensor Hub. The are

    entered in hexadecimals unless otherwise specified.

    Note: Each host command can invoke one or more MAX32664 Sensor Hub commands to

    complete the desired action. Refer to the variants User Guide for the list of Sensor Hub

    commands and description of the fields in the streaming data.

    Example: set_cfg bpt spo2_coefs 00026f60 ffcb1d12 00abf37b

    Run user calibration using cuff reference values, cal_index = 0 set_cfg bpt date_time 20200801 122848

    set_cfg bpt sys_dia 0 117 76

    read bpt 0

    stop

    Run user calibration using cuff reference values, cal_index = 1 set_cfg bpt date_time 20200801 122950

    set_cfg bpt sys_dia 1 119 78

    read bpt 0

    stop

    Run user calibration using cuff reference values, cal_index = 2 set_cfg bpt date_time 20200801 123152

    set_cfg bpt sys_dia 2 118 77

    read bpt 0

    stop

    Run user calibration using cuff reference values, cal_index = 3 set_cfg bpt date_time 20200801 123354

    set_cfg bpt sys_dia 3 120 79

    read bpt 0

    stop

    Run user calibration using cuff reference values, cal_index = 4 set_cfg bpt date_time 20200801 123640

    set_cfg bpt sys_dia 4 119 79

    read bpt 0

    stop

    Run estimation: read bpt 1

    Stop

    https://www.maximintegrated.com/en/products/interface/sensor-interface/MAX32664.html/tb_tab2

  • Maxim Integrated Page 18 of 19

    Table 6. Host Commands: MAX32664D FORMAT RESPONSE TOKEN/VALUE LIST (HEX)

    CONFIGURATION: ALGORITHM

    set_cfg bpt data_time

    Sets the date and time. :

    • 3-byte date as YYYYMMDD :

    • 3-byte time as HHMMSS Values are in decimal.

    Example: set_cfg bpt date_time 20200801 122848

    set_cfg bpt sys_bp

    Provides three measurement results of systolic blood pressure performed on a subject using a medically approved device for calibration. Values are in decimal. Deprecated

    set_cfg bpt dia_bp

    Provides three measurement results of diastolic blood pressure performed on a subject using a medically approved device for calibration. Values are in decimal. Deprecated

    set_cfg bpt sys_dia

    Provides the cal_index for mult-point calibration and cuff reference measurement results of systolic and diastolic blood pressure performed on a subject using a medically approved device for calibration. Values are in decimal.

    set_cfg bpt spo2_coefs

    get_cfg bpt spo2_coefs

    Provides SpO2 calibration coefficients A, B, and C as described in the MAX32664D Quick Start Guide. , , and are space separated 32-bit signed integer values, equal to 105 x measured float calibration coefficient A, B, and C. Values are hexadecimals.

    set_cfg bpt cal_index

    get_cfg bpt cal_index

    Provides the cal_index when restoring the user calibration vector. Issue this command before the set_cfg bpt cal_result command. Range is 0 to 4. Values are in decimal.

    get_cfg bpt cal_result

    set_cfg bpt cal_result

    Reads/Writes the result of user calibration as a 512-byte calibration vector .

    STREAMING RELATED COMMANDS:

    read bpt 0 Starts streaming for calibration process on a subject after providing calibration systolic and diastolic blood pressure of the subject as described above. Stops when the progress reaches 100%. Use get_format bpt 0 format.

    read bpt 1 Starts streaming for measuring blood pressure, SpO2, and heart rate. Stops when the progress reaches 100%. Use get_format bpt 1 format.

    https://www.maximintegrated.com/en/app-notes/index.mvp/id/6921

  • Maxim Integrated Page 19 of 19

    Revision History

    REVISION NUMBER

    REVISION DATE

    DESCRIPTION PAGES

    CHANGED

    0 10/19 Initial release —

    1 7/20 Updated Tables 1, 3, 5, and 6. Updated section 2, 3.4. 1-8, 10-12, 14-

    18

    ©2019-20 by Maxim Integrated Products, Inc. All rights reserved. Information in this publication concerning the devices, applications, or technology described is intended to suggest possible uses and may be superseded. MAXIM INTEGRATED PRODUCTS, INC. DOES NOT ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACY OF THE INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED IN THIS DOCUMENT. MAXIM ALSO DOES NOT ASSUME LIABILITY FOR INTELLECTUAL PROPERTY INFRINGEMENT RELATED IN ANY MANNER TO USE OF INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED HEREIN OR OTHERWISE. The information contained within this document has been verified according to the general principles of electrical and mechanical engineering or registered trademarks of Maxim Integrated Products, Inc. All other product or service names are the property of their respective owners.