Skip to content

Commit b5faf5c

Browse files
committed
[nrf fromlist] tests: boards: nrf: comp: Enable test on nRF54L20
Test uses AIN4 and AIN5. Unfortunately, these inputs on nRF54L20 are used by serial port console. When test is compiled for nRF54L20, use other anlogue inputs. Upstream PR #: 88745 Signed-off-by: Sebastian Głąb <[email protected]>
1 parent 624643e commit b5faf5c

File tree

1 file changed

+12
-2
lines changed
  • tests/boards/nrf/comp/src

1 file changed

+12
-2
lines changed

tests/boards/nrf/comp/src/test.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,30 @@ static const struct gpio_dt_spec test_pin_2 = GPIO_DT_SPEC_GET(DT_PATH(zephyr_us
1515

1616

1717
struct comp_nrf_comp_se_config comp_se_config = {
18+
#if defined(CONFIG_BOARD_NRF54LM20APDK)
19+
.psel = COMP_NRF_COMP_PSEL_AIN1,
20+
.extrefsel = COMP_NRF_COMP_EXTREFSEL_AIN5,
21+
#else
1822
.psel = COMP_NRF_COMP_PSEL_AIN5,
23+
.extrefsel = COMP_NRF_COMP_EXTREFSEL_AIN1,
24+
#endif
1925
.sp_mode = COMP_NRF_COMP_SP_MODE_HIGH,
2026
.isource = COMP_NRF_COMP_ISOURCE_DISABLED,
2127
.refsel = COMP_NRF_COMP_REFSEL_AREF,
22-
.extrefsel = COMP_NRF_COMP_EXTREFSEL_AIN1,
2328
.th_up = 32,
2429
.th_down = 32,
2530
};
2631

2732
struct comp_nrf_comp_diff_config comp_diff_config = {
33+
#if defined(CONFIG_BOARD_NRF54LM20APDK)
34+
.psel = COMP_NRF_COMP_PSEL_AIN3,
35+
.extrefsel = COMP_NRF_COMP_EXTREFSEL_AIN1,
36+
#else
2837
.psel = COMP_NRF_COMP_PSEL_AIN4,
38+
.extrefsel = COMP_NRF_COMP_EXTREFSEL_AIN5,
39+
#endif
2940
.sp_mode = COMP_NRF_COMP_SP_MODE_LOW,
3041
.isource = COMP_NRF_COMP_ISOURCE_DISABLED,
31-
.extrefsel = COMP_NRF_COMP_EXTREFSEL_AIN5,
3242
.enable_hyst = true,
3343
};
3444

0 commit comments

Comments
 (0)