0% found this document useful (0 votes)
17 views29 pages

XM132 Module Software User Guide 3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views29 pages

XM132 Module Software User Guide 3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

XM132 Module Software

User Guide
XM132 Module Software

XM132 Module Software

User Guide

Author: Acconeer AB

Version:a111-v2.12.0

Acconeer AB June 20, 2022

© 2022 by Acconeer AB - All rights reserved Page 1 of 28


XM132 Module Software

Contents

1 Introduction 3

2 Installing Software Image 4


2.1 Flash Over UART Using STM32CubeProgrammer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.1 Boot the XM132 in bootloader mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.2 Program the XM132 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Flash Over UART Using stm32loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 ROM Bootloader Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

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

8 Debug Logging Output 27

9 Disclaimer 28

© 2022 by Acconeer AB - All rights reserved Page 2 of 28


XM132 Module Software

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.

© 2022 by Acconeer AB - All rights reserved Page 3 of 28


XM132 Module Software

2 Installing Software Image

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.

2.1 Flash Over UART Using STM32CubeProgrammer


Download and install STM32CubeProgrammer.

2.1.1 Boot the XM132 in bootloader mode


1. Connect the XE132 to your PC with a micro USB cable to the USB connector
2. Press and hold the “DFU” button on the board
3. Press the “RESET” button (still holding the “DFU” button)
4. Release the “RESET” button
5. Release the “DFU” button
Your XM132 device is now in “DFU” mode waiting for a software uprade procedure to be started.

2.1.2 Program the XM132


1. Start the STM32CubeProgrammer

2. Select correct port to the right. E.g. COM9.


3. Press “Connect” in the upper right corner
4. Press The “+” button and the “Open file”

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

© 2022 by Acconeer AB - All rights reserved Page 4 of 28


XM132 Module Software

7. Once programming is complete press the “Disconnect” button


8. Press the “RESET” button or do a power cycle to start the embedded application

2.2 Flash Over UART Using stm32loader


The stm32loader is a python program. See pypi.org/project/stm32loader/ for more information.
Install it using “pip install stm32loader”
1. Set the XM132 into bootloader mode, see above for how to do this
2. Program the device with “stm32loader -p /dev/ttyUSB0 -e -w -v acc module server.bin”. Make sure to specify
correct port.
3. Press “RESET” or power cycle the device to start the embedded application

2.3 ROM Bootloader Details


The “option bits” in the STM32G0 MCU needs to be configured correct to enable the ROM bootloader. This has been done
during manufacturing of the XM132. It is also done during startup of the module software and example applications. For
more information about the option bits see see page 72 in RM0444 Rev 2 from ST. For more details about the bootloader
see AN2606.

© 2022 by Acconeer AB - All rights reserved Page 5 of 28


XM132 Module Software

3 Power Save

Related Physical pins:


Pin Name Functionality Description
B5 WAKE UP This pin is active high and is used to wake up the module.
A4 MCU INT This pin is active high. Also see “INTERRUPT MODE” and
“INTERRUPT MASK” registers.
The power consumption of the module is mainly affected by three registers: MODULE POWER MODE,
SENSOR POWER MODE and UPDATE RATE.
The registers for SENSOR POWER MODE, UPDATE RATE and REPETITION MODE mostly corresponds to the
configuration for respective service and detector in the software API, see the documents at
developer.acconeer.com.

3.1 MODULE POWER MODE


This controls the modules power mode. 0x00 (default) means highest performance with lowest latency. This is suitable to
use when a high and accurate update frequency is needed.
0x01 Means that the module still is responsive, but there might be some delays and the update rate is not as accurate.
Before communicating with the module the WAKE UP pin must be set to high level. This mode is suitable when running
lower frequency update rates where the REPETITION MODE is set to 0x02 (on demand), SENSOR POWER MODE is
set to HIBERNATE and UPDATE RATE is set to 0. This enables the host controller to wakeup the module (e.g. once
every minute) by raising the WAKE UP pin and then clear the data and wait for the result.

3.2 SENSOR POWER MODE


The values corresponds towards the different ACC POWER SAVE MODE modes in the RSS API: OFF(0), SLEEP(1),
READY(2), ACTIVE(3), HIBERNATE(4). See the Service User Guide for respective service for more
information.
Not all modes support this register, see the documentation for respective detector or service.

3.3 UPDATE RATE


This controls the update rate. A value of 0 together with REPETITION MODE set to 0x02 (on demand) means that the
data is served as fast as possible once the data ready bit in the status register have been cleared by writing 0x04 to the
MAIN CONTROL register.
Not all modes support this register, see the documentation for respective detector or service.

3.4 REPETITION MODE


This controls if the sensor or the module controls the update rate.
Not all modes support this register, see the documentation for respective detector or service.

© 2022 by Acconeer AB - All rights reserved Page 6 of 28


XM132 Module Software

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.

© 2022 by Acconeer AB - All rights reserved Page 7 of 28


XM132 Module Software

5 Physical Interfaces

5.1 UART protocol


5.1.1 UART settings
The baud rate can be adjusted by writing to the UART BAUDRATE register with the following sequence:
1. Write desired baudrate to the UART BAUDRATE register
2. Wait for the ”Register Write Response” packet
3. Change to the new baudrate
Default baud rate 115200
Byte size 8-bit
Parity None
Flow control RTS/CTS
The maximum supported baud rate is 1 Mbps. This can also be read from the PRODUCT MAX UART BAUDRATE
register.
The actual used baudrate is calculated as:

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.2 Byte Order


Multi byte integers are coded in little endian format.

5.1.3 Payload length


The payload length below is the length of the packet excluding start marker, the payload length itself, packet type and end
marker. It can be used to read a packet without knowing anything about the different packet types. Also see 5.1.11 for a
couple of example UART packages.

5.1.4 Register Read Request


Start Payload Packet Type Register Address End Marker
marker length
0xCC 2 bytes 0xF8 1 byte 0xCD

5.1.5 Register Read Response


Start Payload Packet Type Register Register End Marker
marker length address value
0xCC 2 bytes 0xF6 1 byte 4 bytes 0xCD

5.1.6 Register Write Request


Start Payload Packet Type Register Register End Marker
marker length address value
0xCC 2 bytes 0xF9 1 byte 4 bytes 0xCD

© 2022 by Acconeer AB - All rights reserved Page 8 of 28


XM132 Module Software

5.1.7 Register Write Response


Start Payload Packet Type Register Register End Marker
marker length address value
0xCC 2 bytes 0xF5 1 byte 4 bytes 0xCD

5.1.8 Buffer Read Request


Start Payload Packet Type Buffer Buffer End Marker
marker length index offset
0xCC 2 bytes 0xFA 0xE8 2 bytes 0xCD

5.1.9 Buffer Read Response


Start Payload Packet Type Buffer Buffer End Marker
marker length index data
0xCC 2 bytes 0xF7 0xE8 0xCD

5.1.10 Buffer Streaming Payload


The streaming mode is primarily intended for communication with the Acconeer Python exploration package that is
available on GitHub. The format of the steaming payload may be updated in a non-backward compatible way in future
versions of the module software.

Start Payload Packet Type Streaming End Marker


marker length payload
0xCC 2 bytes 0xFE 0xCD

The streaming payload consists of:

Result info Result info Result info Buffer Buffer Buffer


marker length marker length
0xFD 2 bytes 0xFE 2 bytes
The result info and the streaming buffer are the outputs from the Acconeer Service APIs encoded in little endian
format.
The result info is a list of register (1 byte) and its value (4 bytes). The number of items in result info depends on the current
mode. The list is terminated with 0xFE. More data may be added in future versions of the module software.
The format of the streaming buffer depends on the service.
Note that a streaming packet is sent asynchronous which means that the client must be able to handle that a streaming
packet is received when e.g. a “Register Write Request” is sent but the “Register Write Response” has not yet been
received.
Service Streaming buffer format
Power Bin Array of 32-bit floats
Envelope Array of 16-bit unsigned integers
Offset Description
0: No presence detected
0
Presence 1: Presence detected
1..4 Score (float)
5..8 Distance (float)
Offset Description
Distance For each detected object: (N*6)..(N*6+1) Amplitude (uint16)
(N*6+2)..(N*6+5) Distance (float)

5.1.11 Examples
5.1.12 Read Status Register
0xCC 0x01 0x00 0xF8 0x06 0xCD

© 2022 by Acconeer AB - All rights reserved Page 9 of 28


XM132 Module Software

5.1.13 Write Mode


0xCC 0x05 0x00 0xF9 0x02 0x02 0x00 0x00 0x00 0xCD

5.1.14 Buffer Streaming Payload


Index Data Description
0 0xCC Start marker
1. . . 2 0x3E 0x10 Payload length = 0x103E = 4158 bytes
3 0xFE Packet type (Buffer streaming payload)
4 0xFD Result info marker
5. . . 6 0x14 0x00 Result info length = 0x0014 = 20 bytes
7 0xA1 Register 0xA1 (MISSED DATA)
8. . . 11 0x00 0x00 0x00 0x00 MISSED DATA Value = 0x0000 0000 (No missed data)
12 0xA0 Register 0xA0 (DATA SATURATED)
13. . . 16 0x00 0x00 0x00 0x00 DATA SATURATED Value = 0x0000 0000 (Data not saturated)
17 0xA3 Register 0xA3 (DATA QUALITY WARNING)
18. . . 21 0x00 0x00 0x00 0x00 DATA QUALITY WARNING Value (No data quality warning)
22 0xA4 Register 0xA4 (SENSOR COMM ERROR)
23. . . 26 0x00 0x00 0x00 0x00 SENSOR COMM ERROR Value (No comm error)
27 0xFE Buffer marker
28. . . 29 0x24 0x10 Buffer length = 0x1024 = 4132 Bytes
30. . . 31 0xF4 0x00 Envelope data index 0 = 0x00F4
32. . . 33 0xFA 0x00 Envelope data index 1 = 0x00FA
34. . . 35 0x00 0x01 Envelope data index 2 = 0x0100
35. . . 4124 ... Envelope data index 3. . . 2065
4125 0xCD End marker

© 2022 by Acconeer AB - All rights reserved Page 10 of 28


XM132 Module Software

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.

5.2.1 I2 C Register Read Request


In order to read a register an I2 C write transaction should first be performed:
Packet Type Register Address
0xF8 1 byte

After this the register value can be read with an I2C read transaction:
Register Value
4 bytes

5.2.2 I2 C Register Write Request


Register write can be performed in one transaction:
Packet Type Register Address Register Value
0xF9 1 byte 4 bytes

5.2.3 I2 C Buffer Read Request


In order to read the buffer content an I2 C write transaction should first be performed:
Packet Type Buffer Index Buffer Offset
0xFA 0xE8 2 bytes

After this the buffer can be read with an I2 C read transaction:


Buffer Data

© 2022 by Acconeer AB - All rights reserved Page 11 of 28


XM132 Module Software

5.2.4 I2 C Register Read Request Example


The following image shows an example when reading register 0x20 (RANGE START). The returned register value in this
example is 0xC8 (=200) mm.

5.2.5 I2 C Register Write Request Example


The following image shows an example when writing 1000 (0x03E8) to register 0x20 (RANGE START).

© 2022 by Acconeer AB - All rights reserved Page 12 of 28


XM132 Module Software

6 Register Map

6.1 General Registers

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.

Main Control Register. This register is used to control the


0x03 W MAIN CONTROL
operation of the module.
0x00: Stop any started service or detector.
Create the current service or detector.
0x01: Sets the ’error creation’ status bit in
case of error.
Activate the current service or detector.
0x02: Sets the ’error activation’ status bit in
case of failure.
Create and activate the current service
0x03:
or detector.
Clears any status bits in the status
0x04:
register.

0x05 R/W STREAMING CONTROL Controls the streaming functionality.


0x00: Disables UART data streaming.
0x01: Enables UART data streaming.

Module Status Register. This register is a bit mask with


0x06 R STATUS
current status of the module.
0x00000000: No bits set.
Bits that can’t be cleared with the clear
0x000000FF:
status command.
0xFFFFFF00: Mask with bits that can be cleared.
0xFFFF0000: Mask with error bits.
0x00000001: Service or detector is created.
0x00000002: Service or detector is activated.
0x00000100: Data is ready to be read from the buffer.
0x00010000: An error occurred in the module.
Invalid command or parameter
0x00020000:
received.
0x00040000: Invalid mode
Error creating the requested service or
0x00080000:
detector.
Error activating the requested service
0x00100000:
or detector.
An attempt to write a register or read
0x00200000: the buffer when the module is in wrong
state.

continued . . .

© 2022 by Acconeer AB - All rights reserved Page 13 of 28


XM132 Module Software

. . . 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.

Mask for interrupts. Interrupt is active when


corresponding bit in the status register is set. The
0x08 R/W INTERRUPT MASK
interrupt is inactive when the bit is cleared. Also see
interrupt mode register.
0x00000000: No interrupts.
Interrupt when service or detector is
0x00000001:
created.
Interrupt when service or detector is
0x00000002:
activated.
0x00000100: Interrupt on data ready.
0x00010000: Interrupt on error.
0x00020000: Interrupt on invalid command.
0x00040000: Interrupt on invalid mode.
Interrupt on error creating service or
0x00080000:
detector.
Error activating the requested service
0x00100000:
or detector.
An attempt to write a register or read
0x00200000: the buffer when the module is in wrong
state.

0x09 R/W INTERRUPT MODE Set mode for interrupt


Interrupt disabled, MCU INT pin is
0x00:
always inactive.
MCU INT is active when interrupt is
0x01:
active.

Module power configuration. This register is hardware


0x0A R/W MODULE POWER MODE
specific and described in the ”Power Save” chapter.
0x10 R PRODUCT IDENTIFICATION Module Identification register.
0xACC0: The module is a XM112.
0xACC1: The module is a XM122.
0xACC2: The module is a XM132.
0xACC3: The module is a XM131.
0xACC5: The module is a XM124.
0xACC6: The module is a XM123.

Software product version register as 0xMMIIPP where


0x11 R PRODUCT VERSION
MM is major, II is minor and PP is patch version.
0x12 R PRODUCT MAX UART BAUDRATEThe maximum UART baudrate supported by the module.
0xE9 R OUTPUT BUFFER LENGTH Length of data in output buffer.

© 2022 by Acconeer AB - All rights reserved Page 14 of 28


XM132 Module Software

6.2 Power Bin Registers


Registers which are writable can be used to set a configuration. Registers which are read only contain metadata which is
updated either after create or when data is produced. It is recommended to read the the service and detector user guides
for more information on configuration and metadata.

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.

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.

Used to measure RX noise floor and to support TX off


0x26 R/W TX DISABLE
spectrum regulation measurements.
Each profile consists of a number of settings for the
0x28 R/W PROFILE SELECTION
sensor that configures the RX and TX paths.
Profile 1 maximizes on the depth
0x01:
resolution
0x02: Sliding scale between profile 1 and 5.
0x03: Sliding scale between profile 1 and 5.
0x04: Sliding scale between profile 1 and 5.
Profile 5 maximizes on radar loop gain
0x05:
with a sliding scale in between.

continued . . .

© 2022 by Acconeer AB - All rights reserved Page 15 of 28


XM132 Module Software

. . . 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

0x40 R/W REQ BIN COUNT Number of requested power bins


0x81 R START Start of the sweep in mm.
0x82 R LENGTH Length of the sweep in mm.
0x83 R BIN COUNT Bin count.
0x84 R STITCH COUNT Sweep has got stitch count number of stitches.
0x85 R STEP LENGTH Distance in um between adjacent data points.
Indication of sensor data being saturated, can cause result
0xA0 R DATA SATURATED
instability.
True if data was lost. Try lowering the update rate or read
0xA1 R MISSED DATA
the data more often.
True if bad data quality. May be addressed by restarting
0xA3 R DATA QUALITY WARNING
the current service or detector.
True is an indication of a sensor communication error,
0xA4 R SENSOR COMM ERROR
service or detector probably needs to be restarted.

© 2022 by Acconeer AB - All rights reserved Page 16 of 28


XM132 Module Software

6.3 Envelope Registers


Registers which are writable can be used to set a configuration. Registers which are read only contain metadata which is
updated either after create or when data is produced. It is recommended to read the the service and detector user guides
for more information on configuration and metadata.

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.

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.

Used to measure RX noise floor and to support TX off


0x26 R/W TX DISABLE
spectrum regulation measurements.
Each profile consists of a number of settings for the
0x28 R/W PROFILE SELECTION
sensor that configures the RX and TX paths.
Profile 1 maximizes on the depth
0x01:
resolution
0x02: Sliding scale between profile 1 and 5.
0x03: Sliding scale between profile 1 and 5.
0x04: Sliding scale between profile 1 and 5.
Profile 5 maximizes on radar loop gain
0x05:
with a sliding scale in between.

continued . . .

© 2022 by Acconeer AB - All rights reserved Page 17 of 28


XM132 Module Software

. . . 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

The running average factor is the factor of which the most


recent sweep is weighed against previous sweeps. Value
0x40 R/W RUN FACTOR
between 0 and 1000 where 0 means that no history is
weighed in, i.e filtering is effectively disabled.
0x81 R START Start of the sweep in mm.
0x82 R LENGTH Length of the sweep in mm.
0x83 R DATA LENGTH Length of the envelope data.
0x84 R STITCH COUNT Sweep has got stitch count number of stitches.
0x85 R STEP LENGTH Distance in um between adjacent data points.
Indication of sensor data being saturated, can cause result
0xA0 R DATA SATURATED
instability.
True if data was lost. Try lowering the update rate or read
0xA1 R MISSED DATA
the data more often.
True if bad data quality. May be addressed by restarting
0xA3 R DATA QUALITY WARNING
the current service or detector.
True is an indication of a sensor communication error,
0xA4 R SENSOR COMM ERROR
service or detector probably needs to be restarted.

© 2022 by Acconeer AB - All rights reserved Page 18 of 28


XM132 Module Software

6.4 Sparse Registers


Registers which are writable can be used to set a configuration. Registers which are read only contain metadata which is
updated either after create or when data is produced. It is recommended to read the the service and detector user guides
for more information on configuration and metadata.

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.

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.

Used to measure RX noise floor and to support TX off


0x26 R/W TX DISABLE
spectrum regulation measurements.
Each profile consists of a number of settings for the
0x28 R/W PROFILE SELECTION
sensor that configures the RX and TX paths.
Profile 1 maximizes on the depth
0x01:
resolution
0x02: Sliding scale between profile 1 and 5.
0x03: Sliding scale between profile 1 and 5.
0x04: Sliding scale between profile 1 and 5.
Profile 5 maximizes on radar loop gain
0x05:
with a sliding scale in between.

continued . . .

© 2022 by Acconeer AB - All rights reserved Page 19 of 28


XM132 Module Software

. . . 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

0x81 R START Start of the sweep in mm.


0x82 R LENGTH Length of the sweep in mm.
0x83 R DATA LENGTH Length of the sparse data.
0x84 R SWEEP RATE Sweep rate in mHz.
0x85 R STEP LENGTH Distance in um between adjacent data points.
Indication of sensor data being saturated, can cause result
0xA0 R DATA SATURATED
instability.
True if data was lost. Try lowering the update rate or read
0xA1 R MISSED DATA
the data more often.
True is an indication of a sensor communication error,
0xA4 R SENSOR COMM ERROR
service or detector probably needs to be restarted.

© 2022 by Acconeer AB - All rights reserved Page 20 of 28


XM132 Module Software

6.5 Distance Register


Registers which are writable can be used to set a configuration. Registers which are read only contain metadata which is
updated either after create or when data is produced. It is recommended to read the the service and detector user guides
for more information on configuration and metadata.

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.

Each profile consists of a number of settings for the


0x28 R/W PROFILE SELECTION
sensor that configures the RX and TX paths.
Profile 1 maximizes on the depth
0x01:
resolution
0x02: Sliding scale between profile 1 and 5.
0x03: Sliding scale between profile 1 and 5.
0x04: Sliding scale between profile 1 and 5.
Profile 5 maximizes on radar loop gain
0x05:
with a sliding scale in between.

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

continued . . .

© 2022 by Acconeer AB - All rights reserved Page 21 of 28


XM132 Module Software

. . . 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.

Value of fixed threshold. Only used if fixed threshold type


0x42 R/W FIXED THRESHOLD
is selected.
Set sensitivity of threshold. Value between 0 and 1000.
0x44 R/W SENSITIVITY
Only used if cfar threshold type is selected.
Range in mm around the distance of interest that is
0x45 R/W CFAR GUARD omitted when calculating CFAR threshold. Only used if
cfar threshold type is selected.
Range in mm next to the CFAR guard from which the
0x46 R/W CFAR WINDOW threshold level will be calculated. Only used if cfar
threshold type is selected.
Instead of determining the CFAR threshold from sweep
amplitudes from distances both closer and father away,
0x47 R/W ONLY LOWER
use only closer. Only used if cfar threshold type is
selected.
Peak sorting algoritm specifies in what order peaks
0x48 R/W PEAK SORTING
should be reported back to the application.
0x00: Sort peaks in order closest first.
0x01: Sort peaks in order strongest first.
Sort peaks in order strongest reflector
0x02:
first.
Sort peaks in order strongest flat
0x03:
reflector first.

0x81 R START Start of the sweep in mm.


0x82 R LENGTH Length of the sweep in mm.
Indication of sensor data being saturated, can cause result
0xA0 R DATA SATURATED
instability.
True if data was lost. Try lowering the update rate or read
0xA1 R MISSED DATA
the data more often.
True if bad data quality. May be addressed by restarting
0xA3 R DATA QUALITY WARNING
the current service or detector.
True is an indication of a sensor communication error,
0xA4 R SENSOR COMM ERROR
service or detector probably needs to be restarted.
0xB0 R COUNT Number of detected peaks.
0xB1 R 1 DISTANCE Distance in mm to first peak.
0xB2 R 1 AMPLITUDE Amplitude of first peak.
0xB3 R 2 DISTANCE Distance in mm to second peak.
0xB4 R 2 AMPLITUDE Amplitude of second peak.
0xB5 R 3 DISTANCE Distance in mm to third peak.
0xB6 R 3 AMPLITUDE Amplitude of third peak.
0xB7 R 4 DISTANCE Distance in mm to fourth peak.
0xB8 R 4 AMPLITUDE Amplitude of fourth peak.

© 2022 by Acconeer AB - All rights reserved Page 22 of 28


XM132 Module Software

6.6 Presence Registers


Registers which are writable can be used to set a configuration. Registers which are read only contain metadata which is
updated either after create or when data is produced. It is recommended to read the the service and detector user guides
for more information on configuration and metadata.

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.

Each profile consists of a number of settings for the


0x28 R/W PROFILE SELECTION
sensor that configures the RX and TX paths.
Profile 1 maximizes on the depth
0x01:
resolution
0x02: Sliding scale between profile 1 and 5.
0x03: Sliding scale between profile 1 and 5.
0x04: Sliding scale between profile 1 and 5.
Profile 5 maximizes on radar loop gain
0x05:
with a sliding scale in between.

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.
0x33 R/W ASYNCHRONOUS MEASUREMENTUsed to enable/disable asynchronous mode.
0x40 R/W THRESHOLD Detection threshold in 1/1000 for presence.
Sweeps per frame for the data from the underlying
0x41 R/W SWEEPS PER FRAME
(sparse) service.
Time constant in 1/1000 s of the low pass filter for the
0x42 R/W INTER FRAME DEV TIME CONST
(inter-frame) deviation between fast and slow.
Cutoff frequency in mHz of the low pass filter for the fast
0x43 R/W INTER FRAME FAST CUTOFF
filtered subsweep mean.
continued . . .

© 2022 by Acconeer AB - All rights reserved Page 23 of 28


XM132 Module Software

. . . 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

© 2022 by Acconeer AB - All rights reserved Page 24 of 28


XM132 Module Software

7 Examples

7.1 Python Example


There is a simple python example delivered together with the module software binary. This shows how to communicate
with the module software over the UART interface.
Example:
python3 module software example.py --port /dev/ttyUSB0

7.2 Reading Distances

host module

Set mode distance peak write(0x02 00 00 01 00)

Set configuration parameters write(0x20 00 00 00 41)

write(0x21 00 00 00 96)

Create and activate detector write(0x03 00 00 00 03)

loop

Clear status register write(0x03 00 00 00 04)

loop [!data ready]

Read status register read(0x06)

Read number of peaks read(0xB0)

alt [nbr reflections >0]

Read peak data read(0xB1)

read(0xB2)

Stop detector write(0x03 00 00 00 00)

host module

© 2022 by Acconeer AB - All rights reserved Page 25 of 28


XM132 Module Software

7.3 Reading Power Bin Data (UART Streaming)

host module

Set mode power bins write(0x02 00 00 00 01)

Set configuration parameters write(0x20 00 00 00 41)

write(0x21 00 00 00 96)

Set streaming mode write(0x05 00 00 00 01)

Create and activate detector write(0x03 00 00 00 03)

loop

Read data from uart

Stop detector write(0x03 00 00 00 00)

host module

© 2022 by Acconeer AB - All rights reserved Page 26 of 28


XM132 Module Software

8 Debug Logging Output

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.

Figure 1: DEBUG RX on XE132

Figure 2: Example log output

Baudrate 921600
Byte size 8
Parity None
Stop bits 1

Table 7: Debug UART Settings

© 2022 by Acconeer AB - All rights reserved Page 27 of 28


XM132 Module Software

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.

© 2022 by Acconeer AB - All rights reserved Page 28 of 28

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy