mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
fixed altera pll clk dividers for ctb
This commit is contained in:
parent
745fca7201
commit
d64d0b5ac1
Binary file not shown.
@ -288,7 +288,7 @@ int ALTERA_PLL_SetOuputFrequency(int pllIndex, int clkIndex, int pllVCOFreqMhz,
|
||||
pllIndex, clkIndex, value, pllVCOFreqMhz));
|
||||
|
||||
// calculate output frequency
|
||||
float total_div = (float)pllVCOFreqMhz / (float)value;
|
||||
int total_div = (float)pllVCOFreqMhz / (float)value;
|
||||
|
||||
// assume 50% duty cycle
|
||||
uint32_t low_count = total_div / 2;
|
||||
@ -296,7 +296,7 @@ int ALTERA_PLL_SetOuputFrequency(int pllIndex, int clkIndex, int pllVCOFreqMhz,
|
||||
uint32_t odd_division = 0;
|
||||
|
||||
// odd division
|
||||
if (total_div > (float)(2 * low_count)) {
|
||||
if (total_div > (2 * low_count)) {
|
||||
++high_count;
|
||||
odd_division = 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user