Fix hang when starting in 9600 baud mode. Change to non-symmetric GMSK waveform.

kf7r_9600_experimental
Rob Riggs 2020-03-05 20:28:45 -06:00
rodzic a06d3b694b
commit 7b721c0d6b
4 zmienionych plików z 14 dodań i 13 usunięć

Wyświetl plik

@ -9,11 +9,7 @@ void AFSKModulator::init(const kiss::Hardware& hw)
{
set_twist(hw.tx_twist);
if (HAL_RCC_GetHCLKFreq() != 48000000)
{
ERROR("Clock is not 48MHz");
CxxErrorHandler();
}
SysClock48();
// Configure 48MHz clock for 26.4ksps.
htim7.Init.Period = 1817;

Wyświetl plik

@ -51,7 +51,6 @@ struct Fsk9600Demodulator : IDemodulator
void start() override
{
INFO("Setting 80MHz SysClock.");
SysClock80();
auto const& bpf_coeffs = bpf_bank[kiss::settings().rx_twist + 3];

Wyświetl plik

@ -6,16 +6,26 @@
namespace mobilinkd { namespace tnc {
/*
* Cosine.
const Fsk9600Modulator::cos_table_type Fsk9600Modulator::cos_table = {
2047, 2020, 1937, 1801, 1616, 1387, 1120, 822, 502, 169,
-169, -502, -822, -1120, -1387, -1616, -1801, -1937, -2020, -2048
};
*/
/*
* Square wave -- filtered in hardware at 7200Hz
const Fsk9600Modulator::cos_table_type Fsk9600Modulator::cos_table = {
2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047,
-2048, -2048, -2048, -2048, -2048, -2048, -2048, -2048, -2048, -2048
};
*/
// Gaussian
const Fsk9600Modulator::cos_table_type Fsk9600Modulator::cos_table = {
2042, 2027, 1995, 1931, 1815, 1626, 1345, 968, 507, 0,
-507, -968, -1345, -1626, -1815, -1931, -1995, -2027, -2042, -2048
};
void Fsk9600Modulator::init(const kiss::Hardware& hw)
{
@ -26,11 +36,7 @@ void Fsk9600Modulator::init(const kiss::Hardware& hw)
state = State::STOPPED;
level = Level::HIGH;
if (HAL_RCC_GetHCLKFreq() != 80000000)
{
ERROR("Clock is not 80MHz");
CxxErrorHandler();
}
SysClock80();
// Configure 80MHz clock for 192ksps.
htim7.Init.Period = 416;

Wyświetl plik

@ -211,8 +211,8 @@ private:
case Level::LOW:
if (bit)
{
std::transform(cos_table.rbegin(), cos_table.rend(), buffer,
[this](auto x){return adjust_level(x);});
std::transform(cos_table.begin(), cos_table.end(), buffer,
[this](auto x){return adjust_level(-1 - x);});
level = Level::HIGH;
}
else