kopia lustrzana https://github.com/mobilinkd/NucleoTNC
rodzic
7039d19724
commit
0da7939f15
|
@ -33,7 +33,7 @@ struct Fsk9600Demodulator : IDemodulator
|
|||
static_assert(audio::ADC_BUFFER_SIZE >= ADC_BLOCK_SIZE);
|
||||
|
||||
static constexpr uint32_t SAMPLE_RATE = 192000;
|
||||
static constexpr uint16_t VREF = 4095;
|
||||
static constexpr uint16_t VREF = 16383;
|
||||
|
||||
using bpf_coeffs_type = std::array<int16_t, FILTER_TAP_NUM>;
|
||||
using bpf_bank_type = std::array<bpf_coeffs_type, 13>;
|
||||
|
@ -61,7 +61,7 @@ struct Fsk9600Demodulator : IDemodulator
|
|||
demod_filter.init(bpf);
|
||||
passall(kiss::settings().options & KISS_OPTION_PASSALL);
|
||||
|
||||
hadc1.Init.OversamplingMode = DISABLE;
|
||||
hadc1.Init.OversamplingMode = ENABLE;
|
||||
if (HAL_ADC_Init(&hadc1) != HAL_OK)
|
||||
{
|
||||
CxxErrorHandler();
|
||||
|
@ -72,7 +72,7 @@ struct Fsk9600Demodulator : IDemodulator
|
|||
sConfig.Channel = AUDIO_IN;
|
||||
sConfig.Rank = ADC_REGULAR_RANK_1;
|
||||
sConfig.SingleDiff = ADC_SINGLE_ENDED;
|
||||
sConfig.SamplingTime = ADC_SAMPLETIME_247CYCLES_5;
|
||||
sConfig.SamplingTime = ADC_SAMPLETIME_6CYCLES_5;
|
||||
sConfig.OffsetNumber = ADC_OFFSET_NONE;
|
||||
sConfig.Offset = 0;
|
||||
if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
|
||||
|
|
|
@ -38,7 +38,7 @@ void Fsk9600Modulator::init(const kiss::Hardware& hw)
|
|||
|
||||
SysClock72();
|
||||
|
||||
// Configure 80MHz clock for 192ksps.
|
||||
// Configure 72MHz clock for 192ksps.
|
||||
htim7.Init.Period = 374;
|
||||
if (HAL_TIM_Base_Init(&htim7) != HAL_OK)
|
||||
{
|
||||
|
|
|
@ -29,11 +29,11 @@ void M17Demodulator::start()
|
|||
polarity = kiss::settings().rx_rev_polarity() ? -1 : 1;
|
||||
audio::virtual_ground = (VREF + 1) / 2;
|
||||
|
||||
// hadc1.Init.OversamplingMode = DISABLE;
|
||||
// if (HAL_ADC_Init(&hadc1) != HAL_OK)
|
||||
// {
|
||||
// CxxErrorHandler();
|
||||
// }
|
||||
hadc1.Init.OversamplingMode = ENABLE;
|
||||
if (HAL_ADC_Init(&hadc1) != HAL_OK)
|
||||
{
|
||||
CxxErrorHandler();
|
||||
}
|
||||
|
||||
ADC_ChannelConfTypeDef sConfig;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue