BRT Community

General Category => Discussion - EVE => Topic started by: AT38 on June 20, 2019, 11:08:47 AM

Title: FT81x Backlight not working? [SOLVED]
Post by: AT38 on June 20, 2019, 11:08:47 AM
Hi,

I'm currently developing on an ME813A-WH50C display module.

I've had several days of trouble free operation.

Last night I power cycled the board as part of a debugging process.

Since then the display has not worked.

I am able to communicate over SPI and read out the chip ID register as 0x7C.

On examination of the display, I noticed that the back light was not on (no light bleeding out at the edges).

I have measured the voltage on the backlight pin and it is zero.

I've read out the values of REG_PWM_DUTY and REG_PWM_HZ and verified that their values are correct, 0x80 and 250 respectively.

I've tried shorting out the backlight pin to 3V3. This enables the backlight, but also sinks 30mA into the FT813.

There was no contact with the module between working and non working states.

Only the power button of the bench top supply was touched. ESD seems unlikely.

The PSU outputs 5v and drops to 3.3v on the MCU board via a linear regulator, and on the display module via a buck converter. Surge damage seems unlikely.

Wiring between the boards looks ok, and would foul SPI comms if not.

Can anyone tell me:
1) Why this has happened,
2) How do I fix it (preferably without shorting the pin to 3V3)
3) How do I prevent this from happening again?

Cheers


EDIT:

I've loaded a display list and forced the backlight on, but it looks like nothing is being displayed.
Possibly all out pins at zero. I'm going to check PCLK and DISP next.

EDIT2:

PCLK is outputting at 1.13MHz, should be 30MHz

DISP, VSYNC, HSYNC and DE are all Zero.
Title: Re: FT81x Backlight not working?
Post by: AT38 on June 20, 2019, 03:01:20 PM
I've gone back to an earlier commit and it seems to be working again.

Relieved. Thought I'd blown the hardware.  :-[

Darned odd though, as it worked until I power cycled.

I'll report back once I figure out what kind of stupid I've been.  ;)

Cheers.

Title: Re: FT81x Backlight not working?
Post by: AT38 on June 20, 2019, 04:59:24 PM
Figured it out.

I had an SPI transfer struct with a pointer to one of its own fields when writing a single register, which was fine when memory was dynamically allocated.
But I changed it to static allocation, copying the struct's values into a fifo, instead of a pointer.
The copied struct's pointer was still pointing to the original, causing garbage to be written to SPI after the original was removed from the stack.

This only affected initialisation, so display list updates were working. The display had already been initialised by the previous build.
I had thought that sending POWERDOWN and then ACTIVE would re-init, but apparently not. So the display worked fine until the power was cycled.
Once the power was cycled, all the initialisation was lost. The faulty code couldn't re-init the display, and hence the lack of output and odd PCLK speed.


I hope my ineptitude proves useful to others, or at least entertaining.  :)

Cheers,

AT38
Title: Re: FT81x Backlight not working? [SOLVED]
Post by: BRT Community on June 21, 2019, 10:52:59 AM
Hi,

Thanks for your update on the issue and it's great to hear that you resolved it.

Best Regards,
BRT Community