#SOLVED: corrupt oled display

1 messages · Page 1 of 1 (latest)

ripe ridge
#

SOLVED: I was missing Kconfig settings https://github.com/zmkfirmware/zmk/blob/edf5c0814fd3ea202e43aad2d68fd32e882a518c/app/boards/shields/corne/Kconfig.defconfig#L16-L41 which lead to really strange behaviorr

hi, im trying to get an oled display (ssd1306) to work, but my image is corrupted. what could be the issue here?
i tried various combinations of options in the device tree.

.dtsi:

&xiao_i2c {
    status = "okay";

    /* Nodes using the bus go here */
    oled_right: ssd1306@3c {
        status = "okay";
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        //segment-remap;
        //com-invdir;
        com-sequential;
        //inversion-on;
        prechargep = <0x22>;
    };
};

.conf:

CONFIG_ZMK_DISPLAY=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y # Shows if USB/BLE is active
GitHub

ZMK Firmware Repository. Contribute to zmkfirmware/zmk development by creating an account on GitHub.

mint wadi
#

which shield is this for? [linking your repository would provide more information](#help message)
If you haven't connected a battery yet or you have a way to disconnect it, I would use a multimeter to verify there is no accidental connection between VCC and SCK (...or VCC and SDA)

ripe ridge
#

it is for a custom shield i am building from scratch. i have not connected a battery yet and power it via usb. i could verify all the connections to be correct and no shorts occur.

i found out that when i use width=128; height=80 or higher (tested up to 128) then i get a almost proper display output (some weird cut-off happening, see picture below) but if i use height=79 or lower then it is totally glitched like in the top picture.

mint wadi
#

well...
...with all the information I currently have about the code you've written, all I can say is that you probably want the inversion-on; attribute uncommented to invert black and white
best of luck troubleshooting

ripe ridge
#

hm okay
are you aware of any way to swap x and y axis? like rotation by 90°? it seems like i need to have at least a height of ~110 to have a proper display but then some elements would be displayed off-screen

ripe ridge
#

i now got around to tidying up my config and pushing it to github (i compile locally): https://github.com/phiwan-dev/phiboard/tree/main/firmware/zmk-config
both the left and the right half show the same behavior where a hight of 80+ is needed and 79 shows only a glitched picture. hence i think a hardware fault is very unlikely. i just think it is so strange. i tried searching for repos which use 128x32 (i2c) oled displays but i couldnt find any. does anyone know some?

GitHub

The phiboard source repo using ergogen, kicad and zmk - phiwan-dev/phiboard

ripe ridge
#

further testing has me thinking that the glitchy behavior means empty data. the glitch will never overwrite existing widgets but widgets will always overwrite the glitch. i have no clue why there would be no data when height < 80.

mint wadi
ripe ridge
#

but they all use a pro micro (or pin compatible) controller, no? or at least i cant get it to compile with the xiao ble. i attached the failed logs. i can compile it with the board set to nice nano. i thought maybe i can flash a known good firmware on there and observe the behavior. it would need: a) xiao ble and b) 128x32 ssd1306 via c) i2c

#

i also tried to add the kconfig settings but unfortunately it didnt change anything. compilation is successful but the same 79/80 height problem persists.

#

hold up nvm i think it works now 😳
[doing some further testing now]

ripe ridge
#

everything is working properly now! thank you so much! 🥳

side note: unfortunately i think i have damaged my left screen during transport just now and now it wont turn on at all but thats on me. anyhow thank you very very much!