Skip to content

Commit 20efb9e

Browse files
nika-nordiccfriedt
authored andcommitted
tests: nrf: comp: fix VDD reference dependency
Some SoCs might not have any VDD reference available. Use internal 1.2V reference derived from VDD in this case. Signed-off-by: Nikodem Kastelik <[email protected]>
1 parent 04f7fc5 commit 20efb9e

File tree

1 file changed

+4
-1
lines changed
  • tests/boards/nrf/comp/src

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,11 @@ ZTEST(comparator_runtime_configure, test_comp_config_se_vdd)
9393

9494
#ifdef COMP_REFSEL_REFSEL_AVDDAO1V8
9595
conf.refsel = COMP_NRF_COMP_REFSEL_AVDDAO1V8;
96-
#else
96+
#elif defined(COMP_REFSEL_REFSEL_VDD)
9797
conf.refsel = COMP_NRF_COMP_REFSEL_VDD;
98+
#else
99+
/* Use internal 1.2 V derived from VDD */
100+
conf.refsel = COMP_NRF_COMP_REFSEL_INT_1V2;
98101
#endif
99102
rc = comp_nrf_comp_configure_se(test_dev, &conf);
100103
zassert_equal(rc, 0, "Cannot configure comparator.");

0 commit comments

Comments
 (0)