Mbed-os: RTC set/get time issue on NCS36510

Created on 12 Oct 2017  路  14Comments  路  Source: ARMmbed/mbed-os

Description

  • Type: Bug
  • Priority: Major

Bug

Target
NCS36510

Toolchain:
GCC_ARM|ARM|IAR

mbed-cli version:
1.2.0

mbed-os sha:
47c890da8

Expected behavior
When RTC time value is set and read in sequence, then set value should be returned by the read function.
After setting RTC time we should have about 1 second to finish read operation. It is long enough to assume that the set value should be read.

Actual behavior
On NCS36510 board if we perform time set and get operations in sequence, then it looks like about 60 sec have elapsed between set and get operations.

Steps to reproduce

set_time(1256729737);
seconds = time(NULL);
TEST_ASSERT_EQUAL(1256729737, seconds);  // FAIL: Expected 1256729737 Was 1256729797
hal onsemi bug

Most helpful comment

GitHub linked them so I don't think there's point in reopening it, lets just make sure the fix gets in :)

All 14 comments

cc @danclement @jacobjohnson-ON @maclobdell

FYI, there is no posted documentation that I could find that would make it clear the RTC is associated with this set_time and time functions... Can you link me to something?

I have no idea why this wouldn't work. We will have to look into it.

@danclement
Hi, the source code of set_time() and time() functions indicates that time is based on RTC:
https://github.com/ARMmbed/mbed-os/blob/master/platform/mbed_rtc_time.h
https://github.com/ARMmbed/mbed-os/blob/master/platform/mbed_rtc_time.cpp

@danclement Any update?

Sorry, no updates yet. Resource and priority issues. Same for the other issues.

We talked to @maclobdell about this and we discussed that we need some time to resolve, likely several weeks.

@mprse @danclement Has any progress been made on this?

@mprse @danclement Has any progress been made on this?

No progress. Maybe in the near feature I will have NCS36510 board, then I'll try to investigate and fix the problem.

That is open for 3 months now, to get that merge we should remove the RTC capabilities of this device. @maclobdell what are your thoughts?

As I informed Mac a while back we have put our mbed project on hold for now. We will try to pick it up again in Q218.

@danclement Thanks for the update. For the time being, I'll close this issue.

Feel free to reopen it or create a new issue when the time is appropriate.

@mprse Until this is resolved, we shall disable RTC for this target (separate commit that references this issue, so we can revert it once the fix is in place).

Can we re-enable this issue?

I have provided fix here: PR# https://github.com/ARMmbed/mbed-os/pull/6852.

GitHub linked them so I don't think there's point in reopening it, lets just make sure the fix gets in :)

PR# #6852 has been merged. RTC support has been re-enabled for NCS36510.
Issue has been fixed.

Was this page helpful?
0 / 5 - 0 ratings