1<?xml version="1.0" encoding="utf-8"?> 2 3 4<!--**************************************************************************** 5* \file lpeco_prescaler.cypersonality 6* \version 1.0 7* 8* \brief 9* LPECO prescaler personality description file. It supports TVIIC devices. 10* 11******************************************************************************** 12* \copyright 13* Copyright (c) 2024, Cypress Semiconductor Corporation (an Infineon company) or 14* an affiliate of Cypress Semiconductor Corporation. 15* SPDX-License-Identifier: Apache-2.0 16* 17* Licensed under the Apache License, Version 2.0 (the "License"); 18* you may not use this file except in compliance with the License. 19* You may obtain a copy of the License at 20* 21* http://www.apache.org/licenses/LICENSE-2.0 22* 23* Unless required by applicable law or agreed to in writing, software 24* distributed under the License is distributed on an "AS IS" BASIS, 25* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 26* See the License for the specific language governing permissions and 27* limitations under the License. 28*****************************************************************************--> 29 30<Personality id="lpeco_prescaler" name="LPECO Prescaler" version="1.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7"> 31 <Dependencies> 32 <IpBlock name="mxs40srss_ver3" /> 33 <Resource name="srss\.clock\.lpecoprescaler" /> 34 </Dependencies> 35 <ExposedMembers> 36 <ExposedMember key="frequency" paramId="frequency" /> 37 <ExposedMember key="accuracy" paramId="accuracy" /> 38 <ExposedMember key="sourceClockDisplayName" paramId="sourceClockDisplayName" /> 39 </ExposedMembers> 40 <Parameters> 41 <ParamDoc id="pdlDoc" name="Configuration Help" group="Overview" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__sysclk__lpeco.html" linkText="Open LPECO Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" /> 42 43 <!-- Source clock --> 44 <ParamString id="sourceClockRsc" name="Source Clock" group="Internal" default="`${"srss[0].clock[0].lpeco[0]"}`" visible="false" editable="false" desc="" /> 45 <!-- Set an error if the source clock is not enabled --> 46 <ParamBool id="srcNotUsed" name="Clock Source Enabled" group="Internal" default="`${!isBlockUsed(sourceClockRsc)}`" visible="false" editable="false" desc="" /> 47 <ParamBool id="error" name="Clock Error" group="Internal" default="`${srcNotUsed}`" visible="false" editable="false" desc="" /> 48 <ParamRange id="sourceFreq" name="sourceFrequency" group="Internal" default="`${!error ? getExposedMember(sourceClockRsc, "frequency") : 0}`" min="3990000" max="8010000" resolution="1" visible="false" editable="false" desc="" /> 49 <ParamString id="accuracy" name="Accuracy" group="Internal" default="`${!error ? getExposedMember(sourceClockRsc, "accuracy") : 0}`" visible="false" editable="false" desc="" /> 50 <ParamString id="sourceClock" name="Source Clock" group="General" default="LPECO" visible="true" editable="false" desc="Source clock " /> 51 <ParamString id="sourceClockDisplayName" name="Source Clock Display Name" group="Internal" default="`${getParamValueDisplay("sourceClock")}`" visible="false" editable="false" desc="" /> 52 <ParamString id="sourceFrequencyInfo" name="Source Frequency" group="General" default="`${formatFrequency(sourceFreq,accuracy)}`" visible="true" editable="false" desc="Source clock frequency" /> 53 54 <!-- Resulted clock --> 55 <ParamRange id="divider" name="Integer Divider" group="General" default="1" min="1" max="1024" resolution="1" visible="true" editable="true" desc="" /> 56 <ParamRange id="fractdivider" name="Fractional Divider" group="General" default="0" min="0" max="255" resolution="1" visible="true" editable="true" desc="" /> 57 <ParamRange id="frequency" name="Frequency" group="Internal" default="`${(sourceFreq / (divider + (fractdivider / 256.0)))}`" min="0" max="8010000" resolution="0.1" visible="false" editable="false" desc="" /> 58 59 <!-- If the frequency is less than one MHz, display its value in kHz --> 60 <ParamString id="frequencyInfo" name="Frequency" group="General" default="`${formatFrequency(frequency,accuracy)}`" visible="true" editable="false" desc="The resulting output clock frequency" /> 61 </Parameters> 62 <DRCs> 63 <DRC type="ERROR" text="Source clock for LPECO_PRESCALER is not enabled" condition="`${srcNotUsed}`" > 64 <FixIt action="ENABLE_BLOCK" target="`${sourceClockRsc}`" value="" valid="true" /> 65 </DRC> 66 </DRCs> 67 <ConfigFirmware> 68 <ConfigInclude value="cy_sysclk.h" include="true" /> 69 <ConfigDefine name="CY_CFG_SYSCLK_LPECO_PRESCALER_ENABLED" value="1" public="false" include="true" /> 70 <ConfigDefine name="CY_CFG_SYSCLK_LPECO_PRESCALER_INT_DIVIDER" value="`${divider - 1}`" public="false" include="true" /> 71 <ConfigDefine name="CY_CFG_SYSCLK_LPECO_PRESCALER_FRACT_DIVIDER" value="`${fractdivider}`" public="false" include="true" /> 72 <ConfigFunction signature="__STATIC_INLINE void Cy_SysClk_LpecoPrescalerInit()" body=" Cy_SysClk_LpecoPrescaleConfigure((0 != CY_CFG_SYSCLK_LPECO_PRESCALER_ENABLED), CY_CFG_SYSCLK_LPECO_PRESCALER_INT_DIVIDER, CY_CFG_SYSCLK_LPECO_PRESCALER_FRACT_DIVIDER);" public="false" include="true" guard="(!defined(CY_DEVICE_SECURE))" /> 73 </ConfigFirmware> 74</Personality> 75