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
This covers the RPC interface implemented in the HSP_RPC_GUI project:
Import programHSP_RPC_GUI
MAX32620HSP (MAXREFDES100) RPC Example for Graphical User Interface
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
| Parameter | Description |
|---|---|
| sample_rate | Number 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
| Parameter | Description |
|---|---|
| instance | The I2c master on the Nimitz to use |
| slaveAddress | Slave address to use when communicating |
| writeNumber | The number of bytes to write |
| dataToWrite | A series of space separated hex values that are to be written |
| readNumber | The 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
| Parameter | Description |
|---|---|
| mS | Blink using a mS period |
/Led/Pattern pattern
Rotate a 32-bit pattern through the LED so that specific blink patterns can be obtained
| Parameter | Description |
|---|---|
| pattern | A 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
| Parameter | Description |
|---|---|
| address | Register address to read from |
/LIS2DH/Stop
Stop the interrupts within the LIS2DH
/LIS2DH/WriteReg address data
Write a register
| Parameter | Description |
|---|---|
| address | Register address to read from |
| data | Data 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
| Parameter | Description |
|---|---|
| En_bioz | BIOZ Channel Enable <CNFG_GEN register> |
| Openp | Open the BIP Input Switch <CNFG_BMUX register> |
| Openn | Open the BIN Input Switch <CNFG_BMUX register> |
| Calp_sel | BIP Calibration Selection <CNFG_BMUX register> |
| Caln_sel | BIN Calibration Selection <CNFG_BMUX register> |
| CG_mode | BIOZ Current Generator Mode Selection <CNFG_BMUX register> |
| B_fit | BIOZ FIFO Interrupt Threshold (issues BINT based on number of unread FIFO records) <MNGR_INT register> |
| Rate | BIOZ Data Rate <CNFG_BIOZ register> |
| Ahpf | BIOZ/PACE Channel Analog High Pass Filter Cutoff Frequency and Bypass <CNFG_BIOZ register> |
| Ext_rbias | External Resistor Bias Enable <CNFG_BIOZ register> |
| Gain | BIOZ Channel Gain Setting <CNFG_BIOZ register> |
| Dhpf | BIOZ Channel Digital High Pass Filter Cutoff Frequency <CNFG_BIOZ register> |
| Dlpf | BIOZ Channel Digital Low Pass Filter Cutoff Frequency <CNFG_BIOZ register> |
| Fcgen | BIOZ Current Generator Modulation Frequency <CNFG_BIOZ register> |
| Cgmon | BIOZ Current Generator Monitor <CNFG_BIOZ register> |
| Cgmag | BIOZ Current Generator Magnitude <CNFG_BIOZ register> |
| Phoff | BIOZ 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
| Parameter | Description |
|---|---|
| En_Vcal | Calibration Source (VCALP and VCALN) Enable |
| Vmode | Calibration Source Mode Selection |
| Vmag | Calibration Source Magnitude Selection (VMAG) |
| Fcal | Calibration Source Frequency Selection (FCAL) |
| Thigh | Calibration Source Time High Selection |
| Fifty | Calibration 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
| Parameter | Description |
|---|---|
| En_ecg | ECG Channel Enable <CNFG_GEN register="" bits> |
| Openp | Open the ECGN Input Switch (most often used for testing and calibration studies) <CNFG_EMUX register="" bits> |
| Openn | Open the ECGN Input Switch (most often used for testing and calibration studies) <CNFG_EMUX register="" bits> |
| Calp_sel | ECGP Calibration Selection <CNFG_EMUX register="" bits> |
| Caln_sel | ECGN Calibration Selection <CNFG_EMUX register="" bits> |
| E_fit | ECG FIFO Interrupt Threshold (issues EINT based on number of unread FIFO records) <CNFG_GEN register="" bits> |
| Clr_rrint | RTOR R Detect Interrupt (RRINT) Clear Behavior <CNFG_GEN register="" bits> |
| Rate | ECG Data Rate |
| Gain | ECG Channel Gain Setting |
| Dhpf | ECG Channel Digital High Pass Filter Cutoff Frequency |
| Dlpf | ECG 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
| Parameter | Description |
|---|---|
| Clr_Fast | FAST MODE Interrupt Clear Behavior <MNGR_INT register> |
| Fast | ECG Channel Fast Recovery Mode Selection (ECG High Pass Filter Bypass) <MNGR_DYN register> |
| Fast_Th | Automatic 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
| Parameter | Description |
|---|---|
| en_enint_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_eovf_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_fstint_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_dcloffint_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_bint_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_bovf_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_bover_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_bundr_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_bcgmon_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_pint_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_povf_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_pedge_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_lonint_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_rrint_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| en_samp_loc | All the arguments with the aforementioned enumeration essentially can be configured to generate an interrupt on either INTB or INT2B or NONE |
| intb_Type | INTB Port Type (EN_INT Selections). |
| int2b_Type | INT2B 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
| Parameter | Description |
|---|---|
| En_pace | PACE Channel Enable <CNFG_GEN register> |
| Clr_pedge | PACE Edge Detect Interrupt (PEDGE) Clear Behavior <MNGR_INT register> |
| Pol | PACE Input Polarity Selection <CNFG_PACE register> |
| Gn_diff_off | PACE Differentiator Mode <CNFG_PACE register> |
| Gain | PACE Channel Gain Selection <CNFG_PACE register> |
| Aout_lbw | PACE Analog Output Buffer Bandwidth Mode <CNFG_PACE register> |
| Aout | PACE Single Ended Analog Output Buffer Signal Monitoring Selection <CNFG_PACE register> |
| Dacp | (4bits): PACE Detector Positive Comparator Threshold <CNFG_PACE register> |
| Dacn | PACE 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
| Parameter | Description |
|---|---|
| En_rbias | Enable and Select Resitive Lead Bias Mode |
| Rbias | Resistive Bias Mode Value Selection |
| Rbiasp | Enables Resistive Bias on Positive Input |
| Rbiasn | Enables Resistive Bias on Negative Input |
| Fmstr | Selects 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
| Parameter | Description |
|---|---|
| address | Register address to write |
| data | Data 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
| Parameter | Description |
|---|---|
| En_rtor | ECG RTOR Detection Enable <RTOR1 register> |
| Gain | R to R Window Averaging (Window Width = RTOR_WNDW[3:0]*8mS) <RTOR1 register> |
| Gain | R to R Gain (where Gain = 2^RTOR_GAIN[3:0], plus an auto-scale option) <RTOR1 register> |
| Pavg | |
| Ptsf | R to R Peak Averaging Weight Factor <RTOR1 register> |
| Hoff | R to R minimum Hold Off <RTOR2 register> |
| Ravg | R to R Interval Averaging Weight Factor <RTOR2 register> |
| Rhsf | R to R Interval Hold Off Scaling Factor <RTOR2 register> |
| Clr_rrint | RTOR 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
| Parameter | Description |
|---|---|
| address | Register address to write |
| data | Data 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
| Parameter | Description |
|---|---|
| fifo_waterlevel_mark | corresponds to SMP_AVE, in FIFO Configuration Register (0x08) |
| sample_avg | corresponds to SMP_AVE, in FIFO Configuration Register (0x08) |
| sample_rate | corresponds to SPO2_SR, IN SpO2 Configuration Register (0x0A) |
| pulse_width | corresponds to LED_PW in SpO2 Configuration Register(0x0A) |
| red_led_current | corresponds to LED1_PA register (0x0C). Please see data sheet for values |
| accelRateParameter | corresponds 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
| Parameter | Description |
|---|---|
| fifo_waterlevel_mark | corresponds to SMP_AVE, in FIFO Configuration Register (0x08) |
| sample_avg | corresponds to SMP_AVE, in FIFO Configuration Register (0x08) |
| sample_rate | corresponds to SPO2_SR, IN SpO2 Configuration Register (0x0A) |
| pulse_width | corresponds to LED_PW in SpO2 Configuration Register(0x0A) |
| red_led_current | corresponds 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
| Parameter | Description |
|---|---|
| fifo_waterlevel_mark | corresponds to FIFO_A_FULL, In FIFO Configuration Register (0x08) |
| sample_avg | corresponds to SMP_AVE, in FIFO Configuration Register (0x08) |
| sample_rate | corresponds to SPO2_SR, IN SpO2 Configuration Register (0x0A) |
| pulse_width | corresponds to LED_PW in SpO2 Configuration register(0x0A) |
| red_led_current | corresponds to LED1_PA register (0x0C). Please see data sheet for values |
| ir_led_current | corresponds to LED2_PA register (0x0D). Please see data sheet for values |
| green_led_current | corresponds to LED3_PA register (0x0E). Please see data sheet for values |
| slot_1 | corresponds to Multi-LED Mode control Registers (0x11-0x12). |
| slot_2 | corresponds to Multi-LED Mode control Registers (0x11-0x12). |
| slot_3 | corresponds to Multi-LED Mode control Registers (0x11-0x12). |
| slot_4 | corresponds to Multi-LED Mode control Registers (0x11-0x12). |
| accelRateParameter | corresponds 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
| Parameter | Description |
|---|---|
| fifo_waterlevel_mark | corresponds to FIFO_A_FULL, In FIFO Configuration Register (0x08) |
| sample_avg | corresponds to SMP_AVE, in FIFO Configuration Register (0x08) |
| sample_rate | corresponds to SPO2_SR, IN SpO2 Configuration Register (0x0A) |
| pulse_width | corresponds to LED_PW in SpO2 Configuration register(0x0A) |
| red_led_current | corresponds to LED1_PA register (0x0C). Please see data sheet for values |
| ir_led_current | corresponds to LED2_PA register (0x0D). Please see data sheet for values |
| green_led_current | corresponds to LED3_PA register (0x0E). Please see data sheet for values |
| slot_1 | corresponds to Multi-LED Mode control Registers (0x11-0x12). |
| slot_2 | corresponds to Multi-LED Mode control Registers (0x11-0x12). |
| slot_3 | corresponds to Multi-LED Mode control Registers (0x11-0x12). |
| slot_4 | corresponds to Multi-LED Mode control Registers (0x11-0x12). |
/MAX30101/Multimode_stop
Stops streaming and interrupts
/MAX30101/ReadReg address
Read a register in the MAX30101
| Parameter | Description |
|---|---|
| address | Register 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
| Parameter | Description |
|---|---|
| fifo_waterlevel_mark | corresponds to FIFO_A_FULL, In FIFO Configuration Register (0x08) |
| sample_avg | corresponds to SMP_AVE, in FIFO Configuration Register (0x08) |
| sample_rate | corresponds to SPO2_SR, IN SpO2 Configuration Register (0x0A) |
| pulse_width | corresponds to LED_PW in SpO2 Configuration register(0x0A) |
| red_led_current | corresponds to LED1_PA register (0x0C). Please see data sheet for values |
| ir_led_current | corresponds to LED2_PA register (0x0D). Please see data sheet for values |
| accelRateParameter | corresponds 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
| Parameter | Description |
|---|---|
| fifo_waterlevel_mark | corresponds to FIFO_A_FULL, In FIFO Configuration Register (0x08) |
| sample_avg | corresponds to SMP_AVE, in FIFO Configuration Register (0x08) |
| sample_rate | corresponds to SPO2_SR, IN SpO2 Configuration Register (0x0A) |
| pulse_width | corresponds to LED_PW in SpO2 Configuration register(0x0A) |
| red_led_current | corresponds to LED1_PA register (0x0C). Please see data sheet for values |
| ir_led_current | corresponds 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
| Parameter | Description |
|---|---|
| address | Register address to write to within the MAX30101 |
| data | The 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
| Parameter | Description |
|---|---|
| sample_rate | Number of seconds between each MAX30205 instance 1 sample |
/MAX30205_2/InitStart sample_rate
Start the polling process for the MAX30205 instance 2
| Parameter | Description |
|---|---|
| sample_rate | Number 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)
| Parameter | Description |
|---|---|
| startPage | The Starting page to read from |
| endPage | The 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
