Skip to main content
TLahr.1
Associate II
February 11, 2020
Solved

Controlling Display On/Off State

  • February 11, 2020
  • 2 replies
  • 1235 views

I am working with the STM32F769I-Disco Board and I'm having trouble figuring out how to control the display.

When I put the device is standby mode, the display does not power down. Is this normal? I have been trying to power down the display manually, but I'm having troubles doing this as well. I noticed in the display driver there are macros to turn the display on and off:

#define OTM8009A_CMD_DISPOFF        0x28 /* Display Off command */

#define OTM8009A_CMD_DISPON        0x29 /* Display On command */

But I'm ultimately not sure how to use these macros...

Any advice?

Thank you.

This topic has been closed for replies.
Best answer by TLahr.1

Well I figured out the command with the following function:

const uint8_t DISPLAYOFF[] = { OTM8009A_CMD_SWRESET, 0x00 };
 
DSI_IO_WriteCmd(0, (uint8_t*)DISPLAYOFF);

I am able to manually shut off the display power.

2 replies

TLahr.1
TLahr.1AuthorBest answer
Associate II
February 12, 2020

Well I figured out the command with the following function:

const uint8_t DISPLAYOFF[] = { OTM8009A_CMD_SWRESET, 0x00 };
 
DSI_IO_WriteCmd(0, (uint8_t*)DISPLAYOFF);

I am able to manually shut off the display power.

Martin KJELDSEN
Principal III
February 17, 2020

Glad you solved it!

Generally, if you have access to otm8009a.c (which is probably where you found those on, off definitions) you'll find all the commands there. Column inversion, Voltage settings, power control, gamma correction, etc. e.g.

const uint8_t DISP_ON[] = {OTM8009A_CMD_DISPON, 0x00};
...
/* Send Command Display On */
DSI_IO_WriteCmd(0, (uint8_t *)DISP_ON);