1<?xml version="1.0" encoding="utf-8"?> 2 3<!--**************************************************************************** 4* \file Timer.cypersonality 5* \version 1.0 6* 7* \brief 8* Timer personality description file. 9* 10******************************************************************************** 11* \copyright 12* Copyright 2020-2022 Cypress Semiconductor Corporation 13* SPDX-License-Identifier: Apache-2.0 14* 15* Licensed under the Apache License, Version 2.0 (the "License"); 16* you may not use this file except in compliance with the License. 17* You may obtain a copy of the License at 18* 19* http://www.apache.org/licenses/LICENSE-2.0 20* 21* Unless required by applicable law or agreed to in writing, software 22* distributed under the License is distributed on an "AS IS" BASIS, 23* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 24* See the License for the specific language governing permissions and 25* limitations under the License. 26*****************************************************************************--> 27 28<Personality id="mxs40timer" name="Timer" version="1.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7"> 29 <Dependencies> 30 <IpBlock name="mxs40pass_ver2" /> 31 <Resource name="pass\.timer"/> 32 <!--DependentResource name="pass.sar" /--> 33 </Dependencies> 34 <ExposedMembers> 35 <ExposedMember key="frequency" paramId="frequency" /> 36 <ExposedMember key="accuracy" paramId="accuracy" /> 37 <ExposedMember key="error" paramId="error" /> 38 </ExposedMembers> 39 <Parameters> 40 <!-- PDL documentation --> 41 <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" /> 42 43 <ParamChoice id="clock" name="Clock Source" group="General" default="CY_SYSANALOG_TIMER_CLK_PERI" visible="true" editable="true" desc="Select the input clock source" > 44 <Entry name="Peripheral Clock" value="CY_SYSANALOG_TIMER_CLK_PERI" visible="true" /> 45 <Entry name="Deep Sleep Clock" value="CY_SYSANALOG_TIMER_CLK_DEEPSLEEP" visible="true" /> 46 <Entry name="CLK_LF" value="CY_SYSANALOG_TIMER_CLK_LF" visible="true" /> 47 </ParamChoice> 48 49 <ParamBool id="debug" name="debug" group="Internal" default="false" visible="false" editable="false" desc="" /> 50 <ParamString id="sourceClockRsc" name="sourceClockRsc" group="Internal" default="`${clock eq CY_SYSANALOG_TIMER_CLK_DEEPSLEEP ? "pass[0].dpslp[0]" : clock eq CY_SYSANALOG_TIMER_CLK_LF ? "srss[0].clock[0].lfclk[0]" : "srss[0].clock[0].periclk[0]"}`" visible="`${debug}`" editable="false" desc="" /> 51 <ParamBool id="srcNotUsed" name="srcNotUsed" group="Internal" default="`${!isBlockUsed(sourceClockRsc)}`" visible="`${debug}`" editable="false" desc="" /> 52 <ParamBool id="error" name="error" group="Internal" default="`${srcNotUsed || getExposedMember(sourceClockRsc, "error")}`" visible="`${debug}`" editable="false" desc="" /> 53 <ParamRange id="sourceFreq" name="sourceFreq" group="Internal" default="`${!error ? getExposedMember(sourceClockRsc, "frequency") : 0}`" min="0" max="1000000000" resolution="0.001" visible="`${debug}`" editable="false" desc="" /> 54 <ParamString id="accuracy" name="accuracy" group="Internal" default="`${!error ? getExposedMember(sourceClockRsc, "accuracy") : 0}`" visible="`${debug}`" editable="false" desc="" /> 55 <ParamString id="sourceFrequencyInfo" name="Source Frequency" group="General" default="`${formatFrequency(sourceFreq,accuracy)}`" visible="true" editable="false" desc="Source clock frequency" /> 56 <ParamRange id="period" name="Period" group="General" default="4000" min="1" max="65536" resolution="1" visible="true" editable="true" desc="The Timer period"/> 57 <ParamRange id="frequency" name="frequency" group="Internal" default="`${sourceFreq / period}`" min="0" max="400000000" resolution="0.001" visible="`${debug}`" editable="false" desc="" /> 58 <ParamString id="frequencyInfo" name="Frequency" group="General" default="`${formatFrequency(frequency,accuracy)}`" visible="true" editable="false" desc="The resulting TIMER output trigger frequency" /> 59 </Parameters> 60 61 <DRCs> 62 <DRC type="ERROR" text="Source clock for Timer is not enabled" condition="`${error}`" > 63 <FixIt action="ENABLE_BLOCK" target="`${sourceClockRsc}`" value="" valid="true" /> 64 </DRC> 65 <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 "CY_SYSANALOG_TIMER_CLK_DEEPSLEEP") ? (((isBlockUsed("pass[0].dpslp[0]")) ? (getExposedMember("pass[0].dpslp[0]", "clock") eq "CY_SYSANALOG_DEEPSLEEP_SRC_LPOSC") : false) ? ((isBlockUsed("pass[0].lposc[0]")) ? (getExposedMember("pass[0].lposc[0]", "dsMode") eq "CY_SYSANALOG_LPOSC_DUTY_CYCLED") : false) : (false)) : (false)}`" > 66 </DRC> 67 </DRCs> 68 69 <ConfigFirmware> 70 <ConfigInclude value="cy_sysanalog.h" include="true" /> 71 <ConfigDefine name="CY_CFG_SYSANALOG_TIMER_CLOCK" value="`${clock}`" public="true" include="true" /> 72 <ConfigDefine name="CY_CFG_SYSANALOG_TIMER_PERIOD" value="`${period}`" public="true" include="true" /> 73 </ConfigFirmware> 74</Personality> 75