~aleteoryx/muditaos

ref: 9a8ffff654596f42666fdcac137a43319b20b471 muditaos/module-bsp/board/rt1051/bellpx/brownout.cpp -rw-r--r-- 665 bytes
9a8ffff6 — Lefucjusz [BH-1863] Fix deleted file popup showing in Relaxation 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <fsl_common.h>
#include <fsl_pmu.h>

namespace bsp
{
    namespace
    {
        constexpr auto outputVoltage2P5 = 0x1BU; // 2.775V
        constexpr auto offsetVoltage2P5 = 0x03U; // 3*25mV
    }                                            // namespace

    void Brownout_init()
    {
        PMU_2P5nableBrownout(PMU, true);
        PMU_2P5SetRegulatorOutputVoltage(PMU, outputVoltage2P5);
        PMU_2P5SetBrownoutOffsetVoltage(PMU, offsetVoltage2P5);
        PMU_2P5EnableOutput(PMU, true);
    }
} // namespace bsp