Ripple is an open radar API standard that enables hardware and software interoperability, accelerating the growth of applications for general-purpose consumer radar. This standard was developed by the Ripple Technical Project Group of the Consumer Technology Association (CTA). Ripple APIs offer several benefits, including standardized calls and a software library that can function across various radar hardware implementations, ensuring reusability and easier firmware upgrades. An open API standard makes it easier for integrators to begin, develop, and distribute radar solutions. Standardized software that works across all radar applications simplifies experimentation and prototyping, making radar more accessible to students, startups, academics, and researchers.
Ripple will enable developers to create specialized extensions so that they can build on the standard to support their own differentiated use cases. These extensions can be incorporated as official interfaces in future versions of the standard.
Ripple Demo on xWRL6432 provides a Hardware Abstraction Layer (HAL) of API library and test application that follows the standards defined in Ripple Radar Sensor API Version 1.1, CTA Specification as of June 2022.
Ripple Demo Consists of the following Layers:
Ripple HAL Layer: A Hardware Abstraction Layer that consist of an API Library that has APIs that follow ripple standards and can be used to configure and collect ADC data from xwrL6432 TI radar. These APIs are only supported on Linux or Raspberry PI OS. These APIs take user input for configurations and converts it into radar device understood CLI commands.
Ripple HAL Demo: Simple test application that uses APIs from Ripple HAL Layer to Configure the radar.
Ripple Demo: Application that needs to be running on the radar’s system to support the APIs called from ripple HAL layer. This application reads the CLI commands coming from HAL Layer and make the corresponding firmware calls to configure the radar’s frontend. When the user starts data streaming, this application writes raw ADC data to SPI after each chirp.
Directory | Description |
---|---|
ripple_demo | Package that contains both linux level library and corresponding device application |
HAL-Demo | A test application that uses Ripple APIs from HAL-Lib. It configures the radar for a predefined configuration |
HAL-Lib | The library that contains definitions to the Ripple defined APIs |
ripple_cli | Contains code for command line interface of device application |
ripple_flash | Contains code for flash interface of device application |
ripple_link | Contains code for control library of device application, this library makes the firmware calls |
ripple_pwr | Contains code for power management framework of device application, it helps to set device power modes |
API: | RadarHandle* radarCreate(int32_t id) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | This API creates and allocates the internal structure(s) required to manage the radar and return a handle for other functions in this API to use to access a specific radar’s capabilities. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | This function opens the device serial com ports returns a pointer to a structure that contains serial port file descriptors. This function also sets the default values for vendor specific operating Parameters. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarDestroy(RadarHandle* handle) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provides function to destroy a previously created radar instance. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | This function closes device serial ports and clears the radar handle structure created by radar create API. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarSetMainParam(RadarHandle* handle, uint32_t slot_id, RadarMainParam id, uint32_t value) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provides a function to configure main operating parameters. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | This function takes main configuration parameters and store the configuration in various structures on the HAL level. The following are the main parameters that should be set:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarGetMainParam(RadarHandle* handle, uint8_t slot_id, RadarMainParam id, uint32_t* value) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provides a function to retrieve main operating parameters. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | the function returns main operating parameter values stored in the local structures. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarSetTxParam(RadarHandle* handle, uint8_t slotid, uint32_t antenna_mask, RadarTxParam id ,uint32_t value) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provides a function to configure TX antenna specific operating parameters. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | This function takes TX antenna specific operating parameters and store the configuration in various structures on the HAL level. The following are the TX antenna specific operating parameters that should be set:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarGetTxParam(RadarHandle* handle, uint8_t slot_id, uint32_t antenna_mask, RadaRxParam id, uint32_t* value) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provides a function to retrieve TX antenna specific operating parameters. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation | The function returns TX antenna specific operating parameter values stored in the local structures. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarSetRxParam(RadarHandle* handle, uint8_t slotid, uint32_t antenna_mask, RadarRxParam id ,uint32_t value) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provides a function to configure RX antenna specific operating parameter. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | This function takes RX antenna specific operating parameters and store the configuration in various structures on the HAL level. The following are the TX antenna specific operating parameters that should be set:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarGetRxParam(RadarHandle* handle, uint8_t slot_id, uint32_t antenna_mask, RadaRxParam id, uint32_t* value) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provides a function to retrieve RX antenna specific operating parameters. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | The function returns RX antenna specific operating parameter values stored in the local structures. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarSetVendorParam(RadarHandle* handle, uint32_t slot_id, RadarVendorParam id, uint32_t value) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provides a function to configure the TI specific sensor operating parameters. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | This function takes vendor specific operating parameters and store the configuration in various structures on the HAL level. Although the vendor specific parameters are configured to their default values, so they are not required to be set for basic operation of device.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarGetVendorParam(RadarHandle* handle, uint8_t slot_id, RadarVendorParam id, uint32_t* value) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provides a function to retrieve vendor specific operating parameters. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | The function returns vendor specific operating parameter values stored in the local structures. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarActivateConfig(RadarHandle* handle, int8_t slot_id) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provide a function to activate the configurations. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | The Function converts all the configurations set by radarSetMainParam, radarSetTxParam, radarSetRxParam and radarSetVendorParam to CLI commands by performing necessary calculations when required. The function then sends the CLI Commands to the radar. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarStartDataStreaming(RadarHandle* handle) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provides a function to start running the radar with the provided configuration and starts emitting data. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | The function sends the CLI command “sensorStart” to the radar. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarReadBurst(RadarHandle* handle, RadarBurstFormat* format, uint8_t* buffer, uint32_t* read_bytes, timespec_t timeout) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provides a function to read a single data burst. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | The function reads data from serial port of exact size equivalent of one burst into buffer. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarSetBurstReadyCb(RadarHandle* handle, RadarBurstReadyCB cb, void* user_data) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provides a means to register a callback to be invoked when Burst Data is ready to be read. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | The function registers the OnBurstReady callback which calls radarReadBurst function to read Burst data from the radar. OnBurstReady callback is invoked for each newly available set of burst data. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
API: | RadarReturnCode radarStopDataStreaming(RadarHandle* handle) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | The API provides a function to stop running the radar which will stop capturing and sending data from radar. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation: | The function writes the CLI command “sensorStop” to the radar. |
S1.1 | S1.2 | S1.3 | S1.4 | S1.5 | S1.6 |
---|---|---|---|---|---|
On | Off | On | Off | On | On |
S4.1 | S4.2 | S4.3 | S4.4 |
---|---|---|---|
Off | Off | Off | On |
As the demo runs, SPI waveforms are captured in Logic software. Data received can be seen in 'Data' tab of 'Analyzers' window.
Export the data to a text file for post processing.
Run the below command in the MATLAB command window:
Two input arguments:
a. adcDataFname: .txt file containing ADC data in hexadecimal format as described below (already streamed by SPI in this format)
b. cfgFname: .cfg file containing the radar CLI used to collect the ADC data.
Output:
frameAdcData: It returns ADC data of a frame in format [RX*TX][Samples][Chirps].
Sample Plots: