beautypg.com

1 error, Error, Table 5-5: normal operation registers – PNI SENtral User Manual

Page 24

background image

PNI Sensor Corporation

Doc #1018049 R03

SENtral Technical Data Sheet

Page 23

Table 5-5: Normal Operation Registers

Register Name

Address

Register Value

HostControl

0x34

[0] 1 = RunEnable

0 = Enable Initialized State

EventStatus

0x35

‘1’ indicates a new event has been generated.
[0] CPUReset
[1] Error
[2] QuaternionResult
[3] MagResult
[4] AccelResult
[5] GyroResult

Below are the steps to follow when operating in Normal Operation state.

a) Write 0x01 to the HostControl register. This sets the RunEnable bit to ‘1’ and

enables the sensors and the SENtral algorithm.

b) If operating in an interrupt-driven mode, then the host waits until it receives an

interrupt signal from SENtral. Alternatively the host may operate on a polling basis,

rather than an interrupt-driven basis, in which case the interrupt line may not be used.

c) Once an interrupt is received by the host or the host otherwise decides to read new

data, read the EventStatus register.

d) Interpret and act on the EventStatus register in the priority shown in Figure 5-3. If bit

[1], the Error bit, is ‘1’, see Section 5.3.1. If bit [0], the CPUReset bit, is ‘1’, see

Section 5.3.2. If bits [2], [3], [4], or [5], the Results bits, are ‘1’, see Section 5.3.1.

e) Repeat steps c and d until new orientation data is not needed and/or the host decides

to enter a different state.

Note that reading the EventStatus register clears it. It is possible for more than one bit
position to be ‘1’ in the EventStatus register, especially if the host does not always read the
EventStatus register after receiving an interrupt. Similarly, if multiple bits are set to ‘1’ in
the EventStatus register, once the register is read all the bits will be set to ‘0’. For this reason

the EventStatus register should be processed in the priority shown in Figure 5-3, as

information will be cleared for events that are not handled.

5.3.1

Error

In the event of an error, SENtral will trigger an error interrupt and SENtral will enter

Standby State. See the Section 5.6 for recommendations on Troubleshooting and/or reset

SENtral by sending 0x01 to the ResetReq register, at address 0x9B.