-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable OLED support for Teensy 3.2/LC #7591
Conversation
0854a00
to
bac6647
Compare
Thank you for your contribution! |
Not sure if it helps, I merged the changes into master and managed to compile both my code and handwired/onekey on the teensy 3.2 with the i2c_scanner keymap, but no i2c device is found (error -1). I will be happy for any pointers/examples/missing patches. Not sure if the problem is the I2C code or if it's using non-standard I2C pins |
bac6647
to
e8cc7ae
Compare
I must be doing something wrong then.
I then tested the said branch:
In
ran
|
As a FYI, you don't need to modify the rules.mk, just run I assume there must be a difference in the I2C arduino implementation, and the device i'm using for testing responds differently. qmk_firmware/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c Lines 13 to 17 in 2f15cb2
thus the "best effort" build warning. |
From github itself, you should be able to run this: git fetch origin refs/pull/7591/head
git checkout -b zvecr/feature/teensy_oled FETCH_HEAD You may need to change the "origin" part to match whatever remove you have set for The alternative, is to use something like |
@drashna @zvecr Before applying the fix: https://pastebin.com/GcddgNbj Less errors but still an issue. Remember to enable oled driver for testing. |
264618e
to
abac879
Compare
After help from @zvecr compilation is successful for both I2CD1 and I2CD2; however only I2CD1 was functional in my testing. |
update: All working fine for I2CD2 as well, the issue was missing definitions for the GPIO bank used for I2C1 pins as i2c_master.h uses by default Bank B where I2C0 pins are set. |
Everything is working now. Not sure of the exact problem, for some reason this code was much more sensitive to running through a logic level converter than the teensy Arduino library version. The scope showed that it's running at a much higher default frequency and probably uses a different logic level for 0/1 (logic level shifter was not shifting to the full range for some reason). I removed the logic level converter and am running the passive side (mpc23018) on 3.3 volts (cost a little on the maximum led level) and it's working now. Looks like my PCB needs to go through another design iteration ... |
@laughingrice Yes everything is working as expect now. Teensy 3.2 runs on 3.3V so i am assuming your logic shifter might not be designed for that frequency or it's input impedance is too low for the T3.2 output @drashna I'm assuming this will be closed automatically as soon as it is merged? |
* I2C_TIMEOUT is not defined on arm teensy * Work round teensy having different ChibiOS config options * Stash OLED conf files * update comment * update comment * Remove stm32 alias to allow teensy alt mode format code according to conventions [skip ci]
* I2C_TIMEOUT is not defined on arm teensy * Work round teensy having different ChibiOS config options * Stash OLED conf files * update comment * update comment * Remove stm32 alias to allow teensy alt mode
* I2C_TIMEOUT is not defined on arm teensy * Work round teensy having different ChibiOS config options * Stash OLED conf files * update comment * update comment * Remove stm32 alias to allow teensy alt mode
Description
Another situation where the ChibiOS hal does a poor job of abstraction, where I2Cv1 has a different config structure.
Note: Teensy LC do not have enough memory to run a 128x32 OLED in the codebases current state.
Types of Changes
Issues Fixed or Closed by This PR
Checklist