beautypg.com

14 interrupts, 2 polling and interrupt handling, Interrupts – BECKHOFF ET1100 User Manual

Page 15: Processed, Polling and interrupt handling

background image

General Issues

Slave Controller

– Application Note FAQ

11

3.14 Interrupts

3.14.1 µControllers with edge-triggered Interrupt / only the first interrupt is processed

The Beckhoff EtherCAT ESCs generate a level-triggered interrupt signal, which combines many
internal interrupt sources (AL Event Request) into one interrupt signal (according to the AL Event
Mask).

If a µController with edge-triggered interrupt input is connected to this ESC, care has to be taken that
all interrupts are processed by the interrupt service routine before it is left. It is especially possible that
additional interrupts are coming up while the ISR is processed. If the ISR does not check the AL Event
Request to be empty before it is left, the ISR might not be called anymore at all, because the interrupt
signal is continuously active, without any further triggering edge. In such a case, the ISR has to check
the AL Event Request register before the ISR is left, to guarantee that the interrupt signal is cleared.

3.14.2 Polling and Interrupt handling

Some functions of EtherCAT slave controllers can be used either by polling or by interrupting. This
could be:

SyncManager reading or writing (Mailbox, 3 buffer mode)

AL Control changes

Distributed Clocks Sync events

etc.

Typically, only one of the two methods (polling or interrupting) should be chosen. Using both methods
simultaneously is potentially dangerous, because interrupts could be missed when the polling access
“acknowledges” the interrupt immediately when it occurs, and the interrupt service routine does not get
called (because the interrupt is already gone or was never seen on the interrupt signal).

This manual is related to the following products: