0x64 Sbc

0 views
Skip to first unread message

Flaviano Goldammer

unread,
Aug 5, 2024, 1:19:51 PM8/5/24
to roallamrari
TheASCII (American Standard Code for Information Interchange) charset is used to represent letters, numbers and control signals in information processing systems by 7 bit binary values. This page shows all the information about 0x64, with is the character 'd' including the HTML code, the key combination and the hexadecimal, octal and birary encoding of the value.

Uppercase d is 0x44


When a key is pressed the keyboard sends the correspondingkeyboard scancode to the keyboard controller, and the keyboard controllertranslates that and interrupts the CPU, allowing the CPU to read the result.


More detailed: when a key is pressed, the keyboard sendsa start bit (low), followed by 8 data bits for the keyboard scancodeof the key (least significant first), followed by an odd parity bit,followed by a stop bit (high).The keyboard controller reads the data and checks the parity.If incorrect, retransmission is requested. If incorrect againa parity error is reported.If the time between request to send and start of transmission is greaterthan 15 ms, or if the eleven bits are not received within 2ms,a timeout is reported.In both cases (parity error or timeout), the data byte is set to 0xff.


The keyboard controller has three 8-bit registers involved incommunication with the CPU: its input buffer, that can be writtenby the CPU by writing port 0x60 or port 0x64; its output buffer,that can be read by the CPU by reading from port 0x60; and thestatus register, that can be read by the CPU by reading from port 0x64.


The keyboard controller has two 8-bit I/O ports involved incommunication with the keyboard: theinput port P1 (receiving input from the keyboard)and the output port P2 (for sending outputto the keyboard).


On PS/2 systems:Bit 0 tells whether a read from port 0x60 will be valid.If it is valid, this bit 5 tells what data will be read from port 0x60.0: Keyboard data. 1: Mouse data.On AT systems:0: OK.1: Timeout on transmission from keyboard controller to keyboard.This may indicate that no keyboard is present.


0: Output buffer empty, don't read yet.1: Output buffer full, can be read.(In the PS/2 situation bit 5 tells whether the available data isfrom keyboard or mouse.)This bit is cleared when port 0x60 is read.


The keyboard controller is provided with some RAM, for example 32 bytes,that can be accessed by the CPU. The most important part of this RAM isbyte 0, the Controller Command Byte (CCB). It can be read/written bywriting 0x20/0x60 to port 0x64 and then reading/writing a data bytefrom/to port 0x60.


0: No translation.1: Translate keyboard scancodes, using thetranslation table given above.MCA type 2 controllers cannot set this bit to 1. In this casescan code conversion is set using keyboard command 0xf0 to port 0x60.


On an EISA or PS/2 system: 0: Enable mouse. 1: Disable mouseby driving the clock line low.On an ISA system: "PC Mode": 0: use 11-bit codes, check parity and doscan conversion.1: use 8086 codes, don't check parity and don't do scan conversion.


This bit is shown in bit 2 of the status register.A "cold reboot" is one with this bit set to zero.A "warm reboot" is one with this bit set to one (BAT already completed).This will influence the tests and initializations done by the POST.


The last six bits of the command specify the RAM address to read.The read data is placed into the output buffer, and can be readby reading port 0x60.On MCA systems, type 1 controllers can access all 32 locations;type 2 controllers can only access locations 0, 0x13-0x17, 0x1d, 0x1f.Location 0 is the Command byte, see above.


(On ISA/EISA systems with AMI BIOS)Reset keyboard controller lines P22 and P23 low.These lines can be used for speed switching via the keyboard controller.When done, the keyboard controller sends one garbage byte to the system.


(On ISA/EISA systems with AMI BIOS)Set keyboard controller lines P22 and P23 high.These lines can be used for speed switching via the keyboard controller.When done, the keyboard controller sends one garbage byte to the system.(Compaq BIOS: Enable system speed control.)


On MCA systems:Return 0xf1 (via port 0x60) when no password is installed,return 0xfa when a password has been installed.Some systems without password facility always return 0xf1.(On ISA/EISA systems with AMI BIOS)Write Clock = Low.


On MCA systems:When a password is installed:Check password by matching keystrokes with the stored password.Enable keyboard upon successful match.(On ISA/EISA systems with AMI BIOS)Read Clock. 0: Low. 1: High.


On MCA and other systems: test the seriallink betweenkeyboard controller and mouse. The result can be read from port 0x60.0: OK.1: Mouse clock line stuck low.2: Mouse clock line stuck high.3: Mouse data line stuck low.4: Mouse data line stuck high.0xff: No mouse.(On ISA/EISA systems with AMI BIOS)Read Cache Bad or Good. 0: Bad. 1: Good.


Test the serial link between keyboard controller and keyboard.The result can be read from port 0x60.0: OK.1: Keyboard clock line stuck low.2: Keyboard clock line stuck high.3: Keyboard data line stuck low.4: Keyboard data line stuck high.0xff: General error.


(MCA)Write the keyboard controllers output buffer with the bytenext written to port 0x60, and act as if this was mouse data.(In particular, raise IRQ12 when bit 1of the Command byte says so.)Not all systems support this.


Synaptics multiplexingOn the other hand, Synaptics (see ps2-mux.PDF)uses this command as a handshake between driver and controller:if the driver gives this command three times, with data bytes0xf0, 0x56, 0xa4 respectively, and reads 0xf0, 0x56, but not 0xa4back from the mouse output buffer, then the driver knows that thecontroller supports Synaptics AUX port multiplexing, and the controllerknows that it does not have to do the usual data faking and goesinto multiplexed mode. The third byte read is the version of theSynaptics standard.


There is a corresponding deactivation sequence, namely0xf0, 0x56, 0xa5. (And again the last byte is changed to theversion number of the standard supported.)This latter sequence works both in multiplexed mode and in legacy modeand can thus be used to determine whether this feature is presentwithout activating it.


For some laptops it has been reported that bit 3 of every thirdmouse byte is forced to 1 (as it would be with the standard3-byte mouse packets). This may turn 0xf0, 0x56, 0xa4 into0xf0, 0x56, 0xac and cause misdetection of Synaptics multiplexing(for version 10.12).


Bits 3-0 of the output port P2of the keyboard controller may be pulsed low for approximately 6 seconds.Bits 3-0 of this command specify the output port bits to be pulsed.0: Bit should be pulsed.1: Bit should not be modified. The only useful version of this command is Command 0xfe.(For MCA, replace 3-0 by 1-0 in the above.)


I am writing a client/server application for STM32WB55. Server behavior is ok. On client side, I connect to a peripheral and try to send 32 bytes packets every 100 ms on peripheral's RX characteristic using aci_gatt_write_without_response function. MTU is set to 156. Nevertheless most of the time the function return with error code 0x64 (insufficient resource). The application is connected to 1 peripheral only, no advertising. I didn't find any helpful information.


Finally I found that the parameters I used for the connection (aci_gap_create_connection) were not suitable. For example the connection intervals (min & max) were too high in comparison to the frequency of the call of the aci_gatt_write_without_response function. This is detailed in chapter 6 of the PM0271 document.


1.Which seller did you purchase the product(s) from?

Amazon

2.The Model number of the product(s) you have purchased?

UC-517 link: =ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

3.Which Platform are you using the product(s) on?

Jetson Nano production module quark carrier board. -carrier-nvidia-jetson-nano/

4.Which instruction are you following?

_Camera/blob/master/Jetson/IMX477/AF_LENS/Focuser.py

5.Has your product ever worked properly?

Yes, worked fine on dev kit.

6.What problems are you experiencing?

The problem I am running into is that I am not able to set the focus of the motorized lens on either of my two IMX477 cameras. For some reason on this carrier board, the cameras appear on address 0x64, on buses 7 and 8. I verified this by plugging and unplugging the cameras and saw the devices disappear when the cameras were unplugged (address change perhaps due to the mux but idk).


If you want to use i2cdetect to detect the ic of the motor, you need to turn on the camera first, and then run i2cdetect. The address of the IMX477 focus motor is 0x0c, please refer to MIPI_Camera/Focuser.py at master ArduCAM/MIPI_Camera GitHub to access the focus motor.


Initially, the EC was conceived as a Keyboard System Controller (KSC), and itspurpose was to realize the 8042 spec from IBM 8042 IBM design guide 1. Thecore function of keyboard controllers was to inform the CPU when a key waspressed or released. They also managed auxiliary devices such as a mouse.


However, the KSC kept evolving to the point where it handles moreresponsibilities than just PS/2 devices. Therefore, today every 8042command/behavior became a subset of the Embedded Controller chip.In modern PC systems, the EC can receive 8042 commands from either BIOSor the PS/2 windows driver. The picture below illustrates 8042 commandstriggered by a Windows driver.


Here we can see that final software entity receiving the commands is theZephyr PS/2 driver which performs PS/2 communication with a mouse and/orkeyboard. The alternate flow shows how EC can also receive and process8042 commands.


This implementation of the 8042 spec is mainly performed by a software FSMto handle host requests. These commands can be directed to 3 differententities which can be the EC (8042 module) , PS/2 Keyboard or P/2 mouse.The FSM is triggered by an ISR and at that precise moment port 0x60 isread. This is where the FSM determines if it can process the command in theDEFAULT_STATE or it requires to transition to a new state in order tocontinue processing a given command.

3a8082e126
Reply all
Reply to author
Forward
0 new messages