#define STM32_GPT_USE_TIM2 FALSE\r
#define STM32_GPT_USE_TIM3 FALSE\r
#define STM32_GPT_USE_TIM4 TRUE\r
-#define STM32_GPT_USE_TIM5 TRUE\r
-#define STM32_GPT_USE_TIM6 FALSE\r
+#define STM32_GPT_USE_TIM5 FALSE\r
+#define STM32_GPT_USE_TIM6 TRUE\r
#define STM32_GPT_USE_TIM7 FALSE\r
#define STM32_GPT_USE_TIM8 FALSE\r
#define STM32_GPT_USE_TIM15 FALSE\r
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()
#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,
.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
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()