kopia lustrzana https://github.com/mobilinkd/NucleoTNC
Change clock used for M17 to 48MHz.
rodzic
077c00917b
commit
f4ac271109
|
@ -43,7 +43,7 @@ static float dc_block(float x)
|
||||||
|
|
||||||
void M17Demodulator::start()
|
void M17Demodulator::start()
|
||||||
{
|
{
|
||||||
SysClock72();
|
SysClock48();
|
||||||
#if defined(HAVE_LSCO)
|
#if defined(HAVE_LSCO)
|
||||||
HAL_RCCEx_DisableLSCO();
|
HAL_RCCEx_DisableLSCO();
|
||||||
#endif
|
#endif
|
||||||
|
@ -71,7 +71,7 @@ void M17Demodulator::start()
|
||||||
if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
|
if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
|
||||||
CxxErrorHandler();
|
CxxErrorHandler();
|
||||||
|
|
||||||
startADC(1499, ADC_BLOCK_SIZE);
|
startADC(999, ADC_BLOCK_SIZE);
|
||||||
// getModulator().start_loopback();
|
// getModulator().start_loopback();
|
||||||
dcd_off();
|
dcd_off();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,10 +11,10 @@ void M17Modulator::init(const kiss::Hardware& hw)
|
||||||
|
|
||||||
(void) hw; // unused
|
(void) hw; // unused
|
||||||
|
|
||||||
SysClock72();
|
SysClock48();
|
||||||
|
|
||||||
// Configure 72MHz clock for 48kHz.
|
// Configure 72MHz clock for 48kHz.
|
||||||
htim7.Init.Period = 1499;
|
htim7.Init.Period = 999;
|
||||||
htim7.Init.Prescaler = 0;
|
htim7.Init.Prescaler = 0;
|
||||||
if (HAL_TIM_Base_Init(&htim7) != HAL_OK)
|
if (HAL_TIM_Base_Init(&htim7) != HAL_OK)
|
||||||
{
|
{
|
||||||
|
|
Ładowanie…
Reference in New Issue