Skip to content

esp32-1732S019N Rotation 90/270 Broken #232

@lincomatic

Description

@lincomatic

On the 1732S019N (ST7789 170x320), rotation 0 and 180 work properly, but 90 and 270 result in garbage thin horizontal dotted lines on the screen.

I'm using the lines from your sample code:

    smartdisplay_init();

    //__attribute__((unused)) auto disp = lv_disp_get_default();
    lv_disp_set_rotation(disp, LV_DISP_ROTATION_90);
    // lv_disp_set_rotation(disp, LV_DISP_ROTATION_180);
    // lv_disp_set_rotation(disp, LV_DISP_ROTATION_270);

    ui_init();

Activity

rzeldent

rzeldent commented on Feb 8, 2025

@rzeldent
Owner

Are you using the demo?
It the dimensions might be out of bounds and this might result in writing outside the buffer (this creating strange images)...

antlanc7

antlanc7 commented on Mar 20, 2025

@antlanc7

I reproduced this too.

The bug seems to be correlated with the DISPLAY_GAP_X and DISPLAY_GAP_Y defines in the board file. The board definition is in vertical mode (height > width) and sets DISPLAY_GAP_X=35 and DISPLAY_GAP_Y=0.

If you want to use it in horizontal mode you have to swap the gaps, setting DISPLAY_GAP_X=0 and DISPLAY_GAP_Y=35. Then in the app code you can set lv_disp_set_rotation(disp, LV_DISP_ROTATION_90) or lv_disp_set_rotation(disp, LV_DISP_ROTATION_270) and it will work correctly.

This is not ideal, maybe a solution could be to implement a custom rotation function that also sets the gaps with the function esp_lcd_panel_set_gap in the swapped order if the chosen orientation is 90 or 270.

GeoffWebster

GeoffWebster commented on Jul 3, 2025

@GeoffWebster

Any progress on this as I have the same problem. Workaround from antlanc7 didn't fix it for me.

GeoffWebster

GeoffWebster commented on Jul 4, 2025

@GeoffWebster

antlanc7' workaround didn't work for me (see previous post) but using his workaround as a clue, I came up with working display for 90 deg and 270 deg by using "'-D DISPLAY_GAP_X=-20'", "'-D DISPLAY_GAP_Y=35'".

antlanc7

antlanc7 commented on Jul 4, 2025

@antlanc7

Yeah it depends on the specific display you have.

GeoffWebster

GeoffWebster commented on Jul 4, 2025

@GeoffWebster

These values work with the built-in display (170 x 240) of the ESP32-1732S019N board, the same one that started the ball rolling on this bug report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lincomatic@rzeldent@antlanc7@GeoffWebster

        Issue actions

          esp32-1732S019N Rotation 90/270 Broken · Issue #232 · rzeldent/esp32-smartdisplay