From 96e4883081e253287d18c93118399f39b71551ea Mon Sep 17 00:00:00 2001 From: Clyne Sullivan <clyne@bitgloo.com> Date: Sat, 22 Aug 2020 16:56:47 -0400 Subject: adc/dac passthrough --- source/adc.cpp | 2 +- source/dac.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source') diff --git a/source/adc.cpp b/source/adc.cpp index 9e0491e..1f65e68 100644 --- a/source/adc.cpp +++ b/source/adc.cpp @@ -77,7 +77,7 @@ namespace adc adc_operation_func = operation_func; adc_group_config.circular = true; adcStartConversion(adcd, &adc_group_config, buffer, count); - gptStartContinuous(gptd, 1000); // 10kHz + gptStartContinuous(gptd, 100); // 10kHz } void read_stop() diff --git a/source/dac.cpp b/source/dac.cpp index 6096d8e..644689e 100644 --- a/source/dac.cpp +++ b/source/dac.cpp @@ -12,7 +12,7 @@ #include "dac.hpp" constexpr static const auto dacd = &DACD1; -constexpr static const auto gptd = &GPTD5; +constexpr static const auto gptd = &GPTD6; constexpr static const DACConfig dac_config = { .init = 0, @@ -24,11 +24,11 @@ constexpr static const DACConversionGroup dac_group_config = { .num_channels = 1, .end_cb = nullptr, .error_cb = nullptr, - .trigger = DAC_TRG(3) + .trigger = DAC_TRG(0) }; constexpr static const GPTConfig gpt_config = { - .frequency = 500000, + .frequency = 1000000, .callback = nullptr, .cr2 = TIM_CR2_MMS_1, /* TRGO */ .dier = 0 @@ -48,7 +48,7 @@ namespace dac void write_start(dacsample_t *buffer, size_t count) { dacStartConversion(dacd, &dac_group_config, buffer, count); - gptStartContinuous(gptd, 1); + gptStartContinuous(gptd, 100); } void write_stop() -- cgit v1.2.3