GR740-UM-DS, Nov 2017, Version 1.7
150
www.cobham.com/gaisler
GR740
allowed to change value and any received distributed interrupt code with that interrupt number is dis-
carded. In the extended interrupt mode, the ISR change timers are not used and should be disabled.
13.2.18.3 Interrupt code generation
In addition to distributing interrupt codes received on the ports, the router can also generate an inter-
rupt code / extended interrupt code when an internal error event occurs. In addition to the errors
described in 13.2.20 the router can also be configured to send an interrupt code when a SpaceWire
port’s link interface enters run-state.
Everything in sections 13.2.18.1 and 13.2.18.2 also applies when the distributed interrupt code is gen-
erated by the router. The only difference is that a distributed interrupt code generated by the router
will not be discarded if it is not allowed to be distributed. Instead, the distributed interrupt code will
be distributed as soon as it is allowed to do so. The only time a distributed interrupt code generated by
the router is not distributed is if the bits in RTR.PIP are cleared by software before the interrupt code
is allowed to be sent.
The interrupt code generation is controlled through the RTR.ICODEGEN, RTR.IMASK,
RTR.IPMASK, and RTR.PIP registers and in addition to the enable / disable bit (RTR.ICODE-
GEN.EN), the following features are available:
•
Each port has a corresponding bit in the RTR.IPMASK register in order to control whether or not
an error on that specific port should generate an interrupt.
•
The different error types have there own mask bit in the RTR.IMASK register in order to control
whether or not that specific error should generate an interrupt.
•
The interrupt number to use for a generated interrupt code is programmable through the
RTR.ICODEGEN.IN field.
•
The generated interrupt code can be configured to be either level type or edge type. Level type
means that a new interrupt code will be sent as long as any bit in the RTR.PIP register is set.
Edge type means that a new interrupt code will only be sent when a new error event occurs, i.e.
when an RTR.PIP bit toggles from 0 to 1. The type is selected by the RTR.ICODEGEN.IT bit.
•
A timer can be enabled through the RTR.ICODEGEN.TE bit. This timer controls the minimum
time between a received interrupt acknowledgment code and the distribution of a newly gener-
ated interrupt code. The timer is started and reloaded with the value from the RTR.AITIMER
register when an interrupt acknowledgment code is received, if the router was the source of the
corresponding interrupt code. Until the timer has expired, a newly generated interrupt code will
not be distributed. The reload value must not be less than the worst propagation delay for the
interrupt acknowledgment code.
•
The router can be configured through RTR.ICODEGEN.AH and RTR.ICODEGEN.UA to auto-
matically clear the RTR.PIP bits, which were set when the distributed interrupt code was gener-
ated, once an interrupt acknowledgment code is received or once the ISR timer has expired.
13.2.19 Auxiliary time-code / distributed interrupt code interface
The router provides an auxiliary time-code / distributed interrupt code interface that is connected
internally to the SpaceWire TDP controller.
The rules that determine whether a distributed interrupt code shall be forwarded to the ports are the
same as for distributed interrupt codes received on any other port. However, for time-codes the value
on the auxiliary interface is always forwarded and the router's internal time-count value is updated.
Note that time-codes / distributed interrupt codes received through the auxiliary interface are not
transmitted back to the auxiliary interface.
Just as the router ports, the auxiliary interface has enable / disable bits for time-codes
(RTR.RTRCFG.AT) and interrupt codes (RTR.RTRCFG.AI), which must be set to 1 in order to trans-
mit / receive codes.