
Maxim Integrated
Page 15 of 24
2.3 Algorithm Mode
In Algorithm mode, WSpO
2
algorithm is enabled to calculate R value, SpO
2
and confidence level.
AGC is enabled in this mode and algorithm runs in one-shot mode by default. In one-shot mode,
the progress is reported as %. You may change it to continuous mode as shown below. If signal
quality is low, a LowSNR flag will be set. Excessive motion is also reported with a flag. The
sequence of commands is shown in
Table 8. Host Commands—WSpO
2
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 using the following commands:
1.1
AA 50 05 00
[FFE69196000CB7350098
9680]*
This step is ONLY needed if non-default calibration
coefficients are used to write SpO
2
calibration
coefficients as derived according to [1]. Provided
coefficients are for example only*.
AB 00
1.2
AA 10 00 03
Set output mode to algorithm data
(streamed data will include PPG, accelerometer,
and algorithm data. But only PPG and
accelerometer data are needed for raw data
collection and 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 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 algorithm run mode to continuous (default is
1.7
Optional: Any command to change the algorithm settings and configurations (
) from default
should appear here BEFORE enabling algorithm.
1.8
AA 52 05 01
Enable WSpO
2
algorithm.
AB 00
R
EA
D
IN
G
S
A
M
PL
ES
Host reads samples upon receiving MFIO interrupt by 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 (33
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 05 00
Disable WSpO2 algorithm.
AB 00
*Provided 12-byte calibration data is an example. Actual data should be derived as described in
[1].
**Provided indexes are examples for sensors such as the MAX86141 AFE or KX122
accelerometer.