Difference between revisions of "Texas Instruments AWR2243 Linux driver"

From RidgeRun Developer Connection
Jump to: navigation, search
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<seo title="Texas Instruments AWR2243 Driver | Linux driver for Jetson Xavier NX | RidgeRun" titlemode="replace" metakeywords="Linux SDK, Linux BSP,  Embedded Linux, Device Drivers, NVIDIA, TI, NXP, Freescale, Embedded Linux driver development, Linux Software development, Embedded Linux SDK, Embedded Linux Application development, AWR2243, Texas Instruments AWR2243, AWR2243 Linux driver, Jetson Xavier AWR2243 NX driver, Jetson Xavier NX AWR2243 Linux driver, AWR2243 Linux driver for Xavier NX, RidgeRun, AWR2243 Jetson Xavier NX, V4L2 Driver" metadescription="Read about the Texas Instruments AWR2243 Linux driver for Jetson Xavier NX and building the driver from RidgeRun."></seo>
+
<seo title="Texas Instruments AWR2243 Driver | Linux driver for Jetson Xavier NX | RidgeRun" titlemode="replace" metakeywords="Embedded Linux, Device Drivers, NVIDIA, TI, NXP, Freescale, Embedded Linux driver development, Linux Software development, Embedded Linux SDK, Embedded Linux Application development, AWR2243, Texas Instruments AWR2243, AWR2243 Linux driver, Jetson Xavier AWR2243 NX driver, Jetson Xavier NX AWR2243 Linux driver, AWR2243 Linux driver for Xavier NX, RidgeRun, AWR2243 Jetson Xavier NX, V4L2 Driver, Jetson Xavier NX, NVIDIA" metadescription="Read about the Texas Instruments AWR2243 Linux driver for Jetson Xavier NX and building the driver from RidgeRun."></seo>
  
 
<table>
 
<table>
Line 16: Line 16:
 
<br>
 
<br>
  
'''Keywords:'''AWR2243, Jetson Xavier NX, NVIDIA, RidgeRun, V4L2 Driver, Texas Instruments.
 
  
The AWR2243 device is an integrated single-chip FMCW transceiver capable of operation in the 76- to 81-GHz
+
The AWR2243 device is an integrated single-chip FMCW transceiver capable of operation in the 76- to 81-GHz band. The device enables unprecedented levels of integration in an extremely small form factor. AWR2243 is an ideal solution for low-power, self-monitored, ultra-accurate radar systems in the automotive space.
band. The device enables unprecedented levels of integration in an extremely small form factor. AWR2243 is an
 
ideal solution for low power, self-monitored, ultra-accurate radar systems in the automotive space [https://www.ti.com/lit/ds/symlink/awr2243.pdf?ts=1687368657801&ref_url=https%253A%252F%252Fwww.ti.com%252Fsensors%252Fmmwave-radar%252Fproducts.html [1]].
 
 
   
 
   
Simple programming model changes can enable a wide variety of sensor implementation (Short,
+
Simple programming model changes can enable a wide variety of sensor implementations (Short, Mid, Long) with the possibility of dynamic reconfiguration for implementing a multimode sensor. Additionally, the device is provided as a complete platform solution including reference hardware design, software drivers, sample configurations, API guide, and user documentation [https://www.ti.com/lit/ds/symlink/awr2243.pdf?ts=1687368657801&ref_url=https%253A%252F%252Fwww.ti.com%252Fsensors%252Fmmwave-radar%252Fproducts.html AWR2243 Single-Chip 76- to 81-GHz FMCW Transceiver].
Mid, Long) with the possibility of dynamic reconfiguration for implementing a multimode sensor. Additionally,
 
the device is provided as a complete platform solution including reference hardware design, software drivers,
 
sample configurations, API guide, and user documentation [https://www.ti.com/lit/ds/symlink/awr2243.pdf?ts=1687368657801&ref_url=https%253A%252F%252Fwww.ti.com%252Fsensors%252Fmmwave-radar%252Fproducts.html [1]].
 
  
 
==AWR2243 main features==
 
==AWR2243 main features==
Line 38: Line 32:
 
** Ultra-accurate chirp engine based on Fractional-N PLL
 
** Ultra-accurate chirp engine based on Fractional-N PLL
 
* Host interface:
 
* Host interface:
** Control interface with external processor over SPI or I2C interface
+
** Control interface with an external processor over SPI or I2C interface
** Data interface with external processor over MIPI D-PHY and CSI2 v1.1
+
** Data interface with an external processor over MIPI D-PHY and CSI2 v1.1
 
** Interrupts for Fault Reporting
 
** Interrupts for Fault Reporting
 
* Support for output formats: 8-bit, 12-bit, 14-bit raw data
 
* Support for output formats: 8-bit, 12-bit, 14-bit raw data
Line 76: Line 70:
 
==Using Jetpack==
 
==Using Jetpack==
  
* Follow the instructions in [https://developer.ridgerun.com/wiki/index.php/Xavier/JetPack_5.0.2/Compiling_Code this page] to get the kernel source code.
+
* Follow the instructions in [[Xavier/JetPack_5.0.2/Compiling_Code | Compiling the Code]] to get the kernel source code.
  
* If you didn't have download the toolchain yet, follow the instructions in [https://developer.ridgerun.com/wiki/index.php/Xavier/JetPack_5.0.2/Compiling_Code#Get_the_Toolchain Get the Toolchain section)]
+
* If you didn't have downloaded the toolchain yet, follow the instructions in [[Xavier/JetPack_5.0.2/Compiling_Code#Get_the_Toolchain | Get the Toolchain section]]
  
 
* Once you have the source code, apply the patches to add the support for the AWR2243:
 
* Once you have the source code, apply the patches to add the support for the AWR2243:
  
 
<pre>
 
<pre>
cd $DEVDIR/kernel/kernel-5.10
+
cd $JETPACK/sources/
PATCHES=<path to the tarball>
+
PATCHES=<path to the provided tarball>
 
tar -xzf $PATCHES/awr2243-driver-for-tegra-xavier-nx-patches.tar.gz
 
tar -xzf $PATCHES/awr2243-driver-for-tegra-xavier-nx-patches.tar.gz
mv awr2243-driver-for-tegra-xavier-nx-patches patches
 
 
quilt push -a
 
quilt push -a
 
</pre>
 
</pre>
Line 92: Line 85:
 
Please change the path in PATCHES for the one where you downloaded the tarball with the AWR2243 patches.
 
Please change the path in PATCHES for the one where you downloaded the tarball with the AWR2243 patches.
  
Follow the instructions in [https://developer.ridgerun.com/wiki/index.php/Xavier/JetPack_5.0.2/Compiling_Code#Build_the_Kernel,_Modules,_and_DTB Build the Kernel, Modules and DTB] section to build the kernel, in the step 4 you should enable the driver support as follows:
+
Follow the instructions in [[Xavier/JetPack_5.0.2/Compiling_Code#Build_the_Kernel,_Modules,_and_DTB | Build the Kernel, Modules, and DTB]] section to build the kernel, in step 4 you should enable the driver support as follows:
  
 
[[File: devicedrivers-awr2243.png|400px|thumbnail|center|Device drivers.]]
 
[[File: devicedrivers-awr2243.png|400px|thumbnail|center|Device drivers.]]
Line 100: Line 93:
 
[[File: AWR2243driver-awr2243.png|400px|thumbnail|center|AWR2243 radar sensor support.]]
 
[[File: AWR2243driver-awr2243.png|400px|thumbnail|center|AWR2243 radar sensor support.]]
  
Then in this menu you should press <code>space</code> to mark the AWR2243 driver option with <code><M></code>, this is to load the driver as a module, which means we will have to enable it manually later on the Jetson board.
+
Then in this menu, you should press <code>space</code> to mark the AWR2243 driver option with <code><M></code>, this is to load the driver as a module, which means we will have to enable it manually later on the Jetson board.
  
Then press <code>Exit</code> in the bottom of the menu repeatedly until you see the Exit menu, press <code>Yes</code> option and you are ready to compile the sources.
+
Then press <code>Exit</code> at the bottom of the menu repeatedly until you see the Exit menu, press the <code>Yes</code> option and you are ready to compile the sources.
  
 
In summary:
 
In summary:
Line 112: Line 105:
 
       -> <M> AWR2243 radar sensor support
 
       -> <M> AWR2243 radar sensor support
 
</pre>
 
</pre>
 +
 +
Once the driver has been enabled on the menuconfig, please continue with the step 5 ([https://developer.ridgerun.com/wiki/index.php/Xavier/JetPack_5.0.2/Compiling_Code#Build_the_Kernel,_Modules,_and_DTB Build the Kernel, Modules and DTB]), in order to compile the kernel sources with the patch applied.
  
 
Now you can [https://developer.ridgerun.com/wiki/index.php/Xavier/JetPack_5.0.2/Flashing_Board#Step_4:_Execute_the_Flash_Script flash the board].
 
Now you can [https://developer.ridgerun.com/wiki/index.php/Xavier/JetPack_5.0.2/Flashing_Board#Step_4:_Execute_the_Flash_Script flash the board].
Line 117: Line 112:
 
== Using the driver ==
 
== Using the driver ==
  
After flash the board with the driver you may need an application using the Texas Instruments API for the AWR2243 to be able to communicate the radar device to the Xavier NX board. Once you have installed and instantiated the driver with <code>sudo modprobe rr_awr2243</code> you should be able to do tests like the following using your application.
+
After flashing the board with the driver you may need an application using the Texas Instruments API for the AWR2243 to be able to communicate the radar device to the Xavier NX board. Once you have installed and instantiated the driver with <code>sudo modprobe rr_awr2243</code> you should be able to do tests like the following using your application.
  
 
=== Tests ===
 
=== Tests ===
  
You can test the data receiving in the Xavier NX by running tests with <code>v4l2-ctl</code> command. For example, for 1 chirp per frame capture (chirp size=2048 bytes) you may run:
+
You can test the data received in the Xavier NX by running tests with <code>v4l2-ctl</code> command. For example, for 1 chirp per frame capture (chirp size=2048 bytes) you may run:
  
 
<pre>
 
<pre>
Line 159: Line 154:
  
 
== References ==
 
== References ==
[1] Texas Instruments. (2021). AWR2243 Single-Chip 76-to-81GHz Automotive Radar Sensor [Datasheet]. Retrieved from [https://www.ti.com/lit/ds/symlink/awr2243.pdf?ts=1687368657801&ref_url=https%253A%252F%252Fwww.ti.com%252Fsensors%252Fmmwave-radar%252Fproducts.html].
+
[1] Texas Instruments. (2021). AWR2243 Single-Chip 76-to-81GHz Automotive Radar Sensor [Datasheet]. Retrieved from [https://www.ti.com/lit/ds/symlink/awr2243.pdf?ts=1687368657801&ref_url=https%253A%252F%252Fwww.ti.com%252Fsensors%252Fmmwave-radar%252Fproducts.html AWR2243 Single-Chip 76- to 81-GHz FMCW Transceiver].
  
 
{{ContactUs}}
 
{{ContactUs}}
  
 
[[Category:Jetson]][[Category:Jetson V4L2 Drivers]]
 
[[Category:Jetson]][[Category:Jetson V4L2 Drivers]]

Latest revision as of 10:44, 27 June 2023

Nvidia-preferred-partner-badge-rgb-for-screen.png

RR Contact Us.png



The AWR2243 device is an integrated single-chip FMCW transceiver capable of operation in the 76- to 81-GHz band. The device enables unprecedented levels of integration in an extremely small form factor. AWR2243 is an ideal solution for low-power, self-monitored, ultra-accurate radar systems in the automotive space.

Simple programming model changes can enable a wide variety of sensor implementations (Short, Mid, Long) with the possibility of dynamic reconfiguration for implementing a multimode sensor. Additionally, the device is provided as a complete platform solution including reference hardware design, software drivers, sample configurations, API guide, and user documentation AWR2243 Single-Chip 76- to 81-GHz FMCW Transceiver.

AWR2243 main features

The AWR2243 is a radar sensor with the following features:

  • FMCW transceiver:
    • Integrated PLL, transmitter, receiver, baseband, and ADC
    • 76- to 81-GHz coverage with 5 GHz available bandwidth
    • Four receive channels
    • Three transmit channels
    • Ultra-accurate chirp engine based on Fractional-N PLL
  • Host interface:
    • Control interface with an external processor over SPI or I2C interface
    • Data interface with an external processor over MIPI D-PHY and CSI2 v1.1
    • Interrupts for Fault Reporting
  • Support for output formats: 8-bit, 12-bit, 14-bit raw data
  • Advanced features
    • Embedded self-monitoring with limited Host processor involvement
    • Complex baseband architecture
    • Option of cascading multiple devices to increase channel count
    • Embedded interference detection capability

Applications:

Product

RidgeRun has developed a driver for the Jetson Xavier NX platform with the following support:

  • V4l2 Media controller driver.
  • Output format: RAW8 Bayer RGGB pattern.
  • Support for 2 radar devices.
  • Support for 1 chirp/frame capture, expandable to capture a custom number of chirps/frame and a custom chirp size.
  • CQ (Chirp Quality), CP (Chirp Parameters) Metadata support.
  • Capture with v4l2src.

Currently available for:

  • AWR2243 - Jetson Xavier NX - Jetpack 5.0.2
Xavier NX-radar connections.

Enabling the driver

In order to use this driver, you have to patch and compile the kernel source.

Using Jetpack

  • Once you have the source code, apply the patches to add the support for the AWR2243:
cd $JETPACK/sources/
PATCHES=<path to the provided tarball>
tar -xzf $PATCHES/awr2243-driver-for-tegra-xavier-nx-patches.tar.gz
quilt push -a

Please change the path in PATCHES for the one where you downloaded the tarball with the AWR2243 patches.

Follow the instructions in Build the Kernel, Modules, and DTB section to build the kernel, in step 4 you should enable the driver support as follows:

Device drivers.
Multimedia Support.
Media Ancillary Drivers.
NVIDIA overlay Encoders, decoders, sensors and other helper chips.
AWR2243 radar sensor support.

Then in this menu, you should press space to mark the AWR2243 driver option with <M>, this is to load the driver as a module, which means we will have to enable it manually later on the Jetson board.

Then press Exit at the bottom of the menu repeatedly until you see the Exit menu, press the Yes option and you are ready to compile the sources.

In summary:

-> Device Drivers                                                                                                                        
 -> Multimedia support                                                                                           
   -> Media Ancillary Drivers
      -> NVIDIA overlay Encoders, decoders, sensors and other helper chips
      -> <M> AWR2243 radar sensor support

Once the driver has been enabled on the menuconfig, please continue with the step 5 (Build the Kernel, Modules and DTB), in order to compile the kernel sources with the patch applied.

Now you can flash the board.

Using the driver

After flashing the board with the driver you may need an application using the Texas Instruments API for the AWR2243 to be able to communicate the radar device to the Xavier NX board. Once you have installed and instantiated the driver with sudo modprobe rr_awr2243 you should be able to do tests like the following using your application.

Tests

You can test the data received in the Xavier NX by running tests with v4l2-ctl command. For example, for 1 chirp per frame capture (chirp size=2048 bytes) you may run:

v4l2-ctl -d /dev/video0 --set-fmt-video=width=2048,height=1,pixelformat=RGGB --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw --verbose

This will create a test.raw file containing the AWR2243 radar raw data captured by the driver, i.e:

00000000: 0900 f1ff 0300 f9ff 0600 f7ff 0100 0300  ................
00000010: f7ff feff 0600 0000 feff 0200 0500 f9ff  ................
.
.
.
000007e0: f1ff 0200 f6ff 0300 e9ff feff f5ff 0100  ................
000007f0: ffff 0600 fcff fcff f9ff f9ff f9ff 0100  ................

Performance statistics

Tegrastats in normal operation:

06-21-2023 14:56:57 RAM 1016/14901MB (lfb 3209x4MB) SWAP 0/7451MB (cached 0MB) CPU [0%@1190,0%@1190,0%@1190,0%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47.5C CPU@48C thermal@47.5C AO@47.5C GPU@47C PMIC@50C
06-21-2023 14:56:58 RAM 1016/14901MB (lfb 3209x4MB) SWAP 0/7451MB (cached 0MB) CPU [0%@1190,0%@1190,0%@1190,0%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47C CPU@48C thermal@47.5C AO@47.5C GPU@46.5C PMIC@50C
06-21-2023 14:56:59 RAM 1016/14901MB (lfb 3209x4MB) SWAP 0/7451MB (cached 0MB) CPU [0%@1190,0%@1190,0%@1190,0%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47C CPU@48C thermal@47.3C AO@47.5C GPU@46.5C PMIC@50C
06-21-2023 14:57:00 RAM 1016/14901MB (lfb 3209x4MB) SWAP 0/7451MB (cached 0MB) CPU [0%@1190,2%@1190,0%@1190,0%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47.5C CPU@48.5C thermal@47.3C AO@47.5C GPU@47C PMIC@50C

Tegrastats with the above v4l2 command:

06-21-2023 14:57:01 RAM 1018/14901MB (lfb 3208x4MB) SWAP 0/7451MB (cached 0MB) CPU [17%@1190,9%@1190,4%@1190,4%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47.5C CPU@48.5C thermal@47.15C AO@47.5C GPU@47C PMIC@50C
06-21-2023 14:57:02 RAM 1028/14901MB (lfb 3208x4MB) SWAP 0/7451MB (cached 0MB) CPU [22%@1907,15%@1907,9%@1907,29%@1907,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47.5C CPU@49C thermal@47.65C AO@47.5C GPU@47C PMIC@50C
06-21-2023 14:57:03 RAM 1045/14901MB (lfb 3207x4MB) SWAP 0/7451MB (cached 0MB) CPU [27%@1190,17%@1190,20%@1190,19%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47.5C CPU@48.5C thermal@47.65C AO@47.5C GPU@47C PMIC@50C
06-21-2023 14:57:04 RAM 1045/14901MB (lfb 3207x4MB) SWAP 0/7451MB (cached 0MB) CPU [20%@1190,12%@1190,0%@1190,0%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AUX@47.5C CPU@48.5C thermal@47.65C AO@47.5C GPU@47C PMIC@50C

References

[1] Texas Instruments. (2021). AWR2243 Single-Chip 76-to-81GHz Automotive Radar Sensor [Datasheet]. Retrieved from AWR2243 Single-Chip 76- to 81-GHz FMCW Transceiver.


RidgeRun Resources

Quick Start Client Engagement Process RidgeRun Blog Homepage
Technical and Sales Support RidgeRun Online Store RidgeRun Videos Contact Us

OOjs UI icon message-progressive.svg Contact Us

Visit our Main Website for the RidgeRun Products and Online Store. RidgeRun Engineering informations are available in RidgeRun Professional Services, RidgeRun Subscription Model and Client Engagement Process wiki pages. Please email to support@ridgerun.com for technical questions and contactus@ridgerun.com for other queries. Contact details for sponsoring the RidgeRun GStreamer projects are available in Sponsor Projects page. Ridgerun-logo.svg
RR Contact Us.png