mbed-os/targets/TARGET_Cypress/TARGET_PSOC6/psoc6pdl/personalities/peripheral/sysanalog-1.0.cypersonality

99 lines
8.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--****************************************************************************
* \file sysanalog.cypersonality
* \version 1.0
*
* \brief
* SysAnalog personality description file.
*
********************************************************************************
* \copyright
* Copyright 2018-2019 Cypress Semiconductor Corporation
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************-->
<Personality id="mxs40sysanalog" name="Programmable Analog" version="1.0" path="Analog" xmlns="http://cypress.com/xsd/cyhwpersonality_v1">
<Dependencies>
<IpBlock name="mxs40pass" />
<Resource name="pass" used="true" />
<DependentResource name="pass.ctb.oa" />
</Dependencies>
<ExposedMembers>
<ExposedMember key="iptat_level" paramId="iptat_level" />
<ExposedMember key="ctb0_deep_sleep" paramId="ctb0_deep_sleep" />
<ExposedMember key="ctb1_deep_sleep" paramId="ctb1_deep_sleep" />
<ExposedMember key="ctb2_deep_sleep" paramId="ctb2_deep_sleep" />
<ExposedMember key="ctb3_deep_sleep" paramId="ctb3_deep_sleep" />
<ExposedMember key="pump_clk_freq_hz" paramId="pump_clk_freq_hz" />
</ExposedMembers>
<Parameters>
<!-- PDL documentation -->
<ParamDoc id="pdlDoc" name="Configuration Help" group="Peripheral Documentation" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__ctb.html" linkText="Open CTB Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" />
<!--Internal-->
<ParamBool id="isClkPumpEnabled" name="Is Pump Clock Enabled" group="Internal" default="`${isBlockUsed(&quot;srss[0].clock[0].pumpclk[0]&quot;)}`" visible="false" editable="false" desc="Pump clock enabling state" />
<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" />
<ParamBool id="isArefEnabled" name="Is Aref Enabled" group="Internal" default="`${isBlockUsed(&quot;pass[0].aref[0]&quot;)}`" visible="false" editable="false" desc="" />
<!--Internal-->
<ParamChoice id="iptat_level" name="Opamp Reference Current" group="Global Opamp Settings" default="CY_CTB_IPTAT_NORMAL" visible="`${hasCTB}`" editable="true" desc="Select the level for the opamp current output." >
<Entry name="1 uA" value="CY_CTB_IPTAT_NORMAL" visible="true" />
<Entry name="100 nA" value="CY_CTB_IPTAT_LOW" visible="true" />
</ParamChoice>
<ParamChoice id="pump_clock_source" name="Opamp Pump Clock Source" group="Global Opamp Settings" default="CY_CTB_CLK_PUMP_SRSS" visible="`${hasCTB}`" editable="true" desc="Select the clock source for the opamp pump clock." >
<Entry name="SRSS" value="CY_CTB_CLK_PUMP_SRSS" visible="true" />
<Entry name="Peri Clock Divider" value="CY_CTB_CLK_PUMP_PERI" visible="true" />
</ParamChoice>
<ParamSignal name="Peri Clock" port="clock_pump_peri[0]" group="Global Opamp Settings" visible="`${pump_clock_source eq CY_CTB_CLK_PUMP_PERI}`" desc="Peri divider clock for the pump clock." canBeEmpty="`${pump_clock_source eq CY_CTB_CLK_PUMP_SRSS}`" />
<ParamString id="peri_source_clock" name="Pump Clock Peri Source Resource" group="Global Opamp Settings" default="`${getBlockFromSignal(&quot;clock_pump_peri[0]&quot;)}`" visible="false" editable="false" desc="Pump Clock Peri Source Resource" />
<ParamRange id="pump_clk_freq_hz" name="Frequency" group="Internal" default="`${(pump_clock_source eq CY_CTB_CLK_PUMP_SRSS) ? (isClkPumpEnabled ? getExposedMember(&quot;srss[0].clock[0].pumpclk[0]&quot;, &quot;frequency&quot;) : 0) : ((peri_source_clock ne &quot;&quot;) ? getExposedMember(peri_source_clock, &quot;frequency&quot;) : 0)}`" min="0" max="1000000000" resolution="1" visible="false" editable="false" desc=""/>
<ParamString id="pump_clk_freq" name="Opamp Pump Clock Frequency" group="Global Opamp Settings" default="`${pump_clk_freq_hz &lt; 1000000 ? pump_clk_freq_hz / 1000.0 . &quot; kHz&quot; : pump_clk_freq_hz / 1000000.0 . &quot; MHz&quot;}`" visible="`${hasCTB}`" editable="false" desc="Frequency of the Analog Pump Clock" />
<ParamBool id="ctb0_deep_sleep" name="Deep Sleep Enable" group="CTB0" default="false" visible="`${hasCTB &amp;&amp; (NR_CTBS &gt; 0)}`" editable="true" desc="Maintain the opamp output during Deep Sleep for CTB0. Enabling Deep Sleep will reduce the output range of the opamp." />
<ParamBool id="ctb1_deep_sleep" name="Deep Sleep Enable" group="CTB1" default="false" visible="`${hasCTB &amp;&amp; (NR_CTBS &gt; 1)}`" editable="true" desc="Maintain the opamp output during Deep Sleep for CTB1. Enabling Deep Sleep will reduce the output range of the opamp." />
<ParamBool id="ctb2_deep_sleep" name="Deep Sleep Enable" group="CTB2" default="false" visible="`${hasCTB &amp;&amp; (NR_CTBS &gt; 2)}`" editable="true" desc="Maintain the opamp output during Deep Sleep for CTB2. Enabling Deep Sleep will reduce the output range of the opamp." />
<ParamBool id="ctb3_deep_sleep" name="Deep Sleep Enable" group="CTB3" default="false" visible="`${hasCTB &amp;&amp; (NR_CTBS &gt; 3)}`" editable="true" desc="Maintain the opamp output during Deep Sleep for CTB3. Enabling Deep Sleep will reduce the output range of the opamp." />
<!-- Peripheral clock divider connection -->
<ParamString id="pclk" name="PCLK" group="Internal" default="`${getBlockFromSignal(&quot;clock_pump_peri[0]&quot;)}`" visible="false" editable="false" desc="Connected peripheral clock divider (PCLK)." />
<ParamBool id="pclkOk" name="PCLK Valid" group="Internal" default="`${hasConnection(&quot;clock_pump_peri&quot;, 0) &amp;&amp; isBlockUsed(pclk)}`" visible="false" editable="false" desc="Checks whether there is a PCLK connected and enabled." />
<ParamString id="pclkDst" name="PCLK Destination" group="Internal" default="PCLK_PASS_CLOCK_PUMP_PERI" visible="false" editable="false" desc="Generates PCLK connection define." />
</Parameters>
<DRCs>
<DRC type="ERROR" text="Pump clock (CLK_PUMP) resource must be enabled when the Opamp Pump Clock Source is set to SRSS." condition="`${hasCTB &amp;&amp; !isClkPumpEnabled &amp;&amp; pump_clock_source eq CY_CTB_CLK_PUMP_SRSS}`" location="srss[0].clock[0].pumpclk[0]">
<FixIt action="ENABLE_BLOCK" target="srss[0].clock[0].pumpclk[0]" value="mxs40pumpclk-1.0" valid="true" />
</DRC>
</DRCs>
<ConfigFirmware>
<ConfigInclude value="cy_ctb.h" include="`${iptat_level eq CY_CTB_IPTAT_LOW}`" />
<ConfigInclude value="cy_sysclk.h" include="`${pclkOk}`" />
<ConfigInstruction value="Cy_CTB_SetIptatLevel(`${iptat_level}`);" include="`${iptat_level eq CY_CTB_IPTAT_LOW}`" />
<ConfigInstruction value="Cy_SysClk_PeriphAssignDivider(`${pclkDst}`, `${getExposedMember(pclk, &quot;clockSel&quot;)}`);" include="`${pump_clock_source eq CY_CTB_CLK_PUMP_PERI &amp;&amp; pclkOk}`" />
<ConfigInstruction value="Cy_CTB_SetDeepSleepMode(CTBM0, `${ctb0_deep_sleep ? &quot;CY_CTB_DEEPSLEEP_ENABLE&quot; : &quot;CY_CTB_DEEPSLEEP_DISABLE&quot;}`);" include="`${isBlockUsed(&quot;pass[0].ctb[0].oa[0]&quot;) || isBlockUsed(&quot;pass[0].ctb[0].oa[1]&quot;)}`"/>
<ConfigInstruction value="Cy_CTB_SetDeepSleepMode(CTBM1, `${ctb1_deep_sleep ? &quot;CY_CTB_DEEPSLEEP_ENABLE&quot; : &quot;CY_CTB_DEEPSLEEP_DISABLE&quot;}`);" include="`${isBlockUsed(&quot;pass[0].ctb[1].oa[0]&quot;) || isBlockUsed(&quot;pass[0].ctb[1].oa[1]&quot;)}`"/>
<ConfigInstruction value="Cy_CTB_SetDeepSleepMode(CTBM2, `${ctb2_deep_sleep ? &quot;CY_CTB_DEEPSLEEP_ENABLE&quot; : &quot;CY_CTB_DEEPSLEEP_DISABLE&quot;}`);" include="`${isBlockUsed(&quot;pass[0].ctb[2].oa[0]&quot;) || isBlockUsed(&quot;pass[0].ctb[2].oa[1]&quot;)}`"/>
<ConfigInstruction value="Cy_CTB_SetDeepSleepMode(CTBM3, `${ctb3_deep_sleep ? &quot;CY_CTB_DEEPSLEEP_ENABLE&quot; : &quot;CY_CTB_DEEPSLEEP_DISABLE&quot;}`);" include="`${isBlockUsed(&quot;pass[0].ctb[3].oa[0]&quot;) || isBlockUsed(&quot;pass[0].ctb[3].oa[1]&quot;)}`"/>
</ConfigFirmware>
</Personality>