1<?xml version="1.0" encoding="utf-8"?>
2
3
4<!--****************************************************************************
5* \file mcwdt.cypersonality
6* \version 1.0
7*
8* \brief
9* Multi-counter watchdog personality description file. It supports CAT1C
10* devices.
11*
12********************************************************************************
13* \copyright
14* Copyright 2018-2022 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="mcwdt_v2" name="Multi-counter watchdog" version="1.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7">
31  <Dependencies>
32    <IpBlock name="mxs40srss_ver3" />
33    <Resource name="srss\.mcwdt" />
34  </Dependencies>
35  <ExposedMembers />
36  <Parameters>
37    <!-- PDL documentation -->
38    <ParamDoc id="pdlDoc" name="Configuration Help" group="Overview" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__mcwdt.html" linkText="Open MCWDT Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" />
39
40    <!--Counter0-->
41    <ParamRange id="C0LowerLimit" name="C0 Lower Limit" group="Counter0" default="0" min="0" max="65535" resolution="1" visible="true" editable="true" desc="Counter0 Lower Limit Value" />
42    <ParamRange id="C0UpperLimit" name="C0 Upper Limit" group="Counter0" default="0" min="0" max="65535" resolution="1" visible="true" editable="true" desc="Counter0 Upper Limit Value" />
43    <ParamRange id="C0WarnLimit" name="C0 Warn Limit" group="Counter0" default="0" min="0" max="65535" resolution="1" visible="true" editable="true" desc="Counter0 Warn Limit Value" />
44
45	<ParamChoice id="C0LowerAction" name="C0 Lower Action" group="Counter0" default="CY_MCWDT_ACTION_NONE" visible="true" editable="true" desc="Counter0 Lower Action.">
46      <Entry name="None" value="CY_MCWDT_ACTION_NONE" visible="true" />
47      <Entry name="Fault" value="CY_MCWDT_ACTION_FAULT" visible="true" />
48      <Entry name="Fault then Reset" value="CY_MCWDT_ACTION_FAULT_THEN_RESET" visible="true" />
49    </ParamChoice>
50
51	<ParamChoice id="C0UpperAction" name="C0 Upper Action" group="Counter0" default="CY_MCWDT_ACTION_NONE" visible="true" editable="true" desc="Counter0 Upper Action.">
52      <Entry name="None" value="CY_MCWDT_ACTION_NONE" visible="true" />
53      <Entry name="Fault" value="CY_MCWDT_ACTION_FAULT" visible="true" />
54      <Entry name="Fault then Reset" value="CY_MCWDT_ACTION_FAULT_THEN_RESET" visible="true" />
55    </ParamChoice>
56
57	<ParamChoice id="C0WarnAction" name="C0 Warn Action" group="Counter0" default="CY_MCWDT_WARN_ACTION_NONE" visible="true" editable="true" desc="Counter0 Warn Action.">
58      <Entry name="None" value="CY_MCWDT_WARN_ACTION_NONE" visible="true" />
59      <Entry name="Interrupt" value="CY_MCWDT_WARN_ACTION_INT" visible="true" />
60    </ParamChoice>
61
62	<ParamBool id="C0AutoService" name="C0 Auto Service Enable" group="Counter0" default="false" visible="true" editable="true" desc="Controls if Counter0 Auto Service feature to be enabled or not." />
63   	<ParamBool id="C0DeepSleepPause" name="C0 Deep Sleep Pause Enable" group="Counter0" default="false" visible="true" editable="true" desc="Controls if Counter0 Deep Sleep Pause feature to be enabled or not." />
64	<ParamBool id="C0DebugRun" name="C0 Debug Run Enable" group="Counter0" default="false" visible="true" editable="true" desc="Controls if Counter0 Debug Run feature to be enabled or not." />
65
66    <!--Counter1-->
67    <ParamRange id="C1LowerLimit" name="C1 Lower Limit" group="Counter1" default="0" min="0" max="65535" resolution="1" visible="true" editable="true" desc="Counter1 Lower Limit Value" />
68    <ParamRange id="C1UpperLimit" name="C1 Upper Limit" group="Counter1" default="0" min="0" max="65535" resolution="1" visible="true" editable="true" desc="Counter1 Upper Limit Value" />
69    <ParamRange id="C1WarnLimit" name="C1 Warn Limit" group="Counter1" default="0" min="0" max="65535" resolution="1" visible="true" editable="true" desc="Counter1 Warn Limit Value" />
70
71	<ParamChoice id="C1LowerAction" name="C1 Lower Action" group="Counter1" default="CY_MCWDT_ACTION_NONE" visible="true" editable="true" desc="Counter1 Lower Action.">
72      <Entry name="None" value="CY_MCWDT_ACTION_NONE" visible="true" />
73      <Entry name="Fault" value="CY_MCWDT_ACTION_FAULT" visible="true" />
74      <Entry name="Fault then Reset" value="CY_MCWDT_ACTION_FAULT_THEN_RESET" visible="true" />
75    </ParamChoice>
76
77	<ParamChoice id="C1UpperAction" name="C1 Upper Action" group="Counter1" default="CY_MCWDT_ACTION_NONE" visible="true" editable="true" desc="Counter1 Upper Action.">
78      <Entry name="None" value="CY_MCWDT_ACTION_NONE" visible="true" />
79      <Entry name="Fault" value="CY_MCWDT_ACTION_FAULT" visible="true" />
80      <Entry name="Fault then Reset" value="CY_MCWDT_ACTION_FAULT_THEN_RESET" visible="true" />
81    </ParamChoice>
82
83	<ParamChoice id="C1WarnAction" name="C1 Warn Action" group="Counter1" default="CY_MCWDT_WARN_ACTION_NONE" visible="true" editable="true" desc="Counter1 Warn Action.">
84      <Entry name="None" value="CY_MCWDT_WARN_ACTION_NONE" visible="true" />
85      <Entry name="Interrupt" value="CY_MCWDT_WARN_ACTION_INT" visible="true" />
86    </ParamChoice>
87
88	<ParamBool id="C1AutoService" name="C1 Auto Service Enable" group="Counter1" default="false" visible="true" editable="true" desc="Controls if Counter1 Auto Service feature to be enabled or not." />
89   	<ParamBool id="C1DeepSleepPause" name="C1 Deep Sleep Pause Enable" group="Counter1" default="false" visible="true" editable="true" desc="Controls if Counter1 Deep Sleep Pause feature to be enabled or not." />
90	<ParamBool id="C1DebugRun" name="C1 Debug Run Enable" group="Counter1" default="false" visible="true" editable="true" desc="Controls if Counter1 Debug Run feature to be enabled or not." />
91
92    <!--Counter2-->
93    <ParamRange id="C2ToggleBit" name="C2 Toggle Bit" group="Counter2" default="0" min="0" max="31" resolution="1" visible="true" editable="true" desc="Counter 2 Toggle Bit Position Value" />
94
95	<ParamChoice id="C2Action" name="C2 Action" group="Counter2" default="CY_MCWDT_CNT2_ACTION_NONE" visible="true" editable="true" desc="Counter2 Action.">
96      <Entry name="None" value="CY_MCWDT_CNT2_ACTION_NONE" visible="true" />
97      <Entry name="Interrupt" value="CY_MCWDT_CNT2_ACTION_INT" visible="true" />
98    </ParamChoice>
99
100   	<ParamBool id="C2DeepSleepPause" name="C2 Deep Sleep Pause Enable" group="Counter2" default="false" visible="true" editable="true" desc="Controls if Counter2 Deep Sleep Pause feature to be enabled or not." />
101	<ParamBool id="C2DebugRun" name="C2 Debug Run Enable" group="Counter2" default="false" visible="true" editable="true" desc="Controls if Counter2 Debug Run feature to be enabled or not." />
102
103    <!--Core Select Feature-->
104	<ParamChoice id="CoreSelect" name="MCWDT Core Select" group="Common" default="CY_MCWDT_PAUSED_BY_NO_CORE" visible="true" editable="true" desc="Select which core the current MCWDT needs to allocated.">
105      <Entry name="No Core" value="CY_MCWDT_PAUSED_BY_NO_CORE" visible="true" />
106      <Entry name="CM0" value="CY_MCWDT_PAUSED_BY_DPSLP_CM0" visible="true" />
107      <Entry name="CM7_0" value="CY_MCWDT_PAUSED_BY_DPSLP_CM7_0" visible="true" />
108      <Entry name="CM7_1" value="CY_MCWDT_PAUSED_BY_DPSLP_CM7_1" visible="`${hasCore(&quot;CORE_NAME_CM7_1&quot;)}`" />
109    </ParamChoice>
110
111    <!-- MCWDT instance number -->
112    <ParamString id="InstNumber" name="InstNumber" group="Internal" default="`${getInstNumber(&quot;mcwdt&quot;)}`" visible="false" editable="false" desc="MCWDT Instance name number." />
113
114    <!--Config-->
115    <ParamBool id="inFlash" name="Store Config in Flash" group="Advanced" default="true" visible="true" editable="true" desc="Controls whether the configuration structure is stored in flash (const, true) or SRAM (not const, false)." />
116  </Parameters>
117  <ConfigFirmware>
118    <ConfigInclude value="cy_mcwdt.h" include="true" />
119    <ConfigInclude value="cyhal_hwmgr.h" include="true" guard="defined (CY_USING_HAL)" />
120
121    <ConfigDefine name="`${INST_NAME}`_HW" value="MCWDT`${InstNumber}`" public="true" include="true" />
122    <ConfigDefine name="`${INST_NAME}`_IRQ" value="srss_interrupt_mcwdt_`${InstNumber}`_IRQn" public="true" include="true" />
123    <ConfigStruct name="`${INST_NAME . &quot;_config&quot;}`" type="cy_stc_mcwdt_config_t" const="`${inFlash}`" public="true" include="true" >
124      <Member name="c0LowerLimit" value="`${C0LowerLimit}`U" />
125      <Member name="c0UpperLimit" value="`${C0UpperLimit}`U" />
126      <Member name="c0WarnLimit" value="`${C0WarnLimit}`U" />
127      <Member name="c0LowerAction" value="`${C0LowerAction}`" />
128      <Member name="c0UpperAction" value="`${C0UpperAction}`" />
129      <Member name="c0WarnAction" value="`${C0WarnAction}`" />
130      <Member name="c0AutoService" value="`${(C0AutoService eq true) ? &quot;CY_MCWDT_ENABLE&quot; : &quot;CY_MCWDT_DISABLE&quot;}`" />
131	  <Member name="c0SleepDeepPause" value="`${(C0DeepSleepPause eq true) ? &quot;CY_MCWDT_ENABLE&quot; : &quot;CY_MCWDT_DISABLE&quot;}`" />
132	  <Member name="c0DebugRun" value="`${(C0DebugRun eq true) ? &quot;CY_MCWDT_ENABLE&quot; : &quot;CY_MCWDT_DISABLE&quot;}`" />
133      <Member name="c1LowerLimit" value="`${C1LowerLimit}`U" />
134      <Member name="c1UpperLimit" value="`${C1UpperLimit}`U" />
135      <Member name="c1WarnLimit" value="`${C1WarnLimit}`U" />
136      <Member name="c1LowerAction" value="`${C1LowerAction}`" />
137      <Member name="c1UpperAction" value="`${C1UpperAction}`" />
138      <Member name="c1WarnAction" value="`${C1WarnAction}`" />
139      <Member name="c1AutoService" value="`${(C1AutoService eq true) ? &quot;CY_MCWDT_ENABLE&quot; : &quot;CY_MCWDT_DISABLE&quot;}`" />
140	  <Member name="c1SleepDeepPause" value="`${(C1DeepSleepPause eq true) ? &quot;CY_MCWDT_ENABLE&quot; : &quot;CY_MCWDT_DISABLE&quot;}`" />
141	  <Member name="c1DebugRun" value="`${(C1DebugRun eq true) ? &quot;CY_MCWDT_ENABLE&quot; : &quot;CY_MCWDT_DISABLE&quot;}`" />
142	  <Member name="c2ToggleBit" value="`${C2ToggleBit}`U" />
143	  <Member name="c2Action" value="`${C2Action}`" />
144	  <Member name="c2SleepDeepPause" value="`${(C2DeepSleepPause eq true) ? &quot;CY_MCWDT_ENABLE&quot; : &quot;CY_MCWDT_DISABLE&quot;}`" />
145	  <Member name="c2DebugRun" value="`${(C2DebugRun eq true) ? &quot;CY_MCWDT_ENABLE&quot; : &quot;CY_MCWDT_DISABLE&quot;}`" />
146      <Member name="coreSelect" value="`${CoreSelect}`" />
147	</ConfigStruct>
148
149    <ConfigStruct name="`${INST_NAME}`_obj" type="cyhal_resource_inst_t" const="true" public="true" include="true" guard="defined (CY_USING_HAL)">
150      <Member name="type" value="CYHAL_RSC_LPTIMER" />
151      <Member name="block_num" value="`${getInstNumber(&quot;mcwdt&quot;)}`U" />
152      <Member name="channel_num" value="0U" />
153    </ConfigStruct>
154
155    <ConfigInstruction value="cyhal_hwmgr_reserve(&amp;`${INST_NAME}`_obj);" include="true" guard="defined (CY_USING_HAL)" />
156  </ConfigFirmware>
157</Personality>
158