From b90473b76e30a8ca70632ccea0fece44ea1080e8 Mon Sep 17 00:00:00 2001 From: F5OEO Date: Thu, 23 Jul 2020 15:14:41 +0100 Subject: [PATCH] Fix DMA for high frequency --- src/gpio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gpio.cpp b/src/gpio.cpp index 308b830..827aa47 100644 --- a/src/gpio.cpp +++ b/src/gpio.cpp @@ -263,7 +263,7 @@ uint32_t clkgpio::GetMasterFrac(double Frequency) if((PllFixDivider==1))//There is no Prediv on Pi4 //Using PDIV thus frequency/2 { if(pi_is_2711) // No PDIV on pi4 - FloatMult = ((double)(CentralFrequency + Frequency) ) / ((double)(XOSC_FREQUENCY) * (1 - clk_ppm * 1e-6)); + FloatMult = ((double)(CentralFrequency + Frequency)*2 ) / ((double)(XOSC_FREQUENCY) * (1 - clk_ppm * 1e-6)); else { FloatMult = ((double)(CentralFrequency + Frequency) ) / ((double)(XOSC_FREQUENCY*2) * (1 - clk_ppm * 1e-6));