Host software for the MAXREFDES220 Heart Rate Monitor Smart Sensor. Hosted on the MAX32630FTHR.

Dependencies:   max32630fthr USBDevice

Fork of MAXREFDES220_HEART_RATE_MONITOR by Maxim Integrated

Finger Heart Rate Monitor and SpO2 Monitor

The MAXREFDES220 Smart Sensor FeatherWing board is a integrated solution for providing finger-based heart rate measurements and SpO2 (blood oxygen saturation). This evaluation board interfaces to the host computer using the I2C interface. Heart rate outpu is available in beats per minute (BPM) and SpO2 is reported in percentages.; the PPG (photoplethysmography) raw data is also available. The board has an MAX30101 chip which is a low power heart rate monitor with adjustable sample rates and adjustable LED currents. The low cost MAX32664 microcontroller is pre-flashed with C code for finger-based pulse rate and SpO2 monitoring. Bootloader software is included to allow for future algorithms or updates to the algorithm from Maxim Integrated.

Ordering information will be available soon.

Note: SpO2 values are not calibrated. Calibration should be performed using the final end product.

Warning

The MAXREFDES220 source code listed is dated and only compatible with the 1.2.8a.msbl. The latest sample host source code is available on the MAX32664 website.

MAXREFDES220 FeatherWing Pinout Connections

/media/uploads/phonemacro/maxrefdes220_pinouts_heart_rate_monitor.jpg

Committer:
Shaun Kelsey
Date:
Wed Apr 11 16:01:32 2018 -0700
Revision:
0:da5f5b56060a
Child:
1:7a55c0c7d6d9
Initial commit of Pegasus OS24 SmartSensor Host

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Shaun Kelsey 0:da5f5b56060a 1 STACK_SIZE=0x30000
Shaun Kelsey 0:da5f5b56060a 2 HEAP_SIZE=0x30000
Shaun Kelsey 0:da5f5b56060a 3
Shaun Kelsey 0:da5f5b56060a 4 PROJECT_PATH=$(realpath ./)
Shaun Kelsey 0:da5f5b56060a 5 PROJECT_NAME=$(shell basename $(realpath ./))
Shaun Kelsey 0:da5f5b56060a 6 PROJECT_BUILD_PATH=$(realpath BUILD/)
Shaun Kelsey 0:da5f5b56060a 7 PROJECT_TOOLS_PATH=$(realpath tools/)
Shaun Kelsey 0:da5f5b56060a 8 PROJECT_CONFIGS_PATH=$(realpath configs/)
Shaun Kelsey 0:da5f5b56060a 9 PROJECT_TOOLCHAIN=GCC_ARM
Shaun Kelsey 0:da5f5b56060a 10 PROJECT_SCM_BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
Shaun Kelsey 0:da5f5b56060a 11 PROJECT_SCM_HASH=$(shell git rev-parse HEAD)
Shaun Kelsey 0:da5f5b56060a 12 -include .config
Shaun Kelsey 0:da5f5b56060a 13
Shaun Kelsey 0:da5f5b56060a 14 ALGO_DIR = Algorithms/
Shaun Kelsey 0:da5f5b56060a 15 DRIVERS_DIR = Drivers/
Shaun Kelsey 0:da5f5b56060a 16 INTERFACES_DIR = Interfaces/
Shaun Kelsey 0:da5f5b56060a 17 SCOMMS_DIR = $(INTERFACES_DIR)/SensorComm/
Shaun Kelsey 0:da5f5b56060a 18 DSINT_DIR = $(INTERFACES_DIR)/DeviceStudio/
Shaun Kelsey 0:da5f5b56060a 19 SSCOMMS_DIR = $(SCOMMS_DIR)/SmartSensorComm/
Shaun Kelsey 0:da5f5b56060a 20 SSINT_DIR = $(INTERFACES_DIR)/SmartSensor/
Shaun Kelsey 0:da5f5b56060a 21 PLATFORMS_DIR = Platforms/
Shaun Kelsey 0:da5f5b56060a 22
Shaun Kelsey 0:da5f5b56060a 23 EXTERNAL_SOURCES += mbed-os
Shaun Kelsey 0:da5f5b56060a 24 EXTERNAL_SOURCES += $(DRIVERS_DIR)USBDevice
Shaun Kelsey 0:da5f5b56060a 25 PROJECT_SOURCES += $(wildcard *.cpp)
Shaun Kelsey 0:da5f5b56060a 26 PROJECT_SOURCES += $(wildcard *.h)
Shaun Kelsey 0:da5f5b56060a 27 PROJECT_SOURCES += $(SCOMMS_DIR)/SensorComm
Shaun Kelsey 0:da5f5b56060a 28 PROJECT_SOURCES += $(DSINT_DIR)
Shaun Kelsey 0:da5f5b56060a 29 PROJECT_SOURCES += $(DRIVERS_DIR)MaximSensor
Shaun Kelsey 0:da5f5b56060a 30 PROJECT_SOURCES += Utilities
Shaun Kelsey 0:da5f5b56060a 31
Shaun Kelsey 0:da5f5b56060a 32 CONFIG_FLAGS += PLATFORM_MAX32630FTHR
Shaun Kelsey 0:da5f5b56060a 33 CONFIG_PLATFORM_NAME=MAX32630FTHR
Shaun Kelsey 0:da5f5b56060a 34 EXTERNAL_SOURCES += $(PLATFORMS_DIR)max32630fthr
Shaun Kelsey 0:da5f5b56060a 35 CONFIG_FLAGS += MAXIM_PLATFORM_NAME=\"$(CONFIG_MAXIM_PLATFORM_NAME)\"
Shaun Kelsey 0:da5f5b56060a 36
Shaun Kelsey 0:da5f5b56060a 37
Shaun Kelsey 0:da5f5b56060a 38 ifeq ($(CONFIG_ENABLE_LED_STATUS), y)
Shaun Kelsey 0:da5f5b56060a 39 CONFIG_FLAGS += ENABLE_LED_STATUS
Shaun Kelsey 0:da5f5b56060a 40 endif
Shaun Kelsey 0:da5f5b56060a 41
Shaun Kelsey 0:da5f5b56060a 42 CONFIG_FLAGS += ENABLE_SMARTSENSOR
Shaun Kelsey 0:da5f5b56060a 43 PROJECT_SOURCES += $(SSINT_DIR)
Shaun Kelsey 0:da5f5b56060a 44
Shaun Kelsey 0:da5f5b56060a 45 CONFIG_FLAGS += ENABLE_SS_BOOTLOADER
Shaun Kelsey 0:da5f5b56060a 46 PROJECT_SOURCES += $(SSCOMMS_DIR)SSBootloader
Shaun Kelsey 0:da5f5b56060a 47
Shaun Kelsey 0:da5f5b56060a 48 CONFIG_FLAGS += ENABLE_SS_MAX30101
Shaun Kelsey 0:da5f5b56060a 49 PROJECT_SOURCES += $(SSCOMMS_DIR)SSMAX30101
Shaun Kelsey 0:da5f5b56060a 50
Shaun Kelsey 0:da5f5b56060a 51 ifeq ($(CONFIG_ASCII_COMM), y)
Shaun Kelsey 0:da5f5b56060a 52 CONFIG_FLAGS += ASCII_COMM
Shaun Kelsey 0:da5f5b56060a 53 endif
Shaun Kelsey 0:da5f5b56060a 54
Shaun Kelsey 0:da5f5b56060a 55 ifeq ($(CONFIG_SHOW_DEBUG_MSGS), y)
Shaun Kelsey 0:da5f5b56060a 56 CONFIG_FLAGS += SHOW_DEBUG_MSGS
Shaun Kelsey 0:da5f5b56060a 57 endif
Shaun Kelsey 0:da5f5b56060a 58 ifeq ($(CONFIG_SHOW_INFO_MSGS), y)
Shaun Kelsey 0:da5f5b56060a 59 CONFIG_FLAGS += SHOW_INFO_MSGS
Shaun Kelsey 0:da5f5b56060a 60 endif
Shaun Kelsey 0:da5f5b56060a 61
Shaun Kelsey 0:da5f5b56060a 62 ifeq ($(V), 1)
Shaun Kelsey 0:da5f5b56060a 63 BUILD_VERBOSE = -v
Shaun Kelsey 0:da5f5b56060a 64 endif
Shaun Kelsey 0:da5f5b56060a 65
Shaun Kelsey 0:da5f5b56060a 66 SRC_ARGS += $(addprefix --source $(PROJECT_PATH)/, $(EXTERNAL_SOURCES))
Shaun Kelsey 0:da5f5b56060a 67 SRC_ARGS += $(addprefix --source $(PROJECT_PATH)/, $(PROJECT_SOURCES))
Shaun Kelsey 0:da5f5b56060a 68 CFG_ARGS = $(addprefix -D, $(CONFIG_FLAGS))
Shaun Kelsey 0:da5f5b56060a 69
Shaun Kelsey 0:da5f5b56060a 70 $(info SELECTED_CONFIG=$(CONFIG_CONFIG_NAME))
Shaun Kelsey 0:da5f5b56060a 71 $(info CONFIG_PLATFORM_NAME=$(CONFIG_PLATFORM_NAME) CONFIG_MAXIM_PLATFORM_NAME=$(CONFIG_MAXIM_PLATFORM_NAME) CONFIG_FLAGS=$(CONFIG_FLAGS))
Shaun Kelsey 0:da5f5b56060a 72 $(info PROJECT_SOURCES=$(PROJECT_SOURCES))
Shaun Kelsey 0:da5f5b56060a 73 $(info EXTERNAL_SOURCES=$(EXTERNAL_SOURCES))
Shaun Kelsey 0:da5f5b56060a 74 $(info PROJECT_SCM=$(PROJECT_SCM_BRANCH) ($(PROJECT_SCM_HASH)))
Shaun Kelsey 0:da5f5b56060a 75
Shaun Kelsey 0:da5f5b56060a 76
Shaun Kelsey 0:da5f5b56060a 77 ## BEGIN MAKEFILE RULES ##
Shaun Kelsey 0:da5f5b56060a 78 all: pre_build
Shaun Kelsey 0:da5f5b56060a 79 @if [ -f $(CONFIG_CONFIG_NAME) ]; then \
Shaun Kelsey 0:da5f5b56060a 80 printf "NO CONFIG SELECTED!\n"; \
Shaun Kelsey 0:da5f5b56060a 81 exit 1; \
Shaun Kelsey 0:da5f5b56060a 82 fi;
Shaun Kelsey 0:da5f5b56060a 83 @if [ ! -f .checkout ]; then \
Shaun Kelsey 0:da5f5b56060a 84 $(MAKE) checkout ; \
Shaun Kelsey 0:da5f5b56060a 85 fi;
Shaun Kelsey 0:da5f5b56060a 86 mbed compile -t $(PROJECT_TOOLCHAIN) -m $(CONFIG_PLATFORM_NAME) -D__STACK_SIZE=$(STACK_SIZE) -D__HEAP_SIZE=$(HEAP_SIZE) $(BUILD_VERBOSE) $(CFG_ARGS) $(SRC_ARGS)
Shaun Kelsey 0:da5f5b56060a 87 debug_build:
Shaun Kelsey 0:da5f5b56060a 88 mbed compile -t $(PROJECT_TOOLCHAIN) -m $(CONFIG_PLATFORM_NAME) -D__STACK_SIZE=$(STACK_SIZE) -D__HEAP_SIZE=$(HEAP_SIZE) $(BUILD_VERBOSE) $(CFG_ARGS) $(SRC_ARGS) --profile $(PROJECT_PATH)/debug_oldmbedos.json
Shaun Kelsey 0:da5f5b56060a 89
Shaun Kelsey 0:da5f5b56060a 90 clean_build:
Shaun Kelsey 0:da5f5b56060a 91 mbed compile -t $(PROJECT_TOOLCHAIN) -m $(CONFIG_PLATFORM_NAME) -D__STACK_SIZE=$(STACK_SIZE) -D__HEAP_SIZE=$(HEAP_SIZE) -c $(BUILD_VERBOSE) $(CFG_ARGS) $(SRC_ARGS)
Shaun Kelsey 0:da5f5b56060a 92
Shaun Kelsey 0:da5f5b56060a 93 werror_build:
Shaun Kelsey 0:da5f5b56060a 94 mbed compile -t $(PROJECT_TOOLCHAIN) -m $(CONFIG_PLATFORM_NAME) -D__STACK_SIZE=$(STACK_SIZE) -D__HEAP_SIZE=$(HEAP_SIZE) -c $(BUILD_VERBOSE) $(CFG_ARGS) $(SRC_ARGS) --profile $(PROJECT_PATH)/werror_build_profile.json
Shaun Kelsey 0:da5f5b56060a 95
Shaun Kelsey 0:da5f5b56060a 96 clean:
Shaun Kelsey 0:da5f5b56060a 97 rm -rf $(PROJECT_BUILD_PATH)
Shaun Kelsey 0:da5f5b56060a 98
Shaun Kelsey 0:da5f5b56060a 99 co: checkout
Shaun Kelsey 0:da5f5b56060a 100
Shaun Kelsey 0:da5f5b56060a 101 checkout:
Shaun Kelsey 0:da5f5b56060a 102 @echo "Downloading libraries"
Shaun Kelsey 0:da5f5b56060a 103 mbed deploy
Shaun Kelsey 0:da5f5b56060a 104 @touch .$@
Shaun Kelsey 0:da5f5b56060a 105
Shaun Kelsey 0:da5f5b56060a 106 doxygen:
Shaun Kelsey 0:da5f5b56060a 107 mkdir -p $(PROJECT_BUILD_PATH)
Shaun Kelsey 0:da5f5b56060a 108 export PROJECT_SOURCES="$(PROJECT_SOURCES)"; \
Shaun Kelsey 0:da5f5b56060a 109 export PROJECT_SCM_HASH="$(PROJECT_SCM_HASH)"; \
Shaun Kelsey 0:da5f5b56060a 110 doxygen doxygen.conf
Shaun Kelsey 0:da5f5b56060a 111 start $(PROJECT_BUILD_PATH)/doc/html/index.html
Shaun Kelsey 0:da5f5b56060a 112
Shaun Kelsey 0:da5f5b56060a 113 pre_build:
Shaun Kelsey 0:da5f5b56060a 114 @echo "#ifndef __BUILD_VERSION_H__" > build_version.h
Shaun Kelsey 0:da5f5b56060a 115 @echo "#define __BUILD_VERSION_H__" >> build_version.h
Shaun Kelsey 0:da5f5b56060a 116 @echo "#define BUILD_SOURCE_BRANCH \"$(PROJECT_SCM_BRANCH)\"" >> build_version.h
Shaun Kelsey 0:da5f5b56060a 117 @echo "#define BUILD_SOURCE_HASH \"$(PROJECT_SCM_HASH)\"" >> build_version.h
Shaun Kelsey 0:da5f5b56060a 118 @echo "#endif" >> build_version.h
Shaun Kelsey 0:da5f5b56060a 119 ## END MAKEFILE RULES ##
Shaun Kelsey 0:da5f5b56060a 120