]> code.bitgloo.com Git - clyne/stmdsp.git/commitdiff
fix timer settings
authorClyne Sullivan <clyne@bitgloo.com>
Thu, 22 Oct 2020 13:17:25 +0000 (09:17 -0400)
committerClyne Sullivan <clyne@bitgloo.com>
Thu, 22 Oct 2020 13:17:25 +0000 (09:17 -0400)
source/adc.cpp
source/dac.cpp

index 84620a20179a6f3ac46d7c31c6671ad8f992cc83..9fd3285227769eb4406c595601402377a03a744b 100644 (file)
@@ -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 = {
index c39da3829d88689ce1c15bc7a21539542a059f1f..97c71b368d8285323f499956b327aadbeaa638ad 100644 (file)
@@ -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 = {