@@ 2,6 2,7 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "CpuFreqLPM.hpp"
+#include <log/log.hpp>
#include "fsl_dcdc.h"
namespace bsp
@@ 20,7 21,7 @@ namespace bsp
/* Set AHB_PODF. */
CLOCK_SetDiv(kCLOCK_AhbDiv, 1); // CBCDR
- DCDC_AdjustTargetVoltage(DCDC, VDDRun_975_mV, VDDStandby_925_mV);
+ DCDC_AdjustTargetVoltage(DCDC, VDDRun_900_mV, VDDStandby_925_mV);
break;
case CpuClock::CpuClock_Osc_12_Mhz:
/* Set PERIPH_CLK2_PODF. */
@@ 28,7 29,7 @@ namespace bsp
/* Set AHB_PODF. */
CLOCK_SetDiv(kCLOCK_AhbDiv, 1); // CBCDR
- DCDC_AdjustTargetVoltage(DCDC, VDDRun_975_mV, VDDStandby_925_mV);
+ DCDC_AdjustTargetVoltage(DCDC, VDDRun_900_mV, VDDStandby_925_mV);
break;
case CpuClock::CpuClock_Osc_24_Mhz:
/* Set PERIPH_CLK2_PODF. */
@@ 1,21 1,22 @@
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-#pragma once
+#ifndef PUREPHONE_CPUFREQLPM_HPP
+#define PUREPHONE_CPUFREQLPM_HPP
#include <cstdint>
namespace bsp
{
- inline constexpr std::uint32_t VDDRun_975_mV = 0x07;
- inline constexpr std::uint32_t VDDRun_1050_mV = 0x0A;
- inline constexpr std::uint32_t VDDRun_1075_mV = 0x0B;
- inline constexpr std::uint32_t VDDRun_1100_mV = 0x0C;
- inline constexpr std::uint32_t VDDRun_1125_mV = 0x0D;
- inline constexpr std::uint32_t VDDRun_1150_mV = 0x0E;
- inline constexpr std::uint32_t VDDRun_1275_mV = 0x13;
+ inline constexpr uint32_t VDDRun_900_mV = 0x4;
+ inline constexpr uint32_t VDDRun_1050_mV = 0xa;
+ inline constexpr uint32_t VDDRun_1075_mV = 0xb;
+ inline constexpr uint32_t VDDRun_1100_mV = 0xc;
+ inline constexpr uint32_t VDDRun_1125_mV = 0xd;
+ inline constexpr uint32_t VDDRun_1150_mV = 0xe;
+ inline constexpr uint32_t VDDRun_1275_mV = 0x13;
- inline constexpr std::uint32_t VDDStandby_925_mV = 0x01;
+ inline constexpr uint32_t VDDStandby_925_mV = 0x1;
class CpuFreqLPM
{
@@ 36,3 37,5 @@ namespace bsp
void SetHighestCoreVoltage();
};
} // namespace bsp
+
+#endif // PUREPHONE_CPUFREQLPM_HPP