This documentation is out of date.

The new version of the documentation is here: https://cannylogic.com/docs

Difference between revisions of "CANNY 5.2 duo, System Registers"

From CANNY Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Created page with "== General description == System resources are divided into an address group of read registers and an address group of write registers. Referring to the given registers from...")
 
Line 2: Line 2:
  
 
System resources are divided into an address group of read registers and an address group of write registers. Referring to the given registers from the functional diagram, you can get demanding  information for practical application about the current status of the controller, and control its operation mode. The set of system registers located in the "System Registers" directory of CannyLab IDE registers list, which is available via "Input Register" and "Output Register" context menu.
 
System resources are divided into an address group of read registers and an address group of write registers. Referring to the given registers from the functional diagram, you can get demanding  information for practical application about the current status of the controller, and control its operation mode. The set of system registers located in the "System Registers" directory of CannyLab IDE registers list, which is available via "Input Register" and "Output Register" context menu.
 +
 +
== Reset controller ==
 +
 +
Controller reset occurs as a result of any of the three events: when power up the controller, soft reset from the functional diagram. The controller is initialized after reset: the entire memory contents  is cleared, input-output channels are reset to a neutral state, system software drivers are transferred to the initial state, power consumption is set to normal, a functional diagram execution starts from the beginning. The non-volatile memory content does not change at reset.
 +
 +
Information about the reset is available by accessing the address "Power On Detect Register"
 +
 +
{|border="1" style="border-collapse:collapse;" align="left" width="100%"
 +
|- align="center" valign="top"
 +
!width="250px"|Address
 +
!Return Values
 +
|- valign="top"
 +
|style="padding-left:0.5em;"|Power On Detect Register
 +
|
 +
{|border="0" align="left"
 +
|- valign="top"
 +
|width="70px" style="padding-left:0.5em;"|1
 +
|style="padding-left:0.5em;"|=
 +
|style="padding-left:0.5em;"|the current execution cycle is the first one, since a soft reset or restored power
 +
|- valign="top"
 +
|width="70px" style="padding-left:0.5em;"|0
 +
|style="padding-left:0.5em;"|=
 +
|style="padding-left:0.5em;"|the current execution cycle is not the first one, since a soft reset or restored power
 +
|}
 +
|}
 +
 +
Forced reset of the controller is performed by writing a nonzero value to "Reset Register" address. In this case, the controller reset takes place immediately after the end of the execution cycle of functional diagram, in which there was such a record.
 +
 +
{|border="1" style="border-collapse:collapse;" align="left" width="100%"
 +
|- align="center" valign="top"
 +
!width="250px"|Address
 +
!Expected values
 +
|- valign="top"
 +
|style="padding-left:0.5em;"|Reset Register
 +
|
 +
{|border="0" align="left"
 +
|- valign="top"
 +
|width="70px" style="padding-left:0.5em;"|≥ 1
 +
|style="padding-left:0.5em;"|=
 +
|style="padding-left:0.5em;"|start a forced controller reset
 +
|- valign="top"
 +
|width="70px" style="padding-left:0.5em;"|0
 +
|style="padding-left:0.5em;"|=
 +
|style="padding-left:0.5em;"|value is ignored
 +
|}
 +
|}
 +
<br clear="all">

Revision as of 11:33, 19 December 2016

General description

System resources are divided into an address group of read registers and an address group of write registers. Referring to the given registers from the functional diagram, you can get demanding information for practical application about the current status of the controller, and control its operation mode. The set of system registers located in the "System Registers" directory of CannyLab IDE registers list, which is available via "Input Register" and "Output Register" context menu.

Reset controller

Controller reset occurs as a result of any of the three events: when power up the controller, soft reset from the functional diagram. The controller is initialized after reset: the entire memory contents is cleared, input-output channels are reset to a neutral state, system software drivers are transferred to the initial state, power consumption is set to normal, a functional diagram execution starts from the beginning. The non-volatile memory content does not change at reset.

Information about the reset is available by accessing the address "Power On Detect Register"

Address Return Values
Power On Detect Register
1 = the current execution cycle is the first one, since a soft reset or restored power
0 = the current execution cycle is not the first one, since a soft reset or restored power

Forced reset of the controller is performed by writing a nonzero value to "Reset Register" address. In this case, the controller reset takes place immediately after the end of the execution cycle of functional diagram, in which there was such a record.

Address Expected values
Reset Register
≥ 1 = start a forced controller reset
0 = value is ignored