PS/2 protocol - 'Resend' command

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,

I'm designing a PC-side keyboard host controller clone (8042) for an
embedded system. I'm facing a problem regarding the protocol-conformance
tests. My intention is to desing test cases covering the behaviour of my
clone upon the 'resend command' (0xF2) sent from the keyboard. I have
examined several keyboard communication logs from two windows-based systems
to see how other operating systems do that.

I deliberately put parity errors into the flow to squeeze out some resend
responses. However I couldn't call forth any 'resend' command in the
system-to-keyboard direction. (I could manage to get a few resend commands
sent by the keyboard, in response to an erroneous command from the system,
though.) I must not expect, that none of the OS implementations in the world
use the resend command. (Otherwise why on earth did the docs below designate
it?)

In my original PS/2 documentation (Keyboards 101- and 102 Key October 1990
IBM) there's a section about system commands and keyboard commands.

The following stands for resend as a system command:
"Resend (Hex FE): The system sends this command when it detects an error in
any transmission from the keyboard. It is sent only after a keyboard
transmission and before the system allows the next keyboard output. When a
Resend command is received, the keyboard sends the previous output again
(unless the previous output was the Resend command, in which case the
keyboard sends the last byte before the Resend command.)"

The following stands for resend as a keyboard command:
"Resend (Hex FE): The keyboard issues a Resend command following receipt of
an invalid input, or any input with incorrect parity."

I couldn't confirm the latter one by the systems I have tested. Can anyone
confirm this?

In document Keyboard/Auxiliary device controller stands:
"... 6. The auxiliary device checks for a positive-level stop bit after the
10th clock. If the 'data' line is inactive, the auxiliary device continues
to clock until the 'data' line becomes active. Then it clocks the
line-control bit and, at the next opportunity, sends a Resend command to the
system"

Can anyone confirm, that the keyboard really sends a resend in case of a
false stop-bit?

Section Data output (from the keyboard's point of view):
"...Following line contention, the system may or may not request the
keyboard to resend the data."

Could you please tell me what sort of documentation it is? Could you please
send it to me?

Do you know any system I could provoke to emit 'resend' commands in
system-to-keyboard direction?
Do you know any (PC) application meant for intensive PS/2 peripheral
testing/debugging/error forcing?

Any help would be greatly appretiated.

Leslie





Re: PS/2 protocol - 'Resend' command

Quoted text here. Click to load it

The keyboard controller should not act (downstream wise) upon it.

1. reception of 0xfe should be passed to the data register.
2  upon receiving malformed data it should set the status register bit 7.

It is the responsibility of the driver software to act upon it.

--
Wil

Site Timeline