USB Barcode Scanner on PXA270 Changes Unrelated GPIO Direction Status

I am testing USB barcode scanner on PXA270, as one customer also reports this similar issue. Honeywell Xenon E1900 (maybe you can find the same one at Horw office) is the test scanner, customer uses another one from different vendor. After switching ‘Control + X(Control + ASCII) Mode ON/OFF’, first scanning of any barcode e.g. “toradex” changes SODIMM65 direction from output into input. Here is the code to monitor SODIMM65, and it can been seen from GPIO Config Tool as well.

#include <Winbase.h>
#include <windows.h> 
#include "gpioLib.h"
#include "CoProcLib.h"


int WINAPI WinMain(HINSTANCE hInstance,      // handle to current instance				   
                   HINSTANCE hPrevInstance,  // handle to previous instance				   
                   LPWSTR lpCmdLine,          // pointer to command line				   
                   int nCmdShow)             // show state of window				   
{	
	
	BOOL iostatues;
	
	printf("SODIMM 65 is set as output.\n");
	SetPinAltFn(65,-1,DIR_OUT);	

	while(1)
	{
		iostatues=GetPinDir(65);
		switch(iostatues)
		{
			case 0:
				printf("Input\n");
				break;
			case 1:
				printf("Output\n");
				break;
			default:
				printf("Error\n");
				break;

		}
		Sleep(1000);
	}

	DeInitGPIOLib();

    return(TRUE);
	
}

The explanation about ‘Control + X(Control + ASCII) Mode ON/OFF’ is detailed from this picture.


The completed user guide of Xenon E1900 is attached. It is at Page 53.
On iMX6 with WinCE7, this issue doesn’t appear.

Thank you for contacting support.

This issue is related to PS/2 pins. We would like to suggest you a workaround for the issue.

Please set following registry

[HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\KEYBD]
"clockGPIO"=dword:ffffffff   ;Set the GPIO number. If you set the value to ffffffff (-1) no GPIO is used
"dataGPIO"=dword:ffffffff    ;Set the GPIO number. If you set the value to ffffffff (-1) no GPIO is used

[HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\Mouse]
"clockGPIO"=dword:ffffffff   ;Set the GPIO number. If you set the value to ffffffff (-1) no GPIO is used
"dataGPIO"=dword:ffffffff    ;Set the GPIO number. If you set the value to ffffffff (-1) no GPIO is used

For more information refer our documentation links below:

https://developer.toradex.com/knowledge-base/keyboard-driver-registry-settings

https://developer.toradex.com/knowledge-base/mouse-driver-registry-settings