Datasheet

Table Of Contents
PN532_C1 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2017. All rights reserved.
Product data sheet
COMPANY PUBLIC
Rev. 3.6 — 28 November 2017
115436 130 of 222
NXP Semiconductors
PN532/C1
Near Field Communication (NFC) controller
8.6.17 CIU_timer
A timer unit is implemented in the CIU: CIU_timer. The 80C51 use CIU_timer to manage
timing relevant tasks for contactless communication. CIU_timer may be used in one of the
following configurations:
Timeout-Counter
Watch-Dog Counter
Stop Watch
Programmable One-Shot
Periodical Trigger
CIU_timer can be used to measure the time interval between two events or to indicate that
a specific event occurred after a specific time. CIU_timer can be triggered by events which
will be explained in the following, but it does not itself influence any internal event (e.g. A
timeout during data reception does not influence the reception process automatically).
Furthermore, several timer related bits are set and these bits can be used to generate an
interrupt.
CIU_timer has a input clock of 6.78 MHz (derived from the 27.12 MHz quartz). CIU_timer
consists of 2 stages: 1 prescaler and 1 counter.
The prescaler is a 12 bits counter. The reload value for the prescaler can be defined
between 0 and 4095 in register CIU_TMode and CIU_TPrescaler. This decimal value is
called TPrescaler.
The reload value TReloadVal for the counter is defined with 16 bits in a range from 0 to
65535 in the registers CIU_TReloadVal_Lo and CIU_TReloadVal_Hi.
The current value of CIU_timer is indicated by the registers CIU_TCounterVal_lo and
CIU_TCounterVal_hi.
If the counter reaches 0 an interrupt will be generated automatically indicated by setting
the TimerIRq flag in the register CommonIRq. If enabled, it will set to logic 1 CIU_IRQ_1 in
the register CIU_Status1. TimerIRq flag can be set to logic 1 or to logic 0 by the 80C51.
Depending on the configuration, CIU_timer will stop at 0 or restart with the value of the
registers CIU_TReloadVal_Lo and CIU_TReloadVal_Hi.
Status of CIU_timer is indicated by the bit TRunning in the register CIU_Status1.
CIU_timer can be manually started by TStartNow in register Control or manually stopped
by TStopNow in register Control.
Furthermore CIU_timer can be activated automatically by setting the bit TAuto in the
register CIU_TMode to fulfill dedicated protocol requirements automatically.
The time delay of a timer stage is the reload value +1.
Maximum time:
TPrescaler = 4095, TReloadVal = 65535 => 4096*65536/6.78 MHz = 39.59 s
Example:
To indicate 100 ms it is required to count 678 clock cycles. This means the value for
TPrescaler has to be set to TPrescaler = 677.The timer has now an input clock of
100 us. The timer can count up to 65535 timeslots of 100 ms.