This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3235S: How can I hook the 'set device real-time clock' event

Part Number: CC3235S

In my project, the user has the ability to set the time/date on the device using the button on the built-in configuration pages

Is there a way for my user code to detect the fact this has been done - e.g. by setting a callback?

Alternatively, is there a way to extend or alter the code behind the 'set clock from PC' button?

  • Are you referring to the out-of-the-box example?

    The sources and html files  (in this case the "www/settings.html" is the relevant code) are in available in the SDK.

    The time is being read periodically (you can update the html if needed) so it verifies that the setting was successful

  • No, this is a custom application.  My requirement is for the application to "know" whether the RTC has been set when it is woken out of Hibernate, and ideally be able to log the event.

    On initial power up, the time is obviously not set, so I can use the fact the reset is a POR rather than a Hibernate to determine that the user should set the clock.  However, if the user sends the device back to sleep (as is part of the work flow for the user) but does NOT set the RTC, then when I come back out of Hibernate, I have no way of knowing that the clock has been set.

    For me the ideal solution would be if - when the user uses the button to set the clock (in the built in HTML 'settings') - an event to be raised (e.g. by callback) so that my application can take the necessary actions.

    As this is a battery powered application, I can't simply poll the RTC and look for "jumps".

  • There is no event associated to the date setting (or any other setting), but you can use the HTTP server to send an event to host (check for example the SimpleLinkNetAppRequestEventHandler() in chapter 9.7 of the programmer's guide).