Go Down

Topic: VGA output: PLL used for clock has jitter (Read 5085 times) previous topic - next topic

famo

After I have implemented a VGA interface on TinyFPGA-BX, 640x480@60Hz, 25 MHz pixel clock,
where it works very nice, I've included it into VIDOR4k.

No hope to have a perfect display, there is a jittering pixel positions.

Well, observed at oscilloscope the HSYNC edge on TinyFPGA-BX is perfectly stable
observing it at 350 us after the trigger (after about display 11 lines from the triggering one).
But on VIDOR4k this jitter is +/- 125 ns which correspond to 125/20 = about +/6 pixels.

Horizontal sync random jitter --> horizontal jittering position because both HSYNC and RGB
timing have the same jitter.

What to do?

I've generated a second PLL for the VGA, trying with slow loop filter and no compensation mode,
both reported as methods to reduce the jitter, but nothing is changed.
I've nuffered the HSYNC and VSYNC outputs to reduce the output current, no changes.

Someone has implemented a VGA on VIDOR4k?
Results?
Hints?


famo

Both clocks iCLK, 48 MHz coming from processor, and internal one wOSC_CLK coming from
cyclone10lp_oscillator instance, about 66 MHz, have high jittering.

As soon as possible I'll cut the iCLK CPU-FPGA interconnection and I'll insert a
stable 48 MHz oscillator.

Any comments are welcome.

famo

Update.

I've found R28 on the pcb, cut the track from the processor, inserted a MEMS
oscillator CMOS 3.3V.
Powered the board the oscillator starts, I can see it, 48 MHz, but the
high level seem unstable, sometimes but repetively drops down to about 2.5 V.
Looking at VCC on the board pin I can see why:
each 70 ms the is a drop from 3.3V down to about 2.5V, it seems there is something
drawing an extra current, doesn't matter is I press the reset button.
The +5V are stable.

So it seems related to my clock always running, not to oscillator itself
that consumes some mA.

Questions:
- is the attached schematic true so if I cut the connection cpu-R28 the GCLK doesn't drive anything?
- I know the GCLK is started at a given point from the CPU program: if it is always active like
  with my oscillator, what kind of problems can arise?
  Is the FPGA that begins to read the configuration memory and makes some bus contention?

Alternative: put the oscillator on the iMIPI_CLK LVDS input on camera connector.
I've tried in all ways, the iMIPI_CLK(n) set at VCC/2 and 1.1V, iMIPI_CLK directly driven by the
oscillator.
I can see a perfect 48 MHz clock, the iMIPI_CLK/iMIPI_CLK(n) differential clock has a 3.3V swing
centered at 1.6 or 1.1V, but I can't see it internally to the FPGA.
Maybe the swing and/or the common mode bias point are wrong?

Thanks for hints.
---

Limba

#3
May 22, 2020, 01:16 am Last Edit: May 22, 2020, 01:18 am by Limba
Can you meas VSYS and VCRG it shouldn't drop under 3v3.

Edit:Are you using USB or external PSU for VIN

famo

Can you meas VSYS and VCRG it shouldn't drop under 3v3.

Edit:Are you using USB or external PSU for VIN
Power from USB.

With my oscillator the +5V on the board pin is quiet,
3v3 behaves as described.

The GCLK feeds FPGA E2 pin only.
What happens if this clock is active at power-up instead after the power-up
when the software starts it?
On the FPGA there is my own project, the only FPGA pins I use are
Ax and Dx that appear on the two standard male/female board connectors.

Yes, I could mount a manual switch to insert my oscillator after
the complete board startup, but ... no one of the board hardware
and software designers is able to explain why the GCLK is started in the following way?

  //enableFpgaClock();
  pinPeripheral(30, PIO_AC_CLK);
  clockout(0, 1);  // generate 48MHz for FPGA, pin input iCLK
  delay(1000);

Why is there the 1 second delay? To wait for ... what?
What happens during this delay?

Maybe Vidor 4000 project has been sent from ET in Andromeda galaxy
and uses a unknown technology?

p.s.: I'm still waiting for the answer about AREF pin.




Limba

#5
May 22, 2020, 02:15 pm Last Edit: May 22, 2020, 02:53 pm by Limba
I need to check that 3v3 from my vidor. Currently using zedboard for tinkering.

Is that dropping 3v3 seen only when using external crystal?

What I see is charging chip that needs to be configured by SW to get right charging and USB current limit. Not sure will arduino do this at startup.

One way is to use Lion battery for that J12 connection. That will bypass current limit made by USB power/charging controller

Edit:
If that charging chip detect normal USB then it sets 100mA as specs requires and SW need to update current limit after it negotiate host for bigger current limit.
If it detects USB charger then it's uses limits set by charger.

Determination for normal connection to USB is that D+ and D- is floating after 0.5s after startup. After that SW can go and increase USB current.

Charging chip
https://www.ti.com/lit/ds/symlink/bq24195l.pdf?&ts=1590150418725

famo

I need to check that 3v3 from my vidor. Currently using zedboard for tinkering.

Is that dropping 3v3 seen only when using external crystal?
Yes, seen ONLY with my external oscillator powered AND connected to R28 side CPU,
with connection R28-CPU prevoiusly interrupted (track cut)
My oscillator is a DSC6021JE3B-01GB sample from Microchip, it draws 1.3 mA only.
With my oscillator always powered, if I detach its output and restore the connection R28 to CPU
the boards return to work again (3v3 stable).


What I see is charging chip that needs to be configured by SW to get right charging and USB current limit. Not sure will arduino do this at startup.

One way is to use Lion battery for that J12 connection. That will bypass current limit made by USB power/charging controller

Do you really think the problem is the power consumption of my oscillator?
Look here
   https://datasheetspdf.com/pdf-file/1093330/Microchip/DSC6021/1



Limba

I was thinking what design you are starting in FPGA and what clocking

famo

Let me know how I can send to you only the complete design foder.

famo

... but remember the the FPGA configuration loading is started
a lot after the GCLK is started.
So the only difference I can see is that my clock is active
well before the RESET pulse at power-up terminates, well
before the CPU begins its program.


  //enableFpgaClock();
  pinPeripheral(30, PIO_AC_CLK);
  clockout(0, 1);  // generate 48MHz for FPGA, pin input iCLK
  delay(1000);
 
  //Init Jtag Port
  ret = jtagInit();
  mbPinSet();

  // Load FPGA user configuration
  ptr[0] = 0 | 3;
  mbEveSend(ptr, 1);

  // Give it delay
  delay(1000);

Limba

Before that clock starting FPGA has loaded it's boot image from flash. That command with mailbox is request to start loading user image from flash. (You can overwrite that image but then you need to do factory image flash to get old stuff working that used in vidor images)

I recommend to use CONF_DONE_B6_H14/CONF_DONE pin for oscillator OE. It have 10k pullup resistor (R3) to 3v3 and you can use that resistor to wirewrap that signal to oscillator.

famo

OK, I've just ordered another oscillator type with enable pin,
I'll inform you all about asap, stay tuned!

Thanks for help Limba!!

Limba

#12
May 25, 2020, 08:22 pm Last Edit: May 25, 2020, 08:28 pm by Limba
Didn't check end of datasheet.
That DSC6021 had freq selection in that pin where I think it was OE.

famo

Limba,
do you where to find the components designators on PCB for Vidor 4000?

There are several 10k resistors connected to +3V3 and one FPGA pin, so I cannot
identify R3 on the board.

Thanks

famo

What I can find are six 10K resistors with one terminal connected to VCC (+3V3).
They are on the bottom side.
Their other terminal go in one case to to EZ6301 chip, on the other five cases I don't know where,
so what I can do is to trace at the scope what the five signals do.

Triggering on VCC at power-up, I can see the CPU-generated SAM_PORTS_GCLK
switching ON after about 2.9 seconds.
Well, no one of the above five signals is at 0 from power-up and goes at 1 later so cannot be used as a "chip enable" for my oscillator.

Limba, are you sure the CONF_DONE signal starts at 0 just after the power-up and gors to 1
later?

Vidor4000 designers, please, could you give me some answer, some help? Thanks so much!

Go Up