Maxim Integrated


Maxim's microcontrollers provide low-power, efficient, and secure solutions for challenging embedded applications.

You are viewing an older revision! See the latest version

HSP RPC Interface Documentation

Table of Contents

    RPC DOCUMENTATION

    Overview

    RPC Commands are in the format: /<Object name>/<Method name> <Arguments separated by spaces><CR LF> All arguments are expected to be in a hexadecimal format unless otherwise noted. The return data is delimited by spaces and are in hexadecimal format unless otherwise noted. The return data is terminated by a <CR LF>

    System

    /System/ReadVer

    Returns the version string of the FW that is currently running Example: /System/ReadVer The command returns a version string similar to this: "HSP FW Version 3.0.0 10/14/16"

    BMP280

    /BMP280/InitStart sample_rate

    Start the polling process for the BMP280

    ParameterDescription
    sample_rateNumber of seconds between each BMP280 sample

    I2c

    /I2c/WriteRead instance slaveAddress writeNumber dataToWrite readNumber

    Command allows you to write and read generic I2c commands using a given I2c instance master

    ParameterDescription
    instanceThe I2c master on the Nimitz to use
    slaveAddressSlave address to use when communicating
    writeNumberThe number of bytes to write
    dataToWriteA series of space separated hex values that are to be written
    readNumberThe number of bytes to read may be 0 if reading is not needed

    Example: /I2c/WriteRead 1 A0 3 11 22 33 2 This performs an I2c write and read using instance 1, slave address A0, and writes 3 bytes, the 3 bytes that are written are 11 22 33, 2 bytes are meant to be read after the write

    Led

    /Led/Blink mS

    Start blinking the HSP onboard LED

    ParameterDescription
    mSBlink using a mS period

    /Led/Pattern pattern

    Rotate a 32-bit pattern through the LED so that specific blink patterns can be obtained

    ParameterDescription
    patternA 32-bit pattern to rotate through

    /Led/Off

    Turn off the HSP onboard LED

    /Led/On

    Turn on the HSP onboard LED

    LIS2DH

    /LIS2DH/InitStart

    Starts streaming interrupts from the LIS2DH device

    /LIS2DH/ReadReg address

    Reads a register

    ParameterDescription
    addressRegister address to read from

    /LIS2DH/Stop

    Stop the interrupts within the LIS2DH

    /LIS2DH/WriteReg address data

    Write a register

    ParameterDescription
    addressRegister address to read from
    dataData to write

    Logging

    /Logging/AppendMissionCmd missionString

    Specify a RPC command that is part of a mission

    /Logging/EndMissionDefine

    RPC command that indicated the end of defining a mission

    /Logging/EraseMission

    Erase the mission in flash

    /Logging/EraseWrittenSectors

    Erase the datalog in flash, this erases all of the datalog that has been written to the flash

    /Logging/GetLastWrittenPage

    Returns the last page that has been written to flash, this call searchs until it finds an empty flash page

    /Logging/ReadMission

    Read the mission from flash

    /Logging/Start

    Starts a datalogging session into flash, allows the ability to start datalogging via RPC call

    /Logging/StartLoggingFlash

    Start logging data to flash

    /Logging/StartLoggingUsb

    Start streaming data through USB

    /Logging/StartMissionDefine

    A command to send when you are starting to define a mission

    /Logging/WriteMission

    Write the described mission to flash

    MAX30001

    /MAX30001/BIOZ_InitStart En_bioz Openp Openn Calp_sel Caln_sel CG_mode B_fit Rate Ahpf Ext_rbias Gain Dhpf Dlpf Fcgen Cgmon Cgmag Phoff

    Start BiOZ interrupts with the following parameters For the in depth meaning of these parameters please refer to the MAX30001 API document

    ParameterDescription
    En_biozBIOZ Channel Enable <CNFG_GEN register>
    OpenpOpen the BIP Input Switch <CNFG_BMUX register>
    OpennOpen the BIN Input Switch <CNFG_BMUX register>
    Calp_selBIP Calibration Selection <CNFG_BMUX register>
    Caln_selBIN Calibration Selection <CNFG_BMUX register>
    CG_modeBIOZ Current Generator Mode Selection <CNFG_BMUX register>
    B_fitBIOZ FIFO Interrupt Threshold (issues BINT based on number of unread FIFO records) <MNGR_INT register>
    RateBIOZ Data Rate <CNFG_BIOZ register>
    AhpfBIOZ/PACE Channel Analog High Pass Filter Cutoff Frequency and Bypass <CNFG_BIOZ register>
    Ext_rbiasExternal Resistor Bias Enable <CNFG_BIOZ register>
    GainBIOZ Channel Gain Setting <CNFG_BIOZ register>
    DhpfBIOZ Channel Digital High Pass Filter Cutoff Frequency <CNFG_BIOZ register>
    DlpfBIOZ Channel Digital Low Pass Filter Cutoff Frequency <CNFG_BIOZ register>
    FcgenBIOZ Current Generator Modulation Frequency <CNFG_BIOZ register>
    CgmonBIOZ Current Generator Monitor <CNFG_BIOZ register>
    CgmagBIOZ Current Generator Magnitude <CNFG_BIOZ register>
    PhoffBIOZ Current Generator Modulation Phase Offset <CNFG_BIOZ register>

    /MAX30001/CAL_InitStart En_Vcal Vmode Vmag Fcal Thigh Fifty

    Start the CAL signal within the MAX30001 device For the in depth meaning of these parameters please refer to the MAX30001 API document

    ParameterDescription
    En_VcalCalibration Source (VCALP and VCALN) Enable
    VmodeCalibration Source Mode Selection
    VmagCalibration Source Magnitude Selection (VMAG)
    FcalCalibration Source Frequency Selection (FCAL)
    ThighCalibration Source Time High Selection
    FiftyCalibration Source Duty Cycle Mode Selection

    /MAX30001/ECG_InitStart En_ecg Openp Openn Pol Calp_sel Caln_sel E_fit Rate Gain Dhpf Dlpf

    Start the ECG interrupts For the in depth meaning of these parameters please refer to the MAX30001 API document

    ParameterDescription
    En_ecgECG Channel Enable <CNFG_GEN register="" bits>
    OpenpOpen the ECGN Input Switch (most often used for testing and calibration studies) <CNFG_EMUX register="" bits>
    OpennOpen the ECGN Input Switch (most often used for testing and calibration studies) <CNFG_EMUX register="" bits>
    Calp_selECGP Calibration Selection <CNFG_EMUX register="" bits>
    Caln_selECGN Calibration Selection <CNFG_EMUX register="" bits>
    E_fitECG FIFO Interrupt Threshold (issues EINT based on number of unread FIFO records) <CNFG_GEN register="" bits>
    Clr_rrintRTOR R Detect Interrupt (RRINT) Clear Behavior <CNFG_GEN register="" bits>
    RateECG Data Rate
    GainECG Channel Gain Setting
    DhpfECG Channel Digital High Pass Filter Cutoff Frequency
    DlpfECG Channel Digital Low Pass Filter Cutoff Frequency

    /MAX30001/ECGFast_Init Clr_Fast Fast Fast_Th

    Start ECG Fast mode interrupts and streaming For the in depth meaning of these parameters please refer to the MAX30001 API document

    ParameterDescription
    Clr_FastFAST MODE Interrupt Clear Behavior <MNGR_INT register>
    FastECG Channel Fast Recovery Mode Selection (ECG High Pass Filter Bypass) <MNGR_DYN register>
    Fast_ThAutomatic Fast Recovery Threshold

    /MAX30001/Enable_BIOZ_LeadON

    Enable BIOZ Lead ON For the in depth meaning of these parameters please refer to the MAX30001 API document

    /MAX30001/Enable_ECG_LeadON

    Enable the ECG LeadON For the in depth meaning of these parameters please refer to the MAX30001 API document

    /MAX30001/INT_assignment en_enint_loc en_eovf_loc en_fstint_loc en_dcloffint_loc en_bint_loc en_bovf_loc en_bover_loc en_bundr_loc en_bcgmon_loc en_pint_loc en_povf_loc en_pedge_loc en_lonint_loc en_rrint_loc en_samp_loc intb_Type int2b_Type

    Assign the interrupt assignment for the MAX30001 For the in depth meaning of these parameters please refer to the MAX30001 API document

    ParameterDescription
    en_enint_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_eovf_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_fstint_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_dcloffint_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_bint_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_bovf_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_bover_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_bundr_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_bcgmon_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_pint_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_povf_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_pedge_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_lonint_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_rrint_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    en_samp_locAll the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE
    intb_TypeINTB Port Type (EN_INT Selections).
    int2b_TypeINT2B Port Type (EN_INT2 Selections)

    /MAX30001/PACE_InitStart En_pace Clr_pedge Pol Gn_diff_off Gain Aout_lbw Aout Dacp Dacn

    Start PACE streaming and interrupts For the in depth meaning of these parameters please refer to the MAX30001 API document

    ParameterDescription
    En_pacePACE Channel Enable <CNFG_GEN register>
    Clr_pedgePACE Edge Detect Interrupt (PEDGE) Clear Behavior <MNGR_INT register>
    PolPACE Input Polarity Selection <CNFG_PACE register>
    Gn_diff_offPACE Differentiator Mode <CNFG_PACE register>
    GainPACE Channel Gain Selection <CNFG_PACE register>
    Aout_lbwPACE Analog Output Buffer Bandwidth Mode <CNFG_PACE register>
    AoutPACE Single Ended Analog Output Buffer Signal Monitoring Selection <CNFG_PACE register>
    Dacp(4bits): PACE Detector Positive Comparator Threshold <CNFG_PACE register>
    DacnPACE Detector Negative Comparator Threshold <CNFG_PACE register>

    /MAX30001/Rbias_FMSTR_Init En_rbias Rbias Rbiasp Rbiasn Fmstr

    Set up the Rbias of the MAX30001 For the in depth meaning of these parameters please refer to the MAX30001 API document

    ParameterDescription
    En_rbiasEnable and Select Resitive Lead Bias Mode
    RbiasResistive Bias Mode Value Selection
    RbiaspEnables Resistive Bias on Positive Input
    RbiasnEnables Resistive Bias on Negative Input
    FmstrSelects Master Clock Frequency

    /MAX30001/Read_LeadON

    Read the Lead ON ECG status For the in depth meaning of these parameters please refer to the MAX30001 API document

    /MAX30001/ReadReg address data

    Write data to the MAX30001

    ParameterDescription
    addressRegister address to write
    dataData to write

    /MAX30001/RtoR_InitStart En_rtor Wndw Gain Pavg Ptsf Hoff Ravg Rhsf Clr_rrint

    Start RtoR interrupts and streaming For the in depth meaning of these parameters please refer to the MAX30001 API document

    ParameterDescription
    En_rtorECG RTOR Detection Enable <RTOR1 register>
    GainR to R Window Averaging (Window Width = RTOR_WNDW[3:0]*8mS) <RTOR1 register>
    GainR to R Gain (where Gain = 2^RTOR_GAIN[3:0], plus an auto-scale option) <RTOR1 register>
    Pavg
    PtsfR to R Peak Averaging Weight Factor <RTOR1 register>
    HoffR to R minimum Hold Off <RTOR2 register>
    RavgR to R Interval Averaging Weight Factor <RTOR2 register>
    RhsfR to R Interval Hold Off Scaling Factor <RTOR2 register>
    Clr_rrintRTOR Detect Interrupt Clear behaviour <MNGR_INT register>

    /MAX30001/Start

    Start streaming MAX30001 data. The data streamed depends on the previous MAX30001 InitStart RPC commands.

    /MAX30001/StartTest

    Start the self test for the MAX30001, interrupts are verified using this test

    /MAX30001/Stop

    Stop streaming and interrupts of the MAX30001 device

    /MAX30001/Stop_BIOZ

    Stop BIOZ streaming and interrupts

    /MAX30001/Stop_Cal

    Stop MAX30001 Cal mode

    /MAX30001/Stop_ECG

    Stop ECG streaming and interrupts For the in depth meaning of these parameters please refer to the MAX30001 API document

    /MAX30001/Stop_PACE

    Stop PACE streaming and interrupts

    /MAX30001/Stop_RtoR

    Stop RtoR streaming and interrupts

    /MAX30001/WriteReg address data

    Write data to the MAX30001

    ParameterDescription
    addressRegister address to write
    dataData to write

    MAX30101

    /MAX30101/HRmode_Init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current accelRateParameter

    This function starts HR mode, streaming and interrupts For the in depth meaning of these parameters please refer to the MAX30101 API document

    ParameterDescription
    fifo_waterlevel_markcorresponds to SMP_AVE, in FIFO Configuration Register (0x08)
    sample_avgcorresponds to SMP_AVE, in FIFO Configuration Register (0x08)
    sample_ratecorresponds to SPO2_SR, IN SpO2 Configuration Register (0x0A)
    pulse_widthcorresponds to LED_PW in SpO2 Configuration Register(0x0A)
    red_led_currentcorresponds to LED1_PA register (0x0C). Please see data sheet for values
    accelRateParametercorresponds to the rate register of the LIS2DH

    /MAX30101/HRmode_InitStart fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current

    MAX30101 is put in HR mode, inits and starts interrupts For the in depth meaning of these parameters please refer to the MAX30101 API document

    ParameterDescription
    fifo_waterlevel_markcorresponds to SMP_AVE, in FIFO Configuration Register (0x08)
    sample_avgcorresponds to SMP_AVE, in FIFO Configuration Register (0x08)
    sample_ratecorresponds to SPO2_SR, IN SpO2 Configuration Register (0x0A)
    pulse_widthcorresponds to LED_PW in SpO2 Configuration Register(0x0A)
    red_led_currentcorresponds to LED1_PA register (0x0C). Please see data sheet for values

    /MAX30101/HRmode_stop

    Stops streaming and interrupts

    /MAX30101/Multimode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current green_led_current slot_1 slot_2 slot_3 slot_4 accelRateParameter

    This function sets up for the SpO2 mode. For the in depth meaning of these parameters please refer to the MAX30101 API document

    ParameterDescription
    fifo_waterlevel_markcorresponds to FIFO_A_FULL, In FIFO Configuration Register (0x08)
    sample_avgcorresponds to SMP_AVE, in FIFO Configuration Register (0x08)
    sample_ratecorresponds to SPO2_SR, IN SpO2 Configuration Register (0x0A)
    pulse_widthcorresponds to LED_PW in SpO2 Configuration register(0x0A)
    red_led_currentcorresponds to LED1_PA register (0x0C). Please see data sheet for values
    ir_led_currentcorresponds to LED2_PA register (0x0D). Please see data sheet for values
    green_led_currentcorresponds to LED3_PA register (0x0E). Please see data sheet for values
    slot_1corresponds to Multi-LED Mode control Registers (0x11-0x12).
    slot_2corresponds to Multi-LED Mode control Registers (0x11-0x12).
    slot_3corresponds to Multi-LED Mode control Registers (0x11-0x12).
    slot_4corresponds to Multi-LED Mode control Registers (0x11-0x12).
    accelRateParametercorresponds to the rate register of the LIS2DH

    /MAX30101/Multimode_InitStart fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current green_led_current slot_1 slot_2 slot_3 slot_4

    This function sets up the Multimode LED, starts interrupts and streaming of data For the in depth meaning of these parameters please refer to the MAX30101 API document

    ParameterDescription
    fifo_waterlevel_markcorresponds to FIFO_A_FULL, In FIFO Configuration Register (0x08)
    sample_avgcorresponds to SMP_AVE, in FIFO Configuration Register (0x08)
    sample_ratecorresponds to SPO2_SR, IN SpO2 Configuration Register (0x0A)
    pulse_widthcorresponds to LED_PW in SpO2 Configuration register(0x0A)
    red_led_currentcorresponds to LED1_PA register (0x0C). Please see data sheet for values
    ir_led_currentcorresponds to LED2_PA register (0x0D). Please see data sheet for values
    green_led_currentcorresponds to LED3_PA register (0x0E). Please see data sheet for values
    slot_1corresponds to Multi-LED Mode control Registers (0x11-0x12).
    slot_2corresponds to Multi-LED Mode control Registers (0x11-0x12).
    slot_3corresponds to Multi-LED Mode control Registers (0x11-0x12).
    slot_4corresponds to Multi-LED Mode control Registers (0x11-0x12).

    /MAX30101/Multimode_stop

    Stops streaming and interrupts

    /MAX30101/ReadReg address

    Read a register in the MAX30101

    ParameterDescription
    addressRegister address to read from within the MAX30101

    Example: /MAX30101/ReadReg 01

    /MAX30101/SpO2mode_init fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current accelRateParameter

    Initialize the SpO2 mode and start streaming and interrupts For the in depth meaning of these parameters please refer to the MAX30101 API document

    ParameterDescription
    fifo_waterlevel_markcorresponds to FIFO_A_FULL, In FIFO Configuration Register (0x08)
    sample_avgcorresponds to SMP_AVE, in FIFO Configuration Register (0x08)
    sample_ratecorresponds to SPO2_SR, IN SpO2 Configuration Register (0x0A)
    pulse_widthcorresponds to LED_PW in SpO2 Configuration register(0x0A)
    red_led_currentcorresponds to LED1_PA register (0x0C). Please see data sheet for values
    ir_led_currentcorresponds to LED2_PA register (0x0D). Please see data sheet for values
    accelRateParametercorresponds to the rate register of the LIS2DH

    /MAX30101/SpO2mode_InitStart fifo_waterlevel_mark sample_avg sample_rate pulse_width red_led_current ir_led_current

    This function sets up for the SpO2 mode, enables and starts interrupts For the in depth meaning of these parameters please refer to the MAX30101 API document

    ParameterDescription
    fifo_waterlevel_markcorresponds to FIFO_A_FULL, In FIFO Configuration Register (0x08)
    sample_avgcorresponds to SMP_AVE, in FIFO Configuration Register (0x08)
    sample_ratecorresponds to SPO2_SR, IN SpO2 Configuration Register (0x0A)
    pulse_widthcorresponds to LED_PW in SpO2 Configuration register(0x0A)
    red_led_currentcorresponds to LED1_PA register (0x0C). Please see data sheet for values
    ir_led_currentcorresponds to LED2_PA register (0x0D). Please see data sheet for values

    /MAX30101/SpO2mode_stop

    Stops streaming and interrupts /MAX30101/WriteReg address data

    Returns the version string of the FW that is currently running

    ParameterDescription
    addressRegister address to write to within the MAX30101
    dataThe data to write to the MAX30101

    Example: /MAX30101/WriteReg 01 123456

    MAX30205

    /MAX30205_1/InitStart sample_rate

    Start the polling process for the MAX30205 instance 1

    ParameterDescription
    sample_rateNumber of seconds between each MAX30205 instance 1 sample

    /MAX30205_2/InitStart sample_rate

    Start the polling process for the MAX30205 instance 2

    ParameterDescription
    sample_rateNumber of seconds between each MAX30205 instance 2 sample

    S25FS512

    /S25FS512/EnableHWReset

    Enable HW resets to the device

    /S25FS512/ReadId

    Read the JDEC device ID from the S25FS256

    /S25FS512/ReadPagesBinary startPage endPage

    Read a page from flash, return the data in binary (non-ascii)

    ParameterDescription
    startPageThe Starting page to read from
    endPageThe last page to read from

    /S25FS512/Reset

    Issue a soft reset to the flash device

    /S25FS512/SpiWriteRead

    Write and read SPI to the flash device using Quad SPI

    /S25FS512/SpiWriteRead4Wire

    Write and read SPI to the flash device using 4 wire

    Testing

    Self tests can be performed by calling the following RPC calls.

    /Testing/Test_BMP280

    Start a testing sequence for this device, returns PASS and FAIL strings and detailed results of the test

    /Testing/Test_EM9301

    Start a testing sequence for this device, returns PASS and FAIL strings and detailed results of the test

    /Testing/Test_LIS2DH

    Start a testing sequence for this device, returns PASS and FAIL strings and detailed results of the test

    /Testing/Test_LSM6DS3

    Start a testing sequence for this device, returns PASS and FAIL strings and detailed results of the test

    /Testing/Test_MAX30001

    Start a testing sequence for this device, returns PASS and FAIL strings and detailed results of the test

    /Testing/Test_MAX30101

    Start a testing sequence for this device, returns PASS and FAIL strings and detailed results of the test

    /Testing/Test_MAX30205_1

    Start a testing sequence for this device, returns PASS and FAIL strings and detailed results of the test

    /Testing/Test_MAX30205_2

    Start a testing sequence for this device, returns PASS and FAIL strings and detailed results of the test

    /Testing/Test_S25FS512

    Start a testing sequence for this device, returns PASS and FAIL strings and detailed results of the test


    All wikipages