Skip to content

Commit 39e73fe

Browse files
etienne-lmskartben
authored andcommitted
tests: drivers: i2c: i2c_target_api: add nucleo_h503rb board
Add ST nucleo_h503rb board to I2C driver i2c_target_api test. The board configuration make it testing transfer of 300 bytes data to ensure the ReloadMode of the SoC I2C controller nicely handles exchanges of more than 256 byte. Signed-off-by: Etienne Carriere <[email protected]>
1 parent 81b76e0 commit 39e73fe

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_I2C_STM32_INTERRUPT=y
2+
CONFIG_I2C_TEST_DATA_MAX_SIZE=300
3+
CONFIG_I2C_VIRTUAL=n
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/* I2C bus pins are exposed on the ST morpho header.
7+
*
8+
* Bus SDA SCL
9+
* Pin Hdr Pin Hdr
10+
* i2c1 PB7 CN5:9 PB6 CN5:10/CN10:3
11+
* i2c2 PB4 CN9:6/CN10:27 PB5 CN9:5/CN10:29
12+
*
13+
* Short Pin PB7 to PB4, and PB6 to PB5, for the test to pass.
14+
*/
15+
16+
&i2c1 {
17+
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>;
18+
pinctrl-names = "default";
19+
status = "okay";
20+
clock-frequency = <I2C_BITRATE_FAST>;
21+
22+
eeprom1: eeprom@10 {
23+
compatible = "zephyr,i2c-target-eeprom";
24+
reg = <0x10>;
25+
address-width = <16>;
26+
size = <1024>;
27+
};
28+
};
29+
30+
&i2c2 {
31+
pinctrl-0 = <&i2c2_scl_pb5 &i2c2_sda_pb4>;
32+
pinctrl-names = "default";
33+
clock-frequency = <I2C_BITRATE_FAST>;
34+
status = "okay";
35+
36+
eeprom0: eeprom@18 {
37+
compatible = "zephyr,i2c-target-eeprom";
38+
reg = <0x18>;
39+
address-width = <16>;
40+
size = <1024>;
41+
};
42+
};

tests/drivers/i2c/i2c_target_api/testcase.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ tests:
2424
- nucleo_f207zg
2525
- nucleo_f401re
2626
- nucleo_f429zi
27+
- nucleo_h503rb
2728
- nucleo_wl55jc
2829
- nucleo_l073rz
2930
- nucleo_l152re

0 commit comments

Comments
 (0)