swtmr

Command Function

This command is used to query information about system software timers.

Syntax

swtmr [ID]

Parameters

Table 1 Parameter description

Parameter

Description

Value Range

ID

Specifies the ID of a software timer.

[0,0xFFFFFFFF]

Usage

  • If no parameter is specified, information about all software timers is displayed.
  • If the ID parameter is specified, information about the specified software timer is displayed.

Example

Run swtmr and swtmr 1.

Output

Figure 1 Querying information about all software timers

Figure 2 Querying information about software timer 1

Table 2 Output

Parameter

Description

SwTmrID

ID of the software timer

State

Status of the software timer

The value can be UnUsed, Created, or Ticking.

Mode

Mode of the software timer

The value can be Once, Period, or NSD (one-shot timer that will not be automatically deleted after the timer has expired).

Interval

Number of ticks used by the software timer

Count

Number of times that the software timer has been used

Arg

Input parameter passed

handlerAddr

Callback address

NOTE:

  • The ID value can be in decimal or hexadecimal format.
  • If the ID value is within the range of [0, Number of current software timers - 1], the status of the specified software timer is returned. For other values, an error message is displayed.