Skip to content
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

incomplete sleep sequence causes Vcc shortcut and resets #16

Closed
qrti opened this issue Apr 18, 2019 · 1 comment
Closed

incomplete sleep sequence causes Vcc shortcut and resets #16

qrti opened this issue Apr 18, 2019 · 1 comment

Comments

@qrti
Copy link

qrti commented Apr 18, 2019

Arduino Library for Color 2.9 inch e-paper b & c

displays of other sizes and platforms might be concerned as well

original in epd2in9.cpp

void Epd::Sleep() {
  SendCommand(DEEP_SLEEP);
  SendData(0xa5);
}

result

  • the display reaches deep sleep but without switching off power beforehand as prescribed,
    the gate of the hat's charge pump MOSFET might be left in an unusable state,
    overriding the gate pulldown and shortcut Vcc, this also might reset the Arduino

proposal

1. change in epd2in9.cpp

void Epd::Sleep()
{
    SendCommand(VCOM_AND_DATA_INTERVAL_SETTING);
    SendData(0xF7);                         // set border floating VDB 1:0 = 11

    SendCommand(POWER_OFF);                 // power off

    SendCommand(DEEP_SLEEP);                // deep sleep
    SendData(0xa5);

    pinMode(CS_PIN, INPUT);                 // prevent parasitic supply
    pinMode(RST_PIN, INPUT);
    pinMode(DC_PIN, INPUT);

    SpiEnd();                               // optional
}

2. add to epdif.cpp (optional)

void EpdIf::SpiEnd(void)
{
    SPI.end();
}

3. add to epdif.h (optional)

static void SpiEnd(void);

I've done a lot of research, reading, testing, measuring to make these displays run as intended

@waveshare
Copy link
Collaborator

I will fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants