Modbus Register Definitions

Last revision 2026/02/06

Modbus Register Definitions for Gravity: BMP585 High-Precision Barometric Pressure Sensor

Register Definitions

Register Type Modbus Address Offset (Hex) Name Read/Write Permission Data Range Default Value Description
Input Register 0x0000 VID R 0x3343-0x3343 0x3343 Vendor ID (VID)
Input Register 0x0001 PID R 0x0000-0xFFFF 0xC299/0xC298 Product ID (PID) (bmp581/bmp585)
BMP581 PID: 0xC299
BMP585 PID: 0xC298
Input Register 0x0002 Hardware Version V1.0.0.0 R 0x0000-0xFFFF 0x1000 Hardware version number: 0x1000 corresponds to V1.0.0.0
Input Register 0x0003 Firmware Version V1.0.0.0 R 0x0000-0xFFFF 0x1000 Software version number: 0x1000 corresponds to V1.0.0.0
Input Register 0x0004 Module Device Address R 0x0046-0x0047 0x0047 Unique address of the device on the communication bus.
Switch the address (0x47, 0x46) via the DIP switch on the sensor.
Non-volatile (persists after power-off) and takes effect upon restart.
Input Register 0x0007 Chip ID R 0x0050-0x0050 0x0050 Unique identifier for the sensor chip model
Input Register 0x0008 Revision ID R 0x0032-0x0032 0x0032 Identifier for the design revision of the sensor chip
Input Register 0x0017 Chip Status R 0x0000-0x000F 0x0000 Status register containing the current operating state of the chip.
0b0000 0000 0000 0000
Bits 0-1 function as follows:
1. 0b00 (0x0): I2C mode only
2. 0b01 (0x1): SPI MODE1 and MODE2
3. 0b10 (0x2): SPI MODE0 and MODE3
4. 0b11 (0x3): Both SPI and I2C available (auto-configured, default I2C mode). During power-up, the CSB pin should be connected to VDDIO to pull it high. If the CSB pin is set to low level during power-up, the I2C interface will be disabled.
0b0000 0000 0000 0000
Bit 2 function as follows:
i3c_err_0: Set to 1 when an SDR parity error occurs
0b0000 0000 0000 0000
Bit 3 function as follows:
i3c_err_3: Set to 1 when an s0/s1 error occurs
Example:
0b0000 0000 0000 0001 (0x0001) indicates I2C mode only, no i3c_err_0 or i3c_err_3.
Input Register 0x001D FIFO Count R 0x0000-0x00FF 0x0000 Number of current data frames in the FIFO buffer
Input Register 0x0023 Temperature Data XLSB R 0x0000-0x00FF 0x007F Extra least significant byte of temperature data (TEMP_DATA_7_0)
Input Register 0x0024 Temperature Data LSB R 0x0000-0x00FF 0x007F Least significant byte of temperature data (TEMP_DATA_15_8)
Input Register 0x0025 Temperature Data MSB R 0x0000-0x00FF 0x007F Most significant byte of temperature data (TEMP_DATA_23_16)
0b0000 0000 0000 0000 0000 0000
DATA_MSB DATA_LSB DATA_XLSB
Temperature (°C) = (TEMP_DATA_MSB, TEMP_DATA_LSB, TEMP_DATA_XLSB) / 2¹⁶
Input Register 0x0026 Pressure Data XLSB R 0x0000-0x00FF 0x007F Extra least significant byte of pressure data (PRESS_DATA_7_0)
Input Register 0x0027 Pressure Data LSB R 0x0000-0x00FF 0x007F Least significant byte of pressure data (PRESS_DATA_15_8)
Input Register 0x0028 Pressure Data MSB R 0x0000-0x00FF 0x007F Most significant byte of pressure data (PRESS_DATA_23_16)
The final pressure data consists of:
0b0000 0000 0000 0000 0000 0000
DATA_MSB DATA_LSB DATA_XLSB
Pressure (Pa) = (PRESS_DATA_MSB, PRESS_DATA_LSB, PRESS_DATA_XLSB) / 2⁶
Input Register 0x002D Interrupt Status R 0x0000-0x00FF 0x0000 Register containing various interrupt status flags (bit set to 1 indicates interrupt trigger)
0b0000 0000 0000 0000
Bit 0: Data Ready Interrupt
0b0000 0000 0000 0000
Bit 1: FIFO Full
0b0000 0000 0000 0000
Bit 2: FIFO Threshold Triggered
0b0000 0000 0000 0000
Bit 3: Pressure Data Out of Set Threshold Range
0b0000 0000 0000 0000
Bit 4: Power-On Reset (POR) or Software Reset Completed
Input Register 0x002E Status R 0x0000-0x00FF 0x0002 Register containing general device status information (bit set to 1 indicates the corresponding status)
0b0000 0000 0000 0000
status_core_rdy (Bit 1): Digital core ready flag
0b0000 0000 0000 0000
status_nvm_rdy (Bit 2): Non-Volatile Memory (NVM) ready flag
0b0000 0000 0000 0000
status_nvm_err (Bit 3): NVM operation error (e.g., power failure, programming timeout)
0b0000 0000 0000 0000
status_nvm_cmd_err (Bit 4): NVM command execution failure (e.g., invalid parameters)
0b0000 0000 0000 0000
st_crack_pass (Bit 7): Hardware crack detection pass flag
Input Register 0x002F FIFO Data R 0x0000-0x00FF 0x007F Register for reading FIFO buffer data
PT-frameSEN0664-PT-frame1SEN0664-PT-frame2P-frameSEN0664-P-frameT-frameSEN0664-T-frameempty-frameSEN0664-empty-frame
Input Register 0x003E Effective Oversampling Rate R 0x0000-0x00FF 0x0000 Register indicating the current effective oversampling rate setting
0b0000 0000 0000 0000
Bits 0-2: Temperature oversampling rate
0b0000 0000 0000 0000
Bits 3-5: Pressure oversampling rate
Refer to the Oversampling Rate Configuration Register for specific values.
Holding Register 0x0001 Module Baud Rate RW 0x0000-0x0008 0x0003 Register for setting the communication baud rate
0x0001: 2400
0x0003: 9600 (default)
0x0004: 14400
0x0005: 19200
0x0006: 38400
0x0007: 57600
0x0008: 115200
Other values: 115200
Non-volatile, takes effect upon restart.
Holding Register 0x0002 Reserved Bits RW 0x0000-0xFFFF 0x0001 Reserved
Holding Register 0x0019 Driver Configuration RW 0x0000-0x00FF 0x0030 Register for configuring output driver strength and characteristics
0b0000 0000 0000 0000
Bit 0 (I2C mode only): Controls the pull-up resistor of the CSB pin:
- 0b0 (0x0): Disable pull-up
- 0b1 (0x1): Enable pull-up
0b0000 0000 0000 0000
Bit 1: SPI mode selection:
- 0b0 (0x0): 4-wire SPI mode
- 0b1 (0x1): 3-wire SPI mode (reduces the number of communication pins)
0b0000 0000 0000 0000
Bits 4-7: Driver strength configuration for serial IO pins (SDX, SDO); the most significant bit (MSB) is only effective in I2C mode.
Holding Register 0x001A Interrupt Configuration RW 0x0000-0x00FF 0x0035 Register for configuring interrupt trigger conditions and behavior
0b0000 0000 0000 0000
Bit 0: Interrupt Mode:
- 0b0 (0x0): Pulsed mode (automatically deasserts after interrupt trigger)
- 0b1 (0x1): Latched mode (requires software to clear the interrupt flag)
0b0000 0000 0000 0000
Bit 1: Interrupt Polarity:
- 0b0 (0x0): Active low
- 0b1 (0x1): Active high
0b0000 0000 0000 0000
Bit 2: Interrupt Pin Type:
- 0b0 (0x0): Push-pull output (high driving capability)
- 0b1 (0x1): Open-drain output (requires external pull-up)
0b0000 0000 0000 0000
Bit 3: Interrupt Enable:
- 0b0 (0x0): Disable interrupt
- 0b1 (0x1): Enable interrupt
0b0000 0000 0000 0000
Bits 4-7: Driver strength configuration for the interrupt pin (INT); the most significant bit (MSB) is only effective in open-drain mode.
Holding Register 0x001B Interrupt Source RW 0x0000-0x00FF 0x0000 Register for configuring which events can trigger interrupts (- 0b0 (0x0): Disable interrupt; - 0b1 (0x1): Enable interrupt)
0b0000 0000 0000 0000
Bit 0: Data Ready Interrupt Enable:
After enabling, triggers an interrupt when the data register update is completed.
0b0000 0000 0000 0000
Bit 1: FIFO Full Interrupt Enable:
After enabling, triggers an interrupt when the FIFO buffer is full.
0b0000 0000 0000 0000
Bit 2: FIFO Threshold/Watermark Interrupt Enable:
After enabling, triggers an interrupt when the FIFO data volume reaches the threshold.
0b0000 0000 0000 0000
Bit 3: Pressure Data Out-of-Range Interrupt Enable:
After enabling, triggers an interrupt when the pressure data exceeds the set range.
Holding Register 0x001C FIFO Configuration RW 0x0000-0x00FF 0x0000 Register for configuring the FIFO buffer operation mode
0b0000 0000 0000 0000
Function of Bits 0-4: Set the FIFO trigger threshold (triggers the corresponding action when the data volume reaches this value).
Values and descriptions:
0b00000 (0x0): Disable FIFO threshold function (no trigger condition);
0b11111 (0x1F): Set the threshold to 31 frames (triggers the action when the data volume reaches 31 frames).
The maximum configurable number of frames varies by data frame type (PT-frame: up to 15 frames; P-frame/T-frame: up to 31 frames)
0b0000 0000 0000 0000
Function of Bit 5: Select the FIFO operating mode.
Values and descriptions:
0b0 (0x0): Stream-to-FIFO Mode — Continuously writes data to the FIFO (continues writing even if the FIFO is nearly full);
0b1 (0x1): STOP-on-FULL Mode — Stops writing new data after the FIFO is full (prevents overflow).
Holding Register 0x001E FIFO Data Frame Type Configuration RW 0x0000-0x00FF 0x0000 Configure the types of data frames stored in the FIFO
0b0000 0000 0000 0000
Bits 0-1: Select the FIFO frame data source:
0b00 (0x0): FIFO disabled (no data written to FIFO)
0b01 (0x1): Store only temperature data to FIFO
0b10 (0x2): Store only pressure data to FIFO
0b11 (0x3): Store both pressure + temperature data to FIFO
0b0000 0000 0000 0000
Bits 2-4: Set the FIFO downsampling rate (writes to the FIFO every n samples)
n = 2ˣ
X ranges from 0 (0b000) to 7 (0b111)
Holding Register 0x0031 Non-Volatile Memory Address RW 0x0000-0x00FF 0x0000 Register for setting the access address of non-volatile memory
Holding Register 0x0032 Non-Volatile Memory Data LSB RW 0x0000-0x00FF 0x0000 Least significant byte of non-volatile memory data
Holding Register 0x0033 Non-Volatile Memory Data MSB RW 0x0000-0x00FF 0x0000 Most significant byte of non-volatile memory data

Common Modbus-RTU Function Codes

Function Code (Hex) Name Function Description
0x03 Read Multiple Registers Read integers, characters, status words, and floating-point numbers (read N words) — Operates on Holding Registers with byte-level access.
0x04 Read Input Registers Read integers, status words, and floating-point numbers (read N words) — Operates on Input Registers with byte-level access.
0x06 Write Single Holding Register Write integers, characters, status words, and floating-point numbers (write one word) — Operates on Holding Registers with byte-level access.
0x10 Write Multiple Holding Registers Write to multiple consecutive Holding Registers — Load specific binary values into a series of contiguous Holding Registers.

The above commands enable reading and writing of Input Registers and Holding Registers.

Register Read/Write Examples

Hardware Preparation

Recommended Serial Debug Tools & Downloads

For serial communication debugging, professional tools are required. The following commonly used and feature-rich tools are recommended:

  • XCOM Serial Debug Assistant V2.0: An efficient and easy-to-use serial communication tool. Download Link
  • SSCOM3.2 Serial Assistant: Designed for embedded development, IoT communication, and daily serial debugging. Download from Project Repository

General Operation Steps

  • Hardware Connection: Connect the sensor to the host (computer) via the RainbowLink USB Protocol Converter. Switch the sensor's communication mode to UART and address to 0x47.
  • Parameter Configuration: Set the following parameters in the serial debug tool (must match the sensor's configuration):
    • Baud Rate: 9600 (default)
    • Data Bits: 8 bits
    • Stop Bits: 1 bit
    • Parity: None
  • Send Command: Enter the hexadecimal command in the "Transmit Area" of the debug tool, check "Hex Send", and click Send.

Example 1: Read Pressure Value (Input Register Read Operation)

Function: Read the current pressure value detected by the sensor via the Modbus RTU protocol.

Transmit Command & Parsing
Field Name Hex Value Description
Device Address 47 Default UART address of the sensor (0x47)
Function Code 04 Read Input Registers (fixed command)
Starting Register Address 00 26 Lowest significant register address for pressure data
Number of Registers 00 03 Read 3 consecutive registers
CRC Check 5F 66 Command checksum (ensures transmission integrity)

Complete Transmit Command: 47 04 00 26 00 03 5F 66

Response Data & Parsing

After receiving the command, the sensor returns pressure data. Example response:

Field Name Hex Value Description
Device Address 47 Matches the device address in the transmit command
Function Code 04 Confirms execution of "Read Input Registers" operation
Number of Bytes 06 Total number of returned data bytes (6 bytes)
Read Data 00 05 00 FD 00 5B Raw pressure data (requires conversion to standard pressure unit (Pa) using the formula below)
CRC Check 66 FB Checksum of the response data

Complete Response Data: 47 04 06 00 05 00 FD 00 5B 66 FB

Data Conversion Principle

The complete pressure data in Modbus registers consists of 3 Input Registers (address range: 0x0026-0x0028). Since data must be read starting from the lowest significant register, the starting address in the command is set to 0x0026, and the response data follows the same order (from least significant to most significant).

  • Response data breakdown:
    • "00 05": Least Significant Byte (LSB)
    • "00 FD": Middle Significant Byte
    • "00 5B": Most Significant Byte (MSB)
  • Reassemble the bytes in MSB-to-LSB order: 00 5B 00 FD 00 05
  • Convert hexadecimal to decimal: 6028549
  • Pressure calculation formula: Pressure (Pa) = Raw Data / 2⁶
  • Result: Pressure = 6028549 / 64 = 94196 (Pa)

Schematic Diagram:

SEN0664-Read Pressure Value

Example 2: Modify Module Baud Rate (Holding Register Write Operation)

Function: Modify the sensor's UART baud rate via the Modbus RTU protocol (default: 9600, customizable).

Transmit Command & Parsing
Field Name Hex Value Description
Device Address 47 Default address of the sensor (0x47)
Function Code 06 Write Single Holding Register (fixed command)
Starting Register Address 00 01 Register address corresponding to baud rate configuration
Data to Write 00 08 Corresponding to 115200 bps (see Register Table for value-baud rate mapping)
CRC Check D7 6A Command checksum

Complete Transmit Command: 47 06 00 01 00 08 D7 6A

Complete Response Data: 47 06 00 01 00 08 D7 6A

Notes

  • If the response data matches the transmit command, the baud rate modification request has been accepted by the device.
  • The new baud rate takes effect only after powering off and restarting the sensor.
  • After restart, update the serial debug tool's baud rate to 115200; otherwise, communication will fail.

Schematic Diagram:

SEN0664-Modify Module Baud Rate

Was this article helpful?

TOP