Welcome to the Bridgetek Community!
Please read our Welcome Note
Technical Support enquires
please contact the team @ Bridgetek Support
Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology


Quote
4.12.2 Phase Locked Loop
There are 4 Phase Locked Loops (PLLs) inside the chip; the system PLL (PLL1), LVDSPLL (PLL2), DDRPLL
(PLL3) and the DDR PHYPLL (PLL4)
The system PLL receives the input clock from the oscillator and produce both the system clock and the
LVDSTX clock.
The LVDS PLL takes the input clock from the LVDSTX clock and generates the LVDS fast clock.
The DDRPLL and the DDR PHYPLL are used to generate clock for the DDR interface.
void configure_lvds(void)
{
EVE_memWrite32(REG_RE_DEST, EVE_SWAPCHAIN_0);
EVE_memWrite32(REG_RE_FORMAT, EVE_ARGB8);
EVE_memWrite32(REG_RE_W, EVE_HSIZE);
EVE_memWrite32(REG_RE_H, EVE_VSIZE);
EVE_memWrite32(REG_DISP, 1);
EVE_memWrite32(REG_LVDSTX_PLLCFG, setlvdspll_value(0, PLL_LOCK_PERIOD, 1, 10, 7)); /* 38.4 MHz * 10 / 8 = 48MHz */
EVE_memWrite32(REG_LVDSTX_EN, LVDS_CH0_EN);
EVE_memWrite32(REG_SC0_RESET, 1);
EVE_memWrite32(REG_SC0_SIZE, 2);
EVE_memWrite32(REG_SC0_PTR0, 10 << 20);
EVE_memWrite32(REG_SC0_PTR1, 20 << 20);
// EVE_memWrite32(REG_SC1_SIZE, 2);
// EVE_memWrite32(REG_SC1_PTR0, SC1_PTR0_STARTADDR);
// EVE_memWrite32(REG_SC1_PTR1, SC1_PTR1_STARTADDR);
// EVE_memWrite32(REG_SC2_SIZE, 2);
// EVE_memWrite32(REG_SC2_PTR0, SC2_PTR0_STARTADDR);
// EVE_memWrite32(REG_SC2_PTR1, SC2_PTR1_STARTADDR);
EVE_memWrite32(REG_SO_EN, 0);
EVE_memWrite32(REG_SO_MODE, EVE_SO_MODE_2);
EVE_memWrite32(REG_SO_SOURCE, EVE_SWAPCHAIN_0);
EVE_memWrite32(REG_SO_FORMAT, EVE_ARGB8);
EVE_memWrite32(REG_SO_EN, 1UL); /* enable scanout */
DELAY_MS(10);
}