bdi
Wind
for Tornado™, BDI2000 (MPC8xx/MPC5xx)
User Manual
39
© Copyright 1997-2007 by ABATRON AG Switzerland
V 1.38
3.3.5.2. Polling for requests
Because no interrupt can be generated via debug interface, polling is required. To optimize commu-
nication performance and CPU load, two VxWorks task are generated to handle the polling task. The
following figure shows the relationship of this two tasks.
The BDI Idle Task polls the rx count field without delay. The task priority has to be 255 because it
consumes all remaining CPU time. Every time it finds the rx count field not zero, it signal this by giving
a binary semaphore.
The BDI Wakeup Task should have a priority equal to the target agent. It waits with time-out at the
semaphore. Then it checks the rx count field and sends the packet to the target agent if one is avail-
able. Time-out when waiting at the semaphore is used because it's possible that the BDI Idle Task
gets no CPU time. This may be the case when an faulty application task loops without releasing the
CPU.
3.3.5.3. Automatic change to Agent mode
The BDI may change automatically to Agent mode in case of a fatal error or when HALT is entered
at the Telnet prompt. In this case, restart the target server on the host and attach the debugger to the
system. You can now analyze the crashed application (e.g. inspect variables).
bdi
idle
task
bdi
wakeup
task
target
agent
receive
rx buffer
transfer
received
packet
semGive
binary
semaphore
semTake
with timeout