Skip to content

Lenovo Module from x280 not initializing correctly (nRF, UAT Driver). Scope logs seems OK #10

Description

@parinacota

Hello,
First of all, congratulations and many thanks for your awesome work!! Thanks to you I started my new project (quite similar, but on the basis of a un-splitted design, personal preference). And integrated the trackpoint at the very same place, I was not even thinking about that before I red your post.
Issue: following your instructions, I got an error in ZMK:

[00:00:01.340,057] <inf> zmk: Performing Power-On-Reset on pin P1.06...
[00:00:01.940,734] <inf> zmk: Waiting for mouse to connect...
[00:00:01.941,253] <inf> zmk: Trying to initialize mouse device (attempt 1 / 10)
[00:00:02.206,481] <dbg> ps2_uart: ps2_uart_read_process_received_byte: UART Received: 0x6a
[00:00:02.207,153] <dbg> ps2_uart: ps2_uart_read_process_received_byte: Received byte: 0x6a
[00:00:02.207,855] <dbg> ps2_uart: ps2_uart_data_queue_add: Adding byte to data queue: 0x6a
[00:00:02.208,557] <dbg> ps2_uart: ps2_uart_read_process_received_byte: UART Received: 0x0
[00:00:02.209,228] <wrn> ps2_uart: UART RX detected error for byte 0x0: Parity error (2)
[00:00:02.209,930] <dbg> ps2_uart: ps2_uart_read_process_received_byte: Received byte: 0x0
[00:00:02.210,601] <dbg> ps2_uart: ps2_uart_data_queue_add: Adding byte to data queue: 0x0
[00:00:02.211,334] <wrn> zmk: Got invalid PS/2 self-test result: 0x6a
[00:00:02.211,914] <inf> zmk: Trying to reset PS2 device...
[00:00:02.212,402] <dbg> ps2_uart: ps2_uart_write_byte: 

[00:00:02.212,890] <dbg> ps2_uart: ps2_uart_write_byte: Writing: 0xff
[00:00:02.215,362] <dbg> ps2_uart: ps2_uart_write_finish: Successfully wrote value 0xff
[00:00:02.216,064] <dbg> ps2_uart: ps2_uart_write_finish: END WRITE: 0xff

 byte to data queue: 0x6a
[00:00:02.273,864] <dbg> ps2_uart: ps2_uart_read_process_received_byte: UART Received: 0x0
[00:00:02.274,536] <wrn> ps2_uart: UART RX detected error for byte 0x0: Parity error (2)
[00:00:02.275,238] <dbg> ps2_uart: ps2_uart_read_process_received_byte: Received byte: 0x0
[00:00:02.275,909] <dbg> ps2_uart: ps2_uart_data_queue_add: Adding byte to data queue: 0x0
[00:00:02.276,641] <dbg> ps2_uart: ps2_uart_write_byte_await_response: Write for byte 0xff received response: 0x6a
[00:00:02.277,465] <dbg> ps2_uart: ps2_uart_write_byte: END WRITE: 0xff

[00:00:02.278,076] <inf> zmk: Trying to initialize mouse device (attempt 2 / 10)
[00:00:02.278,991] <wrn> zmk: Got invalid PS/2 self-test result: 0x0
[00:00:02.279,876] <inf> zmk: Trying to reset PS2 device...
[00:00:02.280,639] <dbg> ps2_uart: ps2_uart_write_byte: 

and continue as above up to 10 attempts and gives up.

I put an digital scope on the pins at the same time, with a Logic Analyser that decodes the PS2 protocol... and I don't read the same data coming back from the PS2 module!

name	type	start_time	duration	value
PS/2 Keyboard/Mouse	v1frame	0.60604975	0.008935125	Host: DATA FRAME (0x06)
PS/2 Keyboard/Mouse	v1frame	0.615022333	0.007771917	Mouse: MOVEMENT Y Overflow: 1, X Overflow: 1, Y Sign Bit: 1, X Sign Bit: 1, Middle Btn: 1, Right Btn: 0, Left Btn: 0, deltaX: 255, deltaY: 250 (0x00FAFFFC)
PS/2 Keyboard/Mouse	v1frame	0.676971083	0.000745958	Mouse: BAT Power-On Self Test Successfull (0xAA)
PS/2 Keyboard/Mouse	v1frame	0.677886708	0.000745917	Mouse: DATA  (0x00)
PS/2 Keyboard/Mouse	v1frame	0.689427667	0.001032208	Host: RESET MOUSE (0xFF)
PS/2 Keyboard/Mouse	v1frame	0.690497375	0.000745875	Mouse: ACK  (0xFA)
PS/2 Keyboard/Mouse	v1frame	0.745083333	0.000745958	Mouse: BAT Power-On Self Test Successfull (0xAA)
PS/2 Keyboard/Mouse	v1frame	0.745998958	0.000745917	Mouse: DATA  (0x00)
PS/2 Keyboard/Mouse	v1frame	0.756618292	0.001032083	Host: RESET MOUSE (0xFF)
PS/2 Keyboard/Mouse	v1frame	0.757687875	0.000745833	Mouse: ACK  (0xFA)

and so on.

I changed the nRF for a RP2040 modules, with QMK, and that is working correctly with the PS2 module. On ZMK, I tried also to use other speed proposals, and as well to use the GPIO driver instead. Same results :-( (with the GPIO driver, of course the messages are a little bit different, but with same kind of errors at the end.

Question: any issue with the timing, or the 2 parity bits at the end in ZMK (or in my nRF clone) ?
Any hint would be appreciated, the configuration is here: https://github.com/parinacota/wave36_qmk

Note: as it was working in QMK, I built a first keyboard with it (https://github.com/parinacota/wave36), that has many ressemblance with your design!.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions