Skip to content

Commit

Permalink
boards: st: add adc node in dts file and update docs
Browse files Browse the repository at this point in the history
-enable adc in nucleo_u031r8, stm32u083c_dk and nucleo_u083rc
- add adc as new supported interface in docs
- update yaml files

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
  • Loading branch information
djiatsaf-st authored and fabiobaltieri committed Sep 27, 2024
1 parent 301111e commit 293eb22
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 0 deletions.
3 changes: 3 additions & 0 deletions boards/st/nucleo_u031r8/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,16 @@ The Zephyr _nucleo_u031r8_ board configuration supports the following hardware f
+-----------+------------+-------------------------------------+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| ADC | on-chip | adc |
+-----------+------------+-------------------------------------+
| DAC | on-chip | DAC Controller |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
| PWM | on-chip | pwm |
+-----------+------------+-------------------------------------+


Other hardware features are not yet supported on this Zephyr port.

The default configuration can be found in the defconfig file:
Expand Down
9 changes: 9 additions & 0 deletions boards/st/nucleo_u031r8/nucleo_u031r8.dts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@
clock-frequency = <I2C_BITRATE_FAST>;
};

&adc1 {
pinctrl-0 = <&adc1_in0_pc0 &adc1_in1_pc1>;
pinctrl-names = "default";
st,adc-clock-source = <SYNC>;
st,adc-prescaler = <4>;
status = "okay";
vref-mv = <3300>;
};

&timers1 {
st,prescaler = <10000>;
status = "okay";
Expand Down
1 change: 1 addition & 0 deletions boards/st/nucleo_u031r8/nucleo_u031r8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ toolchain:
- zephyr
supported:
- arduino_gpio
- adc
- dac
- gpio
- i2c
Expand Down
2 changes: 2 additions & 0 deletions boards/st/nucleo_u083rc/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ The Zephyr nucleo_u083rc board configuration supports the following hardware fea
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| ADC | on-chip | adc |
+-----------+------------+-------------------------------------+
| DAC | on-chip | DAC Controller |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
Expand Down
11 changes: 11 additions & 0 deletions boards/st/nucleo_u083rc/nucleo_u083rc.dts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@
clock-frequency = <I2C_BITRATE_FAST>;
};

&adc1 {
pinctrl-0 = <&adc1_in0_pc0 &adc1_in1_pc1>;
pinctrl-names = "default";
st,adc-clock-source = <ASYNC>;
clocks = <&rcc STM32_CLOCK_BUS_APB1_2 0x00100000>,
<&rcc STM32_SRC_HSI ADC_SEL(2)>;
st,adc-prescaler = <4>;
status = "okay";
vref-mv = <3300>;
};

&timers1 {
st,prescaler = <10000>;
status = "okay";
Expand Down
1 change: 1 addition & 0 deletions boards/st/nucleo_u083rc/nucleo_u083rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ toolchain:
- gnuarmemb
- xtools
supported:
- adc
- arduino_gpio
- dac
- gpio
Expand Down
2 changes: 2 additions & 0 deletions boards/st/stm32u083c_dk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ The Zephyr stm32u083c_dk board configuration supports the following hardware fea
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| ADC | on-chip | adc |
+-----------+------------+-------------------------------------+
| DAC | on-chip | DAC Controller |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
Expand Down
11 changes: 11 additions & 0 deletions boards/st/stm32u083c_dk/stm32u083c_dk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@
apb1-prescaler = <1>;
};

&adc1 {
pinctrl-0 = <&adc1_in0_pc0 &adc1_in1_pc1>;
pinctrl-names = "default";
st,adc-clock-source = <ASYNC>;
clocks = <&rcc STM32_CLOCK_BUS_APB1_2 0x00100000>,
<&rcc STM32_SRC_HSI ADC_SEL(2)>;
st,adc-prescaler = <4>;
status = "okay";
vref-mv = <3300>;
};

&dac1 {
status = "okay";
pinctrl-0 = <&dac1_out1_pa4>;
Expand Down
1 change: 1 addition & 0 deletions boards/st/stm32u083c_dk/stm32u083c_dk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ toolchain:
- gnuarmemb
- xtools
supported:
- adc
- arduino_gpio
- dac
- gpio
Expand Down

0 comments on commit 293eb22

Please sign in to comment.