Author Topic: Struggling to understand RGB interface porch settings  (Read 449 times)

0 Members and 1 Guest are viewing this topic.

Offline ArteTopic starter

  • Contributor
  • Posts: 21
  • Country: fr
Struggling to understand RGB interface porch settings
« on: August 06, 2024, 11:36:52 pm »
Hello, I'm trying to interface a LCD-TFT driven by a ST7789V to a STM32H7.
I'm struggling specifically to understand how porches work, and whose responsability they are.

The 6 'porch' variables in an RGB interface are the sync width, front porch and back porch for both horizontal and vertical. These 6 can be individually set in the LTDC configuration of the STM32.
Going by the ST7789V datasheet giving you a table with min, typical and max values and little more information except the consequence of porch values on frame rate, it looks like you get to pick them (?).

But then the available commands don't seem to let you set all of them. You can set the (hsync width + hsync back porch) and (vsync width + vsync back porch), "[the] front porch setting" and "[the] back porch setting" - only 4 values.
As far as I can tell, all the relevant info is in the subsequent pages. It's not clear at all to me what "[the] front porch setting" and "[the] back porch setting" mean, considering that the ST7789V advises very different values for their horizontal & vertical front porch, for instance.
There is a "separate porch control" option, on which there's no info, but I would tend to believe this enables different porch settings in idle & partial display modes rather than enabling setting different horizontal & vertical front porch - because there's no command to do that anyway.

Could someone familiar with the RGB interface enlighten me ?

These are the 3 relevant excerpts from the ST7789V datasheet:




And this is the STM32CubeIDE configurator on the topic:
« Last Edit: August 06, 2024, 11:41:00 pm by Arte »
 

Offline Silenos

  • Regular Contributor
  • *
  • Posts: 63
  • Country: pl
  • Fumbling in ignorance
Re: Struggling to understand RGB interface porch settings
« Reply #1 on: August 07, 2024, 09:01:57 am »
Have you read AN4861? I used that years ago and it was enough to set this peripheral to work.
IIRC I was using "typical" values everywhere. Though my display was strange, like it was a piece cut from a larger sheet, and had to manually palpate the offset to align the porches(?) to fit into hardware display.
« Last Edit: August 07, 2024, 09:04:19 am by Silenos »
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4218
  • Country: nl
Re: Struggling to understand RGB interface porch settings
« Reply #2 on: August 07, 2024, 10:00:36 am »
There is a lot to do with this, but it basically depends on the timing for the display. Setting the parameters wrong results in a shift of the pixels on the display. The settings to be used should be given in the specifications of the used display. The first image in your post already shows it all. (8.9.3)

The sync pulse width plus the back porch set the start of the displayable pixels and at the end there is time needed and this is set by the front porch. Having these settings wrong results in either a shifted or distorted image on the screen.

I have seen this with the FNIRSI 1013D and 1014D oscilloscopes that are made in batches where LCD's from different manufacturers have been used.

So try to find the specs for the display you are using or see if it is possible to read out some information about this from the ST7789V, because my guess is that it is preprogrammed in that controller. Have not read the datasheet of it though, so it is a guess.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf