~aleteoryx/muditaos

4e2e34e610b4505a08d57ccd198cef3e6d7506a9 — Maciej Gibowicz 4 years ago 425d23e
[MOS-146] Baudrate change for cellular transmission

UART baudrate changed from 460800 to 115200
* lower power consumption by modem
* URC support on 24 MHz CPU instead of 132
M module-services/service-cellular/ServiceCellular.cpp => module-services/service-cellular/ServiceCellular.cpp +1 -1
@@ 2183,7 2183,7 @@ auto ServiceCellular::handleNetworkStatusUpdateNotification(sys::Message *msg) -
auto ServiceCellular::handleUrcIncomingNotification(sys::Message *msg) -> std::shared_ptr<sys::ResponseMessage>
{
    // when handling URC, the CPU frequency does not go below a certain level
    cpuSentinel->HoldMinimumFrequency(bsp::CpuFrequencyMHz::Level_4);
    cpuSentinel->HoldMinimumFrequency(bsp::CpuFrequencyMHz::Level_2);
    cmux->exitSleepMode();
    return std::make_shared<CellularResponseMessage>(true);
}

M module-services/service-cellular/service-cellular/ServiceCellular.hpp => module-services/service-cellular/service-cellular/ServiceCellular.hpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 105,7 105,7 @@ class ServiceCellular : public sys::Service

  private:
    at::ATURCStream atURCStream;
    std::unique_ptr<CellularMux> cmux = std::make_unique<CellularMux>(PortSpeed_e::PS460800, this);
    std::unique_ptr<CellularMux> cmux = std::make_unique<CellularMux>(PortSpeed_e::PS115200, this);
    std::shared_ptr<sys::CpuSentinel> cpuSentinel;

    // used for polling for call state