cancel
Showing results for 
Search instead for 
Did you mean: 

External Crystal issue when STM33H7 LTDC interface used with RGB to HDMI convertor TI TFP410

VShet.2
Associate II

I am using STM32H743IIT6 MCU to drive HDMI display using LTDC peripheral and Texas Instrument TFP410 for RGB to HDMI conversion. Issue I am facing is I use external crystal as clock source then I see disturbance on my HDMI monitor and its display blinks randomly, say screen is proper for some 5-10 sec then it will flicker and turn off and on then again be stable for some time and these repeats. My guess is that some HDMI timing related parameters are not matched and that's why this behavior on monitor. Surprisingly, this issue resolves if I use internal CSI RC oscillator as clock source.  I even tried doing the PCB layout again using an external agency, but same issue persists in that layout as well. What could be the issue here that it works with internal CSI RC clock source and not external crystal ? Please find below related parameters configured in my project. I have also attached my projects CubeMX .ioc file for reference.

  1. Clock Source: External Crystal 25MHz
  2. FMC: External SDRAM ISSI IS42S32200L-6TL which is 32bit SDRAM
  3. LTDC Settings: 1280 x 720p HD resolution @60Hz (Below parameters are as specified in standard without which if I connect to Dell monitor then it gives timing error on screen)
  1. LTDC Clock 74.250 MHz
  2. 16bit RGB565
  3. LTDC data, clock, HSync, VSync, DE signal goes to TI TFP410 IC whose output are then connected with HDMI connector.
  4. Horizontal Timings
    1. Active Pixels 1280
    2. Front Porch 110
    3. Sync Width 40
    4. Back Porch 220
    5. Blanking Total 370
    6. Total Pixels 1650
    7. Sync Polarity pos
  5. Vertical Timings
    1. Active Lines 720
    2. Front Porch 5
    3. Sync Width 5
    4. Back Porch 20
    5. Blanking Total 30
    6. Total Lines 750
    7. Sync Polarity pos
12 REPLIES 12

Aren't Sync and Back Porch concurrent?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AScha.3
Chief

>What could be the issue here that it works with internal CSI RC clock source and not external crystal ?

 

You adjusted PLL/clk for 4M CSI and 25M HSE absolutely to same speed (for core, LTDC, FMC, etc. ) ?

If you feel a post has answered your question, please click "Accept as Solution".

Yes, I have adjusted the PLL values such that the core. LTDC, FMC clock remains same in both case.

No, they are different. 

10_objects.png

So check with a scope : LTDC  clock, HSync, VSync -> same timing with HSE or CSI ?

If you feel a post has answered your question, please click "Accept as Solution".

Please find attached short videos of LTDC Clock waveform as seen at the input on TI TFP410 HDMI IC. This signal is measured using DSO with probe up to 100MHz and sampling rate of 1Gps. 

Observations:

  1. External Crystal are more accurate as expected. LTDC clock was set at 74.25MHz and it is same as seen in video. In case of CSI RC to frequency is around 74.15MHZ. 
  2. Variation in frequency is case of HSE is 74.245 to 74.255 MHz roughly whereas in case of CSI RC it is 74.2 to 74.11 MHz
  3. In both case I observe a sine wave instead of square wave which was expected. I see that might be an issue. But even with the wave not being square in both the cases and more variation in CSI RC case the HDMI works and with external HSE being more accurate and less variation HDMI doesn't work.

ok,

>In both case I observe a sine wave instead of square wave 

Use 10:1 scope probe setting . Do you ?

+

set port/pin speed hi or very high , then you get sq.wave.

(for all pins with hi speed signal ! )

If you feel a post has answered your question, please click "Accept as Solution".

Tesla and your image mean , that sync is part of accu back porch, and your nums little miss.

for example

  hltdc.Init.HorizontalSync = 4;
  hltdc.Init.VerticalSync = 4;
  hltdc.Init.AccumulatedHBP = 12;
  hltdc.Init.AccumulatedVBP = 12;
  hltdc.Init.AccumulatedActiveW = 812;
  hltdc.Init.AccumulatedActiveH = 492;
  hltdc.Init.TotalWidth = 820;
  hltdc.Init.TotalHeigh = 506;

back porch here is 8  = 12-4

your nums miss 

  1. Blanking Total 370
  2. Total Pixels 1650 ...

Concurrent in my vocabulary are "at the same time", the line totals are BP+ACTIVE+FP, not SYNC+BP+ACTIVE+FP.

If the peripheral has a single pixel counter for the line, and I'm doing a compare on that count, I hold SYNC until it hits it's count, no data goes out until it hits the ACTIVE count at BACK PORCH, and stops when it hits the FRONT PORCH

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..