Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 7 months ago.
RTC fail in the newest mbed SDK test-suit on NRF51822 platform
Hi,
I want to create a new platform on mbed sebsite, and the solution is NRF51822 BLE SOC. I use command "singletest.py -i test_spec.json -M muts_all.json -t -v" to auto test mbed SDK and all pass, except MBED_16 RTC test and the result is fail. I think the DRF51822 platform doesn't implement rtc_api.c and DEVICE_RTC is off in device.h. Why is the rtc test also fail when I implement rtc_api.c? Or can I ignore this item?
Thanks Marco
2 Answers
9 years, 7 months ago.
RTC is not implemented for any platform based on nrf51822. THere's a new pull request, using RTC as us ticker https://github.com/mbedmicro/mbed/pull/932, so that one sets RTC1 for us ticker. Is there any other RTC module left? I recall RTC0 is used by SoftDevice?
Hi Martin,
Thanks your reply.
The mbed official document shows us it is necessary to pass all basic tests that include MBED_16, RTC, item.
I am confused about two things listed below:
1, On the earlier mbed sdk, the MBED_16, RTC, is passed, but on the newest version, it is failed. I think the earlier mbed SDK is reasonable, because on the platform based on NRF51822, it is not necessary to support RTC. Can we ignore this MBED_16 item when we run auto-test?
2, Why is it fail? Even I have implement rtc_api.c and set DEVICE_RTC = 1 in device.h. The result looks ok, it can count with time, but finally the mbed auto-test judges the item MBED_16, RTC, fail yet. Do I miss something?
Thanks Marco
posted by 17 Mar 20159 years, 7 months ago.
Hello Marco,
Can you issue: "singletest.py -i test_spec.json -M muts_all.json -t -n MBED_16 -V" command (see capital V in -V. Maybe there is an error in RTC test case. I can investigate, can you send me printout from above command (as text)?
Przemek
Hi Przemek,
Please check the post above. There is a screenshot that run "singletest.py -i test_spec.json -M muts_all.json -t -n MBED_16 -V" command. The RTC is counting. but result is failure.
Thanks Marco
posted by 17 Mar 2015Oh, yes. I can see. I will have a look at that today :) Thank you for reporting.
posted by 17 Mar 2015Marco, I found where problem is. Test is designed to capture time (in sec) from RTC > 0 so when you run your test from time == 0 on device we got first fail and whole test fails.
I will modify host test part of RTC test but please make sure your RTC can set time using set_time. Because MBED_16 test case sets time to "Wed, 28 Oct 2009 11:35:37" and prints time very one sec. And your test prints time from timestamp =-= 0, so set_time() didn't work in your case ?
MY action would be to modify RTC test so it will work with applied time == 0 but we still expect this test drives time from timestamp > 0 and set to "Wed, 28 Oct 2009 11:35:37".
Rationale, test case is designed to follow RTC from a given > 0 timestamp. So this situation is not implemented:
#define CUSTOM_TIME 1256729737 . set_time(CUSTOM_TIME); // Set RTC time to Wed, 28 Oct 2009 11:35:37
I've reproduced this issue easily:
MBED: [0] [1970-01-01 00:00:00 AM] 1970-01-01 00:00:00 AM 1970-01-01 00:00:00 AM 0 0 HOST: [0] [1970-01-01 00:00:00 AM] received time +0 sec after 0.04 sec... FAIL MBED: [1] [1970-01-01 00:00:01 AM] 1970-01-01 00:00:01 AM 1970-01-01 00:00:01 AM 1 0 HOST: [1] [1970-01-01 00:00:01 AM] received time +1 sec after 1.04 sec... OK MBED: [2] [1970-01-01 00:00:02 AM] 1970-01-01 00:00:02 AM 1970-01-01 00:00:02 AM 2 1 HOST: [2] [1970-01-01 00:00:02 AM] received time +1 sec after 1.03 sec... OK MBED: [3] [1970-01-01 00:00:03 AM] 1970-01-01 00:00:03 AM 1970-01-01 00:00:03 AM 3 2 HOST: [3] [1970-01-01 00:00:03 AM] received time +1 sec after 1.04 sec... OK MBED: [4] [1970-01-01 00:00:04 AM] 1970-01-01 00:00:04 AM 1970-01-01 00:00:04 AM 4 3 HOST: [4] [1970-01-01 00:00:04 AM] received time +1 sec after 1.03 sec... OK