kopia lustrzana https://github.com/mobilinkd/tnc3-firmware
Update 1200 baud modem to use same timing on both TNC3 and NucleoTNC.
rodzic
43e0db69f7
commit
f109406256
|
@ -11,13 +11,8 @@ void AFSKModulator::init(const kiss::Hardware& hw)
|
|||
|
||||
SysClock48();
|
||||
|
||||
#ifndef NUCLEOTNC
|
||||
// Configure 48MHz clock for 26.4ksps.
|
||||
htim7.Init.Period = 1817;
|
||||
#else
|
||||
// Using an 80MHz clock on NucleoTNC.
|
||||
htim7.Init.Period = 3029;
|
||||
#endif
|
||||
if (HAL_TIM_Base_Init(&htim7) != HAL_OK)
|
||||
{
|
||||
ERROR("htim7 init failed");
|
||||
|
|
|
@ -90,16 +90,12 @@ struct Afsk1200Demodulator : IDemodulator
|
|||
sConfig.Channel = AUDIO_IN;
|
||||
sConfig.Rank = ADC_REGULAR_RANK_1;
|
||||
sConfig.SingleDiff = ADC_SINGLE_ENDED;
|
||||
sConfig.SamplingTime = ADC_SAMPLETIME_12CYCLES_5;
|
||||
sConfig.SamplingTime = ADC_SAMPLETIME_24CYCLES_5;
|
||||
sConfig.OffsetNumber = ADC_OFFSET_NONE;
|
||||
sConfig.Offset = 0;
|
||||
if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
|
||||
CxxErrorHandler();
|
||||
#ifndef NUCLEOTNC
|
||||
startADC(1817, ADC_BLOCK_SIZE);
|
||||
#else
|
||||
startADC(3029, ADC_BLOCK_SIZE);
|
||||
#endif
|
||||
}
|
||||
|
||||
void stop() override
|
||||
|
|
Ładowanie…
Reference in New Issue