The system controller timer service is responsible for:
Some of the features implemented by this watchdog service are:
- Update of the watchdog timeout
- Start/stop of the watchdog
- Refresh of the watchdog
- Return of the watchdog status such as maximum watchdog timeout that can be set, watchdog timeout interval, and watchdog timeout interval remaining.
Since this is usually handled by the OS itself no examples are provided in this guide.
- Set/get time
- Setting alarms
Only the partition that owns the SC_R_SYSTEM resource is allowed to set the time, alarms and calibration values for the RTC. All other partitions are able to read the RTC time.
Here is an example on setting the RTC from the M4 side:
struct time_date{
uint16_t year;
uint8_t month;
uint8_t day;
uint8_t hour;
uint8_t min;
uint8_t sec;
} rtc_time;
sc_err_t sc_status;
sc_ipc_t ipc;
/* Open IPC channel */
sc_status = sc_ipc_open(&ipc, SC_IPC_AP_CH0);
if(sc_status != SC_ERR_NONE)
printf("Error opening Inter Processor Channel\n");
/* Initialize RTC */
/* Hard code RTC time to January 5th 2018 at 12:00 hours */
sc_status = sc_timer_set_rtc_time(ipcHandle, 2018, 1, 5, 12, 0, 0);
if(sc_status != SC_ERR_NONE)
printf("Error initializing RTC. \r\n");
/* Return time */
sc_status = sc_timer_get_rtc_time(ipcHandle, &(rtc_time.year), &(rtc_time.month), &(rtc_time.day), &(rtc_time.hour), &(rtc_time.min), &(rtc_time.sec));
printf("Year: %d, Month: %d, Day: %d, Hour: %d, Minutes: %d, Seconds: %d. \r\n", rtc_time.year, rtc_time.month, rtc_time.day, rtc_time.hour, rtc_time.min, rtc_time.sec);