File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ void sleep_usticker_test()
105
105
106
106
const ticker_irq_handler_type us_ticker_irq_handler_org = set_us_ticker_irq_handler(us_ticker_isr);
107
107
108
+ // call ticker_read_us to initialize ticker upper layer
109
+ // prevents subsequent scheduling of max_delta interrupt during ticker initialization while test execution
110
+ // (e.g when ticker_read_us is called)
111
+ ticker_read_us(ticker);
112
+
108
113
/* Test only sleep functionality. */
109
114
sleep_manager_lock_deep_sleep();
110
115
TEST_ASSERT_FALSE_MESSAGE(sleep_manager_can_deep_sleep(), "deep sleep should be locked");
@@ -143,6 +148,11 @@ void deepsleep_lpticker_test()
143
148
const unsigned int ticker_freq = ticker->interface ->get_info ()->frequency ;
144
149
const unsigned int ticker_width = ticker->interface ->get_info ()->bits ;
145
150
151
+ // call ticker_read_us to initialize ticker upper layer
152
+ // prevents subsequent scheduling of max_delta interrupt during ticker initialization while test execution
153
+ // (e.g when ticker_read_us is called)
154
+ ticker_read_us (ticker);
155
+
146
156
const ticker_irq_handler_type lp_ticker_irq_handler_org = set_lp_ticker_irq_handler (lp_ticker_isr);
147
157
148
158
/* Give some time Green Tea to finish UART transmission before entering
You can’t perform that action at this time.
0 commit comments