Skip to content

rtl8195am : fix greentea test fails (test_timeout & test_timerevent) #6522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions TESTS/mbed_drivers/timeout/timeout_tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ void test_no_wait(void)
Semaphore sem(0, 1);
T timeout;
timeout.attach_callback(mbed::callback(sem_callback, &sem), 0ULL);
#if defined(TARGET_RTL8195A)
wait_us(62);
#endif

int32_t sem_slots = sem.wait(0);
TEST_ASSERT_EQUAL(1, sem_slots);
Expand Down
6 changes: 6 additions & 0 deletions TESTS/mbed_drivers/timerevent/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ class TestTimerEventAbsolute: public TestTimerEvent {

void set_past_timestamp(void) {
insert_absolute(::ticker_read_us(_ticker_data) - 1ULL);
#if defined(TARGET_RTL8195A)
wait_us(62);
#endif
}
};

Expand Down Expand Up @@ -160,6 +163,9 @@ void test_insert_zero(void) {
TestTimerEvent tte;

tte.insert_absolute(0ULL);
#if defined(TARGET_RTL8195A)
wait_us(62);
#endif
int32_t sem_slots = tte.sem_wait(0);
TEST_ASSERT_EQUAL(1, sem_slots);

Expand Down