XM132 Module Software User Guide 3
XM132 Module Software User Guide 3
User Guide
XM132 Module Software
User Guide
Author: Acconeer AB
Version:a111-v2.12.0
Contents
1 Introduction 3
3 Power Save 6
3.1 MODULE POWER MODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 SENSOR POWER MODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 UPDATE RATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.4 REPETITION MODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4 Startup Timing 7
5 Physical Interfaces 8
5.1 UART protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1.1 UART settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1.2 Byte Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1.3 Payload length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1.4 Register Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1.5 Register Read Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1.6 Register Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1.7 Register Write Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1.8 Buffer Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1.9 Buffer Read Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1.10 Buffer Streaming Payload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1.11 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1.12 Read Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1.13 Write Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.1.14 Buffer Streaming Payload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.2 I2 C protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.2.1 I2 C Register Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.2.2 I2 C Register Write Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.2.3 I2 C Buffer Read Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.2.4 I2 C Register Read Request Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.2.5 I2 C Register Write Request Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
6 Register Map 13
6.1 General Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.2 Power Bin Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.3 Envelope Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.4 Sparse Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.5 Distance Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.6 Presence Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
7 Examples 25
7.1 Python Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.2 Reading Distances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.3 Reading Power Bin Data (UART Streaming) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
9 Disclaimer 28
1 Introduction
The module software enable register-based access to radar functionality from external devices connected to a module.
The module software is delivered as an image.
Typical usages of the module software are:
• Integration of radar functionality in your product to decrease development cost and time to market.
• Module evaluation and algorithm development in Python together with the “Acconeer Python Exploration Tool”
that is available for download on GitHub https://github.com/acconeer/.
The module software provides a rich register-based API that can be accessed over UART, SPI and I2 C depending on
module. The module software currently support the following services and detectors:
• Power Bins Service
• Envelope Service
• Sparse Service
• Distance detector
• Presence detector
Note that the performance and max range of the different detectors and services depends on the module that is being used
as well as the configured settings like update rate and downsampling factor. Depending on use case the performance might
not be good enough when using a low power module.
Support for more detectors is planned for future module software releases. A software image comprising the module
software is available for download from Acconeer’s website. See “Installing Software Image” at page 4 for instruction on
how to install the module software. For an introduction to Acconeer’s technology and product offer refer to “Introduction
to Acconeer’s sensor technology”, available at the Acconeer website.
The XM132 uses the STM32G071 MCU which contains a ROM bootloader. The MCU is configured to enable the
bootloader during manufacturing.
Another option is to use a SWD debugger, this requires additional hardware which is suitable when developing your own
applications.
5. Browse to and select the binary you like to program, e.g. “acc module server.bin”
6. Press the “Download” button. The green progress bar in the bottom indicates the progress
3 Power Save
4 Startup Timing
After providing power to the module or after a reset there is a 50 ms delay before the software is ready to be used.
During this period no communication should be performed with the module.
5 Physical Interfaces
64MHz
ActualBaudRate =
USART DIV
For more detailed description see RM0444 Rev 2 chapter 32.5.7.
When using the XE132 the CP2105 (ECI block) is used between the host computer. CP2105 calculates its actual used
baud rate as:
48MHz
ActualBaudRate =
2 ∗ClockDivider
For more detailed description see “6.1. ECI Baud Rate Generation” in CP2105 data sheet.
5.1.11 Examples
5.1.12 Read Status Register
0xCC 0x01 0x00 0xF8 0x06 0xCD
5.2 I2 C protocol
The module server supports communicating using I2 C. Note that it is required that the host supports ”clock
stretching”.
The device has a configurable address that is selected by the I2C ADDRESS PIN according to the following table:
Connected to GND 0x51
Not Connected 0x52
Connected to VIN 0x53
The address is configured during start of the module software.
After this the register value can be read with an I2C read transaction:
Register Value
4 bytes
6 Register Map
Read/
Addr Register Name Function
Write
Selects one of the supported sensor or service mode for
0x02 R/W MODE SELECTION
the module.
0x01: Power bins service mode.
0x02: Envelope service mode.
0x04: Sparse service mode.
0x200: Distance detector mode.
0x400: Presence detector mode.
continued . . .
. . . continued
Read/
Addr Register Name Function
Write
Controls the baudrate for the UART interface. Read the
0x07 R/W UART BAUDRATE product max uart baudrate register to get the maximum
supported baudrate.
0x1C200: Default baudrate for the module.
Read/
Addr Register Name Function
Write
0x20 R/W RANGE START Start range in mm of the measurement.
0x21 R/W RANGE LENGTH Length of the range in mm.
0x22 R/W REPETITION MODE Repetition mode for the measurement.
The sensor controls the update rate with
0x01: high precision according to the value in
the update rate register.
The update rate is software limited
according to the value in the
0x02:
update rate register. A value of 0
means no limit of the update rate.
continued . . .
. . . continued
Read/
Addr Register Name Function
Write
0x29 R/W DOWNSAMPLING FACTOR Downsampling factor to be used in sensor.
The number of hardware accelerated averaged samples
0x30 R/W HW ACC AVERAGE SAMPLES
for each data point.
Noise level normalization scale the signal according to
0x31 R/W NOISE LEVEL NORMALIZATION
the sensor noise level, default enabled.
Maximize signal attenuation to avoid saturation in direct
0x32 R/W MAXIMIZE SIGNAL ATTENUATION
leakage.
0x33 R/W ASYNCHRONOUS MEASUREMENTUsed to enable/disable asynchronous mode.
0x34 R/W MUR The maximum unambiguous range.
Maximum unambiguous range 11.5 m,
0x06:
maximum measurable distance 7.0 m
Maximum unambiguous range 17.3 m,
0x09:
maximum measurable distance 12.7 m
Read/
Addr Register Name Function
Write
0x20 R/W RANGE START Start range in mm of the measurement.
0x21 R/W RANGE LENGTH Length of the range in mm.
0x22 R/W REPETITION MODE Repetition mode for the measurement.
The sensor controls the update rate with
0x01: high precision according to the value in
the update rate register.
The update rate is software limited
according to the value in the
0x02:
update rate register. A value of 0
means no limit of the update rate.
continued . . .
. . . continued
Read/
Addr Register Name Function
Write
0x29 R/W DOWNSAMPLING FACTOR Downsampling factor to be used in sensor.
The number of hardware accelerated averaged samples
0x30 R/W HW ACC AVERAGE SAMPLES
for each data point.
Noise level normalization scale the signal according to
0x31 R/W NOISE LEVEL NORMALIZATION
the sensor noise level, default enabled.
Maximize signal attenuation to avoid saturation in direct
0x32 R/W MAXIMIZE SIGNAL ATTENUATION
leakage.
0x33 R/W ASYNCHRONOUS MEASUREMENTUsed to enable/disable asynchronous mode.
0x34 R/W MUR The maximum unambiguous range.
Maximum unambiguous range 11.5 m,
0x06:
maximum measurable distance 7.0 m
Maximum unambiguous range 17.3 m,
0x09:
maximum measurable distance 12.7 m
Read/
Addr Register Name Function
Write
0x20 R/W RANGE START Start range in mm of the measurement.
0x21 R/W RANGE LENGTH Length of the range in mm.
0x22 R/W REPETITION MODE Repetition mode for the measurement.
The sensor controls the update rate with
0x01: high precision according to the value in
the update rate register.
The update rate is software limited
according to the value in the
0x02:
update rate register. A value of 0
means no limit of the update rate.
continued . . .
. . . continued
Read/
Addr Register Name Function
Write
0x29 R/W DOWNSAMPLING FACTOR Downsampling factor to be used in sensor.
The number of hardware accelerated averaged samples
0x30 R/W HW ACC AVERAGE SAMPLES
for each data point.
Maximize signal attenuation to avoid saturation in direct
0x32 R/W MAXIMIZE SIGNAL ATTENUATION
leakage.
0x33 R/W ASYNCHRONOUS MEASUREMENTUsed to enable/disable asynchronous mode.
0x34 R/W MUR The maximum unambiguous range.
Maximum unambiguous range 11.5 m,
0x06:
maximum measurable distance 7.0 m
Maximum unambiguous range 17.3 m,
0x09:
maximum measurable distance 12.7 m
0x40 R/W SPARSE SWEEPS PER FRAME The number of sweeps per frame.
0x41 R/W SPARSE REQ SWEEP RATE The sweep rate in mHz. Set to 0 for maximum possible.
0x42 R/W SPARSE SAMPLING MODE Sampling mode
0x00: A
0x01: B
Read/
Addr Register Name Function
Write
0x20 R/W RANGE START Start range in mm of the measurement.
0x21 R/W RANGE LENGTH Length of the range in mm.
Receiver gain, 0-1000 where 0 is the lowest gain and
0x24 R/W GAIN
1000 the highest.
Radar sensor power mode. See the Service User Guide
0x25 R/W SENSOR POWER MODE
for respective service for more information.
Sensor off power mode. Whole
sensor is shutdown between sweeps,
0x00:
consumes least power, supports lower
frequencies.
0x01: Sensor sleep power mode.
0x02: Sensor ready power mode.
Sensor active power mode. Whole
0x03: sensor is active. Consumes most
power, supports higher frequencies.
Sensor hibernate power mode. Sensor
is still powered but the internal
oscillator is turned off and the
application needs to clock the sensor
0x04: by toggling a GPIO a pre-defined
number of times to enter and exit this
mode. Only supported for the sparse
service on XM122, XM123, XM124,
XM131 and XM132 currently.
continued . . .
. . . continued
Read/
Addr Register Name Function
Write
Number of sweeps to use for sweep averaging, where 1
0x40 R/W SWEEP AVG
means no averaging.
0x41 R/W THRESHOLD Threshold type used when finding peaks in sensor data.
0x00: Fixed threshold.
0x02: CFAR threshold.
Read/
Addr Register Name Function
Write
0x20 R/W RANGE START Start range in mm of the measurement.
0x21 R/W RANGE LENGTH Length of the range in mm.
The measurement update rate in mHz (i.e. step in
0x23 R/W UPDATE RATE 1/1000Hz). See the repetition mode register for more
information.
Receiver gain, 0-1000 where 0 is the lowest gain and
0x24 R/W GAIN
1000 the highest.
Radar sensor power mode. See the Service User Guide
0x25 R/W SENSOR POWER MODE
for respective service for more information.
Sensor off power mode. Whole
sensor is shutdown between sweeps,
0x00:
consumes least power, supports lower
frequencies.
0x01: Sensor sleep power mode.
0x02: Sensor ready power mode.
Sensor active power mode. Whole
0x03: sensor is active. Consumes most
power, supports higher frequencies.
Sensor hibernate power mode. Sensor
is still powered but the internal
oscillator is turned off and the
application needs to clock the sensor
0x04: by toggling a GPIO a pre-defined
number of times to enter and exit this
mode. Only supported for the sparse
service on XM122, XM123, XM124,
XM131 and XM132 currently.
. . . continued
Read/
Addr Register Name Function
Write
Cutoff frequency in mHz of the low pass filter for the
0x44 R/W INTER FRAME SLOW CUTOFF
slow filtered subsweep mean.
0x45 R/W INTRA FRAME TIME CONST Time constant in 1/1000 s for the intra frame part.
The weight, 0-1000, of the intra-frame part in the final
output. A value of 1000 corresponds to only using the
0x46 R/W INTRA FRAME WEIGHT
intra-frame part and a value of 0 corresponds to only
using the inter-frame part.
Time constant in 1/1000 s of the low pass filter for the
0x47 R/W OUTPUT TIME CONST
detector output.
The number of principal components removed in the
0x48 R/W NBR REMOVED PC PCA based noise reduction. Value between 0 and 2 where
0 disables the PCA based noise reduction completely.
Indication of sensor data being saturated, can cause result
0xA0 R DATA SATURATED
instability.
True is an indication of a sensor communication error,
0xA4 R SENSOR COMM ERROR
service or detector probably needs to be restarted.
0xB0 R DETECTED Presence detected or not
0xB1 R SCORE Score of the detected movement
0xB2 R DISTANCE Distance in mm to the detected movement
7 Examples
host module
write(0x21 00 00 00 96)
loop
read(0xB2)
host module
host module
write(0x21 00 00 00 96)
loop
host module
RSS and module server logs can be retrieved from the second UART that is exposed through the USB. If the USB is not
used, please use the DEBUG RX pin on XE132 which in turn is connected to UART DEBUG TX. This means that you
need to connect your UART RX pin on your host to DEBUG RX on your XE132 board.
Baudrate 921600
Byte size 8
Parity None
Stop bits 1
9 Disclaimer
The information herein is believed to be correct as of the date issued. Acconeer AB (“Acconeer”) will not be responsible
for damages of any nature resulting from the use or reliance upon the information contained herein. Acconeer makes no
warranties, expressed or implied, of merchantability or fitness for a particular purpose or course of performance or usage
of trade. Therefore, it is the user’s responsibility to thoroughly test the product in their particular application to
determine its performance, efficacy and safety. Users should obtain the latest relevant information before placing orders.
Unless Acconeer has explicitly designated an individual Acconeer product as meeting the requirement of a particular
industry standard, Acconeer is not responsible for any failure to meet such industry standard requirements.
Unless explicitly stated herein this document Acconeer has not performed any regulatory conformity test. It is the user’s
responsibility to assure that necessary regulatory conditions are met and approvals have been obtained when using the
product. Regardless of whether the product has passed any conformity test, this document does not constitute any
regulatory approval of the user’s product or application using Acconeer’s product.
Nothing contained herein is to be considered as permission or a recommendation to infringe any patent or any other
intellectual property right. No license, express or implied, to any intellectual property right is granted by Acconeer
herein.
Acconeer reserves the right to at any time correct, change, amend, enhance, modify, and improve this document and/or
Acconeer products without notice.
This document supersedes and replaces all information supplied prior to the publication hereof.