background image

Maxim Integrated 

Page 6 of 24 

1.1 Communicating with MAX32664C 

A host should use the I

2

C bus to communicate with the MAX32664C (slave) using a series of 

commands. A generic write command includes the following fields: 

Slave_WriteAddress(1 byte)|Command_Family(1 byte)|Command_Index(1 

byte)|Value(multiple bytes) 

A generic response includes the following fields: 

Slave_ReadAddress(1 byte)|Status(1 byte)|Value (multiple bytes) 
Slave_WriteAddress

 and 

Slave_ReadAddress

 are set to 0xAA and 0xAB, respectively. 

The read status byte is an indicator of success (0x00) or failure as shown i

Table 1

. 

Table 1. Read Status Byte Value 

STATUS BYTE 

VALUE 

DESCRIPTION 

0x00 

SUCCESS. The write transaction was successful. 

0x01 

ERR_UNAVAIL_CMD. Illegal Family Byte and/or Command Byte was used. 

0x02 

ERR_UNAVAIL_FUNC. This function is not implemented. 

0x03 

ERR_DATA_FORMAT. Incorrect number of bytes sent for the requested Family Byte. 

0x04 

ERR_INPUT_VALUE. Illegal configuration value was attempted to be set. 

0x05 

ERR_TRY_AGAIN. Device is busy. Try again. 

0x80 

ERR_BTLDR_GENERAL. General error while receiving/flashing a page during the 

bootloader sequence. 

0x81 

ERR_BTLDR_CHECKSUM. Checksum error while decrypting/checking page data. 

0x82 

ERR_BTLDR_AUTH. Authorization error. 

0x83 

ERR_BTLDR_INVALID_APP. Application not valid. 

0xFF 

ERR_UNKNOWN. Unknown Error. 

 
This document provides examples of commands for  establishing  communication with the 

MAX32664B. For a complete list of commands and instructions for the I

2

C interface, see the 

MAX32664 User Guide

. 

 
 

 

Summary of Contents for MAX32664C

Page 1: ...ed for measurement of SpO2 and heart rate Combined with the MAX86141 optical sensor and a 3 axis accelerometer it provides the sensor s raw data as well as calculated SpO2 or heart rate data to a host...

Page 2: ...llection in Algorithm Mode 11 2 2 2 Pure Raw Data Collection 13 2 3 Algorithm Mode 15 2 3 1 Algorithm Settings and Configurations 16 3 Measuring Heart Rate on Wrist WHRM 17 3 1 Setup 17 3 2 Raw Data C...

Page 3: ...Table 6 Host Commands WSpO2 Pure Raw Data 13 Table 7 Format of Received Samples WSpO2 in Pure Raw Mode 14 Table 8 Host Commands WSpO2 Algorithm Mode 15 Table 9 Configurations and Settings WSpO2 16 Ta...

Page 4: ...to properly capture and calculate the data this solution requires an accelerometer The MAX32664C firmware includes the required drivers for the Kionix KX122 accelerometer which is wired together with...

Page 5: ...o interrupt the host for I2C communication The MAX32664C interfaces to the MAX86141 optical sensor through the SPI bus An accelerometer is mandatory for heart rate monitoring A KX122 accelerometer can...

Page 6: ...The write transaction was successful 0x01 ERR_UNAVAIL_CMD Illegal Family Byte and or Command Byte was used 0x02 ERR_UNAVAIL_FUNC This function is not implemented 0x03 ERR_DATA_FORMAT Incorrect number...

Page 7: ...fore starting the algorithm as described later in this document Alternatively a host side accelerometer can be used In this case the host is required to use a 3 axis accelerometer at 25Hz sampling and...

Page 8: ...d they need to be loaded to the MAX32664C every time prior to starting the algorithm But first they are required to be converted to 32 bit integer format using the following Aint32 round 105 x a Bint3...

Page 9: ...ettings and configurations Table 9 from default should appear here BEFORE enabling algorithm 1 7 AA 52 05 01 Enable WSpO2 algorithm AB 00 READING SAMPLES Host reads samples upon receiving MFIO interru...

Page 10: ...celerometer 6 Bytes 18 accelX 2 Two s complement LSB 0 001g 20 accelY 2 Two s complement LSB 0 001g 22 accelZ 2 Two s complement LSB 0 001g SpO2 Algorithm 9 Bytes 24 R 2 10x calculated R value 26 Conf...

Page 11: ...other fields can be ignored AB 00 1 3 AA 10 01 05 Set sensor hub interrupt threshold AB 00 1 4 AA 44 00 01 00 Enable AFE e g MAX86141 with sensor hub samples AB 00 1 5 AA 44 04 01 00 if sensor hub ac...

Page 12: ...ored in the FIFO nn samples 33 bytes each will be read The format of samples is shown in Table 4 AB 00 data_for_ nn_samples STOP Host ends the procedure 3 1 AA 44 00 00 Disable AFE e g MAX86141 AB 00...

Page 13: ...ll scale Reduce 7F if signal is saturated AB 00 1 9 AA 40 00 25 7F Set MAX86141 LED3 red current to half of full scale Reduce 7F if signal is saturated AB 00 1 10 AA 40 00 2A 3C Set MAX86141 LEDs 2 an...

Page 14: ...ITEM NUMBER OF BYTES MSB FIRST DESCRIPTION MAX86141 PPG Data 18 Bytes 0 LED1 3 N A 3 LED2 3 N A 6 LED3 3 N A 9 LED4 3 Red LED counter 12 LED5 3 IR LED counter 15 LED6 3 N A Accelerometer 6 Bytes 18 a...

Page 15: ...AB 00 1 5 AA 44 04 01 00 if sensor hub accelerometer is used AA 44 04 01 01 if host accelerometer is used Enable accelerometer with sensor hub or host side accelerometer AB 00 1 6 AA 50 05 02 00 Set...

Page 16: ...rised of three 32 bit signed values 0xFFE69196 000CB735 00989680 0x01 Sampling rate Hz 0x00 100Hz 0x01 25Hz 0x01 0x02 Algorithm run mode 0x00 continuous 0x01 one shot 0x02 calibration to collect data...

Page 17: ...ct raw PPG samples There are two ways to accomplish this which are detailed as follows 3 2 1 Raw Data Collection in Algorithm Mode In Algorithm mode automatic exposure control AEC and skin contact det...

Page 18: ...overwritten By default WHRM sets the following AFE registers Sample rate is 100Hz 4 sample averaging Integration time 117 s ADC 1 and 2 range 32 A LED 1 full range 124mA 1 9 AA 40 00 23 7F Set the MA...

Page 19: ...6 LED3 3 N A 9 LED4 3 Green 2 counter 12 LED5 3 N A 15 LED6 3 N A Accelerometer 6 Bytes 18 accelX 2 Two s complement LSB 0 001g 20 accelY 2 Two s complement LSB 0 001g 22 accelZ 2 Two s complement LSB...

Page 20: ...ull scale Reduce 7F if signal is saturated AB 00 1 8 AA 40 00 2A 03 Set MAX86141 LED1 current full range 124mA AB 00 1 9 AA 40 00 20 21 Set MAX86141 LED sequence LED1 green LED2 IR AB 00 1 10 AA 40 00...

Page 21: ...EX DATA ITEM NUMBER OF BYTES MSB FIRST DESCRIPTION MAX86141 18 Bytes 0 LED1 3 Green 1 counter 3 LED2 3 N A 6 LED3 3 N A 9 LED4 3 Green 2 counter 12 LED5 3 N A 15 LED6 3 N A Accelerometer 6 Bytes 18 ac...

Page 22: ...ommand to change the algorithm settings and configurations Table 15 from default should appear here BEFORE enabling the algorithm Example To run algorithm in AGC Only mode no AEC set motion magnitude...

Page 23: ...RATION INDEX DESCRIPTION DEFAULT VALUE MSB FIRST 0x50 for write 0x51 for read 0x02 0x0B AEC algorithm enable 0x00 Disable 0x01 Enable 0x01 0x0C SCD enable 0x00 Disable 0x01 Enable 0x01 0x0D Adjusted t...

Page 24: ...SUME 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 INFRINGEME...

Reviews: