cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Display On/Off State

TLahr.1
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
TLahr.1
Associate III

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.

View solution in original post

2 REPLIES 2
TLahr.1
Associate III

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
Chief III

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);