SiWx91x Calendar AT Commands#
This section describes AT commands for controlling the calendar peripheral on the SiWx91x device. These commands allow you to configure the calendar for time-based operations.
Commands#
cal-start#
Configures the alarm for the Calendar peripheral.
Command Format#
at+cal-start=<time_ms>
Related SDK APIs
Pre-conditions#
None
Parameters#
time_ms#
The time duration in milliseconds after which the alarm should be triggered.
Response#
OK
in case of successERROR <error code>
in case of failure. Possible error codes are the same as those returned by the various APIs invoked by this command (see Notes below).
Notes#
This command invokes the following SDK APIs:
sl_si91x_calendar_init when this command is issued for the first time.
sl_si91x_calendar_build_datetime_struct and sl_si91x_calendar_set_date_time to configure the date and time.
sl_si91x_calendar_set_alarm to set the alarm date and time, calculated using the
time_ms
parameter.sl_si91x_calendar_unregister_alarm_trigger_callback to un-register the alarm callback if this command was previously invoked at least once.
sl_si91x_calendar_register_alarm_trigger_callback to register the alarm callback.
Examples#
// Set alarm after 6 seconds
at+cal-start=6000
cal-stop#
Stops the calendar alarm and unregisters the alarm callback.
Command Format#
at+cal-stop
Related SDK APIs
sl_si91x_calendar_rtc_stop to stop the calendar peripheral.
Pre-conditions#
The calendar alarm must have been started using at+cal-start
.
Parameters#
None
Response#
OK
in case of successERROR <error code>
in case of failure. Possible error codes are the same as those returned by the various APIs invoked by this command.
Notes#
This command disables the alarm by unregistering the alarm trigger callback.
Examples#
// Stop the calendar alarm
at+cal-stop