Newer
Older
mbed-os / targets / TARGET_Cypress / TARGET_PSOC6 / mtb-pdl-cat1 / personalities / peripheral / timer-1.0.cypersonality
@Dustin Crossman Dustin Crossman on 4 Jun 2021 5 KB Fix file modes.
<?xml version="1.0" encoding="utf-8"?>

<!--****************************************************************************
* \file Timer.cypersonality
* \version 1.0
*
* \brief
* Timer personality description file.
*
********************************************************************************
* \copyright
* Copyright 2020 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="mxs40timer" name="Timer" version="1.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v3">
  <Dependencies>
    <IpBlock name="mxs40pass_ver2" />
    <Resource name="pass\.timer"/>
    <!--DependentResource name="pass.sar" /-->
  </Dependencies>
  <ExposedMembers>
    <ExposedMember key="frequency" paramId="frequency" />
    <ExposedMember key="accuracy"  paramId="accuracy" />
    <ExposedMember key="error"     paramId="error" />
  </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__sysanalog.html" linkText="Open SysAnalog Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" />

    <ParamChoice id="clock" name="Clock Source" group="General" default="CY_SYSANALOG_TIMER_CLK_PERI" visible="true" editable="true" desc="Select the input clock source" >
      <Entry name="Peripheral Clock" value="CY_SYSANALOG_TIMER_CLK_PERI" visible="true" />
      <Entry name="Deep Sleep Clock" value="CY_SYSANALOG_TIMER_CLK_DEEPSLEEP" visible="true" />
      <Entry name="CLK_LF"           value="CY_SYSANALOG_TIMER_CLK_LF" visible="true" />
    </ParamChoice>

    <ParamBool id="debug" name="debug" group="Internal" default="false" visible="false" editable="false" desc="" />
    <ParamString id="sourceClockRsc" name="sourceClockRsc" group="Internal" default="`${clock eq CY_SYSANALOG_TIMER_CLK_DEEPSLEEP ? &quot;pass[0].dpslp[0]&quot; : clock eq CY_SYSANALOG_TIMER_CLK_LF ? &quot;srss[0].clock[0].lfclk[0]&quot; : &quot;srss[0].clock[0].periclk[0]&quot;}`" visible="`${debug}`" editable="false" desc="" />
    <ParamBool id="srcNotUsed" name="srcNotUsed" group="Internal" default="`${!isBlockUsed(sourceClockRsc)}`" visible="`${debug}`" editable="false" desc="" />
    <ParamBool id="error" name="error" group="Internal" default="`${srcNotUsed || getExposedMember(sourceClockRsc, &quot;error&quot;)}`" visible="`${debug}`" editable="false" desc="" />
    <ParamRange id="sourceFreq" name="sourceFreq" group="Internal" default="`${!error ? getExposedMember(sourceClockRsc, &quot;frequency&quot;) : 0}`" min="0" max="1000000000" resolution="0.001" visible="`${debug}`" editable="false" desc="" />
    <ParamString id="accuracy" name="accuracy" group="Internal" default="`${!error ? getExposedMember(sourceClockRsc, &quot;accuracy&quot;) : 0}`" visible="`${debug}`" editable="false" desc="" />
    <ParamString id="sourceFrequencyInfo" name="Source Frequency" group="General" default="`${formatFrequency(sourceFreq,accuracy)}`" visible="true" editable="false" desc="Source clock frequency" />
    <ParamRange id="period" name="Period" group="General" default="4000" min="1" max="65536" resolution="1" visible="true" editable="true" desc="The Timer period"/>
    <ParamRange id="frequency" name="frequency" group="Internal" default="`${sourceFreq / period}`" min="0" max="400000000" resolution="0.001" visible="`${debug}`" editable="false" desc="" />
    <ParamString id="frequencyInfo" name="Frequency" group="General" default="`${formatFrequency(frequency,accuracy)}`" visible="true" editable="false" desc="The resulting TIMER output trigger frequency" />
  </Parameters>

  <DRCs>
    <DRC type="ERROR" text="Source clock for Timer is not enabled" condition="`${error}`" >
      <FixIt action="ENABLE_BLOCK" target="`${sourceClockRsc}`" value="" valid="true" />
    </DRC>
    <DRC type="ERROR" text="Timer clock source using duty cycling. Please select different clock source for Deep Sleep clock or disable duty cycling for LPOSC." condition="`${(clock eq &quot;CY_SYSANALOG_TIMER_CLK_DEEPSLEEP&quot;) ? (((isBlockUsed(&quot;pass[0].dpslp[0]&quot;)) ? (getExposedMember(&quot;pass[0].dpslp[0]&quot;, &quot;clock&quot;) eq &quot;CY_SYSANALOG_DEEPSLEEP_SRC_LPOSC&quot;) : false) ? ((isBlockUsed(&quot;pass[0].lposc[0]&quot;)) ? (getExposedMember(&quot;pass[0].lposc[0]&quot;, &quot;dsMode&quot;) eq &quot;CY_SYSANALOG_LPOSC_DUTY_CYCLED&quot;) : false) : (false)) : (false)}`" >
    </DRC>
  </DRCs>

  <ConfigFirmware>
    <ConfigInclude value="cy_sysanalog.h" include="true" />
    <ConfigDefine name="CY_CFG_SYSANALOG_TIMER_CLOCK" value="`${clock}`" public="true" include="true" />
    <ConfigDefine name="CY_CFG_SYSANALOG_TIMER_PERIOD" value="`${period}`" public="true" include="true" />
  </ConfigFirmware>
</Personality>