> For the complete documentation index, see [llms.txt](https://amobile-solutions.gitbook.io/yocto-developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amobile-solutions.gitbook.io/yocto-developer-guide/test-and-use-the-interface/rtc.md).

# RTC

{% hint style="info" %}
The following instructions utilize the SD510 for demonstration purposes. These procedures are applicable to other development boards.
{% endhint %}

## Setting the RTC

Set the system date & time:

```
date --set="20250220 23:59"
```

Then set the HW RTC using the system date & time:

```
hwclock --systohc --utc
```

Power down your board, wait 5 minutes and power up again, then check you system date & time and verify it is correct:

```
date
```

## Wakeup using the RTC

The SBC-MB510 uses the MCP7940N (RTC0), which does not support RTC wakeup functionality. To enable RTC wakeup, the MT6359rtc (RTC1) must be used.

### Using rtcwake command

Assuming the your board implement RTC1 wakeup capabilities, ensure RTC1 and system time are synchronized

```
hwclock -f /dev/rtc0 -r | date -d "$(cat -)" '+%Y-%m-%d %H:%M:%S' | hwclock -f /dev/rtc1 --set --date="$(cat -)"
```

then set the RTC to wakeup after 10 seconds type:

```
rtcwake -d rtc1 -m mem -s 10
```

For example:

```
root@sd510:~# rtcwake -d rtc1 -m mem -s 10
rtcwake: wakeup from "mem" using rtc1 at Thu Feb  6 08:25:46 2025
```
