boards: cc13x2/cc26x2*: add ADC sample + update docs
Add ADC driver sample overlays + update features in doc + metadata for TI CC13x2/CC26x2 based boards (cc1352r_sensortag, cc1352r1_launchxl, cc26x2r1_launchxl). Signed-off-by: Stancu Florin <niflostancu@gmail.com>
This commit is contained in:
parent
42915e498e
commit
b9f462e890
12 changed files with 108 additions and 0 deletions
|
@ -83,6 +83,10 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&adc0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
current-speed = <115200>;
|
||||
|
|
|
@ -12,3 +12,4 @@ supported:
|
|||
- gpio
|
||||
- i2c
|
||||
- spi
|
||||
- adc
|
||||
|
|
|
@ -53,6 +53,8 @@ features:
|
|||
+-----------+------------+----------------------+
|
||||
| SPI | on-chip | spi |
|
||||
+-----------+------------+----------------------+
|
||||
| AUX_ADC | on-chip | adc |
|
||||
+-----------+------------+----------------------+
|
||||
|
||||
Other hardware features have not been enabled yet for this board.
|
||||
|
||||
|
|
|
@ -94,6 +94,10 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&adc0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
current-speed = <115200>;
|
||||
|
|
|
@ -12,3 +12,4 @@ supported:
|
|||
- gpio
|
||||
- i2c
|
||||
- spi
|
||||
- adc
|
||||
|
|
|
@ -53,6 +53,8 @@ features:
|
|||
+-----------+------------+------------------+
|
||||
| SPI | on-chip | spi |
|
||||
+-----------+------------+------------------+
|
||||
| AUX_ADC | on-chip | adc |
|
||||
+-----------+------------+------------------+
|
||||
| DIO23 | off-chip | DRV5032 |
|
||||
+-----------+------------+------------------+
|
||||
| I2C | off-chip | HDC2080 |
|
||||
|
|
|
@ -83,6 +83,10 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&adc0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
current-speed = <115200>;
|
||||
|
|
|
@ -12,3 +12,4 @@ supported:
|
|||
- gpio
|
||||
- i2c
|
||||
- spi
|
||||
- adc
|
||||
|
|
|
@ -53,6 +53,8 @@ features:
|
|||
+-----------+------------+----------------------+
|
||||
| SPI | on-chip | spi |
|
||||
+-----------+------------+----------------------+
|
||||
| AUX_ADC | on-chip | adc |
|
||||
+-----------+------------+----------------------+
|
||||
|
||||
Other hardware features have not been enabled yet for this board.
|
||||
|
||||
|
|
29
samples/drivers/adc/boards/cc1352r1_launchxl.overlay
Normal file
29
samples/drivers/adc/boards/cc1352r1_launchxl.overlay
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Florin Stancu <niflostancu@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/adc/adc.h>
|
||||
|
||||
/ {
|
||||
zephyr,user {
|
||||
/* 0x5 is ADC_COMPB_IN_VDDS (power supply measurement) */
|
||||
io-channels = <&adc0 0x5>;
|
||||
};
|
||||
};
|
||||
|
||||
&adc0 {
|
||||
status = "okay";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel@5 {
|
||||
reg = <5>;
|
||||
zephyr,gain = "ADC_GAIN_1";
|
||||
zephyr,reference = "ADC_REF_INTERNAL";
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||
zephyr,resolution = <12>;
|
||||
};
|
||||
};
|
29
samples/drivers/adc/boards/cc1352r_sensortag.overlay
Normal file
29
samples/drivers/adc/boards/cc1352r_sensortag.overlay
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Florin Stancu <niflostancu@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/adc/adc.h>
|
||||
|
||||
/ {
|
||||
zephyr,user {
|
||||
/* 0x5 is ADC_COMPB_IN_VDDS (power supply measurement) */
|
||||
io-channels = <&adc0 0x5>;
|
||||
};
|
||||
};
|
||||
|
||||
&adc0 {
|
||||
status = "okay";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel@5 {
|
||||
reg = <5>;
|
||||
zephyr,gain = "ADC_GAIN_1";
|
||||
zephyr,reference = "ADC_REF_INTERNAL";
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||
zephyr,resolution = <12>;
|
||||
};
|
||||
};
|
29
samples/drivers/adc/boards/cc26x2r1_launchxl.overlay
Normal file
29
samples/drivers/adc/boards/cc26x2r1_launchxl.overlay
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Florin Stancu <niflostancu@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/adc/adc.h>
|
||||
|
||||
/ {
|
||||
zephyr,user {
|
||||
/* 0x5 is ADC_COMPB_IN_VDDS (power supply measurement) */
|
||||
io-channels = <&adc0 0x5>;
|
||||
};
|
||||
};
|
||||
|
||||
&adc0 {
|
||||
status = "okay";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel@5 {
|
||||
reg = <5>;
|
||||
zephyr,gain = "ADC_GAIN_1";
|
||||
zephyr,reference = "ADC_REF_INTERNAL";
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||
zephyr,resolution = <12>;
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue