Command Data Underrun

Report Code

Binary: [p2 p1 p0 1 1 1 1 1] [1 0 0 0 0 0 0 1]

Description

This unsolicited report reports that the Slink-e did not receive port message data (i.e. Send Port Message and Send Port Message End) commands fast enough to maintain sending a port message for the indicated port.

Slink-e starts sending a port message soon after it receives a Send Port Message command. After that, the Slink-e must continue to receive additional port message data via the programming interface, in order to keep up the required pace for the port message it is sending. This data must keep coming in until the Slink-e receives a Send Port Message End command and therefore ends the port message.

If it is time for the Slink-e to send the next bit of port message and it hasn't received the information from the host, the situation is called an underrun. When an underrun occurs, the Slink-e ends the port message, enters Needs Resume state, and generates a Command Data Underrun report.

There are a variety of things that can cause an underrun:

With IR port messages, the required data rate depends on how long the IR pulses are, due to the run length coding in the port message data. If for example all IR pulses last 500 microseconds (which is about typical), then you would need to send 2000 bytes of port message data every second. That means you would need a baud rate of at least 18,000 bits per second (so only the Slink-e's 19,200 baud and 38,400 baud rates would suffice). And your program would have to feed the serial port about 70 Send Port Message commands per second.

But in my experience, the Slink-e reports Command Data Underrun errors even when I'm doing everything right. I have instruments that show that the Slink-e receives all the data it needs before it needs it, but it still frequently reports Command Data Underrun.

Note that by the time you see this report, you've probably already sent a lot more data. It's hard to tell exactly where the underrun occurred.

Commands

This is always unsolicited. It reports a synchronizing error.

Only a Send Port Message command can cause this report (but it is not a response to a Send Port Message command -- Send Port Message never has a response).