Skip to content

Commit fa69daa

Browse files
pillo79cfriedt
authored andcommitted
arduino_uno_q: enable CI tests
Enable relevant Twister tests for the Arduino Uno Q board. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
1 parent 10d35ce commit fa69daa

File tree

8 files changed

+109
-1
lines changed

8 files changed

+109
-1
lines changed

boards/arduino/uno_q/arduino_uno_q.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,19 @@ toolchain:
77
- gnuarmemb
88
ram: 786
99
flash: 2048
10+
supported:
11+
- arduino_i2c
12+
- arduino_spi
13+
- hts221
14+
- dma
15+
- spi
16+
- dac
17+
- adc
18+
- watchdog
19+
- nvs
20+
- pwm
21+
- counter
22+
- i2c
23+
- rtc
24+
# - usbd # enable usbotg_fs in DTS
1025
vendor: arduino
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
&stm32_lp_tick_source {
2+
/*
3+
* Default LPTIM period is 2 seconds. This means that application will
4+
* be woken up every 2 seconds to reload its counter.
5+
* This behavior can be tuned in 2 ways:
6+
*
7+
* A] Extend the default period by setting a prescaler.
8+
* New period = 2sec * st,prescaler
9+
* Check the lptim bindings to see the impact on CONFIG_SYS_CLOCK_TICKS_PER_SEC
10+
* and LPTIM precision.
11+
* B] Provide the LPTIM timeout definition.
12+
* In this case New period = st,timeout
13+
* Then st,prescaler should be defined with the following constraint:
14+
* st,timeout < st,prescaler * 2
15+
*/
16+
17+
/* The following setting will define LPTIM period as 32 sec */
18+
st,prescaler = <16>;
19+
20+
/* Uncomment this line to have LPTIM period of 5 seconds */
21+
/* st,timeout = <5>; */
22+
};
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright (c) 2023 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&cpu0 {
8+
/* USART Wakeup requires automatic HSI16 switch on in deepsleep mode
9+
* which isn't possible in Stop Mode 2.
10+
* Remove Stop Mode 2 from supported modes
11+
*/
12+
cpu-power-states = <&stop0 &stop1>;
13+
};
14+
15+
&usart1 {
16+
/* Set domain clock to HSI to allow wakeup from Stop mode */
17+
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>,
18+
<&rcc STM32_SRC_HSI16 USART1_SEL(2)>;
19+
20+
/* Configure device as wakeup source */
21+
wakeup-source;
22+
23+
/* Enable FIFO to avoid losing chars on device wakeup */
24+
fifo-enable;
25+
26+
/* Configure sleep pinctrl configuration which will be used when
27+
* device is not configured as wakeup source by the application.
28+
* This use case is only applicable in PM_DEVICE mode.
29+
*/
30+
pinctrl-1 = <&analog_pa9 &analog_pa10>;
31+
pinctrl-names = "default", "sleep";
32+
};
33+
34+
&clk_hsi {
35+
/* Make sure HSI is enabled */
36+
status = "okay";
37+
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/ {
2+
zephyr,user {
3+
dac = <&dac1>;
4+
dac-channel-id = <1>;
5+
dac-resolution = <12>;
6+
};
7+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_I2C_STM32_INTERRUPT=y
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* SPDX-License-Identifier: Apache-2.0 */
2+
3+
/* One I2C interface (i2c2) is exposed on the SDA/SCL pins from JDIGITAL.
4+
* The other (i2c4) is on the Qwiiic connector, pins 3 (SCL) and 4 (SDA).
5+
*
6+
* Short the same nets together for the test to pass.
7+
*/
8+
9+
/ {
10+
aliases {
11+
i2c-controller = &i2c2;
12+
i2c-controller-target = &i2c4;
13+
};
14+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
dut: &usart1 {
8+
dmas = <&gpdma1 0 25 STM32_DMA_PERIPH_TX>,
9+
<&gpdma1 1 24 STM32_DMA_PERIPH_RX>;
10+
dma-names = "tx", "rx";
11+
};

tests/drivers/dac/dac_api/src/test_dac.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
defined(CONFIG_BOARD_NUCLEO_U575ZI_Q) || \
3636
defined(CONFIG_BOARD_NUCLEO_U5A5ZJ_Q) || \
3737
defined(CONFIG_BOARD_NUCLEO_WL55JC) || \
38-
defined(CONFIG_BOARD_RONOTH_LODEV)
38+
defined(CONFIG_BOARD_RONOTH_LODEV) || \
39+
defined(CONFIG_BOARD_ARDUINO_UNO_Q)
3940

4041
#define DAC_DEVICE_NODE DT_NODELABEL(dac1)
4142
#define DAC_CHANNEL_ID 1

0 commit comments

Comments
 (0)