This documentation is out of date.

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

CANNY 5.2 duo, System Registers

From CANNY Wiki
Revision as of 11:33, 19 December 2016 by Support (Talk | contribs)


Jump to: navigation, search

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