GxEPD2: GDEQ042Z21 - red frame by GxEPD2_420c_Z21::_Init_Part

Hello,

I'm using GxEPD2_420c_Z21 and realized there is a red border around the display, which wasn't there initially, which I didn't draw and also won't go away by clearScreen().

Then I did a test with esphome on the same display and the border went away. So I was quite sure it is somehow caused by GxEPD2.

I compared the implementation in GxEPD2_420c_Z21.cpp with the waveshare reference code and I'm quite sure this red border is caused by these lines in GxEPD2_420c_Z21::_Init_Part():

  _writeCommand(0x50); // VCOM AND DATA INTERVAL SETTING
  _writeData(0xf7);    // border floating

(https://github.com/ZinggJM/GxEPD2/blob/master/src/epd3c/GxEPD2_420c_Z21.cpp#L394)

In the waveshare code these are only in the code for hibernating (https://github.com/waveshareteam/e-Paper/blob/master/RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_4in2b_V2.c#L175)

Once I removed these lines from GxEPD2_420c_Z21::_Init_Part(), the red border is not drawn anymore when using GxEPD2.

@ZinggJM - was there a special reason for sending 0x50 and 0xf7 in _Init_Part()? At least for me it works better without.

kind regards,
Georg

If you don't like it, you can remove it!

I currently don't have time to investigate in detail. But I see this:

    static const bool usePartialUpdateWindow = true; // works fine on this panel

So it most likely was to avoid border flashing on partial window updates.
You could verify with GxEPD2_Example.
-jz-

true, partial refresh flashes the border without those lines.
After the partial refresh the border stays white, which I like better.

Thanks for clarifying.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.