From 4b523f98c86f7f953b5c19fe414811c27857d78a Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 22 Oct 2020 09:17:25 -0400 Subject: [PATCH] fix timer settings --- source/adc.cpp | 4 ++-- source/dac.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/adc.cpp b/source/adc.cpp index 84620a2..9fd3285 100644 --- a/source/adc.cpp +++ b/source/adc.cpp @@ -12,7 +12,7 @@ #include "adc.hpp" constexpr static const auto adcd = &ADCD1; -constexpr static const auto gptd = &GPTD7; +constexpr static const auto gptd = &GPTD6; constexpr static const ADCConfig adc_config = { .difsel = 0 @@ -25,7 +25,7 @@ static ADCConversionGroup adc_group_config = { .num_channels = 1, .end_cb = adc_read_callback, .error_cb = nullptr, - .cfgr = ADC_CFGR_EXTEN_RISING | ADC_CFGR_EXTSEL_SRC(12), /* TIM4_TRGO */ + .cfgr = ADC_CFGR_EXTEN_RISING | ADC_CFGR_EXTSEL_SRC(13), /* TIM4_TRGO */ .cfgr2 = 0,//ADC_CFGR2_ROVSE | ADC_CFGR2_OVSR_0 | ADC_CFGR2_OVSS_1, // Oversampling 2x .tr1 = ADC_TR(0, 4095), .smpr = { diff --git a/source/dac.cpp b/source/dac.cpp index c39da38..97c71b3 100644 --- a/source/dac.cpp +++ b/source/dac.cpp @@ -13,7 +13,7 @@ constexpr static const auto dacd = &DACD1; constexpr static const auto dacd2 = &DACD2; -constexpr static const auto gptd = &GPTD6; +constexpr static const auto gptd = &GPTD7; constexpr static const DACConfig dac_config = { .init = 0, @@ -25,7 +25,7 @@ constexpr static const DACConversionGroup dac_group_config = { .num_channels = 1, .end_cb = nullptr, .error_cb = nullptr, - .trigger = DAC_TRG(0) + .trigger = DAC_TRG(2) }; constexpr static const GPTConfig gpt_config = {