tests/kernel/sleep: relax upper bound for TI CC13X2/CC26X2 RTC

The RTC on TI CC13X2/CC26X2 is a 32 KHz clock for which the minimum
compare delay is 3 ticks. When using it as the system clock, we need
to relax the upper bound to ensure the test succeeds.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit is contained in:
Vincent Wan 2019-09-13 16:32:27 -07:00 committed by Kumar Gala
commit 2930d000ff

View file

@ -26,6 +26,14 @@
#if defined(CONFIG_NRF_RTC_TIMER) && (CONFIG_SYS_CLOCK_TICKS_PER_SEC > 16384)
#define MAXIMUM_SHORTEST_TICKS 3
/*
* Similar situation for TI CC13X2/CC26X2 RTC due to the limitation
* that a value too close to the current time cannot be loaded to
* its comparator.
*/
#elif defined(CONFIG_CC13X2_CC26X2_RTC_TIMER) && \
(CONFIG_SYS_CLOCK_TICKS_PER_SEC > 16384)
#define MAXIMUM_SHORTEST_TICKS 3
#else
#define MAXIMUM_SHORTEST_TICKS 1
#endif