
Maxim Integrated
Page 22 of 24
3.3 Algorithm Mode
In this mode, the WHRM algorithm is enabled, and AEC and SCD are on. Heart rate, confidence
level, RR value, and activity class are reported. The sequence of commands to run WHRM is
listed in
Note:
To run the algorithm in
AGC-only mode
(AEC is enabled, but it behaves as AGC), send
the additional command shown in step 1.5.
Table 14. Host Commands—WHRM 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 and starts algorithm using the following commands:
1.1
AA 10 00 03
Set output mode to algorithm data.
AB 00
1.2
AA 10 01 05
Set sensor hub interrupt threshold.
1.3
AA 44 00* 01 00
Enable AFE (e.g., MAX86141) * with sensor
hub samples.
AB 00
1.4
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.5
Optional: Any command to change the algorithm settings and configurations (
) from
default should appear here BEFORE enabling the algorithm.
Example: To run algorithm in AGC-Only mode (no AEC), set motion magnitude threshold to zero:
AA 50 02 0F 00 00
1.6
AA 52 02 01
Enable WHRM algorithm.
AB 00
R
EA
D
IN
G
S
A
M
PL
ES
Host reads samples upon receiving MFIO interrupt by MAX32664C (repeat 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
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.