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:
phonemacro
Date:
Fri Feb 05 01:59:25 2021 +0000
Revision:
14:3fdc09d9017b
Parent:
8:0f55f59ca341
Remove code for EventStats irq_evt - it no longer compiles on mBed

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Shaun Kelsey 0:da5f5b56060a 1 /*******************************************************************************
Shaun Kelsey 0:da5f5b56060a 2 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
Shaun Kelsey 0:da5f5b56060a 3 *
Shaun Kelsey 0:da5f5b56060a 4 * Permission is hereby granted, free of charge, to any person obtaining a
Shaun Kelsey 0:da5f5b56060a 5 * copy of this software and associated documentation files (the "Software"),
Shaun Kelsey 0:da5f5b56060a 6 * to deal in the Software without restriction, including without limitation
Shaun Kelsey 0:da5f5b56060a 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Shaun Kelsey 0:da5f5b56060a 8 * and/or sell copies of the Software, and to permit persons to whom the
Shaun Kelsey 0:da5f5b56060a 9 * Software is furnished to do so, subject to the following conditions:
Shaun Kelsey 0:da5f5b56060a 10 *
Shaun Kelsey 0:da5f5b56060a 11 * The above copyright notice and this permission notice shall be included
Shaun Kelsey 0:da5f5b56060a 12 * in all copies or substantial portions of the Software.
Shaun Kelsey 0:da5f5b56060a 13 *
Shaun Kelsey 0:da5f5b56060a 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Shaun Kelsey 0:da5f5b56060a 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Shaun Kelsey 0:da5f5b56060a 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Shaun Kelsey 0:da5f5b56060a 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
Shaun Kelsey 0:da5f5b56060a 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
Shaun Kelsey 0:da5f5b56060a 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
Shaun Kelsey 0:da5f5b56060a 20 * OTHER DEALINGS IN THE SOFTWARE.
Shaun Kelsey 0:da5f5b56060a 21 *
Shaun Kelsey 0:da5f5b56060a 22 * Except as contained in this notice, the name of Maxim Integrated
Shaun Kelsey 0:da5f5b56060a 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
Shaun Kelsey 0:da5f5b56060a 24 * Products, Inc. Branding Policy.
Shaun Kelsey 0:da5f5b56060a 25 *
Shaun Kelsey 0:da5f5b56060a 26 * The mere transfer of this software does not imply any licenses
Shaun Kelsey 0:da5f5b56060a 27 * of trade secrets, proprietary technology, copyrights, patents,
Shaun Kelsey 0:da5f5b56060a 28 * trademarks, maskwork rights, or any other form of intellectual
Shaun Kelsey 0:da5f5b56060a 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
Shaun Kelsey 0:da5f5b56060a 30 * ownership rights.
Shaun Kelsey 0:da5f5b56060a 31 *******************************************************************************
Shaun Kelsey 0:da5f5b56060a 32 */
Shaun Kelsey 0:da5f5b56060a 33 #ifndef _PERIPHERALS_H_
Shaun Kelsey 0:da5f5b56060a 34 #define _PERIPHERALS_H_
Shaun Kelsey 0:da5f5b56060a 35
Shaun Kelsey 0:da5f5b56060a 36 #include "mbed.h"
Shaun Kelsey 0:da5f5b56060a 37 #include "USBSerial.h"
Shaun Kelsey 0:da5f5b56060a 38
Shaun Kelsey 0:da5f5b56060a 39 #ifdef ECG_MAX30001
Shaun Kelsey 0:da5f5b56060a 40 #include "MAX30001.h"
Shaun Kelsey 0:da5f5b56060a 41 #include "MAX30001_Helper.h"
Shaun Kelsey 0:da5f5b56060a 42 #endif
Shaun Kelsey 0:da5f5b56060a 43
keremsahin 8:0f55f59ca341 44 #define pr_USB(fmt, args...) if(Peripherals::usbSerial() != NULL)\
keremsahin 8:0f55f59ca341 45 Peripherals::usbSerial()->printf("\r\n[" fmt "[(%s:%d)\r\n", ##args, __func__, __LINE__)
keremsahin 8:0f55f59ca341 46
keremsahin 8:0f55f59ca341 47 #define pr_SERIAL(fmt, args...) printf("\r\n[" fmt "[(%s:%d)\r\n", ##args, __func__, __LINE__)
keremsahin 8:0f55f59ca341 48
Shaun Kelsey 0:da5f5b56060a 49 #define pr_err(fmt, args...) if(Peripherals::usbSerial() != NULL)\
Shaun Kelsey 0:da5f5b56060a 50 Peripherals::usbSerial()->printf("\r\n[" fmt "[(%s:%d)\r\n", ##args, __func__, __LINE__)
Shaun Kelsey 0:da5f5b56060a 51
Shaun Kelsey 0:da5f5b56060a 52 #ifdef SHOW_DEBUG_MSGS
Shaun Kelsey 0:da5f5b56060a 53 #define pr_debug(fmt, args...) if(Peripherals::usbSerial() != NULL)\
Shaun Kelsey 0:da5f5b56060a 54 Peripherals::usbSerial()->printf("\r\n[" fmt "[(%s:%d)\r\n", ##args, __func__, __LINE__)
Shaun Kelsey 0:da5f5b56060a 55 #else
Shaun Kelsey 0:da5f5b56060a 56 #define pr_debug(fmt, args...)
Shaun Kelsey 0:da5f5b56060a 57 #endif
Shaun Kelsey 0:da5f5b56060a 58
Shaun Kelsey 0:da5f5b56060a 59 #ifdef SHOW_INFO_MSGS
Shaun Kelsey 0:da5f5b56060a 60 #define pr_info(fmt, args...) if(Peripherals::usbSerial() != NULL)\
Shaun Kelsey 0:da5f5b56060a 61 Peripherals::usbSerial()->printf("[" fmt, ##args)
Shaun Kelsey 0:da5f5b56060a 62 #else
Shaun Kelsey 0:da5f5b56060a 63 #define pr_info(fmt, args...)
Shaun Kelsey 0:da5f5b56060a 64 #endif
Shaun Kelsey 0:da5f5b56060a 65
Shaun Kelsey 0:da5f5b56060a 66 /**
Shaun Kelsey 0:da5f5b56060a 67 * This static class is used as a central locatoin for all devices on the HSP platform
Shaun Kelsey 0:da5f5b56060a 68 * it gives (in-effect) a singleton interface for each device so that anywhere in code
Shaun Kelsey 0:da5f5b56060a 69 * one can reference on of these devices
Shaun Kelsey 0:da5f5b56060a 70 */
Shaun Kelsey 0:da5f5b56060a 71 class Peripherals {
Shaun Kelsey 0:da5f5b56060a 72 public:
Shaun Kelsey 0:da5f5b56060a 73 static USBSerial *setUSBSerial(USBSerial * device) { mUSBSerial = device; return device; }
Shaun Kelsey 0:da5f5b56060a 74 static USBSerial *usbSerial(void) { return mUSBSerial; }
Shaun Kelsey 0:da5f5b56060a 75
Shaun Kelsey 0:da5f5b56060a 76 #ifdef ECG_MAX30001
Shaun Kelsey 0:da5f5b56060a 77 static MAX30001 *max30001(void) { return mMAX30001; }
Shaun Kelsey 0:da5f5b56060a 78 static MAX30001 *setMAX30001(MAX30001 *device) { mMAX30001 = device; return device; }
Shaun Kelsey 0:da5f5b56060a 79
Shaun Kelsey 0:da5f5b56060a 80 static MAX30001_Helper *max30001Helper(void) { return mMAX30001_Helper; }
Shaun Kelsey 0:da5f5b56060a 81 static MAX30001_Helper *setMAX30001Helper(MAX30001_Helper *device) { mMAX30001_Helper = device; return device; }
Shaun Kelsey 0:da5f5b56060a 82 #endif
Shaun Kelsey 0:da5f5b56060a 83
Shaun Kelsey 0:da5f5b56060a 84 private:
Shaun Kelsey 0:da5f5b56060a 85 static USBSerial *mUSBSerial;
Shaun Kelsey 0:da5f5b56060a 86 #ifdef ECG_MAX30001
Shaun Kelsey 0:da5f5b56060a 87 static MAX30001 *mMAX30001;
Shaun Kelsey 0:da5f5b56060a 88 static MAX30001_Helper *mMAX30001_Helper;
Shaun Kelsey 0:da5f5b56060a 89 #endif
Shaun Kelsey 0:da5f5b56060a 90 };
Shaun Kelsey 0:da5f5b56060a 91
Shaun Kelsey 0:da5f5b56060a 92 #endif // _PERIPHERALS_H_