1<?xml version="1.0" encoding="utf-8"?> 2 3 4<!--**************************************************************************** 5* \file tickclk.cypersonality 6* \version 3.0 7* 8* \brief 9* CLK_ALT_SYS_TICK personality description file. 10* This supports CAT1A, CAT1B, CAT1C and CAT1D devices. 11* 12******************************************************************************** 13* \copyright 14* Copyright (c) (2020-2022), Cypress Semiconductor Corporation (an Infineon company) or 15* an affiliate of Cypress Semiconductor Corporation. 16* SPDX-License-Identifier: Apache-2.0 17* 18* Licensed under the Apache License, Version 2.0 (the "License"); 19* you may not use this file except in compliance with the License. 20* You may obtain a copy of the License at 21* 22* http://www.apache.org/licenses/LICENSE-2.0 23* 24* Unless required by applicable law or agreed to in writing, software 25* distributed under the License is distributed on an "AS IS" BASIS, 26* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 27* See the License for the specific language governing permissions and 28* limitations under the License. 29*****************************************************************************--> 30 31<Personality id="altsystick" name="CLK_ALT_SYS_TICK" version="3.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7"> 32 <Dependencies> 33 <IpBlock name="mxs40srss,mxs40ssrss,mxs40srss_ver3,m0seccpuss,m33syscpuss,m55appcpuss" /> 34 <Resource name="srss\.clock\.altsystickclk|(m0seccpuss|m33syscpuss|m55appcpuss)\.(systick|systick_s|systick_ns)" /> 35 </Dependencies> 36 <ExposedMembers> 37 <ExposedMember key="frequency" paramId="frequency" /> 38 <ExposedMember key="accuracy" paramId="accuracy" /> 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__arm__system__timer.html" linkText="Open SysTick Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" /> 43 44 <ParamChoice id="sourceClock" name="Source Clock" group="General" default="`${"m0seccpuss" eq getIpBlockName() ? "lfclk" : 45 "m33syscpuss" eq getIpBlockName() ? "lfclk" : 46 "m55appcpuss" eq getIpBlockName() ? "lfclk" : "imo"}`" visible="true" editable="true" desc="The clock source selection"> 47 <Entry name="CLK_LF" value="lfclk" visible="true"/> 48 <Entry name="IMO" value="imo" visible="`${hasBlock("srss[0].clock[0].imo[0]")}`"/> 49 <Entry name="ECO" value="eco" visible="`${"m0seccpuss" ne getIpBlockName() ? hasBlock("srss[0].clock[0].eco[0]") : "false"}`"/> 50 <Entry name="CLK_TIMER" value="timerclk" visible="true"/> 51 <Entry name="`${"m55appcpuss" eq getIpBlockName() ? "CLK_HF1" : "CLK_HF0"}`" value="hfclk" visible="`${"mxs40ssrss" eq getIpBlockName() ? "true" : 52 "m0seccpuss" eq getIpBlockName() ? "true" : 53 "m33syscpuss" eq getIpBlockName() ? "true" : 54 "m55appcpuss" eq getIpBlockName() ? "true" : "false"}`"/> 55 </ParamChoice> 56 <ParamString id="sourceClockRsc" name="Source Clock Resource" group="Internal" default="srss[0].clock[0].`${sourceClock}`[`${("m55appcpuss" eq getIpBlockName()&& (sourceClock eq hfclk)) ? "1" : "0"}`]" visible="false" editable="false" desc="" /> 57 <ParamString id="sourceClockRscName" name="Source Clock" group="Internal" default="`${sourceClock eq lfclk ? "LF" : 58 sourceClock eq imo ? "IMO" : 59 sourceClock eq hfclk ? "CPU" : 60 sourceClock eq eco ? "ECO" : "TIMER"}`" visible="false" editable="false" desc="" /> 61 <!-- Set an error if the source clock is not enabled --> 62 <ParamBool id="error" name="Clock Error" group="Internal" default="`${!isBlockUsed(sourceClockRsc)}`" visible="false" editable="false" desc="" /> 63 <ParamRange id="frequency" name="Frequency" group="Internal" default="`${(("mxs40srss" ne getIpBlockName()) && (sourceClock eq timerclk)) ? (1000000) : (!error ? getExposedMember(sourceClockRsc, "frequency") : 0)}`" min="0" max="400000000" resolution="1" visible="false" editable="false" desc="" /> 64 <ParamString id="accuracy" name="Accuracy" group="General" default="`${(("mxs40srss" ne getIpBlockName()) && (sourceClock eq timerclk)) ? (0) : (!error ? getExposedMember(sourceClockRsc, "accuracy") : 0)}`" visible="false" editable="false" desc="" /> 65 66 <!-- If the frequency is less than one MHz, display its value in kHz --> 67 <ParamString id="frequencyInfo" name="Frequency" group="General" default="`${formatFrequency(frequency,accuracy)}`" visible="true" editable="false" desc="The resulting CLK_ALT_SYS_TICK output clock frequency" /> 68 <ParamRange id="interval" name="Interval (µs)" group="General" default="0" min="0" max="`${floor(((16777215.0 / frequency) * 1000000) )}`" resolution="1" visible="true" editable="true" desc="Systick Interrupt Interval. Range (0 - `${floor(((16777215.0 / frequency) * 1000000) )}`) µs" /> 69 </Parameters> 70 <DRCs> 71 <DRC type="ERROR" text="Source clock for CLK_ALT_SYS_TICK is not enabled" condition="`${error}`" > 72 <FixIt action="ENABLE_BLOCK" target="`${sourceClockRsc}`" value="" valid="true" /> 73 </DRC> 74 </DRCs> 75 <ConfigFirmware> 76 <ConfigInclude value="cy_systick.h" include="true" /> 77 <ConfigDefine name="CY_CFG_SYSCLK_CLKALTSYSTICK_ENABLED" value="1" public="false" include="true" /> 78 <ConfigDefine name="CY_CFG_SYSCLK_CLKALTSYSTICK_SOURCE" value="CY_SYSTICK_CLOCK_SOURCE_CLK_`${sourceClockRscName}`" public="false" include="true" /> 79 <ConfigDefine name="CY_CFG_SYSCLK_CLKALTSYSTICK_INTERVAL" value="`${interval}`" public="false" include="true" /> 80 <ConfigDefine name="CY_CFG_SYSCLK_CLKALTSYSTICK_FREQUENCY" value="`${frequency}`" public="false" include="true" /> 81 <ConfigDefine name="CY_CFG_SYSCLK_CLKALTSYSTICK_TICKS" value="((`${interval}`)/1000000.0)*`${frequency}`" public="false" include="true" /> 82 <ConfigFunction signature="__STATIC_INLINE void Cy_SysClk_ClkAltSysTickInit()" body=" Cy_SysTick_Init(CY_CFG_SYSCLK_CLKALTSYSTICK_SOURCE, CY_CFG_SYSCLK_CLKALTSYSTICK_TICKS);" public="false" include="true" /> 83 </ConfigFirmware> 84</Personality> 85