1<?xml version="1.0" encoding="utf-8"?>
2
3
4<!--****************************************************************************
5* \file aref.cypersonality
6* \version 1.0
7*
8* \brief
9* AREF personality description file.
10*
11********************************************************************************
12* \copyright
13* Copyright 2018-2022 Cypress Semiconductor Corporation
14* SPDX-License-Identifier: Apache-2.0
15*
16* Licensed under the Apache License, Version 2.0 (the "License");
17* you may not use this file except in compliance with the License.
18* You may obtain a copy of the License at
19*
20*     http://www.apache.org/licenses/LICENSE-2.0
21*
22* Unless required by applicable law or agreed to in writing, software
23* distributed under the License is distributed on an "AS IS" BASIS,
24* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25* See the License for the specific language governing permissions and
26* limitations under the License.
27*****************************************************************************-->
28
29<Personality id="mxs40aref" name="Aref" version="1.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7">
30  <Dependencies>
31    <IpBlock name="mxs40pass,mxs40pass_ver2" />
32    <Resource name="pass\.aref" />
33  </Dependencies>
34  <ExposedMembers>
35    <ExposedMember key="vref_source" paramId="vref_source" />
36    <ExposedMember key="iztat_source" paramId="iztat_source" />
37    <ExposedMember key="deep_sleep_mode" paramId="deep_sleep_mode" />
38    <ExposedMember key="vref_voltage" paramId="vref_voltage" />
39  </ExposedMembers>
40  <Parameters>
41    <!-- PDL documentation -->
42    <ParamDoc id="pdlDoc" name="Configuration Help" group="Overview" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__sysanalog.html" linkText="Open SysAnalog Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" />
43
44    <!--Internal-->
45    <ParamBool id="hasCTB" name="hasCTB" group="Internal" default="`${hasBlock(&quot;pass[0].ctb[0].oa[0]&quot;)}`" visible="false" editable="false" desc="Check whether device has CTBs" />
46    <ParamBool id="isPowerEnabled" name="Is Power Enabled" group="Internal" default="`${isBlockUsed(&quot;srss[0].power[0]&quot;)}`" visible="false" editable="false" desc="" />
47    <ParamRange id="vdda" name="vdda" group="Internal" default="`${isPowerEnabled ? getExposedMember(&quot;srss[0].power[0]&quot;, &quot;vddaMv&quot;) / 1000.0 : 3.6}`" min="0" max="10" resolution="0.001" visible="false" editable="false" desc="" />
48    <ParamString id="version" name="version number" group="Internal" default="`${getVersion()}`" visible="false" editable="false" desc="" />
49    <ParamBool id="ver1" name="ver1" desc="" group="Internal" default="`${version eq 1}`" visible="false" editable="false" />
50    <!--Internal-->
51
52    <ParamChoice id="vref_source" name="Voltage Reference Source" group="General" default="CY_SYSANALOG_VREF_SOURCE_LOCAL_1_2V" visible="true" editable="true" desc="Select the source of the Vref generator. The local generator is recommended for analog performance." >
53      <Entry name="SRSS (0.8 V)" value="CY_SYSANALOG_VREF_SOURCE_SRSS" visible="true" />
54      <Entry name="Local (1.2 V)" value="CY_SYSANALOG_VREF_SOURCE_LOCAL_1_2V" visible="true" />
55      <Entry name="External" value="CY_SYSANALOG_VREF_SOURCE_EXTERNAL" visible="true" />
56    </ParamChoice>
57    <ParamRange id="external_vref_voltage" name="External Voltage Reference Voltage (V)" group="Analog Reference Block" default="1.2" min="0.001" max="`${vdda}`" resolution="0.001" visible="`${vref_source eq CY_SYSANALOG_VREF_SOURCE_EXTERNAL}`" editable="true" desc="Enter the value of external Vref voltage in volts" />
58
59    <ParamChoice id="iztat_source" name="Current Reference Source" group="General" default="CY_SYSANALOG_IZTAT_SOURCE_LOCAL" visible="true" editable="true" desc="Select the source of the IZTAT generator. The local generator is recommended for analog performance." >
60      <Entry name="SRSS" value="CY_SYSANALOG_IZTAT_SOURCE_SRSS" visible="true" />
61      <Entry name="Local" value="CY_SYSANALOG_IZTAT_SOURCE_LOCAL" visible="true" />
62    </ParamChoice>
63
64    <ParamChoice id="deep_sleep_mode" name="Deep Sleep Mode" group="General" default="CY_SYSANALOG_DEEPSLEEP_DISABLE" visible="true" editable="true" desc="Configure which parts of the block, if any, are enabled during Deep Sleep mode." >
65      <Entry name="Disable" value="CY_SYSANALOG_DEEPSLEEP_DISABLE" visible="true" />
66      <Entry name="Enable Fast Wakeup" value="CY_SYSANALOG_DEEPSLEEP_IPTAT_1" visible="true" />
67      <Entry name="Enable Opamp Reference Current" value="CY_SYSANALOG_DEEPSLEEP_IPTAT_2" visible="`${hasCTB}`" />
68      <Entry name="Enable All Voltage and Current Generators" value="CY_SYSANALOG_DEEPSLEEP_IPTAT_IZTAT_VREF" visible="true" />
69    </ParamChoice>
70
71    <ParamSignal name="Voltage Reference" port="vbgr[0]" group="Connections" visible="`${hasVisibleOption(&quot;vbgr[0]&quot;)}`" desc="Voltage reference output connection" canBeEmpty="true" />
72
73    <ParamString id="vref_voltage" name="vref_voltage" group="Internal" default="`${(vref_source eq CY_SYSANALOG_VREF_SOURCE_LOCAL_1_2V) ? 1.2 : (vref_source eq CY_SYSANALOG_VREF_SOURCE_SRSS ? 0.8 : external_vref_voltage)}`" visible="false" editable="false" desc="Voltage value of Vref to be exposed to other personalities." />
74
75    <!--Advanced-->
76    <ParamBool id="inFlash" name="Store Config in Flash" group="Advanced" default="true" visible="true" editable="true" desc="Controls whether the configuration structure is stored in flash (const, true) or SRAM (not const, false)." />
77
78  </Parameters>
79
80  <DRCs>
81      <DRC type="ERROR" text="The SRSS is not available in Deep Sleep mode. Disable Deep Sleep or select Local or External for the Voltage Reference Source." condition="`${vref_source eq CY_SYSANALOG_VREF_SOURCE_SRSS &amp;&amp; deep_sleep_mode ne CY_SYSANALOG_DEEPSLEEP_DISABLE}`" />
82      <DRC type="ERROR" text="The SRSS is not available in Deep Sleep mode. Disable Deep Sleep or Select Local for the Current Reference Source." condition="`${iztat_source eq CY_SYSANALOG_IZTAT_SOURCE_SRSS &amp;&amp; deep_sleep_mode ne CY_SYSANALOG_DEEPSLEEP_DISABLE}`" />
83  </DRCs>
84
85  <ConfigFirmware>
86      <ConfigInclude value="cy_sysanalog.h" include="true" />
87
88      <ConfigStruct name="`${INST_NAME . &quot;_config&quot;}`" type="cy_stc_sysanalog_config_t" const="`${inFlash}`" public="true" include="true" >
89          <Member name="startup" value="CY_SYSANALOG_STARTUP_FAST" />
90          <Member name="iztat" value="`${iztat_source}`" />
91          <Member name="vref" value="`${vref_source}`" />
92          <Member name="deepSleep" value="`${deep_sleep_mode}`" />
93      </ConfigStruct>
94  </ConfigFirmware>
95
96</Personality>
97