main: pll initialization
This commit is contained in:
parent
60ccbef127
commit
6825999536
21
main.c
21
main.c
@ -222,6 +222,27 @@ int main()
|
|||||||
int command_read = voodoo2->fbiInit2 & 0xff;
|
int command_read = voodoo2->fbiInit2 & 0xff;
|
||||||
printf("dac read: DAC__RS__COMMAND: m: %02x\n", command_read);
|
printf("dac read: DAC__RS__COMMAND: m: %02x\n", command_read);
|
||||||
|
|
||||||
|
/*
|
||||||
|
pixel clock: 40MHz
|
||||||
|
graphics/memory clock: 44.6MHz
|
||||||
|
*/
|
||||||
|
|
||||||
|
int m = 54;
|
||||||
|
int n = 67;
|
||||||
|
dac_write_pll_16(voodoo2, DAC__PLL_PARAMETER__CLK0_f0_PLL, m, n);
|
||||||
|
mn_t clk0_f0_res = dac_read_pll_16(voodoo2, DAC__PLL_PARAMETER__CLK0_f0_PLL);
|
||||||
|
printf("dac read: DAC__PLL_PARAMETER__CLK0_f0_PLL: m: %02x n: %02x\n",
|
||||||
|
clk0_f0_res.m, clk0_f0_res.n);
|
||||||
|
|
||||||
|
int pll_control
|
||||||
|
= DAC__PLL_CONTROL__CLK0_SELECT(0) // f0
|
||||||
|
| DAC__PLL_CONTROL__CLK1_SELECT(0) // fA
|
||||||
|
| DAC__PLL_CONTROL__ENABLE_INTERNAL_CLOCK_SELECT;
|
||||||
|
dac_write_pll_8(voodoo2, DAC__PLL_PARAMETER__PLL_CONTROL, pll_control);
|
||||||
|
mn_t pll_control_res = dac_read_pll_16(voodoo2, DAC__PLL_PARAMETER__PLL_CONTROL);
|
||||||
|
printf("dac read: DAC__PLL_PARAMETER__PLL_CONTROL: m: %02x\n",
|
||||||
|
pll_control_res.m);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// cleanup
|
// cleanup
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user