aboutsummaryrefslogtreecommitdiffstats
path: root/source/dac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/dac.cpp')
-rw-r--r--source/dac.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/dac.cpp b/source/dac.cpp
index 97c71b3..eada21b 100644
--- a/source/dac.cpp
+++ b/source/dac.cpp
@@ -9,6 +9,7 @@
* If not, see <https://www.gnu.org/licenses/>.
*/
+#include "adc.hpp"
#include "dac.hpp"
constexpr static const auto dacd = &DACD1;
@@ -29,7 +30,7 @@ constexpr static const DACConversionGroup dac_group_config = {
};
constexpr static const GPTConfig gpt_config = {
- .frequency = 2400000,
+ .frequency = 1440000,
.callback = nullptr,
.cr2 = TIM_CR2_MMS_1, /* TRGO */
.dier = 0
@@ -55,7 +56,7 @@ namespace dac
dacStartConversion(channel == 0 ? dacd : dacd2, &dac_group_config, buffer, count);
if (dacs_running == 0)
- gptStartContinuous(gptd, 25);
+ gptStartContinuous(gptd, adc::get_gpt_divisor());
dacs_running |= 1 << channel;
}
}