How to use the Adaptive Environment Learning feature (Mode 3)?
• Prerequisites
When using adaptive learning, the device must operate exclusively in single Mode 3, and the environment must be unoccupied. The specific processing flow for environment learning is: Host MCU Acquires Spectrum -> Parses Spectrum -> Updates Threshold -> Dispatches Threshold.
• Spectrum Acquisition
Method 1: Actively acquire the spectrum using the 0x61 command (Recommended, supports UART/I2C).
Method 2: Acquire the spectrum via TLV configuration for active reporting (Supports UART only).
• Spectrum Parsing
Once the Host MCU code's app_get_target_range_callback is implemented and unpacks the 0xC6 response, it retrieves a raw fixed-point data stream of count short-type elements, containing the spectrum type (micro-motion/human presence) in dB (hereafter referred to as snr_q6). Developers need to append the relevant adaptive environment learning processing after this API. The specific processing is as follows:
1. Group the snr_q6 data stream (3 elements per group, with the 1st group specially handled as 4 elements).
2. Extract the max value from each group and save it for updating the threshold.
• Threshold Updating
When updating the threshold, developers need to maintain a uint8_t type thr array. The specific processing for updating the threshold is as follows:
1. After completing the processing in Section 6.6.3, process the extracted snr_q6 data stream into a uint8_t fixed-point data stream (hereafter referred to as thr_q1).
2. Add a developer-defined offset threshold (hereafter referred to as up_thr_q6, which can be 0) to the thr_q1 value. The processing formula is as follows:
thr_q1 = (snr_thr_q6 + up_thr_q6) >> 5
3. Populate the thr array with the grouped thr_q1 data (one thr_q1 value serves as a group of 3 elements, with the 1st group specially handled as 4 elements). Ultimately, fill the thr array with count number of thr_q1 data elements.
• Threshold Dispatching
After completing the processing in Section 6.6.4 of the MRS2xx mmWave Radar Sensor Host MCU Development Manual, call the sensor_range_spec_threshold_cfg interface to send the threshold settings for the corresponding type (micro-motion/human presence).
Technical Documentation
| Name | Related |
|---|---|
|
|
|




