1<?xml version="1.0" encoding="utf-8"?> 2 3 4<!--**************************************************************************** 5* \file power.cypersonality 6* \version 1.3 7* 8* \brief 9* Personality description file for MCU part of Low Power Assistant. 10* This supports CAT1A devices. 11* 12******************************************************************************** 13* \copyright 14* Copyright (c) 2022, Cypress Semiconductor Corporation (an Infineon company) or 15* an affiliate of Cypress Semiconductor Corporation. 16* SPDX-License-Identifier: Apache- 17* 18* Licensed under the Apache License, Version 2.0 (the "License"); 19* you may not use this file except in compliance with the License. 20* You may obtain a copy of the License at 21* 22* http://www.apache.org/licenses/LICENSE-2.0 23* 24* Unless required by applicable law or agreed to in writing, software 25* distributed under the License is distributed on an "AS IS" BASIS, 26* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 27* See the License for the specific language governing permissions and 28* limitations under the License. 29*****************************************************************************--> 30 31<Personality id="power" name="Power Settings" version="1.3" xmlns="http://cypress.com/xsd/cyhwpersonality_v7"> 32 <Dependencies> 33 <IpBlock name="mxs40srss" /> 34 <Resource name="srss\.power" /> 35 </Dependencies> 36 <ExposedMembers> 37 <ExposedMember key="vddaMv" paramId="vddaMv" /> 38 <ExposedMember key="usingUlp" paramId="usingUlp" /> 39 <ExposedMember key="deepsleepWhenIdle" paramId="deepsleepWhenIdle" /> 40 </ExposedMembers> 41 <Parameters> 42 <!-- Documentation --> 43 <ParamDoc id="pdlDoc" name="SysPm API Reference" group="Overview" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__syspm.html" linkText="Open SysPm Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" /> 44 45 <!-- Power settings --> 46 <ParamChoice id="pwrMode" name="Power Mode" group="Internal" default="LDO_1_1" visible="false" editable="true" 47 desc="This parameter was replaced by actPwrMode and coreRegulator."> 48 <Entry name="0.9V Buck Regulator" value="SIMO_0_9" visible="true" /> 49 <Entry name="0.9V LDO Linear Regulator" value="LDO_0_9" visible="true" /> 50 <Entry name="1.1V Buck Regulator" value="SIMO_1_1" visible="true" /> 51 <Entry name="1.1V LDO Linear Regulator" value="LDO_1_1" visible="true" /> 52 </ParamChoice> 53 54 <ParamChoice id="actPwrMode" name="System Active Power Mode" group="General" default="`${(pwrMode eq LDO_0_9) || (pwrMode eq SIMO_0_9) ? ULP : LP}`" visible="true" editable="true" 55 desc="Selects the system operating power mode."> 56 <Entry name="LP" value="LP" visible="true" /> 57 <Entry name="ULP" value="ULP" visible="true" /> 58 </ParamChoice> 59 60 <ParamChoice id="coreRegulator" name="Core Regulator" group="General" default="`${(pwrMode eq LDO_0_9) ? CY_SYSPM_LDO_MODE_MIN : ((pwrMode eq LDO_1_1) ? CY_SYSPM_LDO_MODE_NORMAL : ((pwrMode eq SIMO_0_9) ? CY_SYSPM_BUCK_MODE_MIN : CY_SYSPM_BUCK_MODE_NORMAL))}`" visible="true" editable="true" 61 desc="Selects the core regulator to power the device."> 62 <Entry name="Normal Current LDO" value="CY_SYSPM_LDO_MODE_NORMAL" visible="true" /> 63 <Entry name="Minimum Current LDO" value="CY_SYSPM_LDO_MODE_MIN" visible="true" /> 64 <Entry name="Normal Current Buck" value="CY_SYSPM_BUCK_MODE_NORMAL" visible="true" /> 65 <Entry name="Minimum Current Buck" value="CY_SYSPM_BUCK_MODE_MIN" visible="true" /> 66 </ParamChoice> 67 68 <ParamBool id="pmicEnable" name="Enable External PMIC Output" group="General" default="false" visible="true" editable="true" 69 desc="Enables an external PMIC to provide VDDD power to the device." /> 70 71 <ParamChoice id="backupSrc" name="vBackup Source" group="General" default="VDDD" visible="true" editable="true" 72 desc="Selects whether the backup power domain is driven by a dedicated supply (e.g. super-cap or battery), or tied to VDDD."> 73 <Entry name="VDDD" value="VDDD" visible="true" /> 74 <Entry name="Dedicated Supply" value="DEDICATED" visible="true" /> 75 </ParamChoice> 76 77 <ParamChoice id="idlePwrMode" name="System Idle Power Mode" group="RTOS" default="CY_CFG_PWR_MODE_DEEPSLEEP" visible="true" editable="true" 78 desc="Selects the lowest power mode the system attempts to enter when there is no active tasks to execute, i.e. the system is in idle state. 79 This option only applies for an RTOS based application."> 80 <Entry name="Active" value="CY_CFG_PWR_MODE_ACTIVE" visible="true" /> 81 <Entry name="CPU Sleep" value="CY_CFG_PWR_MODE_SLEEP" visible="true" /> 82 <Entry name="System Deep Sleep" value="CY_CFG_PWR_MODE_DEEPSLEEP" visible="true" /> 83 </ParamChoice> 84 85 <ParamRange id="deepsleepLatency" name="Deep Sleep Latency (ms)" group="RTOS" default="0" min="0" max="1000" resolution="1" visible="true" editable="true" 86 desc="Greater between the time required to enter to and exit from the deep sleep power mode. 87 This option only applies for an RTOS based application." /> 88 89 <!-- Operating conditions --> 90 <ParamRange id="vddaMv" name="VDDA Voltage (mV)" group="Operating Conditions" default="3300" min="1700" max="3600" resolution="1" visible="true" editable="true" desc="VDDA voltage in millivolts." /> 91 <ParamRange id="vdddMv" name="VDDD Voltage (mV)" group="Operating Conditions" default="3300" min="1700" max="3600" resolution="1" visible="true" editable="true" desc="VDDD voltage in millivolts." /> 92 <ParamRange id="vBackupMv" name="VBACKUP Voltage (mV)" group="Operating Conditions" default="3300" min="1700" max="3600" resolution="1" visible="true" editable="true" desc="VBACKUP voltage in millivolts." /> 93 <ParamRange id="vddNsMv" name="VDD_NS Voltage (mV)" group="Operating Conditions" default="3300" min="1700" max="3600" resolution="1" visible="true" editable="true" desc="VDD_NS voltage in millivolts." /> 94 <ParamRange id="vddio0Mv" name="VDDIO0 Voltage (mV)" group="Operating Conditions" default="3300" min="1700" max="3600" resolution="1" visible="true" editable="true" desc="VDDIO0 voltage in millivolts." /> 95 <ParamRange id="vddio1Mv" name="VDDIO1 Voltage (mV)" group="Operating Conditions" default="3300" min="1700" max="3600" resolution="1" visible="true" editable="true" desc="VDDIO1 voltage in millivolts." /> 96 97 <!-- Wakeup pins --> 98 <ParamSignal port="hibernate_wakeup[0]" name="Hibernate Wakeup (0)" group="Wakeup Pins" visible="`${hasVisibleOption("hibernate_wakeup[0]")}`" 99 desc="Reserve the hibernate_wakeup[0] pin to use it as the wakeup source from Hibernate power mode." canBeEmpty="true" > 100 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 101 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 102 <Fixed value="CY_GPIO_DM_PULLUP" /> 103 </Parameter> 104 </Constraint> 105 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 106 </ParamSignal> 107 108 <ParamSignal port="hibernate_wakeup[1]" name="Hibernate Wakeup (1)" group="Wakeup Pins" visible="`${hasVisibleOption("hibernate_wakeup[1]")}`" 109 desc="Reserve the hibernate_wakeup[1] pin to use it as the wakeup source from Hibernate power mode." canBeEmpty="true" > 110 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 111 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 112 <Fixed value="CY_GPIO_DM_PULLUP" /> 113 </Parameter> 114 </Constraint> 115 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 116 </ParamSignal> 117 118 <ParamSignal port="hibernate_wakeup[2]" name="Hibernate Wakeup (2)" group="Wakeup Pins" visible="`${hasVisibleOption("hibernate_wakeup[2]")}`" 119 desc="Reserve the hibernate_wakeup[2] pin to use it as the wakeup source from Hibernate power mode." canBeEmpty="true" > 120 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 121 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 122 <Fixed value="CY_GPIO_DM_PULLUP" /> 123 </Parameter> 124 </Constraint> 125 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 126 </ParamSignal> 127 128 <ParamSignal port="hibernate_wakeup[3]" name="Hibernate Wakeup (3)" group="Wakeup Pins" visible="`${hasVisibleOption("hibernate_wakeup[3]")}`" 129 desc="Reserve the hibernate_wakeup[3] pin to use it as the wakeup source from Hibernate power mode." canBeEmpty="true" > 130 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 131 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 132 <Fixed value="CY_GPIO_DM_PULLUP" /> 133 </Parameter> 134 </Constraint> 135 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 136 </ParamSignal> 137 138 <ParamSignal port="pmic_wakeup_in[0]" name="PMIC Wakeup Input" group="Wakeup Pins" visible="`${pmicEnable}`" 139 desc="Reserve the pmic_wakeup_in pin" canBeEmpty="true" > 140 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="`${pmicEnable}`" > 141 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 142 <Fixed value="CY_GPIO_DM_PULLUP" /> 143 </Parameter> 144 </Constraint> 145 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 146 </ParamSignal> 147 148 <ParamSignal port="pmic_wakeup_out[0]" name="PMIC Wakeup Output" group="Wakeup Pins" visible="`${pmicEnable}`" 149 desc="Reserve the pmic_wakeup_out pin" canBeEmpty="`${!pmicEnable}`" > 150 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="`${pmicEnable}`" > 151 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 152 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 153 </Parameter> 154 </Constraint> 155 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 156 </ParamSignal> 157 158 <ParamBool id="usingLdo" name="usingLdo" group="Internal" default="`${(coreRegulator eq CY_SYSPM_LDO_MODE_MIN) || (coreRegulator eq CY_SYSPM_LDO_MODE_NORMAL)}`" visible="false" editable="false" desc="" /> 159 <ParamBool id="usingUlp" name="usingUlp" group="Internal" default="`${actPwrMode eq ULP}`" visible="false" editable="false" desc="" /> 160 <ParamBool id="deepsleepWhenIdle" name="deepsleepWhenIdle" group="Internal" default="`${idlePwrMode eq CY_CFG_PWR_MODE_DEEPSLEEP}`" visible="false" editable="false" desc="" /> 161 162 </Parameters> 163 164 <!-- Error checking --> 165 <DRCs> 166 <DRC type="ERROR" text="The input voltage of VDDD is set to `${vdddMv}` which is out of range. The value must be between 1700 and VDDA (`${vddaMv}`)." condition="`${(vdddMv > vddaMv) && !isBlockUsed("csd[0].csd[0]")}`" /> 167 <DRC type="ERROR" text="The input voltage of VBACKUP is set to `${vBackupMv}` which is out of range. The value must be between 1700 and VDDA (`${vddaMv}`)." condition="`${(vBackupMv > vddaMv) && !isBlockUsed("csd[0].csd[0]")}`" /> 168 <DRC type="ERROR" text="The input voltage of VDD_NS is set to `${vddNsMv}` which is out of range. The value must be between 1700 and VDDA (`${vddaMv}`)." condition="`${(vddNsMv > vddaMv) && !isBlockUsed("csd[0].csd[0]")}`" /> 169 <DRC type="ERROR" text="The input voltage of VDDIO0 is set to `${vddio0Mv}` which is out of range. The value must be between 1700 and VDDA (`${vddaMv}`)." condition="`${(vddio0Mv > vddaMv) && !isBlockUsed("csd[0].csd[0]")}`" /> 170 <DRC type="ERROR" text="The input voltage of VDDIO1 is set to `${vddio1Mv}` which is out of range. The value must be between 1700 and VDDA (`${vddaMv}`)." condition="`${(vddio1Mv > vddaMv) && !isBlockUsed("csd[0].csd[0]")}`" /> 171 </DRCs> 172 173 <!-- Generated firmware --> 174 <ConfigFirmware> 175 <ConfigInclude value="cy_syspm.h" include="true" /> 176 <ConfigDefine name="CY_CFG_PWR_MODE_LP" public="true" value="0x01UL" include="true" /> 177 <ConfigDefine name="CY_CFG_PWR_MODE_ULP" public="true" value="0x02UL" include="true" /> 178 <ConfigDefine name="CY_CFG_PWR_MODE_ACTIVE" public="true" value="0x04UL" include="true" /> 179 <ConfigDefine name="CY_CFG_PWR_MODE_SLEEP" public="true" value="0x08UL" include="true" /> 180 <ConfigDefine name="CY_CFG_PWR_MODE_DEEPSLEEP" public="true" value="0x10UL" include="true" /> 181 <ConfigDefine name="CY_CFG_PWR_SYS_IDLE_MODE" public="true" value="`${idlePwrMode}`" include="true" /> 182 <ConfigDefine name="CY_CFG_PWR_SYS_ACTIVE_MODE" public="true" value="CY_CFG_PWR_MODE_`${actPwrMode}`" include="true" /> 183 <ConfigDefine name="CY_CFG_PWR_DEEPSLEEP_LATENCY" public="true" value="`${deepsleepLatency}`UL" include="true" /> 184 <ConfigDefine name="CY_CFG_PWR_USING_LDO" public="true" value="`${usingLdo ? 1 : 0}`" include="true" /> 185 <ConfigDefine name="CY_CFG_PWR_ENABLED" public="false" value="1" include="true" /> 186 <ConfigDefine name="CY_CFG_PWR_INIT" public="false" value="1" include="true" /> 187 <ConfigDefine name="CY_CFG_PWR_USING_PMIC" public="false" value="`${pmicEnable ? 1 : 0}`" include="true" /> 188 <ConfigDefine name="CY_CFG_PWR_VBACKUP_USING_VDDD" public="false" value="`${(backupSrc eq VDDD) ? 1 : 0}`" include="true" /> 189 <ConfigDefine name="CY_CFG_PWR_LDO_VOLTAGE" public="false" value="CY_SYSPM_LDO_VOLTAGE_`${actPwrMode}`" include="`${usingLdo}`" /> 190 <ConfigDefine name="CY_CFG_PWR_BUCK_VOLTAGE" public="false" value="CY_SYSPM_BUCK_OUT1_VOLTAGE_`${actPwrMode}`" include="`${!usingLdo}`" /> 191 <ConfigDefine name="CY_CFG_PWR_USING_ULP" public="false" value="`${usingUlp ? 1 : 0}`" include="true" /> 192 <ConfigDefine name="CY_CFG_PWR_REGULATOR_MODE_MIN" public="false" value="`${((coreRegulator eq CY_SYSPM_LDO_MODE_MIN) || (coreRegulator eq CY_SYSPM_BUCK_MODE_MIN)) ? true : false}`" include="true" /> 193 <ConfigDefine name="CY_CFG_PWR_BKP_ERROR" public="false" value="6" include="true" /> 194 195 <!-- Operating conditions --> 196 <ConfigDefine name="CY_CFG_PWR_VDDA_MV" public="true" value="`${vddaMv}`" include="true" /> 197 <ConfigDefine name="CY_CFG_PWR_VDDD_MV" public="true" value="`${vdddMv}`" include="true" /> 198 <ConfigDefine name="CY_CFG_PWR_VBACKUP_MV" public="true" value="`${vBackupMv}`" include="true" /> 199 <ConfigDefine name="CY_CFG_PWR_VDD_NS_MV" public="true" value="`${vddNsMv}`" include="true" /> 200 <ConfigDefine name="CY_CFG_PWR_VDDIO0_MV" public="true" value="`${vddio0Mv}`" include="true" /> 201 <ConfigDefine name="CY_CFG_PWR_VDDIO1_MV" public="true" value="`${vddio1Mv}`" include="true" /> 202 203 <ConfigFunction signature="__STATIC_INLINE void init_cycfg_power(void)" body=" 204 /* Reset the Backup domain on POR, XRES, BOD only if Backup domain is supplied by VDDD */
 205 #if (CY_CFG_PWR_VBACKUP_USING_VDDD)
 206 #ifdef CY_CFG_SYSCLK_ILO_ENABLED
 207 if (0u == Cy_SysLib_GetResetReason() /* POR, XRES, or BOD */)
 208 {
 209 #if CY_CFG_SYSCLK_WCO_ENABLED
 210 uint32_t wcoTrim = Cy_SysLib_GetWcoTrim();
 211 if (CY_SYSLIB_SUCCESS != Cy_SysLib_ResetBackupDomain())
 212 {
 213 Cy_SysLib_DelayUs(1U);
 214 if (CY_SYSLIB_SUCCESS != Cy_SysLib_GetResetStatus())
 215 {
 216 cycfg_ClockStartupError(CY_CFG_PWR_BKP_ERROR);
 217 }
 218 }
 219 Cy_SysLib_SetWcoTrim(wcoTrim);
 220 #else /* CY_CFG_SYSCLK_WCO_ENABLED */
 221 (void) Cy_SysLib_ResetBackupDomain();
 222 #endif /* CY_CFG_SYSCLK_WCO_ENABLED */
 223 Cy_SysClk_IloDisable();
 224 Cy_SysClk_IloInit();
 225 }
 226 #endif /* CY_CFG_SYSCLK_ILO_ENABLED */
 227 #endif /* CY_CFG_PWR_VBACKUP_USING_VDDD */

 228 /* Configure core regulator */
 229 #if !(defined(CY_DEVICE_SECURE))
 230 #if defined (CY_IP_M4CPUSS)
 231 #if CY_CFG_PWR_USING_LDO
 232 Cy_SysPm_LdoSetVoltage(CY_SYSPM_LDO_VOLTAGE_`${actPwrMode}`);
 233 #else
 234 Cy_SysPm_BuckEnable(CY_SYSPM_BUCK_OUT1_VOLTAGE_`${actPwrMode}`);
 235 #endif /* CY_CFG_PWR_USING_LDO */
 236 #endif /* defined (CY_IP_M4CPUSS) */
 237 #if CY_CFG_PWR_REGULATOR_MODE_MIN
 238 Cy_SysPm_SystemSetMinRegulatorCurrent();
 239 #else
 240 Cy_SysPm_SystemSetNormalRegulatorCurrent();
 241 #endif /* CY_CFG_PWR_REGULATOR_MODE_MIN */
 242 #endif /* !(defined(CY_DEVICE_SECURE)) */
 243 /* Configure PMIC */
 244 Cy_SysPm_UnlockPmic();
 245 #if CY_CFG_PWR_USING_PMIC
 246 Cy_SysPm_PmicEnableOutput();
 247 #else
 248 Cy_SysPm_PmicDisableOutput();
 249 #endif /* CY_CFG_PWR_USING_PMIC */" 250 public="false" include="true" guard="(!defined(CY_DEVICE_SECURE))" /> 251 </ConfigFirmware> 252</Personality> 253