Maxim Integrated
Page 18 of 24
Table 10. Host Commands—WHRM Raw Data with Algorithm Mode
#
HOST COMMAND
(HEX)
COMMAND DESCRIPTION
RESPONSE
(HEX)
ST
A
R
T
A
LG
O
R
IT
H
M
Host initializes the MAX32664C in Algorithm mode with AEC and SCD off and starts algorithm using
the following commands:
1.1
AA 50 02 0B 00
Turn off algorithm AEC.
AB 00
1.2
AA 50 02 0C 00
Turn off algorithm SCD.
AB 00
1.3
AA 10 00 03
Set output mode to algorithm data.
AB 00
1.4
AA 10 01 05
Set sensor hub interrupt threshold.
1.5
AA 44 00* 01 00
Enable AFE (e.g., MAX86141)* with sensor
hub samples.
AB 00
1.6
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.7
Optional: Any command to change the algorithm settings and configurations (
) from
default should appear here BEFORE enabling algorithm.
1.8
AA 52 02 01
Enable WHRM algorithm.
AB 00
Wait for 100ms before sending next command. Any command to change sensor registers should
appear AFTER enabling algorithm or they will be 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 MAX86141 LED1 current to half of full
scale. Reduce [7F] if signal is saturated.
AB 00
1.10 AA 40 00 12 18
Set sample rate of the MAX86141 to 100Hz
with 1 sample averaging.
AB 00
R
EA
D
IN
G
S
A
M
PL
ES
Host reads samples upon receiving MFIO interrupt by the MAX32664C (repeated as needed):
2.1
AA 00 00
Read sensor hub status byte:
Bit 0: Sensor comm error
Bits 1 and 2: Reserved
Bit 3: FIFO filled to threshold (DataRdyInt)
Bit 4: Output FIFO overflow (FifoOutOvrInt)
Bit 5: Input FIFO overflow (FifoInOverInt)
Bit 6: Sensor hub busy (DevBusy)
Bit 7: Reserved
If DataRdyInt is set, proceed to next step.
AB 00 08
2.2
AA 12 00
Get the number of samples (nn) in the FIFO.
AB 00 nn
2.3
AA 12 01
Read the data stored in the FIFO; nn samples
(30 bytes each) will be read. The format of
samples is shown in
AB 00
data_for_
nn_samples
ST
O
P
Host ends the procedure:
3.1
AA 44 00* 00
Disable AFE (e.g., MAX86141).*
AB 00
3.2
AA 44 04* 00
Disable accelerometer.*
AB 00
3.3
AA 52 02 00
Disable WHRM algorithm.
AB 00
*Provided indexes are examples for sensors such as the MAX86141 AFE or KX122
accelerometer.