fix timer settings

pull/3/head
Clyne 4 years ago
parent ee274be303
commit 4b523f98c8

@ -12,7 +12,7 @@
#include "adc.hpp" #include "adc.hpp"
constexpr static const auto adcd = &ADCD1; constexpr static const auto adcd = &ADCD1;
constexpr static const auto gptd = &GPTD7; constexpr static const auto gptd = &GPTD6;
constexpr static const ADCConfig adc_config = { constexpr static const ADCConfig adc_config = {
.difsel = 0 .difsel = 0
@ -25,7 +25,7 @@ static ADCConversionGroup adc_group_config = {
.num_channels = 1, .num_channels = 1,
.end_cb = adc_read_callback, .end_cb = adc_read_callback,
.error_cb = nullptr, .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 .cfgr2 = 0,//ADC_CFGR2_ROVSE | ADC_CFGR2_OVSR_0 | ADC_CFGR2_OVSS_1, // Oversampling 2x
.tr1 = ADC_TR(0, 4095), .tr1 = ADC_TR(0, 4095),
.smpr = { .smpr = {

@ -13,7 +13,7 @@
constexpr static const auto dacd = &DACD1; constexpr static const auto dacd = &DACD1;
constexpr static const auto dacd2 = &DACD2; constexpr static const auto dacd2 = &DACD2;
constexpr static const auto gptd = &GPTD6; constexpr static const auto gptd = &GPTD7;
constexpr static const DACConfig dac_config = { constexpr static const DACConfig dac_config = {
.init = 0, .init = 0,
@ -25,7 +25,7 @@ constexpr static const DACConversionGroup dac_group_config = {
.num_channels = 1, .num_channels = 1,
.end_cb = nullptr, .end_cb = nullptr,
.error_cb = nullptr, .error_cb = nullptr,
.trigger = DAC_TRG(0) .trigger = DAC_TRG(2)
}; };
constexpr static const GPTConfig gpt_config = { constexpr static const GPTConfig gpt_config = {

Loading…
Cancel
Save