joh / crkbd-trackpoint

Add a trackpoint to a corne-cherry (crkbd) keyboard for ergonomic pointing bliss.
68 stars 1 forks source link

It works until the keyboard gets disconnected, then it is hit and miss whether it will start working again. #1

Closed BenBKirk closed 3 months ago

BenBKirk commented 11 months ago

Hi Joh,

Thank you for uploading this guide, I wouldn't have been able to get my trackpoint working without it.

Here is a picture of my Corne with the trackpoint placed in the thumb position: 20231210_191020

I upgraded to RP2040 with the following pinout: 5fef4c54-05d3-44a4-8a08-fe499a17fc4c

Flashing your keymap straight into the keyboard made everything work but when I unplug the keyboard, or the computer sleeps or I reset the board, it becomes unresponsive. This happens on windows 11 and arch linux. From the OS the device is still connected, it just doesn't do anything. As if it crashed but the green light stays on the microcontrollers. If I then reset the board a few times it connects every 5 tries or so and everything works fine including the trackpoint, until I disconnect the keyboard or shutdown the laptop.

Have you ever experienced a similar issue? The only difference that I can see between our builds is that I am using a different trackpoint and I have made a small reset circuit for it by following this guide https://rfong.github.io/rflog/2021/10/26/r61-trackpoint-pt2/ .

Would appreciate any input for how I could troubleshoot this.

Thanks, Ben

joh commented 10 months ago

Hi, looks like a clean build! I have not experienced the issue you're describing, but here's a few things to try:

  1. Does it work with the trackpoint disabled? (set TRACKPOINT_ENABLE = no in keyboards/crkbd/keymaps/joh/rules.mk)
  2. If not, does it work if you disconnect the trackpoint clock and data wires?
  3. I believe your trackpoint module (R61) is 5V I/O, but the RP2040 is 3.3V and the GPIO pins cannot safely handle 5V. You need a level shifter between the trackpoint CLK/DATA lines and the RP2040 GPIO pins.
BenBKirk commented 10 months ago

Thanks for the advice. I had already unsoldered the trackpoint by the time you replied and as expected there was no more crashing even without changing anything in the code. I was under the impression that a 5v trackpoint would still work at 3.3v as mentioned here but what you are saying makes sense, maybe I should look for a 3.3V trackpoint module.

Something also worth mentioning, I also have pull-up resistors for data and clock wires but noticed that you did this in the code somewhere instead. how did you do this and do I need to disable it?

joh commented 10 months ago

I was under the impression that a 5v trackpoint would still work at 3.3v as mentioned here but what you are saying makes sense, maybe I should look for a 3.3V trackpoint module.

I'm not sure I understand what that page says about 3.3V. Does it say 5V and 3.3V logic levels are compatible? Or perhaps powering the R61 off 3.3V should work?

Something also worth mentioning, I also have pull-up resistors for data and clock wires but noticed that you did this in the code somewhere instead. how did you do this and do I need to disable it?

You're right, two pullups could be causing problems. The 3.3V pullup was added in aa0214f. You can try reverting that commit, keeping your external pullup (git revert aa0214f)

joh commented 3 months ago

Closing due to inactivity.