/***************************************************************************//** * \file cyhal_wdt_impl.h * * \brief * CAT1 specific implementation for WDT API. * ******************************************************************************** * \copyright * Copyright 2019-2021 Cypress Semiconductor Corporation (an Infineon company) or * an affiliate of 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. *******************************************************************************/ #pragma once /** * \addtogroup group_hal_impl_wdt WDT (Watchdog Timer) * \ingroup group_hal_impl * \{ * The CAT1 WDT is only capable of supporting certain timeout ranges below its maximum timeout. * As a result, any unsupported timeouts given to the HAL WDT are rounded up to the nearest supported value. * The following table describes the unsupported ranges and the timeout values they are rounded to. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Range (ms)Rounded Timeout (ms)
3001 - 39994000
1501 - 19992000
751 - 9991000
376 - 499500
188 - 249250
94 - 124125
47 - 6263
24 - 3132
12 - 1516
6 - 78
3 - 34
* \} group_hal_impl_wdt */ #include "cyhal_wdt_impl_common.h" #if (defined(CY_IP_MXS40SRSS) && (CY_IP_MXS40SRSS_VERSION < 3)) || defined(CY_IP_MXS40SSRSS) #if defined(__cplusplus) extern "C" { #endif /* __cplusplus */ /** * \cond INTERNAL */ #if defined(CY_IP_MXS40SSRSS) // (2^_CYHAL_WDT_MATCH_BITS * 3) * 0.030518 ms #define _CYHAL_WDT_MAX_TIMEOUT_MS 384000 // ignore_bits range: 0 -> (_CYHAL_WDT_MATCH_BITS - 4) (Bottom four bits cannot be ignored) #define _CYHAL_WDT_MAX_IGNORE_BITS (_CYHAL_WDT_MATCH_BITS - 4) #else // (2^16 * 3) * .030518 ms /** Maximum WDT timeout in milliseconds */ #define _CYHAL_WDT_MAX_TIMEOUT_MS 6000 /** Maximum number of ignore bits */ #define _CYHAL_WDT_MAX_IGNORE_BITS 12 #endif /** \endcond */ #if defined(__cplusplus) } #endif /* __cplusplus */ #endif // defined(CY_IP_MXS40SRSS) || defined(CY_IP_MXS40SSRSS)