aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartinaHanusovaNXP <martina.hanusova@nxp.com>2021-05-06 09:25:36 +0200
committerAnton Komlev <Anton.Komlev@arm.com>2021-05-06 23:55:06 +0200
commitb3fbaaf7b5c39ad69f41b2e54e9efd9e445123ee (patch)
tree254ff6ab390e6fba82d7218d34f8d3c149f75004
parentc05319dbb991d153081d5bf5314b8a635063b252 (diff)
downloadtrusted-firmware-m-b3fbaaf7b5c39ad69f41b2e54e9efd9e445123ee.tar.gz
Platform: LPCxpresso55s69: Synchronized platform specific code with NXP MCUx SDK port
Synchronized platform/ext/target/nxp folder with MCUx latest SDK port: - Updated GCC startup files for LPCxpresso55s69 - Updated flash_layout and region_defs in the partions folder for LPCxpresso55s69 - Updated target_cfg files for LPCxpresso55s69 - Added drivers and utilities into NativeDriver folder for LPCxpresso55s69 - Moved common files from lpcxpresso55s69 folder to common folder - Updated parameters for PS in config.cmake Added pull_drivers.cmake module for automatically updating general SDK drivers from github with specific TAG. Signed-off-by: MartinaHanusovaNXP <martina.hanusova@nxp.com> Change-Id: I171d7be665c931bf3be765cc8ee36fb2026d3f70
-rwxr-xr-xplatform/ext/target/nxp/common/CMSIS_Driver/Driver_USART.c65
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/components/lists/generic_list.c423
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/components/lists/generic_list.h191
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_manager.c1393
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_manager.h648
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_port_internal.h99
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_port_uart.c403
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_port_uart.h57
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/components/uart/uart.h532
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/components/uart/usart_adapter.c643
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_casper.c2668
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_casper.h312
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_clock.c2031
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_clock.h1240
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_common.c212
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_common.h630
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_ctimer.c544
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_ctimer.h488
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_flexcomm.c404
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_flexcomm.h64
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_gpio.c302
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_gpio.h364
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_hashcrypt.c1316
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_hashcrypt.h438
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_iap.c285
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_iap.h498
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_iap_ffr.h274
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_iocon.h288
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_power.c19
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_power.h544
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_reset.c99
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_reset.h281
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_rng.c92
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_rng.h95
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_usart.c957
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/drivers/fsl_usart.h718
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console.c1178
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console.h231
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console_conf.h158
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/utilities/fsl_assert.c33
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/utilities/fsl_notifier.c209
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/utilities/fsl_notifier.h237
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/utilities/fsl_sbrk.c44
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/utilities/fsl_shell.c970
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/utilities/fsl_shell.h230
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/utilities/str/fsl_str.c1324
-rwxr-xr-xplatform/ext/target/nxp/common/Native_Driver/utilities/str/fsl_str.h66
-rw-r--r--platform/ext/target/nxp/common/plat_attest_hal.c139
-rw-r--r--platform/ext/target/nxp/common/plat_attestation_key.c110
-rw-r--r--platform/ext/target/nxp/common/plat_huk_key.c160
-rw-r--r--[-rwxr-xr-x]platform/ext/target/nxp/common/plat_test.c (renamed from platform/ext/target/nxp/lpcxpresso55s69/plat_test.c)3
-rw-r--r--[-rwxr-xr-x]platform/ext/target/nxp/common/services/src/tfm_platform_system.c (renamed from platform/ext/target/nxp/lpcxpresso55s69/services/src/tfm_platform_system.c)0
-rw-r--r--[-rwxr-xr-x]platform/ext/target/nxp/common/spm_hal.c (renamed from platform/ext/target/nxp/lpcxpresso55s69/spm_hal.c)13
-rw-r--r--platform/ext/target/nxp/common/tfm_hal_isolation.c (renamed from platform/ext/target/nxp/lpcxpresso55s69/tfm_hal_isolation.c)149
-rw-r--r--platform/ext/target/nxp/lpcxpresso55s69/CMakeLists.txt59
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/Device/Source/armgcc/startup_LPC55S69_cm33_core0_ns.S266
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/Device/Source/armgcc/startup_LPC55S69_cm33_core0_s.S265
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core0.h27477
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core0_features.h387
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core1.h27477
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core1_features.h387
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/Native_Driver/fsl_device_registers.h46
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/Native_Driver/system_LPC55S69_cm33_core0.c374
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/Native_Driver/system_LPC55S69_cm33_core0.h112
-rw-r--r--platform/ext/target/nxp/lpcxpresso55s69/config.cmake2
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/partition/flash_layout.h69
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/partition/region_defs.h12
-rw-r--r--platform/ext/target/nxp/lpcxpresso55s69/pull_drivers.cmake97
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/target_cfg.c126
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/target_cfg.h13
-rwxr-xr-xplatform/ext/target/nxp/lpcxpresso55s69/tfm_peripherals_def.h1
71 files changed, 1113 insertions, 80928 deletions
diff --git a/platform/ext/target/nxp/common/CMSIS_Driver/Driver_USART.c b/platform/ext/target/nxp/common/CMSIS_Driver/Driver_USART.c
index 13d85fca1a..844a977b15 100755
--- a/platform/ext/target/nxp/common/CMSIS_Driver/Driver_USART.c
+++ b/platform/ext/target/nxp/common/CMSIS_Driver/Driver_USART.c
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019 Arm Limited. All rights reserved.
- * Copyright (c) 2020 Linaro. All rights reserved.
+ * Copyright 2019-2021 NXP. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -19,6 +19,7 @@
#include "fsl_common.h"
#include "fsl_usart.h"
+#include "fsl_clock.h"
#include "Driver_USART.h"
#include "board.h"
@@ -82,12 +83,15 @@ static ARM_USART_CAPABILITIES ARM_USART_GetCapabilities(void)
int32_t ARM_USARTx_Initialize(USART_Type *usart, usart_config_t *usartConfig)
{
- uint32_t usartClkFreq = 0;
+
+#if (__ARM_FEATURE_CMSE & 0x2) /* Initialize once in S */
+ uint32_t usartClkFreq;
- usartClkFreq = CLOCK_GetFlexCommClkFreq(0);
+ usartClkFreq = BOARD_DEBUG_UART_CLK_FREQ;
USART_Init(usart, usartConfig, usartClkFreq);
-
+#endif
+
return ARM_DRIVER_OK;
}
@@ -128,12 +132,19 @@ int32_t ARM_USARTx_Receive(USART_Type *base, uint8_t *data, size_t length)
status = USART_ReadBlocking(base, data, length);
- return ARM_DRIVER_OK;
+ if (status == kStatus_Success)
+ {
+ return ARM_DRIVER_OK;
+ }
+ else
+ {
+ return ARM_DRIVER_ERROR;
+ }
}
static int32_t ARM_USART0_Initialize(ARM_USART_SignalEvent_t cb_event)
{
- usart_config_t uart0Config;
+ static usart_config_t uart0Config; /* Have to use "static" otherwise it may cause stack corruption in Keil */
/*
* config.baudRate_Bps = 115200U;
@@ -143,10 +154,10 @@ static int32_t ARM_USART0_Initialize(ARM_USART_SignalEvent_t cb_event)
* config.enableTxFifo = false;
* config.enableRxFifo = false;
*/
- USART_GetDefaultConfig(&uart0Config);
- uart0Config.baudRate_Bps = 115200U;
- uart0Config.enableRx = true;
- uart0Config.enableTx = true;
+ USART_GetDefaultConfig(&uart0Config);
+ uart0Config.baudRate_Bps = 115200U;
+ uart0Config.enableRx = true;
+ uart0Config.enableTx = true;
return ARM_USARTx_Initialize(USART0, &uart0Config);
}
@@ -184,14 +195,12 @@ static int32_t ARM_USART0_Transfer(const void *data_out, void *data_in,
static uint32_t ARM_USART0_GetTxCount(void)
{
- /* This operation is not supported. */
- return ARM_DRIVER_OK;
+ return (uint32_t)ARM_DRIVER_ERROR_UNSUPPORTED;
}
static uint32_t ARM_USART0_GetRxCount(void)
{
- /* This operation is not supported. */
- return ARM_DRIVER_OK;
+ return (uint32_t)ARM_DRIVER_ERROR_UNSUPPORTED;
}
static int32_t ARM_USART0_Control(uint32_t control, uint32_t arg)
@@ -219,18 +228,18 @@ static ARM_USART_MODEM_STATUS ARM_USART0_GetModemStatus(void)
extern ARM_DRIVER_USART Driver_USART0;
ARM_DRIVER_USART Driver_USART0 = {
- ARM_USART_GetVersion,
- ARM_USART_GetCapabilities,
- ARM_USART0_Initialize,
- ARM_USART0_Uninitialize,
- ARM_USART0_PowerControl,
- ARM_USART0_Send,
- ARM_USART0_Receive,
- ARM_USART0_Transfer,
- ARM_USART0_GetTxCount,
- ARM_USART0_GetRxCount,
- ARM_USART0_Control,
- ARM_USART0_GetStatus,
- ARM_USART0_SetModemControl,
- ARM_USART0_GetModemStatus
+ .GetVersion = ARM_USART_GetVersion,
+ .GetCapabilities = ARM_USART_GetCapabilities,
+ .Initialize = ARM_USART0_Initialize,
+ .Uninitialize = ARM_USART0_Uninitialize,
+ .PowerControl = ARM_USART0_PowerControl,
+ .Send = ARM_USART0_Send,
+ .Receive = ARM_USART0_Receive,
+ .Transfer = ARM_USART0_Transfer,
+ .GetTxCount = ARM_USART0_GetTxCount,
+ .GetRxCount = ARM_USART0_GetRxCount,
+ .Control = ARM_USART0_Control,
+ .GetStatus = ARM_USART0_GetStatus,
+ .SetModemControl = ARM_USART0_SetModemControl,
+ .GetModemStatus = ARM_USART0_GetModemStatus
};
diff --git a/platform/ext/target/nxp/common/Native_Driver/components/lists/generic_list.c b/platform/ext/target/nxp/common/Native_Driver/components/lists/generic_list.c
deleted file mode 100755
index e97e3a76e9..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/components/lists/generic_list.c
+++ /dev/null
@@ -1,423 +0,0 @@
-/*
- * Copyright 2018-2019 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-/*! *********************************************************************************
-*************************************************************************************
-* Include
-*************************************************************************************
-********************************************************************************** */
-#include "fsl_common.h"
-#include "generic_list.h"
-
-static list_status_t LIST_Scan(list_handle_t list, list_element_handle_t newElement)
-{
- list_element_handle_t element = list->head;
-
- while (element != NULL)
- {
- if (element == newElement)
- {
- return kLIST_DuplicateError;
- }
- element = element->next;
- }
- return kLIST_Ok;
-}
-
-/*! *********************************************************************************
-*************************************************************************************
-* Public functions
-*************************************************************************************
-********************************************************************************** */
-/*! *********************************************************************************
- * \brief Initialises the list descriptor.
- *
- * \param[in] list - LIST_ handle to init.
- * max - Maximum number of elements in list. 0 for unlimited.
- *
- * \return void.
- *
- * \pre
- *
- * \post
- *
- * \remarks
- *
- ********************************************************************************** */
-void LIST_Init(list_handle_t list, uint32_t max)
-{
- list->head = NULL;
- list->tail = NULL;
- list->max = (uint16_t)max;
- list->size = 0;
-}
-
-/*! *********************************************************************************
- * \brief Gets the list that contains the given element.
- *
- * \param[in] element - Handle of the element.
- *
- * \return NULL if element is orphan.
- * Handle of the list the element is inserted into.
- *
- * \pre
- *
- * \post
- *
- * \remarks
- *
- ********************************************************************************** */
-list_handle_t LIST_GetList(list_element_handle_t element)
-{
- return element->list;
-}
-
-/*! *********************************************************************************
- * \brief Links element to the tail of the list.
- *
- * \param[in] list - ID of list to insert into.
- * element - element to add
- *
- * \return kLIST_Full if list is full.
- * kLIST_Ok if insertion was successful.
- *
- * \pre
- *
- * \post
- *
- * \remarks
- *
- ********************************************************************************** */
-list_status_t LIST_AddTail(list_handle_t list, list_element_handle_t element)
-{
- uint32_t regPrimask = DisableGlobalIRQ();
-
- if ((list->max != 0U) && (list->max == list->size))
- {
- EnableGlobalIRQ(regPrimask);
- return kLIST_Full;
- }
-
- if (kLIST_DuplicateError == LIST_Scan(list, element))
- {
- EnableGlobalIRQ(regPrimask);
- return kLIST_DuplicateError;
- }
-
- if (list->size == 0U)
- {
- list->head = element;
- }
- else
- {
- list->tail->next = element;
- }
- element->prev = list->tail;
- element->next = NULL;
- element->list = list;
- list->tail = element;
- list->size++;
-
- EnableGlobalIRQ(regPrimask);
- return kLIST_Ok;
-}
-
-/*! *********************************************************************************
- * \brief Links element to the head of the list.
- *
- * \param[in] list - ID of list to insert into.
- * element - element to add
- *
- * \return kLIST_Full if list is full.
- * kLIST_Ok if insertion was successful.
- *
- * \pre
- *
- * \post
- *
- * \remarks
- *
- ********************************************************************************** */
-list_status_t LIST_AddHead(list_handle_t list, list_element_handle_t element)
-{
- uint32_t regPrimask = DisableGlobalIRQ();
-
- if ((list->max != 0U) && (list->max == list->size))
- {
- EnableGlobalIRQ(regPrimask);
- return kLIST_Full;
- }
-
- if (kLIST_DuplicateError == LIST_Scan(list, element))
- {
- EnableGlobalIRQ(regPrimask);
- return kLIST_DuplicateError;
- }
-
- if (list->size == 0U)
- {
- list->tail = element;
- }
- else
- {
- list->head->prev = element;
- }
- element->next = list->head;
- element->prev = NULL;
- element->list = list;
- list->head = element;
- list->size++;
-
- EnableGlobalIRQ(regPrimask);
- return kLIST_Ok;
-}
-
-/*! *********************************************************************************
- * \brief Unlinks element from the head of the list.
- *
- * \param[in] list - ID of list to remove from.
- *
- * \return NULL if list is empty.
- * ID of removed element(pointer) if removal was successful.
- *
- * \pre
- *
- * \post
- *
- * \remarks
- *
- ********************************************************************************** */
-list_element_handle_t LIST_RemoveHead(list_handle_t list)
-{
- list_element_handle_t element;
-
- uint32_t regPrimask = DisableGlobalIRQ();
-
- if ((NULL == list) || (list->size == 0U))
- {
- EnableGlobalIRQ(regPrimask);
- return NULL; /*LIST_ is empty*/
- }
-
- element = list->head;
- list->size--;
- if (list->size == 0U)
- {
- list->tail = NULL;
- }
- else
- {
- element->next->prev = NULL;
- }
- list->head = element->next; /*Is NULL if element is head*/
- element->list = NULL;
-
- EnableGlobalIRQ(regPrimask);
- return element;
-}
-
-/*! *********************************************************************************
- * \brief Gets head element ID.
- *
- * \param[in] list - ID of list.
- *
- * \return NULL if list is empty.
- * ID of head element if list is not empty.
- *
- * \pre
- *
- * \post
- *
- * \remarks
- *
- ********************************************************************************** */
-list_element_handle_t LIST_GetHead(list_handle_t list)
-{
- return list->head;
-}
-
-/*! *********************************************************************************
- * \brief Gets next element ID.
- *
- * \param[in] element - ID of the element.
- *
- * \return NULL if element is tail.
- * ID of next element if exists.
- *
- * \pre
- *
- * \post
- *
- * \remarks
- *
- ********************************************************************************** */
-list_element_handle_t LIST_GetNext(list_element_handle_t element)
-{
- return element->next;
-}
-
-/*! *********************************************************************************
- * \brief Gets previous element ID.
- *
- * \param[in] element - ID of the element.
- *
- * \return NULL if element is head.
- * ID of previous element if exists.
- *
- * \pre
- *
- * \post
- *
- * \remarks
- *
- ********************************************************************************** */
-list_element_handle_t LIST_GetPrev(list_element_handle_t element)
-{
- return element->prev;
-}
-
-/*! *********************************************************************************
- * \brief Unlinks an element from its list.
- *
- * \param[in] element - ID of the element to remove.
- *
- * \return kLIST_OrphanElement if element is not part of any list.
- * kLIST_Ok if removal was successful.
- *
- * \pre
- *
- * \post
- *
- * \remarks
- *
- ********************************************************************************** */
-list_status_t LIST_RemoveElement(list_element_handle_t element)
-{
- if (element->list == NULL)
- {
- return kLIST_OrphanElement; /*Element was previusly removed or never added*/
- }
-
- uint32_t regPrimask = DisableGlobalIRQ();
-
- if (element->prev == NULL) /*Element is head or solo*/
- {
- element->list->head = element->next; /*is null if solo*/
- }
- if (element->next == NULL) /*Element is tail or solo*/
- {
- element->list->tail = element->prev; /*is null if solo*/
- }
- if (element->prev != NULL) /*Element is not head*/
- {
- element->prev->next = element->next;
- }
- if (element->next != NULL) /*Element is not tail*/
- {
- element->next->prev = element->prev;
- }
- element->list->size--;
- element->list = NULL;
-
- EnableGlobalIRQ(regPrimask);
- return kLIST_Ok;
-}
-
-/*! *********************************************************************************
- * \brief Links an element in the previous position relative to a given member
- * of a list.
- *
- * \param[in] element - ID of a member of a list.
- * newElement - new element to insert before the given member.
- *
- * \return kLIST_OrphanElement if element is not part of any list.
- * kLIST_Full if list is full.
- * kLIST_Ok if insertion was successful.
- *
- * \pre
- *
- * \post
- *
- * \remarks
- *
- ********************************************************************************** */
-list_status_t LIST_AddPrevElement(list_element_handle_t element, list_element_handle_t newElement)
-{
- if (element->list == NULL)
- {
- return kLIST_OrphanElement; /*Element was previusly removed or never added*/
- }
- uint32_t regPrimask = DisableGlobalIRQ();
-
- if ((element->list->max != 0U) && (element->list->max == element->list->size))
- {
- EnableGlobalIRQ(regPrimask);
- return kLIST_Full;
- }
-
- if (kLIST_DuplicateError == LIST_Scan(element->list, newElement))
- {
- EnableGlobalIRQ(regPrimask);
- return kLIST_DuplicateError;
- }
-
- if (element->prev == NULL) /*Element is list head*/
- {
- element->list->head = newElement;
- }
- else
- {
- element->prev->next = newElement;
- }
- newElement->list = element->list;
- element->list->size++;
- newElement->next = element;
- newElement->prev = element->prev;
- element->prev = newElement;
-
- EnableGlobalIRQ(regPrimask);
- return kLIST_Ok;
-}
-
-/*! *********************************************************************************
- * \brief Gets the current size of a list.
- *
- * \param[in] list - ID of the list.
- *
- * \return Current size of the list.
- *
- * \pre
- *
- * \post
- *
- * \remarks
- *
- ********************************************************************************** */
-uint32_t LIST_GetSize(list_handle_t list)
-{
- return list->size;
-}
-
-/*! *********************************************************************************
- * \brief Gets the number of free places in the list.
- *
- * \param[in] list - ID of the list.
- *
- * \return Available size of the list.
- *
- * \pre
- *
- * \post
- *
- * \remarks
- *
- ********************************************************************************** */
-uint32_t LIST_GetAvailableSize(list_handle_t list)
-{
- return ((uint32_t)list->max - (uint32_t)list->size);
-}
diff --git a/platform/ext/target/nxp/common/Native_Driver/components/lists/generic_list.h b/platform/ext/target/nxp/common/Native_Driver/components/lists/generic_list.h
deleted file mode 100755
index 9cf373d52d..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/components/lists/generic_list.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright 2018-2019 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef _GENERIC_LIST_H_
-#define _GENERIC_LIST_H_
-
-/*!
- * @addtogroup GenericList
- * @{
- */
-
-/*!*********************************************************************************
-*************************************************************************************
-* Include
-*************************************************************************************
-********************************************************************************** */
-
-/*! *********************************************************************************
-*************************************************************************************
-* Public macro definitions
-*************************************************************************************
-********************************************************************************** */
-
-/*! *********************************************************************************
-*************************************************************************************
-* Public type definitions
-*************************************************************************************
-********************************************************************************** */
-/*! @brief The list status */
-typedef enum _list_status
-{
- kLIST_Ok = kStatus_Success, /*!< Success */
- kLIST_DuplicateError = MAKE_STATUS(kStatusGroup_LIST, 1), /*!< Duplicate Error */
- kLIST_Full = MAKE_STATUS(kStatusGroup_LIST, 2), /*!< FULL */
- kLIST_Empty = MAKE_STATUS(kStatusGroup_LIST, 3), /*!< Empty */
- kLIST_OrphanElement = MAKE_STATUS(kStatusGroup_LIST, 4), /*!< Orphan Element */
-} list_status_t;
-
-/*! @brief The list structure*/
-typedef struct list_label
-{
- struct list_element_tag *head; /*!< list head */
- struct list_element_tag *tail; /*!< list tail */
- uint16_t size; /*!< list size */
- uint16_t max; /*!< list max number of elements */
-} list_label_t, *list_handle_t;
-
-/*! @brief The list element*/
-typedef struct list_element_tag
-{
- struct list_element_tag *next; /*!< next list element */
- struct list_element_tag *prev; /*!< previous list element */
- struct list_label *list; /*!< pointer to the list */
-} list_element_t, *list_element_handle_t;
-
-/*! *********************************************************************************
-*************************************************************************************
-* Public prototypes
-*************************************************************************************
-********************************************************************************** */
-/*******************************************************************************
- * API
- ******************************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif /* _cplusplus */
-/*!
- * @brief Initialize the list.
- *
- * This function initialize the list.
- *
- * @param list - List handle to initialize.
- * @param max - Maximum number of elements in list. 0 for unlimited.
- */
-void LIST_Init(list_handle_t list, uint32_t max);
-
-/*!
- * @brief Gets the list that contains the given element.
- *
- *
- * @param element - Handle of the element.
- * @retval NULL if element is orphan, Handle of the list the element is inserted into.
- */
-list_handle_t LIST_GetList(list_element_handle_t element);
-
-/*!
- * @brief Links element to the head of the list.
- *
- * @param list - Handle of the list.
- * @param element - Handle of the element.
- * @retval kLIST_Full if list is full, kLIST_Ok if insertion was successful.
- */
-list_status_t LIST_AddHead(list_handle_t list, list_element_handle_t element);
-
-/*!
- * @brief Links element to the tail of the list.
- *
- * @param list - Handle of the list.
- * @param element - Handle of the element.
- * @retval kLIST_Full if list is full, kLIST_Ok if insertion was successful.
- */
-list_status_t LIST_AddTail(list_handle_t list, list_element_handle_t element);
-
-/*!
- * @brief Unlinks element from the head of the list.
- *
- * @param list - Handle of the list.
- *
- * @retval NULL if list is empty, handle of removed element(pointer) if removal was successful.
- */
-list_element_handle_t LIST_RemoveHead(list_handle_t list);
-
-/*!
- * @brief Gets head element handle.
- *
- * @param list - Handle of the list.
- *
- * @retval NULL if list is empty, handle of removed element(pointer) if removal was successful.
- */
-list_element_handle_t LIST_GetHead(list_handle_t list);
-
-/*!
- * @brief Gets next element handle for given element handle.
- *
- * @param element - Handle of the element.
- *
- * @retval NULL if list is empty, handle of removed element(pointer) if removal was successful.
- */
-list_element_handle_t LIST_GetNext(list_element_handle_t element);
-
-/*!
- * @brief Gets previous element handle for given element handle.
- *
- * @param element - Handle of the element.
- *
- * @retval NULL if list is empty, handle of removed element(pointer) if removal was successful.
- */
-list_element_handle_t LIST_GetPrev(list_element_handle_t element);
-
-/*!
- * @brief Unlinks an element from its list.
- *
- * @param element - Handle of the element.
- *
- * @retval kLIST_OrphanElement if element is not part of any list.
- * @retval kLIST_Ok if removal was successful.
- */
-list_status_t LIST_RemoveElement(list_element_handle_t element);
-
-/*!
- * @brief Links an element in the previous position relative to a given member of a list.
- *
- * @param element - Handle of the element.
- * @param newElement - New element to insert before the given member.
- *
- * @retval kLIST_OrphanElement if element is not part of any list.
- * @retval kLIST_Ok if removal was successful.
- */
-list_status_t LIST_AddPrevElement(list_element_handle_t element, list_element_handle_t newElement);
-
-/*!
- * @brief Gets the current size of a list.
- *
- * @param list - Handle of the list.
- *
- * @retval Current size of the list.
- */
-uint32_t LIST_GetSize(list_handle_t list);
-
-/*!
- * @brief Gets the number of free places in the list.
- *
- * @param list - Handle of the list.
- *
- * @retval Available size of the list.
- */
-uint32_t LIST_GetAvailableSize(list_handle_t list);
-
-/* @} */
-
-#if defined(__cplusplus)
-}
-#endif
-/*! @}*/
-#endif /*_GENERIC_LIST_H_*/
diff --git a/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_manager.c b/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_manager.c
deleted file mode 100755
index 0ce8a800b0..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_manager.c
+++ /dev/null
@@ -1,1393 +0,0 @@
-/*
- * Copyright 2018-2020 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_common.h"
-#include <string.h>
-
-#include "serial_manager.h"
-#include "serial_port_internal.h"
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-
-#include "generic_list.h"
-
-/*
- * The OSA_USED macro can only be defined when the OSA component is used.
- * If the source code of the OSA component does not exist, the OSA_USED cannot be defined.
- * OR, If OSA component is not added into project event the OSA source code exists, the OSA_USED
- * also cannot be defined.
- * The source code path of the OSA component is <MCUXpresso_SDK>/components/osa.
- *
- */
-#if defined(OSA_USED)
-
-#if (defined(SERIAL_MANAGER_USE_COMMON_TASK) && (SERIAL_MANAGER_USE_COMMON_TASK > 0U))
-#include "common_task.h"
-#else
-#include "fsl_os_abstraction.h"
-#endif
-
-#endif
-
-#endif
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-#ifndef NDEBUG
-#if (defined(DEBUG_CONSOLE_ASSERT_DISABLE) && (DEBUG_CONSOLE_ASSERT_DISABLE > 0U))
-#undef assert
-#define assert(n)
-#endif
-#endif
-
-#define SERIAL_EVENT_DATA_RECEIVED (1U << 0)
-#define SERIAL_EVENT_DATA_SENT (1U << 1)
-
-#define SERIAL_MANAGER_WRITE_TAG 0xAABB5754U
-#define SERIAL_MANAGER_READ_TAG 0xBBAA5244U
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-typedef enum _serial_manager_transmission_mode
-{
- kSerialManager_TransmissionBlocking = 0x0U, /*!< Blocking transmission*/
- kSerialManager_TransmissionNonBlocking = 0x1U, /*!< None blocking transmission*/
-} serial_manager_transmission_mode_t;
-
-/* TX transfer structure */
-typedef struct _serial_manager_transfer
-{
- uint8_t *buffer;
- volatile uint32_t length;
- volatile uint32_t soFar;
- serial_manager_transmission_mode_t mode;
- serial_manager_status_t status;
-} serial_manager_transfer_t;
-#endif
-
-/* write handle structure */
-typedef struct _serial_manager_send_handle
-{
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- list_element_t link; /*!< list element of the link */
- serial_manager_transfer_t transfer;
-#endif
- struct _serial_manager_handle *serialManagerHandle;
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- serial_manager_callback_t callback;
- void *callbackParam;
- uint32_t tag;
-#endif
-} serial_manager_write_handle_t;
-
-typedef serial_manager_write_handle_t serial_manager_read_handle_t;
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-/* receive state structure */
-typedef struct _serial_manager_read_ring_buffer
-{
- uint8_t *ringBuffer;
- uint32_t ringBufferSize;
- volatile uint32_t ringHead;
- volatile uint32_t ringTail;
-} serial_manager_read_ring_buffer_t;
-#endif
-
-#if defined(__CC_ARM)
-#pragma anon_unions
-#endif
-/* The serial manager handle structure */
-typedef struct _serial_manager_handle
-{
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- list_label_t runningWriteHandleHead; /*!< The queue of running write handle */
- list_label_t completedWriteHandleHead; /*!< The queue of completed write handle */
-#endif
- serial_manager_read_handle_t *volatile openedReadHandleHead;
- volatile uint32_t openedWriteHandleCount;
- union
- {
- uint32_t lowLevelhandleBuffer[1];
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
- uint8_t uartHandleBuffer[SERIAL_PORT_UART_HANDLE_SIZE];
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
- uint8_t usbcdcHandleBuffer[SERIAL_PORT_USB_CDC_HANDLE_SIZE];
-#endif
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
- uint8_t swoHandleBuffer[SERIAL_PORT_SWO_HANDLE_SIZE];
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
- uint8_t usbcdcVirtualHandleBuffer[SERIAL_PORT_USB_VIRTUAL_HANDLE_SIZE];
-#endif
- };
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- serial_manager_read_ring_buffer_t ringBuffer;
-#endif
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-
-#if defined(OSA_USED)
-
-#if (defined(SERIAL_MANAGER_USE_COMMON_TASK) && (SERIAL_MANAGER_USE_COMMON_TASK > 0U))
- common_task_message_t commontaskMsg;
-#else
- OSA_EVENT_HANDLE_DEFINE(event); /*!< Event instance */
- OSA_TASK_HANDLE_DEFINE(taskId); /*!< Task handle */
-#endif
-
-#endif
-
-#endif
-
- serial_port_type_t type;
-} serial_manager_handle_t;
-
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-static void SerialManager_Task(void *param);
-#endif
-
-/*******************************************************************************
- * Variables
- ******************************************************************************/
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-
-#if defined(OSA_USED)
-
-#if (defined(SERIAL_MANAGER_USE_COMMON_TASK) && (SERIAL_MANAGER_USE_COMMON_TASK > 0U))
-
-#else
- /*
- * \brief Defines the serial manager task's stack
- */
-OSA_TASK_DEFINE(SerialManager_Task, SERIAL_MANAGER_TASK_PRIORITY, 1, SERIAL_MANAGER_TASK_STACK_SIZE, false);
-#endif
-
-#endif
-
-#endif
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-static void SerialManager_AddTail(list_label_t *queue, serial_manager_write_handle_t *node)
-{
- (void)LIST_AddTail(queue, &node->link);
-}
-
-static void SerialManager_RemoveHead(list_label_t *queue)
-{
- (void)LIST_RemoveHead(queue);
-}
-#endif
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-
-static serial_manager_status_t SerialManager_StartWriting(serial_manager_handle_t *handle)
-{
- serial_manager_status_t status = kStatus_SerialManager_Error;
- serial_manager_write_handle_t *writeHandle =
- (serial_manager_write_handle_t *)(void *)LIST_GetHead(&handle->runningWriteHandleHead);
-
- if (writeHandle != NULL)
- {
- switch (handle->type)
- {
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
- case kSerialPort_Uart:
- status = Serial_UartWrite(((serial_handle_t)&handle->lowLevelhandleBuffer[0]),
- writeHandle->transfer.buffer, writeHandle->transfer.length);
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
- case kSerialPort_UsbCdc:
- status = Serial_UsbCdcWrite(((serial_handle_t)&handle->lowLevelhandleBuffer[0]),
- writeHandle->transfer.buffer, writeHandle->transfer.length);
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
- case kSerialPort_Swo:
- status = Serial_SwoWrite(((serial_handle_t)&handle->lowLevelhandleBuffer[0]),
- writeHandle->transfer.buffer, writeHandle->transfer.length);
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
- case kSerialPort_UsbCdcVirtual:
- status = Serial_UsbCdcVirtualWrite(((serial_handle_t)&handle->lowLevelhandleBuffer[0]),
- writeHandle->transfer.buffer, writeHandle->transfer.length);
- break;
-#endif
- default:
- status = kStatus_SerialManager_Error;
- break;
- }
- }
- return status;
-}
-
-static serial_manager_status_t SerialManager_StartReading(serial_manager_handle_t *handle,
- serial_manager_read_handle_t *readHandle,
- uint8_t *buffer,
- uint32_t length)
-{
- serial_manager_status_t status = kStatus_SerialManager_Error;
-
- if (NULL != readHandle)
- {
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
- if (handle->type == kSerialPort_UsbCdc)
- {
- status = Serial_UsbCdcRead(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), buffer, length);
- }
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
- if (handle->type == kSerialPort_UsbCdcVirtual)
- {
- status = Serial_UsbCdcVirtualRead(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), buffer, length);
- }
-#endif
- }
- return status;
-}
-
-#else /*SERIAL_MANAGER_NON_BLOCKING_MODE > 0U*/
-
-static serial_manager_status_t SerialManager_StartWriting(serial_manager_handle_t *handle,
- serial_manager_write_handle_t *writeHandle,
- uint8_t *buffer,
- uint32_t length)
-{
- serial_manager_status_t status = kStatus_SerialManager_Error;
-
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
- if (kSerialPort_Uart == handle->type) /* Serial port UART */
- {
- status = Serial_UartWrite(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), buffer, length);
- }
- else
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
- if (kSerialPort_UsbCdc == handle->type) /* Serial port UsbCdc */
- {
- status = Serial_UsbCdcWrite(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), buffer, length);
- }
- else
-#endif
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
- if (kSerialPort_Swo == handle->type) /* Serial port SWO */
- {
- status = Serial_SwoWrite(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), buffer, length);
- }
- else
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
- if (kSerialPort_UsbCdcVirtual == handle->type) /* Serial port UsbCdcVirtual */
- {
- status = Serial_UsbCdcVirtualWrite(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), buffer, length);
- }
- else
-#endif
- {
- /*MISRA rule*/
- }
- return status;
-}
-
-static serial_manager_status_t SerialManager_StartReading(serial_manager_handle_t *handle,
- serial_manager_read_handle_t *readHandle,
- uint8_t *buffer,
- uint32_t length)
-{
- serial_manager_status_t status = kStatus_SerialManager_Error;
-
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
- if (kSerialPort_Uart == handle->type) /* Serial port UART */
- {
- status = Serial_UartRead(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), buffer, length);
- }
- else
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
- if (kSerialPort_UsbCdc == handle->type) /* Serial port UsbCdc */
- {
- status = Serial_UsbCdcRead(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), buffer, length);
- }
- else
-#endif
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
- if (kSerialPort_Swo == handle->type) /* Serial port SWO */
- {
- status = Serial_SwoRead(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), buffer, length);
- }
- else
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
- if (kSerialPort_UsbCdcVirtual == handle->type) /* Serial port UsbCdcVirtual */
- {
- status = Serial_UsbCdcVirtualRead(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), buffer, length);
- }
-#endif
- {
- /*MISRA rule*/
- }
- return status;
-}
-#endif /*SERIAL_MANAGER_NON_BLOCKING_MODE > 0U*/
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-static void SerialManager_IsrFunction(serial_manager_handle_t *handle)
-{
- uint32_t regPrimask = DisableGlobalIRQ();
- switch (handle->type)
- {
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
- case kSerialPort_Uart:
- Serial_UartIsrFunction(((serial_handle_t)&handle->lowLevelhandleBuffer[0]));
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
- case kSerialPort_UsbCdc:
- Serial_UsbCdcIsrFunction(((serial_handle_t)&handle->lowLevelhandleBuffer[0]));
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
- case kSerialPort_Swo:
- Serial_SwoIsrFunction(((serial_handle_t)&handle->lowLevelhandleBuffer[0]));
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
- case kSerialPort_UsbCdcVirtual:
- Serial_UsbCdcVirtualIsrFunction(((serial_handle_t)&handle->lowLevelhandleBuffer[0]));
- break;
-#endif
- default:
- /*MISRA rule 16.4*/
- break;
- }
- EnableGlobalIRQ(regPrimask);
-}
-
-static void SerialManager_Task(void *param)
-{
- serial_manager_handle_t *handle = (serial_manager_handle_t *)param;
- serial_manager_write_handle_t *serialWriteHandle;
- serial_manager_read_handle_t *serialReadHandle;
- uint32_t primask;
- serial_manager_callback_message_t msg;
-
- if (NULL != handle)
- {
-#if defined(OSA_USED)
-
-#if (defined(SERIAL_MANAGER_USE_COMMON_TASK) && (SERIAL_MANAGER_USE_COMMON_TASK > 0U))
-#else
- osa_event_flags_t ev = 0;
-
- do
- {
- if (KOSA_StatusSuccess ==
- OSA_EventWait((osa_event_handle_t)handle->event, osaEventFlagsAll_c, false, osaWaitForever_c, &ev))
- {
- if (ev & SERIAL_EVENT_DATA_SENT)
-#endif
-
-#endif
- {
- serialWriteHandle =
- (serial_manager_write_handle_t *)(void *)LIST_GetHead(&handle->completedWriteHandleHead);
- while (NULL != serialWriteHandle)
- {
- SerialManager_RemoveHead(&handle->completedWriteHandleHead);
- msg.buffer = serialWriteHandle->transfer.buffer;
- msg.length = serialWriteHandle->transfer.soFar;
- serialWriteHandle->transfer.buffer = NULL;
- if (NULL != serialWriteHandle->callback)
- {
- serialWriteHandle->callback(serialWriteHandle->callbackParam, &msg,
- serialWriteHandle->transfer.status);
- }
- serialWriteHandle =
- (serial_manager_write_handle_t *)(void *)LIST_GetHead(&handle->completedWriteHandleHead);
- }
- }
-#if defined(OSA_USED)
-
-#if (defined(SERIAL_MANAGER_USE_COMMON_TASK) && (SERIAL_MANAGER_USE_COMMON_TASK > 0U))
-#else
- if (ev & SERIAL_EVENT_DATA_RECEIVED)
-#endif
-
-#endif
- {
- primask = DisableGlobalIRQ();
- serialReadHandle = handle->openedReadHandleHead;
- EnableGlobalIRQ(primask);
-
- if (NULL != serialReadHandle)
- {
- if (NULL != serialReadHandle->transfer.buffer)
- {
- if (serialReadHandle->transfer.soFar >= serialReadHandle->transfer.length)
- {
- msg.buffer = serialReadHandle->transfer.buffer;
- msg.length = serialReadHandle->transfer.soFar;
- serialReadHandle->transfer.buffer = NULL;
- if (NULL != serialReadHandle->callback)
- {
- serialReadHandle->callback(serialReadHandle->callbackParam, &msg,
- serialReadHandle->transfer.status);
- }
- }
- }
- }
- }
-#if defined(OSA_USED)
-
-#if (defined(SERIAL_MANAGER_USE_COMMON_TASK) && (SERIAL_MANAGER_USE_COMMON_TASK > 0U))
-#else
- }
- } while (gUseRtos_c);
-#endif
-
-#endif
- }
-}
-#endif
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-static void SerialManager_TxCallback(void *callbackParam,
- serial_manager_callback_message_t *message,
- serial_manager_status_t status)
-{
- serial_manager_handle_t *handle;
- serial_manager_write_handle_t *writeHandle;
-
- assert(callbackParam);
- assert(message);
-
- handle = (serial_manager_handle_t *)callbackParam;
-
- writeHandle = (serial_manager_write_handle_t *)(void *)LIST_GetHead(&handle->runningWriteHandleHead);
-
- if (NULL != writeHandle)
- {
- SerialManager_RemoveHead(&handle->runningWriteHandleHead);
- (void)SerialManager_StartWriting(handle);
- writeHandle->transfer.soFar = message->length;
- writeHandle->transfer.status = status;
- if (kSerialManager_TransmissionNonBlocking == writeHandle->transfer.mode)
- {
- SerialManager_AddTail(&handle->completedWriteHandleHead, writeHandle);
-#if defined(OSA_USED)
-
-#if (defined(SERIAL_MANAGER_USE_COMMON_TASK) && (SERIAL_MANAGER_USE_COMMON_TASK > 0U))
- handle->commontaskMsg.callback = SerialManager_Task;
- handle->commontaskMsg.callbackParam = handle;
- COMMON_TASK_post_message(&handle->commontaskMsg);
-#else
- (void)OSA_EventSet((osa_event_handle_t)handle->event, SERIAL_EVENT_DATA_SENT);
-#endif
-
-#else
- SerialManager_Task(handle);
-#endif
- }
- else
- {
- writeHandle->transfer.buffer = NULL;
- }
- }
-}
-
-static void SerialManager_RxCallback(void *callbackParam,
- serial_manager_callback_message_t *message,
- serial_manager_status_t status)
-{
- serial_manager_handle_t *handle;
- uint32_t ringBufferLength;
- uint32_t primask;
-
- assert(callbackParam);
- assert(message);
-
- handle = (serial_manager_handle_t *)callbackParam;
-
- status = kStatus_SerialManager_Notify;
-
- for (uint32_t i = 0; i < message->length; i++)
- {
- handle->ringBuffer.ringBuffer[handle->ringBuffer.ringHead++] = message->buffer[i];
- if (handle->ringBuffer.ringHead >= handle->ringBuffer.ringBufferSize)
- {
- handle->ringBuffer.ringHead = 0U;
- }
- if (handle->ringBuffer.ringHead == handle->ringBuffer.ringTail)
- {
- status = kStatus_SerialManager_RingBufferOverflow;
- handle->ringBuffer.ringTail++;
- if (handle->ringBuffer.ringTail >= handle->ringBuffer.ringBufferSize)
- {
- handle->ringBuffer.ringTail = 0U;
- }
- }
- }
-
- ringBufferLength = handle->ringBuffer.ringHead + handle->ringBuffer.ringBufferSize - handle->ringBuffer.ringTail;
- ringBufferLength = ringBufferLength % handle->ringBuffer.ringBufferSize;
-
- primask = DisableGlobalIRQ();
- if ((NULL != handle->openedReadHandleHead) && (NULL != handle->openedReadHandleHead->transfer.buffer))
- {
- if (handle->openedReadHandleHead->transfer.length > handle->openedReadHandleHead->transfer.soFar)
- {
- uint32_t remainLength =
- handle->openedReadHandleHead->transfer.length - handle->openedReadHandleHead->transfer.soFar;
- for (uint32_t i = 0; i < MIN(ringBufferLength, remainLength); i++)
- {
- handle->openedReadHandleHead->transfer.buffer[handle->openedReadHandleHead->transfer.soFar] =
- handle->ringBuffer.ringBuffer[handle->ringBuffer.ringTail];
- handle->ringBuffer.ringTail++;
- handle->openedReadHandleHead->transfer.soFar++;
- if (handle->ringBuffer.ringTail >= handle->ringBuffer.ringBufferSize)
- {
- handle->ringBuffer.ringTail = 0U;
- }
- }
- ringBufferLength = ringBufferLength - MIN(ringBufferLength, remainLength);
- }
-
- if (handle->openedReadHandleHead->transfer.length > handle->openedReadHandleHead->transfer.soFar)
- {
- }
- else
- {
- if (kSerialManager_TransmissionBlocking == handle->openedReadHandleHead->transfer.mode)
- {
- handle->openedReadHandleHead->transfer.buffer = NULL;
- }
- else
- {
- handle->openedReadHandleHead->transfer.status = kStatus_SerialManager_Success;
-
-#if defined(OSA_USED)
-
-#if (defined(SERIAL_MANAGER_USE_COMMON_TASK) && (SERIAL_MANAGER_USE_COMMON_TASK > 0U))
- handle->commontaskMsg.callback = SerialManager_Task;
- handle->commontaskMsg.callbackParam = handle;
- COMMON_TASK_post_message(&handle->commontaskMsg);
-#else
- (void)OSA_EventSet((osa_event_handle_t)handle->event, SERIAL_EVENT_DATA_RECEIVED);
-#endif
-
-#else
- SerialManager_Task(handle);
-#endif
- }
- }
- }
-
- if (0U != ringBufferLength)
- {
- message->buffer = NULL;
- message->length = ringBufferLength;
- if ((NULL != handle->openedReadHandleHead) && (NULL != handle->openedReadHandleHead->callback))
- {
- handle->openedReadHandleHead->callback(handle->openedReadHandleHead->callbackParam, message, status);
- }
- }
-
- ringBufferLength = handle->ringBuffer.ringBufferSize - 1U - ringBufferLength;
-
- if (NULL != handle->openedReadHandleHead)
- {
- (void)SerialManager_StartReading(handle, handle->openedReadHandleHead, NULL, ringBufferLength);
- }
- EnableGlobalIRQ(primask);
-}
-
-static serial_manager_status_t SerialManager_Write(serial_write_handle_t writeHandle,
- uint8_t *buffer,
- uint32_t length,
- serial_manager_transmission_mode_t mode)
-{
- serial_manager_write_handle_t *serialWriteHandle;
- serial_manager_handle_t *handle;
- serial_manager_status_t status = kStatus_SerialManager_Success;
- uint32_t primask;
- uint8_t isEmpty = 0U;
-
- assert(writeHandle);
- assert(buffer);
- assert(length);
-
- serialWriteHandle = (serial_manager_write_handle_t *)writeHandle;
- handle = serialWriteHandle->serialManagerHandle;
-
- assert(handle);
- assert(SERIAL_MANAGER_WRITE_TAG == serialWriteHandle->tag);
- assert(!((kSerialManager_TransmissionNonBlocking == mode) && (NULL == serialWriteHandle->callback)));
-
- primask = DisableGlobalIRQ();
- if (NULL != serialWriteHandle->transfer.buffer)
- {
- EnableGlobalIRQ(primask);
- return kStatus_SerialManager_Busy;
- }
- serialWriteHandle->transfer.buffer = buffer;
- serialWriteHandle->transfer.length = length;
- serialWriteHandle->transfer.soFar = 0U;
- serialWriteHandle->transfer.mode = mode;
-
- if (NULL == LIST_GetHead(&handle->runningWriteHandleHead))
- {
- isEmpty = 1U;
- }
- SerialManager_AddTail(&handle->runningWriteHandleHead, serialWriteHandle);
- EnableGlobalIRQ(primask);
-
- if (0U != isEmpty)
- {
- status = SerialManager_StartWriting(handle);
- if ((serial_manager_status_t)kStatus_SerialManager_Success != status)
- {
-#if (USB_CDC_SERIAL_MANAGER_RUN_NO_HOST == 1)
- if (status == kStatus_SerialManager_NotConnected)
- {
- SerialManager_RemoveHead(&handle->runningWriteHandleHead);
- serialWriteHandle->transfer.buffer = 0;
- serialWriteHandle->transfer.length = 0;
- }
-#endif /* USB_CDC_SERIAL_MANAGER_RUN_NO_HOST == 1 */
- return status;
- }
- }
-
- if (kSerialManager_TransmissionBlocking == mode)
- {
- while (serialWriteHandle->transfer.length > serialWriteHandle->transfer.soFar)
- {
-#if defined(__GIC_PRIO_BITS)
- if (0x13 == (__get_CPSR() & CPSR_M_Msk))
-#else
- if (0U != __get_IPSR())
-#endif
- {
- SerialManager_IsrFunction(handle);
- }
- }
- }
- return kStatus_SerialManager_Success;
-}
-
-static serial_manager_status_t SerialManager_Read(serial_read_handle_t readHandle,
- uint8_t *buffer,
- uint32_t length,
- serial_manager_transmission_mode_t mode,
- uint32_t *receivedLength)
-{
- serial_manager_read_handle_t *serialReadHandle;
- serial_manager_handle_t *handle;
- uint32_t dataLength;
- uint32_t primask;
-
- assert(readHandle);
- assert(buffer);
- assert(length);
-
- serialReadHandle = (serial_manager_read_handle_t *)readHandle;
- handle = serialReadHandle->serialManagerHandle;
-
- assert(handle);
- assert(SERIAL_MANAGER_READ_TAG == serialReadHandle->tag);
- assert(!((kSerialManager_TransmissionNonBlocking == mode) && (NULL == serialReadHandle->callback)));
-
- primask = DisableGlobalIRQ();
- if (NULL != serialReadHandle->transfer.buffer)
- {
- EnableGlobalIRQ(primask);
- return kStatus_SerialManager_Busy;
- }
- serialReadHandle->transfer.buffer = buffer;
- serialReadHandle->transfer.length = length;
- serialReadHandle->transfer.soFar = 0U;
- serialReadHandle->transfer.mode = mode;
-
- dataLength = handle->ringBuffer.ringHead + handle->ringBuffer.ringBufferSize - handle->ringBuffer.ringTail;
- dataLength = dataLength % handle->ringBuffer.ringBufferSize;
-
- for (serialReadHandle->transfer.soFar = 0U; serialReadHandle->transfer.soFar < MIN(dataLength, length);
- serialReadHandle->transfer.soFar++)
- {
- buffer[serialReadHandle->transfer.soFar] = handle->ringBuffer.ringBuffer[handle->ringBuffer.ringTail];
- handle->ringBuffer.ringTail++;
- if (handle->ringBuffer.ringTail >= handle->ringBuffer.ringBufferSize)
- {
- handle->ringBuffer.ringTail = 0U;
- }
- }
-
- dataLength = handle->ringBuffer.ringHead + handle->ringBuffer.ringBufferSize - handle->ringBuffer.ringTail;
- dataLength = dataLength % handle->ringBuffer.ringBufferSize;
- dataLength = handle->ringBuffer.ringBufferSize - 1U - dataLength;
-
- (void)SerialManager_StartReading(handle, readHandle, NULL, dataLength);
-
- if (NULL != receivedLength)
- {
- *receivedLength = serialReadHandle->transfer.soFar;
- serialReadHandle->transfer.buffer = NULL;
- EnableGlobalIRQ(primask);
- }
- else
- {
- if (serialReadHandle->transfer.soFar >= serialReadHandle->transfer.length)
- {
- serialReadHandle->transfer.buffer = NULL;
- EnableGlobalIRQ(primask);
- if (kSerialManager_TransmissionNonBlocking == mode)
- {
- if (NULL != serialReadHandle->callback)
- {
- serial_manager_callback_message_t msg;
- msg.buffer = buffer;
- msg.length = serialReadHandle->transfer.soFar;
- serialReadHandle->callback(serialReadHandle->callbackParam, &msg, kStatus_SerialManager_Success);
- }
- }
- }
- else
- {
- EnableGlobalIRQ(primask);
- }
-
- if (kSerialManager_TransmissionBlocking == mode)
- {
- while (serialReadHandle->transfer.length > serialReadHandle->transfer.soFar)
- {
- }
- }
- }
-
- return kStatus_SerialManager_Success;
-}
-
-#else
-
-static serial_manager_status_t SerialManager_Write(serial_write_handle_t writeHandle, uint8_t *buffer, uint32_t length)
-{
- serial_manager_write_handle_t *serialWriteHandle;
- serial_manager_handle_t *handle;
-
- assert(writeHandle);
- assert(buffer);
- assert(length);
-
- serialWriteHandle = (serial_manager_write_handle_t *)writeHandle;
- handle = serialWriteHandle->serialManagerHandle;
-
- assert(handle);
-
- return SerialManager_StartWriting(handle, serialWriteHandle, buffer, length);
-}
-
-static serial_manager_status_t SerialManager_Read(serial_read_handle_t readHandle, uint8_t *buffer, uint32_t length)
-{
- serial_manager_read_handle_t *serialReadHandle;
- serial_manager_handle_t *handle;
-
- assert(readHandle);
- assert(buffer);
- assert(length);
-
- serialReadHandle = (serial_manager_read_handle_t *)readHandle;
- handle = serialReadHandle->serialManagerHandle;
-
- assert(handle);
-
- return SerialManager_StartReading(handle, serialReadHandle, buffer, length);
-}
-#endif
-
-serial_manager_status_t SerialManager_Init(serial_handle_t serialHandle, serial_manager_config_t *config)
-{
- serial_manager_handle_t *handle;
- serial_manager_status_t status = kStatus_SerialManager_Error;
-
- assert(config);
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- assert(config->ringBuffer);
- assert(config->ringBufferSize);
-#endif
- assert(serialHandle);
- assert(SERIAL_MANAGER_HANDLE_SIZE >= sizeof(serial_manager_handle_t));
-
- handle = (serial_manager_handle_t *)serialHandle;
-
- (void)memset(handle, 0, SERIAL_MANAGER_HANDLE_SIZE);
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-
-#if defined(OSA_USED)
-
-#if (defined(SERIAL_MANAGER_USE_COMMON_TASK) && (SERIAL_MANAGER_USE_COMMON_TASK > 0U))
-
- COMMON_TASK_init();
-
-#else
- if (KOSA_StatusSuccess != OSA_EventCreate((osa_event_handle_t)handle->event, true))
- {
- return kStatus_SerialManager_Error;
- }
-
- if (KOSA_StatusSuccess != OSA_TaskCreate((osa_task_handle_t)handle->taskId, OSA_TASK(SerialManager_Task), handle))
- {
- return kStatus_SerialManager_Error;
- }
-#endif
-
-#endif
-
-#endif
-
- handle->type = config->type;
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- handle->ringBuffer.ringBuffer = config->ringBuffer;
- handle->ringBuffer.ringBufferSize = config->ringBufferSize;
-#endif
-
- switch (config->type)
- {
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
- case kSerialPort_Uart:
- status = Serial_UartInit(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), config->portConfig);
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- if ((serial_manager_status_t)kStatus_SerialManager_Success == status)
- {
- status = Serial_UartInstallTxCallback(((serial_handle_t)&handle->lowLevelhandleBuffer[0]),
- SerialManager_TxCallback, handle);
- if ((serial_manager_status_t)kStatus_SerialManager_Success == status)
- {
- status = Serial_UartInstallRxCallback(((serial_handle_t)&handle->lowLevelhandleBuffer[0]),
- SerialManager_RxCallback, handle);
- }
- }
-#endif
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
- case kSerialPort_UsbCdc:
- status = Serial_UsbCdcInit(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), config->portConfig);
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- if (kStatus_SerialManager_Success == status)
- {
- status = Serial_UsbCdcInstallTxCallback(((serial_handle_t)&handle->lowLevelhandleBuffer[0]),
- SerialManager_TxCallback, handle);
- if (kStatus_SerialManager_Success == status)
- {
- status = Serial_UsbCdcInstallRxCallback(((serial_handle_t)&handle->lowLevelhandleBuffer[0]),
- SerialManager_RxCallback, handle);
- }
- }
-#endif
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
- case kSerialPort_Swo:
- status = Serial_SwoInit(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), config->portConfig);
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- if (kStatus_SerialManager_Success == status)
- {
- status = Serial_SwoInstallTxCallback(((serial_handle_t)&handle->lowLevelhandleBuffer[0]),
- SerialManager_TxCallback, handle);
- }
-#endif
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
- case kSerialPort_UsbCdcVirtual:
- status = Serial_UsbCdcVirtualInit(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), config->portConfig);
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- if (kStatus_SerialManager_Success == status)
- {
- status = Serial_UsbCdcVirtualInstallTxCallback(((serial_handle_t)&handle->lowLevelhandleBuffer[0]),
- SerialManager_TxCallback, handle);
- if (kStatus_SerialManager_Success == status)
- {
- status = Serial_UsbCdcVirtualInstallRxCallback(((serial_handle_t)&handle->lowLevelhandleBuffer[0]),
- SerialManager_RxCallback, handle);
- }
- }
-#endif
- break;
-#endif
- default:
- /*MISRA rule 16.4*/
- break;
- }
-
- return status;
-}
-
-serial_manager_status_t SerialManager_Deinit(serial_handle_t serialHandle)
-{
- serial_manager_handle_t *handle;
- uint32_t primask;
-
- assert(serialHandle);
-
- handle = (serial_manager_handle_t *)serialHandle;
-
- primask = DisableGlobalIRQ();
- if ((NULL != handle->openedReadHandleHead) || (0U != handle->openedWriteHandleCount))
- {
- EnableGlobalIRQ(primask);
- return kStatus_SerialManager_Busy;
- }
- EnableGlobalIRQ(primask);
-
- switch (handle->type)
- {
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
- case kSerialPort_Uart:
- (void)Serial_UartDeinit(((serial_handle_t)&handle->lowLevelhandleBuffer[0]));
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
- case kSerialPort_UsbCdc:
- (void)Serial_UsbCdcDeinit(((serial_handle_t)&handle->lowLevelhandleBuffer[0]));
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
- case kSerialPort_Swo:
- (void)Serial_SwoDeinit(((serial_handle_t)&handle->lowLevelhandleBuffer[0]));
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
- case kSerialPort_UsbCdcVirtual:
- (void)Serial_UsbCdcVirtualDeinit(((serial_handle_t)&handle->lowLevelhandleBuffer[0]));
- break;
-#endif
- default:
- /*MISRA rule 16.4*/
- break;
- }
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-
-#if defined(OSA_USED)
-
-#if (defined(SERIAL_MANAGER_USE_COMMON_TASK) && (SERIAL_MANAGER_USE_COMMON_TASK > 0U))
-#else
- OSA_EventDestroy((osa_event_handle_t)handle->event);
- OSA_TaskDestroy((osa_task_handle_t)handle->taskId);
-#endif
-
-#endif
-
-#endif
-
- return kStatus_SerialManager_Success;
-}
-
-serial_manager_status_t SerialManager_OpenWriteHandle(serial_handle_t serialHandle, serial_write_handle_t writeHandle)
-{
- serial_manager_handle_t *handle;
- serial_manager_write_handle_t *serialWriteHandle;
- uint32_t primask;
-
- assert(serialHandle);
- assert(writeHandle);
- assert(SERIAL_MANAGER_WRITE_HANDLE_SIZE >= sizeof(serial_manager_write_handle_t));
-
- handle = (serial_manager_handle_t *)serialHandle;
- serialWriteHandle = (serial_manager_write_handle_t *)writeHandle;
-
- (void)memset(writeHandle, 0, SERIAL_MANAGER_WRITE_HANDLE_SIZE);
-
- primask = DisableGlobalIRQ();
- handle->openedWriteHandleCount++;
- EnableGlobalIRQ(primask);
-
- serialWriteHandle->serialManagerHandle = handle;
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- serialWriteHandle->tag = SERIAL_MANAGER_WRITE_TAG;
-#endif
-
- return kStatus_SerialManager_Success;
-}
-
-serial_manager_status_t SerialManager_CloseWriteHandle(serial_write_handle_t writeHandle)
-{
- serial_manager_handle_t *handle;
- serial_manager_write_handle_t *serialWriteHandle;
- uint32_t primask;
-
- assert(writeHandle);
-
- serialWriteHandle = (serial_manager_write_handle_t *)writeHandle;
- handle = (serial_manager_handle_t *)(void *)serialWriteHandle->serialManagerHandle;
-
- assert(handle);
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- assert(SERIAL_MANAGER_WRITE_TAG == serialWriteHandle->tag);
-#endif
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- (void)SerialManager_CancelWriting(writeHandle);
-#endif
- primask = DisableGlobalIRQ();
- if (handle->openedWriteHandleCount > 0U)
- {
- handle->openedWriteHandleCount--;
- }
- EnableGlobalIRQ(primask);
-
- (void)memset(writeHandle, 0, SERIAL_MANAGER_WRITE_HANDLE_SIZE);
-
- return kStatus_SerialManager_Success;
-}
-
-serial_manager_status_t SerialManager_OpenReadHandle(serial_handle_t serialHandle, serial_read_handle_t readHandle)
-{
- serial_manager_handle_t *handle;
- serial_manager_read_handle_t *serialReadHandle;
- uint32_t primask;
-
- assert(serialHandle);
- assert(readHandle);
- assert(SERIAL_MANAGER_READ_HANDLE_SIZE >= sizeof(serial_manager_read_handle_t));
-
- handle = (serial_manager_handle_t *)serialHandle;
- serialReadHandle = (serial_manager_read_handle_t *)readHandle;
-
- primask = DisableGlobalIRQ();
- if (handle->openedReadHandleHead != NULL)
- {
- EnableGlobalIRQ(primask);
- return kStatus_SerialManager_Busy;
- }
- handle->openedReadHandleHead = serialReadHandle;
- EnableGlobalIRQ(primask);
-
- (void)memset(readHandle, 0, SERIAL_MANAGER_READ_HANDLE_SIZE);
-
- serialReadHandle->serialManagerHandle = handle;
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- serialReadHandle->tag = SERIAL_MANAGER_READ_TAG;
-#endif
-
- return kStatus_SerialManager_Success;
-}
-
-serial_manager_status_t SerialManager_CloseReadHandle(serial_read_handle_t readHandle)
-{
- serial_manager_handle_t *handle;
- serial_manager_read_handle_t *serialReadHandle;
- uint32_t primask;
-
- assert(readHandle);
-
- serialReadHandle = (serial_manager_read_handle_t *)readHandle;
- handle = (serial_manager_handle_t *)(void *)serialReadHandle->serialManagerHandle;
-
- assert(handle && (handle->openedReadHandleHead == serialReadHandle));
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- assert(SERIAL_MANAGER_READ_TAG == serialReadHandle->tag);
-#endif
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- (void)SerialManager_CancelReading(readHandle);
-#endif
-
- primask = DisableGlobalIRQ();
- handle->openedReadHandleHead = NULL;
- EnableGlobalIRQ(primask);
-
- (void)memset(readHandle, 0, SERIAL_MANAGER_READ_HANDLE_SIZE);
-
- return kStatus_SerialManager_Success;
-}
-
-serial_manager_status_t SerialManager_WriteBlocking(serial_write_handle_t writeHandle, uint8_t *buffer, uint32_t length)
-{
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- return SerialManager_Write(writeHandle, buffer, length, kSerialManager_TransmissionBlocking);
-#else
- return SerialManager_Write(writeHandle, buffer, length);
-#endif
-}
-
-serial_manager_status_t SerialManager_ReadBlocking(serial_read_handle_t readHandle, uint8_t *buffer, uint32_t length)
-{
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- return SerialManager_Read(readHandle, buffer, length, kSerialManager_TransmissionBlocking, NULL);
-#else
- return SerialManager_Read(readHandle, buffer, length);
-#endif
-}
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-serial_manager_status_t SerialManager_WriteNonBlocking(serial_write_handle_t writeHandle,
- uint8_t *buffer,
- uint32_t length)
-{
- return SerialManager_Write(writeHandle, buffer, length, kSerialManager_TransmissionNonBlocking);
-}
-
-serial_manager_status_t SerialManager_ReadNonBlocking(serial_read_handle_t readHandle, uint8_t *buffer, uint32_t length)
-{
- return SerialManager_Read(readHandle, buffer, length, kSerialManager_TransmissionNonBlocking, NULL);
-}
-
-serial_manager_status_t SerialManager_CancelWriting(serial_write_handle_t writeHandle)
-{
- serial_manager_write_handle_t *serialWriteHandle;
- uint32_t primask;
- uint8_t isNotUsed = 0;
-
- assert(writeHandle);
-
- serialWriteHandle = (serial_manager_write_handle_t *)writeHandle;
-
- assert(serialWriteHandle->serialManagerHandle);
- assert(SERIAL_MANAGER_WRITE_TAG == serialWriteHandle->tag);
-
- if ((NULL != serialWriteHandle->transfer.buffer) &&
- (kSerialManager_TransmissionBlocking == serialWriteHandle->transfer.mode))
- {
- return kStatus_SerialManager_Error;
- }
-
- primask = DisableGlobalIRQ();
- if (serialWriteHandle != (serial_manager_write_handle_t *)(void *)LIST_GetHead(
- &serialWriteHandle->serialManagerHandle->runningWriteHandleHead))
- {
- (void)LIST_RemoveElement(&serialWriteHandle->link);
- isNotUsed = 1;
- }
- EnableGlobalIRQ(primask);
-
- if (0U != isNotUsed)
- {
- serialWriteHandle->transfer.soFar = 0;
- serialWriteHandle->transfer.status = kStatus_SerialManager_Canceled;
-
- SerialManager_AddTail(&serialWriteHandle->serialManagerHandle->completedWriteHandleHead, serialWriteHandle);
-#if defined(OSA_USED)
-
-#if (defined(SERIAL_MANAGER_USE_COMMON_TASK) && (SERIAL_MANAGER_USE_COMMON_TASK > 0U))
- serialWriteHandle->serialManagerHandle->commontaskMsg.callback = SerialManager_Task;
- serialWriteHandle->serialManagerHandle->commontaskMsg.callbackParam = serialWriteHandle->serialManagerHandle;
- COMMON_TASK_post_message(&serialWriteHandle->serialManagerHandle->commontaskMsg);
-#else
- (void)OSA_EventSet((osa_event_handle_t)serialWriteHandle->serialManagerHandle->event, SERIAL_EVENT_DATA_SENT);
-#endif
-
-#else
- SerialManager_Task(serialWriteHandle->serialManagerHandle);
-#endif
- }
- else
- {
- switch (serialWriteHandle->serialManagerHandle->type)
- {
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
- case kSerialPort_Uart:
- (void)Serial_UartCancelWrite(
- ((serial_handle_t)&serialWriteHandle->serialManagerHandle->lowLevelhandleBuffer[0]));
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
- case kSerialPort_UsbCdc:
- (void)Serial_UsbCdcCancelWrite(
- ((serial_handle_t)&serialWriteHandle->serialManagerHandle->lowLevelhandleBuffer[0]));
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
- case kSerialPort_Swo:
- (void)Serial_SwoCancelWrite(
- ((serial_handle_t)&serialWriteHandle->serialManagerHandle->lowLevelhandleBuffer[0]));
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
- case kSerialPort_UsbCdcVirtual:
- (void)Serial_UsbCdcVirtualCancelWrite(
- ((serial_handle_t)&serialWriteHandle->serialManagerHandle->lowLevelhandleBuffer[0]));
- break;
-#endif
- default:
- /*MISRA rule 16.4*/
- break;
- }
- }
-
- (void)SerialManager_StartWriting(serialWriteHandle->serialManagerHandle);
-
- return kStatus_SerialManager_Success;
-}
-
-serial_manager_status_t SerialManager_CancelReading(serial_read_handle_t readHandle)
-{
- serial_manager_read_handle_t *serialReadHandle;
- serial_manager_callback_message_t msg;
- uint8_t *buffer;
- uint32_t primask;
-
- assert(readHandle);
-
- serialReadHandle = (serial_manager_read_handle_t *)readHandle;
-
- assert(SERIAL_MANAGER_READ_TAG == serialReadHandle->tag);
-
- if ((NULL != serialReadHandle->transfer.buffer) &&
- (kSerialManager_TransmissionBlocking == serialReadHandle->transfer.mode))
- {
- return kStatus_SerialManager_Error;
- }
-
- primask = DisableGlobalIRQ();
- buffer = serialReadHandle->transfer.buffer;
- serialReadHandle->transfer.buffer = NULL;
- serialReadHandle->transfer.length = 0;
- msg.buffer = buffer;
- msg.length = serialReadHandle->transfer.soFar;
- EnableGlobalIRQ(primask);
-
- if (NULL != buffer)
- {
- if (NULL != serialReadHandle->callback)
- {
- serialReadHandle->callback(serialReadHandle->callbackParam, &msg, kStatus_SerialManager_Canceled);
- }
- }
- return kStatus_SerialManager_Success;
-}
-
-serial_manager_status_t SerialManager_TryRead(serial_read_handle_t readHandle,
- uint8_t *buffer,
- uint32_t length,
- uint32_t *receivedLength)
-{
- assert(receivedLength);
-
- return SerialManager_Read(readHandle, buffer, length, kSerialManager_TransmissionBlocking, receivedLength);
-}
-
-serial_manager_status_t SerialManager_InstallTxCallback(serial_write_handle_t writeHandle,
- serial_manager_callback_t callback,
- void *callbackParam)
-{
- serial_manager_write_handle_t *serialWriteHandle;
-
- assert(writeHandle);
-
- serialWriteHandle = (serial_manager_write_handle_t *)writeHandle;
-
- assert(SERIAL_MANAGER_WRITE_TAG == serialWriteHandle->tag);
-
- serialWriteHandle->callbackParam = callbackParam;
- serialWriteHandle->callback = callback;
-
- return kStatus_SerialManager_Success;
-}
-
-serial_manager_status_t SerialManager_InstallRxCallback(serial_read_handle_t readHandle,
- serial_manager_callback_t callback,
- void *callbackParam)
-{
- serial_manager_read_handle_t *serialReadHandle;
-
- assert(readHandle);
-
- serialReadHandle = (serial_manager_read_handle_t *)readHandle;
-
- assert(SERIAL_MANAGER_READ_TAG == serialReadHandle->tag);
-
- serialReadHandle->callbackParam = callbackParam;
- serialReadHandle->callback = callback;
-
- return kStatus_SerialManager_Success;
-}
-#endif
-
-serial_manager_status_t SerialManager_EnterLowpower(serial_handle_t serialHandle)
-{
- serial_manager_handle_t *handle;
- serial_manager_status_t status = kStatus_SerialManager_Error;
-
- assert(serialHandle);
-
- handle = (serial_manager_handle_t *)serialHandle;
-
- switch (handle->type)
- {
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
- case kSerialPort_Uart:
- status = Serial_UartEnterLowpower(((serial_handle_t)&handle->lowLevelhandleBuffer[0]));
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
- case kSerialPort_UsbCdc:
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
- case kSerialPort_Swo:
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
- case kSerialPort_UsbCdcVirtual:
- break;
-#endif
- default:
- /*MISRA rule 16.4*/
- break;
- }
- return status;
-}
-
-serial_manager_status_t SerialManager_ExitLowpower(serial_handle_t serialHandle)
-{
- serial_manager_handle_t *handle;
- serial_manager_status_t status = kStatus_SerialManager_Error;
-
- assert(serialHandle);
-
- handle = (serial_manager_handle_t *)serialHandle;
-
- switch (handle->type)
- {
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
- case kSerialPort_Uart:
- status = Serial_UartExitLowpower(((serial_handle_t)&handle->lowLevelhandleBuffer[0]));
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
- case kSerialPort_UsbCdc:
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
- case kSerialPort_Swo:
- break;
-#endif
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
- case kSerialPort_UsbCdcVirtual:
- break;
-#endif
- default:
- /*MISRA rule 16.4*/
- break;
- }
- return status;
-}
diff --git a/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_manager.h b/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_manager.h
deleted file mode 100755
index 888ec374f6..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_manager.h
+++ /dev/null
@@ -1,648 +0,0 @@
-/*
- * Copyright 2018-2020 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef __SERIAL_MANAGER_H__
-#define __SERIAL_MANAGER_H__
-
-/*!
- * @addtogroup serialmanager
- * @{
- */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-/*! @brief Enable or disable serial manager non-blocking mode (1 - enable, 0 - disable) */
-#ifdef DEBUG_CONSOLE_TRANSFER_NON_BLOCKING
-#ifndef SERIAL_MANAGER_NON_BLOCKING_MODE
-#define SERIAL_MANAGER_NON_BLOCKING_MODE (1U)
-#endif
-#else
-#ifndef SERIAL_MANAGER_NON_BLOCKING_MODE
-#define SERIAL_MANAGER_NON_BLOCKING_MODE (0U)
-#endif
-#endif
-
-/*! @brief Enable or disable uart port (1 - enable, 0 - disable) */
-#ifndef SERIAL_PORT_TYPE_UART
-#define SERIAL_PORT_TYPE_UART (0U)
-#endif
-
-/*! @brief Enable or disable USB CDC port (1 - enable, 0 - disable) */
-#ifndef SERIAL_PORT_TYPE_USBCDC
-#define SERIAL_PORT_TYPE_USBCDC (0U)
-#endif
-
-/*! @brief Enable or disable SWO port (1 - enable, 0 - disable) */
-#ifndef SERIAL_PORT_TYPE_SWO
-#define SERIAL_PORT_TYPE_SWO (0U)
-#endif
-
-/*! @brief Enable or disable USB CDC virtual port (1 - enable, 0 - disable) */
-#ifndef SERIAL_PORT_TYPE_USBCDC_VIRTUAL
-#define SERIAL_PORT_TYPE_USBCDC_VIRTUAL (0U)
-#endif
-
-/*! @brief Set serial manager write handle size */
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-#define SERIAL_MANAGER_WRITE_HANDLE_SIZE (44U)
-#define SERIAL_MANAGER_READ_HANDLE_SIZE (44U)
-#else
-#define SERIAL_MANAGER_WRITE_HANDLE_SIZE (4U)
-#define SERIAL_MANAGER_READ_HANDLE_SIZE (4U)
-#endif
-
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
-#include "serial_port_uart.h"
-#endif
-
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
-
-#if !(defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-#error The serial manager blocking mode cannot be supported for USB CDC.
-#endif
-
-#include "serial_port_usb.h"
-#endif
-
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
-#include "serial_port_swo.h"
-#endif
-
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
-
-#if !(defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-#error The serial manager blocking mode cannot be supported for USB CDC.
-#endif
-
-#include "serial_port_usb_virtual.h"
-#endif
-
-#define SERIAL_MANAGER_HANDLE_SIZE_TEMP 0U
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
-
-#if (SERIAL_PORT_UART_HANDLE_SIZE > SERIAL_MANAGER_HANDLE_SIZE_TEMP)
-#undef SERIAL_MANAGER_HANDLE_SIZE_TEMP
-#define SERIAL_MANAGER_HANDLE_SIZE_TEMP SERIAL_PORT_UART_HANDLE_SIZE
-#endif
-
-#endif
-
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
-
-#if (SERIAL_PORT_USB_CDC_HANDLE_SIZE > SERIAL_MANAGER_HANDLE_SIZE_TEMP)
-#undef SERIAL_MANAGER_HANDLE_SIZE_TEMP
-#define SERIAL_MANAGER_HANDLE_SIZE_TEMP SERIAL_PORT_USB_CDC_HANDLE_SIZE
-#endif
-
-#endif
-
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
-
-#if (SERIAL_PORT_SWO_HANDLE_SIZE > SERIAL_MANAGER_HANDLE_SIZE_TEMP)
-#undef SERIAL_MANAGER_HANDLE_SIZE_TEMP
-#define SERIAL_MANAGER_HANDLE_SIZE_TEMP SERIAL_PORT_SWO_HANDLE_SIZE
-#endif
-
-#endif
-
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
-
-#if (SERIAL_PORT_USB_VIRTUAL_HANDLE_SIZE > SERIAL_MANAGER_HANDLE_SIZE_TEMP)
-#undef SERIAL_MANAGER_HANDLE_SIZE_TEMP
-#define SERIAL_MANAGER_HANDLE_SIZE_TEMP SERIAL_PORT_USB_VIRTUAL_HANDLE_SIZE
-#endif
-
-#endif
-
-/*! @brief SERIAL_PORT_UART_HANDLE_SIZE/SERIAL_PORT_USB_CDC_HANDLE_SIZE + serial manager dedicated size */
-#if ((defined(SERIAL_MANAGER_HANDLE_SIZE_TEMP) && (SERIAL_MANAGER_HANDLE_SIZE_TEMP > 0U)))
-#else
-#error SERIAL_PORT_TYPE_UART, SERIAL_PORT_TYPE_USBCDC, SERIAL_PORT_TYPE_SWO and SERIAL_PORT_TYPE_USBCDC_VIRTUAL should not be cleared at same time.
-#endif
-
-/*! @brief Definition of serial manager handle size. */
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-#define SERIAL_MANAGER_HANDLE_SIZE (SERIAL_MANAGER_HANDLE_SIZE_TEMP + 120U)
-#else
-#define SERIAL_MANAGER_HANDLE_SIZE (SERIAL_MANAGER_HANDLE_SIZE_TEMP + 12U)
-#endif
-
-/*!
- * @brief Defines the serial manager handle
- *
- * This macro is used to define a 4 byte aligned serial manager handle.
- * Then use "(serial_handle_t)name" to get the serial manager handle.
- *
- * The macro should be global and could be optional. You could also define serial manager handle by yourself.
- *
- * This is an example,
- * @code
- * SERIAL_MANAGER_HANDLE_DEFINE(serialManagerHandle);
- * @endcode
- *
- * @param name The name string of the serial manager handle.
- */
-#define SERIAL_MANAGER_HANDLE_DEFINE(name) \
- uint32_t name[((SERIAL_MANAGER_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))]
-
-/*!
- * @brief Defines the serial manager write handle
- *
- * This macro is used to define a 4 byte aligned serial manager write handle.
- * Then use "(serial_write_handle_t)name" to get the serial manager write handle.
- *
- * The macro should be global and could be optional. You could also define serial manager write handle by yourself.
- *
- * This is an example,
- * @code
- * SERIAL_MANAGER_WRITE_HANDLE_DEFINE(serialManagerwriteHandle);
- * @endcode
- *
- * @param name The name string of the serial manager write handle.
- */
-#define SERIAL_MANAGER_WRITE_HANDLE_DEFINE(name) \
- uint32_t name[((SERIAL_MANAGER_WRITE_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))]
-
-/*!
- * @brief Defines the serial manager read handle
- *
- * This macro is used to define a 4 byte aligned serial manager read handle.
- * Then use "(serial_read_handle_t)name" to get the serial manager read handle.
- *
- * The macro should be global and could be optional. You could also define serial manager read handle by yourself.
- *
- * This is an example,
- * @code
- * SERIAL_MANAGER_READ_HANDLE_DEFINE(serialManagerReadHandle);
- * @endcode
- *
- * @param name The name string of the serial manager read handle.
- */
-#define SERIAL_MANAGER_READ_HANDLE_DEFINE(name) \
- uint32_t name[((SERIAL_MANAGER_READ_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))]
-
-/*! @brief Macro to determine whether use common task. */
-#ifndef SERIAL_MANAGER_USE_COMMON_TASK
-#define SERIAL_MANAGER_USE_COMMON_TASK (1U)
-#endif
-
-/*! @brief Macro to set serial manager task priority. */
-#ifndef SERIAL_MANAGER_TASK_PRIORITY
-#define SERIAL_MANAGER_TASK_PRIORITY (2U)
-#endif
-
-/*! @brief Macro to set serial manager task stack size. */
-#ifndef SERIAL_MANAGER_TASK_STACK_SIZE
-#define SERIAL_MANAGER_TASK_STACK_SIZE (1000U)
-#endif
-
-/*! @brief The handle of the serial manager module */
-typedef void *serial_handle_t;
-
-/*! @brief The write handle of the serial manager module */
-typedef void *serial_write_handle_t;
-
-/*! @brief The read handle of the serial manager module */
-typedef void *serial_read_handle_t;
-
-/*! @brief serial port type*/
-typedef enum _serial_port_type
-{
- kSerialPort_Uart = 1U, /*!< Serial port UART */
- kSerialPort_UsbCdc, /*!< Serial port USB CDC */
- kSerialPort_Swo, /*!< Serial port SWO */
- kSerialPort_UsbCdcVirtual, /*!< Serial port USB CDC Virtual */
-} serial_port_type_t;
-
-/*! @brief serial manager config structure*/
-typedef struct _serial_manager_config
-{
-#if defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING)
- uint8_t *ringBuffer; /*!< Ring buffer address, it is used to buffer data received by the hardware.
- Besides, the memory space cannot be free during the lifetime of the serial
- manager module. */
- uint32_t ringBufferSize; /*!< The size of the ring buffer */
-#endif
- serial_port_type_t type; /*!< Serial port type */
- void *portConfig; /*!< Serial port configuration */
-} serial_manager_config_t;
-
-/*! @brief serial manager error code*/
-typedef enum _serial_manager_status
-{
- kStatus_SerialManager_Success = kStatus_Success, /*!< Success */
- kStatus_SerialManager_Error = MAKE_STATUS(kStatusGroup_SERIALMANAGER, 1), /*!< Failed */
- kStatus_SerialManager_Busy = MAKE_STATUS(kStatusGroup_SERIALMANAGER, 2), /*!< Busy */
- kStatus_SerialManager_Notify = MAKE_STATUS(kStatusGroup_SERIALMANAGER, 3), /*!< Ring buffer is not empty */
- kStatus_SerialManager_Canceled =
- MAKE_STATUS(kStatusGroup_SERIALMANAGER, 4), /*!< the non-blocking request is canceled */
- kStatus_SerialManager_HandleConflict = MAKE_STATUS(kStatusGroup_SERIALMANAGER, 5), /*!< The handle is opened */
- kStatus_SerialManager_RingBufferOverflow =
- MAKE_STATUS(kStatusGroup_SERIALMANAGER, 6), /*!< The ring buffer is overflowed */
- kStatus_SerialManager_NotConnected = MAKE_STATUS(kStatusGroup_SERIALMANAGER, 7), /*!< The host is not connected */
-} serial_manager_status_t;
-
-/*! @brief Callback message structure */
-typedef struct _serial_manager_callback_message
-{
- uint8_t *buffer; /*!< Transferred buffer */
- uint32_t length; /*!< Transferred data length */
-} serial_manager_callback_message_t;
-
-/*! @brief callback function */
-typedef void (*serial_manager_callback_t)(void *callbackParam,
- serial_manager_callback_message_t *message,
- serial_manager_status_t status);
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif /* _cplusplus */
-
-/*!
- * @brief Initializes a serial manager module with the serial manager handle and the user configuration structure.
- *
- * This function configures the Serial Manager module with user-defined settings.
- * The user can configure the configuration structure.
- * The parameter serialHandle is a pointer to point to a memory space of size #SERIAL_MANAGER_HANDLE_SIZE
- * allocated by the caller.
- * The Serial Manager module supports three types of serial port, UART (includes UART, USART, LPSCI, LPUART, etc), USB
- * CDC and swo.
- * Please refer to #serial_port_type_t for serial port setting.
- * These three types can be set by using #serial_manager_config_t.
- *
- * Example below shows how to use this API to configure the Serial Manager.
- * For UART,
- * @code
- * #define SERIAL_MANAGER_RING_BUFFER_SIZE (256U)
- * static SERIAL_MANAGER_HANDLE_DEFINE(s_serialHandle);
- * static uint8_t s_ringBuffer[SERIAL_MANAGER_RING_BUFFER_SIZE];
- *
- * serial_manager_config_t config;
- * serial_port_uart_config_t uartConfig;
- * config.type = kSerialPort_Uart;
- * config.ringBuffer = &s_ringBuffer[0];
- * config.ringBufferSize = SERIAL_MANAGER_RING_BUFFER_SIZE;
- * uartConfig.instance = 0;
- * uartConfig.clockRate = 24000000;
- * uartConfig.baudRate = 115200;
- * uartConfig.parityMode = kSerialManager_UartParityDisabled;
- * uartConfig.stopBitCount = kSerialManager_UartOneStopBit;
- * uartConfig.enableRx = 1;
- * uartConfig.enableTx = 1;
- * config.portConfig = &uartConfig;
- * SerialManager_Init((serial_handle_t)s_serialHandle, &config);
- * @endcode
- * For USB CDC,
- * @code
- * #define SERIAL_MANAGER_RING_BUFFER_SIZE (256U)
- * static SERIAL_MANAGER_HANDLE_DEFINE(s_serialHandle);
- * static uint8_t s_ringBuffer[SERIAL_MANAGER_RING_BUFFER_SIZE];
- *
- * serial_manager_config_t config;
- * serial_port_usb_cdc_config_t usbCdcConfig;
- * config.type = kSerialPort_UsbCdc;
- * config.ringBuffer = &s_ringBuffer[0];
- * config.ringBufferSize = SERIAL_MANAGER_RING_BUFFER_SIZE;
- * usbCdcConfig.controllerIndex = kSerialManager_UsbControllerKhci0;
- * config.portConfig = &usbCdcConfig;
- * SerialManager_Init((serial_handle_t)s_serialHandle, &config);
- * @endcode
- *
- * @param serialHandle Pointer to point to a memory space of size #SERIAL_MANAGER_HANDLE_SIZE allocated by the caller.
- * The handle should be 4 byte aligned, because unaligned access doesn't be supported on some devices.
- * You can define the handle in the following two ways:
- * #SERIAL_MANAGER_HANDLE_DEFINE(serialHandle);
- * or
- * uint32_t serialHandle[((SERIAL_MANAGER_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))];
- * @param config Pointer to user-defined configuration structure.
- * @retval kStatus_SerialManager_Error An error occurred.
- * @retval kStatus_SerialManager_Success The Serial Manager module initialization succeed.
- */
-serial_manager_status_t SerialManager_Init(serial_handle_t serialHandle, serial_manager_config_t *config);
-
-/*!
- * @brief De-initializes the serial manager module instance.
- *
- * This function de-initializes the serial manager module instance. If the opened writing or
- * reading handle is not closed, the function will return kStatus_SerialManager_Busy.
- *
- * @param serialHandle The serial manager module handle pointer.
- * @retval kStatus_SerialManager_Success The serial manager de-initialization succeed.
- * @retval kStatus_SerialManager_Busy Opened reading or writing handle is not closed.
- */
-serial_manager_status_t SerialManager_Deinit(serial_handle_t serialHandle);
-
-/*!
- * @brief Opens a writing handle for the serial manager module.
- *
- * This function Opens a writing handle for the serial manager module. If the serial manager needs to
- * be used in different tasks, the task should open a dedicated write handle for itself by calling
- * #SerialManager_OpenWriteHandle. Since there can only one buffer for transmission for the writing
- * handle at the same time, multiple writing handles need to be opened when the multiple transmission
- * is needed for a task.
- *
- * @param serialHandle The serial manager module handle pointer.
- * The handle should be 4 byte aligned, because unaligned access doesn't be supported on some devices.
- * @param writeHandle The serial manager module writing handle pointer.
- * The handle should be 4 byte aligned, because unaligned access doesn't be supported on some devices.
- * You can define the handle in the following two ways:
- * #SERIAL_MANAGER_WRITE_HANDLE_DEFINE(writeHandle);
- * or
- * uint32_t writeHandle[((SERIAL_MANAGER_WRITE_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))];
- * @retval kStatus_SerialManager_Error An error occurred.
- * @retval kStatus_SerialManager_HandleConflict The writing handle was opened.
- * @retval kStatus_SerialManager_Success The writing handle is opened.
- *
- * Example below shows how to use this API to write data.
- * For task 1,
- * @code
- * static SERIAL_MANAGER_WRITE_HANDLE_DEFINE(s_serialWriteHandle1);
- * static uint8_t s_nonBlockingWelcome1[] = "This is non-blocking writing log for task1!\r\n";
- * SerialManager_OpenWriteHandle((serial_handle_t)serialHandle, (serial_write_handle_t)s_serialWriteHandle1);
- * SerialManager_InstallTxCallback((serial_write_handle_t)s_serialWriteHandle1,
- * Task1_SerialManagerTxCallback,
- * s_serialWriteHandle1);
- * SerialManager_WriteNonBlocking((serial_write_handle_t)s_serialWriteHandle1,
- * s_nonBlockingWelcome1,
- * sizeof(s_nonBlockingWelcome1) - 1U);
- * @endcode
- * For task 2,
- * @code
- * static SERIAL_MANAGER_WRITE_HANDLE_DEFINE(s_serialWriteHandle2);
- * static uint8_t s_nonBlockingWelcome2[] = "This is non-blocking writing log for task2!\r\n";
- * SerialManager_OpenWriteHandle((serial_handle_t)serialHandle, (serial_write_handle_t)s_serialWriteHandle2);
- * SerialManager_InstallTxCallback((serial_write_handle_t)s_serialWriteHandle2,
- * Task2_SerialManagerTxCallback,
- * s_serialWriteHandle2);
- * SerialManager_WriteNonBlocking((serial_write_handle_t)s_serialWriteHandle2,
- * s_nonBlockingWelcome2,
- * sizeof(s_nonBlockingWelcome2) - 1U);
- * @endcode
- */
-serial_manager_status_t SerialManager_OpenWriteHandle(serial_handle_t serialHandle, serial_write_handle_t writeHandle);
-
-/*!
- * @brief Closes a writing handle for the serial manager module.
- *
- * This function Closes a writing handle for the serial manager module.
- *
- * @param writeHandle The serial manager module writing handle pointer.
- * @retval kStatus_SerialManager_Success The writing handle is closed.
- */
-serial_manager_status_t SerialManager_CloseWriteHandle(serial_write_handle_t writeHandle);
-
-/*!
- * @brief Opens a reading handle for the serial manager module.
- *
- * This function Opens a reading handle for the serial manager module. The reading handle can not be
- * opened multiple at the same time. The error code kStatus_SerialManager_Busy would be returned when
- * the previous reading handle is not closed. And there can only be one buffer for receiving for the
- * reading handle at the same time.
- *
- * @param serialHandle The serial manager module handle pointer.
- * The handle should be 4 byte aligned, because unaligned access doesn't be supported on some devices.
- * @param readHandle The serial manager module reading handle pointer.
- * The handle should be 4 byte aligned, because unaligned access doesn't be supported on some devices.
- * You can define the handle in the following two ways:
- * #SERIAL_MANAGER_READ_HANDLE_DEFINE(readHandle);
- * or
- * uint32_t readHandle[((SERIAL_MANAGER_READ_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))];
- * @retval kStatus_SerialManager_Error An error occurred.
- * @retval kStatus_SerialManager_Success The reading handle is opened.
- * @retval kStatus_SerialManager_Busy Previous reading handle is not closed.
- *
- * Example below shows how to use this API to read data.
- * @code
- * static SERIAL_MANAGER_READ_HANDLE_DEFINE(s_serialReadHandle);
- * SerialManager_OpenReadHandle((serial_handle_t)serialHandle, (serial_read_handle_t)s_serialReadHandle);
- * static uint8_t s_nonBlockingBuffer[64];
- * SerialManager_InstallRxCallback((serial_read_handle_t)s_serialReadHandle,
- * APP_SerialManagerRxCallback,
- * s_serialReadHandle);
- * SerialManager_ReadNonBlocking((serial_read_handle_t)s_serialReadHandle,
- * s_nonBlockingBuffer,
- * sizeof(s_nonBlockingBuffer));
- * @endcode
- */
-serial_manager_status_t SerialManager_OpenReadHandle(serial_handle_t serialHandle, serial_read_handle_t readHandle);
-
-/*!
- * @brief Closes a reading for the serial manager module.
- *
- * This function Closes a reading for the serial manager module.
- *
- * @param readHandle The serial manager module reading handle pointer.
- * @retval kStatus_SerialManager_Success The reading handle is closed.
- */
-serial_manager_status_t SerialManager_CloseReadHandle(serial_read_handle_t readHandle);
-
-/*!
- * @brief Transmits data with the blocking mode.
- *
- * This is a blocking function, which polls the sending queue, waits for the sending queue to be empty.
- * This function sends data using an interrupt method. The interrupt of the hardware could not be disabled.
- * And There can only one buffer for transmission for the writing handle at the same time.
- *
- * @note The function #SerialManager_WriteBlocking and the function #SerialManager_WriteNonBlocking
- * cannot be used at the same time.
- * And, the function #SerialManager_CancelWriting cannot be used to abort the transmission of this function.
- *
- * @param writeHandle The serial manager module handle pointer.
- * @param buffer Start address of the data to write.
- * @param length Length of the data to write.
- * @retval kStatus_SerialManager_Success Successfully sent all data.
- * @retval kStatus_SerialManager_Busy Previous transmission still not finished; data not all sent yet.
- * @retval kStatus_SerialManager_Error An error occurred.
- */
-serial_manager_status_t SerialManager_WriteBlocking(serial_write_handle_t writeHandle,
- uint8_t *buffer,
- uint32_t length);
-
-/*!
- * @brief Reads data with the blocking mode.
- *
- * This is a blocking function, which polls the receiving buffer, waits for the receiving buffer to be full.
- * This function receives data using an interrupt method. The interrupt of the hardware could not be disabled.
- * And There can only one buffer for receiving for the reading handle at the same time.
- *
- * @note The function #SerialManager_ReadBlocking and the function #SerialManager_ReadNonBlocking
- * cannot be used at the same time.
- * And, the function #SerialManager_CancelReading cannot be used to abort the transmission of this function.
- *
- * @param readHandle The serial manager module handle pointer.
- * @param buffer Start address of the data to store the received data.
- * @param length The length of the data to be received.
- * @retval kStatus_SerialManager_Success Successfully received all data.
- * @retval kStatus_SerialManager_Busy Previous transmission still not finished; data not all received yet.
- * @retval kStatus_SerialManager_Error An error occurred.
- */
-serial_manager_status_t SerialManager_ReadBlocking(serial_read_handle_t readHandle, uint8_t *buffer, uint32_t length);
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-/*!
- * @brief Transmits data with the non-blocking mode.
- *
- * This is a non-blocking function, which returns directly without waiting for all data to be sent.
- * When all data is sent, the module notifies the upper layer through a TX callback function and passes
- * the status parameter @ref kStatus_SerialManager_Success.
- * This function sends data using an interrupt method. The interrupt of the hardware could not be disabled.
- * And There can only one buffer for transmission for the writing handle at the same time.
- *
- * @note The function #SerialManager_WriteBlocking and the function #SerialManager_WriteNonBlocking
- * cannot be used at the same time. And, the TX callback is mandatory before the function could be used.
- *
- * @param writeHandle The serial manager module handle pointer.
- * @param buffer Start address of the data to write.
- * @param length Length of the data to write.
- * @retval kStatus_SerialManager_Success Successfully sent all data.
- * @retval kStatus_SerialManager_Busy Previous transmission still not finished; data not all sent yet.
- * @retval kStatus_SerialManager_Error An error occurred.
- */
-serial_manager_status_t SerialManager_WriteNonBlocking(serial_write_handle_t writeHandle,
- uint8_t *buffer,
- uint32_t length);
-
-/*!
- * @brief Reads data with the non-blocking mode.
- *
- * This is a non-blocking function, which returns directly without waiting for all data to be received.
- * When all data is received, the module driver notifies the upper layer
- * through a RX callback function and passes the status parameter @ref kStatus_SerialManager_Success.
- * This function receives data using an interrupt method. The interrupt of the hardware could not be disabled.
- * And There can only one buffer for receiving for the reading handle at the same time.
- *
- * @note The function #SerialManager_ReadBlocking and the function #SerialManager_ReadNonBlocking
- * cannot be used at the same time. And, the RX callback is mandatory before the function could be used.
- *
- * @param readHandle The serial manager module handle pointer.
- * @param buffer Start address of the data to store the received data.
- * @param length The length of the data to be received.
- * @retval kStatus_SerialManager_Success Successfully received all data.
- * @retval kStatus_SerialManager_Busy Previous transmission still not finished; data not all received yet.
- * @retval kStatus_SerialManager_Error An error occurred.
- */
-serial_manager_status_t SerialManager_ReadNonBlocking(serial_read_handle_t readHandle,
- uint8_t *buffer,
- uint32_t length);
-
-/*!
- * @brief Tries to read data.
- *
- * The function tries to read data from internal ring buffer. If the ring buffer is not empty, the data will be
- * copied from ring buffer to up layer buffer. The copied length is the minimum of the ring buffer and up layer length.
- * After the data is copied, the actual data length is passed by the parameter length.
- * And There can only one buffer for receiving for the reading handle at the same time.
- *
- * @param readHandle The serial manager module handle pointer.
- * @param buffer Start address of the data to store the received data.
- * @param length The length of the data to be received.
- * @param receivedLength Length received from the ring buffer directly.
- * @retval kStatus_SerialManager_Success Successfully received all data.
- * @retval kStatus_SerialManager_Busy Previous transmission still not finished; data not all received yet.
- * @retval kStatus_SerialManager_Error An error occurred.
- */
-serial_manager_status_t SerialManager_TryRead(serial_read_handle_t readHandle,
- uint8_t *buffer,
- uint32_t length,
- uint32_t *receivedLength);
-
-/*!
- * @brief Cancels unfinished send transmission.
- *
- * The function cancels unfinished send transmission. When the transfer is canceled, the module notifies the upper layer
- * through a TX callback function and passes the status parameter @ref kStatus_SerialManager_Canceled.
- *
- * @note The function #SerialManager_CancelWriting cannot be used to abort the transmission of
- * the function #SerialManager_WriteBlocking.
- *
- * @param writeHandle The serial manager module handle pointer.
- * @retval kStatus_SerialManager_Success Get successfully abort the sending.
- * @retval kStatus_SerialManager_Error An error occurred.
- */
-serial_manager_status_t SerialManager_CancelWriting(serial_write_handle_t writeHandle);
-
-/*!
- * @brief Cancels unfinished receive transmission.
- *
- * The function cancels unfinished receive transmission. When the transfer is canceled, the module notifies the upper
- * layer
- * through a RX callback function and passes the status parameter @ref kStatus_SerialManager_Canceled.
- *
- * @note The function #SerialManager_CancelReading cannot be used to abort the transmission of
- * the function #SerialManager_ReadBlocking.
- *
- * @param readHandle The serial manager module handle pointer.
- * @retval kStatus_SerialManager_Success Get successfully abort the receiving.
- * @retval kStatus_SerialManager_Error An error occurred.
- */
-serial_manager_status_t SerialManager_CancelReading(serial_read_handle_t readHandle);
-
-/*!
- * @brief Installs a TX callback and callback parameter.
- *
- * This function is used to install the TX callback and callback parameter for the serial manager module.
- * When any status of TX transmission changed, the driver will notify the upper layer by the installed callback
- * function. And the status is also passed as status parameter when the callback is called.
- *
- * @param writeHandle The serial manager module handle pointer.
- * @param callback The callback function.
- * @param callbackParam The parameter of the callback function.
- * @retval kStatus_SerialManager_Success Successfully install the callback.
- */
-serial_manager_status_t SerialManager_InstallTxCallback(serial_write_handle_t writeHandle,
- serial_manager_callback_t callback,
- void *callbackParam);
-
-/*!
- * @brief Installs a RX callback and callback parameter.
- *
- * This function is used to install the RX callback and callback parameter for the serial manager module.
- * When any status of RX transmission changed, the driver will notify the upper layer by the installed callback
- * function. And the status is also passed as status parameter when the callback is called.
- *
- * @param readHandle The serial manager module handle pointer.
- * @param callback The callback function.
- * @param callbackParam The parameter of the callback function.
- * @retval kStatus_SerialManager_Success Successfully install the callback.
- */
-serial_manager_status_t SerialManager_InstallRxCallback(serial_read_handle_t readHandle,
- serial_manager_callback_t callback,
- void *callbackParam);
-
-#endif
-
-/*!
- * @brief Prepares to enter low power consumption.
- *
- * This function is used to prepare to enter low power consumption.
- *
- * @param serialHandle The serial manager module handle pointer.
- * @retval kStatus_SerialManager_Success Successful operation.
- */
-serial_manager_status_t SerialManager_EnterLowpower(serial_handle_t serialHandle);
-
-/*!
- * @brief Restores from low power consumption.
- *
- * This function is used to restore from low power consumption.
- *
- * @param serialHandle The serial manager module handle pointer.
- * @retval kStatus_SerialManager_Success Successful operation.
- */
-serial_manager_status_t SerialManager_ExitLowpower(serial_handle_t serialHandle);
-
-#if defined(__cplusplus)
-}
-#endif
-/*! @} */
-#endif /* __SERIAL_MANAGER_H__ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_port_internal.h b/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_port_internal.h
deleted file mode 100755
index a1a9339062..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_port_internal.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2019 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef __SERIAL_PORT_INTERNAL_H__
-#define __SERIAL_PORT_INTERNAL_H__
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif /* _cplusplus */
-
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
-serial_manager_status_t Serial_UartInit(serial_handle_t serialHandle, void *serialConfig);
-serial_manager_status_t Serial_UartDeinit(serial_handle_t serialHandle);
-serial_manager_status_t Serial_UartWrite(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
-#if !(defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-serial_manager_status_t Serial_UartRead(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
-#endif
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-serial_manager_status_t Serial_UartCancelWrite(serial_handle_t serialHandle);
-serial_manager_status_t Serial_UartInstallTxCallback(serial_handle_t serialHandle,
- serial_manager_callback_t callback,
- void *callbackParam);
-serial_manager_status_t Serial_UartInstallRxCallback(serial_handle_t serialHandle,
- serial_manager_callback_t callback,
- void *callbackParam);
-void Serial_UartIsrFunction(serial_handle_t serialHandle);
-#endif
-serial_manager_status_t Serial_UartEnterLowpower(serial_handle_t serialHandle);
-serial_manager_status_t Serial_UartExitLowpower(serial_handle_t serialHandle);
-#endif
-
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
-serial_manager_status_t Serial_UsbCdcInit(serial_handle_t serialHandle, void *config);
-serial_manager_status_t Serial_UsbCdcDeinit(serial_handle_t serialHandle);
-serial_manager_status_t Serial_UsbCdcWrite(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
-serial_manager_status_t Serial_UsbCdcRead(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
-serial_manager_status_t Serial_UsbCdcCancelWrite(serial_handle_t serialHandle);
-serial_manager_status_t Serial_UsbCdcInstallTxCallback(serial_handle_t serialHandle,
- serial_manager_callback_t callback,
- void *callbackParam);
-serial_manager_status_t Serial_UsbCdcInstallRxCallback(serial_handle_t serialHandle,
- serial_manager_callback_t callback,
- void *callbackParam);
-void Serial_UsbCdcIsrFunction(serial_handle_t serialHandle);
-#endif
-
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
-serial_manager_status_t Serial_SwoInit(serial_handle_t serialHandle, void *config);
-serial_manager_status_t Serial_SwoDeinit(serial_handle_t serialHandle);
-serial_manager_status_t Serial_SwoWrite(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
-#if !(defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-serial_manager_status_t Serial_SwoRead(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
-#endif
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-serial_manager_status_t Serial_SwoCancelWrite(serial_handle_t serialHandle);
-serial_manager_status_t Serial_SwoInstallTxCallback(serial_handle_t serialHandle,
- serial_manager_callback_t callback,
- void *callbackParam);
-serial_manager_status_t Serial_SwoInstallRxCallback(serial_handle_t serialHandle,
- serial_manager_callback_t callback,
- void *callbackParam);
-void Serial_SwoIsrFunction(serial_handle_t serialHandle);
-#endif
-#endif
-
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
-serial_manager_status_t Serial_UsbCdcVirtualInit(serial_handle_t serialHandle, void *config);
-serial_manager_status_t Serial_UsbCdcVirtualDeinit(serial_handle_t serialHandle);
-serial_manager_status_t Serial_UsbCdcVirtualWrite(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
-serial_manager_status_t Serial_UsbCdcVirtualRead(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length);
-serial_manager_status_t Serial_UsbCdcVirtualCancelWrite(serial_handle_t serialHandle);
-serial_manager_status_t Serial_UsbCdcVirtualInstallTxCallback(serial_handle_t serialHandle,
- serial_manager_callback_t callback,
- void *callbackParam);
-serial_manager_status_t Serial_UsbCdcVirtualInstallRxCallback(serial_handle_t serialHandle,
- serial_manager_callback_t callback,
- void *callbackParam);
-void Serial_UsbCdcVirtualIsrFunction(serial_handle_t serialHandle);
-#endif
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __SERIAL_PORT_INTERNAL_H__ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_port_uart.c b/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_port_uart.c
deleted file mode 100755
index adb37e5e1b..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_port_uart.c
+++ /dev/null
@@ -1,403 +0,0 @@
-/*
- * Copyright 2018 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_common.h"
-#include "serial_manager.h"
-#include "serial_port_internal.h"
-
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
-#include "uart.h"
-
-#include "serial_port_uart.h"
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-#ifndef NDEBUG
-#if (defined(DEBUG_CONSOLE_ASSERT_DISABLE) && (DEBUG_CONSOLE_ASSERT_DISABLE > 0U))
-#undef assert
-#define assert(n)
-#endif
-#endif
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-#define SERIAL_PORT_UART_RECEIVE_DATA_LENGTH 1U
-
-typedef struct _serial_uart_send_state
-{
- serial_manager_callback_t callback;
- void *callbackParam;
- uint8_t *buffer;
- uint32_t length;
- volatile uint8_t busy;
-} serial_uart_send_state_t;
-
-typedef struct _serial_uart_recv_state
-{
- serial_manager_callback_t callback;
- void *callbackParam;
- volatile uint8_t busy;
- uint8_t readBuffer[SERIAL_PORT_UART_RECEIVE_DATA_LENGTH];
-} serial_uart_recv_state_t;
-#endif
-
-typedef struct _serial_uart_state
-{
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- serial_uart_send_state_t tx;
- serial_uart_recv_state_t rx;
-#endif
- UART_HANDLE_DEFINE(usartHandleBuffer);
-} serial_uart_state_t;
-
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-/* UART user callback */
-static void Serial_UartCallback(hal_uart_handle_t handle, hal_uart_status_t status, void *userData)
-{
- serial_uart_state_t *serialUartHandle;
- serial_manager_callback_message_t msg;
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
- hal_uart_transfer_t transfer;
-#endif
-
- if (NULL == userData)
- {
- return;
- }
-
- serialUartHandle = (serial_uart_state_t *)userData;
-
- if ((hal_uart_status_t)kStatus_HAL_UartRxIdle == status)
- {
- if ((NULL != serialUartHandle->rx.callback))
- {
- msg.buffer = &serialUartHandle->rx.readBuffer[0];
- msg.length = sizeof(serialUartHandle->rx.readBuffer);
- serialUartHandle->rx.callback(serialUartHandle->rx.callbackParam, &msg, kStatus_SerialManager_Success);
- }
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
- transfer.data = &serialUartHandle->rx.readBuffer[0];
- transfer.dataSize = sizeof(serialUartHandle->rx.readBuffer);
- if (kStatus_HAL_UartSuccess ==
- HAL_UartTransferReceiveNonBlocking(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]), &transfer))
-#else
- if ((hal_uart_status_t)kStatus_HAL_UartSuccess ==
- HAL_UartReceiveNonBlocking(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]),
- &serialUartHandle->rx.readBuffer[0], sizeof(serialUartHandle->rx.readBuffer)))
-#endif
- {
- serialUartHandle->rx.busy = 1U;
- }
- else
- {
- serialUartHandle->rx.busy = 0U;
- }
- }
- else if ((hal_uart_status_t)kStatus_HAL_UartTxIdle == status)
- {
- if (0U != serialUartHandle->tx.busy)
- {
- serialUartHandle->tx.busy = 0U;
- if ((NULL != serialUartHandle->tx.callback))
- {
- msg.buffer = serialUartHandle->tx.buffer;
- msg.length = serialUartHandle->tx.length;
- serialUartHandle->tx.callback(serialUartHandle->tx.callbackParam, &msg, kStatus_SerialManager_Success);
- }
- }
- }
- else
- {
- }
-}
-#endif
-
-serial_manager_status_t Serial_UartInit(serial_handle_t serialHandle, void *serialConfig)
-{
- serial_uart_state_t *serialUartHandle;
- serial_port_uart_config_t *uartConfig;
- hal_uart_config_t config;
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
- hal_uart_transfer_t transfer;
-#endif
-#endif
-
- assert(serialConfig);
- assert(serialHandle);
- assert(SERIAL_PORT_UART_HANDLE_SIZE >= sizeof(serial_uart_state_t));
-
- uartConfig = (serial_port_uart_config_t *)serialConfig;
- serialUartHandle = (serial_uart_state_t *)serialHandle;
-
- config.baudRate_Bps = uartConfig->baudRate;
- config.parityMode = (hal_uart_parity_mode_t)uartConfig->parityMode;
- config.stopBitCount = (hal_uart_stop_bit_count_t)uartConfig->stopBitCount;
- config.enableRx = uartConfig->enableRx;
- config.enableTx = uartConfig->enableTx;
- config.srcClock_Hz = uartConfig->clockRate;
- config.instance = uartConfig->instance;
-
- if (kStatus_HAL_UartSuccess != HAL_UartInit(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]), &config))
- {
- return kStatus_SerialManager_Error;
- }
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
- if (kStatus_HAL_UartSuccess !=
- HAL_UartTransferInstallCallback(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]),
- Serial_UartCallback, serialUartHandle))
-#else
- if (kStatus_HAL_UartSuccess != HAL_UartInstallCallback(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]),
- Serial_UartCallback, serialUartHandle))
-#endif
- {
- return kStatus_SerialManager_Error;
- }
-
- if (0U != uartConfig->enableRx)
- {
- serialUartHandle->rx.busy = 1U;
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
- transfer.data = &serialUartHandle->rx.readBuffer[0];
- transfer.dataSize = sizeof(serialUartHandle->rx.readBuffer);
- if (kStatus_HAL_UartSuccess !=
- HAL_UartTransferReceiveNonBlocking(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]), &transfer))
-#else
- if (kStatus_HAL_UartSuccess !=
- HAL_UartReceiveNonBlocking(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]),
- &serialUartHandle->rx.readBuffer[0], sizeof(serialUartHandle->rx.readBuffer)))
-#endif
- {
- serialUartHandle->rx.busy = 0U;
- return kStatus_SerialManager_Error;
- }
- }
-#endif
-
- return kStatus_SerialManager_Success;
-}
-
-serial_manager_status_t Serial_UartDeinit(serial_handle_t serialHandle)
-{
- serial_uart_state_t *serialUartHandle;
-
- assert(serialHandle);
-
- serialUartHandle = (serial_uart_state_t *)serialHandle;
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
- (void)HAL_UartTransferAbortReceive(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]));
-#else
- (void)HAL_UartAbortReceive(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]));
-#endif
-#endif
- (void)HAL_UartDeinit(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]));
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
- serialUartHandle->tx.busy = 0U;
- serialUartHandle->rx.busy = 0U;
-#endif
-
- return kStatus_SerialManager_Success;
-}
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-
-serial_manager_status_t Serial_UartWrite(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length)
-{
- serial_uart_state_t *serialUartHandle;
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
- hal_uart_transfer_t transfer;
-#endif
-
- assert(serialHandle);
- assert(buffer);
- assert(length);
-
- serialUartHandle = (serial_uart_state_t *)serialHandle;
-
- if (0U != serialUartHandle->tx.busy)
- {
- return kStatus_SerialManager_Busy;
- }
- serialUartHandle->tx.busy = 1U;
-
- serialUartHandle->tx.buffer = buffer;
- serialUartHandle->tx.length = length;
-
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
- transfer.data = buffer;
- transfer.dataSize = length;
- if (kStatus_HAL_UartSuccess !=
- HAL_UartTransferSendNonBlocking(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]), &transfer))
-#else
- if (kStatus_HAL_UartSuccess !=
- HAL_UartSendNonBlocking(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]), buffer, length))
-#endif
- {
- serialUartHandle->tx.busy = 0U;
- return kStatus_SerialManager_Error;
- }
- return kStatus_SerialManager_Success;
-}
-
-#else
-
-serial_manager_status_t Serial_UartWrite(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length)
-{
- serial_uart_state_t *serialUartHandle;
-
- assert(serialHandle);
- assert(buffer);
- assert(length);
-
- serialUartHandle = (serial_uart_state_t *)serialHandle;
-
- return (serial_manager_status_t)HAL_UartSendBlocking(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]),
- buffer, length);
-}
-
-serial_manager_status_t Serial_UartRead(serial_handle_t serialHandle, uint8_t *buffer, uint32_t length)
-{
- serial_uart_state_t *serialUartHandle;
-
- assert(serialHandle);
- assert(buffer);
- assert(length);
-
- serialUartHandle = (serial_uart_state_t *)serialHandle;
-
- return (serial_manager_status_t)HAL_UartReceiveBlocking(
- ((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]), buffer, length);
-}
-
-#endif
-
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-serial_manager_status_t Serial_UartCancelWrite(serial_handle_t serialHandle)
-{
- serial_uart_state_t *serialUartHandle;
- serial_manager_callback_message_t msg;
- uint32_t primask;
- uint8_t isBusy = 0U;
-
- assert(serialHandle);
-
- serialUartHandle = (serial_uart_state_t *)serialHandle;
-
- primask = DisableGlobalIRQ();
- isBusy = serialUartHandle->tx.busy;
- serialUartHandle->tx.busy = 0U;
- EnableGlobalIRQ(primask);
-
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
- (void)HAL_UartTransferAbortSend(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]));
-#else
- (void)HAL_UartAbortSend(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]));
-#endif
- if (0U != isBusy)
- {
- if ((NULL != serialUartHandle->tx.callback))
- {
- msg.buffer = serialUartHandle->tx.buffer;
- msg.length = serialUartHandle->tx.length;
- serialUartHandle->tx.callback(serialUartHandle->tx.callbackParam, &msg, kStatus_SerialManager_Canceled);
- }
- }
- return kStatus_SerialManager_Success;
-}
-
-serial_manager_status_t Serial_UartInstallTxCallback(serial_handle_t serialHandle,
- serial_manager_callback_t callback,
- void *callbackParam)
-{
- serial_uart_state_t *serialUartHandle;
-
- assert(serialHandle);
-
- serialUartHandle = (serial_uart_state_t *)serialHandle;
-
- serialUartHandle->tx.callback = callback;
- serialUartHandle->tx.callbackParam = callbackParam;
-
- return kStatus_SerialManager_Success;
-}
-
-serial_manager_status_t Serial_UartInstallRxCallback(serial_handle_t serialHandle,
- serial_manager_callback_t callback,
- void *callbackParam)
-{
- serial_uart_state_t *serialUartHandle;
-
- assert(serialHandle);
-
- serialUartHandle = (serial_uart_state_t *)serialHandle;
-
- serialUartHandle->rx.callback = callback;
- serialUartHandle->rx.callbackParam = callbackParam;
-
- return kStatus_SerialManager_Success;
-}
-
-void Serial_UartIsrFunction(serial_handle_t serialHandle)
-{
- serial_uart_state_t *serialUartHandle;
-
- assert(serialHandle);
-
- serialUartHandle = (serial_uart_state_t *)serialHandle;
-
- HAL_UartIsrFunction(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0]));
-}
-#endif
-
-serial_manager_status_t Serial_UartEnterLowpower(serial_handle_t serialHandle)
-{
- serial_uart_state_t *serialUartHandle;
-
- assert(serialHandle);
-
- serialUartHandle = (serial_uart_state_t *)serialHandle;
-
- if (kStatus_HAL_UartSuccess != HAL_UartEnterLowpower(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0])))
- {
- return kStatus_SerialManager_Error;
- }
-
- return kStatus_SerialManager_Success;
-}
-
-serial_manager_status_t Serial_UartExitLowpower(serial_handle_t serialHandle)
-{
- serial_uart_state_t *serialUartHandle;
-
- assert(serialHandle);
-
- serialUartHandle = (serial_uart_state_t *)serialHandle;
-
- if (kStatus_HAL_UartSuccess != HAL_UartExitLowpower(((hal_uart_handle_t)&serialUartHandle->usartHandleBuffer[0])))
- {
- return kStatus_SerialManager_Error;
- }
-
- return kStatus_SerialManager_Success;
-}
-
-#endif
diff --git a/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_port_uart.h b/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_port_uart.h
deleted file mode 100755
index c099aec408..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_port_uart.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2018 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef __SERIAL_PORT_UART_H__
-#define __SERIAL_PORT_UART_H__
-
-#include "uart.h"
-
-/*!
- * @addtogroup serial_port_uart
- * @{
- */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-/*! @brief serial port uart handle size*/
-#if (defined(SERIAL_MANAGER_NON_BLOCKING_MODE) && (SERIAL_MANAGER_NON_BLOCKING_MODE > 0U))
-#define SERIAL_PORT_UART_HANDLE_SIZE (76U + HAL_UART_HANDLE_SIZE)
-#else
-#define SERIAL_PORT_UART_HANDLE_SIZE (HAL_UART_HANDLE_SIZE)
-#endif
-
-/*! @brief serial port uart parity mode*/
-typedef enum _serial_port_uart_parity_mode
-{
- kSerialManager_UartParityDisabled = 0x0U, /*!< Parity disabled */
- kSerialManager_UartParityEven = 0x1U, /*!< Parity even enabled */
- kSerialManager_UartParityOdd = 0x2U, /*!< Parity odd enabled */
-} serial_port_uart_parity_mode_t;
-
-/*! @brief serial port uart stop bit count*/
-typedef enum _serial_port_uart_stop_bit_count
-{
- kSerialManager_UartOneStopBit = 0U, /*!< One stop bit */
- kSerialManager_UartTwoStopBit = 1U, /*!< Two stop bits */
-} serial_port_uart_stop_bit_count_t;
-
-/*! @brief serial port uart config struct*/
-typedef struct _serial_port_uart_config
-{
- uint32_t clockRate; /*!< clock rate */
- uint32_t baudRate; /*!< baud rate */
- serial_port_uart_parity_mode_t parityMode; /*!< Parity mode, disabled (default), even, odd */
- serial_port_uart_stop_bit_count_t stopBitCount; /*!< Number of stop bits, 1 stop bit (default) or 2 stop bits */
- uint8_t instance; /*!< Instance (0 - UART0, 1 - UART1, ...), detail information
- please refer to the SOC corresponding RM. */
- uint8_t enableRx; /*!< Enable RX */
- uint8_t enableTx; /*!< Enable TX */
-} serial_port_uart_config_t;
-/*! @} */
-#endif /* __SERIAL_PORT_UART_H__ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/components/uart/uart.h b/platform/ext/target/nxp/common/Native_Driver/components/uart/uart.h
deleted file mode 100755
index 4e8eed7dbc..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/components/uart/uart.h
+++ /dev/null
@@ -1,532 +0,0 @@
-/*
- * Copyright 2018-2019 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef __HAL_UART_ADAPTER_H__
-#define __HAL_UART_ADAPTER_H__
-
-#if defined(FSL_RTOS_FREE_RTOS)
-#include "FreeRTOS.h"
-#endif
-
-/*!
- * @addtogroup UART_Adapter
- * @{
- */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*! @brief Enable or disable UART adapter non-blocking mode (1 - enable, 0 - disable) */
-#ifdef DEBUG_CONSOLE_TRANSFER_NON_BLOCKING
-#define UART_ADAPTER_NON_BLOCKING_MODE (1U)
-#else
-#ifndef SERIAL_MANAGER_NON_BLOCKING_MODE
-#define UART_ADAPTER_NON_BLOCKING_MODE (0U)
-#else
-#define UART_ADAPTER_NON_BLOCKING_MODE SERIAL_MANAGER_NON_BLOCKING_MODE
-#endif
-#endif
-
-#if defined(__GIC_PRIO_BITS)
-#ifndef HAL_UART_ISR_PRIORITY
-#define HAL_UART_ISR_PRIORITY (25U)
-#endif
-#else
-#if defined(configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY)
-#ifndef HAL_UART_ISR_PRIORITY
-#define HAL_UART_ISR_PRIORITY (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY)
-#endif
-#else
-/* The default value 3 is used to support different ARM Core, such as CM0P, CM4, CM7, and CM33, etc.
- * The minimum number of priority bits implemented in the NVIC is 2 on these SOCs. The value of mininum
- * priority is 3 (2^2 - 1). So, the default value is 3.
- */
-#ifndef HAL_UART_ISR_PRIORITY
-#define HAL_UART_ISR_PRIORITY (3U)
-#endif
-#endif
-#endif
-
-#ifndef HAL_UART_ADAPTER_LOWPOWER
-#define HAL_UART_ADAPTER_LOWPOWER (0U)
-#endif /* HAL_UART_ADAPTER_LOWPOWER */
-
-/*! @brief Definition of uart adapter handle size. */
-#if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
-#define HAL_UART_HANDLE_SIZE (90U + HAL_UART_ADAPTER_LOWPOWER * 16U)
-#else
-#define HAL_UART_HANDLE_SIZE (4U + HAL_UART_ADAPTER_LOWPOWER * 16U)
-#endif
-
-/*!
- * @brief Defines the uart handle
- *
- * This macro is used to define a 4 byte aligned uart handle.
- * Then use "(hal_uart_handle_t)name" to get the uart handle.
- *
- * The macro should be global and could be optional. You could also define uart handle by yourself.
- *
- * This is an example,
- * @code
- * UART_HANDLE_DEFINE(uartHandle);
- * @endcode
- *
- * @param name The name string of the uart handle.
- */
-#define UART_HANDLE_DEFINE(name) uint32_t name[((HAL_UART_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))]
-
-/*! @brief Whether enable transactional function of the UART. (0 - disable, 1 - enable) */
-#ifndef HAL_UART_TRANSFER_MODE
-#define HAL_UART_TRANSFER_MODE (0U)
-#endif
-
-/*! @brief The handle of uart adapter. */
-typedef void *hal_uart_handle_t;
-
-/*! @brief UART status */
-typedef enum _hal_uart_status
-{
- kStatus_HAL_UartSuccess = kStatus_Success, /*!< Successfully */
- kStatus_HAL_UartTxBusy = MAKE_STATUS(kStatusGroup_HAL_UART, 1), /*!< TX busy */
- kStatus_HAL_UartRxBusy = MAKE_STATUS(kStatusGroup_HAL_UART, 2), /*!< RX busy */
- kStatus_HAL_UartTxIdle = MAKE_STATUS(kStatusGroup_HAL_UART, 3), /*!< HAL UART transmitter is idle. */
- kStatus_HAL_UartRxIdle = MAKE_STATUS(kStatusGroup_HAL_UART, 4), /*!< HAL UART receiver is idle */
- kStatus_HAL_UartBaudrateNotSupport =
- MAKE_STATUS(kStatusGroup_HAL_UART, 5), /*!< Baudrate is not support in current clock source */
- kStatus_HAL_UartProtocolError = MAKE_STATUS(
- kStatusGroup_HAL_UART,
- 6), /*!< Error occurs for Noise, Framing, Parity, etc.
- For transactional transfer, The up layer needs to abort the transfer and then starts again */
- kStatus_HAL_UartError = MAKE_STATUS(kStatusGroup_HAL_UART, 7), /*!< Error occurs on HAL UART */
-} hal_uart_status_t;
-
-/*! @brief UART parity mode. */
-typedef enum _hal_uart_parity_mode
-{
- kHAL_UartParityDisabled = 0x0U, /*!< Parity disabled */
- kHAL_UartParityEven = 0x1U, /*!< Parity even enabled */
- kHAL_UartParityOdd = 0x2U, /*!< Parity odd enabled */
-} hal_uart_parity_mode_t;
-
-/*! @brief UART stop bit count. */
-typedef enum _hal_uart_stop_bit_count
-{
- kHAL_UartOneStopBit = 0U, /*!< One stop bit */
- kHAL_UartTwoStopBit = 1U, /*!< Two stop bits */
-} hal_uart_stop_bit_count_t;
-
-/*! @brief UART configuration structure. */
-typedef struct _hal_uart_config
-{
- uint32_t srcClock_Hz; /*!< Source clock */
- uint32_t baudRate_Bps; /*!< Baud rate */
- hal_uart_parity_mode_t parityMode; /*!< Parity mode, disabled (default), even, odd */
- hal_uart_stop_bit_count_t stopBitCount; /*!< Number of stop bits, 1 stop bit (default) or 2 stop bits */
- uint8_t enableRx; /*!< Enable RX */
- uint8_t enableTx; /*!< Enable TX */
- uint8_t instance; /*!< Instance (0 - UART0, 1 - UART1, ...), detail information please refer to the
- SOC corresponding RM.
- Invalid instance value will cause initialization failure. */
-} hal_uart_config_t;
-
-/*! @brief UART transfer callback function. */
-typedef void (*hal_uart_transfer_callback_t)(hal_uart_handle_t handle, hal_uart_status_t status, void *callbackParam);
-
-/*! @brief UART transfer structure. */
-typedef struct _hal_uart_transfer
-{
- uint8_t *data; /*!< The buffer of data to be transfer.*/
- size_t dataSize; /*!< The byte count to be transfer. */
-} hal_uart_transfer_t;
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif /* _cplusplus */
-
-/*!
- * @name Initialization and deinitialization
- * @{
- */
-
-/*!
- * @brief Initializes a UART instance with the UART handle and the user configuration structure.
- *
- * This function configures the UART module with user-defined settings. The user can configure the configuration
- * structure. The parameter handle is a pointer to point to a memory space of size #HAL_UART_HANDLE_SIZE allocated by
- * the caller. Example below shows how to use this API to configure the UART.
- * @code
- * UART_HANDLE_DEFINE(g_UartHandle);
- * hal_uart_config_t config;
- * config.srcClock_Hz = 48000000;
- * config.baudRate_Bps = 115200U;
- * config.parityMode = kHAL_UartParityDisabled;
- * config.stopBitCount = kHAL_UartOneStopBit;
- * config.enableRx = 1;
- * config.enableTx = 1;
- * config.instance = 0;
- * HAL_UartInit((hal_uart_handle_t)g_UartHandle, &config);
- * @endcode
- *
- * @param handle Pointer to point to a memory space of size #HAL_UART_HANDLE_SIZE allocated by the caller.
- * The handle should be 4 byte aligned, because unaligned access doesn't be supported on some devices.
- * You can define the handle in the following two ways:
- * #UART_HANDLE_DEFINE(handle);
- * or
- * uint32_t handle[((HAL_UART_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))];
- * @param config Pointer to user-defined configuration structure.
- * @retval kStatus_HAL_UartBaudrateNotSupport Baudrate is not support in current clock source.
- * @retval kStatus_HAL_UartSuccess UART initialization succeed
- */
-hal_uart_status_t HAL_UartInit(hal_uart_handle_t handle, hal_uart_config_t *config);
-
-/*!
- * @brief Deinitializes a UART instance.
- *
- * This function waits for TX complete, disables TX and RX, and disables the UART clock.
- *
- * @param handle UART handle pointer.
- * @retval kStatus_HAL_UartSuccess UART de-initialization succeed
- */
-hal_uart_status_t HAL_UartDeinit(hal_uart_handle_t handle);
-
-/*! @}*/
-
-/*!
- * @name Blocking bus Operations
- * @{
- */
-
-/*!
- * @brief Reads RX data register using a blocking method.
- *
- * This function polls the RX register, waits for the RX register to be full or for RX FIFO to
- * have data, and reads data from the RX register.
- *
- * @note The function #HAL_UartReceiveBlocking and the function #HAL_UartTransferReceiveNonBlocking
- * cannot be used at the same time.
- * And, the function #HAL_UartTransferAbortReceive cannot be used to abort the transmission of this function.
- *
- * @param handle UART handle pointer.
- * @param data Start address of the buffer to store the received data.
- * @param length Size of the buffer.
- * @retval kStatus_HAL_UartError An error occurred while receiving data.
- * @retval kStatus_HAL_UartParityError A parity error occurred while receiving data.
- * @retval kStatus_HAL_UartSuccess Successfully received all data.
- */
-hal_uart_status_t HAL_UartReceiveBlocking(hal_uart_handle_t handle, uint8_t *data, size_t length);
-
-/*!
- * @brief Writes to the TX register using a blocking method.
- *
- * This function polls the TX register, waits for the TX register to be empty or for the TX FIFO
- * to have room and writes data to the TX buffer.
- *
- * @note The function #HAL_UartSendBlocking and the function #HAL_UartTransferSendNonBlocking
- * cannot be used at the same time.
- * And, the function #HAL_UartTransferAbortSend cannot be used to abort the transmission of this function.
- *
- * @param handle UART handle pointer.
- * @param data Start address of the data to write.
- * @param length Size of the data to write.
- * @retval kStatus_HAL_UartSuccess Successfully sent all data.
- */
-hal_uart_status_t HAL_UartSendBlocking(hal_uart_handle_t handle, const uint8_t *data, size_t length);
-
-/*! @}*/
-
-#if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
-
-/*!
- * @name Transactional
- * @note The transactional API and the functional API cannot be used at the same time. The macro
- * #HAL_UART_TRANSFER_MODE is used to set which one will be used. If #HAL_UART_TRANSFER_MODE is zero, the
- * functional API with non-blocking mode will be used. Otherwise, transactional API will be used.
- * @{
- */
-
-/*!
- * @brief Installs a callback and callback parameter.
- *
- * This function is used to install the callback and callback parameter for UART module.
- * When any status of the UART changed, the driver will notify the upper layer by the installed callback
- * function. And the status is also passed as status parameter when the callback is called.
- *
- * @param handle UART handle pointer.
- * @param callback The callback function.
- * @param callbackParam The parameter of the callback function.
- * @retval kStatus_HAL_UartSuccess Successfully install the callback.
- */
-hal_uart_status_t HAL_UartTransferInstallCallback(hal_uart_handle_t handle,
- hal_uart_transfer_callback_t callback,
- void *callbackParam);
-
-/*!
- * @brief Receives a buffer of data using an interrupt method.
- *
- * This function receives data using an interrupt method. This is a non-blocking function, which
- * returns directly without waiting for all data to be received.
- * The receive request is saved by the UART driver.
- * When the new data arrives, the receive request is serviced first.
- * When all data is received, the UART driver notifies the upper layer
- * through a callback function and passes the status parameter @ref kStatus_UART_RxIdle.
- *
- * @note The function #HAL_UartReceiveBlocking and the function #HAL_UartTransferReceiveNonBlocking
- * cannot be used at the same time.
- *
- * @param handle UART handle pointer.
- * @param transfer UART transfer structure, see #hal_uart_transfer_t.
- * @retval kStatus_HAL_UartSuccess Successfully queue the transfer into transmit queue.
- * @retval kStatus_HAL_UartRxBusy Previous receive request is not finished.
- * @retval kStatus_HAL_UartError An error occurred.
- */
-hal_uart_status_t HAL_UartTransferReceiveNonBlocking(hal_uart_handle_t handle, hal_uart_transfer_t *transfer);
-
-/*!
- * @brief Transmits a buffer of data using the interrupt method.
- *
- * This function sends data using an interrupt method. This is a non-blocking function, which
- * returns directly without waiting for all data to be written to the TX register. When
- * all data is written to the TX register in the ISR, the UART driver calls the callback
- * function and passes the @ref kStatus_UART_TxIdle as status parameter.
- *
- * @note The function #HAL_UartSendBlocking and the function #HAL_UartTransferSendNonBlocking
- * cannot be used at the same time.
- *
- * @param handle UART handle pointer.
- * @param transfer UART transfer structure. See #hal_uart_transfer_t.
- * @retval kStatus_HAL_UartSuccess Successfully start the data transmission.
- * @retval kStatus_HAL_UartTxBusy Previous transmission still not finished; data not all written to TX register yet.
- * @retval kStatus_HAL_UartError An error occurred.
- */
-hal_uart_status_t HAL_UartTransferSendNonBlocking(hal_uart_handle_t handle, hal_uart_transfer_t *transfer);
-
-/*!
- * @brief Gets the number of bytes that have been received.
- *
- * This function gets the number of bytes that have been received.
- *
- * @param handle UART handle pointer.
- * @param count Receive bytes count.
- * @retval kStatus_HAL_UartError An error occurred.
- * @retval kStatus_Success Get successfully through the parameter \p count.
- */
-hal_uart_status_t HAL_UartTransferGetReceiveCount(hal_uart_handle_t handle, uint32_t *count);
-
-/*!
- * @brief Gets the number of bytes written to the UART TX register.
- *
- * This function gets the number of bytes written to the UART TX
- * register by using the interrupt method.
- *
- * @param handle UART handle pointer.
- * @param count Send bytes count.
- * @retval kStatus_HAL_UartError An error occurred.
- * @retval kStatus_Success Get successfully through the parameter \p count.
- */
-hal_uart_status_t HAL_UartTransferGetSendCount(hal_uart_handle_t handle, uint32_t *count);
-
-/*!
- * @brief Aborts the interrupt-driven data receiving.
- *
- * This function aborts the interrupt-driven data receiving. The user can get the remainBytes to know
- * how many bytes are not received yet.
- *
- * @note The function #HAL_UartTransferAbortReceive cannot be used to abort the transmission of
- * the function #HAL_UartReceiveBlocking.
- *
- * @param handle UART handle pointer.
- * @retval kStatus_Success Get successfully abort the receiving.
- */
-hal_uart_status_t HAL_UartTransferAbortReceive(hal_uart_handle_t handle);
-
-/*!
- * @brief Aborts the interrupt-driven data sending.
- *
- * This function aborts the interrupt-driven data sending. The user can get the remainBytes to find out
- * how many bytes are not sent out.
- *
- * @note The function #HAL_UartTransferAbortSend cannot be used to abort the transmission of
- * the function #HAL_UartSendBlocking.
- *
- * @param handle UART handle pointer.
- * @retval kStatus_Success Get successfully abort the sending.
- */
-hal_uart_status_t HAL_UartTransferAbortSend(hal_uart_handle_t handle);
-
-/*! @}*/
-
-#else
-
-/*!
- * @name Functional API with non-blocking mode.
- * @note The functional API and the transactional API cannot be used at the same time. The macro
- * #HAL_UART_TRANSFER_MODE is used to set which one will be used. If #HAL_UART_TRANSFER_MODE is zero, the
- * functional API with non-blocking mode will be used. Otherwise, transactional API will be used.
- * @{
- */
-
-/*!
- * @brief Installs a callback and callback parameter.
- *
- * This function is used to install the callback and callback parameter for UART module.
- * When non-blocking sending or receiving finished, the adapter will notify the upper layer by the installed callback
- * function. And the status is also passed as status parameter when the callback is called.
- *
- * @param handle UART handle pointer.
- * @param callback The callback function.
- * @param callbackParam The parameter of the callback function.
- * @retval kStatus_HAL_UartSuccess Successfully install the callback.
- */
-hal_uart_status_t HAL_UartInstallCallback(hal_uart_handle_t handle,
- hal_uart_transfer_callback_t callback,
- void *callbackParam);
-
-/*!
- * @brief Receives a buffer of data using an interrupt method.
- *
- * This function receives data using an interrupt method. This is a non-blocking function, which
- * returns directly without waiting for all data to be received.
- * The receive request is saved by the UART adapter.
- * When the new data arrives, the receive request is serviced first.
- * When all data is received, the UART adapter notifies the upper layer
- * through a callback function and passes the status parameter @ref kStatus_UART_RxIdle.
- *
- * @note The function #HAL_UartReceiveBlocking and the function #HAL_UartReceiveNonBlocking
- * cannot be used at the same time.
- *
- * @param handle UART handle pointer.
- * @param data Start address of the data to write.
- * @param length Size of the data to write.
- * @retval kStatus_HAL_UartSuccess Successfully queue the transfer into transmit queue.
- * @retval kStatus_HAL_UartRxBusy Previous receive request is not finished.
- * @retval kStatus_HAL_UartError An error occurred.
- */
-hal_uart_status_t HAL_UartReceiveNonBlocking(hal_uart_handle_t handle, uint8_t *data, size_t length);
-
-/*!
- * @brief Transmits a buffer of data using the interrupt method.
- *
- * This function sends data using an interrupt method. This is a non-blocking function, which
- * returns directly without waiting for all data to be written to the TX register. When
- * all data is written to the TX register in the ISR, the UART driver calls the callback
- * function and passes the @ref kStatus_UART_TxIdle as status parameter.
- *
- * @note The function #HAL_UartSendBlocking and the function #HAL_UartSendNonBlocking
- * cannot be used at the same time.
- *
- * @param handle UART handle pointer.
- * @param data Start address of the data to write.
- * @param length Size of the data to write.
- * @retval kStatus_HAL_UartSuccess Successfully start the data transmission.
- * @retval kStatus_HAL_UartTxBusy Previous transmission still not finished; data not all written to TX register yet.
- * @retval kStatus_HAL_UartError An error occurred.
- */
-hal_uart_status_t HAL_UartSendNonBlocking(hal_uart_handle_t handle, uint8_t *data, size_t length);
-
-/*!
- * @brief Gets the number of bytes that have been received.
- *
- * This function gets the number of bytes that have been received.
- *
- * @param handle UART handle pointer.
- * @param count Receive bytes count.
- * @retval kStatus_HAL_UartError An error occurred.
- * @retval kStatus_Success Get successfully through the parameter \p count.
- */
-hal_uart_status_t HAL_UartGetReceiveCount(hal_uart_handle_t handle, uint32_t *reCount);
-
-/*!
- * @brief Gets the number of bytes written to the UART TX register.
- *
- * This function gets the number of bytes written to the UART TX
- * register by using the interrupt method.
- *
- * @param handle UART handle pointer.
- * @param count Send bytes count.
- * @retval kStatus_HAL_UartError An error occurred.
- * @retval kStatus_Success Get successfully through the parameter \p count.
- */
-hal_uart_status_t HAL_UartGetSendCount(hal_uart_handle_t handle, uint32_t *seCount);
-
-/*!
- * @brief Aborts the interrupt-driven data receiving.
- *
- * This function aborts the interrupt-driven data receiving. The user can get the remainBytes to know
- * how many bytes are not received yet.
- *
- * @note The function #HAL_UartAbortReceive cannot be used to abort the transmission of
- * the function #HAL_UartReceiveBlocking.
- *
- * @param handle UART handle pointer.
- * @retval kStatus_Success Get successfully abort the receiving.
- */
-hal_uart_status_t HAL_UartAbortReceive(hal_uart_handle_t handle);
-
-/*!
- * @brief Aborts the interrupt-driven data sending.
- *
- * This function aborts the interrupt-driven data sending. The user can get the remainBytes to find out
- * how many bytes are not sent out.
- *
- * @note The function #HAL_UartAbortSend cannot be used to abort the transmission of
- * the function #HAL_UartSendBlocking.
- *
- * @param handle UART handle pointer.
- * @retval kStatus_Success Get successfully abort the sending.
- */
-hal_uart_status_t HAL_UartAbortSend(hal_uart_handle_t handle);
-
-/*! @}*/
-
-#endif
-#endif
-
-/*!
- * @brief Prepares to enter low power consumption.
- *
- * This function is used to prepare to enter low power consumption.
- *
- * @param handle UART handle pointer.
- * @retval kStatus_HAL_UartSuccess Successful operation.
- * @retval kStatus_HAL_UartError An error occurred.
- */
-hal_uart_status_t HAL_UartEnterLowpower(hal_uart_handle_t handle);
-
-/*!
- * @brief Restores from low power consumption.
- *
- * This function is used to restore from low power consumption.
- *
- * @param handle UART handle pointer.
- * @retval kStatus_HAL_UartSuccess Successful operation.
- * @retval kStatus_HAL_UartError An error occurred.
- */
-hal_uart_status_t HAL_UartExitLowpower(hal_uart_handle_t handle);
-
-#if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
-/*!
- * @brief UART IRQ handle function.
- *
- * This function handles the UART transmit and receive IRQ request.
- *
- * @param handle UART handle pointer.
- */
-void HAL_UartIsrFunction(hal_uart_handle_t handle);
-#endif
-
-#if defined(__cplusplus)
-}
-#endif
-/*! @}*/
-#endif /* __HAL_UART_ADAPTER_H__ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/components/uart/usart_adapter.c b/platform/ext/target/nxp/common/Native_Driver/components/uart/usart_adapter.c
deleted file mode 100755
index 1628a9e6d6..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/components/uart/usart_adapter.c
+++ /dev/null
@@ -1,643 +0,0 @@
-/*
- * Copyright 2018 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_common.h"
-#include "fsl_usart.h"
-#include "fsl_flexcomm.h"
-
-#include "uart.h"
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-#ifndef NDEBUG
-#if (defined(DEBUG_CONSOLE_ASSERT_DISABLE) && (DEBUG_CONSOLE_ASSERT_DISABLE > 0U))
-#undef assert
-#define assert(n)
-#endif
-#endif
-
-#if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
-/*! @brief uart RX state structure. */
-typedef struct _hal_uart_receive_state
-{
- volatile uint8_t *buffer;
- volatile uint32_t bufferLength;
- volatile uint32_t bufferSofar;
-} hal_uart_receive_state_t;
-
-/*! @brief uart TX state structure. */
-typedef struct _hal_uart_send_state
-{
- volatile uint8_t *buffer;
- volatile uint32_t bufferLength;
- volatile uint32_t bufferSofar;
-} hal_uart_send_state_t;
-#endif
-/*! @brief uart state structure. */
-typedef struct _hal_uart_state
-{
-#if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
- hal_uart_transfer_callback_t callback;
- void *callbackParam;
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
- usart_handle_t hardwareHandle;
-#endif
- hal_uart_receive_state_t rx;
- hal_uart_send_state_t tx;
-#endif
- uint8_t instance;
-} hal_uart_state_t;
-
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-
-/*******************************************************************************
- * Variables
- ******************************************************************************/
-static USART_Type *const s_UsartAdapterBase[] = USART_BASE_PTRS;
-
-#if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
-
-#if !(defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
-/* Array of USART IRQ number. */
-static const IRQn_Type s_UsartIRQ[] = USART_IRQS;
-#endif
-
-#endif
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
-static hal_uart_status_t HAL_UartGetStatus(status_t status)
-{
- hal_uart_status_t uartStatus = kStatus_HAL_UartError;
- switch (status)
- {
- case kStatus_Success:
- uartStatus = kStatus_HAL_UartSuccess;
- break;
- case kStatus_USART_TxBusy:
- uartStatus = kStatus_HAL_UartTxBusy;
- break;
- case kStatus_USART_RxBusy:
- uartStatus = kStatus_HAL_UartRxBusy;
- break;
- case kStatus_USART_TxIdle:
- uartStatus = kStatus_HAL_UartTxIdle;
- break;
- case kStatus_USART_RxIdle:
- uartStatus = kStatus_HAL_UartRxIdle;
- break;
- case kStatus_USART_BaudrateNotSupport:
- uartStatus = kStatus_HAL_UartBaudrateNotSupport;
- break;
- case kStatus_USART_NoiseError:
- case kStatus_USART_FramingError:
- case kStatus_USART_ParityError:
- uartStatus = kStatus_HAL_UartProtocolError;
- break;
- default:
- break;
- }
- return uartStatus;
-}
-#else
-static hal_uart_status_t HAL_UartGetStatus(status_t status)
-{
- if (kStatus_Success == status)
- {
- return kStatus_HAL_UartSuccess;
- }
- else
- {
- return kStatus_HAL_UartError;
- }
-}
-#endif
-
-#if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
-
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
-static void HAL_UartCallback(USART_Type *base, usart_handle_t *handle, status_t status, void *callbackParam)
-{
- hal_uart_state_t *uartHandle;
- hal_uart_status_t uartStatus = HAL_UartGetStatus(status);
- assert(callbackParam);
-
- uartHandle = (hal_uart_state_t *)callbackParam;
-
- if (kStatus_HAL_UartProtocolError == uartStatus)
- {
- if (uartHandle->hardwareHandle.rxDataSize)
- {
- uartStatus = kStatus_HAL_UartError;
- }
- }
-
- if (uartHandle->callback)
- {
- uartHandle->callback(uartHandle, uartStatus, uartHandle->callbackParam);
- }
-}
-
-#else
-
-static void HAL_UartInterruptHandle(USART_Type *base, void *handle)
-{
- hal_uart_state_t *uartHandle = (hal_uart_state_t *)handle;
- uint32_t status;
- uint8_t instance;
-
- if (NULL == uartHandle)
- {
- return;
- }
- instance = uartHandle->instance;
-
- status = USART_GetStatusFlags(s_UsartAdapterBase[instance]);
-
- /* Receive data register full */
- if ((USART_FIFOSTAT_RXNOTEMPTY_MASK & status) &&
- (USART_GetEnabledInterrupts(s_UsartAdapterBase[instance]) & USART_FIFOINTENSET_RXLVL_MASK))
- {
- if (uartHandle->rx.buffer)
- {
- uartHandle->rx.buffer[uartHandle->rx.bufferSofar++] = USART_ReadByte(s_UsartAdapterBase[instance]);
- if (uartHandle->rx.bufferSofar >= uartHandle->rx.bufferLength)
- {
- USART_DisableInterrupts(s_UsartAdapterBase[instance],
- USART_FIFOINTENCLR_RXLVL_MASK | USART_FIFOINTENCLR_RXERR_MASK);
- uartHandle->rx.buffer = NULL;
- if (uartHandle->callback)
- {
- uartHandle->callback(uartHandle, kStatus_HAL_UartRxIdle, uartHandle->callbackParam);
- }
- }
- }
- }
-
- /* Send data register empty and the interrupt is enabled. */
- if ((USART_FIFOSTAT_TXNOTFULL_MASK & status) &&
- (USART_GetEnabledInterrupts(s_UsartAdapterBase[instance]) & USART_FIFOINTENSET_TXLVL_MASK))
- {
- if (uartHandle->tx.buffer)
- {
- USART_WriteByte(s_UsartAdapterBase[instance], uartHandle->tx.buffer[uartHandle->tx.bufferSofar++]);
- if (uartHandle->tx.bufferSofar >= uartHandle->tx.bufferLength)
- {
- USART_DisableInterrupts(s_UsartAdapterBase[instance], USART_FIFOINTENCLR_TXLVL_MASK);
- uartHandle->tx.buffer = NULL;
- if (uartHandle->callback)
- {
- uartHandle->callback(uartHandle, kStatus_HAL_UartTxIdle, uartHandle->callbackParam);
- }
- }
- }
- }
-
-#if 1
- USART_ClearStatusFlags(s_UsartAdapterBase[instance], status);
-#endif
-}
-#endif
-
-#endif
-
-hal_uart_status_t HAL_UartInit(hal_uart_handle_t handle, hal_uart_config_t *config)
-{
- hal_uart_state_t *uartHandle;
- usart_config_t usartConfig;
- status_t status;
- assert(handle);
- assert(config);
- assert(config->instance < (sizeof(s_UsartAdapterBase) / sizeof(USART_Type *)));
- assert(s_UsartAdapterBase[config->instance]);
-
- if (HAL_UART_HANDLE_SIZE < sizeof(hal_uart_state_t))
- {
- return kStatus_HAL_UartError;
- }
-
- USART_GetDefaultConfig(&usartConfig);
- usartConfig.baudRate_Bps = config->baudRate_Bps;
-
- if (kHAL_UartParityEven == config->parityMode)
- {
- usartConfig.parityMode = kUSART_ParityEven;
- }
- else if (kHAL_UartParityOdd == config->parityMode)
- {
- usartConfig.parityMode = kUSART_ParityOdd;
- }
- else
- {
- usartConfig.parityMode = kUSART_ParityDisabled;
- }
-
- if (kHAL_UartTwoStopBit == config->stopBitCount)
- {
- usartConfig.stopBitCount = kUSART_TwoStopBit;
- }
- else
- {
- usartConfig.stopBitCount = kUSART_OneStopBit;
- }
- usartConfig.enableRx = config->enableRx;
- usartConfig.enableTx = config->enableTx;
- usartConfig.txWatermark = kUSART_TxFifo0;
- usartConfig.rxWatermark = kUSART_RxFifo1;
-
- status = USART_Init(s_UsartAdapterBase[config->instance], &usartConfig, config->srcClock_Hz);
-
- if (kStatus_Success != status)
- {
- return HAL_UartGetStatus(status);
- }
-
- uartHandle = (hal_uart_state_t *)handle;
- uartHandle->instance = config->instance;
-
-#if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
-
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
- USART_TransferCreateHandle(s_UsartAdapterBase[config->instance], &uartHandle->hardwareHandle,
- (usart_transfer_callback_t)HAL_UartCallback, handle);
-#else
- /* Enable interrupt in NVIC. */
- FLEXCOMM_SetIRQHandler(s_UsartAdapterBase[config->instance], (flexcomm_irq_handler_t)HAL_UartInterruptHandle,
- handle);
- NVIC_SetPriority((IRQn_Type)s_UsartIRQ[config->instance], HAL_UART_ISR_PRIORITY);
- EnableIRQ(s_UsartIRQ[config->instance]);
-#endif
-
-#endif
-
- return kStatus_HAL_UartSuccess;
-}
-
-hal_uart_status_t HAL_UartDeinit(hal_uart_handle_t handle)
-{
- hal_uart_state_t *uartHandle;
-
- assert(handle);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- USART_Deinit(s_UsartAdapterBase[uartHandle->instance]);
-
- return kStatus_HAL_UartSuccess;
-}
-
-hal_uart_status_t HAL_UartReceiveBlocking(hal_uart_handle_t handle, uint8_t *data, size_t length)
-{
- hal_uart_state_t *uartHandle;
- status_t status;
- assert(handle);
- assert(data);
- assert(length);
-
- uartHandle = (hal_uart_state_t *)handle;
-
-#if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
- if (uartHandle->rx.buffer)
- {
- return kStatus_HAL_UartRxBusy;
- }
-#endif
-
- status = USART_ReadBlocking(s_UsartAdapterBase[uartHandle->instance], data, length);
-
- return HAL_UartGetStatus(status);
-}
-
-hal_uart_status_t HAL_UartSendBlocking(hal_uart_handle_t handle, const uint8_t *data, size_t length)
-{
- hal_uart_state_t *uartHandle;
- assert(handle);
- assert(data);
- assert(length);
-
- uartHandle = (hal_uart_state_t *)handle;
-
-#if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
- if (uartHandle->tx.buffer)
- {
- return kStatus_HAL_UartTxBusy;
- }
-#endif
-
- USART_WriteBlocking(s_UsartAdapterBase[uartHandle->instance], data, length);
-
- return kStatus_HAL_UartSuccess;
-}
-
-hal_uart_status_t HAL_UartEnterLowpower(hal_uart_handle_t handle)
-{
- assert(handle);
-
- return kStatus_HAL_UartSuccess;
-}
-
-hal_uart_status_t HAL_UartExitLowpower(hal_uart_handle_t handle)
-{
- assert(handle);
-
- return kStatus_HAL_UartSuccess;
-}
-
-#if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
-
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
-
-hal_uart_status_t HAL_UartTransferInstallCallback(hal_uart_handle_t handle,
- hal_uart_transfer_callback_t callback,
- void *callbackParam)
-{
- hal_uart_state_t *uartHandle;
-
- assert(handle);
- assert(HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- uartHandle->callbackParam = callbackParam;
- uartHandle->callback = callback;
-
- return kStatus_HAL_UartSuccess;
-}
-
-hal_uart_status_t HAL_UartTransferReceiveNonBlocking(hal_uart_handle_t handle, hal_uart_transfer_t *transfer)
-{
- hal_uart_state_t *uartHandle;
- status_t status;
- assert(handle);
- assert(transfer);
- assert(HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- status = USART_TransferReceiveNonBlocking(s_UsartAdapterBase[uartHandle->instance], &uartHandle->hardwareHandle,
- (usart_transfer_t *)transfer, NULL);
-
- return HAL_UartGetStatus(status);
-}
-
-hal_uart_status_t HAL_UartTransferSendNonBlocking(hal_uart_handle_t handle, hal_uart_transfer_t *transfer)
-{
- hal_uart_state_t *uartHandle;
- status_t status;
- assert(handle);
- assert(transfer);
- assert(HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- status = USART_TransferSendNonBlocking(s_UsartAdapterBase[uartHandle->instance], &uartHandle->hardwareHandle,
- (usart_transfer_t *)transfer);
-
- return HAL_UartGetStatus(status);
-}
-
-hal_uart_status_t HAL_UartTransferGetReceiveCount(hal_uart_handle_t handle, uint32_t *count)
-{
- hal_uart_state_t *uartHandle;
- status_t status;
- assert(handle);
- assert(count);
- assert(HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- status =
- USART_TransferGetReceiveCount(s_UsartAdapterBase[uartHandle->instance], &uartHandle->hardwareHandle, count);
-
- return HAL_UartGetStatus(status);
-}
-
-hal_uart_status_t HAL_UartTransferGetSendCount(hal_uart_handle_t handle, uint32_t *count)
-{
- hal_uart_state_t *uartHandle;
- status_t status;
- assert(handle);
- assert(count);
- assert(HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- status = USART_TransferGetSendCount(s_UsartAdapterBase[uartHandle->instance], &uartHandle->hardwareHandle, count);
-
- return HAL_UartGetStatus(status);
-}
-
-hal_uart_status_t HAL_UartTransferAbortReceive(hal_uart_handle_t handle)
-{
- hal_uart_state_t *uartHandle;
- assert(handle);
- assert(HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- USART_TransferAbortReceive(s_UsartAdapterBase[uartHandle->instance], &uartHandle->hardwareHandle);
-
- return kStatus_HAL_UartSuccess;
-}
-
-hal_uart_status_t HAL_UartTransferAbortSend(hal_uart_handle_t handle)
-{
- hal_uart_state_t *uartHandle;
- assert(handle);
- assert(HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- USART_TransferAbortSend(s_UsartAdapterBase[uartHandle->instance], &uartHandle->hardwareHandle);
-
- return kStatus_HAL_UartSuccess;
-}
-
-#else
-
-/* None transactional API with non-blocking mode. */
-hal_uart_status_t HAL_UartInstallCallback(hal_uart_handle_t handle,
- hal_uart_transfer_callback_t callback,
- void *callbackParam)
-{
- hal_uart_state_t *uartHandle;
-
- assert(handle);
- assert(!HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- uartHandle->callbackParam = callbackParam;
- uartHandle->callback = callback;
-
- return kStatus_HAL_UartSuccess;
-}
-
-hal_uart_status_t HAL_UartReceiveNonBlocking(hal_uart_handle_t handle, uint8_t *data, size_t length)
-{
- hal_uart_state_t *uartHandle;
- assert(handle);
- assert(data);
- assert(length);
- assert(!HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- if (uartHandle->rx.buffer)
- {
- return kStatus_HAL_UartRxBusy;
- }
-
- uartHandle->rx.bufferLength = length;
- uartHandle->rx.bufferSofar = 0;
- uartHandle->rx.buffer = data;
- USART_EnableInterrupts(s_UsartAdapterBase[uartHandle->instance], USART_FIFOINTENSET_RXLVL_MASK);
- return kStatus_HAL_UartSuccess;
-}
-
-hal_uart_status_t HAL_UartSendNonBlocking(hal_uart_handle_t handle, uint8_t *data, size_t length)
-{
- hal_uart_state_t *uartHandle;
- assert(handle);
- assert(data);
- assert(length);
- assert(!HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- if (uartHandle->tx.buffer)
- {
- return kStatus_HAL_UartTxBusy;
- }
- uartHandle->tx.bufferLength = length;
- uartHandle->tx.bufferSofar = 0;
- uartHandle->tx.buffer = (volatile uint8_t *)data;
- USART_EnableInterrupts(s_UsartAdapterBase[uartHandle->instance], USART_FIFOINTENSET_TXLVL_MASK);
- return kStatus_HAL_UartSuccess;
-}
-
-hal_uart_status_t HAL_UartGetReceiveCount(hal_uart_handle_t handle, uint32_t *reCount)
-{
- hal_uart_state_t *uartHandle;
- assert(handle);
- assert(reCount);
- assert(!HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- if (uartHandle->rx.buffer)
- {
- *reCount = uartHandle->rx.bufferSofar;
- return kStatus_HAL_UartSuccess;
- }
- return kStatus_HAL_UartError;
-}
-
-hal_uart_status_t HAL_UartGetSendCount(hal_uart_handle_t handle, uint32_t *seCount)
-{
- hal_uart_state_t *uartHandle;
- assert(handle);
- assert(seCount);
- assert(!HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- if (uartHandle->tx.buffer)
- {
- *seCount = uartHandle->tx.bufferSofar;
- return kStatus_HAL_UartSuccess;
- }
- return kStatus_HAL_UartError;
-}
-
-hal_uart_status_t HAL_UartAbortReceive(hal_uart_handle_t handle)
-{
- hal_uart_state_t *uartHandle;
- assert(handle);
- assert(!HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- if (uartHandle->rx.buffer)
- {
- USART_DisableInterrupts(s_UsartAdapterBase[uartHandle->instance],
- USART_FIFOINTENCLR_RXLVL_MASK | USART_FIFOINTENCLR_RXERR_MASK);
- uartHandle->rx.buffer = NULL;
- }
-
- return kStatus_HAL_UartSuccess;
-}
-
-hal_uart_status_t HAL_UartAbortSend(hal_uart_handle_t handle)
-{
- hal_uart_state_t *uartHandle;
- assert(handle);
- assert(!HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
- if (uartHandle->tx.buffer)
- {
- USART_DisableInterrupts(s_UsartAdapterBase[uartHandle->instance], USART_FIFOINTENCLR_TXLVL_MASK);
- uartHandle->tx.buffer = NULL;
- }
-
- return kStatus_HAL_UartSuccess;
-}
-
-#endif
-
-#if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
-
-void HAL_UartIsrFunction(hal_uart_handle_t handle)
-{
- hal_uart_state_t *uartHandle;
- assert(handle);
- assert(HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
-#if 0
- DisableIRQ(s_UsartIRQ[uartHandle->instance]);
-#endif
- USART_TransferHandleIRQ(s_UsartAdapterBase[uartHandle->instance], &uartHandle->hardwareHandle);
-#if 0
- NVIC_SetPriority((IRQn_Type)s_UsartIRQ[uartHandle->instance], HAL_UART_ISR_PRIORITY);
- EnableIRQ(s_UsartIRQ[uartHandle->instance]);
-#endif
-}
-
-#else
-
-void HAL_UartIsrFunction(hal_uart_handle_t handle)
-{
- hal_uart_state_t *uartHandle;
- assert(handle);
- assert(!HAL_UART_TRANSFER_MODE);
-
- uartHandle = (hal_uart_state_t *)handle;
-
-#if 0
- DisableIRQ(s_UsartIRQ[uartHandle->instance]);
-#endif
- HAL_UartInterruptHandle(s_UsartAdapterBase[uartHandle->instance], (void *)uartHandle);
-#if 0
- NVIC_SetPriority((IRQn_Type)s_UsartIRQ[uartHandle->instance], HAL_UART_ISR_PRIORITY);
- EnableIRQ(s_UsartIRQ[uartHandle->instance]);
-#endif
-}
-
-#endif
-
-#endif
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_casper.c b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_casper.c
deleted file mode 100755
index 34c3c2a940..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_casper.c
+++ /dev/null
@@ -1,2668 +0,0 @@
-/*
- * Copyright 2018-2019 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_casper.h"
-#include <math.h> /* ceil TODO check if really need it */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/* Component ID definition, used by tools. */
-#ifndef FSL_COMPONENT_ID
-#define FSL_COMPONENT_ID "platform.drivers.casper"
-#endif
-
-#if defined(__GNUC__)
-/* Enforce O1 optimize level, specifically to remove strict-aliasing option.
- (-fno-strict-aliasing is required for this driver). */
-#pragma GCC push_options
-#pragma GCC optimize("-O1")
-#endif
-
-#define CASPER_RAM_BASE_NS (FSL_FEATURE_CASPER_RAM_BASE_ADDRESS)
-
-#if defined(FSL_FEATURE_CASPER_RAM_IS_INTERLEAVED) && FSL_FEATURE_CASPER_RAM_IS_INTERLEAVED
-#define CASPER_RAM_OFFSET (0xE)
-#define INTERLEAVE(addr) \
- (((((((addr) >> 2) & 0x00000001) << CASPER_RAM_OFFSET) + (((addr) >> 3) << 2) + ((addr)&0x00000003)) & 0xFFFF) | \
- s_casperRamBase)
-#define DEINTERLEAVE(addr) INTERLEAVE(addr)
-#define GET_WORD(addr) (*((uint32_t *)DEINTERLEAVE((uint32_t)(addr))))
-#define GET_DWORD(addr) (((uint64_t)GET_WORD(addr)) | (((uint64_t)GET_WORD(((uint32_t)(addr)) + 4)) << 32))
-#define SET_WORD(addr, value) *((uint32_t *)INTERLEAVE((uint32_t)(addr))) = ((uint32_t)(value))
-#define SET_DWORD(addr, value) \
- do \
- { \
- SET_WORD(addr, (uint32_t)(value & 0xFFFFFFFF)); \
- SET_WORD(((uint32_t)(addr)) + 4, (uint32_t)((value & 0xFFFFFFFF00000000) >> 32)); \
- } while (0)
-
-/* memcopy is always word aligned */
-/* interleaved to interleaved
- static void CASPER_MEMCPY_I2I(void *dst, const void *src, size_t siz)
- */
-#define CASPER_MEMCPY_I2I(dst, src, siz) \
- \
- { \
- uint32_t *dst32 = (uint32_t *)dst, *src32 = (uint32_t *)src; \
- uint32_t i; \
- for (i = 0; i < siz / 4; i++) \
- { \
- SET_WORD(&dst32[i], GET_WORD(&src32[i])); \
- } \
- }
-
-/* interleaved to non-interleaved
- static void CASPER_MEMCPY_I2N(void *dst, const void *src, size_t siz)
- */
-#define CASPER_MEMCPY_I2N(dst, src, siz) \
- \
- { \
- uint32_t *dst32 = (uint32_t *)dst, *src32 = (uint32_t *)src; \
- uint32_t i; \
- for (i = 0; i < siz / 4; i++) \
- { \
- dst32[i] = GET_WORD(&src32[i]); \
- } \
- }
-
-/* non-interleaved to interleaved
- static void CASPER_MEMCPY_N2I(void *dst, const void *src, size_t siz)
- */
-#define CASPER_MEMCPY_N2I(dst, src, siz) \
- \
- { \
- volatile uint32_t *dst32 = (uint32_t *)dst, *src32 = (uint32_t *)src; \
- volatile uint32_t i; \
- for (i = 0; i < siz / 4; i++) \
- { \
- SET_WORD(&dst32[i], src32[i]); \
- } \
- }
-#else
-#define GET_WORD(addr) (*((uint32_t *)(addr)))
-#define GET_DWORD(addr) (*((uint64_t *)(addr)))
-#define SET_WORD(addr, value) *((uint32_t *)(addr)) = ((uint32_t)(value))
-#define SET_DWORD(addr, value) *((uint64_t *)(addr)) = ((uint64_t)(value))
-
-#define CASPER_MEMCPY_I2I(dst, src, siz) memcpy(dst, src, siz)
-#define CASPER_MEMCPY_I2N(dst, src, siz) memcpy(dst, src, siz)
-#define CASPER_MEMCPY_N2I(dst, src, siz) memcpy(dst, src, siz)
-#endif
-
-#define WORK_BUFF_MUL4 (N_wordlen_max * 4 + 2) /* ! working buffer is 4xN_wordlen to allow in place math */
-#define N_bytelen (N_wordlen * 4) /* for memory copy and the like */
-#define N_dwordlen (N_wordlen / 2)
-
-#define PreZeroW(i, w_out) \
- for (i = 0; i < N_wordlen; i += 4) \
- { \
- SET_WORD(&w_out[i + 0], 0); \
- SET_WORD(&w_out[i + 1], 0); \
- SET_WORD(&w_out[i + 2], 0); \
- SET_WORD(&w_out[i + 3], 0); \
- } /* unrolled partly */
-#define PreZeroW2up(i, w_out) \
- for (i = N_wordlen; i <= N_wordlen * 2; i += 4) \
- { \
- SET_WORD(&w_out[i + 0], 0); \
- SET_WORD(&w_out[i + 1], 0); \
- SET_WORD(&w_out[i + 2], 0); \
- SET_WORD(&w_out[i + 3], 0); \
- } /* unrolled partly */
-
-/* Macros for the ECC component in Casper */
-
-/* CASPER memory layout for ECC */
-#define CASPER_NUM_LIMBS (NUM_LIMBS + 4) // number of limbs needed by CASPER is 2 double words longer
-
-#define CASPER_MEM ((uint32_t *)msg_ret)
-#define CASPER_OFFSET CASPER_NUM_LIMBS // offset in the CASPER memory where we can start writing
-
-#define MOD_SCRATCH_START (CASPER_OFFSET)
-#define MOD_SCRATCH_SIZE (1 * CASPER_NUM_LIMBS)
-
-#define INOUT_SCRATCH_START (MOD_SCRATCH_START + MOD_SCRATCH_SIZE)
-#define INOUT_SCRATCH_SIZE ((3 * 3) * CASPER_NUM_LIMBS)
-
-#define ECC_SCRATCH_START (INOUT_SCRATCH_START + INOUT_SCRATCH_SIZE)
-#define ECC_SCRATCH_SIZE (9 * CASPER_NUM_LIMBS)
-
-#define LUT_SCRATCH_START (ECC_SCRATCH_START + ECC_SCRATCH_SIZE)
-#define LUT_SCRATCH_SIZE (48 * NUM_LIMBS + 3 * CASPER_NUM_LIMBS)
-
-/* Currently these macros work on 32-bit platforms */
-
-#define add(c1, c0, a, b) \
- \
- do \
- { \
- uint32_t _t; \
- _t = a + b; \
- c1 = (_t < a); \
- c0 = _t; \
- \
- } while (0)
-
-#define add_cout(carry, c, a, b) add(carry, c, a, b)
-
-#define add_cout_cin(carryout, c, a, b, carryin) \
- do \
- { \
- uint64_t _t = (uint64_t)a + b + carryin; \
- c = (uint32_t)_t; \
- carryout = (uint32_t)(_t >> 32); \
- } while (0)
-
-#define sub_borrowout(borrow, c, a, b) \
- do \
- { \
- uint32_t _b = (b > a); \
- c = a - b; \
- borrow = _b; \
- } while (0)
-
-#define sub_borrowin_borrowout(borrowout, c, a, b, borrowin) \
- do \
- { \
- uint32_t _t, _borrow1, _borrow2; \
- sub_borrowout(_borrow1, _t, a, b); \
- sub_borrowout(_borrow2, c, _t, borrowin); \
- borrowout = _borrow1 + _borrow2; \
- } while (0)
-
-#define sub_borrowout_1(borrow, c, a) \
- do \
- { \
- uint32_t _b = 0; \
- c = a - b; \
- borrow = _b; \
- } while (0)
-
-#define sub_borrowin_borrowout_1(borrowout, c, a, borrowin) \
- do \
- { \
- uint32_t _t, _borrow1, _borrow2; \
- sub_borrowout_1(_borrow1, _t, a); \
- sub_borrowout(_borrow2, c, _t, borrowin); \
- borrowout = _borrow1 + _borrow2; \
- } while (0)
-
-/* 32 x 32 --> 64-bit multiplication
- * (c1,c0) = a * b
- */
-#define mul(c1, c0, a, b) \
- \
- do \
- { \
- uint64_t __m; \
- __m = (uint64_t)a * (uint64_t)b; \
- c0 = (uint32_t)__m; \
- c1 = (uint32_t)(__m >> (uint64_t)32); \
- \
- } while (0)
-
-/* Multiply-and-accumulate
- * (c1,c0) = a*b+c0
- */
-#define muladd(c1, c0, a, b) \
- \
- do \
- { \
- uint32_t __ma = c0; \
- mul(c1, c0, a, b); \
- c0 = c0 + __ma; \
- c1 = c1 + (c0 < __ma); \
- \
- } while (0)
-
-/* Multiply-and-accumulate-accumulate
- * (c1,c0) = a*b+c0+c1
- */
-#define muladdadd(c1, c0, a, b) \
- \
- do \
- { \
- uint32_t __maa0 = c0, __maa1 = c1; \
- mul(c1, c0, a, b); \
- c0 = c0 + __maa0; \
- c1 = c1 + (c0 < __maa0); \
- c0 = c0 + __maa1; \
- c1 = c1 + (c0 < __maa1); \
- \
- } while (0)
-
-#if CASPER_ECC_P256
-
-/* Recoding length for the secure scalar multiplication:
- * Use n=256 and w=4 --> compute ciel(384/3) = 86 + 1 digits
- */
-#define CASPER_RECODE_LENGTH 87
-#define invert(c, a) invert_mod_p256(c, a)
-#define ONE NISTr256
-
-/* Shift right by 1 <= c <= 31. z[] and x[] in system RAM, no interleaving macros used. */
-#define shiftrightSysram(z, x, c) \
- do \
- { \
- z[0] = (x[1] << (32 - (c))) | (x[0] >> (c)); \
- z[1] = (x[2] << (32 - (c))) | (x[1] >> (c)); \
- z[2] = (x[3] << (32 - (c))) | (x[2] >> (c)); \
- z[3] = (x[4] << (32 - (c))) | (x[3] >> (c)); \
- z[4] = (x[5] << (32 - (c))) | (x[4] >> (c)); \
- z[5] = (x[6] << (32 - (c))) | (x[5] >> (c)); \
- z[6] = (x[7] << (32 - (c))) | (x[6] >> (c)); \
- z[7] = (x[7] >> (c)); \
- } while (0)
-
-#elif CASPER_ECC_P384
-
-/* Recoding length for the secure scalar multiplication:
- * Use n=384 and w=4 --> compute ciel(384/3) = 128 + 1 digits
- */
-#define CASPER_RECODE_LENGTH 129
-#define invert(c, a) invert_mod_p384(c, a)
-#define ONE NISTr384
-
-/* Shift right by 1 <= c <= 31. z[] and x[] in system RAM, no interleaving macros used. */
-#define shiftrightSysram(z, x, c) \
- do \
- { \
- z[0] = (x[1] << (32 - (c))) | (x[0] >> (c)); \
- z[1] = (x[2] << (32 - (c))) | (x[1] >> (c)); \
- z[2] = (x[3] << (32 - (c))) | (x[2] >> (c)); \
- z[3] = (x[4] << (32 - (c))) | (x[3] >> (c)); \
- z[4] = (x[5] << (32 - (c))) | (x[4] >> (c)); \
- z[5] = (x[6] << (32 - (c))) | (x[5] >> (c)); \
- z[6] = (x[7] << (32 - (c))) | (x[6] >> (c)); \
- z[7] = (x[8] << (32 - (c))) | (x[7] >> (c)); \
- z[8] = (x[9] << (32 - (c))) | (x[8] >> (c)); \
- z[9] = (x[10] << (32 - (c))) | (x[9] >> (c)); \
- z[10] = (x[11] << (32 - (c))) | (x[10] >> (c)); \
- z[11] = (x[11] >> (c)); \
- } while (0)
-
-#else
-#error "Define proper NIST curve"
-#endif
-
-#define multiply_casper(c, a, b) MultprecCiosMul_ct(c, a, b, &CASPER_MEM[MOD_SCRATCH_START], Np)
-#define square_casper(c, a) multiply_casper(c, a, a)
-#define sub_casper(c, a, b) CASPER_montsub(c, a, b, &CASPER_MEM[MOD_SCRATCH_START])
-#define add_casper(c, a, b) CASPER_montadd(c, a, b, &CASPER_MEM[MOD_SCRATCH_START])
-#define mul2_casper(c, a) add_casper(c, a, a)
-#define half(c, a, b) CASPER_half(c, a, b)
-#define copy(c, a) CASPER_MEMCPY(c, a, NUM_LIMBS * sizeof(uint32_t))
-
-/*******************************************************************************
- * Variables
- ******************************************************************************/
-
-/* The model for this algo is that it can be implemented for a fixed size RSA key */
-/* for max speed. If this is made into a variable (to allow varying size), then */
-/* it will be slower by a bit. */
-/* The file is compiled with N_bitlen passed in as number of bits of the RSA key */
-/* #define N_bitlen 2048 */
-static size_t N_wordlen = 0; /* ! number of words (e.g. 4096/32 is 128 words) */
-
-static uint32_t s_casperRamBase = CASPER_RAM_BASE_NS;
-static unsigned *msg_ret = (unsigned *)CASPER_RAM_BASE_NS;
-
-#if CASPER_ECC_P256
-/* NISTp-256 = 2^256-2^224+2^192+2^96-1 */
-static uint32_t NISTp256[NUM_LIMBS] = {0xffffffff, 0xffffffff, 0xffffffff, 0x00000000,
- 0x00000000, 0x00000000, 0x00000001, 0xffffffff};
-
-/* The cardinality of the curve E(F_p) */
-static uint32_t NISTp256_q[NUM_LIMBS] = {0xfc632551, 0xf3b9cac2, 0xa7179e84, 0xbce6faad,
- 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff};
-
-/* R = 2^256 mod p, the value "1" in Montgomery form. */
-static uint32_t NISTr256[NUM_LIMBS] = {0x00000001, 0x00000000, 0x00000000, 0xffffffff,
- 0xffffffff, 0xffffffff, 0xfffffffe, 0x00000000};
-
-static uint32_t Np[2] = {1, 0};
-#endif /* CASPER_ECC_P256 */
-
-#if CASPER_ECC_P384
-/* NISTp-384 = 2^384 - 2^128 - 2^96 + 2^32 - 1 */
-static uint32_t NISTp384[NUM_LIMBS] = {0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xfffffffe, 0xffffffff,
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff};
-
-/* The cardinality of the curve E(F_p) */
-static uint32_t NISTp384_q[NUM_LIMBS] = {0xccc52973, 0xecec196a, 0x48b0a77a, 0x581a0db2, 0xf4372ddf, 0xc7634d81,
- 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff};
-
-/* R = 2^256 mod p, the value "1" in Montgomery form. */
-static uint32_t NISTr384[NUM_LIMBS] = {0x00000001, 0xffffffff, 0xffffffff, 0x00000000, 0x1, 0, 0, 0, 0, 0, 0, 0};
-
-// -p^-1 mod 2^64 = 0x100000001
-static uint32_t Np[2] = {1, 1};
-#endif /* CASPER_ECC_P384 */
-
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-
-/* Convert a projective point (X1 : Y1 : Z1)
- * to the affine point (X3, Y3) = (X1/Z1^2,Y1/Z1^3)
- * The memory of (X3, Y3) and (X1 : Y1 : Z1) should not overlap
- */
-void Jac_toAffine(uint32_t *X3, uint32_t *Y3, uint32_t *X1, uint32_t *Y1, uint32_t *Z1);
-
-/* Return 1 if (X1: Y1: Z1) is on the curve
- * Y^2 = X^3 -3XZ^4 + bZ^6
- * and return 0 otherwise.
- */
-int Jac_oncurve(uint32_t *X1, uint32_t *Y1, uint32_t *Z1, uint32_t *b);
-
-/* Compute (X3 : Y3: Z3) = (X1: Y1: Z1) + (X2 : Y2 : Z2)
- * where (X1: Y1: Z1) != (X2 : Y2 : Z2)
- * (X3 : Y3: Z3) may be the same as one of the inputs.
- */
-void Jac_addition(uint32_t *X3,
- uint32_t *Y3,
- uint32_t *Z3,
- uint32_t *X1,
- uint32_t *Y1,
- uint32_t *Z1,
- uint32_t *X2,
- uint32_t *Y2,
- uint32_t *Z2);
-
-/* Compute (X3 : Y3: Z3) = (X1: Y1: Z1) + (X2, Y2)
- * where (X1: Y1: Z1) != (X2, Y2)
- * (X3 : Y3: Z3) may not overlap with (X1: Y1: Z1).
- * Source: 2004 Hankerson–Menezes–Vanstone, page 91.
- */
-void Jac_add_affine(
- uint32_t *X3, uint32_t *Y3, uint32_t *Z3, uint32_t *X1, uint32_t *Y1, uint32_t *Z1, uint32_t *X2, uint32_t *Y2);
-
-/* Point doubling from: 2004 Hankerson–Menezes–Vanstone, page 91.
- * Compute (X3 : Y3: Z3) = (X1: Y1: Z1) + (X1 : Y1 : Z1)
- * (X3 : Y3: Z3) may be the same as the input.
- */
-void Jac_double(uint32_t *X3, uint32_t *Y3, uint32_t *Z3, uint32_t *X1, uint32_t *Y1, uint32_t *Z1);
-
-/* Constant time elliptic curve scalar multiplication.
- * Source: https://eprint.iacr.org/2014/130.pdf
- * when using w = 4.
- * Computes (X3 : Y3 : Z3) = k * (X1, Y1) \in E(F_p)
- * p is the prime used to define the finite field F_p
- * q is the (prime) order of the curve
- */
-void Jac_scalar_multiplication(
- uint32_t *X3, uint32_t *Y3, uint32_t *Z3, uint32_t *X1, uint32_t *Y1, uint32_t *k, uint32_t *p, uint32_t *q);
-
-/* Compute the double scalar multiplication
- * (X3 : Y3 : Z3) = k1 * (X1, Y1) + k2 * (X2, Y2)
- * Using Shamir's trick and precomputing 16 points.
- * This code is *not* constant time since this is used
- * for verification only.
- */
-void double_scalar_multiplication(uint32_t *X3,
- uint32_t *Y3,
- uint32_t *Z3,
- uint32_t *X1,
- uint32_t *Y1,
- uint32_t *k1,
- uint32_t *X2,
- uint32_t *Y2,
- uint32_t *k2);
-
-#if CASPER_ECC_P384
-/* Compute inversion modulo NIST-p384 using Fermats little theorem.
- * Using c = a^(p-2) = a^(-1) mod p.
- * This computes the modular inversion if all arithmetic is "regular"
- * modular arithmetic or computes automatically the Montgomery inverse
- * if all arithmetic is Montgomery arithmetic.
- */
-static void invert_mod_p384(uint32_t *c, uint32_t *a);
-#endif /* CASPER_ECC_P384 */
-
-#if CASPER_ECC_P256
-/* Modular inversion for NIST-P256 */
-static void invert_mod_p256(uint32_t *c, uint32_t *a);
-#endif /* CASPER_ECC_P256 */
-
-// A and C do not need to be in Casper memory
-static void toMontgomery(uint32_t *C, uint32_t *A);
-
-static void CASPER_montsub(uint32_t *C, uint32_t *A, uint32_t *B, uint32_t *mod);
-static void CASPER_montadd(uint32_t *C, uint32_t *A, uint32_t *B, uint32_t *mod);
-
-/* Compute c = a/2 mod p where b is scratch space. */
-static void CASPER_half(uint32_t *c, uint32_t *a, uint32_t *b);
-
-static uint8_t int8abs(int8_t v);
-
-/* Constant time select c = a if m = 0 or
- * c = b if m = 1
- * a, b, c are n words
- */
-static void casper_select(uint32_t *c, uint32_t *a, uint32_t *b, int m, int n);
-
-/* Dumb n-limb addition of c=a+b, return carry. */
-static uint32_t add_n_1(uint32_t *c, uint32_t *a, uint32_t b, int n);
-
-#if 0
-/* Dumb n-limb addition of c=a+b, return carry. */
-static uint32_t add_n(uint32_t *c, uint32_t *a, uint32_t *b, int n);
-
-/* Dumb n-limb subtraction of c=a-b, return borrow. */
-static uint32_t sub_n_1(uint32_t *c, uint32_t *a, uint32_t b, int n);
-#endif
-
-/* Dumb n-limb subtraction of c=a-b, return borrow. */
-static uint32_t sub_n(uint32_t *c, uint32_t *a, uint32_t *b, int n);
-
-static void MultprecCiosMul_ct(
- uint32_t w_out[], const uint32_t a[], const uint32_t b[], const uint32_t Nmod[], const uint32_t *Np);
-
-static void shiftright(uint32_t *z, uint32_t *x, int c);
-static void shiftleft(uint32_t *z, uint32_t *x, int c);
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-__STATIC_FORCEINLINE uint32_t CA_MK_OFF(const void *addr)
-{
- return ((uint32_t)addr - s_casperRamBase);
-}
-
-#if 1
-__STATIC_FORCEINLINE void Accel_done(void)
-{
- register uint32_t status;
- do
- {
- status = CASPER->STATUS;
- } while (0 == (status & CASPER_STATUS_DONE_MASK));
-}
-
-__STATIC_FORCEINLINE void Accel_SetABCD_Addr(uint32_t ab, uint32_t cd)
-{
- CASPER->CTRL0 = ab | (cd << 16); /* CDoffset << 16 | ABoffset */
-}
-
-__STATIC_FORCEINLINE void Accel_crypto_mul(uint32_t ctrl1)
-{
- CASPER->CTRL1 = ctrl1;
-}
-#else
-#include "intrinsics.h"
-#define Accel_done() \
- { \
- register uint32_t status; \
- do \
- { \
- status = CASPER_Rd32b(CASPER_CP_STATUS); \
- } while (0 == (status & CASPER_STATUS_DONE_MASK)); \
- }
-#if 0
-__STATIC_FORCEINLINE void Accel_done(void)
-{
- register uint32_t status;
- do
- {
- status = CASPER->STATUS;
- } while (0 == (status & CASPER_STATUS_DONE_MASK));
-}
-#endif
-#define Accel_SetABCD_Addr(ab, cd) CASPER_Wr32b((uint32_t)ab | ((uint32_t)cd << 16), CASPER_CP_CTRL0);
-#define Accel_crypto_mul(ctrl1) CASPER_Wr32b((uint32_t)ctrl1, CASPER_CP_CTRL1);
-#endif
-
-__STATIC_FORCEINLINE uint32_t Accel_IterOpcodeResaddr(uint32_t iter, uint32_t opcode, uint32_t resAddr)
-{
- return CASPER_CTRL1_ITER(iter) | CASPER_CTRL1_MODE(opcode) | (resAddr << 16);
-}
-
-void CASPER_MEMCPY(void *dst, const void *src, size_t siz)
-{
- bool bdst = ((((uint32_t)dst) | 0x10000000u) >= (FSL_FEATURE_CASPER_RAM_BASE_ADDRESS | 0x10000000u) &&
- (((uint32_t)dst) | 0x10000000u) < (FSL_FEATURE_CASPER_RAM_BASE_ADDRESS | 0x10000000u) + 8u * 1024u);
-
- bool bsrc = ((((uint32_t)src) | 0x10000000u) >= (FSL_FEATURE_CASPER_RAM_BASE_ADDRESS | 0x10000000u) &&
- (((uint32_t)src) | 0x10000000u) < (FSL_FEATURE_CASPER_RAM_BASE_ADDRESS | 0x10000000u) + 8u * 1024u);
-
- if (bdst && bsrc)
- {
- CASPER_MEMCPY_I2I(dst, src, siz);
- }
- else if (bdst && !bsrc)
- {
- CASPER_MEMCPY_N2I(dst, src, siz);
- }
- else if (!bdst && bsrc)
- {
- CASPER_MEMCPY_I2N(dst, src, siz);
- }
- else
- {
- memcpy(dst, src, siz);
- }
-}
-
-/* Constant time select c = a if m = 0 or
- * c = b if m = 1
- * a, b, c are n words
- */
-static void casper_select(uint32_t *c, uint32_t *a, uint32_t *b, int m, int n)
-{
- uint32_t m1 = 0 - m, m2 = ~m1;
- int i;
-
- for (i = 0; i < n; i++)
- {
- SET_WORD(&c[i], (GET_WORD(&a[i]) & m2) | (GET_WORD(&b[i]) & m1));
- }
-}
-
-/* Compute R`, which is R mod N. This is done using subtraction */
-/* R has 1 in N_wordlen, but we do not fill it in since borrowed. */
-/* Exp-pubkey only used to optimize for exp=3 */
-void MultprecMontCalcRp(unsigned Rp[], const unsigned exp_pubkey, const unsigned Nmod[])
-{
- uint32_t i;
-
- /* R is 2^n where n is 1 bit longer than Nmod, so 1 followed by 32 or 64 0 words for example */
- /* Note that Nmod's upper most bit has to be 1 by definition, so one subtract is enough. We */
- /* do not set the 1 since it is "borrowed" so no point */
- PreZeroW(i, Rp);
- Accel_SetABCD_Addr(CA_MK_OFF(Nmod), 0);
- Accel_crypto_mul(Accel_IterOpcodeResaddr(N_dwordlen - 1, kCASPER_OpSub64, CA_MK_OFF(Rp)));
- Accel_done();
- /* final borrow cannot happen since we know we started with a larger number */
-}
-
-/* MultprecMultiply - multiple w=u*v (per Knuth) */
-/* w_out is 2x the size of u and v */
-void MultprecMultiply(unsigned w_out[], const unsigned u[], const unsigned v[])
-{
- uint32_t i, j;
-
- /* Knuth 4.3.1 - Algorithm M */
- /* Compute w = u * v */
- /* u and v are N bits long in 32 bit word form */
- /* w is 2*N bits long in 32 bit word form */
- /* Note: We just multiply in place */
-
- /* Step 1. Fill w[t-1:0] with 0s, the upper half will be written as we go */
- PreZeroW(i, w_out);
-
- /* We do 1st pass NOSUM so we do not have to 0 output */
- Accel_SetABCD_Addr(CA_MK_OFF(&v[0]), CA_MK_OFF(u));
- Accel_crypto_mul(Accel_IterOpcodeResaddr(N_wordlen / 2 - 1, kCASPER_OpMul6464NoSum, CA_MK_OFF(&w_out[0])));
- Accel_done();
- /* Step 2. iterate over N words of v using j */
- for (j = 2; j < N_wordlen; j += 2)
- {
- /* Step 2b. Check for 0 on v word - skip if so since we 0ed already */
- /* Step 3. Iterate over N words of u using i - perform Multiply-accumulate */
- if (GET_WORD(&v[j]) || GET_WORD(&v[j + 1]))
- {
- Accel_SetABCD_Addr(CA_MK_OFF(&v[j]), CA_MK_OFF(u));
- Accel_crypto_mul(Accel_IterOpcodeResaddr(N_wordlen / 2 - 1, kCASPER_OpMul6464Sum, CA_MK_OFF(&w_out[j])));
- Accel_done();
- }
- }
-}
-
-/* MultprecModulo performs divide to get remainer as needed for RSA */
-/* This performs (q,r) = u/v, but we do not keep q */
-/* r_out is module (remainder) and is 2*N */
-/* u is in r_out (1st N) at start (passed in) */
-/* v is N long */
-void MultprecModulo(unsigned r_out[], const unsigned v[], int top)
-{
- uint64_t u64; /* use 64 bit math mixed with 32 bit */
- unsigned u32; /* allows us to work on U in 32 bit */
- unsigned u_n, ul16, uh16, *u_shft; /* u_shft is because r_out is u initially */
- unsigned vl16, vh16, v_Nm1;
- unsigned q_hat, r_hat, q_over;
- unsigned borrow, carry;
- uint32_t i;
- int j, tmp;
-
- /* Knuth 4.3.1 - Algorithm D */
- /* Compute q = u / v giving remainder r = u mod v */
- /* -- we only want r, so we build qhat but do not store the Qs */
- /* v is N long, with u,q,r 2N long because u is slowly replavced by r. */
- /* We normalize/unnormlize per Knuth in the buffer (not copied) */
-
- /* Step 1. Normalize value so MSb is in v[n-1]. Remember that v is */
- /* the public key - to call it a 2048 bit number, they cannot have 0 */
- /* in the MSb (or it would be less than 2048 bits) and so we know we */
- /* are normalized already. Therefore, u is effectively shifted already. */
- /* For u, we have it in r_out. u[n] holds any overflow */
- /* Since divide on CM3/4 is 32/32=32, we break into 16 bit halves, but */
- /* multiply can be 32x32=64. */
- u_n = 0;
- u_shft = r_out; /* u (shifted) is in r_out */
-
- v_Nm1 = GET_WORD(&v[N_wordlen - 1]); /* MSw of public key */
- vl16 = v_Nm1 & 0xFFFF; /* lower 16 */
- vh16 = v_Nm1 >> 16; /* upper 16 */
- /* Step 2. Iterate j from m-n down to 0 (M selected per Knuth as 2*N) */
- for (j = top; j >= 0; j--)
- {
- /* Step 3. estimate q_hat as (U[j+n]*B + U[j+n-1]) / V[n-1] */
- /* Note: using subset of Knuth algo since v is 1/2 len of u (which is */
- /* from multiply or x^2 leading into this). */
- u32 = u_n; /* pickup u4u3u2, knowing u4 is 0 */
- u64 = ((uint64_t)u_n << 32) | GET_WORD(&u_shft[j + N_wordlen - 1]);
- ul16 = u64 & 0xFFFF; /* lower 16 */
- uh16 = (u64 >> 16) & 0xFFFF; /* upper 16 */
-
- /* we see if even possible (u large enough relative to v) */
- if ((u32 - v_Nm1) <= u32)
- {
- u32 -= v_Nm1;
- q_over = 1; /* overflow from the sub */
- }
- else
- q_over = 0;
-
- /* q_hat = u32 / vh16 -- is the upper partial value */
- /* estimate; if too much, then back down by 1 or 2 */
- q_hat = u32 / vh16;
- r_hat = u32 - (q_hat * vh16);
- /* see if Q is more than 16 bits or remainder is too large (over div) */
- if ((q_hat == 0x10000) || ((q_hat * vl16) > ((r_hat << 16) | uh16)))
- {
- /* too much - undo a division */
- q_hat--;
- r_hat += vh16;
- /* check if still too much */
- if ((r_hat < 0x10000) && ((q_hat * vl16) > ((r_hat << 16) | uh16)))
- q_hat--; /* yes, so undo a 2nd */
- }
-
- /* compose u3u2uh16, then sub q_hat*v if OK */
- u64 = (((uint64_t)u32 << 16) | uh16) - ((uint64_t)q_hat * v_Nm1);
- if (u64 >> 48)
- {
- /* no, so add v back */
- u32 = (unsigned)(u64 + v_Nm1);
- q_hat--;
- }
- else
- u32 = (unsigned)u64;
-
- tmp = q_hat << 16; /* quotient upper part */
-
- /* divide lower part: q = u2uh16ul16 / v. */
- /* estimate and add back if over divdied */
- q_hat = u32 / vh16;
- r_hat = u32 - (q_hat * vh16);
- if ((q_hat == 0x10000) || ((q_hat * vl16) > ((r_hat << 16) | ul16)))
- {
- /* too much - undo a division */
- q_hat--;
- r_hat += vh16;
- /* check if still too much */
- if ((r_hat < 0x10000) && ((q_hat * vl16) > ((r_hat << 16) | ul16)))
- q_hat--; /* yes, so undo a 2nd */
- }
-
- /* compose u2uh16ul16, then sub q_hat*v if OK */
- u64 = (((uint64_t)u32 << 16) | ul16) - ((uint64_t)q_hat * v_Nm1);
- if (u64 >> 48)
- {
- /* no, so add v back */
- r_hat = (unsigned)(u64 + v_Nm1);
- q_hat--;
- }
- else
- r_hat = (unsigned)u64;
-
- q_hat |= tmp; /* other half of the quotient */
- while (q_over || ((uint64_t)q_hat * GET_WORD(&v[N_wordlen - 2])) >
- ((1LL << 32) * r_hat) + (uint64_t)GET_WORD(&u_shft[j + N_wordlen - 2]))
- { /* if Qhat>b, then reduce to b-1, then adjust up Rhat */
- q_hat--;
- r_hat += v_Nm1;
- if (r_hat < v_Nm1)
- break; /* no overflow */
- /* else repeat since Rhat >= b */
- }
-
- /* Step 4. Multiply and subtract. We know the amount, */
- /* so we do the schoolboy math. Have to do on */
- /* the large value. */
- if (q_hat)
- {
- borrow = 0;
- for (i = 0; i < N_wordlen; i++)
- {
- u64 = (uint64_t)q_hat * GET_WORD(&v[i]) + borrow;
- borrow = (unsigned)(u64 >> 32);
- if (GET_WORD(&u_shft[i + j]) < (unsigned)u64)
- borrow++; /* carry the overflow */
- SET_WORD(&u_shft[i + j], GET_WORD(&u_shft[i + j]) - (unsigned)u64);
- }
- u_n -= borrow; /* overflow from shift left does not fit otherwise */
- }
-
- /* Store 5. (update Q - we don't), and add back V to remainder if we over-subtracted */
- /* That restores remainder to correct (we could only be off by 1) */
- /* This should happen very rarely. */
- if (u_n)
- {
- carry = 0;
- for (i = 0; i < N_wordlen; i++)
- {
- SET_WORD(&u_shft[i + j], GET_WORD(&u_shft[i + j]) + carry);
- carry = (GET_WORD(&u_shft[i + j]) < carry) ? 1 : 0;
- SET_WORD(&u_shft[i + j], GET_WORD(&u_shft[i + j]) + GET_WORD(&v[i]));
- if (GET_WORD(&u_shft[i + j]) < GET_WORD(&v[i]))
- carry++;
- }
- }
- u_n = GET_WORD(&u_shft[j + N_wordlen - 1]); /* hold upper part of u to catch overflow (to borrow from) */
- }
- /* low N bits of r are valid as remainder */
-}
-
-/* We convert X into a Mont form number. Note length of arrays: */
-/* x is N_wordlen, Nmod is N_wordlen */
-/* Rp is N_wordlen (it is R` which is R mod N) */
-/* Xmont_out is N_wordlen*2+1 */
-void MultprecMontPrepareX(unsigned Xmont_out[], const unsigned x[], const unsigned Rp[], const unsigned Nmod[])
-{
- MultprecMultiply(Xmont_out, x, Rp);
- MultprecModulo(Xmont_out, Nmod, N_wordlen);
-}
-
-void MultprecGenNp64(const unsigned *Nmod, unsigned *np64_ret) /* only pass the low order double word */
-{
- uint64_t nprime, Nmod_0;
- Nmod_0 = GET_WORD(&Nmod[0]) | ((uint64_t)GET_WORD(&Nmod[1]) << 32);
-
-#define COMP_NPN_1 ((2 - Nmod_0 * nprime) * nprime) /* computes N`*N0=1 mod 2^P where P is the partial built up */
- nprime = (((2 + Nmod_0) & 4) << 1) + Nmod_0; /* mod 2^4 */
- nprime = COMP_NPN_1;
- nprime = COMP_NPN_1;
- nprime = COMP_NPN_1;
- nprime = COMP_NPN_1;
- /* 8 multiplies of uint64_t */
- *((uint64_t *)np64_ret) = (~0LL - nprime) + 1LL;
-}
-
-/* CIOS Multiply. This is the Coarse Integrated form where the values are */
-/* multiplied and reduced for each step of "i". This uses less memory and */
-/* is faster as a result. Note that this is used to square as well as mul, */
-/* so not as fast as pure squaring could be. */
-void MultprecCiosMul(
- unsigned w_out[], const unsigned a[], const unsigned b[], const unsigned Nmod[], const unsigned *Np)
-{
- int j;
- uint32_t i;
- uint64_t *m64 = (uint64_t *)&msg_ret[kCASPER_RamOffset_M64];
- uint64_t Np64;
- uint64_t carry;
- uint64_t *a64, *b64, *w64, *N64;
-
- Np64 = *(uint64_t *)Np;
-
- a64 = (uint64_t *)a;
- b64 = (uint64_t *)b;
- w64 = (uint64_t *)w_out;
- N64 = (uint64_t *)Nmod;
-
- if (a)
- { /* if !a, we are reducing only */
- PreZeroW(i, w_out);
- }
- SET_DWORD(&w64[N_dwordlen], 0);
- SET_DWORD(&w64[N_dwordlen + 1], 0);
- /* with accelerator */
-
- /* loop i and then reduce after each j round */
- for (i = 0; i < N_dwordlen; i++)
- {
- /* Step 3. Iterate over N words of u using i - perform Multiply-accumulate */
- /* push-pull: we do a*b and then separately m*n (reduce) */
- if (a)
- { /* if mul&reduce vs. reduce only */
- carry = GET_DWORD(&w64[N_dwordlen]);
- Accel_SetABCD_Addr(CA_MK_OFF(&b64[i]), CA_MK_OFF(a64));
- Accel_crypto_mul(Accel_IterOpcodeResaddr(N_dwordlen - 1, kCASPER_OpMul6464FullSum, CA_MK_OFF(w64)));
- Accel_done();
- /* max carry is contained since ~0*~0=0xFFFE0001+0xFFFF=0xFFFF0000, */
- /* so max carry is 0xFFFF and 0xFFFF0000+0xFFFF=0xFFFFFFFF */
- /* accel took care of w_out[N_wordlen] & +1, so we just take care of the next double word if carry=1 */
- /* w64[N_dwordlen+1] = g_carry; */
- carry = (GET_DWORD(&w64[N_dwordlen]) < carry);
- SET_DWORD(&w64[N_dwordlen + 1], carry);
- }
- SET_DWORD(&m64[0], GET_DWORD(&w64[0]) * Np64); /* prime for 1st; modulo a double-word */
-
- /* we are reducing, so the 1st [0th] 64 bit value product is tossed, but we */
- /* need its carry. We let the accel do this separately - really need a mode to */
- /* do this "reduce" since it is natural */
- carry = GET_DWORD(&w64[N_dwordlen]);
- Accel_SetABCD_Addr(CA_MK_OFF(m64), CA_MK_OFF(&N64[0]));
- Accel_crypto_mul(Accel_IterOpcodeResaddr(N_dwordlen - 1, kCASPER_OpMul6464FullSum, CA_MK_OFF(&w64[0])));
- Accel_done();
- carry = (GET_DWORD(&w64[N_dwordlen]) < carry);
-
- Accel_SetABCD_Addr(CA_MK_OFF(&w64[1]), 0);
- Accel_crypto_mul(Accel_IterOpcodeResaddr(N_dwordlen - 1, kCASPER_OpCopy, CA_MK_OFF(&w64[0])));
-
- Accel_done();
- SET_DWORD(&w64[N_dwordlen], (GET_DWORD(&w64[N_dwordlen + 1]) + carry));
- }
-
- /* now check if need to subtract Nmod */
- if (GET_WORD(&w_out[N_wordlen]))
- j = 1; /* we have to subtract for sure if carry up */
- else
- {
- j = 0;
- for (i = N_wordlen - 1; i > 0; i--)
- if (GET_WORD(&w_out[i]) != GET_WORD(&Nmod[i]))
- {
- j = GET_WORD(&w_out[i]) > GET_WORD(&Nmod[i]); /* if larger sub */
- break; /* we would remove the break if worrying about side channel */
- }
- }
- if (!j)
- return; /* Is smaller than Nmod, so done. */
- Accel_SetABCD_Addr(CA_MK_OFF(Nmod), 0);
- Accel_crypto_mul(Accel_IterOpcodeResaddr(N_dwordlen - 1, kCASPER_OpSub64, CA_MK_OFF(w_out)));
- Accel_done();
- /* last borrow is OK since we know it could only be <2N and */
-}
-
-/* RSA_MontSignatureToPlaintextFast: */
-/* MsgRet[] = Message return buffer - must be large enough to hold input and output (4*N+2) */
-/* exp_pubkey = the "e" that the value is raised to. Usually 3 or 0x10001. */
-/* signature = N bitpos len long "message" to process in Montgomery form - so saving conversion (divide) */
-/* pubkey = N bitpos len long public key to process signature with */
-/* returns: 0 */
-/* */
-/* Algo: compute M = signaturen^e mod public_key */
-/* where M is original plaintext, signature is signed value */
-/* note: e is usually either 0x3 or 0x10001 */
-int RSA_MontSignatureToPlaintextFast(const unsigned mont_signature[N_wordlen_max],
- const unsigned exp_pubkey,
- const unsigned pubkey[N_wordlen_max],
- unsigned MsgRet[WORK_BUFF_MUL4])
-{
- int bidx = 0;
- int bitpos;
- unsigned np64[2];
-
- /* MsgRet working area: */
- /* 0..N = RESULT, starting with S` */
- /* N..N*2 = S` and then working BASE during math. */
- /* N*2..N*4+2 = temp working area for Mont mul */
-
- /* 1. Copy sig into MsgRet so we have one working result buffer */
- CASPER_MEMCPY_I2I(&MsgRet[kCASPER_RamOffset_Result], mont_signature, N_bytelen);
- MultprecGenNp64(pubkey, np64); /* Generate N` from LSW of N (LSW being lowest 64b word) */
- bitpos = 31 - __CLZ(exp_pubkey); /* count of bits after the left most 1 */
- while (--bitpos >= 0)
- {
- /* This operates on: */
- /* result = 1; */
- /* base = signature */
- /* loop while exponent bits from MSb to LSb */
- /* if (exp bit is 1) */
- /* result = result * base */
- /* base = base^2 */
- /* Because the MSb of exp is always 1 by definition, we can invert this a bit: */
- /* base = signature` */
- /* result = base; equivalent to result = 1*base from 1st pass, but now square is needed 1st */
- /* loop while exponent bits from MSb-1 to LSb */
- /* base = base^2 */
- /* if (exp bit is 1) */
- /* result = result * base */
- /* This ends up doing the same thing but skips two wasteful steps of multiplying by 1 and */
- /* a final squaring never used. */
- /* */
- /* Next we have the problem that CIOS mul needs a separate dest buffer. So, we bounce */
- /* base between base and temp, and likewise for result. */
- MultprecCiosMul(&MsgRet[bidx ? kCASPER_RamOffset_Base : kCASPER_RamOffset_TempBase],
- &MsgRet[bidx ? kCASPER_RamOffset_TempBase : kCASPER_RamOffset_Base],
- &MsgRet[bidx ? kCASPER_RamOffset_TempBase : kCASPER_RamOffset_Base], pubkey, np64);
- if (exp_pubkey & (1 << bitpos)) /* where e is 1 */
- {
- /* result has result, so we need to work into other temp area */
- MultprecCiosMul(&MsgRet[bidx ? kCASPER_RamOffset_TempBase : kCASPER_RamOffset_Base],
- &MsgRet[kCASPER_RamOffset_Result],
- &MsgRet[bidx ? kCASPER_RamOffset_Base : kCASPER_RamOffset_TempBase], pubkey, np64);
- /* we have to copy back to result */
-
- // CASPER_MEMCPY_I2I(&MsgRet[kCASPER_RamOffset_Result],
- // &MsgRet[bidx ? kCASPER_RamOffset_TempBase : kCASPER_RamOffset_Base], N_bytelen);
- }
- else
- bidx = ~bidx;
- }
-
- CASPER_MEMCPY_I2I(&MsgRet[kCASPER_RamOffset_Result],
- &MsgRet[bidx ? kCASPER_RamOffset_TempBase : kCASPER_RamOffset_Base], N_bytelen);
-
- /* final step is one more reduction to get back to normal form (ie. divide R out) */
- MultprecCiosMul(&MsgRet[kCASPER_RamOffset_Result], NULL, NULL, pubkey, np64);
- return (0); /* always 0 */
-}
-
-/* RSA_SignatureToPlaintextFast: */
-/* MsgRet[] = Message return buffer - must be large enough to hold input and output (4*N+2) */
-/* exp_pubkey = the "e" that the value is raised to. Usually 3 or 0x10001. */
-/* signature = N bitpos len long "message" to process in normal form - so converted to Mont form */
-/* pubkey = N bitpos len long public key to process signature with */
-/* returns: 0 */
-/* */
-/* Algo: compute M = signaturen^e mod public_key */
-/* where M is original plaintext, signature is signed value */
-/* note: e is usually either 0x3 or 0x10001 */
-int RSA_SignatureToPlaintextFast(const unsigned signature[N_wordlen_max],
- const unsigned exp_pubkey,
- const unsigned pubkey[N_wordlen_max],
- unsigned MsgRet[WORK_BUFF_MUL4])
-{
- /* MsgRet working area: */
- /* 0..N = RESULT, starting with S`; it is used for R` just during creation of S` */
- /* N..N*2 = S` and then working BASE during math. Note overflow beyond N*2 when making S` */
- /* N*2..N*4+2 = temp working area for Mont mul */
-
- MultprecMontCalcRp(&MsgRet[kCASPER_RamOffset_Result], exp_pubkey, pubkey); /* calculate R` (=R mod N) */
- MultprecMontPrepareX(&MsgRet[kCASPER_RamOffset_Base], signature, &MsgRet[kCASPER_RamOffset_Result],
- pubkey); /* X*R1` mod N */
- return (RSA_MontSignatureToPlaintextFast(&MsgRet[kCASPER_RamOffset_Base], exp_pubkey, pubkey, MsgRet));
-}
-
-/*!
- * brief Performs modular exponentiation - (A^E) mod N.
- *
- * This function performs modular exponentiation.
- *
- * param base CASPER base address
- * param signature first addend (in little endian format)
- * param pubN modulus (in little endian format)
- * param wordLen Size of pubN in bytes
- * param pubE exponent
- * param[out] plaintext Output array to store result of operation (in little endian format)
- */
-void CASPER_ModExp(
- CASPER_Type *base, const uint8_t *signature, const uint8_t *pubN, size_t wordLen, uint32_t pubE, uint8_t *plaintext)
-{
-#define PK_LOC &msg_ret[kCASPER_RamOffset_Modulus]
-#define SIG_LOC &msg_ret[kCASPER_RamOffset_Modulus + N_wordlen_max]
-
- N_wordlen = wordLen; /* set global variable for key length - used by RSA_SignatureToPlaintextFast() */
- CASPER_MEMCPY_N2I(PK_LOC, pubN, N_bytelen);
- CASPER_MEMCPY_N2I(SIG_LOC, signature, N_bytelen);
- RSA_SignatureToPlaintextFast((const unsigned *)(SIG_LOC), pubE, (const unsigned *)(PK_LOC), msg_ret);
-
- CASPER_MEMCPY_I2N(plaintext, msg_ret, N_bytelen);
-}
-
-/*!
- * brief Enables clock and disables reset for CASPER peripheral.
- *
- * Enable clock and disable reset for CASPER.
- *
- * param base CASPER base address
- */
-void CASPER_Init(CASPER_Type *base)
-{
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
- CLOCK_EnableClock(kCLOCK_Casper);
-#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
- RESET_PeripheralReset(kCASPER_RST_SHIFT_RSTn);
- /* If Casper init is called with secure address, use secure addres also for accessing Casper RAM. */
- s_casperRamBase = CASPER_RAM_BASE_NS | ((uint32_t)base & 0x10000000u);
- msg_ret = (unsigned *)s_casperRamBase;
-}
-
-/*!
- * brief Disables clock for CASPER peripheral.
- *
- * Disable clock and enable reset.
- *
- * param base CASPER base address
- */
-void CASPER_Deinit(CASPER_Type *base)
-{
- RESET_SetPeripheralReset(kCASPER_RST_SHIFT_RSTn);
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
- CLOCK_DisableClock(kCLOCK_Casper);
-#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
-}
-
-/* New ECC code which uses Casper. */
-
-/* Set the prime modulus mod in Casper memory.
- */
-void CASPER_ecc_init(void)
-{
-#if CASPER_ECC_P256
- N_wordlen = 256 / 32;
- uint32_t *mod = NISTp256;
-#elif CASPER_ECC_P384
- N_wordlen = 384 / 32;
- uint32_t *mod = NISTp384;
-#endif
- CASPER_MEMCPY(&CASPER_MEM[MOD_SCRATCH_START], mod, NUM_LIMBS * sizeof(uint32_t));
- uint8_t a[(CASPER_NUM_LIMBS - NUM_LIMBS) * sizeof(uint32_t)] = {0};
- CASPER_MEMCPY(&CASPER_MEM[MOD_SCRATCH_START + NUM_LIMBS], a, (CASPER_NUM_LIMBS - NUM_LIMBS) * sizeof(uint32_t));
-}
-
-void CASPER_ECC_equal(int *res, uint32_t *op1, uint32_t *op2)
-{
- uint32_t a[NUM_LIMBS];
- uint32_t b[NUM_LIMBS];
- int c = 0;
- CASPER_MEMCPY(a, op1, NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(b, op2, NUM_LIMBS * sizeof(uint32_t));
-
- do
- {
- int _i;
- c = a[0] ^ b[0];
- for (_i = 1; _i < NUM_LIMBS; _i++)
- {
- c |= (a[_i] ^ b[_i]);
- }
- } while (0);
-
- *res = c;
-}
-
-void CASPER_ECC_equal_to_zero(int *res, uint32_t *op1)
-{
- uint32_t a[NUM_LIMBS];
- int c = 0;
- CASPER_MEMCPY(a, op1, NUM_LIMBS * sizeof(uint32_t));
-
- do
- {
- int _i;
- c = a[0];
- for (_i = 1; _i < NUM_LIMBS; _i++)
- {
- c |= a[_i];
- }
- } while (0);
-
- *res = c;
-}
-
-#if CASPER_ECC_P256
-void CASPER_ECC_SECP256R1_Mul(
- CASPER_Type *base, uint32_t resX[8], uint32_t resY[8], uint32_t X[8], uint32_t Y[8], uint32_t scalar[8])
-{
- uint32_t X1[8] = {0};
- uint32_t Y1[8] = {0};
- toMontgomery(X1, X);
- toMontgomery(Y1, Y);
-
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS], X1, NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS], Y1, NUM_LIMBS * sizeof(uint32_t));
-
- Jac_scalar_multiplication(&CASPER_MEM[INOUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 7 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 8 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS], scalar, NISTp256, NISTp256_q);
-
- Jac_toAffine(&CASPER_MEM[INOUT_SCRATCH_START + 3 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 4 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 7 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 8 * CASPER_NUM_LIMBS]);
-
- /* Montgomery to Normal */
- /* X_normal = 1 * X_montgomery; Y_normal = 1 * Y_montgomery */
- uint32_t one[CASPER_NUM_LIMBS] = {0x0};
- one[0] = 0x1u;
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS], one, CASPER_NUM_LIMBS * sizeof(uint32_t));
- multiply_casper(&CASPER_MEM[INOUT_SCRATCH_START + 5 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 3 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS]);
- multiply_casper(&CASPER_MEM[INOUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 4 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS]);
-
- /* copy out to result */
- CASPER_MEMCPY(resX, &CASPER_MEM[INOUT_SCRATCH_START + 5 * CASPER_NUM_LIMBS], NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(resY, &CASPER_MEM[INOUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS], NUM_LIMBS * sizeof(uint32_t));
-}
-
-void CASPER_ECC_SECP256R1_MulAdd(CASPER_Type *base,
- uint32_t resX[8],
- uint32_t resY[8],
- uint32_t X1[8],
- uint32_t Y1[8],
- uint32_t scalar1[8],
- uint32_t X2[8],
- uint32_t Y2[8],
- uint32_t scalar2[8])
-{
- uint32_t zeroes[CASPER_NUM_LIMBS] = {0};
-
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS], X1, NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS], Y1, NUM_LIMBS * sizeof(uint32_t));
-
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 2 * CASPER_NUM_LIMBS], X2, NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 3 * CASPER_NUM_LIMBS], Y2, NUM_LIMBS * sizeof(uint32_t));
-
- toMontgomery(&CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS]);
- toMontgomery(&CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS]);
- toMontgomery(&CASPER_MEM[INOUT_SCRATCH_START + 2 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 2 * CASPER_NUM_LIMBS]);
- toMontgomery(&CASPER_MEM[INOUT_SCRATCH_START + 3 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 3 * CASPER_NUM_LIMBS]);
-
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 4 * CASPER_NUM_LIMBS], zeroes, CASPER_NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 5 * CASPER_NUM_LIMBS], zeroes, CASPER_NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS], zeroes, CASPER_NUM_LIMBS * sizeof(uint32_t));
- double_scalar_multiplication(&CASPER_MEM[INOUT_SCRATCH_START + 4 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 5 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS], scalar1,
- &CASPER_MEM[INOUT_SCRATCH_START + 2 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 3 * CASPER_NUM_LIMBS], scalar2);
-
- Jac_toAffine(&CASPER_MEM[LUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS],
- &CASPER_MEM[LUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 4 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 5 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS]);
-
- uint32_t one[CASPER_NUM_LIMBS] = {0x0};
- one[0] = 0x1u;
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS], one, CASPER_NUM_LIMBS * sizeof(uint32_t));
- multiply_casper(&CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS],
- &CASPER_MEM[LUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS]);
- multiply_casper(&CASPER_MEM[INOUT_SCRATCH_START + 2 * CASPER_NUM_LIMBS],
- &CASPER_MEM[LUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS]);
-
- CASPER_MEMCPY(resX, (&CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS]), NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(resY, (&CASPER_MEM[INOUT_SCRATCH_START + 2 * CASPER_NUM_LIMBS]), NUM_LIMBS * sizeof(uint32_t));
-}
-#endif /* CASPER_ECC_P256 */
-
-#if CASPER_ECC_P384
-void CASPER_ECC_SECP384R1_Mul(
- CASPER_Type *base, uint32_t resX[12], uint32_t resY[12], uint32_t X[12], uint32_t Y[12], uint32_t scalar[12])
-{
- uint32_t X1[12] = {0};
- uint32_t Y1[12] = {0};
- toMontgomery(X1, X);
- toMontgomery(Y1, Y);
-
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS], X1, NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS], Y1, NUM_LIMBS * sizeof(uint32_t));
-
- Jac_scalar_multiplication(&CASPER_MEM[INOUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 7 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 8 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS], scalar, NISTp384, NISTp384_q);
-
- Jac_toAffine(&CASPER_MEM[INOUT_SCRATCH_START + 3 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 4 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 7 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 8 * CASPER_NUM_LIMBS]);
-
- /* Montgomery to Normal */
- /* X_normal = 1 * X_montgomery; Y_normal = 1 * Y_montgomery */
- uint32_t one[12] = {0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS], one, NUM_LIMBS * sizeof(uint32_t));
- multiply_casper(&CASPER_MEM[INOUT_SCRATCH_START + 5 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 3 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS]);
- multiply_casper(&CASPER_MEM[INOUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 4 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS]);
-
- /* copy out to result */
- CASPER_MEMCPY(resX, &CASPER_MEM[INOUT_SCRATCH_START + 5 * CASPER_NUM_LIMBS], NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(resY, &CASPER_MEM[INOUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS], NUM_LIMBS * sizeof(uint32_t));
-}
-
-void CASPER_ECC_SECP384R1_MulAdd(CASPER_Type *base,
- uint32_t resX[12],
- uint32_t resY[12],
- uint32_t X1[12],
- uint32_t Y1[12],
- uint32_t scalar1[12],
- uint32_t X2[12],
- uint32_t Y2[12],
- uint32_t scalar2[12])
-{
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS], X1, NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS], Y1, NUM_LIMBS * sizeof(uint32_t));
-
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 2 * CASPER_NUM_LIMBS], X2, NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 3 * CASPER_NUM_LIMBS], Y2, NUM_LIMBS * sizeof(uint32_t));
-
- toMontgomery(&CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS]);
- toMontgomery(&CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS]);
- toMontgomery(&CASPER_MEM[INOUT_SCRATCH_START + 2 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 2 * CASPER_NUM_LIMBS]);
- toMontgomery(&CASPER_MEM[INOUT_SCRATCH_START + 3 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 3 * CASPER_NUM_LIMBS]);
-
- double_scalar_multiplication(&CASPER_MEM[INOUT_SCRATCH_START + 4 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 5 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS], scalar1,
- &CASPER_MEM[INOUT_SCRATCH_START + 2 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 3 * CASPER_NUM_LIMBS], scalar2);
-
- Jac_toAffine(&CASPER_MEM[LUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS],
- &CASPER_MEM[LUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 4 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 5 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS]);
-
- uint32_t one[12] = {0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
- CASPER_MEMCPY(&CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS], one, NUM_LIMBS * sizeof(uint32_t));
- multiply_casper(&CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS],
- &CASPER_MEM[LUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS]);
- multiply_casper(&CASPER_MEM[INOUT_SCRATCH_START + 2 * CASPER_NUM_LIMBS],
- &CASPER_MEM[LUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS],
- &CASPER_MEM[INOUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS]);
-
- CASPER_MEMCPY(resX, (&CASPER_MEM[INOUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS]), NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(resY, (&CASPER_MEM[INOUT_SCRATCH_START + 2 * CASPER_NUM_LIMBS]), NUM_LIMBS * sizeof(uint32_t));
-}
-#endif /* CASPER_ECC_P384 */
-
-// CIOS Multiply. This is the Coarse Integrated form where the values are
-// multiplied and reduced for each step of "i". This uses less memory and
-// is faster as a result. Note that this is used to square as well as mul,
-// so not as fast as pure squaring could be.
-static void MultprecCiosMul_ct(
- uint32_t w_out[], const uint32_t a[], const uint32_t b[], const uint32_t Nmod[], const uint32_t *Np)
-{
- uint32_t i;
- uint64_t *m64 = (uint64_t *)&msg_ret[kCASPER_RamOffset_M64];
- uint64_t Np64;
- uint64_t carry;
- uint64_t *a64, *b64, *w64, *N64;
- uint32_t *T1 = &CASPER_MEM[0], borrow;
-
- Np64 = *(uint64_t *)Np;
-
- a64 = (uint64_t *)a;
- b64 = (uint64_t *)b;
- w64 = (uint64_t *)w_out;
- N64 = (uint64_t *)Nmod;
-
- if (a)
- { /* if !a, we are reducing only */
- PreZeroW(i, w_out);
- }
- SET_DWORD(&w64[N_dwordlen], 0);
- SET_DWORD(&w64[N_dwordlen + 1], 0);
- /* with accelerator */
-
- /* loop i and then reduce after each j round */
- for (i = 0; i < N_dwordlen; i++)
- {
- /* Step 3. Iterate over N words of u using i - perform Multiply-accumulate */
- /* push-pull: we do a*b and then separately m*n (reduce) */
- if (a)
- { /* if mul&reduce vs. reduce only */
- carry = GET_DWORD(&w64[N_dwordlen]);
- Accel_SetABCD_Addr(CA_MK_OFF(&b64[i]), CA_MK_OFF(a64));
- Accel_crypto_mul(Accel_IterOpcodeResaddr(N_dwordlen - 1, kCASPER_OpMul6464FullSum, CA_MK_OFF(w64)));
- Accel_done();
- /* max carry is contained since ~0*~0=0xFFFE0001+0xFFFF=0xFFFF0000, */
- /* so max carry is 0xFFFF and 0xFFFF0000+0xFFFF=0xFFFFFFFF */
- /* accel took care of w_out[N_wordlen] & +1, so we just take care of the next double word if carry=1 */
- /* w64[N_dwordlen+1] = g_carry; */
- carry = (GET_DWORD(&w64[N_dwordlen]) < carry);
- SET_DWORD(&w64[N_dwordlen + 1], carry);
- }
- SET_DWORD(&m64[0], GET_DWORD(&w64[0]) * Np64); /* prime for 1st; modulo a double-word */
-
- /* we are reducing, so the 1st [0th] 64 bit value product is tossed, but we */
- /* need its carry. We let the accel do this separately - really need a mode to */
- /* do this "reduce" since it is natural */
- carry = GET_DWORD(&w64[N_dwordlen]);
- Accel_SetABCD_Addr(CA_MK_OFF(m64), CA_MK_OFF(&N64[0]));
- Accel_crypto_mul(Accel_IterOpcodeResaddr(N_dwordlen - 1, kCASPER_OpMul6464FullSum, CA_MK_OFF(&w64[0])));
- Accel_done();
- carry = (GET_DWORD(&w64[N_dwordlen]) < carry);
-
- Accel_SetABCD_Addr(CA_MK_OFF(&w64[1]), 0);
- Accel_crypto_mul(Accel_IterOpcodeResaddr(N_dwordlen - 1, kCASPER_OpCopy, CA_MK_OFF(&w64[0])));
-
- Accel_done();
- SET_DWORD(&w64[N_dwordlen], (GET_DWORD(&w64[N_dwordlen + 1]) + carry));
- }
-
- /* now check if need to subtract Nmod */
- CASPER_MEMCPY_I2I(T1, w_out, (NUM_LIMBS + 1) * sizeof(uint32_t));
-
- /* Compute w = w - N */
- Accel_SetABCD_Addr(CA_MK_OFF(Nmod), 0);
- Accel_crypto_mul(Accel_IterOpcodeResaddr(N_dwordlen, kCASPER_OpSub64, CA_MK_OFF(w_out)));
- Accel_done();
-
- // if w_out > T1 then there was a borrow
- borrow = (GET_WORD(&((uint32_t *)w_out)[NUM_LIMBS]) > GET_WORD(&T1[NUM_LIMBS]));
-
- SET_WORD(&w_out[NUM_LIMBS + 1], 0);
- SET_WORD(&w_out[NUM_LIMBS], 0);
- casper_select(w_out, w_out, T1, borrow, NUM_LIMBS);
-}
-
-/* Compute C = A - B % mod
- * Assumes all operand have two extra limbs to store carry.
- */
-void CASPER_montsub(uint32_t *C, uint32_t *A, uint32_t *B, uint32_t *mod)
-{
- uint64_t *b64, *c64, *m64, *tmp;
- int borrow;
-
- b64 = (uint64_t *)B;
- c64 = (uint64_t *)C;
- m64 = (uint64_t *)mod;
-
- tmp = (uint64_t *)&CASPER_MEM[0];
-
- CASPER_MEMCPY(tmp, A, NUM_LIMBS * sizeof(uint32_t));
- // uint32_t temp32 = GET_WORD(&tmp[NUM_LIMBS - 1]);
-
- /* Compute tmp = A - B. */
- Accel_SetABCD_Addr(CA_MK_OFF(b64), 0);
-
- Accel_crypto_mul(Accel_IterOpcodeResaddr(NUM_LIMBS / 2 - 1, kCASPER_OpSub64, CA_MK_OFF(tmp)));
- Accel_done();
-
- // borrow = (GET_WORD(&((uint32_t*)tmp)[NUM_LIMBS - 1]) > temp32);
- borrow = ((GET_WORD(&((uint32_t *)tmp)[NUM_LIMBS - 1])) > GET_WORD(&A[NUM_LIMBS - 1]));
- CASPER_MEMCPY(c64, tmp, NUM_LIMBS * sizeof(uint32_t));
-
- /* Compute C = Mod + tmp */
- Accel_SetABCD_Addr(CA_MK_OFF(m64), 0);
- Accel_crypto_mul(Accel_IterOpcodeResaddr(NUM_LIMBS / 2 - 1, kCASPER_OpAdd64, CA_MK_OFF(c64)));
- Accel_done();
-
- casper_select(C, (uint32_t *)tmp, C, borrow, NUM_LIMBS);
-}
-
-/* Compute C = A + B % mod
- * Assumes all operand have two extra limbs to store carry.
- */
-void CASPER_montadd(uint32_t *C, uint32_t *A, uint32_t *B, uint32_t *mod)
-{
- uint64_t *b64, *c64, *m64, *tmp;
- int borrow;
-
- b64 = (uint64_t *)B;
- c64 = (uint64_t *)C;
- m64 = (uint64_t *)mod;
-
- tmp = (uint64_t *)&CASPER_MEM[0];
-
- CASPER_MEMCPY(tmp, A, NUM_LIMBS * sizeof(uint32_t));
- SET_DWORD(&tmp[NUM_LIMBS / 2], 0);
- SET_DWORD(&b64[NUM_LIMBS / 2], 0);
- SET_DWORD(&m64[NUM_LIMBS / 2], 0);
-
- /* Compute tmp = A + B using one additonal double-length limb. */
- Accel_SetABCD_Addr(CA_MK_OFF(b64), 0);
-
- Accel_crypto_mul(Accel_IterOpcodeResaddr(NUM_LIMBS / 2, kCASPER_OpAdd64, CA_MK_OFF(tmp)));
- Accel_done();
-
- CASPER_MEMCPY(c64, tmp, (NUM_LIMBS + 2) * sizeof(uint32_t));
-
- /* Compute C = Mod - tmp */
- Accel_SetABCD_Addr(CA_MK_OFF(m64), 0);
- Accel_crypto_mul(Accel_IterOpcodeResaddr(NUM_LIMBS / 2, kCASPER_OpSub64, CA_MK_OFF(c64)));
- Accel_done();
-
- // borrow = g_carry;
- borrow = (GET_WORD(&C[NUM_LIMBS]) > GET_WORD(&(((uint32_t *)tmp)[NUM_LIMBS])));
- casper_select(C, C, (uint32_t *)tmp, borrow, NUM_LIMBS);
-}
-
-/* Compute c = a/2 mod p where b is scratch space. */
-void CASPER_half(uint32_t *c, uint32_t *a, uint32_t *b)
-{
- shiftright(b, a, 1); /* Compute a/2 and (a+p)/2 */
-
- /* Compute tmp = a + p using one additonal double-length limb. */
- CASPER_MEMCPY(c, a, NUM_LIMBS * sizeof(uint32_t));
- SET_WORD(&c[NUM_LIMBS], 0);
- SET_WORD(&c[NUM_LIMBS + 1], 0);
-
- Accel_SetABCD_Addr(CA_MK_OFF(((uint64_t *)&CASPER_MEM[MOD_SCRATCH_START])), 0);
- Accel_crypto_mul(Accel_IterOpcodeResaddr(NUM_LIMBS / 2, kCASPER_OpAdd64, CA_MK_OFF(((uint64_t *)c))));
- Accel_done();
-
- shiftright(c, c, 1);
- SET_WORD(&c[NUM_LIMBS - 1], GET_WORD(&c[NUM_LIMBS - 1]) | (GET_WORD(&c[NUM_LIMBS]) << 31));
- SET_WORD(&c[NUM_LIMBS], 0);
- casper_select(c, b, c, (GET_WORD(&a[0]) & 1), NUM_LIMBS);
-}
-
-static uint32_t casper_get_word(uint32_t *addr)
-{
- return GET_WORD(addr);
-}
-
-#if CASPER_ECC_P256
-/* Shift right by 1 <= c <= 31. */
-static void shiftright(uint32_t *z, uint32_t *x, int c)
-{
- do
- {
- SET_WORD((&z[0]), (GET_WORD(&x[1]) << (32 - (c))) | (GET_WORD(&x[0]) >> (c)));
- SET_WORD((&z[1]), (GET_WORD(&x[2]) << (32 - (c))) | (GET_WORD(&x[1]) >> (c)));
- SET_WORD((&z[2]), (GET_WORD(&x[3]) << (32 - (c))) | (GET_WORD(&x[2]) >> (c)));
- SET_WORD((&z[3]), (GET_WORD(&x[4]) << (32 - (c))) | (GET_WORD(&x[3]) >> (c)));
- SET_WORD((&z[4]), (GET_WORD(&x[5]) << (32 - (c))) | (GET_WORD(&x[4]) >> (c)));
- SET_WORD((&z[5]), (GET_WORD(&x[6]) << (32 - (c))) | (GET_WORD(&x[5]) >> (c)));
- SET_WORD((&z[6]), (GET_WORD(&x[7]) << (32 - (c))) | (GET_WORD(&x[6]) >> (c)));
- SET_WORD((&z[7]), (GET_WORD(&x[7]) >> (c)));
-
- } while (0);
-}
-
-/* Shift left by 1 <= c <= 31. */
-static void shiftleft(uint32_t *z, uint32_t *x, int c)
-{
- do
- {
- SET_WORD(&z[7], (GET_WORD(&x[7]) << (c)) | GET_WORD(&z[6]) >> (32 - (c)));
- SET_WORD(&z[6], (GET_WORD(&x[6]) << (c)) | GET_WORD(&z[5]) >> (32 - (c)));
- SET_WORD(&z[5], (GET_WORD(&x[5]) << (c)) | GET_WORD(&z[4]) >> (32 - (c)));
- SET_WORD(&z[4], (GET_WORD(&x[4]) << (c)) | GET_WORD(&z[3]) >> (32 - (c)));
- SET_WORD(&z[3], (GET_WORD(&x[3]) << (c)) | GET_WORD(&z[2]) >> (32 - (c)));
- SET_WORD(&z[2], (GET_WORD(&x[2]) << (c)) | GET_WORD(&z[1]) >> (32 - (c)));
- SET_WORD(&z[1], (GET_WORD(&x[1]) << (c)) | GET_WORD(&z[0]) >> (32 - (c)));
- SET_WORD(&z[0], (GET_WORD(&x[0]) << (c)));
- } while (0);
-}
-#else
-/* Shift right by 1 <= c <= 31. */
-static void shiftright(uint32_t *z, uint32_t *x, int c)
-{
- do
- {
- SET_WORD(&z[0], (GET_WORD(&x[1]) << (32 - (c))) | (GET_WORD(&x[0]) >> (c)));
- SET_WORD(&z[1], (GET_WORD(&x[2]) << (32 - (c))) | (GET_WORD(&x[1]) >> (c)));
- SET_WORD(&z[2], (GET_WORD(&x[3]) << (32 - (c))) | (GET_WORD(&x[2]) >> (c)));
- SET_WORD(&z[3], (GET_WORD(&x[4]) << (32 - (c))) | (GET_WORD(&x[3]) >> (c)));
- SET_WORD(&z[4], (GET_WORD(&x[5]) << (32 - (c))) | (GET_WORD(&x[4]) >> (c)));
- SET_WORD(&z[5], (GET_WORD(&x[6]) << (32 - (c))) | (GET_WORD(&x[5]) >> (c)));
- SET_WORD(&z[6], (GET_WORD(&x[7]) << (32 - (c))) | (GET_WORD(&x[6]) >> (c)));
- SET_WORD(&z[7], (GET_WORD(&x[8]) << (32 - (c))) | (GET_WORD(&x[7]) >> (c)));
- SET_WORD(&z[8], (GET_WORD(&x[9]) << (32 - (c))) | (GET_WORD(&x[8]) >> (c)));
- SET_WORD(&z[9], (GET_WORD(&x[10]) << (32 - (c))) | (GET_WORD(&x[9]) >> (c)));
- SET_WORD(&z[10], (GET_WORD(&x[11]) << (32 - (c))) | (GET_WORD(&x[10]) >> (c)));
- SET_WORD(&z[11], (GET_WORD(&x[11]) >> (c)));
- } while (0);
-}
-
-/* Shift left by 1 <= c <= 31. */
-static void shiftleft(uint32_t *z, uint32_t *x, int c)
-{
- do
- {
- SET_WORD(&z[11], (GET_WORD(&x[11]) << (c)) | GET_WORD(&z[10]) >> (32 - (c)));
- SET_WORD(&z[10], (GET_WORD(&x[10]) << (c)) | GET_WORD(&z[9]) >> (32 - (c)));
- SET_WORD(&z[9], (GET_WORD(&x[9]) << (c)) | GET_WORD(&z[8]) >> (32 - (c)));
- SET_WORD(&z[8], (GET_WORD(&x[8]) << (c)) | GET_WORD(&z[7]) >> (32 - (c)));
- SET_WORD(&z[7], (GET_WORD(&x[7]) << (c)) | GET_WORD(&z[6]) >> (32 - (c)));
- SET_WORD(&z[6], (GET_WORD(&x[6]) << (c)) | GET_WORD(&z[5]) >> (32 - (c)));
- SET_WORD(&z[5], (GET_WORD(&x[5]) << (c)) | GET_WORD(&z[4]) >> (32 - (c)));
- SET_WORD(&z[4], (GET_WORD(&x[4]) << (c)) | GET_WORD(&z[3]) >> (32 - (c)));
- SET_WORD(&z[3], (GET_WORD(&x[3]) << (c)) | GET_WORD(&z[2]) >> (32 - (c)));
- SET_WORD(&z[2], (GET_WORD(&x[2]) << (c)) | GET_WORD(&z[1]) >> (32 - (c)));
- SET_WORD(&z[1], (GET_WORD(&x[1]) << (c)) | GET_WORD(&z[0]) >> (32 - (c)));
- SET_WORD(&z[0], (GET_WORD(&x[0]) << (c)));
- } while (0);
-}
-#endif
-
-/* Convert a projective point (X1 : Y1 : Z1)
- * to the affine point (X3, Y3) = (X1/Z1^2,Y1/Z1^3)
- * The memory of (X3, Y3) and (X1 : Y1 : Z1) should not overlap
- */
-void Jac_toAffine(uint32_t *X3, uint32_t *Y3, uint32_t *X1, uint32_t *Y1, uint32_t *Z1)
-{
- uint32_t *T1, *T2;
-
- T1 = &CASPER_MEM[ECC_SCRATCH_START + 0 * CASPER_NUM_LIMBS];
- T2 = &CASPER_MEM[ECC_SCRATCH_START + 1 * CASPER_NUM_LIMBS];
-
- square_casper(T1, Z1); // Z^2
- multiply_casper(T2, T1, Z1); // Z^3
-
- // Montgomery inverse
- invert(T1, T2); // Z^-3
-
- multiply_casper(Y3, Y1, T1); // Y3 = Y/Z^3
- multiply_casper(T2, T1, Z1); // Z^-2
- multiply_casper(X3, X1, T2); // X3 = X/Z^2
-}
-
-/* Return 1 if (X1: Y1: Z1) is on the curve
- * Y^2 = X^3 -3XZ^4 + bZ^6
- * and return 0 otherwise.
- */
-int Jac_oncurve(uint32_t *X1, uint32_t *Y1, uint32_t *Z1, uint32_t *b)
-{
- uint32_t *T1, *T2, *T3, *T4, *T5, *T6;
- int m;
-
- T1 = &CASPER_MEM[ECC_SCRATCH_START + 0 * CASPER_NUM_LIMBS];
- T2 = &CASPER_MEM[ECC_SCRATCH_START + 1 * CASPER_NUM_LIMBS];
- T3 = &CASPER_MEM[ECC_SCRATCH_START + 2 * CASPER_NUM_LIMBS];
- T4 = &CASPER_MEM[ECC_SCRATCH_START + 3 * CASPER_NUM_LIMBS];
- T5 = &CASPER_MEM[ECC_SCRATCH_START + 4 * CASPER_NUM_LIMBS];
- T6 = &CASPER_MEM[ECC_SCRATCH_START + 5 * CASPER_NUM_LIMBS];
-
- square_casper(T1, Y1); // Y^2
- square_casper(T6, X1); // X^2
- multiply_casper(T2, T6, X1); // X^3
-
- square_casper(T3, Z1); // Z^2
- square_casper(T4, T3); // Z^4
- multiply_casper(T6, T4, T3); // Z^6
- multiply_casper(T3, b, T6); // bZ^6
-
- multiply_casper(T6, T4, X1); // XZ^4
-
- mul2_casper(T5, T6);
- add_casper(T4, T5, T6); // 3XZ^4
-
- sub_casper(T2, T2, T4); // X^3-3XZ^4
- add_casper(T2, T2, T3); // X^3-3XZ^4+bZ^6
-
- CASPER_ECC_equal(&m, T1, T2);
- if (m != 0)
- {
- return 0;
- }
- return 1;
-}
-
-/* Compute (X3 : Y3: Z3) = (X1: Y1: Z1) + (X2 : Y2 : Z2)
- * where (X1: Y1: Z1) != (X2 : Y2 : Z2)
- * (X3 : Y3: Z3) may be the same as one of the inputs.
- */
-void Jac_addition(uint32_t *X3,
- uint32_t *Y3,
- uint32_t *Z3,
- uint32_t *X1,
- uint32_t *Y1,
- uint32_t *Z1,
- uint32_t *X2,
- uint32_t *Y2,
- uint32_t *Z2)
-{
- uint32_t *Z1Z1, *Z2Z2, *U1, *S1, *J, *H, *V, *t0, *t1;
- int m1, m2;
-
- Z1Z1 = &CASPER_MEM[ECC_SCRATCH_START + 0 * CASPER_NUM_LIMBS];
- Z2Z2 = &CASPER_MEM[ECC_SCRATCH_START + 1 * CASPER_NUM_LIMBS];
- U1 = &CASPER_MEM[ECC_SCRATCH_START + 2 * CASPER_NUM_LIMBS];
- S1 = &CASPER_MEM[ECC_SCRATCH_START + 3 * CASPER_NUM_LIMBS];
- J = &CASPER_MEM[ECC_SCRATCH_START + 4 * CASPER_NUM_LIMBS];
- H = &CASPER_MEM[ECC_SCRATCH_START + 5 * CASPER_NUM_LIMBS];
- V = &CASPER_MEM[ECC_SCRATCH_START + 6 * CASPER_NUM_LIMBS];
- t0 = &CASPER_MEM[ECC_SCRATCH_START + 7 * CASPER_NUM_LIMBS];
- t1 = &CASPER_MEM[ECC_SCRATCH_START + 8 * CASPER_NUM_LIMBS];
-
- CASPER_ECC_equal_to_zero(&m1, Z1);
- CASPER_ECC_equal_to_zero(&m2, Z2);
- if (m1 == 0)
- {
- CASPER_MEMCPY(X3, X2, NUM_LIMBS * 4);
- CASPER_MEMCPY(Y3, Y2, NUM_LIMBS * 4);
- CASPER_MEMCPY(Z3, Z2, NUM_LIMBS * 4);
- return;
- }
- if (m2 == 0)
- {
- CASPER_MEMCPY(X3, X1, NUM_LIMBS * 4);
- CASPER_MEMCPY(Y3, Y1, NUM_LIMBS * 4);
- CASPER_MEMCPY(Z3, Z1, NUM_LIMBS * 4);
- return;
- }
-
- square_casper(Z1Z1, Z1);
- square_casper(Z2Z2, Z2);
- multiply_casper(U1, X1, Z2Z2);
- multiply_casper(H, X2, Z1Z1); /* if H equals U1 then X's are the same */
- multiply_casper(t0, Z2, Z2Z2);
- multiply_casper(S1, Y1, t0);
- multiply_casper(t0, Z1, Z1Z1);
- multiply_casper(J, Y2, t0); /* if (S1 == J) then Y's are the same */
-
- CASPER_ECC_equal(&m1, H, U1); /* If H and U1 match then the X-coordinates are the same. */
- CASPER_ECC_equal(&m2, S1, J); /* If S1 and J match then the Y-coordinates are the same. */
- if (m1 == 0)
- {
- if (m2 == 0)
- {
- Jac_double(X3, Y3, Z3, X1, Y1, Z1);
- return;
- }
- /* else {
- We work with the point at infinity.
- The Z-coordinate will be set to zero in this function.
- } */
- }
-
- sub_casper(H, H, U1);
- mul2_casper(t0, H);
- square_casper(t1, t0);
- sub_casper(t0, J, S1);
- multiply_casper(J, H, t1);
- multiply_casper(V, U1, t1);
- mul2_casper(U1, t0);
- square_casper(t0, U1);
- mul2_casper(t1, V);
- sub_casper(t0, t0, J);
- sub_casper(X3, t0, t1);
- sub_casper(t0, V, X3);
- multiply_casper(t1, S1, J);
- mul2_casper(t1, t1);
- multiply_casper(V, U1, t0);
- sub_casper(Y3, V, t1);
- add_casper(V, Z1, Z2);
- square_casper(t1, V);
- sub_casper(t1, t1, Z1Z1);
- sub_casper(t1, t1, Z2Z2);
- multiply_casper(Z3, t1, H);
-}
-
-/* Compute (X3 : Y3: Z3) = (X1: Y1: Z1) + (X2, Y2)
- * where (X1: Y1: Z1) != (X2, Y2)
- * (X3 : Y3: Z3) may not overlap with (X1: Y1: Z1).
- * Source: 2004 Hankerson–Menezes–Vanstone, page 91.
- */
-void Jac_add_affine(
- uint32_t *X3, uint32_t *Y3, uint32_t *Z3, uint32_t *X1, uint32_t *Y1, uint32_t *Z1, uint32_t *X2, uint32_t *Y2)
-{
- uint32_t *T1, *T2, *T3, *T4, *T5;
- int m1, m2;
-
- T1 = &CASPER_MEM[ECC_SCRATCH_START + 0 * CASPER_NUM_LIMBS];
- T2 = &CASPER_MEM[ECC_SCRATCH_START + 1 * CASPER_NUM_LIMBS];
- T3 = &CASPER_MEM[ECC_SCRATCH_START + 2 * CASPER_NUM_LIMBS];
- T4 = &CASPER_MEM[ECC_SCRATCH_START + 3 * CASPER_NUM_LIMBS];
- T5 = &CASPER_MEM[ECC_SCRATCH_START + 4 * CASPER_NUM_LIMBS];
-
- CASPER_ECC_equal_to_zero(&m1, Z1);
- if (m1 == 0)
- {
- CASPER_MEMCPY(X3, X2, NUM_LIMBS * 4);
- CASPER_MEMCPY(Y3, Y2, NUM_LIMBS * 4);
- CASPER_MEMCPY(Z3, ONE, NUM_LIMBS * 4);
- return;
- }
-
- copy(T5, Z1);
- square_casper(T3, Z1);
- multiply_casper(T2, T3, Z1);
- multiply_casper(T4, T3, X2);
- multiply_casper(T3, T2, Y2);
-
- CASPER_ECC_equal(&m1, T4, X1);
- CASPER_ECC_equal(&m2, T3, Y1);
- if (m1 == 0)
- {
- if (m2 == 0)
- {
- Jac_double(X3, Y3, Z3, X1, Y1, Z1);
- return;
- }
- /* else {
- We work with the point at infinity.
- The Z-coordinate will be set to zero in this function.
- } */
- }
-
- sub_casper(T1, T4, X1);
- sub_casper(T2, T3, Y1);
- multiply_casper(Z3, T5, T1);
- square_casper(T3, T1);
- multiply_casper(T4, T3, T1);
- multiply_casper(T5, T3, X1);
- mul2_casper(T1, T5);
- square_casper(X3, T2);
- sub_casper(X3, X3, T1);
- sub_casper(X3, X3, T4);
- sub_casper(T3, T5, X3);
- multiply_casper(T1, T3, T2);
- multiply_casper(T2, T4, Y1);
- sub_casper(Y3, T1, T2);
-}
-
-extern uint32_t casper_get_word(uint32_t *addr);
-
-/* Point doubling from: 2004 Hankerson–Menezes–Vanstone, page 91.
- * Compute (X3 : Y3: Z3) = (X1: Y1: Z1) + (X1 : Y1 : Z1)
- * (X3 : Y3: Z3) may be the same as the input.
- */
-void Jac_double(uint32_t *X3, uint32_t *Y3, uint32_t *Z3, uint32_t *X1, uint32_t *Y1, uint32_t *Z1)
-{
- uint32_t *T1, *T2, *T3, *T4, *T5;
-
- T1 = &CASPER_MEM[ECC_SCRATCH_START + 0 * CASPER_NUM_LIMBS];
- T2 = &CASPER_MEM[ECC_SCRATCH_START + 1 * CASPER_NUM_LIMBS];
- T3 = &CASPER_MEM[ECC_SCRATCH_START + 2 * CASPER_NUM_LIMBS];
- T4 = &CASPER_MEM[ECC_SCRATCH_START + 3 * CASPER_NUM_LIMBS];
- T5 = &CASPER_MEM[ECC_SCRATCH_START + 4 * CASPER_NUM_LIMBS];
-
- square_casper(T1, Z1);
- sub_casper(T3, X1, T1);
- add_casper(T1, X1, T1);
- multiply_casper(T4, T3, T1);
-
- mul2_casper(T3, T4);
-
- add_casper(T2, T3, T4);
-
- mul2_casper(Y3, Y1);
-
- copy(T5, Z1);
- multiply_casper(Z3, Y3, T5);
-
- square_casper(T5, Y3);
-
- multiply_casper(T3, T5, X1);
-
- square_casper(Y3, T5);
-
- half(T5, Y3, T4);
-
- square_casper(X3, T2);
-
- mul2_casper(T1, T3);
-
- sub_casper(X3, X3, T1);
-
- sub_casper(T1, T3, X3);
-
- multiply_casper(T3, T1, T2);
-
- sub_casper(Y3, T3, T5);
-}
-
-/* Recoding for a signed fixed window.
- * Source: https://eprint.iacr.org/2014/130.pdf, Algorithm 6
- * Recode the n-bit integer k into ciel(log2(n)/(w-1)) digits
- * where each digit is in
- * { +/- 1, +/- 3, ..., +/- 2^(w-1)-1 }
- * and put the result in c.
- */
-static void recode(int8_t *c, uint32_t *k, int n, int w)
-{
- int i, t;
- uint32_t K[NUM_LIMBS] = {0};
- memcpy(K, k, (size_t)ceil(n / 8.));
- t = (n + (w - 2)) / (w - 1);
- for (i = 0; i < t; i++)
- {
- c[i] = (K[0] & ((1 << w) - 1)) - (1 << (w - 1));
- shiftrightSysram(K, K, w - 1);
- add_n_1(K, K, (uint32_t)c[i] >> 31, NUM_LIMBS);
- }
- c[t] = K[0];
-}
-
-static uint32_t sub_n(uint32_t *c, uint32_t *a, uint32_t *b, int n)
-{
- int i;
- uint32_t borrow;
- sub_borrowout(borrow, GET_WORD(&c[0]), a[0], GET_WORD(&b[0]));
- for (i = 1; i < n; i++)
- {
- sub_borrowin_borrowout(borrow, GET_WORD(&c[i]), a[i], GET_WORD(&b[i]), borrow);
- }
- return borrow;
-}
-
-#if 0
-/* Dumb n-limb subtraction of c=a-b, return borrow. */
-static uint32_t sub_n_1(uint32_t *c, uint32_t *a, uint32_t b, int n) {
- int i;
- uint32_t borrow;
- sub_borrowout(borrow, c[0], a[0], b);
- for (i = 1; i < n; i++) {
- sub_borrowin_borrowout_1(borrow, c[i], a[i], borrow);
- }
- return borrow;
-}
-
-/* Dumb n-limb addition of c=a+b, return carry. */
-static uint32_t add_n(uint32_t *c, uint32_t *a, uint32_t *b, int n) {
- int i;
- uint32_t carry;
- add_cout(carry, c[0], a[0], b[0]);
- for (i = 1; i < n; i++) {
- add_cout_cin(carry, c[i], a[i], b[i], carry);
- }
- return carry;
-}
-#endif
-
-/* Dumb n-limb addition of c=a+b, return carry. */
-static uint32_t add_n_1(uint32_t *c, uint32_t *a, uint32_t b, int n)
-{
- int i;
- uint32_t carry;
- add_cout(carry, c[0], a[0], b);
- for (i = 1; i < n; i++)
- {
- add_cout_cin(carry, c[i], a[i], 0, carry);
- }
- return carry;
-}
-
-// http://graphics.stanford.edu/~seander/bithacks.html#IntegerAbs
-static uint8_t int8abs(int8_t v)
-{
- int8_t const mask = v >> 7;
- return (v + mask) ^ mask;
-}
-
-/* Constant time elliptic curve scalar multiplication.
- * Source: https://eprint.iacr.org/2014/130.pdf
- * when using w = 4.
- * Computes (X3 : Y3 : Z3) = k * (X1, Y1) \in E(F_p)
- * p is the prime used to define the finite field F_p
- * q is the (prime) order of the curve
- */
-void Jac_scalar_multiplication(
- uint32_t *X3, uint32_t *Y3, uint32_t *Z3, uint32_t *X1, uint32_t *Y1, uint32_t *k, uint32_t *p, uint32_t *q)
-{
- uint32_t *scalar, *M, *X, *Y, *Z, *mem;
- int i, sign, odd;
- // int8_t *rec;
- uint8_t index;
-
- /* Point to the start of the LUT table space. */
- mem = &CASPER_MEM[LUT_SCRATCH_START];
-
- scalar = &CASPER_MEM[LUT_SCRATCH_START + 12 * CASPER_NUM_LIMBS];
- X = &CASPER_MEM[LUT_SCRATCH_START + 13 * CASPER_NUM_LIMBS];
- Y = &CASPER_MEM[LUT_SCRATCH_START + 14 * CASPER_NUM_LIMBS];
- Z = &CASPER_MEM[LUT_SCRATCH_START + 15 * CASPER_NUM_LIMBS];
- M = &CASPER_MEM[LUT_SCRATCH_START + 16 * CASPER_NUM_LIMBS];
-
- /* Point to memory the recoded scalar.
- * CASPER_RECODE_LENGTH bytes is needed.
- */
- // rec = (int8_t*)&CASPER_MEM[LUT_SCRATCH_START + 17 * CASPER_NUM_LIMBS];
- int8_t rec[CASPER_RECODE_LENGTH];
-
- CASPER_MEMCPY(scalar, k, sizeof(uint32_t) * NUM_LIMBS);
-
-/* Precomputation: compute 1*P, 3*P, 5*P, and 7*P */
-#define LUT(P, x) (mem + (3 * ((P)-1) / 2 + (x)) * CASPER_NUM_LIMBS)
-
- /* Set 1*P */
- copy(Z3, ONE);
- copy(LUT(1, 0), X1);
- copy(LUT(1, 1), Y1);
- copy(LUT(1, 2), Z3);
-
- /* Compute 2*P */
- Jac_double(X3, Y3, Z3, X1, Y1, Z3);
-
- /* Compute 3*P = 2P + P */
- Jac_add_affine(LUT(3, 0), LUT(3, 1), LUT(3, 2), X3, Y3, Z3, X1, Y1);
-
- /* Compute 5*P = 3P + 2P */
- Jac_addition(LUT(5, 0), LUT(5, 1), LUT(5, 2), LUT(3, 0), LUT(3, 1), LUT(3, 2), X3, Y3, Z3);
-
- /* Compute 7*P = 5P + 2P */
- Jac_addition(LUT(7, 0), LUT(7, 1), LUT(7, 2), LUT(5, 0), LUT(5, 1), LUT(5, 2), X3, Y3, Z3);
-
- /* Recode the scalar */
- odd = casper_get_word(&scalar[0]) & 1u;
- sub_n(M, q, scalar, NUM_LIMBS); // todo!!!
- casper_select(scalar, M, scalar, odd, NUM_LIMBS);
-
- /* Use n=384 and w=4 --> compute ciel(384/3) = 128 + 1 digits */
- uint32_t scalarSysram[/*CASPER_*/ NUM_LIMBS];
- CASPER_MEMCPY(scalarSysram, scalar, /*CASPER_*/ NUM_LIMBS * sizeof(uint32_t));
- recode(rec, scalarSysram, N_bitlen, 4);
-
- /* Set the first value. */
- index = int8abs(rec[CASPER_RECODE_LENGTH - 1]);
- sign = ((uint8_t)rec[CASPER_RECODE_LENGTH - 1]) >> 7;
- copy(X3, LUT(index, 0));
- copy(Y3, LUT(index, 1));
- copy(Z3, LUT(index, 2));
-
- /* Get the correct LUT element in constant time by touching
- * all elements and masking out the correct one.
- */
-
-#define GET_LUT(x, y, z, index) \
- do \
- { \
- int m; \
- copy(x, LUT(1, 0)); \
- copy(y, LUT(1, 1)); \
- copy(z, LUT(1, 2)); \
- m = (index == 3); \
- casper_select(x, x, LUT(3, 0), m, NUM_LIMBS); \
- casper_select(y, y, LUT(3, 1), m, NUM_LIMBS); \
- casper_select(z, z, LUT(3, 2), m, NUM_LIMBS); \
- m = (index == 5); \
- casper_select(x, x, LUT(5, 0), m, NUM_LIMBS); \
- casper_select(y, y, LUT(5, 1), m, NUM_LIMBS); \
- casper_select(z, z, LUT(5, 2), m, NUM_LIMBS); \
- m = (index == 7); \
- casper_select(x, x, LUT(7, 0), m, NUM_LIMBS); \
- casper_select(y, y, LUT(7, 1), m, NUM_LIMBS); \
- casper_select(z, z, LUT(7, 2), m, NUM_LIMBS); \
- } while (0)
-
- GET_LUT(X3, Y3, Z3, index);
-
- /* Compute -y and select the positive or negative point. */
- sub_n(M, p, Y3, NUM_LIMBS); // todo!!!
- casper_select(Y3, Y3, M, sign, NUM_LIMBS);
-
- for (i = CASPER_RECODE_LENGTH - 2; i >= 0; i--)
- {
- Jac_double(X3, Y3, Z3, X3, Y3, Z3);
- Jac_double(X3, Y3, Z3, X3, Y3, Z3);
- Jac_double(X3, Y3, Z3, X3, Y3, Z3);
-
- index = int8abs(rec[i]);
- sign = ((uint8_t)rec[i]) >> 7;
-
- GET_LUT(X, Y, Z, index);
-
- /* Compute -y and select the positive or negative point. */
- sub_n(scalar, p, Y, NUM_LIMBS); // todo!!!
- casper_select(scalar, Y, scalar, sign, NUM_LIMBS);
-
- Jac_addition(X3, Y3, Z3, X3, Y3, Z3, X, scalar, Z);
- }
-
- sub_n(M, p, Y3, NUM_LIMBS); // todo!!!
-
- casper_select(Y3, M, Y3, odd, NUM_LIMBS);
-}
-
-#undef LUT
-#undef GET_LUT
-
-/*
- * Pre-compute the following 16 points:
- * 00 00 = 0*P + 0*Q <-- Not needed when using sliding windows
- * 00 01 = 0*P + 1*Q <-- Not needed when using sliding windows
- * 00 10 = 0*P + 2*Q
- * 00 11 = 0*P + 3*Q
- *
- * 01 00 = 1*P + 0*Q <-- Not needed when using sliding windows
- * 01 01 = 1*P + 1*Q <-- Not needed when using sliding windows
- * 01 10 = 1*P + 2*Q
- * 01 11 = 1*P + 3*Q
- *
- * 10 00 = 2*P + 0*Q
- * 10 01 = 2*P + 1*Q
- * 10 10 = 2*P + 2*Q
- * 10 11 = 2*P + 3*Q
- *
- * 11 00 = 3*P + 0*Q
- * 11 01 = 3*P + 1*Q
- * 11 10 = 3*P + 2*Q
- * 11 11 = 3*P + 3*Q
- *
- * index = (bitsi||bitsj)-2 - (biti != 0)*2
- *
- * Input: P = (X1 : Y1 : Z1) and
- * Q = (X2 : Y2 : Z2)
- * Output: mem, memory location for the LUT.
- */
-
-#define LUT_LIMBS NUM_LIMBS
-
-static void precompute_double_scalar_LUT(uint32_t *Px, uint32_t *Py, uint32_t *Qx, uint32_t *Qy)
-{
- uint32_t *Q2x, *Q2y, *Q2z, *P2x, *P2y, *P2z, *Z, *mem;
- int index = 0;
-
- Q2x = &CASPER_MEM[LUT_SCRATCH_START + 48 * LUT_LIMBS + 0 * CASPER_NUM_LIMBS];
- Q2y = &CASPER_MEM[LUT_SCRATCH_START + 48 * LUT_LIMBS + 1 * CASPER_NUM_LIMBS];
- Q2z = &CASPER_MEM[LUT_SCRATCH_START + 48 * LUT_LIMBS + 2 * CASPER_NUM_LIMBS];
-
- /* Re-use memory from different scratch space since no
- * projective point addition is used below. */
- P2x = &CASPER_MEM[ECC_SCRATCH_START + 5 * CASPER_NUM_LIMBS];
- P2z = &CASPER_MEM[ECC_SCRATCH_START + 6 * CASPER_NUM_LIMBS];
- P2y = &CASPER_MEM[ECC_SCRATCH_START + 7 * CASPER_NUM_LIMBS];
- Z = &CASPER_MEM[ECC_SCRATCH_START + 8 * CASPER_NUM_LIMBS];
-
- mem = &CASPER_MEM[LUT_SCRATCH_START];
-
- copy(Z, ONE);
-
- // 00 10 = 0*P + 2*Q
- Jac_double(Q2x, Q2y, Q2z, Qx, Qy, Z);
- copy(&mem[index], Q2x);
- index += LUT_LIMBS;
- copy(&mem[index], Q2y);
- index += LUT_LIMBS;
- copy(&mem[index], Q2z);
- index += LUT_LIMBS;
-
- // 00 11 = 0*P + 3*Q
- Jac_add_affine(P2x, P2y, P2z, Q2x, Q2y, Q2z, Qx, Qy);
- copy(&mem[index], P2x);
- index += LUT_LIMBS;
- copy(&mem[index], P2y);
- index += LUT_LIMBS;
- copy(&mem[index], P2z);
- index += LUT_LIMBS;
-
- // 01 10 = 1*P + 2*Q
- Jac_add_affine(P2x, P2y, P2z, Q2x, Q2y, Q2z, Px, Py);
- copy(&mem[index], P2x);
- index += LUT_LIMBS;
- copy(&mem[index], P2y);
- index += LUT_LIMBS;
- copy(&mem[index], P2z);
- index += LUT_LIMBS;
-
- // 01 11 = 1*P + 3*Q
- Jac_add_affine(P2x, P2y, P2z, P2x, P2y, P2z, Qx, Qy);
- copy(&mem[index], P2x);
- index += LUT_LIMBS;
- copy(&mem[index], P2y);
- index += LUT_LIMBS;
- copy(&mem[index], P2z);
- index += LUT_LIMBS;
-
- // 10 00 = 2*P + 0*Q
- Jac_double(P2x, P2y, P2z, Px, Py, Z);
- copy(&mem[index], P2x);
- index += LUT_LIMBS;
- copy(&mem[index], P2y);
- index += LUT_LIMBS;
- copy(&mem[index], P2z);
- index += LUT_LIMBS;
-
- // 10 01 = 2*P + 1*Q
- Jac_add_affine(Q2x, Q2y, Q2z, P2x, P2y, P2z, Qx, Qy);
- copy(&mem[index], Q2x);
- index += LUT_LIMBS;
- copy(&mem[index], Q2y);
- index += LUT_LIMBS;
- copy(&mem[index], Q2z);
- index += LUT_LIMBS;
-
- // 10 10 = 2*P + 2*Q
- Jac_add_affine(Q2x, Q2y, Q2z, Q2x, Q2y, Q2z, Qx, Qy);
- copy(&mem[index], Q2x);
- index += LUT_LIMBS;
- copy(&mem[index], Q2y);
- index += LUT_LIMBS;
- copy(&mem[index], Q2z);
- index += LUT_LIMBS;
-
- // 10 11 = 2*P + 3*Q
- Jac_add_affine(Q2x, Q2y, Q2z, Q2x, Q2y, Q2z, Qx, Qy);
- copy(&mem[index], Q2x);
- index += LUT_LIMBS;
- copy(&mem[index], Q2y);
- index += LUT_LIMBS;
- copy(&mem[index], Q2z);
- index += LUT_LIMBS;
-
- // 11 00 = 3*P + 0*Q
- Jac_add_affine(P2x, P2y, P2z, P2x, P2y, P2z, Px, Py);
- copy(&mem[index], P2x);
- index += LUT_LIMBS;
- copy(&mem[index], P2y);
- index += LUT_LIMBS;
- copy(&mem[index], P2z);
- index += LUT_LIMBS;
-
- // 11 01 = 3*P + 1*Q
- Jac_add_affine(Q2x, Q2y, Q2z, P2x, P2y, P2z, Qx, Qy);
- copy(&mem[index], Q2x);
- index += LUT_LIMBS;
- copy(&mem[index], Q2y);
- index += LUT_LIMBS;
- copy(&mem[index], Q2z);
- index += LUT_LIMBS;
-
- // 11 10 = 3*P + 2*Q
- Jac_add_affine(Q2x, Q2y, Q2z, Q2x, Q2y, Q2z, Qx, Qy);
- copy(&mem[index], Q2x);
- index += LUT_LIMBS;
- copy(&mem[index], Q2y);
- index += LUT_LIMBS;
- copy(&mem[index], Q2z);
- index += LUT_LIMBS;
-
- // 11 11 = 3*P + 3*Q
- Jac_add_affine(Q2x, Q2y, Q2z, Q2x, Q2y, Q2z, Qx, Qy);
- copy(&mem[index], Q2x);
- index += LUT_LIMBS;
- copy(&mem[index], Q2y);
- index += LUT_LIMBS;
- copy(&mem[index], Q2z);
- index += LUT_LIMBS;
-}
-
-#define GETLUTX(x) (3 * (x)*LUT_LIMBS)
-#define GETLUTY(x) (3 * (x)*LUT_LIMBS + 1 * LUT_LIMBS)
-#define GETLUTZ(x) (3 * (x)*LUT_LIMBS + 2 * LUT_LIMBS)
-
-/* Compute the double scalar multiplication
- * (X3 : Y3 : Z3) = k1 * (X1, Y1) + k2 * (X2, Y2)
- * Using Shamir's trick and precomputing 16 points.
- * This code is *not* constant time since this is used
- * for verification only.
- */
-void double_scalar_multiplication(uint32_t *X3,
- uint32_t *Y3,
- uint32_t *Z3,
- uint32_t *X1,
- uint32_t *Y1,
- uint32_t *k1,
- uint32_t *X2,
- uint32_t *Y2,
- uint32_t *k2)
-{
- uint32_t index, c = 0;
- uint32_t *p1, *p2, x1, x2, *lut, *Tx, *Ty, *Tz;
-
- precompute_double_scalar_LUT(X1, Y1, X2, Y2);
-
- lut = &CASPER_MEM[LUT_SCRATCH_START];
- p1 = &CASPER_MEM[LUT_SCRATCH_START + 48 * LUT_LIMBS];
- p2 = &CASPER_MEM[LUT_SCRATCH_START + 48 * LUT_LIMBS + 1 * CASPER_NUM_LIMBS];
-
- Tx = &CASPER_MEM[LUT_SCRATCH_START + 48 * LUT_LIMBS + 2 * CASPER_NUM_LIMBS];
- Ty = &CASPER_MEM[LUT_SCRATCH_START + 48 * LUT_LIMBS + 3 * CASPER_NUM_LIMBS];
- Tz = &CASPER_MEM[LUT_SCRATCH_START + 48 * LUT_LIMBS + 4 * CASPER_NUM_LIMBS];
-
- CASPER_MEMCPY(p1, k1, sizeof(uint32_t) * NUM_LIMBS);
- CASPER_MEMCPY(p2, k2, sizeof(uint32_t) * NUM_LIMBS);
-
- /* Check if we can slide. */
- while (((casper_get_word(&p1[NUM_LIMBS - 1]) | casper_get_word(&p2[NUM_LIMBS - 1])) >> 31) == 0 && c < 256)
- {
- shiftleft(p1, p1, 1);
- shiftleft(p2, p2, 1);
- c++;
- /* No doubling needed. */
- }
-
- /* Set the first value. */
- x1 = casper_get_word(&p1[NUM_LIMBS - 1]) >> 30;
- x2 = casper_get_word(&p2[NUM_LIMBS - 1]) >> 30;
- index = (x2 | (x1 << 2)) - 2 - (x1 != 0) * 2;
- shiftleft(p1, p1, 2);
- shiftleft(p2, p2, 2);
-
- copy(X3, &lut[GETLUTX(index)]);
- copy(Y3, &lut[GETLUTY(index)]);
- copy(Z3, &lut[GETLUTZ(index)]);
- c += 2;
-
-// todo: create an is_zero function
-#if CASPER_ECC_P256
- while ((casper_get_word(&p1[0]) | casper_get_word(&p1[1]) | casper_get_word(&p1[2]) | casper_get_word(&p1[3]) |
- casper_get_word(&p1[4]) | casper_get_word(&p1[5]) | casper_get_word(&p1[6]) | casper_get_word(&p1[7]) |
- casper_get_word(&p2[0]) | casper_get_word(&p2[1]) | casper_get_word(&p2[2]) | casper_get_word(&p2[3]) |
- casper_get_word(&p2[4]) | casper_get_word(&p2[5]) | casper_get_word(&p2[6]) | casper_get_word(&p2[7])) != 0)
- {
-#elif CASPER_ECC_P384
- while ((casper_get_word(&p1[0]) | casper_get_word(&p1[1]) | casper_get_word(&p1[2]) | casper_get_word(&p1[3]) |
- casper_get_word(&p1[4]) | casper_get_word(&p1[5]) | casper_get_word(&p1[6]) | casper_get_word(&p1[7]) |
- casper_get_word(&p1[8]) | casper_get_word(&p1[9]) | casper_get_word(&p1[10]) | casper_get_word(&p1[11]) |
- casper_get_word(&p2[0]) | casper_get_word(&p2[1]) | casper_get_word(&p2[2]) | casper_get_word(&p2[3]) |
- casper_get_word(&p2[4]) | casper_get_word(&p2[5]) | casper_get_word(&p2[6]) | casper_get_word(&p2[7]) |
- casper_get_word(&p2[8]) | casper_get_word(&p2[9]) | casper_get_word(&p2[10]) | casper_get_word(&p2[11])) !=
- 0)
- {
-#endif
- /* Check if we can slide. */
- while (((casper_get_word(&p1[NUM_LIMBS - 1]) | casper_get_word(&p2[NUM_LIMBS - 1])) >> 31) == 0 && c < N_bitlen)
- {
- shiftleft(p1, p1, 1);
- shiftleft(p2, p2, 1);
- Jac_double(X3, Y3, Z3, X3, Y3, Z3);
- c++;
- }
-
- if (c >= (N_bitlen - 1))
- break;
-
- /* Double twice. */
- Jac_double(X3, Y3, Z3, X3, Y3, Z3);
- Jac_double(X3, Y3, Z3, X3, Y3, Z3);
-
- /* Add in the correct value. */
- x1 = casper_get_word(&p1[NUM_LIMBS - 1]) >> 30;
- x2 = casper_get_word(&p2[NUM_LIMBS - 1]) >> 30;
- index = (x2 | (x1 << 2)) - 2 - (x1 != 0) * 2;
-
- shiftleft(p1, p1, 2);
- shiftleft(p2, p2, 2);
-
- copy(Tx, &lut[GETLUTX(index)]);
- copy(Ty, &lut[GETLUTY(index)]);
- copy(Tz, &lut[GETLUTZ(index)]);
-
- Jac_addition(X3, Y3, Z3, X3, Y3, Z3, Tx, Ty,
- Tz); //&lut[GETLUTX(index)], &lut[GETLUTY(index)], &lut[GETLUTZ(index)]);
- c += 2;
- }
-
- /* Special case in the end. */
- if (c == (N_bitlen - 1))
- {
- Jac_double(X3, Y3, Z3, X3, Y3, Z3);
- x1 = casper_get_word(&p1[NUM_LIMBS - 1]) >> 31;
- x2 = casper_get_word(&p2[NUM_LIMBS - 1]) >> 31;
- if (x1)
- {
- Jac_add_affine(X3, Y3, Z3, X3, Y3, Z3, X1, Y1);
- }
- if (x2)
- {
- Jac_add_affine(X3, Y3, Z3, X3, Y3, Z3, X2, Y2);
- }
- c++;
- }
-
- while (c < N_bitlen)
- {
- Jac_double(X3, Y3, Z3, X3, Y3, Z3);
- c++;
- }
-}
-
-#if CASPER_ECC_P256
-static void invert_mod_p256(uint32_t *c, uint32_t *a)
-{
- int i;
- uint32_t *t, *t2, *s1, *s2, *s4, *s8, *tmp;
-
- /* Assuming it is safe to use the ECC scratch size. */
- t = &CASPER_MEM[ECC_SCRATCH_START + 2 * CASPER_NUM_LIMBS];
- t2 = &CASPER_MEM[ECC_SCRATCH_START + 3 * CASPER_NUM_LIMBS];
- s1 = &CASPER_MEM[ECC_SCRATCH_START + 4 * CASPER_NUM_LIMBS];
- s2 = &CASPER_MEM[ECC_SCRATCH_START + 5 * CASPER_NUM_LIMBS];
- s4 = &CASPER_MEM[ECC_SCRATCH_START + 6 * CASPER_NUM_LIMBS];
- s8 = &CASPER_MEM[ECC_SCRATCH_START + 7 * CASPER_NUM_LIMBS];
- tmp = &CASPER_MEM[ECC_SCRATCH_START + 8 * CASPER_NUM_LIMBS];
-
- // t2 = n^(2^1)*n # 11
- square_casper(tmp, a);
- multiply_casper(t2, tmp, a);
-
- // s1 = t2^(2^2)*t2 # F
- square_casper(s1, t2);
- square_casper(tmp, s1);
- multiply_casper(s1, tmp, t2);
-
- // s2 = s1^(2^4)*s1 # FF
- square_casper(s2, s1);
- // for (i = 1; i < 4; i++) square(s2, s2);
- square_casper(tmp, s2);
- square_casper(s2, tmp);
- square_casper(tmp, s2);
- multiply_casper(s2, tmp, s1);
-
- // s4 = s2^(2^8)*s2 # FFFF
- square_casper(s4, s2);
- for (i = 1; i < 7; i += 2)
- {
- square_casper(tmp, s4);
- square_casper(s4, tmp);
- }
- square_casper(tmp, s4);
- multiply_casper(s4, tmp, s2);
-
- // s8 = s4^(2^16)*s4 # FFFFFFFF
- square_casper(s8, s4);
- for (i = 1; i < 15; i += 2)
- {
- square_casper(tmp, s8);
- square_casper(s8, tmp);
- }
- square_casper(tmp, s8);
- multiply_casper(s8, tmp, s4);
-
- // t = s8^(2^32)*n # ffffffff00000001
- square_casper(tmp, s8);
- for (i = 1; i < 31; i += 2)
- {
- square_casper(t, tmp);
- square_casper(tmp, t);
- }
- square_casper(t, tmp);
- multiply_casper(tmp, t, a);
-
- // t = t^(2^128)*s8 # ffffffff00000001000000000000000000000000ffffffff
- for (i = 0; i < 128; i += 2)
- {
- square_casper(t, tmp);
- square_casper(tmp, t);
- }
- multiply_casper(t, tmp, s8);
-
- // t = t^(2^32)*s8 # ffffffff00000001000000000000000000000000ffffffffffffffff
- for (i = 0; i < 32; i += 2)
- {
- square_casper(tmp, t);
- square_casper(t, tmp);
- }
- multiply_casper(tmp, t, s8);
-
- // t = t^(2^16)*s4 # ffffffff00000001000000000000000000000000ffffffffffffffffffff
- for (i = 0; i < 16; i += 2)
- {
- square_casper(t, tmp);
- square_casper(tmp, t);
- }
- multiply_casper(t, tmp, s4);
-
- // t = t^(2^8)*s2 # ffffffff00000001000000000000000000000000ffffffffffffffffffffff
- for (i = 0; i < 8; i += 2)
- {
- square_casper(tmp, t);
- square_casper(t, tmp);
- }
- multiply_casper(tmp, t, s2);
-
- // t = t^(2^4)*s1 # ffffffff00000001000000000000000000000000fffffffffffffffffffffff
- for (i = 0; i < 4; i += 2)
- {
- square_casper(t, tmp);
- square_casper(tmp, t);
- }
- multiply_casper(t, tmp, s1);
-
- // t = t^(2^2)*t2
- square_casper(tmp, t);
- square_casper(t, tmp);
- multiply_casper(tmp, t, t2);
-
- // t = t^(2^2)*n # ffffffff00000001000000000000000000000000fffffffffffffffffffffffd
- square_casper(t, tmp);
- square_casper(tmp, t);
- multiply_casper(c, tmp, a);
-}
-
-// A and C do not need to be in Casper memory
-static void toMontgomery(uint32_t *C, uint32_t *A)
-{
- /* R^2 = 2^512 mod p, used to convert values to Montgomery form. */
- uint32_t R2[NUM_LIMBS] = {0x00000003, 0x00000000, 0xffffffff, 0xfffffffb, 0xfffffffe, 0xffffffff, 0xfffffffd, 0x4};
- uint32_t *T1, *T2, *T3;
- T1 = &CASPER_MEM[ECC_SCRATCH_START + 0 * CASPER_NUM_LIMBS];
- T2 = &CASPER_MEM[ECC_SCRATCH_START + 1 * CASPER_NUM_LIMBS];
- T3 = &CASPER_MEM[ECC_SCRATCH_START + 2 * CASPER_NUM_LIMBS];
-
- CASPER_MEMCPY(T1, R2, NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(T2, A, NUM_LIMBS * sizeof(uint32_t));
-
- multiply_casper(T3, T2, T1);
- CASPER_MEMCPY(C, T3, NUM_LIMBS * sizeof(uint32_t));
-}
-#endif /* CASPER_ECC_P256 */
-
-/* Compute inversion modulo NIST-p384 using Fermats little theorem.
- * Using c = a^(p-2) = a^(-1) mod p.
- * This computes the modular inversion if all arithmetic is "regular"
- * modular arithmetic or computes automatically the Montgomery inverse
- * if all arithmetic is Montgomery arithmetic.
- */
-#if CASPER_ECC_P384
-static void invert_mod_p384(uint32_t *c, uint32_t *a)
-{
- int i;
- uint32_t *e, *d, *tmp, *t0, *t1, *t2, *t3, *t4, *t5, *t6; // 10 residues needed
-
- /* Assuming it is safe to use the LUT scratch size.
- * Hence, do not invert while elements in the LUT are needed.
- */
- e = &CASPER_MEM[LUT_SCRATCH_START + 0 * CASPER_NUM_LIMBS];
- d = &CASPER_MEM[LUT_SCRATCH_START + 1 * CASPER_NUM_LIMBS];
- tmp = &CASPER_MEM[LUT_SCRATCH_START + 2 * CASPER_NUM_LIMBS];
- t0 = &CASPER_MEM[LUT_SCRATCH_START + 3 * CASPER_NUM_LIMBS];
- t1 = &CASPER_MEM[LUT_SCRATCH_START + 4 * CASPER_NUM_LIMBS];
- t2 = &CASPER_MEM[LUT_SCRATCH_START + 5 * CASPER_NUM_LIMBS];
- t3 = &CASPER_MEM[LUT_SCRATCH_START + 6 * CASPER_NUM_LIMBS];
- t4 = &CASPER_MEM[LUT_SCRATCH_START + 7 * CASPER_NUM_LIMBS];
- t5 = &CASPER_MEM[LUT_SCRATCH_START + 8 * CASPER_NUM_LIMBS];
- t6 = &CASPER_MEM[LUT_SCRATCH_START + 9 * CASPER_NUM_LIMBS];
-
- square_casper(tmp, a); // 2
- square_casper(t1, tmp); // 4
- square_casper(tmp, t1); // 8
- multiply_casper(t2, tmp, t1); // 12
- multiply_casper(d, a, t2); // 13
- multiply_casper(e, d, a); // 14
- multiply_casper(t0, e, a); // 15
-
- // t1 = t0^(2^4)*t0 # ff
- square_casper(tmp, t0);
- square_casper(t1, tmp);
- square_casper(tmp, t1);
- square_casper(t2, tmp);
- multiply_casper(t1, t2, t0);
-
- // t2 = t1^(2^8)*t1 # 4f
- square_casper(tmp, t1);
- for (i = 0; i < 3; i++)
- {
- square_casper(t3, tmp);
- square_casper(tmp, t3);
- }
- square_casper(t3, tmp);
- multiply_casper(t2, t3, t1);
-
- // t3 = t2^(2^16)*t2 # 8f
- square_casper(tmp, t2);
- for (i = 0; i < 7; i++)
- {
- square_casper(t4, tmp);
- square_casper(tmp, t4);
- }
- square_casper(t4, tmp);
- multiply_casper(t3, t4, t2);
-
- // t4 = t3^(2^32)*t3 # 16f
- square_casper(tmp, t3);
- for (i = 0; i < 15; i++)
- {
- square_casper(t5, tmp);
- square_casper(tmp, t5);
- }
- square_casper(t5, tmp);
- multiply_casper(t4, t5, t3);
-
- // t5 = t4^(2^64)*t4 # 32f
- square_casper(tmp, t4);
- for (i = 0; i < 31; i++)
- {
- square_casper(t6, tmp);
- square_casper(tmp, t6);
- }
- square_casper(t6, tmp);
- multiply_casper(t5, t6, t4);
-
- // t5 = t5^(2^64)*t4 # 48f
- square_casper(tmp, t5);
- for (i = 0; i < 31; i++)
- {
- square_casper(t6, tmp);
- square_casper(tmp, t6);
- }
- square_casper(t6, tmp);
- multiply_casper(t5, t6, t4);
-
- // t5 = t5^(2^32)*t3 # 56f
- square_casper(tmp, t5);
- for (i = 0; i < 15; i++)
- {
- square_casper(t6, tmp);
- square_casper(tmp, t6);
- }
- square_casper(t6, tmp);
- multiply_casper(t5, t6, t3);
-
- // t5 = t5^(2^16)*t2 # 60f
- square_casper(tmp, t5);
- for (i = 0; i < 7; i++)
- {
- square_casper(t6, tmp);
- square_casper(tmp, t6);
- }
- square_casper(t6, tmp);
- multiply_casper(t5, t6, t2);
-
- // t5 = t5^(2^8)*t1 # 62f
- square_casper(tmp, t5);
- for (i = 0; i < 3; i++)
- {
- square_casper(t6, tmp);
- square_casper(tmp, t6);
- }
- square_casper(t6, tmp);
- multiply_casper(t5, t6, t1);
-
- // n = t5^(2^4)*t0 # 63f
- square_casper(tmp, t5);
- for (i = 0; i < 1; i++)
- {
- square_casper(t6, tmp);
- square_casper(tmp, t6);
- }
- square_casper(t6, tmp);
- multiply_casper(t5, t6, t0);
-
- // n = n^(2^4)*e
- square_casper(tmp, t5);
- for (i = 0; i < 1; i++)
- {
- square_casper(t6, tmp);
- square_casper(tmp, t6);
- }
- square_casper(t6, tmp);
- multiply_casper(t5, t6, e);
-
- // n = n^(2^32)*t3
- square_casper(tmp, t5);
- for (i = 0; i < 15; i++)
- {
- square_casper(t6, tmp);
- square_casper(tmp, t6);
- }
- square_casper(t6, tmp);
- multiply_casper(t5, t6, t3);
-
- // n = n^(2^64)
- square_casper(tmp, t5);
- for (i = 0; i < 31; i++)
- {
- square_casper(t6, tmp);
- square_casper(tmp, t6);
- }
- square_casper(t5, tmp);
-
- // n = n^(2^16)*t2
- square_casper(tmp, t5);
- for (i = 0; i < 7; i++)
- {
- square_casper(t6, tmp);
- square_casper(tmp, t6);
- }
- square_casper(t6, tmp);
- multiply_casper(t5, t6, t2);
-
- // n = n^(2^8)*t1
- square_casper(tmp, t5);
- for (i = 0; i < 3; i++)
- {
- square_casper(t6, tmp);
- square_casper(tmp, t6);
- }
- square_casper(t6, tmp);
- multiply_casper(t5, t6, t1);
-
- // n = n^(2^4)*t0
- square_casper(tmp, t5);
- for (i = 0; i < 1; i++)
- {
- square_casper(t6, tmp);
- square_casper(tmp, t6);
- }
- square_casper(t6, tmp);
- multiply_casper(t5, t6, t0);
-
- // n = n^(2^4)*d
- square_casper(tmp, t5);
- for (i = 0; i < 1; i++)
- {
- square_casper(t6, tmp);
- square_casper(tmp, t6);
- }
- square_casper(t6, tmp);
- multiply_casper(c, t6, d);
-}
-
-// A and C do not need to be in Casper memory
-static void toMontgomery(uint32_t *C, uint32_t *A)
-{
- /* R^2 = 2^768 mod p, used to convert values to Montgomery form. */
- uint32_t R2[NUM_LIMBS] = {0x00000001, 0xfffffffe, 0x00000000, 0x00000002, 0x00000000, 0xfffffffe,
- 0x00000000, 0x00000002, 0x1, 0x0, 0x0, 0x0};
- uint32_t *T1, *T2, *T3;
- T1 = &CASPER_MEM[ECC_SCRATCH_START + 0 * CASPER_NUM_LIMBS];
- T2 = &CASPER_MEM[ECC_SCRATCH_START + 1 * CASPER_NUM_LIMBS];
- T3 = &CASPER_MEM[ECC_SCRATCH_START + 2 * CASPER_NUM_LIMBS];
-
- CASPER_MEMCPY(T1, R2, NUM_LIMBS * sizeof(uint32_t));
- CASPER_MEMCPY(T2, A, NUM_LIMBS * sizeof(uint32_t));
-
- multiply_casper(T3, T2, T1);
- CASPER_MEMCPY(C, T3, NUM_LIMBS * sizeof(uint32_t));
-}
-#endif /* CASPER_ECC_P384 */
-
-#if defined(__GNUC__)
-/* End of enforcing O1 optimize level */
-#pragma GCC pop_options
-#endif
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_casper.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_casper.h
deleted file mode 100755
index 6191b585b1..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_casper.h
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- * Copyright 2018-2019 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef _FSL_CASPER_H_
-#define _FSL_CASPER_H_
-
-#include "fsl_common.h"
-
-/*! @file */
-
-/*******************************************************************************
- * Definitions
- *******************************************************************************/
-
-/*!
- * @addtogroup casper_driver
- * @{
- */
-/*! @name Driver version */
-/*@{*/
-/*! @brief CASPER driver version. Version 2.0.5.
- *
- * Current version: 2.0.5
- *
- * Change log:
- * - Version 2.0.0
- * - Initial version
- * - Version 2.0.1
- * - Bug fix KPSDK-24531 double_scalar_multiplication() result may be all zeroes for some specific input
- * - Version 2.0.2
- * - Bug fix KPSDK-25015 CASPER_MEMCPY hard-fault on LPC55xx when both source and destination buffers are outside of
- * CASPER_RAM
- * - Version 2.0.3
- * - Bug fix KPSDK-28107 RSUB, FILL and ZERO operations not implemented in enum _casper_operation.
- * - Version 2.0.4
- * - For GCC compiler, enforce O1 optimize level, specifically to remove strict-aliasing option.
- * This driver is very specific and requires -fno-strict-aliasing.
- * - Version 2.0.5
- * - Fix sign-compare warning.
- */
-#define FSL_CASPER_DRIVER_VERSION (MAKE_VERSION(2, 0, 5))
-/*@}*/
-
-/*! @brief CASPER operation
- *
- */
-typedef enum _casper_operation
-{
- kCASPER_OpMul6464NoSum = 0x01, /*! Walking 1 or more of J loop, doing r=a*b using 64x64=128*/
- kCASPER_OpMul6464Sum =
- 0x02, /*! Walking 1 or more of J loop, doing c,r=r+a*b using 64x64=128, but assume inner j loop*/
- kCASPER_OpMul6464FullSum =
- 0x03, /*! Walking 1 or more of J loop, doing c,r=r+a*b using 64x64=128, but sum all of w. */
- kCASPER_OpMul6464Reduce =
- 0x04, /*! Walking 1 or more of J loop, doing c,r[-1]=r+a*b using 64x64=128, but skip 1st write*/
- kCASPER_OpAdd64 = 0x08, /*! Walking add with off_AB, and in/out off_RES doing c,r=r+a+c using 64+64=65*/
- kCASPER_OpSub64 = 0x09, /*! Walking subtract with off_AB, and in/out off_RES doing r=r-a using 64-64=64, with last
- borrow implicit if any*/
- kCASPER_OpDouble64 = 0x0A, /*! Walking add to self with off_RES doing c,r=r+r+c using 64+64=65*/
- kCASPER_OpXor64 = 0x0B, /*! Walking XOR with off_AB, and in/out off_RES doing r=r^a using 64^64=64*/
- kCASPER_OpRSub64 = 0x0C, /*! Walking subtract with off_AB, and in/out off_RES using r=a-r */
- kCASPER_OpShiftLeft32 =
- 0x10, /*! Walking shift left doing r1,r=(b*D)|r1, where D is 2^amt and is loaded by app (off_CD not used)*/
- kCASPER_OpShiftRight32 = 0x11, /*! Walking shift right doing r,r1=(b*D)|r1, where D is 2^(32-amt) and is loaded by
- app (off_CD not used) and off_RES starts at MSW*/
- kCASPER_OpCopy = 0x14, /*! Copy from ABoff to resoff, 64b at a time*/
- kCASPER_OpRemask = 0x15, /*! Copy and mask from ABoff to resoff, 64b at a time*/
- kCASPER_OpFill = 0x16, /*! Fill RESOFF using 64 bits at a time with value in A and B */
- kCASPER_OpZero = 0x17, /*! Fill RESOFF using 64 bits at a time of 0s */
- kCASPER_OpCompare = 0x18, /*! Compare two arrays, running all the way to the end*/
- kCASPER_OpCompareFast = 0x19, /*! Compare two arrays, stopping on 1st !=*/
-} casper_operation_t;
-
-#define CASPER_CP 1
-#define CASPER_CP_CTRL0 (0x0 >> 2)
-#define CASPER_CP_CTRL1 (0x4 >> 2)
-#define CASPER_CP_LOADER (0x8 >> 2)
-#define CASPER_CP_STATUS (0xC >> 2)
-#define CASPER_CP_INTENSET (0x10 >> 2)
-#define CASPER_CP_INTENCLR (0x14 >> 2)
-#define CASPER_CP_INTSTAT (0x18 >> 2)
-#define CASPER_CP_AREG (0x20 >> 2)
-#define CASPER_CP_BREG (0x24 >> 2)
-#define CASPER_CP_CREG (0x28 >> 2)
-#define CASPER_CP_DREG (0x2C >> 2)
-#define CASPER_CP_RES0 (0x30 >> 2)
-#define CASPER_CP_RES1 (0x34 >> 2)
-#define CASPER_CP_RES2 (0x38 >> 2)
-#define CASPER_CP_RES3 (0x3C >> 2)
-#define CASPER_CP_MASK (0x60 >> 2)
-#define CASPER_CP_REMASK (0x64 >> 2)
-#define CASPER_CP_LOCK (0x80 >> 2)
-#define CASPER_CP_ID (0xFFC >> 2)
-/* mcr (cp, opc1, value, CRn, CRm, opc2) */
-#define CASPER_Wr32b(value, off) __arm_mcr(CASPER_CP, 0, value, ((off >> 4)), (off), 0)
-/* mcrr(coproc, opc1, value, CRm) */
-#define CASPER_Wr64b(value, off) __arm_mcrr(CASPER_CP, 0, value, off)
-/* mrc(coproc, opc1, CRn, CRm, opc2) */
-#define CASPER_Rd32b(off) __arm_mrc(CASPER_CP, 0, ((off >> 4)), (off), 0)
-
-/* The model for this algo is that it can be implemented for a fixed size RSA key */
-/* for max speed. If this is made into a variable (to allow varying size), then */
-/* it will be slower by a bit. */
-/* The file is compiled with N_bitlen passed in as number of bits of the RSA key */
-/* #define N_bitlen 2048 */
-#define N_wordlen_max (4096 / 32)
-
-#define CASPER_ECC_P256 1
-#define CASPER_ECC_P384 0
-
-#if CASPER_ECC_P256
-#define N_bitlen 256
-#endif /* CASPER_ECC_P256 */
-
-#if CASPER_ECC_P384
-#define N_bitlen 384
-#endif /* CASPER_ECC_P256 */
-
-#define NUM_LIMBS (N_bitlen / 32)
-
-enum
-{
- kCASPER_RamOffset_Result = 0x0u,
- kCASPER_RamOffset_Base = (N_wordlen_max + 8u),
- kCASPER_RamOffset_TempBase = (2u * N_wordlen_max + 16u),
- kCASPER_RamOffset_Modulus = (kCASPER_RamOffset_TempBase + N_wordlen_max + 4u),
- kCASPER_RamOffset_M64 = 1022,
-};
-
-/*! @} */
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/*!
- * @addtogroup casper_driver
- * @{
- */
-
-/*!
- * @brief Enables clock and disables reset for CASPER peripheral.
- *
- * Enable clock and disable reset for CASPER.
- *
- * @param base CASPER base address
- */
-void CASPER_Init(CASPER_Type *base);
-
-/*!
- * @brief Disables clock for CASPER peripheral.
- *
- * Disable clock and enable reset.
- *
- * @param base CASPER base address
- */
-void CASPER_Deinit(CASPER_Type *base);
-
-/*!
- *@}
- */ /* end of casper_driver */
-
-/*******************************************************************************
- * PKHA API
- ******************************************************************************/
-
-/*!
- * @addtogroup casper_driver_pkha
- * @{
- */
-
-/*!
- * @brief Performs modular exponentiation - (A^E) mod N.
- *
- * This function performs modular exponentiation.
- *
- * @param base CASPER base address
- * @param signature first addend (in little endian format)
- * @param pubN modulus (in little endian format)
- * @param wordLen Size of pubN in bytes
- * @param pubE exponent
- * @param[out] plaintext Output array to store result of operation (in little endian format)
- */
-void CASPER_ModExp(CASPER_Type *base,
- const uint8_t *signature,
- const uint8_t *pubN,
- size_t wordLen,
- uint32_t pubE,
- uint8_t *plaintext);
-
-void CASPER_ecc_init(void);
-
-/*!
- * @brief Performs ECC secp256r1 point single scalar multiplication
- *
- * This function performs ECC secp256r1 point single scalar multiplication
- * [resX; resY] = scalar * [X; Y]
- * Coordinates are affine in normal form, little endian.
- * Scalars are little endian.
- * All arrays are little endian byte arrays, uint32_t type is used
- * only to enforce the 32-bit alignment (0-mod-4 address).
- *
- * @param base CASPER base address
- * @param[out] resX Output X affine coordinate in normal form, little endian.
- * @param[out] resY Output Y affine coordinate in normal form, little endian.
- * @param X Input X affine coordinate in normal form, little endian.
- * @param Y Input Y affine coordinate in normal form, little endian.
- * @param scalar Input scalar integer, in normal form, little endian.
- */
-void CASPER_ECC_SECP256R1_Mul(
- CASPER_Type *base, uint32_t resX[8], uint32_t resY[8], uint32_t X[8], uint32_t Y[8], uint32_t scalar[8]);
-
-/*!
- * @brief Performs ECC secp256r1 point double scalar multiplication
- *
- * This function performs ECC secp256r1 point double scalar multiplication
- * [resX; resY] = scalar1 * [X1; Y1] + scalar2 * [X2; Y2]
- * Coordinates are affine in normal form, little endian.
- * Scalars are little endian.
- * All arrays are little endian byte arrays, uint32_t type is used
- * only to enforce the 32-bit alignment (0-mod-4 address).
- *
- * @param base CASPER base address
- * @param[out] resX Output X affine coordinate.
- * @param[out] resY Output Y affine coordinate.
- * @param X1 Input X1 affine coordinate.
- * @param Y1 Input Y1 affine coordinate.
- * @param scalar1 Input scalar1 integer.
- * @param X2 Input X2 affine coordinate.
- * @param Y2 Input Y2 affine coordinate.
- * @param scalar2 Input scalar2 integer.
- */
-void CASPER_ECC_SECP256R1_MulAdd(CASPER_Type *base,
- uint32_t resX[8],
- uint32_t resY[8],
- uint32_t X1[8],
- uint32_t Y1[8],
- uint32_t scalar1[8],
- uint32_t X2[8],
- uint32_t Y2[8],
- uint32_t scalar2[8]);
-
-/*!
- * @brief Performs ECC secp384r1 point single scalar multiplication
- *
- * This function performs ECC secp384r1 point single scalar multiplication
- * [resX; resY] = scalar * [X; Y]
- * Coordinates are affine in normal form, little endian.
- * Scalars are little endian.
- * All arrays are little endian byte arrays, uint32_t type is used
- * only to enforce the 32-bit alignment (0-mod-4 address).
- *
- * @param base CASPER base address
- * @param[out] resX Output X affine coordinate in normal form, little endian.
- * @param[out] resY Output Y affine coordinate in normal form, little endian.
- * @param X Input X affine coordinate in normal form, little endian.
- * @param Y Input Y affine coordinate in normal form, little endian.
- * @param scalar Input scalar integer, in normal form, little endian.
- */
-void CASPER_ECC_SECP384R1_Mul(
- CASPER_Type *base, uint32_t resX[12], uint32_t resY[12], uint32_t X[12], uint32_t Y[12], uint32_t scalar[12]);
-
-/*!
- * @brief Performs ECC secp384r1 point double scalar multiplication
- *
- * This function performs ECC secp384r1 point double scalar multiplication
- * [resX; resY] = scalar1 * [X1; Y1] + scalar2 * [X2; Y2]
- * Coordinates are affine in normal form, little endian.
- * Scalars are little endian.
- * All arrays are little endian byte arrays, uint32_t type is used
- * only to enforce the 32-bit alignment (0-mod-4 address).
- *
- * @param base CASPER base address
- * @param[out] resX Output X affine coordinate.
- * @param[out] resY Output Y affine coordinate.
- * @param X1 Input X1 affine coordinate.
- * @param Y1 Input Y1 affine coordinate.
- * @param scalar1 Input scalar1 integer.
- * @param X2 Input X2 affine coordinate.
- * @param Y2 Input Y2 affine coordinate.
- * @param scalar2 Input scalar2 integer.
- */
-void CASPER_ECC_SECP384R1_MulAdd(CASPER_Type *base,
- uint32_t resX[12],
- uint32_t resY[12],
- uint32_t X1[12],
- uint32_t Y1[12],
- uint32_t scalar1[12],
- uint32_t X2[12],
- uint32_t Y2[12],
- uint32_t scalar2[12]);
-
-void CASPER_ECC_equal(int *res, uint32_t *op1, uint32_t *op2);
-void CASPER_ECC_equal_to_zero(int *res, uint32_t *op1);
-
-/*!
- *@}
- */ /* end of casper_driver_pkha */
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* _FSL_CASPER_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_clock.c b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_clock.c
deleted file mode 100755
index 63d8ceb55c..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_clock.c
+++ /dev/null
@@ -1,2031 +0,0 @@
-/*
- * Copyright 2017 - 2020 , NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_clock.h"
-#include "fsl_power.h"
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-/* Component ID definition, used by tools. */
-#ifndef FSL_COMPONENT_ID
-#define FSL_COMPONENT_ID "platform.drivers.clock"
-#endif
-#define NVALMAX (0x100U)
-#define PVALMAX (0x20U)
-#define MVALMAX (0x10000U)
-
-#define PLL_MAX_N_DIV 0x100U
-
-/*--------------------------------------------------------------------------
-!!! If required these #defines can be moved to chip library file
-----------------------------------------------------------------------------*/
-
-#define PLL_SSCG1_MDEC_VAL_P (10U) /* MDEC is in bits 25 downto 10 */
-#define PLL_SSCG1_MDEC_VAL_M (0xFFFFULL << PLL_SSCG1_MDEC_VAL_P)
-#define PLL_NDEC_VAL_P (0U) /* NDEC is in bits 9:0 */
-#define PLL_NDEC_VAL_M (0xFFUL << PLL_NDEC_VAL_P)
-#define PLL_PDEC_VAL_P (0U) /*!< PDEC is in bits 6:0 */
-#define PLL_PDEC_VAL_M (0x1FUL << PLL_PDEC_VAL_P)
-
-#define PLL_MIN_CCO_FREQ_MHZ (275000000U)
-#define PLL_MAX_CCO_FREQ_MHZ (550000000U)
-#define PLL_LOWER_IN_LIMIT (2000U) /*!< Minimum PLL input rate */
-#define PLL_HIGHER_IN_LIMIT (150000000U) /*!< Maximum PLL input rate */
-#define PLL_MIN_IN_SSMODE (3000000U)
-#define PLL_MAX_IN_SSMODE \
- (100000000U) /*!< Not find the value in UM, Just use the maximum frequency which device support */
-
-/* PLL NDEC reg */
-#define PLL_NDEC_VAL_SET(value) (((unsigned long)(value) << PLL_NDEC_VAL_P) & PLL_NDEC_VAL_M)
-/* PLL PDEC reg */
-#define PLL_PDEC_VAL_SET(value) (((unsigned long)(value) << PLL_PDEC_VAL_P) & PLL_PDEC_VAL_M)
-/* SSCG control1 */
-#define PLL_SSCG1_MDEC_VAL_SET(value) (((uint64_t)(value) << PLL_SSCG1_MDEC_VAL_P) & PLL_SSCG1_MDEC_VAL_M)
-
-/* PLL0 SSCG control1 */
-#define PLL0_SSCG_MD_FRACT_P 0U
-#define PLL0_SSCG_MD_INT_P 25U
-#define PLL0_SSCG_MD_FRACT_M (0x1FFFFFFUL << PLL0_SSCG_MD_FRACT_P)
-#define PLL0_SSCG_MD_INT_M ((uint64_t)0xFFUL << PLL0_SSCG_MD_INT_P)
-
-#define PLL0_SSCG_MD_FRACT_SET(value) (((uint64_t)(value) << PLL0_SSCG_MD_FRACT_P) & PLL0_SSCG_MD_FRACT_M)
-#define PLL0_SSCG_MD_INT_SET(value) (((uint64_t)(value) << PLL0_SSCG_MD_INT_P) & PLL0_SSCG_MD_INT_M)
-
-/* Saved value of PLL output rate, computed whenever needed to save run-time
- computation on each call to retrive the PLL rate. */
-static uint32_t s_Pll0_Freq;
-static uint32_t s_Pll1_Freq;
-
-/** External clock rate on the CLKIN pin in Hz. If not used,
- set this to 0. Otherwise, set it to the exact rate in Hz this pin is
- being driven at. */
-static uint32_t s_Ext_Clk_Freq = 16000000U;
-static uint32_t s_I2S_Mclk_Freq = 0U;
-static uint32_t s_PLU_ClkIn_Freq = 0U;
-
-/*******************************************************************************
- * Variables
- ******************************************************************************/
-
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-/* Find SELP, SELI, and SELR values for raw M value, max M = MVALMAX */
-static void pllFindSel(uint32_t M, uint32_t *pSelP, uint32_t *pSelI, uint32_t *pSelR);
-/* Get predivider (N) from PLL0 NDEC setting */
-static uint32_t findPll0PreDiv(void);
-/* Get predivider (N) from PLL1 NDEC setting */
-static uint32_t findPll1PreDiv(void);
-/* Get postdivider (P) from PLL0 PDEC setting */
-static uint32_t findPll0PostDiv(void);
-/* Get multiplier (M) from PLL0 MDEC and SSCG settings */
-static float findPll0MMult(void);
-/* Get the greatest common divisor */
-static uint32_t FindGreatestCommonDivisor(uint32_t m, uint32_t n);
-/* Set PLL output based on desired output rate */
-static pll_error_t CLOCK_GetPll0Config(uint32_t finHz, uint32_t foutHz, pll_setup_t *pSetup, bool useSS);
-/* Update local PLL rate variable */
-static void CLOCK_GetPLL0OutFromSetupUpdate(pll_setup_t *pSetup);
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-/* Clock Selection for IP */
-/**
- * brief Configure the clock selection muxes.
- * param connection : Clock to be configured.
- * return Nothing
- */
-void CLOCK_AttachClk(clock_attach_id_t connection)
-{
- uint8_t mux;
- uint8_t sel;
- uint16_t item;
- uint32_t tmp32 = (uint32_t)connection;
- uint32_t i;
- volatile uint32_t *pClkSel;
-
- pClkSel = &(SYSCON->SYSTICKCLKSELX[0]);
-
- if (kNONE_to_NONE != connection)
- {
- for (i = 0U; i < 2U; i++)
- {
- if (tmp32 == 0U)
- {
- break;
- }
- item = (uint16_t)GET_ID_ITEM(tmp32);
- if (item != 0U)
- {
- mux = GET_ID_ITEM_MUX(item);
- sel = GET_ID_ITEM_SEL(item);
- if (mux == CM_RTCOSC32KCLKSEL)
- {
- PMC->RTCOSC32K |= sel;
- }
- else
- {
- pClkSel[mux] = sel;
- }
- }
- tmp32 = GET_ID_NEXT_ITEM(tmp32); /* pick up next descriptor */
- }
- }
-}
-
-/* Return the actual clock attach id */
-/**
- * brief Get the actual clock attach id.
- * This fuction uses the offset in input attach id, then it reads the actual source value in
- * the register and combine the offset to obtain an actual attach id.
- * param attachId : Clock attach id to get.
- * return Clock source value.
- */
-clock_attach_id_t CLOCK_GetClockAttachId(clock_attach_id_t attachId)
-{
- uint8_t mux;
- uint8_t actualSel;
- uint32_t tmp32 = (uint32_t)attachId;
- uint32_t i;
- uint32_t actualAttachId = 0U;
- uint32_t selector = GET_ID_SELECTOR(tmp32);
- volatile uint32_t *pClkSel;
-
- pClkSel = &(SYSCON->SYSTICKCLKSELX[0]);
-
- if (kNONE_to_NONE == attachId)
- {
- return kNONE_to_NONE;
- }
-
- for (i = 0U; i < 2U; i++)
- {
- mux = GET_ID_ITEM_MUX(tmp32);
- if (tmp32 != 0UL)
- {
- if (mux == CM_RTCOSC32KCLKSEL)
- {
- actualSel = (uint8_t)(PMC->RTCOSC32K);
- }
- else
- {
- actualSel = (uint8_t)(pClkSel[mux]);
- }
-
- /* Consider the combination of two registers */
- actualAttachId |= CLK_ATTACH_ID(mux, actualSel, i);
- }
- tmp32 = GET_ID_NEXT_ITEM(tmp32); /*!< pick up next descriptor */
- }
-
- actualAttachId |= selector;
-
- return (clock_attach_id_t)actualAttachId;
-}
-
-/* Set IP Clock Divider */
-/**
- * brief Setup peripheral clock dividers.
- * param div_name : Clock divider name
- * param divided_by_value: Value to be divided
- * param reset : Whether to reset the divider counter.
- * return Nothing
- */
-void CLOCK_SetClkDiv(clock_div_name_t div_name, uint32_t divided_by_value, bool reset)
-{
- volatile uint32_t *pClkDiv;
-
- pClkDiv = &(SYSCON->SYSTICKCLKDIV0);
- if (reset)
- {
- pClkDiv[(uint8_t)div_name] = 1UL << 29U;
- }
- if (divided_by_value == 0U) /*!< halt */
- {
- pClkDiv[(uint8_t)div_name] = 1UL << 30U;
- }
- else
- {
- pClkDiv[(uint8_t)div_name] = (divided_by_value - 1U);
- }
-}
-
-/* Set RTC 1KHz Clock Divider */
-/**
- * brief Setup rtc 1khz clock divider.
- * param divided_by_value: Value to be divided
- * return Nothing
- */
-void CLOCK_SetRtc1khzClkDiv(uint32_t divided_by_value)
-{
- PMC->RTCOSC32K |= (((divided_by_value - 28U) << PMC_RTCOSC32K_CLK1KHZDIV_SHIFT) | PMC_RTCOSC32K_CLK1KHZDIV_MASK);
-}
-
-/* Set RTC 1KHz Clock Divider */
-/**
- * brief Setup rtc 1hz clock divider.
- * param divided_by_value: Value to be divided
- * return Nothing
- */
-void CLOCK_SetRtc1hzClkDiv(uint32_t divided_by_value)
-{
- if (divided_by_value == 0U) /*!< halt */
- {
- PMC->RTCOSC32K |= (1UL << PMC_RTCOSC32K_CLK1HZDIVHALT_SHIFT);
- }
- else
- {
- PMC->RTCOSC32K |=
- (((divided_by_value - 31744U) << PMC_RTCOSC32K_CLK1HZDIV_SHIFT) | PMC_RTCOSC32K_CLK1HZDIV_MASK);
- }
-}
-
-/* Set FRO Clocking */
-/**
- * brief Initialize the Core clock to given frequency (12, 48 or 96 MHz).
- * Turns on FRO and uses default CCO, if freq is 12000000, then high speed output is off, else high speed output is
- * enabled.
- * param iFreq : Desired frequency (must be one of #CLK_FRO_12MHZ or #CLK_FRO_48MHZ or #CLK_FRO_96MHZ)
- * return returns success or fail status.
- */
-status_t CLOCK_SetupFROClocking(uint32_t iFreq)
-{
- if ((iFreq != 12000000U) && (iFreq != 48000000U) && (iFreq != 96000000U))
- {
- return kStatus_Fail;
- }
- /* Enable Analog Control module */
- SYSCON->PRESETCTRLCLR[2] = (1UL << SYSCON_PRESETCTRL2_ANALOG_CTRL_RST_SHIFT);
- SYSCON->AHBCLKCTRLSET[2] = SYSCON_AHBCLKCTRL2_ANALOG_CTRL_MASK;
- /* Power up the FRO192M */
- POWER_DisablePD(kPDRUNCFG_PD_FRO192M);
-
- if (iFreq == 96000000U)
- {
- ANACTRL->FRO192M_CTRL |= ANACTRL_FRO192M_CTRL_ENA_96MHZCLK(1);
- }
- /* always enable
- else if (iFreq == 48000000U)
- {
- ANACTRL->FRO192M_CTRL |= ANACTRL_FRO192M_CTRL_ENA_48MHZCLK(1);
- }*/
- else
- {
- ANACTRL->FRO192M_CTRL |= ANACTRL_FRO192M_CTRL_ENA_12MHZCLK(1);
- }
- return kStatus_Success;
-}
-
-/* Set the FLASH wait states for the passed frequency */
-/**
- * brief Set the flash wait states for the input freuqency.
- * param iFreq: Input frequency
- * return Nothing
- */
-void CLOCK_SetFLASHAccessCyclesForFreq(uint32_t iFreq)
-{
- uint32_t num_wait_states; /* Flash Controller & FMC internal number of Wait States (minus 1) */
-
- if (iFreq <= 11000000UL)
- {
- /* [0 - 11 MHz] */
- num_wait_states = 0UL;
- }
- else if (iFreq <= 22000000UL)
- {
- /* [11 MHz - 22 MHz] */
- num_wait_states = 1UL;
- }
- else if (iFreq <= 33000000UL)
- {
- /* [22 MHz - 33 MHz] */
- num_wait_states = 2UL;
- }
- else if (iFreq <= 44000000UL)
- {
- /* [33 MHz - 44 MHz] */
- num_wait_states = 3UL;
- }
- else if (iFreq <= 55000000UL)
- {
- /* [44 MHz - 55 MHz] */
- num_wait_states = 4UL;
- }
- else if (iFreq <= 66000000UL)
- {
- /* [55 MHz - 662 MHz] */
- num_wait_states = 5UL;
- }
- else if (iFreq <= 77000000UL)
- {
- /* [66 MHz - 77 MHz] */
- num_wait_states = 6UL;
- }
- else if (iFreq <= 88000000UL)
- {
- /* [77 MHz - 88 MHz] */
- num_wait_states = 7UL;
- }
- else if (iFreq <= 100000000UL)
- {
- /* [88 MHz - 100 MHz] */
- num_wait_states = 8UL;
- }
- else if (iFreq <= 115000000UL)
- {
- /* [100 MHz - 115 MHz] */
- num_wait_states = 9UL;
- }
- else if (iFreq <= 130000000UL)
- {
- /* [115 MHz - 130 MHz] */
- num_wait_states = 10UL;
- }
- else if (iFreq <= 150000000UL)
- {
- /* [130 MHz - 150 MHz] */
- num_wait_states = 11UL;
- }
- else
- {
- /* Above 150 MHz */
- num_wait_states = 12UL;
- }
-
- FLASH->INT_CLR_STATUS = 0x1FUL; /* Clear all status flags */
-
- FLASH->DATAW[0] = (FLASH->DATAW[0] & 0xFFFFFFF0UL) |
- (num_wait_states & (SYSCON_FMCCR_FLASHTIM_MASK >> SYSCON_FMCCR_FLASHTIM_SHIFT));
-
- FLASH->CMD = 0x2; /* CMD_SET_READ_MODE */
-
- /* Wait until the cmd is completed (without error) */
- while (0UL == (FLASH->INT_STATUS & FLASH_INT_STATUS_DONE_MASK))
- {
- ;
- }
-
- /* Adjust FMC waiting time cycles (num_wait_states) */
- SYSCON->FMCCR = (SYSCON->FMCCR & ~SYSCON_FMCCR_FLASHTIM_MASK) |
- ((num_wait_states << SYSCON_FMCCR_FLASHTIM_SHIFT) & SYSCON_FMCCR_FLASHTIM_MASK);
-}
-
-/* Set EXT OSC Clk */
-/**
- * brief Initialize the external osc clock to given frequency.
- * param iFreq : Desired frequency (must be equal to exact rate in Hz)
- * return returns success or fail status.
- */
-status_t CLOCK_SetupExtClocking(uint32_t iFreq)
-{
- if (iFreq >= 32000000U)
- {
- return kStatus_Fail;
- }
- /* Turn on power for crystal 32 MHz */
- POWER_DisablePD(kPDRUNCFG_PD_XTAL32M);
- POWER_DisablePD(kPDRUNCFG_PD_LDOXO32M);
- /* Enable clock_in clock for clock module. */
- SYSCON->CLOCK_CTRL |= SYSCON_CLOCK_CTRL_CLKIN_ENA_MASK;
-
- s_Ext_Clk_Freq = iFreq;
- return kStatus_Success;
-}
-
-/* Set I2S MCLK Clk */
-/**
- * brief Initialize the I2S MCLK clock to given frequency.
- * param iFreq : Desired frequency (must be equal to exact rate in Hz)
- * return returns success or fail status.
- */
-status_t CLOCK_SetupI2SMClkClocking(uint32_t iFreq)
-{
- s_I2S_Mclk_Freq = iFreq;
- return kStatus_Success;
-}
-
-/* Set PLU CLKIN Clk */
-/**
- * brief Initialize the PLU CLKIN clock to given frequency.
- * param iFreq : Desired frequency (must be equal to exact rate in Hz)
- * return returns success or fail status.
- */
-status_t CLOCK_SetupPLUClkInClocking(uint32_t iFreq)
-{
- s_PLU_ClkIn_Freq = iFreq;
- return kStatus_Success;
-}
-
-/* Get CLOCK OUT Clk */
-/*! brief Return Frequency of ClockOut
- * return Frequency of ClockOut
- */
-uint32_t CLOCK_GetClockOutClkFreq(void)
-{
- uint32_t freq = 0U;
-
- switch (SYSCON->CLKOUTSEL)
- {
- case 0U:
- freq = CLOCK_GetCoreSysClkFreq();
- break;
-
- case 1U:
- freq = CLOCK_GetPll0OutFreq();
- break;
-
- case 2U:
- freq = CLOCK_GetExtClkFreq();
- break;
-
- case 3U:
- freq = CLOCK_GetFroHfFreq();
- break;
-
- case 4U:
- freq = CLOCK_GetFro1MFreq();
- break;
-
- case 5U:
- freq = CLOCK_GetPll1OutFreq();
- break;
-
- case 6U:
- freq = CLOCK_GetOsc32KFreq();
- break;
-
- case 7U:
- freq = 0U;
- break;
-
- default:
- assert(false);
- break;
- }
- return freq / ((SYSCON->CLKOUTDIV & 0xffU) + 1U);
-}
-
-/* Get ADC Clk */
-/*! brief Return Frequency of Adc Clock
- * return Frequency of Adc.
- */
-uint32_t CLOCK_GetAdcClkFreq(void)
-{
- uint32_t freq = 0U;
-
- switch (SYSCON->ADCCLKSEL)
- {
- case 0U:
- freq = CLOCK_GetCoreSysClkFreq();
- break;
- case 1U:
- freq = CLOCK_GetPll0OutFreq();
- break;
- case 2U:
- freq = CLOCK_GetFroHfFreq();
- break;
- case 7U:
- freq = 0U;
- break;
-
- default:
- assert(false);
- break;
- }
-
- return freq / ((SYSCON->ADCCLKDIV & SYSCON_ADCCLKDIV_DIV_MASK) + 1U);
-}
-
-/* Get USB0 Clk */
-/*! brief Return Frequency of Usb0 Clock
- * return Frequency of Usb0 Clock.
- */
-uint32_t CLOCK_GetUsb0ClkFreq(void)
-{
- uint32_t freq = 0U;
-
- switch (SYSCON->USB0CLKSEL)
- {
- case 0U:
- freq = CLOCK_GetCoreSysClkFreq();
- break;
- case 1U:
- freq = CLOCK_GetPll0OutFreq();
- break;
- case 3U:
- freq = CLOCK_GetFroHfFreq();
- break;
- case 5U:
- freq = CLOCK_GetPll1OutFreq();
- break;
- case 7U:
- freq = 0U;
- break;
-
- default:
- assert(false);
- break;
- }
-
- return freq / ((SYSCON->USB0CLKDIV & 0xffU) + 1U);
-}
-
-/* Get USB1 Clk */
-/*! brief Return Frequency of Usb1 Clock
- * return Frequency of Usb1 Clock.
- */
-uint32_t CLOCK_GetUsb1ClkFreq(void)
-{
- return ((ANACTRL->XO32M_CTRL & ANACTRL_XO32M_CTRL_ENABLE_PLL_USB_OUT_MASK) != 0UL) ? s_Ext_Clk_Freq : 0U;
-}
-
-/* Get MCLK Clk */
-/*! brief Return Frequency of MClk Clock
- * return Frequency of MClk Clock.
- */
-uint32_t CLOCK_GetMclkClkFreq(void)
-{
- uint32_t freq = 0U;
-
- switch (SYSCON->MCLKCLKSEL)
- {
- case 0U:
- freq = CLOCK_GetFroHfFreq();
- break;
- case 1U:
- freq = CLOCK_GetPll0OutFreq();
- break;
- case 7U:
- freq = 0U;
- break;
-
- default:
- assert(false);
- break;
- }
-
- return freq / ((SYSCON->MCLKDIV & 0xffU) + 1U);
-}
-
-/* Get SCTIMER Clk */
-/*! brief Return Frequency of SCTimer Clock
- * return Frequency of SCTimer Clock.
- */
-uint32_t CLOCK_GetSctClkFreq(void)
-{
- uint32_t freq = 0U;
-
- switch (SYSCON->SCTCLKSEL)
- {
- case 0U:
- freq = CLOCK_GetCoreSysClkFreq();
- break;
- case 1U:
- freq = CLOCK_GetPll0OutFreq();
- break;
- case 2U:
- freq = CLOCK_GetExtClkFreq();
- break;
- case 3U:
- freq = CLOCK_GetFroHfFreq();
- break;
- case 5U:
- freq = CLOCK_GetI2SMClkFreq();
- break;
- case 7U:
- freq = 0U;
- break;
-
- default:
- assert(false);
- break;
- }
-
- return freq / ((SYSCON->SCTCLKDIV & 0xffU) + 1U);
-}
-
-/* Get SDIO Clk */
-/*! brief Return Frequency of SDIO Clock
- * return Frequency of SDIO Clock.
- */
-uint32_t CLOCK_GetSdioClkFreq(void)
-{
- uint32_t freq = 0U;
-
- switch (SYSCON->SDIOCLKSEL)
- {
- case 0U:
- freq = CLOCK_GetCoreSysClkFreq();
- break;
- case 1U:
- freq = CLOCK_GetPll0OutFreq();
- break;
- case 3U:
- freq = CLOCK_GetFroHfFreq();
- break;
- case 5U:
- freq = CLOCK_GetPll1OutFreq();
- break;
- case 7U:
- freq = 0U;
- break;
- default:
- assert(false);
- break;
- }
-
- return freq / ((SYSCON->SDIOCLKDIV & 0xffU) + 1U);
-}
-
-/* Get FRO 12M Clk */
-/*! brief Return Frequency of FRO 12MHz
- * return Frequency of FRO 12MHz
- */
-uint32_t CLOCK_GetFro12MFreq(void)
-{
- return ((ANACTRL->FRO192M_CTRL & ANACTRL_FRO192M_CTRL_ENA_12MHZCLK_MASK) != 0UL) ? 12000000U : 0U;
-}
-
-/* Get FRO 1M Clk */
-/*! brief Return Frequency of FRO 1MHz
- * return Frequency of FRO 1MHz
- */
-uint32_t CLOCK_GetFro1MFreq(void)
-{
- return ((SYSCON->CLOCK_CTRL & SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_MASK) != 0UL) ? 1000000U : 0U;
-}
-
-/* Get EXT OSC Clk */
-/*! brief Return Frequency of External Clock
- * return Frequency of External Clock. If no external clock is used returns 0.
- */
-uint32_t CLOCK_GetExtClkFreq(void)
-{
- return ((ANACTRL->XO32M_CTRL & ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT_MASK) != 0UL) ? s_Ext_Clk_Freq : 0U;
-}
-
-/* Get WATCH DOG Clk */
-/*! brief Return Frequency of Watchdog
- * return Frequency of Watchdog
- */
-uint32_t CLOCK_GetWdtClkFreq(void)
-{
- return CLOCK_GetFro1MFreq() / ((SYSCON->WDTCLKDIV & SYSCON_WDTCLKDIV_DIV_MASK) + 1U);
-}
-
-/* Get HF FRO Clk */
-/*! brief Return Frequency of High-Freq output of FRO
- * return Frequency of High-Freq output of FRO
- */
-uint32_t CLOCK_GetFroHfFreq(void)
-{
- return ((ANACTRL->FRO192M_CTRL & ANACTRL_FRO192M_CTRL_ENA_96MHZCLK_MASK) != 0UL) ? 96000000U : 0U;
-}
-
-/* Get SYSTEM PLL Clk */
-/*! brief Return Frequency of PLL
- * return Frequency of PLL
- */
-uint32_t CLOCK_GetPll0OutFreq(void)
-{
- return s_Pll0_Freq;
-}
-
-/* Get USB PLL Clk */
-/*! brief Return Frequency of USB PLL
- * return Frequency of PLL
- */
-uint32_t CLOCK_GetPll1OutFreq(void)
-{
- return s_Pll1_Freq;
-}
-
-/* Get RTC OSC Clk */
-/*! brief Return Frequency of 32kHz osc
- * return Frequency of 32kHz osc
- */
-uint32_t CLOCK_GetOsc32KFreq(void)
-{
- return ((0UL == (PMC->PDRUNCFG0 & PMC_PDRUNCFG0_PDEN_FRO32K_MASK)) &&
- (0UL == (PMC->RTCOSC32K & PMC_RTCOSC32K_SEL_MASK))) ?
- CLK_RTC_32K_CLK :
- ((0UL == (PMC->PDRUNCFG0 & PMC_PDRUNCFG0_PDEN_XTAL32K_MASK)) &&
- (0UL != (PMC->RTCOSC32K & PMC_RTCOSC32K_SEL_MASK))) ?
- CLK_RTC_32K_CLK :
- 0U;
-}
-
-/* Get MAIN Clk */
-/*! brief Return Frequency of Core System
- * return Frequency of Core System
- */
-uint32_t CLOCK_GetCoreSysClkFreq(void)
-{
- uint32_t freq = 0U;
-
- switch (SYSCON->MAINCLKSELB)
- {
- case 0U:
- if (SYSCON->MAINCLKSELA == 0U)
- {
- freq = CLOCK_GetFro12MFreq();
- }
- else if (SYSCON->MAINCLKSELA == 1U)
- {
- freq = CLOCK_GetExtClkFreq();
- }
- else if (SYSCON->MAINCLKSELA == 2U)
- {
- freq = CLOCK_GetFro1MFreq();
- }
- else if (SYSCON->MAINCLKSELA == 3U)
- {
- freq = CLOCK_GetFroHfFreq();
- }
- else
- {
- /* Add comments to prevent the case of MISRA C-2012 rule 15.7. */
- }
- break;
- case 1U:
- freq = CLOCK_GetPll0OutFreq();
- break;
- case 2U:
- freq = CLOCK_GetPll1OutFreq();
- break;
-
- case 3U:
- freq = CLOCK_GetOsc32KFreq();
- break;
-
- default:
- freq = 0U;
- break;
- }
-
- return freq;
-}
-
-/* Get I2S MCLK Clk */
-/*! brief Return Frequency of I2S MCLK Clock
- * return Frequency of I2S MCLK Clock
- */
-uint32_t CLOCK_GetI2SMClkFreq(void)
-{
- return s_I2S_Mclk_Freq;
-}
-
-/* Get PLU CLKIN Clk */
-/*! brief Return Frequency of PLU CLKIN Clock
- * return Frequency of PLU CLKIN Clock
- */
-uint32_t CLOCK_GetPLUClkInFreq(void)
-{
- return s_PLU_ClkIn_Freq;
-}
-
-/* Get FLEXCOMM input clock */
-/*! brief Return Frequency of flexcomm input clock
- * param id : flexcomm instance id
- * return Frequency value
- */
-uint32_t CLOCK_GetFlexCommInputClock(uint32_t id)
-{
- uint32_t freq = 0U;
-
- switch (SYSCON->FCCLKSELX[id])
- {
- case 0U:
- freq = CLOCK_GetCoreSysClkFreq();
- break;
- case 1U:
- freq = CLOCK_GetPll0OutFreq() / ((SYSCON->PLL0CLKDIV & 0xffU) + 1U);
- break;
- case 2U:
- freq = CLOCK_GetFro12MFreq();
- break;
- case 3U:
- freq = CLOCK_GetFroHfFreq() / ((SYSCON->FROHFDIV & 0xffU) + 1U);
- break;
- case 4U:
- freq = CLOCK_GetFro1MFreq();
- break;
- case 5U:
- freq = CLOCK_GetI2SMClkFreq();
- break;
- case 6U:
- freq = CLOCK_GetOsc32KFreq();
- break;
- case 7U:
- freq = 0U;
- break;
-
- default:
- assert(false);
- break;
- }
-
- return freq;
-}
-
-/* Get FLEXCOMM Clk */
-uint32_t CLOCK_GetFlexCommClkFreq(uint32_t id)
-{
- uint32_t freq = 0U;
- uint32_t temp;
-
- freq = CLOCK_GetFlexCommInputClock(id);
- temp = SYSCON->FLEXFRGXCTRL[id] & SYSCON_FLEXFRG0CTRL_MULT_MASK;
- return freq / (1U + (temp) / ((SYSCON->FLEXFRGXCTRL[id] & SYSCON_FLEXFRG0CTRL_DIV_MASK) + 1U));
-}
-
-/* Get HS_LPSI Clk */
-uint32_t CLOCK_GetHsLspiClkFreq(void)
-{
- uint32_t freq = 0U;
-
- switch (SYSCON->HSLSPICLKSEL)
- {
- case 0U:
- freq = CLOCK_GetCoreSysClkFreq();
- break;
- case 1U:
- freq = CLOCK_GetPll0OutFreq() / ((SYSCON->PLL0CLKDIV & 0xffU) + 1U);
- break;
- case 2U:
- freq = CLOCK_GetFro12MFreq();
- break;
- case 3U:
- freq = CLOCK_GetFroHfFreq() / ((SYSCON->FROHFDIV & 0xffU) + 1U);
- break;
- case 4U:
- freq = CLOCK_GetFro1MFreq();
- break;
- case 6U:
- freq = CLOCK_GetOsc32KFreq();
- break;
- case 7U:
- freq = 0U;
- break;
-
- default:
- assert(false);
- break;
- }
-
- return freq;
-}
-
-/* Get CTimer Clk */
-/*! brief Return Frequency of CTimer functional Clock
- * return Frequency of CTimer functional Clock
- */
-uint32_t CLOCK_GetCTimerClkFreq(uint32_t id)
-{
- uint32_t freq = 0U;
-
- switch (SYSCON->CTIMERCLKSELX[id])
- {
- case 0U:
- freq = CLOCK_GetCoreSysClkFreq();
- break;
- case 1U:
- freq = CLOCK_GetPll0OutFreq();
- break;
- case 3U:
- freq = CLOCK_GetFroHfFreq();
- break;
- case 4U:
- freq = CLOCK_GetFro1MFreq();
- break;
- case 5U:
- freq = CLOCK_GetI2SMClkFreq();
- break;
- case 6U:
- freq = CLOCK_GetOsc32KFreq();
- break;
- case 7U:
- freq = 0U;
- break;
-
- default:
- assert(false);
- break;
- }
-
- return freq;
-}
-
-/* Get Systick Clk */
-/*! brief Return Frequency of SystickClock
- * return Frequency of Systick Clock
- */
-uint32_t CLOCK_GetSystickClkFreq(uint32_t id)
-{
- volatile uint32_t *pSystickClkDiv;
- pSystickClkDiv = &(SYSCON->SYSTICKCLKDIV0);
- uint32_t freq = 0U;
-
- switch (SYSCON->SYSTICKCLKSELX[id])
- {
- case 0U:
- freq = CLOCK_GetCoreSysClkFreq() / ((pSystickClkDiv[id] & 0xffU) + 1U);
- break;
- case 1U:
- freq = CLOCK_GetFro1MFreq();
- break;
- case 2U:
- freq = CLOCK_GetOsc32KFreq();
- break;
- case 7U:
- freq = 0U;
- break;
-
- default:
- freq = 0U;
- break;
- }
-
- return freq;
-}
-
-/* Set FlexComm Clock */
-/**
- * brief Set the flexcomm output frequency.
- * param id : flexcomm instance id
- * freq : output frequency
- * return 0 : the frequency range is out of range.
- * 1 : switch successfully.
- */
-uint32_t CLOCK_SetFlexCommClock(uint32_t id, uint32_t freq)
-{
- uint32_t input = CLOCK_GetFlexCommClkFreq(id);
- uint32_t mul;
-
- if ((freq > 48000000UL) || (freq > input) || (input / freq >= 2UL))
- {
- /* FRG output frequency should be less than equal to 48MHz */
- return 0UL;
- }
- else
- {
- mul = (uint32_t)((((uint64_t)input - freq) * 256ULL) / ((uint64_t)freq));
- SYSCON->FLEXFRGXCTRL[id] = (mul << 8U) | 0xFFU;
- return 1UL;
- }
-}
-
-/* Get IP Clk */
-/*! brief Return Frequency of selected clock
- * return Frequency of selected clock
- */
-uint32_t CLOCK_GetFreq(clock_name_t clockName)
-{
- uint32_t freq;
- switch (clockName)
- {
- case kCLOCK_CoreSysClk:
- freq = CLOCK_GetCoreSysClkFreq();
- break;
- case kCLOCK_BusClk:
- freq = CLOCK_GetCoreSysClkFreq() / ((SYSCON->AHBCLKDIV & 0xffU) + 1U);
- break;
- case kCLOCK_ClockOut:
- freq = CLOCK_GetClockOutClkFreq();
- break;
- case kCLOCK_Pll1Out:
- freq = CLOCK_GetPll1OutFreq();
- break;
- case kCLOCK_Mclk:
- freq = CLOCK_GetMclkClkFreq();
- break;
- case kCLOCK_FroHf:
- freq = CLOCK_GetFroHfFreq();
- break;
- case kCLOCK_Fro12M:
- freq = CLOCK_GetFro12MFreq();
- break;
- case kCLOCK_ExtClk:
- freq = CLOCK_GetExtClkFreq();
- break;
- case kCLOCK_Pll0Out:
- freq = CLOCK_GetPll0OutFreq();
- break;
- case kCLOCK_FlexI2S:
- freq = CLOCK_GetI2SMClkFreq();
- break;
- default:
- freq = 0U;
- break;
- }
- return freq;
-}
-
-/* Find SELP, SELI, and SELR values for raw M value, max M = MVALMAX */
-static void pllFindSel(uint32_t M, uint32_t *pSelP, uint32_t *pSelI, uint32_t *pSelR)
-{
- uint32_t seli, selp;
- /* bandwidth: compute selP from Multiplier */
- if ((SYSCON->PLL0SSCG1 & SYSCON_PLL0SSCG1_MDIV_EXT_MASK) != 0UL) /* normal mode */
- {
- selp = (M >> 2U) + 1U;
- if (selp >= 31U)
- {
- selp = 31U;
- }
- *pSelP = selp;
-
- if (M >= 8000UL)
- {
- seli = 1UL;
- }
- else if (M >= 122UL)
- {
- seli = (uint32_t)(8000UL / M); /*floor(8000/M) */
- }
- else
- {
- seli = 2UL * ((uint32_t)(M / 4UL)) + 3UL; /* 2*floor(M/4) + 3 */
- }
-
- if (seli >= 63UL)
- {
- seli = 63UL;
- }
- *pSelI = seli;
-
- *pSelR = 0U;
- }
- else
- {
- /* Note: If the spread spectrum mode, choose N to ensure 3 MHz < Fin/N < 5 MHz */
- *pSelP = 3U;
- *pSelI = 4U;
- *pSelR = 4U;
- }
-}
-
-/* Get predivider (N) from PLL0 NDEC setting */
-static uint32_t findPll0PreDiv(void)
-{
- uint32_t preDiv = 1UL;
-
- /* Direct input is not used? */
- if ((SYSCON->PLL0CTRL & SYSCON_PLL0CTRL_BYPASSPREDIV_MASK) == 0UL)
- {
- preDiv = SYSCON->PLL0NDEC & SYSCON_PLL0NDEC_NDIV_MASK;
- if (preDiv == 0UL)
- {
- preDiv = 1UL;
- }
- }
- return preDiv;
-}
-
-/* Get predivider (N) from PLL1 NDEC setting */
-static uint32_t findPll1PreDiv(void)
-{
- uint32_t preDiv = 1UL;
-
- /* Direct input is not used? */
- if ((SYSCON->PLL1CTRL & SYSCON_PLL1CTRL_BYPASSPREDIV_MASK) == 0UL)
- {
- preDiv = SYSCON->PLL1NDEC & SYSCON_PLL1NDEC_NDIV_MASK;
- if (preDiv == 0UL)
- {
- preDiv = 1UL;
- }
- }
- return preDiv;
-}
-
-/* Get postdivider (P) from PLL0 PDEC setting */
-static uint32_t findPll0PostDiv(void)
-{
- uint32_t postDiv = 1UL;
-
- if ((SYSCON->PLL0CTRL & SYSCON_PLL0CTRL_BYPASSPOSTDIV_MASK) == 0UL)
- {
- if ((SYSCON->PLL0CTRL & SYSCON_PLL0CTRL_BYPASSPOSTDIV2_MASK) != 0UL)
- {
- postDiv = SYSCON->PLL0PDEC & SYSCON_PLL0PDEC_PDIV_MASK;
- }
- else
- {
- postDiv = 2UL * (SYSCON->PLL0PDEC & SYSCON_PLL0PDEC_PDIV_MASK);
- }
- if (postDiv == 0UL)
- {
- postDiv = 2UL;
- }
- }
- return postDiv;
-}
-
-/* Get multiplier (M) from PLL0 SSCG and SEL_EXT settings */
-static float findPll0MMult(void)
-{
- float mMult = 1.0F;
- float mMult_fract;
- uint32_t mMult_int;
-
- if ((SYSCON->PLL0SSCG1 & SYSCON_PLL0SSCG1_SEL_EXT_MASK) != 0UL)
- {
- mMult =
- (float)(uint32_t)((SYSCON->PLL0SSCG1 & SYSCON_PLL0SSCG1_MDIV_EXT_MASK) >> SYSCON_PLL0SSCG1_MDIV_EXT_SHIFT);
- }
- else
- {
- mMult_int = ((SYSCON->PLL0SSCG1 & SYSCON_PLL0SSCG1_MD_MBS_MASK) << 7U);
- mMult_int = mMult_int | ((SYSCON->PLL0SSCG0) >> PLL0_SSCG_MD_INT_P);
- mMult_fract = ((float)(uint32_t)((SYSCON->PLL0SSCG0) & PLL0_SSCG_MD_FRACT_M) /
- (float)(uint32_t)(1UL << PLL0_SSCG_MD_INT_P));
- mMult = (float)mMult_int + mMult_fract;
- }
- if (mMult == 0.0F)
- {
- mMult = 1.0F;
- }
- return mMult;
-}
-
-/* Find greatest common divisor between m and n */
-static uint32_t FindGreatestCommonDivisor(uint32_t m, uint32_t n)
-{
- uint32_t tmp;
-
- while (n != 0U)
- {
- tmp = n;
- n = m % n;
- m = tmp;
- }
-
- return m;
-}
-
-/*
- * Set PLL0 output based on desired output rate.
- * In this function, the it calculates the PLL0 setting for output frequency from input clock
- * frequency. The calculation would cost a few time. So it is not recommaned to use it frequently.
- * the "pllctrl", "pllndec", "pllpdec", "pllmdec" would updated in this function.
- */
-static pll_error_t CLOCK_GetPll0ConfigInternal(uint32_t finHz, uint32_t foutHz, pll_setup_t *pSetup, bool useSS)
-{
- uint32_t nDivOutHz, fccoHz;
- uint32_t pllPreDivider, pllMultiplier, pllPostDivider;
- uint32_t pllDirectInput, pllDirectOutput;
- uint32_t pllSelP, pllSelI, pllSelR, uplimoff;
-
- /* Baseline parameters (no input or output dividers) */
- pllPreDivider = 1U; /* 1 implies pre-divider will be disabled */
- pllPostDivider = 1U; /* 1 implies post-divider will be disabled */
- pllDirectOutput = 1U;
-
- /* Verify output rate parameter */
- if (foutHz > PLL_MAX_CCO_FREQ_MHZ)
- {
- /* Maximum PLL output with post divider=1 cannot go above this frequency */
- return kStatus_PLL_OutputTooHigh;
- }
- if (foutHz < (PLL_MIN_CCO_FREQ_MHZ / (PVALMAX << 1U)))
- {
- /* Minmum PLL output with maximum post divider cannot go below this frequency */
- return kStatus_PLL_OutputTooLow;
- }
-
- /* If using SS mode, input clock needs to be between 3MHz and 20MHz */
- if (useSS)
- {
- /* Verify input rate parameter */
- if (finHz < PLL_MIN_IN_SSMODE)
- {
- /* Input clock into the PLL cannot be lower than this */
- return kStatus_PLL_InputTooLow;
- }
- /* PLL input in SS mode must be under 20MHz */
- if (finHz > (PLL_MAX_IN_SSMODE * NVALMAX))
- {
- return kStatus_PLL_InputTooHigh;
- }
- }
- else
- {
- /* Verify input rate parameter */
- if (finHz < PLL_LOWER_IN_LIMIT)
- {
- /* Input clock into the PLL cannot be lower than this */
- return kStatus_PLL_InputTooLow;
- }
- if (finHz > PLL_HIGHER_IN_LIMIT)
- {
- /* Input clock into the PLL cannot be higher than this */
- return kStatus_PLL_InputTooHigh;
- }
- }
-
- /* Find the optimal CCO frequency for the output and input that
- will keep it inside the PLL CCO range. This may require
- tweaking the post-divider for the PLL. */
- fccoHz = foutHz;
- while (fccoHz < PLL_MIN_CCO_FREQ_MHZ)
- {
- /* CCO output is less than minimum CCO range, so the CCO output
- needs to be bumped up and the post-divider is used to bring
- the PLL output back down. */
- pllPostDivider++;
- if (pllPostDivider > PVALMAX)
- {
- return kStatus_PLL_OutsideIntLimit;
- }
-
- /* Target CCO goes up, PLL output goes down */
- /* divide-by-2 divider in the post-divider is always work*/
- fccoHz = foutHz * (pllPostDivider * 2U);
- pllDirectOutput = 0U;
- }
-
- /* Determine if a pre-divider is needed to get the best frequency */
- if ((finHz > PLL_LOWER_IN_LIMIT) && (fccoHz >= finHz) && (useSS == false))
- {
- uint32_t a = FindGreatestCommonDivisor(fccoHz, finHz);
-
- if (a > PLL_LOWER_IN_LIMIT)
- {
- a = finHz / a;
- if ((a != 0U) && (a < PLL_MAX_N_DIV))
- {
- pllPreDivider = a;
- }
- }
- }
-
- /* Bypass pre-divider hardware if pre-divider is 1 */
- if (pllPreDivider > 1U)
- {
- pllDirectInput = 0U;
- }
- else
- {
- pllDirectInput = 1U;
- }
-
- /* Determine PLL multipler */
- nDivOutHz = (finHz / pllPreDivider);
- pllMultiplier = (fccoHz / nDivOutHz);
-
- /* Find optimal values for filter */
- if (useSS == false)
- {
- /* Will bumping up M by 1 get us closer to the desired CCO frequency? */
- if ((nDivOutHz * ((pllMultiplier * 2U) + 1U)) < (fccoHz * 2U))
- {
- pllMultiplier++;
- }
-
- /* Setup filtering */
- pllFindSel(pllMultiplier, &pllSelP, &pllSelI, &pllSelR);
- uplimoff = 0U;
-
- /* Get encoded value for M (mult) and use manual filter, disable SS mode */
- pSetup->pllsscg[1] =
- (uint32_t)((PLL_SSCG1_MDEC_VAL_SET(pllMultiplier)) | (1UL << SYSCON_PLL0SSCG1_SEL_EXT_SHIFT));
- }
- else
- {
- uint64_t fc;
-
- /* Filtering will be handled by SSC */
- pllSelR = 0U;
- pllSelI = 0U;
- pllSelP = 0U;
- uplimoff = 1U;
-
- /* The PLL multiplier will get very close and slightly under the
- desired target frequency. A small fractional component can be
- added to fine tune the frequency upwards to the target. */
- fc = (((uint64_t)fccoHz % (uint64_t)nDivOutHz) << 25U) / nDivOutHz;
-
- /* Set multiplier */
- pSetup->pllsscg[0] = (uint32_t)(PLL0_SSCG_MD_INT_SET(pllMultiplier) | PLL0_SSCG_MD_FRACT_SET((uint32_t)fc));
- pSetup->pllsscg[1] = (uint32_t)(PLL0_SSCG_MD_INT_SET(pllMultiplier) >> 32U);
- }
-
- /* Get encoded values for N (prediv) and P (postdiv) */
- pSetup->pllndec = PLL_NDEC_VAL_SET(pllPreDivider);
- pSetup->pllpdec = PLL_PDEC_VAL_SET(pllPostDivider);
-
- /* PLL control */
- pSetup->pllctrl = (pllSelR << SYSCON_PLL0CTRL_SELR_SHIFT) | /* Filter coefficient */
- (pllSelI << SYSCON_PLL0CTRL_SELI_SHIFT) | /* Filter coefficient */
- (pllSelP << SYSCON_PLL0CTRL_SELP_SHIFT) | /* Filter coefficient */
- (0UL << SYSCON_PLL0CTRL_BYPASSPLL_SHIFT) | /* PLL bypass mode disabled */
- (uplimoff << SYSCON_PLL0CTRL_LIMUPOFF_SHIFT) | /* SS/fractional mode disabled */
- (pllDirectInput << SYSCON_PLL0CTRL_BYPASSPREDIV_SHIFT) | /* Bypass pre-divider? */
- (pllDirectOutput << SYSCON_PLL0CTRL_BYPASSPOSTDIV_SHIFT) | /* Bypass post-divider? */
- (1UL << SYSCON_PLL0CTRL_CLKEN_SHIFT); /* Ensure the PLL clock output */
-
- return kStatus_PLL_Success;
-}
-
-#if (defined(CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT) && CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT)
-/* Alloct the static buffer for cache. */
-static pll_setup_t s_PllSetupCacheStruct[CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT];
-static uint32_t s_FinHzCache[CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT] = {0};
-static uint32_t s_FoutHzCache[CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT] = {0};
-static bool s_UseSSCache[CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT] = {false};
-static uint32_t s_PllSetupCacheIdx = 0U;
-#endif /* CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT */
-
-/*
- * Calculate the PLL setting values from input clock freq to output freq.
- */
-static pll_error_t CLOCK_GetPll0Config(uint32_t finHz, uint32_t foutHz, pll_setup_t *pSetup, bool useSS)
-{
- pll_error_t retErr;
-#if (defined(CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT) && CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT)
- uint32_t i;
-
- for (i = 0U; i < CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT; i++)
- {
- if ((finHz == s_FinHzCache[i]) && (foutHz == s_FoutHzCache[i]) && (useSS == s_UseSSCache[i]))
- {
- /* Hit the target in cache buffer. */
- pSetup->pllctrl = s_PllSetupCacheStruct[i].pllctrl;
- pSetup->pllndec = s_PllSetupCacheStruct[i].pllndec;
- pSetup->pllpdec = s_PllSetupCacheStruct[i].pllpdec;
- pSetup->pllsscg[0] = s_PllSetupCacheStruct[i].pllsscg[0];
- pSetup->pllsscg[1] = s_PllSetupCacheStruct[i].pllsscg[1];
- retErr = kStatus_PLL_Success;
- break;
- }
- }
-
- if (i < CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT)
- {
- return retErr;
- }
-#endif /* CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT */
-
- retErr = CLOCK_GetPll0ConfigInternal(finHz, foutHz, pSetup, useSS);
-
-#if (defined(CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT) && CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT)
- /* Cache the most recent calulation result into buffer. */
- s_FinHzCache[s_PllSetupCacheIdx] = finHz;
- s_FoutHzCache[s_PllSetupCacheIdx] = foutHz;
- s_UseSSCache[s_PllSetupCacheIdx] = useSS;
-
- s_PllSetupCacheStruct[s_PllSetupCacheIdx].pllctrl = pSetup->pllctrl;
- s_PllSetupCacheStruct[s_PllSetupCacheIdx].pllndec = pSetup->pllndec;
- s_PllSetupCacheStruct[s_PllSetupCacheIdx].pllpdec = pSetup->pllpdec;
- s_PllSetupCacheStruct[s_PllSetupCacheIdx].pllsscg[0] = pSetup->pllsscg[0];
- s_PllSetupCacheStruct[s_PllSetupCacheIdx].pllsscg[1] = pSetup->pllsscg[1];
- /* Update the index for next available buffer. */
- s_PllSetupCacheIdx = (s_PllSetupCacheIdx + 1U) % CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT;
-#endif /* CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT */
-
- return retErr;
-}
-
-/* Update local PLL rate variable */
-static void CLOCK_GetPLL0OutFromSetupUpdate(pll_setup_t *pSetup)
-{
- s_Pll0_Freq = CLOCK_GetPLL0OutFromSetup(pSetup);
-}
-
-/* Return System PLL input clock rate */
-/*! brief Return PLL0 input clock rate
- * return PLL0 input clock rate
- */
-uint32_t CLOCK_GetPLL0InClockRate(void)
-{
- uint32_t clkRate = 0U;
-
- switch ((SYSCON->PLL0CLKSEL & SYSCON_PLL0CLKSEL_SEL_MASK))
- {
- case 0x00U:
- clkRate = CLK_FRO_12MHZ;
- break;
-
- case 0x01U:
- clkRate = CLOCK_GetExtClkFreq();
- break;
-
- case 0x02U:
- clkRate = CLOCK_GetFro1MFreq();
- break;
-
- case 0x03U:
- clkRate = CLOCK_GetOsc32KFreq();
- break;
-
- default:
- clkRate = 0U;
- break;
- }
-
- return clkRate;
-}
-
-/* Return PLL1 input clock rate */
-uint32_t CLOCK_GetPLL1InClockRate(void)
-{
- uint32_t clkRate = 0U;
-
- switch ((SYSCON->PLL1CLKSEL & SYSCON_PLL1CLKSEL_SEL_MASK))
- {
- case 0x00U:
- clkRate = CLK_FRO_12MHZ;
- break;
-
- case 0x01U:
- clkRate = CLOCK_GetExtClkFreq();
- break;
-
- case 0x02U:
- clkRate = CLOCK_GetFro1MFreq();
- break;
-
- case 0x03U:
- clkRate = CLOCK_GetOsc32KFreq();
- break;
-
- default:
- clkRate = 0U;
- break;
- }
-
- return clkRate;
-}
-
-/* Return PLL0 output clock rate from setup structure */
-/*! brief Return PLL0 output clock rate from setup structure
- * param pSetup : Pointer to a PLL setup structure
- * return PLL0 output clock rate the setup structure will generate
- */
-uint32_t CLOCK_GetPLL0OutFromSetup(pll_setup_t *pSetup)
-{
- uint32_t clkRate = 0;
- uint32_t prediv, postdiv;
- float workRate = 0.0F;
-
- /* Get the input clock frequency of PLL. */
- clkRate = CLOCK_GetPLL0InClockRate();
-
- if (((pSetup->pllctrl & SYSCON_PLL0CTRL_BYPASSPLL_MASK) == 0UL) &&
- ((pSetup->pllctrl & SYSCON_PLL0CTRL_CLKEN_MASK) != 0UL) &&
- ((PMC->PDRUNCFG0 & PMC_PDRUNCFG0_PDEN_PLL0_MASK) == 0UL) &&
- ((PMC->PDRUNCFG0 & PMC_PDRUNCFG0_PDEN_PLL0_SSCG_MASK) == 0UL))
- {
- prediv = findPll0PreDiv();
- postdiv = findPll0PostDiv();
- /* Adjust input clock */
- clkRate = clkRate / prediv;
- /* MDEC used for rate */
- workRate = (float)clkRate * (float)findPll0MMult();
- workRate /= (float)postdiv;
- }
-
- return (uint32_t)workRate;
-}
-
-/* Set the current PLL0 Rate */
-/*! brief Store the current PLL rate
- * param rate: Current rate of the PLL
- * return Nothing
- **/
-void CLOCK_SetStoredPLL0ClockRate(uint32_t rate)
-{
- s_Pll0_Freq = rate;
-}
-
-/* Return PLL0 output clock rate */
-/*! brief Return PLL0 output clock rate
- * param recompute : Forces a PLL rate recomputation if true
- * return PLL0 output clock rate
- * note The PLL rate is cached in the driver in a variable as
- * the rate computation function can take some time to perform. It
- * is recommended to use 'false' with the 'recompute' parameter.
- */
-uint32_t CLOCK_GetPLL0OutClockRate(bool recompute)
-{
- pll_setup_t Setup;
- uint32_t rate;
-
- if ((recompute) || (s_Pll0_Freq == 0U))
- {
- Setup.pllctrl = SYSCON->PLL0CTRL;
- Setup.pllndec = SYSCON->PLL0NDEC;
- Setup.pllpdec = SYSCON->PLL0PDEC;
- Setup.pllsscg[0] = SYSCON->PLL0SSCG0;
- Setup.pllsscg[1] = SYSCON->PLL0SSCG1;
-
- CLOCK_GetPLL0OutFromSetupUpdate(&Setup);
- }
-
- rate = s_Pll0_Freq;
-
- return rate;
-}
-
-/* Set PLL0 output based on the passed PLL setup data */
-/*! brief Set PLL output based on the passed PLL setup data
- * param pControl : Pointer to populated PLL control structure to generate setup with
- * param pSetup : Pointer to PLL setup structure to be filled
- * return PLL_ERROR_SUCCESS on success, or PLL setup error code
- * note Actual frequency for setup may vary from the desired frequency based on the
- * accuracy of input clocks, rounding, non-fractional PLL mode, etc.
- */
-pll_error_t CLOCK_SetupPLL0Data(pll_config_t *pControl, pll_setup_t *pSetup)
-{
- uint32_t inRate;
- bool useSS = ((pControl->flags & PLL_CONFIGFLAG_FORCENOFRACT) == 0U);
-
- pll_error_t pllError;
-
- /* Determine input rate for the PLL */
- if ((pControl->flags & PLL_CONFIGFLAG_USEINRATE) != 0U)
- {
- inRate = pControl->inputRate;
- }
- else
- {
- inRate = CLOCK_GetPLL0InClockRate();
- }
-
- /* PLL flag options */
- pllError = CLOCK_GetPll0Config(inRate, pControl->desiredRate, pSetup, useSS);
- if ((useSS) && (pllError == kStatus_PLL_Success))
- {
- /* If using SS mode, then some tweaks are made to the generated setup */
- pSetup->pllsscg[1] |= (uint32_t)pControl->ss_mf | (uint32_t)pControl->ss_mr | (uint32_t)pControl->ss_mc;
- if (pControl->mfDither)
- {
- pSetup->pllsscg[1] |= (1UL << SYSCON_PLL0SSCG1_DITHER_SHIFT);
- }
- }
-
- return pllError;
-}
-
-/* Set PLL0 output from PLL setup structure */
-/*! brief Set PLL output from PLL setup structure (precise frequency)
- * param pSetup : Pointer to populated PLL setup structure
- * param flagcfg : Flag configuration for PLL config structure
- * return PLL_ERROR_SUCCESS on success, or PLL setup error code
- * note This function will power off the PLL, setup the PLL with the
- * new setup data, and then optionally powerup the PLL, wait for PLL lock,
- * and adjust system voltages to the new PLL rate. The function will not
- * alter any source clocks (ie, main systen clock) that may use the PLL,
- * so these should be setup prior to and after exiting the function.
- */
-pll_error_t CLOCK_SetupPLL0Prec(pll_setup_t *pSetup, uint32_t flagcfg)
-{
- uint32_t inRate, clkRate, prediv;
-
- /* Power off PLL during setup changes */
- POWER_EnablePD(kPDRUNCFG_PD_PLL0);
- POWER_EnablePD(kPDRUNCFG_PD_PLL0_SSCG);
-
- pSetup->flags = flagcfg;
-
- /* Write PLL setup data */
- SYSCON->PLL0CTRL = pSetup->pllctrl;
- SYSCON->PLL0NDEC = pSetup->pllndec;
- SYSCON->PLL0NDEC = pSetup->pllndec | (1UL << SYSCON_PLL0NDEC_NREQ_SHIFT); /* latch */
- SYSCON->PLL0PDEC = pSetup->pllpdec;
- SYSCON->PLL0PDEC = pSetup->pllpdec | (1UL << SYSCON_PLL0PDEC_PREQ_SHIFT); /* latch */
- SYSCON->PLL0SSCG0 = pSetup->pllsscg[0];
- SYSCON->PLL0SSCG1 = pSetup->pllsscg[1];
- SYSCON->PLL0SSCG1 =
- pSetup->pllsscg[1] | (1UL << SYSCON_PLL0SSCG1_MREQ_SHIFT) | (1UL << SYSCON_PLL0SSCG1_MD_REQ_SHIFT); /* latch */
-
- POWER_DisablePD(kPDRUNCFG_PD_PLL0);
- POWER_DisablePD(kPDRUNCFG_PD_PLL0_SSCG);
-
- if ((pSetup->flags & PLL_SETUPFLAG_WAITLOCK) != 0U)
- {
- if ((SYSCON->PLL0SSCG1 & SYSCON_PLL0SSCG1_MDIV_EXT_MASK) != 0UL) /* normal mode */
- {
- inRate = CLOCK_GetPLL0InClockRate();
- prediv = findPll0PreDiv();
- /* Adjust input clock */
- clkRate = inRate / prediv;
- /* The lock signal is only reliable between fref[2] :100 kHz to 20 MHz. */
- if ((clkRate >= 100000UL) && (clkRate <= 20000000UL))
- {
- while (CLOCK_IsPLL0Locked() == false)
- {
- }
- }
- else
- {
- SDK_DelayAtLeastUs(6000U,
- SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY); /* software should use a 6 ms time interval
- to insure the PLL will be stable */
- }
- }
- else /* spread spectrum mode */
- {
- SDK_DelayAtLeastUs(6000U,
- SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY); /* software should use a 6 ms time interval to
- insure the PLL will be stable */
- }
- }
-
- /* Update current programmed PLL rate var */
- CLOCK_GetPLL0OutFromSetupUpdate(pSetup);
-
- /* System voltage adjustment, occurs prior to setting main system clock */
- if ((pSetup->flags & PLL_SETUPFLAG_ADGVOLT) != 0U)
- {
- POWER_SetVoltageForFreq(s_Pll0_Freq);
- }
-
- return kStatus_PLL_Success;
-}
-
-/* Setup PLL Frequency from pre-calculated value */
-/**
- * brief Set PLL0 output from PLL setup structure (precise frequency)
- * param pSetup : Pointer to populated PLL setup structure
- * return kStatus_PLL_Success on success, or PLL setup error code
- * note This function will power off the PLL, setup the PLL with the
- * new setup data, and then optionally powerup the PLL, wait for PLL lock,
- * and adjust system voltages to the new PLL rate. The function will not
- * alter any source clocks (ie, main systen clock) that may use the PLL,
- * so these should be setup prior to and after exiting the function.
- */
-pll_error_t CLOCK_SetPLL0Freq(const pll_setup_t *pSetup)
-{
- uint32_t inRate, clkRate, prediv;
- /* Power off PLL during setup changes */
- POWER_EnablePD(kPDRUNCFG_PD_PLL0);
- POWER_EnablePD(kPDRUNCFG_PD_PLL0_SSCG);
-
- /* Write PLL setup data */
- SYSCON->PLL0CTRL = pSetup->pllctrl;
- SYSCON->PLL0NDEC = pSetup->pllndec;
- SYSCON->PLL0NDEC = pSetup->pllndec | (1UL << SYSCON_PLL0NDEC_NREQ_SHIFT); /* latch */
- SYSCON->PLL0PDEC = pSetup->pllpdec;
- SYSCON->PLL0PDEC = pSetup->pllpdec | (1UL << SYSCON_PLL0PDEC_PREQ_SHIFT); /* latch */
- SYSCON->PLL0SSCG0 = pSetup->pllsscg[0];
- SYSCON->PLL0SSCG1 = pSetup->pllsscg[1];
- SYSCON->PLL0SSCG1 =
- pSetup->pllsscg[1] | (1UL << SYSCON_PLL0SSCG1_MD_REQ_SHIFT) | (1UL << SYSCON_PLL0SSCG1_MREQ_SHIFT); /* latch */
-
- POWER_DisablePD(kPDRUNCFG_PD_PLL0);
- POWER_DisablePD(kPDRUNCFG_PD_PLL0_SSCG);
-
- if ((pSetup->flags & PLL_SETUPFLAG_WAITLOCK) != 0U)
- {
- if ((SYSCON->PLL0SSCG1 & SYSCON_PLL0SSCG1_MDIV_EXT_MASK) != 0UL) /* normal mode */
- {
- inRate = CLOCK_GetPLL0InClockRate();
- prediv = findPll0PreDiv();
- /* Adjust input clock */
- clkRate = inRate / prediv;
- /* The lock signal is only reliable between fref[2] :100 kHz to 20 MHz. */
- if ((clkRate >= 100000UL) && (clkRate <= 20000000UL))
- {
- while (CLOCK_IsPLL0Locked() == false)
- {
- }
- }
- else
- {
- SDK_DelayAtLeastUs(6000U,
- SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY); /* software should use a 6 ms time interval
- to insure the PLL will be stable */
- }
- }
- else /* spread spectrum mode */
- {
- SDK_DelayAtLeastUs(6000U,
- SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY); /* software should use a 6 ms time interval to
- insure the PLL will be stable */
- }
- }
-
- /* Update current programmed PLL rate var */
- s_Pll0_Freq = pSetup->pllRate;
-
- return kStatus_PLL_Success;
-}
-
-/* Setup PLL1 Frequency from pre-calculated value */
-/**
- * brief Set PLL1 output from PLL setup structure (precise frequency)
- * param pSetup : Pointer to populated PLL setup structure
- * return kStatus_PLL_Success on success, or PLL setup error code
- * note This function will power off the PLL, setup the PLL with the
- * new setup data, and then optionally powerup the PLL, wait for PLL lock,
- * and adjust system voltages to the new PLL rate. The function will not
- * alter any source clocks (ie, main systen clock) that may use the PLL,
- * so these should be setup prior to and after exiting the function.
- */
-pll_error_t CLOCK_SetPLL1Freq(const pll_setup_t *pSetup)
-{
- uint32_t inRate, clkRate, prediv;
- /* Power off PLL during setup changes */
- POWER_EnablePD(kPDRUNCFG_PD_PLL1);
-
- /* Write PLL setup data */
- SYSCON->PLL1CTRL = pSetup->pllctrl;
- SYSCON->PLL1NDEC = pSetup->pllndec;
- SYSCON->PLL1NDEC = pSetup->pllndec | (1UL << SYSCON_PLL1NDEC_NREQ_SHIFT); /* latch */
- SYSCON->PLL1PDEC = pSetup->pllpdec;
- SYSCON->PLL1PDEC = pSetup->pllpdec | (1UL << SYSCON_PLL1PDEC_PREQ_SHIFT); /* latch */
- SYSCON->PLL1MDEC = pSetup->pllmdec;
- SYSCON->PLL1MDEC = pSetup->pllmdec | (1UL << SYSCON_PLL1MDEC_MREQ_SHIFT); /* latch */
-
- POWER_DisablePD(kPDRUNCFG_PD_PLL1);
-
- if ((pSetup->flags & PLL_SETUPFLAG_WAITLOCK) != 0U)
- {
- inRate = CLOCK_GetPLL1InClockRate();
- prediv = findPll1PreDiv();
- /* Adjust input clock */
- clkRate = inRate / prediv;
- /* The lock signal is only reliable between fref[2] :100 kHz to 20 MHz. */
- if ((clkRate >= 100000UL) && (clkRate <= 20000000UL))
- {
- while (CLOCK_IsPLL1Locked() == false)
- {
- }
- }
- else
- {
- SDK_DelayAtLeastUs(6000U,
- SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY); /* software should use a 6 ms time interval to
- insure the PLL will be stable */
- }
- }
-
- /* Update current programmed PLL rate var */
- s_Pll0_Freq = pSetup->pllRate;
-
- return kStatus_PLL_Success;
-}
-
-/* Set PLL0 clock based on the input frequency and multiplier */
-/*! brief Set PLL0 output based on the multiplier and input frequency
- * param multiply_by : multiplier
- * param input_freq : Clock input frequency of the PLL
- * return Nothing
- * note Unlike the Chip_Clock_SetupSystemPLLPrec() function, this
- * function does not disable or enable PLL power, wait for PLL lock,
- * or adjust system voltages. These must be done in the application.
- * The function will not alter any source clocks (ie, main systen clock)
- * that may use the PLL, so these should be setup prior to and after
- * exiting the function.
- */
-void CLOCK_SetupPLL0Mult(uint32_t multiply_by, uint32_t input_freq)
-{
- uint32_t cco_freq = input_freq * multiply_by;
- uint32_t pdec = 1U;
- uint32_t selr;
- uint32_t seli;
- uint32_t selp;
- uint32_t mdec, ndec;
-
- while (cco_freq < 275000000U)
- {
- multiply_by <<= 1U; /* double value in each iteration */
- pdec <<= 1U; /* correspondingly double pdec to cancel effect of double msel */
- cco_freq = input_freq * multiply_by;
- }
-
- selr = 0U;
-
- if (multiply_by >= 8000UL)
- {
- seli = 1UL;
- }
- else if (multiply_by >= 122UL)
- {
- seli = (uint32_t)(8000UL / multiply_by); /*floor(8000/M) */
- }
- else
- {
- seli = 2UL * ((uint32_t)(multiply_by / 4UL)) + 3UL; /* 2*floor(M/4) + 3 */
- }
-
- if (seli >= 63U)
- {
- seli = 63U;
- }
-
- {
- selp = 31U;
- }
-
- if (pdec > 1U)
- {
- pdec = pdec / 2U; /* Account for minus 1 encoding */
- /* Translate P value */
- }
-
- mdec = (uint32_t)PLL_SSCG1_MDEC_VAL_SET(multiply_by);
- ndec = 0x1U; /* pre divide by 1 (hardcoded) */
-
- SYSCON->PLL0CTRL = SYSCON_PLL0CTRL_CLKEN_MASK | SYSCON_PLL0CTRL_BYPASSPOSTDIV(0) |
- SYSCON_PLL0CTRL_BYPASSPOSTDIV2(0) | (selr << SYSCON_PLL0CTRL_SELR_SHIFT) |
- (seli << SYSCON_PLL0CTRL_SELI_SHIFT) | (selp << SYSCON_PLL0CTRL_SELP_SHIFT);
- SYSCON->PLL0PDEC = pdec | (1UL << SYSCON_PLL0PDEC_PREQ_SHIFT); /* set Pdec value and assert preq */
- SYSCON->PLL0NDEC = ndec | (1UL << SYSCON_PLL0NDEC_NREQ_SHIFT); /* set Pdec value and assert preq */
- SYSCON->PLL0SSCG1 =
- mdec | (1UL << SYSCON_PLL0SSCG1_MREQ_SHIFT); /* select non sscg MDEC value, assert mreq and select mdec value */
-}
-
-/* Enable USB DEVICE FULL SPEED clock */
-/*! brief Enable USB Device FS clock.
- * param src : clock source
- * param freq: clock frequency
- * Enable USB Device Full Speed clock.
- */
-bool CLOCK_EnableUsbfs0DeviceClock(clock_usbfs_src_t src, uint32_t freq)
-{
- bool ret = true;
-
- CLOCK_DisableClock(kCLOCK_Usbd0);
-
- if (kCLOCK_UsbfsSrcFro == src)
- {
- switch (freq)
- {
- case 96000000U:
- CLOCK_SetClkDiv(kCLOCK_DivUsb0Clk, 2, false); /*!< Div by 2 to get 48MHz, no divider reset */
- break;
-
- default:
- ret = false;
- break;
- }
- /* Turn ON FRO HF */
- POWER_DisablePD(kPDRUNCFG_PD_FRO192M);
- /* Enable FRO 96MHz output */
- ANACTRL->FRO192M_CTRL = ANACTRL->FRO192M_CTRL | ANACTRL_FRO192M_CTRL_ENA_96MHZCLK_MASK;
- /* Select FRO 96 or 48 MHz */
- CLOCK_AttachClk(kFRO_HF_to_USB0_CLK);
- }
- else
- {
- /*!< Configure XTAL32M */
- POWER_DisablePD(kPDRUNCFG_PD_XTAL32M); /* Ensure XTAL32M is powered */
- POWER_DisablePD(kPDRUNCFG_PD_LDOXO32M); /* Ensure XTAL32M is powered */
- (void)CLOCK_SetupExtClocking(16000000U); /* Enable clk_in clock */
- SYSCON->CLOCK_CTRL |= SYSCON_CLOCK_CTRL_CLKIN_ENA_MASK; /* Enable clk_in from XTAL32M clock */
- ANACTRL->XO32M_CTRL |= ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT_MASK; /* Enable clk_in to system */
-
- /*!< Set up PLL1 */
- POWER_DisablePD(kPDRUNCFG_PD_PLL1);
- CLOCK_AttachClk(kEXT_CLK_to_PLL1); /*!< Switch PLL1CLKSEL to EXT_CLK */
- const pll_setup_t pll1Setup = {
- .pllctrl = SYSCON_PLL1CTRL_CLKEN_MASK | SYSCON_PLL1CTRL_SELI(19U) | SYSCON_PLL1CTRL_SELP(9U),
- .pllndec = SYSCON_PLL1NDEC_NDIV(1U),
- .pllpdec = SYSCON_PLL1PDEC_PDIV(5U),
- .pllmdec = SYSCON_PLL1MDEC_MDIV(30U),
- .pllRate = 48000000U,
- .flags = PLL_SETUPFLAG_WAITLOCK};
- (void)CLOCK_SetPLL1Freq(&pll1Setup);
-
- CLOCK_SetClkDiv(kCLOCK_DivUsb0Clk, 1U, false);
- CLOCK_AttachClk(kPLL1_to_USB0_CLK);
- SDK_DelayAtLeastUs(50U, SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY);
- }
- CLOCK_EnableClock(kCLOCK_Usbd0);
- CLOCK_EnableClock(kCLOCK_UsbRam1);
-
- return ret;
-}
-
-/* Enable USB HOST FULL SPEED clock */
-/*! brief Enable USB HOST FS clock.
- * param src : clock source
- * param freq: clock frequency
- * Enable USB HOST Full Speed clock.
- */
-bool CLOCK_EnableUsbfs0HostClock(clock_usbfs_src_t src, uint32_t freq)
-{
- bool ret = true;
-
- CLOCK_DisableClock(kCLOCK_Usbhmr0);
- CLOCK_DisableClock(kCLOCK_Usbhsl0);
-
- if (kCLOCK_UsbfsSrcFro == src)
- {
- switch (freq)
- {
- case 96000000U:
- CLOCK_SetClkDiv(kCLOCK_DivUsb0Clk, 2, false); /*!< Div by 2 to get 48MHz, no divider reset */
- break;
-
- default:
- ret = false;
- break;
- }
- /* Turn ON FRO HF */
- POWER_DisablePD(kPDRUNCFG_PD_FRO192M);
- /* Enable FRO 96MHz output */
- ANACTRL->FRO192M_CTRL = ANACTRL->FRO192M_CTRL | ANACTRL_FRO192M_CTRL_ENA_96MHZCLK_MASK;
- /* Select FRO 96 MHz */
- CLOCK_AttachClk(kFRO_HF_to_USB0_CLK);
- }
- else
- {
- /*!< Configure XTAL32M */
- POWER_DisablePD(kPDRUNCFG_PD_XTAL32M); /* Ensure XTAL32M is powered */
- POWER_DisablePD(kPDRUNCFG_PD_LDOXO32M); /* Ensure XTAL32M is powered */
- (void)CLOCK_SetupExtClocking(16000000U); /* Enable clk_in clock */
- SYSCON->CLOCK_CTRL |= SYSCON_CLOCK_CTRL_CLKIN_ENA_MASK; /* Enable clk_in from XTAL32M clock */
- ANACTRL->XO32M_CTRL |= ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT_MASK; /* Enable clk_in to system */
-
- /*!< Set up PLL1 */
- POWER_DisablePD(kPDRUNCFG_PD_PLL1);
- CLOCK_AttachClk(kEXT_CLK_to_PLL1); /*!< Switch PLL1CLKSEL to EXT_CLK */
- const pll_setup_t pll1Setup = {
- .pllctrl = SYSCON_PLL1CTRL_CLKEN_MASK | SYSCON_PLL1CTRL_SELI(19U) | SYSCON_PLL1CTRL_SELP(9U),
- .pllndec = SYSCON_PLL1NDEC_NDIV(1U),
- .pllpdec = SYSCON_PLL1PDEC_PDIV(5U),
- .pllmdec = SYSCON_PLL1MDEC_MDIV(30U),
- .pllRate = 48000000U,
- .flags = PLL_SETUPFLAG_WAITLOCK};
- (void)CLOCK_SetPLL1Freq(&pll1Setup);
-
- CLOCK_SetClkDiv(kCLOCK_DivUsb0Clk, 1U, false);
- CLOCK_AttachClk(kPLL1_to_USB0_CLK);
- SDK_DelayAtLeastUs(50U, SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY);
- }
- CLOCK_EnableClock(kCLOCK_Usbhmr0);
- CLOCK_EnableClock(kCLOCK_Usbhsl0);
- CLOCK_EnableClock(kCLOCK_UsbRam1);
-
- return ret;
-}
-
-/* Enable USB PHY clock */
-bool CLOCK_EnableUsbhs0PhyPllClock(clock_usb_phy_src_t src, uint32_t freq)
-{
- volatile uint32_t i;
-
- POWER_DisablePD(kPDRUNCFG_PD_XTAL32M);
- POWER_DisablePD(kPDRUNCFG_PD_LDOXO32M);
- POWER_DisablePD(kPDRUNCFG_PD_FRO32K); /*!< Ensure FRO32k is on */
- POWER_DisablePD(kPDRUNCFG_PD_XTAL32K); /*!< Ensure xtal32k is on */
- POWER_DisablePD(kPDRUNCFG_PD_USB1_PHY); /*!< Ensure xtal32k is on */
- POWER_DisablePD(kPDRUNCFG_PD_LDOUSBHS); /*!< Ensure xtal32k is on */
-
- /* wait to make sure PHY power is fully up */
- i = 100000U;
- while ((i--) != 0U)
- {
- __ASM("nop");
- }
-
- SYSCON->AHBCLKCTRLSET[2] = SYSCON_AHBCLKCTRL2_ANALOG_CTRL(1);
- SYSCON->AHBCLKCTRLSET[2] = SYSCON_AHBCLKCTRL2_USB1_PHY(1);
-
- USBPHY->CTRL_CLR = USBPHY_CTRL_SFTRST_MASK;
- USBPHY->PLL_SIC = (USBPHY->PLL_SIC & ~USBPHY_PLL_SIC_PLL_DIV_SEL(0x7)) | USBPHY_PLL_SIC_PLL_DIV_SEL(0x06);
- USBPHY->PLL_SIC_SET = USBPHY_PLL_SIC_SET_PLL_REG_ENABLE_MASK;
- USBPHY->PLL_SIC_CLR = (1UL << 16U); // Reserved. User must set this bit to 0x0
- USBPHY->PLL_SIC_SET = USBPHY_PLL_SIC_SET_PLL_POWER_MASK;
- USBPHY->PLL_SIC_SET = USBPHY_PLL_SIC_SET_PLL_EN_USB_CLKS_MASK;
-
- USBPHY->CTRL_CLR = USBPHY_CTRL_CLR_CLKGATE_MASK;
- USBPHY->PWD_SET = 0x0;
-
- return true;
-}
-
-/* Enable USB DEVICE HIGH SPEED clock */
-bool CLOCK_EnableUsbhs0DeviceClock(clock_usbhs_src_t src, uint32_t freq)
-{
- SYSCON->AHBCLKCTRLSET[2] = SYSCON_AHBCLKCTRL2_USB1_RAM(1);
- SYSCON->AHBCLKCTRLSET[2] = SYSCON_AHBCLKCTRL2_USB1_DEV(1);
-
- /* 16 MHz will be driven by the tb on the xtal1 pin of XTAL32M */
- SYSCON->CLOCK_CTRL |= SYSCON_CLOCK_CTRL_CLKIN_ENA_MASK; /* Enable clock_in clock for clock module. */
- ANACTRL->XO32M_CTRL |= ANACTRL_XO32M_CTRL_ENABLE_PLL_USB_OUT(1);
- return true;
-}
-
-/* Enable USB HOST HIGH SPEED clock */
-bool CLOCK_EnableUsbhs0HostClock(clock_usbhs_src_t src, uint32_t freq)
-{
- SYSCON->AHBCLKCTRLSET[2] = SYSCON_AHBCLKCTRL2_USB1_RAM(1);
- SYSCON->AHBCLKCTRLSET[2] = SYSCON_AHBCLKCTRL2_USB1_HOST(1);
-
- /* 16 MHz will be driven by the tb on the xtal1 pin of XTAL32M */
- SYSCON->CLOCK_CTRL |= SYSCON_CLOCK_CTRL_CLKIN_ENA_MASK; /* Enable clock_in clock for clock module. */
- ANACTRL->XO32M_CTRL |= ANACTRL_XO32M_CTRL_ENABLE_PLL_USB_OUT(1);
-
- return true;
-}
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_clock.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_clock.h
deleted file mode 100755
index d5b745965c..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_clock.h
+++ /dev/null
@@ -1,1240 +0,0 @@
-/*
- * Copyright 2017 - 2020 , NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef _FSL_CLOCK_H_
-#define _FSL_CLOCK_H_
-
-#include "fsl_common.h"
-
-/*! @addtogroup clock */
-/*! @{ */
-
-/*! @file */
-
-/*******************************************************************************
- * Definitions
- *****************************************************************************/
-
-/*! @name Driver version */
-/*@{*/
-/*! @brief CLOCK driver version 2.3.2. */
-#define FSL_CLOCK_DRIVER_VERSION (MAKE_VERSION(2, 3, 2))
-/*@}*/
-
-/*! @brief Configure whether driver controls clock
- *
- * When set to 0, peripheral drivers will enable clock in initialize function
- * and disable clock in de-initialize function. When set to 1, peripheral
- * driver will not control the clock, application could control the clock out of
- * the driver.
- *
- * @note All drivers share this feature switcher. If it is set to 1, application
- * should handle clock enable and disable for all drivers.
- */
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL))
-#define FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL 0
-#endif
-
-/*!
- * @brief User-defined the size of cache for CLOCK_PllGetConfig() function.
- *
- * Once define this MACRO to be non-zero value, CLOCK_PllGetConfig() function
- * would cache the recent calulation and accelerate the execution to get the
- * right settings.
- */
-#ifndef CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT
-#define CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT 2U
-#endif
-
-/* Definition for delay API in clock driver, users can redefine it to the real application. */
-#ifndef SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY
-#define SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY (150000000UL)
-#endif
-
-/*! @brief Clock ip name array for ROM. */
-#define ROM_CLOCKS \
- { \
- kCLOCK_Rom \
- }
-/*! @brief Clock ip name array for SRAM. */
-#define SRAM_CLOCKS \
- { \
- kCLOCK_Sram1, kCLOCK_Sram2, kCLOCK_Sram3, kCLOCK_Sram4 \
- }
-/*! @brief Clock ip name array for FLASH. */
-#define FLASH_CLOCKS \
- { \
- kCLOCK_Flash \
- }
-/*! @brief Clock ip name array for FMC. */
-#define FMC_CLOCKS \
- { \
- kCLOCK_Fmc \
- }
-/*! @brief Clock ip name array for INPUTMUX. */
-#define INPUTMUX_CLOCKS \
- { \
- kCLOCK_InputMux0 \
- }
-/*! @brief Clock ip name array for IOCON. */
-#define IOCON_CLOCKS \
- { \
- kCLOCK_Iocon \
- }
-/*! @brief Clock ip name array for GPIO. */
-#define GPIO_CLOCKS \
- { \
- kCLOCK_Gpio0, kCLOCK_Gpio1, kCLOCK_Gpio2, kCLOCK_Gpio3 \
- }
-/*! @brief Clock ip name array for PINT. */
-#define PINT_CLOCKS \
- { \
- kCLOCK_Pint \
- }
-/*! @brief Clock ip name array for GINT. */
-#define GINT_CLOCKS \
- { \
- kCLOCK_Gint, kCLOCK_Gint \
- }
-/*! @brief Clock ip name array for DMA. */
-#define DMA_CLOCKS \
- { \
- kCLOCK_Dma0, kCLOCK_Dma1 \
- }
-/*! @brief Clock ip name array for CRC. */
-#define CRC_CLOCKS \
- { \
- kCLOCK_Crc \
- }
-/*! @brief Clock ip name array for WWDT. */
-#define WWDT_CLOCKS \
- { \
- kCLOCK_Wwdt \
- }
-/*! @brief Clock ip name array for RTC. */
-#define RTC_CLOCKS \
- { \
- kCLOCK_Rtc \
- }
-/*! @brief Clock ip name array for Mailbox. */
-#define MAILBOX_CLOCKS \
- { \
- kCLOCK_Mailbox \
- }
-/*! @brief Clock ip name array for LPADC. */
-#define LPADC_CLOCKS \
- { \
- kCLOCK_Adc0 \
- }
-/*! @brief Clock ip name array for MRT. */
-#define MRT_CLOCKS \
- { \
- kCLOCK_Mrt \
- }
-/*! @brief Clock ip name array for OSTIMER. */
-#define OSTIMER_CLOCKS \
- { \
- kCLOCK_OsTimer0 \
- }
-/*! @brief Clock ip name array for SCT0. */
-#define SCT_CLOCKS \
- { \
- kCLOCK_Sct0 \
- }
-/*! @brief Clock ip name array for UTICK. */
-#define UTICK_CLOCKS \
- { \
- kCLOCK_Utick0 \
- }
-/*! @brief Clock ip name array for FLEXCOMM. */
-#define FLEXCOMM_CLOCKS \
- { \
- kCLOCK_FlexComm0, kCLOCK_FlexComm1, kCLOCK_FlexComm2, kCLOCK_FlexComm3, kCLOCK_FlexComm4, kCLOCK_FlexComm5, \
- kCLOCK_FlexComm6, kCLOCK_FlexComm7, kCLOCK_Hs_Lspi \
- }
-/*! @brief Clock ip name array for LPUART. */
-#define LPUART_CLOCKS \
- { \
- kCLOCK_MinUart0, kCLOCK_MinUart1, kCLOCK_MinUart2, kCLOCK_MinUart3, kCLOCK_MinUart4, kCLOCK_MinUart5, \
- kCLOCK_MinUart6, kCLOCK_MinUart7 \
- }
-
-/*! @brief Clock ip name array for BI2C. */
-#define BI2C_CLOCKS \
- { \
- kCLOCK_BI2c0, kCLOCK_BI2c1, kCLOCK_BI2c2, kCLOCK_BI2c3, kCLOCK_BI2c4, kCLOCK_BI2c5, kCLOCK_BI2c6, kCLOCK_BI2c7 \
- }
-/*! @brief Clock ip name array for LSPI. */
-#define LPSPI_CLOCKS \
- { \
- kCLOCK_LSpi0, kCLOCK_LSpi1, kCLOCK_LSpi2, kCLOCK_LSpi3, kCLOCK_LSpi4, kCLOCK_LSpi5, kCLOCK_LSpi6, kCLOCK_LSpi7 \
- }
-/*! @brief Clock ip name array for FLEXI2S. */
-#define FLEXI2S_CLOCKS \
- { \
- kCLOCK_FlexI2s0, kCLOCK_FlexI2s1, kCLOCK_FlexI2s2, kCLOCK_FlexI2s3, kCLOCK_FlexI2s4, kCLOCK_FlexI2s5, \
- kCLOCK_FlexI2s6, kCLOCK_FlexI2s7 \
- }
-/*! @brief Clock ip name array for CTIMER. */
-#define CTIMER_CLOCKS \
- { \
- kCLOCK_Timer0, kCLOCK_Timer1, kCLOCK_Timer2, kCLOCK_Timer3, kCLOCK_Timer4 \
- }
-/*! @brief Clock ip name array for COMP */
-#define COMP_CLOCKS \
- { \
- kCLOCK_Comp \
- }
-/*! @brief Clock ip name array for SDIO. */
-#define SDIO_CLOCKS \
- { \
- kCLOCK_Sdio \
- }
-/*! @brief Clock ip name array for USB1CLK. */
-#define USB1CLK_CLOCKS \
- { \
- kCLOCK_Usb1Clk \
- }
-/*! @brief Clock ip name array for FREQME. */
-#define FREQME_CLOCKS \
- { \
- kCLOCK_Freqme \
- }
-/*! @brief Clock ip name array for USBRAM. */
-#define USBRAM_CLOCKS \
- { \
- kCLOCK_UsbRam1 \
- }
-/*! @brief Clock ip name array for RNG. */
-#define RNG_CLOCKS \
- { \
- kCLOCK_Rng \
- }
-/*! @brief Clock ip name array for USBHMR0. */
-#define USBHMR0_CLOCKS \
- { \
- kCLOCK_Usbhmr0 \
- }
-/*! @brief Clock ip name array for USBHSL0. */
-#define USBHSL0_CLOCKS \
- { \
- kCLOCK_Usbhsl0 \
- }
-/*! @brief Clock ip name array for HashCrypt. */
-#define HASHCRYPT_CLOCKS \
- { \
- kCLOCK_HashCrypt \
- }
-/*! @brief Clock ip name array for PowerQuad. */
-#define POWERQUAD_CLOCKS \
- { \
- kCLOCK_PowerQuad \
- }
-/*! @brief Clock ip name array for PLULUT. */
-#define PLULUT_CLOCKS \
- { \
- kCLOCK_PluLut \
- }
-/*! @brief Clock ip name array for PUF. */
-#define PUF_CLOCKS \
- { \
- kCLOCK_Puf \
- }
-/*! @brief Clock ip name array for CASPER. */
-#define CASPER_CLOCKS \
- { \
- kCLOCK_Casper \
- }
-/*! @brief Clock ip name array for ANALOGCTRL. */
-#define ANALOGCTRL_CLOCKS \
- { \
- kCLOCK_AnalogCtrl \
- }
-/*! @brief Clock ip name array for HS_LSPI. */
-#define HS_LSPI_CLOCKS \
- { \
- kCLOCK_Hs_Lspi \
- }
-/*! @brief Clock ip name array for GPIO_SEC. */
-#define GPIO_SEC_CLOCKS \
- { \
- kCLOCK_Gpio_Sec \
- }
-/*! @brief Clock ip name array for GPIO_SEC_INT. */
-#define GPIO_SEC_INT_CLOCKS \
- { \
- kCLOCK_Gpio_Sec_Int \
- }
-/*! @brief Clock ip name array for USBD. */
-#define USBD_CLOCKS \
- { \
- kCLOCK_Usbd0, kCLOCK_Usbh1, kCLOCK_Usbd1 \
- }
-/*! @brief Clock ip name array for USBH. */
-#define USBH_CLOCKS \
- { \
- kCLOCK_Usbh1 \
- }
-#define PLU_CLOCKS \
- { \
- kCLOCK_PluLut \
- }
-#define SYSCTL_CLOCKS \
- { \
- kCLOCK_Sysctl \
- }
-/*! @brief Clock gate name used for CLOCK_EnableClock/CLOCK_DisableClock. */
-/*------------------------------------------------------------------------------
- clock_ip_name_t definition:
-------------------------------------------------------------------------------*/
-
-#define CLK_GATE_REG_OFFSET_SHIFT 8U
-#define CLK_GATE_REG_OFFSET_MASK 0xFFFFFF00U
-#define CLK_GATE_BIT_SHIFT_SHIFT 0U
-#define CLK_GATE_BIT_SHIFT_MASK 0x000000FFU
-
-#define CLK_GATE_DEFINE(reg_offset, bit_shift) \
- ((((reg_offset) << CLK_GATE_REG_OFFSET_SHIFT) & CLK_GATE_REG_OFFSET_MASK) | \
- (((bit_shift) << CLK_GATE_BIT_SHIFT_SHIFT) & CLK_GATE_BIT_SHIFT_MASK))
-
-#define CLK_GATE_ABSTRACT_REG_OFFSET(x) (((uint32_t)(x)&CLK_GATE_REG_OFFSET_MASK) >> CLK_GATE_REG_OFFSET_SHIFT)
-#define CLK_GATE_ABSTRACT_BITS_SHIFT(x) (((uint32_t)(x)&CLK_GATE_BIT_SHIFT_MASK) >> CLK_GATE_BIT_SHIFT_SHIFT)
-
-#define AHB_CLK_CTRL0 0
-#define AHB_CLK_CTRL1 1
-#define AHB_CLK_CTRL2 2
-
-/*! @brief Clock gate name used for CLOCK_EnableClock/CLOCK_DisableClock. */
-typedef enum _clock_ip_name
-{
- kCLOCK_IpInvalid = 0U,
- kCLOCK_Rom = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 1),
- kCLOCK_Sram1 = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 3),
- kCLOCK_Sram2 = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 4),
- kCLOCK_Sram3 = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 5),
- kCLOCK_Sram4 = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 6),
- kCLOCK_Flash = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 7),
- kCLOCK_Fmc = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 8),
- kCLOCK_InputMux = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 11),
- kCLOCK_Iocon = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 13),
- kCLOCK_Gpio0 = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 14),
- kCLOCK_Gpio1 = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 15),
- kCLOCK_Gpio2 = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 16),
- kCLOCK_Gpio3 = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 17),
- kCLOCK_Pint = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 18),
- kCLOCK_Gint = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 19),
- kCLOCK_Dma0 = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 20),
- kCLOCK_Crc = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 21),
- kCLOCK_Wwdt = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 22),
- kCLOCK_Rtc = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 23),
- kCLOCK_Mailbox = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 26),
- kCLOCK_Adc0 = CLK_GATE_DEFINE(AHB_CLK_CTRL0, 27),
- kCLOCK_Mrt = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 0),
- kCLOCK_OsTimer0 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 1),
- kCLOCK_Sct0 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 2),
- kCLOCK_Utick0 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 10),
- kCLOCK_FlexComm0 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 11),
- kCLOCK_FlexComm1 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 12),
- kCLOCK_FlexComm2 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 13),
- kCLOCK_FlexComm3 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 14),
- kCLOCK_FlexComm4 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 15),
- kCLOCK_FlexComm5 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 16),
- kCLOCK_FlexComm6 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 17),
- kCLOCK_FlexComm7 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 18),
- kCLOCK_MinUart0 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 11),
- kCLOCK_MinUart1 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 12),
- kCLOCK_MinUart2 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 13),
- kCLOCK_MinUart3 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 14),
- kCLOCK_MinUart4 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 15),
- kCLOCK_MinUart5 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 16),
- kCLOCK_MinUart6 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 17),
- kCLOCK_MinUart7 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 18),
- kCLOCK_LSpi0 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 11),
- kCLOCK_LSpi1 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 12),
- kCLOCK_LSpi2 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 13),
- kCLOCK_LSpi3 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 14),
- kCLOCK_LSpi4 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 15),
- kCLOCK_LSpi5 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 16),
- kCLOCK_LSpi6 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 17),
- kCLOCK_LSpi7 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 18),
- kCLOCK_BI2c0 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 11),
- kCLOCK_BI2c1 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 12),
- kCLOCK_BI2c2 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 13),
- kCLOCK_BI2c3 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 14),
- kCLOCK_BI2c4 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 15),
- kCLOCK_BI2c5 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 16),
- kCLOCK_BI2c6 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 17),
- kCLOCK_BI2c7 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 18),
- kCLOCK_FlexI2s0 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 11),
- kCLOCK_FlexI2s1 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 12),
- kCLOCK_FlexI2s2 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 13),
- kCLOCK_FlexI2s3 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 14),
- kCLOCK_FlexI2s4 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 15),
- kCLOCK_FlexI2s5 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 16),
- kCLOCK_FlexI2s6 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 17),
- kCLOCK_FlexI2s7 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 18),
- kCLOCK_Timer2 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 22),
- kCLOCK_Usbd0 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 25),
- kCLOCK_Timer0 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 26),
- kCLOCK_Timer1 = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 27),
- kCLOCK_Pvt = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 28),
- kCLOCK_Ezha = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 30),
- kCLOCK_Ezhb = CLK_GATE_DEFINE(AHB_CLK_CTRL1, 31),
- kCLOCK_Dma1 = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 1),
- kCLOCK_Comp = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 2),
- kCLOCK_Sdio = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 3),
- kCLOCK_Usbh1 = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 4),
- kCLOCK_Usbd1 = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 5),
- kCLOCK_UsbRam1 = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 6),
- kCLOCK_Usb1Clk = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 7),
- kCLOCK_Freqme = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 8),
- kCLOCK_Rng = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 13),
- kCLOCK_InputMux1 = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 14),
- kCLOCK_Sysctl = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 15),
- kCLOCK_Usbhmr0 = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 16),
- kCLOCK_Usbhsl0 = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 17),
- kCLOCK_HashCrypt = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 18),
- kCLOCK_PowerQuad = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 19),
- kCLOCK_PluLut = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 20),
- kCLOCK_Timer3 = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 21),
- kCLOCK_Timer4 = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 22),
- kCLOCK_Puf = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 23),
- kCLOCK_Casper = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 24),
- kCLOCK_AnalogCtrl = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 27),
- kCLOCK_Hs_Lspi = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 28),
- kCLOCK_Gpio_Sec = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 29),
- kCLOCK_Gpio_Sec_Int = CLK_GATE_DEFINE(AHB_CLK_CTRL2, 30)
-} clock_ip_name_t;
-
-/*! @brief Peripherals clock source definition. */
-#define BUS_CLK kCLOCK_BusClk
-
-#define I2C0_CLK_SRC BUS_CLK
-
-/*! @brief Clock name used to get clock frequency. */
-typedef enum _clock_name
-{
- kCLOCK_CoreSysClk, /*!< Core/system clock (aka MAIN_CLK) */
- kCLOCK_BusClk, /*!< Bus clock (AHB clock) */
- kCLOCK_ClockOut, /*!< CLOCKOUT */
- kCLOCK_FroHf, /*!< FRO48/96 */
- kCLOCK_Pll1Out, /*!< PLL1 Output */
- kCLOCK_Mclk, /*!< MCLK */
- kCLOCK_Fro12M, /*!< FRO12M */
- kCLOCK_ExtClk, /*!< External Clock */
- kCLOCK_Pll0Out, /*!< PLL0 Output */
- kCLOCK_FlexI2S, /*!< FlexI2S clock */
-
-} clock_name_t;
-
-/*! @brief Clock Mux Switches
- * The encoding is as follows each connection identified is 32bits wide while 24bits are valuable
- * starting from LSB upwards
- *
- * [4 bits for choice, 0 means invalid choice] [8 bits mux ID]*
- *
- */
-
-#define CLK_ATTACH_ID(mux, sel, pos) \
- ((((uint32_t)(mux) << 0U) | (((uint32_t)(sel) + 1U) & 0xFU) << 8U) << ((uint32_t)(pos)*12U))
-#define MUX_A(mux, sel) CLK_ATTACH_ID((mux), (sel), 0U)
-#define MUX_B(mux, sel, selector) (CLK_ATTACH_ID((mux), (sel), 1U) | ((selector) << 24U))
-
-#define GET_ID_ITEM(connection) ((connection)&0xFFFU)
-#define GET_ID_NEXT_ITEM(connection) ((connection) >> 12U)
-#define GET_ID_ITEM_MUX(connection) (((uint8_t)connection) & 0xFFU)
-#define GET_ID_ITEM_SEL(connection) ((uint8_t)((((uint32_t)(connection)&0xF00U) >> 8U) - 1U))
-#define GET_ID_SELECTOR(connection) ((connection)&0xF000000U)
-
-#define CM_SYSTICKCLKSEL0 0U
-#define CM_SYSTICKCLKSEL1 1U
-#define CM_TRACECLKSEL 2U
-#define CM_CTIMERCLKSEL0 3U
-#define CM_CTIMERCLKSEL1 4U
-#define CM_CTIMERCLKSEL2 5U
-#define CM_CTIMERCLKSEL3 6U
-#define CM_CTIMERCLKSEL4 7U
-#define CM_MAINCLKSELA 8U
-#define CM_MAINCLKSELB 9U
-#define CM_CLKOUTCLKSEL 10U
-#define CM_PLL0CLKSEL 12U
-#define CM_PLL1CLKSEL 13U
-#define CM_ADCASYNCCLKSEL 17U
-#define CM_USB0CLKSEL 18U
-#define CM_FXCOMCLKSEL0 20U
-#define CM_FXCOMCLKSEL1 21U
-#define CM_FXCOMCLKSEL2 22U
-#define CM_FXCOMCLKSEL3 23U
-#define CM_FXCOMCLKSEL4 24U
-#define CM_FXCOMCLKSEL5 25U
-#define CM_FXCOMCLKSEL6 26U
-#define CM_FXCOMCLKSEL7 27U
-#define CM_HSLSPICLKSEL 28U
-#define CM_MCLKCLKSEL 32U
-#define CM_SCTCLKSEL 36U
-#define CM_SDIOCLKSEL 38U
-
-#define CM_RTCOSC32KCLKSEL 63U
-
-typedef enum _clock_attach_id
-{
-
- kFRO12M_to_MAIN_CLK = MUX_A(CM_MAINCLKSELA, 0) | MUX_B(CM_MAINCLKSELB, 0, 0),
- kEXT_CLK_to_MAIN_CLK = MUX_A(CM_MAINCLKSELA, 1) | MUX_B(CM_MAINCLKSELB, 0, 0),
- kFRO1M_to_MAIN_CLK = MUX_A(CM_MAINCLKSELA, 2) | MUX_B(CM_MAINCLKSELB, 0, 0),
- kFRO_HF_to_MAIN_CLK = MUX_A(CM_MAINCLKSELA, 3) | MUX_B(CM_MAINCLKSELB, 0, 0),
- kPLL0_to_MAIN_CLK = MUX_A(CM_MAINCLKSELA, 0) | MUX_B(CM_MAINCLKSELB, 1, 0),
- kPLL1_to_MAIN_CLK = MUX_A(CM_MAINCLKSELA, 0) | MUX_B(CM_MAINCLKSELB, 2, 0),
- kOSC32K_to_MAIN_CLK = MUX_A(CM_MAINCLKSELA, 0) | MUX_B(CM_MAINCLKSELB, 3, 0),
-
- kMAIN_CLK_to_CLKOUT = MUX_A(CM_CLKOUTCLKSEL, 0),
- kPLL0_to_CLKOUT = MUX_A(CM_CLKOUTCLKSEL, 1),
- kEXT_CLK_to_CLKOUT = MUX_A(CM_CLKOUTCLKSEL, 2),
- kFRO_HF_to_CLKOUT = MUX_A(CM_CLKOUTCLKSEL, 3),
- kFRO1M_to_CLKOUT = MUX_A(CM_CLKOUTCLKSEL, 4),
- kPLL1_to_CLKOUT = MUX_A(CM_CLKOUTCLKSEL, 5),
- kOSC32K_to_CLKOUT = MUX_A(CM_CLKOUTCLKSEL, 6),
- kNONE_to_SYS_CLKOUT = MUX_A(CM_CLKOUTCLKSEL, 7),
-
- kFRO12M_to_PLL0 = MUX_A(CM_PLL0CLKSEL, 0),
- kEXT_CLK_to_PLL0 = MUX_A(CM_PLL0CLKSEL, 1),
- kFRO1M_to_PLL0 = MUX_A(CM_PLL0CLKSEL, 2),
- kOSC32K_to_PLL0 = MUX_A(CM_PLL0CLKSEL, 3),
- kNONE_to_PLL0 = MUX_A(CM_PLL0CLKSEL, 7),
-
- kMAIN_CLK_to_ADC_CLK = MUX_A(CM_ADCASYNCCLKSEL, 0),
- kPLL0_to_ADC_CLK = MUX_A(CM_ADCASYNCCLKSEL, 1),
- kFRO_HF_to_ADC_CLK = MUX_A(CM_ADCASYNCCLKSEL, 2),
- kNONE_to_ADC_CLK = MUX_A(CM_ADCASYNCCLKSEL, 7),
-
- kMAIN_CLK_to_USB0_CLK = MUX_A(CM_USB0CLKSEL, 0),
- kPLL0_to_USB0_CLK = MUX_A(CM_USB0CLKSEL, 1),
- kFRO_HF_to_USB0_CLK = MUX_A(CM_USB0CLKSEL, 3),
- kPLL1_to_USB0_CLK = MUX_A(CM_USB0CLKSEL, 5),
- kNONE_to_USB0_CLK = MUX_A(CM_USB0CLKSEL, 7),
-
- kMAIN_CLK_to_FLEXCOMM0 = MUX_A(CM_FXCOMCLKSEL0, 0),
- kPLL0_DIV_to_FLEXCOMM0 = MUX_A(CM_FXCOMCLKSEL0, 1),
- kFRO12M_to_FLEXCOMM0 = MUX_A(CM_FXCOMCLKSEL0, 2),
- kFRO_HF_DIV_to_FLEXCOMM0 = MUX_A(CM_FXCOMCLKSEL0, 3),
- kFRO1M_to_FLEXCOMM0 = MUX_A(CM_FXCOMCLKSEL0, 4),
- kMCLK_to_FLEXCOMM0 = MUX_A(CM_FXCOMCLKSEL0, 5),
- kOSC32K_to_FLEXCOMM0 = MUX_A(CM_FXCOMCLKSEL0, 6),
- kNONE_to_FLEXCOMM0 = MUX_A(CM_FXCOMCLKSEL0, 7),
-
- kMAIN_CLK_to_FLEXCOMM1 = MUX_A(CM_FXCOMCLKSEL1, 0),
- kPLL0_DIV_to_FLEXCOMM1 = MUX_A(CM_FXCOMCLKSEL1, 1),
- kFRO12M_to_FLEXCOMM1 = MUX_A(CM_FXCOMCLKSEL1, 2),
- kFRO_HF_DIV_to_FLEXCOMM1 = MUX_A(CM_FXCOMCLKSEL1, 3),
- kFRO1M_to_FLEXCOMM1 = MUX_A(CM_FXCOMCLKSEL1, 4),
- kMCLK_to_FLEXCOMM1 = MUX_A(CM_FXCOMCLKSEL1, 5),
- kOSC32K_to_FLEXCOMM1 = MUX_A(CM_FXCOMCLKSEL1, 6),
- kNONE_to_FLEXCOMM1 = MUX_A(CM_FXCOMCLKSEL1, 7),
-
- kMAIN_CLK_to_FLEXCOMM2 = MUX_A(CM_FXCOMCLKSEL2, 0),
- kPLL0_DIV_to_FLEXCOMM2 = MUX_A(CM_FXCOMCLKSEL2, 1),
- kFRO12M_to_FLEXCOMM2 = MUX_A(CM_FXCOMCLKSEL2, 2),
- kFRO_HF_DIV_to_FLEXCOMM2 = MUX_A(CM_FXCOMCLKSEL2, 3),
- kFRO1M_to_FLEXCOMM2 = MUX_A(CM_FXCOMCLKSEL2, 4),
- kMCLK_to_FLEXCOMM2 = MUX_A(CM_FXCOMCLKSEL2, 5),
- kOSC32K_to_FLEXCOMM2 = MUX_A(CM_FXCOMCLKSEL2, 6),
- kNONE_to_FLEXCOMM2 = MUX_A(CM_FXCOMCLKSEL2, 7),
-
- kMAIN_CLK_to_FLEXCOMM3 = MUX_A(CM_FXCOMCLKSEL3, 0),
- kPLL0_DIV_to_FLEXCOMM3 = MUX_A(CM_FXCOMCLKSEL3, 1),
- kFRO12M_to_FLEXCOMM3 = MUX_A(CM_FXCOMCLKSEL3, 2),
- kFRO_HF_DIV_to_FLEXCOMM3 = MUX_A(CM_FXCOMCLKSEL3, 3),
- kFRO1M_to_FLEXCOMM3 = MUX_A(CM_FXCOMCLKSEL3, 4),
- kMCLK_to_FLEXCOMM3 = MUX_A(CM_FXCOMCLKSEL3, 5),
- kOSC32K_to_FLEXCOMM3 = MUX_A(CM_FXCOMCLKSEL3, 6),
- kNONE_to_FLEXCOMM3 = MUX_A(CM_FXCOMCLKSEL3, 7),
-
- kMAIN_CLK_to_FLEXCOMM4 = MUX_A(CM_FXCOMCLKSEL4, 0),
- kPLL0_DIV_to_FLEXCOMM4 = MUX_A(CM_FXCOMCLKSEL4, 1),
- kFRO12M_to_FLEXCOMM4 = MUX_A(CM_FXCOMCLKSEL4, 2),
- kFRO_HF_DIV_to_FLEXCOMM4 = MUX_A(CM_FXCOMCLKSEL4, 3),
- kFRO1M_to_FLEXCOMM4 = MUX_A(CM_FXCOMCLKSEL4, 4),
- kMCLK_to_FLEXCOMM4 = MUX_A(CM_FXCOMCLKSEL4, 5),
- kOSC32K_to_FLEXCOMM4 = MUX_A(CM_FXCOMCLKSEL4, 6),
- kNONE_to_FLEXCOMM4 = MUX_A(CM_FXCOMCLKSEL4, 7),
-
- kMAIN_CLK_to_FLEXCOMM5 = MUX_A(CM_FXCOMCLKSEL5, 0),
- kPLL0_DIV_to_FLEXCOMM5 = MUX_A(CM_FXCOMCLKSEL5, 1),
- kFRO12M_to_FLEXCOMM5 = MUX_A(CM_FXCOMCLKSEL5, 2),
- kFRO_HF_DIV_to_FLEXCOMM5 = MUX_A(CM_FXCOMCLKSEL5, 3),
- kFRO1M_to_FLEXCOMM5 = MUX_A(CM_FXCOMCLKSEL5, 4),
- kMCLK_to_FLEXCOMM5 = MUX_A(CM_FXCOMCLKSEL5, 5),
- kOSC32K_to_FLEXCOMM5 = MUX_A(CM_FXCOMCLKSEL5, 6),
- kNONE_to_FLEXCOMM5 = MUX_A(CM_FXCOMCLKSEL5, 7),
-
- kMAIN_CLK_to_FLEXCOMM6 = MUX_A(CM_FXCOMCLKSEL6, 0),
- kPLL0_DIV_to_FLEXCOMM6 = MUX_A(CM_FXCOMCLKSEL6, 1),
- kFRO12M_to_FLEXCOMM6 = MUX_A(CM_FXCOMCLKSEL6, 2),
- kFRO_HF_DIV_to_FLEXCOMM6 = MUX_A(CM_FXCOMCLKSEL6, 3),
- kFRO1M_to_FLEXCOMM6 = MUX_A(CM_FXCOMCLKSEL6, 4),
- kMCLK_to_FLEXCOMM6 = MUX_A(CM_FXCOMCLKSEL6, 5),
- kOSC32K_to_FLEXCOMM6 = MUX_A(CM_FXCOMCLKSEL6, 6),
- kNONE_to_FLEXCOMM6 = MUX_A(CM_FXCOMCLKSEL6, 7),
-
- kMAIN_CLK_to_FLEXCOMM7 = MUX_A(CM_FXCOMCLKSEL7, 0),
- kPLL0_DIV_to_FLEXCOMM7 = MUX_A(CM_FXCOMCLKSEL7, 1),
- kFRO12M_to_FLEXCOMM7 = MUX_A(CM_FXCOMCLKSEL7, 2),
- kFRO_HF_DIV_to_FLEXCOMM7 = MUX_A(CM_FXCOMCLKSEL7, 3),
- kFRO1M_to_FLEXCOMM7 = MUX_A(CM_FXCOMCLKSEL7, 4),
- kMCLK_to_FLEXCOMM7 = MUX_A(CM_FXCOMCLKSEL7, 5),
- kOSC32K_to_FLEXCOMM7 = MUX_A(CM_FXCOMCLKSEL7, 6),
- kNONE_to_FLEXCOMM7 = MUX_A(CM_FXCOMCLKSEL7, 7),
-
- kMAIN_CLK_to_HSLSPI = MUX_A(CM_HSLSPICLKSEL, 0),
- kPLL0_DIV_to_HSLSPI = MUX_A(CM_HSLSPICLKSEL, 1),
- kFRO12M_to_HSLSPI = MUX_A(CM_HSLSPICLKSEL, 2),
- kFRO_HF_DIV_to_HSLSPI = MUX_A(CM_HSLSPICLKSEL, 3),
- kFRO1M_to_HSLSPI = MUX_A(CM_HSLSPICLKSEL, 4),
- kOSC32K_to_HSLSPI = MUX_A(CM_HSLSPICLKSEL, 6),
- kNONE_to_HSLSPI = MUX_A(CM_HSLSPICLKSEL, 7),
-
- kFRO_HF_to_MCLK = MUX_A(CM_MCLKCLKSEL, 0),
- kPLL0_to_MCLK = MUX_A(CM_MCLKCLKSEL, 1),
- kNONE_to_MCLK = MUX_A(CM_MCLKCLKSEL, 7),
-
- kMAIN_CLK_to_SCT_CLK = MUX_A(CM_SCTCLKSEL, 0),
- kPLL0_to_SCT_CLK = MUX_A(CM_SCTCLKSEL, 1),
- kEXT_CLK_to_SCT_CLK = MUX_A(CM_SCTCLKSEL, 2),
- kFRO_HF_to_SCT_CLK = MUX_A(CM_SCTCLKSEL, 3),
- kMCLK_to_SCT_CLK = MUX_A(CM_SCTCLKSEL, 5),
- kNONE_to_SCT_CLK = MUX_A(CM_SCTCLKSEL, 7),
-
- kMAIN_CLK_to_SDIO_CLK = MUX_A(CM_SDIOCLKSEL, 0),
- kPLL0_to_SDIO_CLK = MUX_A(CM_SDIOCLKSEL, 1),
- kFRO_HF_to_SDIO_CLK = MUX_A(CM_SDIOCLKSEL, 3),
- kPLL1_to_SDIO_CLK = MUX_A(CM_SDIOCLKSEL, 5),
- kNONE_to_SDIO_CLK = MUX_A(CM_SDIOCLKSEL, 7),
-
- kFRO32K_to_OSC32K = MUX_A(CM_RTCOSC32KCLKSEL, 0),
- kXTAL32K_to_OSC32K = MUX_A(CM_RTCOSC32KCLKSEL, 1),
-
- kTRACE_DIV_to_TRACE = MUX_A(CM_TRACECLKSEL, 0),
- kFRO1M_to_TRACE = MUX_A(CM_TRACECLKSEL, 1),
- kOSC32K_to_TRACE = MUX_A(CM_TRACECLKSEL, 2),
- kNONE_to_TRACE = MUX_A(CM_TRACECLKSEL, 7),
-
- kSYSTICK_DIV0_to_SYSTICK0 = MUX_A(CM_SYSTICKCLKSEL0, 0),
- kFRO1M_to_SYSTICK0 = MUX_A(CM_SYSTICKCLKSEL0, 1),
- kOSC32K_to_SYSTICK0 = MUX_A(CM_SYSTICKCLKSEL0, 2),
- kNONE_to_SYSTICK0 = MUX_A(CM_SYSTICKCLKSEL0, 7),
-
- kSYSTICK_DIV1_to_SYSTICK1 = MUX_A(CM_SYSTICKCLKSEL1, 0),
- kFRO1M_to_SYSTICK1 = MUX_A(CM_SYSTICKCLKSEL1, 1),
- kOSC32K_to_SYSTICK1 = MUX_A(CM_SYSTICKCLKSEL1, 2),
- kNONE_to_SYSTICK1 = MUX_A(CM_SYSTICKCLKSEL1, 7),
-
- kFRO12M_to_PLL1 = MUX_A(CM_PLL1CLKSEL, 0),
- kEXT_CLK_to_PLL1 = MUX_A(CM_PLL1CLKSEL, 1),
- kFRO1M_to_PLL1 = MUX_A(CM_PLL1CLKSEL, 2),
- kOSC32K_to_PLL1 = MUX_A(CM_PLL1CLKSEL, 3),
- kNONE_to_PLL1 = MUX_A(CM_PLL1CLKSEL, 7),
-
- kMAIN_CLK_to_CTIMER0 = MUX_A(CM_CTIMERCLKSEL0, 0),
- kPLL0_to_CTIMER0 = MUX_A(CM_CTIMERCLKSEL0, 1),
- kFRO_HF_to_CTIMER0 = MUX_A(CM_CTIMERCLKSEL0, 3),
- kFRO1M_to_CTIMER0 = MUX_A(CM_CTIMERCLKSEL0, 4),
- kMCLK_to_CTIMER0 = MUX_A(CM_CTIMERCLKSEL0, 5),
- kOSC32K_to_CTIMER0 = MUX_A(CM_CTIMERCLKSEL0, 6),
- kNONE_to_CTIMER0 = MUX_A(CM_CTIMERCLKSEL0, 7),
-
- kMAIN_CLK_to_CTIMER1 = MUX_A(CM_CTIMERCLKSEL1, 0),
- kPLL0_to_CTIMER1 = MUX_A(CM_CTIMERCLKSEL1, 1),
- kFRO_HF_to_CTIMER1 = MUX_A(CM_CTIMERCLKSEL1, 3),
- kFRO1M_to_CTIMER1 = MUX_A(CM_CTIMERCLKSEL1, 4),
- kMCLK_to_CTIMER1 = MUX_A(CM_CTIMERCLKSEL1, 5),
- kOSC32K_to_CTIMER1 = MUX_A(CM_CTIMERCLKSEL1, 6),
- kNONE_to_CTIMER1 = MUX_A(CM_CTIMERCLKSEL1, 7),
-
- kMAIN_CLK_to_CTIMER2 = MUX_A(CM_CTIMERCLKSEL2, 0),
- kPLL0_to_CTIMER2 = MUX_A(CM_CTIMERCLKSEL2, 1),
- kFRO_HF_to_CTIMER2 = MUX_A(CM_CTIMERCLKSEL2, 3),
- kFRO1M_to_CTIMER2 = MUX_A(CM_CTIMERCLKSEL2, 4),
- kMCLK_to_CTIMER2 = MUX_A(CM_CTIMERCLKSEL2, 5),
- kOSC32K_to_CTIMER2 = MUX_A(CM_CTIMERCLKSEL2, 6),
- kNONE_to_CTIMER2 = MUX_A(CM_CTIMERCLKSEL2, 7),
-
- kMAIN_CLK_to_CTIMER3 = MUX_A(CM_CTIMERCLKSEL3, 0),
- kPLL0_to_CTIMER3 = MUX_A(CM_CTIMERCLKSEL3, 1),
- kFRO_HF_to_CTIMER3 = MUX_A(CM_CTIMERCLKSEL3, 3),
- kFRO1M_to_CTIMER3 = MUX_A(CM_CTIMERCLKSEL3, 4),
- kMCLK_to_CTIMER3 = MUX_A(CM_CTIMERCLKSEL3, 5),
- kOSC32K_to_CTIMER3 = MUX_A(CM_CTIMERCLKSEL3, 6),
- kNONE_to_CTIMER3 = MUX_A(CM_CTIMERCLKSEL3, 7),
-
- kMAIN_CLK_to_CTIMER4 = MUX_A(CM_CTIMERCLKSEL4, 0),
- kPLL0_to_CTIMER4 = MUX_A(CM_CTIMERCLKSEL4, 1),
- kFRO_HF_to_CTIMER4 = MUX_A(CM_CTIMERCLKSEL4, 3),
- kFRO1M_to_CTIMER4 = MUX_A(CM_CTIMERCLKSEL4, 4),
- kMCLK_to_CTIMER4 = MUX_A(CM_CTIMERCLKSEL4, 5),
- kOSC32K_to_CTIMER4 = MUX_A(CM_CTIMERCLKSEL4, 6),
- kNONE_to_CTIMER4 = MUX_A(CM_CTIMERCLKSEL4, 7),
- kNONE_to_NONE = (int)0x80000000U,
-} clock_attach_id_t;
-
-/* Clock dividers */
-typedef enum _clock_div_name
-{
- kCLOCK_DivSystickClk0 = 0,
- kCLOCK_DivSystickClk1 = 1,
- kCLOCK_DivArmTrClkDiv = 2,
- kCLOCK_DivFlexFrg0 = 8,
- kCLOCK_DivFlexFrg1 = 9,
- kCLOCK_DivFlexFrg2 = 10,
- kCLOCK_DivFlexFrg3 = 11,
- kCLOCK_DivFlexFrg4 = 12,
- kCLOCK_DivFlexFrg5 = 13,
- kCLOCK_DivFlexFrg6 = 14,
- kCLOCK_DivFlexFrg7 = 15,
- kCLOCK_DivAhbClk = 32,
- kCLOCK_DivClkOut = 33,
- kCLOCK_DivFrohfClk = 34,
- kCLOCK_DivWdtClk = 35,
- kCLOCK_DivAdcAsyncClk = 37,
- kCLOCK_DivUsb0Clk = 38,
- kCLOCK_DivMClk = 43,
- kCLOCK_DivSctClk = 45,
- kCLOCK_DivSdioClk = 47,
- kCLOCK_DivPll0Clk = 49
-} clock_div_name_t;
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif /* __cplusplus */
-
-/**
- * @brief Enable the clock for specific IP.
- * @param name : Clock to be enabled.
- * @return Nothing
- */
-static inline void CLOCK_EnableClock(clock_ip_name_t clk)
-{
- uint32_t index = CLK_GATE_ABSTRACT_REG_OFFSET(clk);
- SYSCON->AHBCLKCTRLSET[index] = (1UL << CLK_GATE_ABSTRACT_BITS_SHIFT(clk));
-}
-/**
- * @brief Disable the clock for specific IP.
- * @param name : Clock to be Disabled.
- * @return Nothing
- */
-static inline void CLOCK_DisableClock(clock_ip_name_t clk)
-{
- uint32_t index = CLK_GATE_ABSTRACT_REG_OFFSET(clk);
- SYSCON->AHBCLKCTRLCLR[index] = (1UL << CLK_GATE_ABSTRACT_BITS_SHIFT(clk));
-}
-/**
- * @brief Initialize the Core clock to given frequency (12, 48 or 96 MHz).
- * Turns on FRO and uses default CCO, if freq is 12000000, then high speed output is off, else high speed output is
- * enabled.
- * @param iFreq : Desired frequency (must be one of #CLK_FRO_12MHZ or #CLK_FRO_48MHZ or #CLK_FRO_96MHZ)
- * @return returns success or fail status.
- */
-status_t CLOCK_SetupFROClocking(uint32_t iFreq);
-/**
- * @brief Set the flash wait states for the input freuqency.
- * @param iFreq : Input frequency
- * @return Nothing
- */
-void CLOCK_SetFLASHAccessCyclesForFreq(uint32_t iFreq);
-/**
- * @brief Initialize the external osc clock to given frequency.
- * @param iFreq : Desired frequency (must be equal to exact rate in Hz)
- * @return returns success or fail status.
- */
-status_t CLOCK_SetupExtClocking(uint32_t iFreq);
-/**
- * @brief Initialize the I2S MCLK clock to given frequency.
- * @param iFreq : Desired frequency (must be equal to exact rate in Hz)
- * @return returns success or fail status.
- */
-status_t CLOCK_SetupI2SMClkClocking(uint32_t iFreq);
-/**
- * @brief Initialize the PLU CLKIN clock to given frequency.
- * @param iFreq : Desired frequency (must be equal to exact rate in Hz)
- * @return returns success or fail status.
- */
-status_t CLOCK_SetupPLUClkInClocking(uint32_t iFreq);
-/**
- * @brief Configure the clock selection muxes.
- * @param connection : Clock to be configured.
- * @return Nothing
- */
-void CLOCK_AttachClk(clock_attach_id_t connection);
-/**
- * @brief Get the actual clock attach id.
- * This fuction uses the offset in input attach id, then it reads the actual source value in
- * the register and combine the offset to obtain an actual attach id.
- * @param attachId : Clock attach id to get.
- * @return Clock source value.
- */
-clock_attach_id_t CLOCK_GetClockAttachId(clock_attach_id_t attachId);
-/**
- * @brief Setup peripheral clock dividers.
- * @param div_name : Clock divider name
- * @param divided_by_value: Value to be divided
- * @param reset : Whether to reset the divider counter.
- * @return Nothing
- */
-void CLOCK_SetClkDiv(clock_div_name_t div_name, uint32_t divided_by_value, bool reset);
-/**
- * @brief Setup rtc 1khz clock divider.
- * @param divided_by_value: Value to be divided
- * @return Nothing
- */
-void CLOCK_SetRtc1khzClkDiv(uint32_t divided_by_value);
-/**
- * @brief Setup rtc 1hz clock divider.
- * @param divided_by_value: Value to be divided
- * @return Nothing
- */
-void CLOCK_SetRtc1hzClkDiv(uint32_t divided_by_value);
-
-/**
- * @brief Set the flexcomm output frequency.
- * @param id : flexcomm instance id
- * freq : output frequency
- * @return 0 : the frequency range is out of range.
- * 1 : switch successfully.
- */
-uint32_t CLOCK_SetFlexCommClock(uint32_t id, uint32_t freq);
-
-/*! @brief Return Frequency of flexcomm input clock
- * @param id : flexcomm instance id
- * @return Frequency value
- */
-uint32_t CLOCK_GetFlexCommInputClock(uint32_t id);
-
-/*! @brief Return Frequency of selected clock
- * @return Frequency of selected clock
- */
-uint32_t CLOCK_GetFreq(clock_name_t clockName);
-/*! @brief Return Frequency of FRO 12MHz
- * @return Frequency of FRO 12MHz
- */
-uint32_t CLOCK_GetFro12MFreq(void);
-/*! @brief Return Frequency of FRO 1MHz
- * @return Frequency of FRO 1MHz
- */
-uint32_t CLOCK_GetFro1MFreq(void);
-/*! @brief Return Frequency of ClockOut
- * @return Frequency of ClockOut
- */
-uint32_t CLOCK_GetClockOutClkFreq(void);
-/*! @brief Return Frequency of Adc Clock
- * @return Frequency of Adc.
- */
-uint32_t CLOCK_GetAdcClkFreq(void);
-/*! @brief Return Frequency of Usb0 Clock
- * @return Frequency of Usb0 Clock.
- */
-uint32_t CLOCK_GetUsb0ClkFreq(void);
-/*! @brief Return Frequency of Usb1 Clock
- * @return Frequency of Usb1 Clock.
- */
-uint32_t CLOCK_GetUsb1ClkFreq(void);
-/*! @brief Return Frequency of MClk Clock
- * @return Frequency of MClk Clock.
- */
-uint32_t CLOCK_GetMclkClkFreq(void);
-/*! @brief Return Frequency of SCTimer Clock
- * @return Frequency of SCTimer Clock.
- */
-uint32_t CLOCK_GetSctClkFreq(void);
-/*! @brief Return Frequency of SDIO Clock
- * @return Frequency of SDIO Clock.
- */
-uint32_t CLOCK_GetSdioClkFreq(void);
-/*! @brief Return Frequency of External Clock
- * @return Frequency of External Clock. If no external clock is used returns 0.
- */
-uint32_t CLOCK_GetExtClkFreq(void);
-/*! @brief Return Frequency of Watchdog
- * @return Frequency of Watchdog
- */
-uint32_t CLOCK_GetWdtClkFreq(void);
-/*! @brief Return Frequency of High-Freq output of FRO
- * @return Frequency of High-Freq output of FRO
- */
-uint32_t CLOCK_GetFroHfFreq(void);
-/*! @brief Return Frequency of PLL
- * @return Frequency of PLL
- */
-uint32_t CLOCK_GetPll0OutFreq(void);
-/*! @brief Return Frequency of USB PLL
- * @return Frequency of PLL
- */
-uint32_t CLOCK_GetPll1OutFreq(void);
-/*! @brief Return Frequency of 32kHz osc
- * @return Frequency of 32kHz osc
- */
-uint32_t CLOCK_GetOsc32KFreq(void);
-/*! @brief Return Frequency of Core System
- * @return Frequency of Core System
- */
-uint32_t CLOCK_GetCoreSysClkFreq(void);
-/*! @brief Return Frequency of I2S MCLK Clock
- * @return Frequency of I2S MCLK Clock
- */
-uint32_t CLOCK_GetI2SMClkFreq(void);
-/*! @brief Return Frequency of PLU CLKIN Clock
- * @return Frequency of PLU CLKIN Clock
- */
-uint32_t CLOCK_GetPLUClkInFreq(void);
-/*! @brief Return Frequency of FlexComm Clock
- * @return Frequency of FlexComm Clock
- */
-uint32_t CLOCK_GetFlexCommClkFreq(uint32_t id);
-/*! @brief Return Frequency of High speed SPI Clock
- * @return Frequency of High speed SPI Clock
- */
-uint32_t CLOCK_GetHsLspiClkFreq(void);
-/*! @brief Return Frequency of CTimer functional Clock
- * @return Frequency of CTimer functional Clock
- */
-uint32_t CLOCK_GetCTimerClkFreq(uint32_t id);
-/*! @brief Return Frequency of SystickClock
- * @return Frequency of Systick Clock
- */
-uint32_t CLOCK_GetSystickClkFreq(uint32_t id);
-
-/*! @brief Return PLL0 input clock rate
- * @return PLL0 input clock rate
- */
-uint32_t CLOCK_GetPLL0InClockRate(void);
-
-/*! @brief Return PLL1 input clock rate
- * @return PLL1 input clock rate
- */
-uint32_t CLOCK_GetPLL1InClockRate(void);
-
-/*! @brief Return PLL0 output clock rate
- * @param recompute : Forces a PLL rate recomputation if true
- * @return PLL0 output clock rate
- * @note The PLL rate is cached in the driver in a variable as
- * the rate computation function can take some time to perform. It
- * is recommended to use 'false' with the 'recompute' parameter.
- */
-uint32_t CLOCK_GetPLL0OutClockRate(bool recompute);
-
-/*! @brief Enables and disables PLL0 bypass mode
- * @brief bypass : true to bypass PLL0 (PLL0 output = PLL0 input, false to disable bypass
- * @return PLL0 output clock rate
- */
-__STATIC_INLINE void CLOCK_SetBypassPLL0(bool bypass)
-{
- if (bypass)
- {
- SYSCON->PLL0CTRL |= (1UL << SYSCON_PLL0CTRL_BYPASSPLL_SHIFT);
- }
- else
- {
- SYSCON->PLL0CTRL &= ~(1UL << SYSCON_PLL0CTRL_BYPASSPLL_SHIFT);
- }
-}
-
-/*! @brief Enables and disables PLL1 bypass mode
- * @brief bypass : true to bypass PLL1 (PLL1 output = PLL1 input, false to disable bypass
- * @return PLL1 output clock rate
- */
-__STATIC_INLINE void CLOCK_SetBypassPLL1(bool bypass)
-{
- if (bypass)
- {
- SYSCON->PLL1CTRL |= (1UL << SYSCON_PLL1CTRL_BYPASSPLL_SHIFT);
- }
- else
- {
- SYSCON->PLL1CTRL &= ~(1UL << SYSCON_PLL1CTRL_BYPASSPLL_SHIFT);
- }
-}
-
-/*! @brief Check if PLL is locked or not
- * @return true if the PLL is locked, false if not locked
- */
-__STATIC_INLINE bool CLOCK_IsPLL0Locked(void)
-{
- return (bool)((SYSCON->PLL0STAT & SYSCON_PLL0STAT_LOCK_MASK) != 0UL);
-}
-
-/*! @brief Check if PLL1 is locked or not
- * @return true if the PLL1 is locked, false if not locked
- */
-__STATIC_INLINE bool CLOCK_IsPLL1Locked(void)
-{
- return (bool)((SYSCON->PLL1STAT & SYSCON_PLL1STAT_LOCK_MASK) != 0UL);
-}
-
-/*! @brief Store the current PLL0 rate
- * @param rate: Current rate of the PLL0
- * @return Nothing
- **/
-void CLOCK_SetStoredPLL0ClockRate(uint32_t rate);
-
-/*! @brief PLL configuration structure flags for 'flags' field
- * These flags control how the PLL configuration function sets up the PLL setup structure.<br>
- *
- * When the PLL_CONFIGFLAG_USEINRATE flag is selected, the 'InputRate' field in the
- * configuration structure must be assigned with the expected PLL frequency. If the
- * PLL_CONFIGFLAG_USEINRATE is not used, 'InputRate' is ignored in the configuration
- * function and the driver will determine the PLL rate from the currently selected
- * PLL source. This flag might be used to configure the PLL input clock more accurately
- * when using the WDT oscillator or a more dyanmic CLKIN source.<br>
- *
- * When the PLL_CONFIGFLAG_FORCENOFRACT flag is selected, the PLL hardware for the
- * automatic bandwidth selection, Spread Spectrum (SS) support, and fractional M-divider
- * are not used.<br>
- */
-#define PLL_CONFIGFLAG_USEINRATE (1U << 0U) /*!< Flag to use InputRate in PLL configuration structure for setup */
-#define PLL_CONFIGFLAG_FORCENOFRACT (1U << 2U)
-/*!< Force non-fractional output mode, PLL output will not use the fractional, automatic bandwidth, or SS hardware */
-
-/*! @brief PLL Spread Spectrum (SS) Programmable modulation frequency
- * See (MF) field in the PLL0SSCG1 register in the UM.
- */
-typedef enum _ss_progmodfm
-{
- kSS_MF_512 = (0 << 20), /*!< Nss = 512 (fm ? 3.9 - 7.8 kHz) */
- kSS_MF_384 = (1 << 20), /*!< Nss ?= 384 (fm ? 5.2 - 10.4 kHz) */
- kSS_MF_256 = (2 << 20), /*!< Nss = 256 (fm ? 7.8 - 15.6 kHz) */
- kSS_MF_128 = (3 << 20), /*!< Nss = 128 (fm ? 15.6 - 31.3 kHz) */
- kSS_MF_64 = (4 << 20), /*!< Nss = 64 (fm ? 32.3 - 64.5 kHz) */
- kSS_MF_32 = (5 << 20), /*!< Nss = 32 (fm ? 62.5- 125 kHz) */
- kSS_MF_24 = (6 << 20), /*!< Nss ?= 24 (fm ? 83.3- 166.6 kHz) */
- kSS_MF_16 = (7 << 20) /*!< Nss = 16 (fm ? 125- 250 kHz) */
-} ss_progmodfm_t;
-
-/*! @brief PLL Spread Spectrum (SS) Programmable frequency modulation depth
- * See (MR) field in the PLL0SSCG1 register in the UM.
- */
-typedef enum _ss_progmoddp
-{
- kSS_MR_K0 = (0 << 23), /*!< k = 0 (no spread spectrum) */
- kSS_MR_K1 = (1 << 23), /*!< k = 1 */
- kSS_MR_K1_5 = (2 << 23), /*!< k = 1.5 */
- kSS_MR_K2 = (3 << 23), /*!< k = 2 */
- kSS_MR_K3 = (4 << 23), /*!< k = 3 */
- kSS_MR_K4 = (5 << 23), /*!< k = 4 */
- kSS_MR_K6 = (6 << 23), /*!< k = 6 */
- kSS_MR_K8 = (7 << 23) /*!< k = 8 */
-} ss_progmoddp_t;
-
-/*! @brief PLL Spread Spectrum (SS) Modulation waveform control
- * See (MC) field in the PLL0SSCG1 register in the UM.<br>
- * Compensation for low pass filtering of the PLL to get a triangular
- * modulation at the output of the PLL, giving a flat frequency spectrum.
- */
-typedef enum _ss_modwvctrl
-{
- kSS_MC_NOC = (0 << 26), /*!< no compensation */
- kSS_MC_RECC = (2 << 26), /*!< recommended setting */
- kSS_MC_MAXC = (3 << 26), /*!< max. compensation */
-} ss_modwvctrl_t;
-
-/*! @brief PLL configuration structure
- *
- * This structure can be used to configure the settings for a PLL
- * setup structure. Fill in the desired configuration for the PLL
- * and call the PLL setup function to fill in a PLL setup structure.
- */
-typedef struct _pll_config
-{
- uint32_t desiredRate; /*!< Desired PLL rate in Hz */
- uint32_t inputRate; /*!< PLL input clock in Hz, only used if PLL_CONFIGFLAG_USEINRATE flag is set */
- uint32_t flags; /*!< PLL configuration flags, Or'ed value of PLL_CONFIGFLAG_* definitions */
- ss_progmodfm_t ss_mf; /*!< SS Programmable modulation frequency, only applicable when not using
- PLL_CONFIGFLAG_FORCENOFRACT flag */
- ss_progmoddp_t ss_mr; /*!< SS Programmable frequency modulation depth, only applicable when not using
- PLL_CONFIGFLAG_FORCENOFRACT flag */
- ss_modwvctrl_t
- ss_mc; /*!< SS Modulation waveform control, only applicable when not using PLL_CONFIGFLAG_FORCENOFRACT flag */
- bool mfDither; /*!< false for fixed modulation frequency or true for dithering, only applicable when not using
- PLL_CONFIGFLAG_FORCENOFRACT flag */
-
-} pll_config_t;
-
-/*! @brief PLL setup structure flags for 'flags' field
- * These flags control how the PLL setup function sets up the PLL
- */
-#define PLL_SETUPFLAG_POWERUP (1U << 0U) /*!< Setup will power on the PLL after setup */
-#define PLL_SETUPFLAG_WAITLOCK (1U << 1U) /*!< Setup will wait for PLL lock, implies the PLL will be pwoered on */
-#define PLL_SETUPFLAG_ADGVOLT (1U << 2U) /*!< Optimize system voltage for the new PLL rate */
-#define PLL_SETUPFLAG_USEFEEDBACKDIV2 (1U << 3U) /*!< Use feedback divider by 2 in divider path */
-
-/*! @brief PLL0 setup structure
- * This structure can be used to pre-build a PLL setup configuration
- * at run-time and quickly set the PLL to the configuration. It can be
- * populated with the PLL setup function. If powering up or waiting
- * for PLL lock, the PLL input clock source should be configured prior
- * to PLL setup.
- */
-typedef struct _pll_setup
-{
- uint32_t pllctrl; /*!< PLL control register PLL0CTRL */
- uint32_t pllndec; /*!< PLL NDEC register PLL0NDEC */
- uint32_t pllpdec; /*!< PLL PDEC register PLL0PDEC */
- uint32_t pllmdec; /*!< PLL MDEC registers PLL0PDEC */
- uint32_t pllsscg[2]; /*!< PLL SSCTL registers PLL0SSCG*/
- uint32_t pllRate; /*!< Acutal PLL rate */
- uint32_t flags; /*!< PLL setup flags, Or'ed value of PLL_SETUPFLAG_* definitions */
-} pll_setup_t;
-
-/*! @brief PLL status definitions
- */
-typedef enum _pll_error
-{
- kStatus_PLL_Success = MAKE_STATUS(kStatusGroup_Generic, 0), /*!< PLL operation was successful */
- kStatus_PLL_OutputTooLow = MAKE_STATUS(kStatusGroup_Generic, 1), /*!< PLL output rate request was too low */
- kStatus_PLL_OutputTooHigh = MAKE_STATUS(kStatusGroup_Generic, 2), /*!< PLL output rate request was too high */
- kStatus_PLL_InputTooLow = MAKE_STATUS(kStatusGroup_Generic, 3), /*!< PLL input rate is too low */
- kStatus_PLL_InputTooHigh = MAKE_STATUS(kStatusGroup_Generic, 4), /*!< PLL input rate is too high */
- kStatus_PLL_OutsideIntLimit = MAKE_STATUS(kStatusGroup_Generic, 5), /*!< Requested output rate isn't possible */
- kStatus_PLL_CCOTooLow = MAKE_STATUS(kStatusGroup_Generic, 6), /*!< Requested CCO rate isn't possible */
- kStatus_PLL_CCOTooHigh = MAKE_STATUS(kStatusGroup_Generic, 7) /*!< Requested CCO rate isn't possible */
-} pll_error_t;
-
-/*! @brief USB FS clock source definition. */
-typedef enum _clock_usbfs_src
-{
- kCLOCK_UsbfsSrcFro = (uint32_t)kCLOCK_FroHf, /*!< Use FRO 96 MHz. */
- kCLOCK_UsbfsSrcPll0 = (uint32_t)kCLOCK_Pll0Out, /*!< Use PLL0 output. */
- kCLOCK_UsbfsSrcMainClock = (uint32_t)kCLOCK_CoreSysClk, /*!< Use Main clock. */
- kCLOCK_UsbfsSrcPll1 = (uint32_t)kCLOCK_Pll1Out, /*!< Use PLL1 clock. */
-
- kCLOCK_UsbfsSrcNone =
- SYSCON_USB0CLKSEL_SEL(7) /*!<this may be selected in order to reduce power when no output is needed. */
-} clock_usbfs_src_t;
-
-/*! @brief USBhs clock source definition. */
-typedef enum _clock_usbhs_src
-{
- kCLOCK_UsbSrcUnused = 0xFFFFFFFFU, /*!< Used when the function does not
- care the clock source. */
-} clock_usbhs_src_t;
-
-/*! @brief Source of the USB HS PHY. */
-typedef enum _clock_usb_phy_src
-{
- kCLOCK_UsbPhySrcExt = 0U, /*!< Use external crystal. */
-} clock_usb_phy_src_t;
-
-/*! @brief Return PLL0 output clock rate from setup structure
- * @param pSetup : Pointer to a PLL setup structure
- * @return System PLL output clock rate the setup structure will generate
- */
-uint32_t CLOCK_GetPLL0OutFromSetup(pll_setup_t *pSetup);
-
-/*! @brief Set PLL0 output based on the passed PLL setup data
- * @param pControl : Pointer to populated PLL control structure to generate setup with
- * @param pSetup : Pointer to PLL setup structure to be filled
- * @return PLL_ERROR_SUCCESS on success, or PLL setup error code
- * @note Actual frequency for setup may vary from the desired frequency based on the
- * accuracy of input clocks, rounding, non-fractional PLL mode, etc.
- */
-pll_error_t CLOCK_SetupPLL0Data(pll_config_t *pControl, pll_setup_t *pSetup);
-
-/*! @brief Set PLL output from PLL setup structure (precise frequency)
- * @param pSetup : Pointer to populated PLL setup structure
- * @param flagcfg : Flag configuration for PLL config structure
- * @return PLL_ERROR_SUCCESS on success, or PLL setup error code
- * @note This function will power off the PLL, setup the PLL with the
- * new setup data, and then optionally powerup the PLL, wait for PLL lock,
- * and adjust system voltages to the new PLL rate. The function will not
- * alter any source clocks (ie, main systen clock) that may use the PLL,
- * so these should be setup prior to and after exiting the function.
- */
-pll_error_t CLOCK_SetupPLL0Prec(pll_setup_t *pSetup, uint32_t flagcfg);
-
-/**
- * @brief Set PLL output from PLL setup structure (precise frequency)
- * @param pSetup : Pointer to populated PLL setup structure
- * @return kStatus_PLL_Success on success, or PLL setup error code
- * @note This function will power off the PLL, setup the PLL with the
- * new setup data, and then optionally powerup the PLL, wait for PLL lock,
- * and adjust system voltages to the new PLL rate. The function will not
- * alter any source clocks (ie, main systen clock) that may use the PLL,
- * so these should be setup prior to and after exiting the function.
- */
-pll_error_t CLOCK_SetPLL0Freq(const pll_setup_t *pSetup);
-
-/**
- * @brief Set PLL output from PLL setup structure (precise frequency)
- * @param pSetup : Pointer to populated PLL setup structure
- * @return kStatus_PLL_Success on success, or PLL setup error code
- * @note This function will power off the PLL, setup the PLL with the
- * new setup data, and then optionally powerup the PLL, wait for PLL lock,
- * and adjust system voltages to the new PLL rate. The function will not
- * alter any source clocks (ie, main systen clock) that may use the PLL,
- * so these should be setup prior to and after exiting the function.
- */
-pll_error_t CLOCK_SetPLL1Freq(const pll_setup_t *pSetup);
-
-/*! @brief Set PLL0 output based on the multiplier and input frequency
- * @param multiply_by : multiplier
- * @param input_freq : Clock input frequency of the PLL
- * @return Nothing
- * @note Unlike the Chip_Clock_SetupSystemPLLPrec() function, this
- * function does not disable or enable PLL power, wait for PLL lock,
- * or adjust system voltages. These must be done in the application.
- * The function will not alter any source clocks (ie, main systen clock)
- * that may use the PLL, so these should be setup prior to and after
- * exiting the function.
- */
-void CLOCK_SetupPLL0Mult(uint32_t multiply_by, uint32_t input_freq);
-
-/*! @brief Disable USB clock.
- *
- * Disable USB clock.
- */
-static inline void CLOCK_DisableUsbDevicefs0Clock(clock_ip_name_t clk)
-{
- CLOCK_DisableClock(clk);
-}
-
-/*! @brief Enable USB Device FS clock.
- * @param src : clock source
- * @param freq: clock frequency
- * Enable USB Device Full Speed clock.
- */
-bool CLOCK_EnableUsbfs0DeviceClock(clock_usbfs_src_t src, uint32_t freq);
-
-/*! @brief Enable USB HOST FS clock.
- * @param src : clock source
- * @param freq: clock frequency
- * Enable USB HOST Full Speed clock.
- */
-bool CLOCK_EnableUsbfs0HostClock(clock_usbfs_src_t src, uint32_t freq);
-
-/*! @brief Enable USB phy clock.
- * Enable USB phy clock.
- */
-bool CLOCK_EnableUsbhs0PhyPllClock(clock_usb_phy_src_t src, uint32_t freq);
-
-/*! @brief Enable USB Device HS clock.
- * Enable USB Device High Speed clock.
- */
-bool CLOCK_EnableUsbhs0DeviceClock(clock_usbhs_src_t src, uint32_t freq);
-
-/*! @brief Enable USB HOST HS clock.
- * Enable USB HOST High Speed clock.
- */
-bool CLOCK_EnableUsbhs0HostClock(clock_usbhs_src_t src, uint32_t freq);
-
-#if defined(__cplusplus)
-}
-#endif /* __cplusplus */
-
-/*! @} */
-
-#endif /* _FSL_CLOCK_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_common.c b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_common.c
deleted file mode 100755
index e0233dcfc5..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_common.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 2015-2016, Freescale Semiconductor, Inc.
- * Copyright 2016-2018 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_common.h"
-#define SDK_MEM_MAGIC_NUMBER 12345U
-
-typedef struct _mem_align_control_block
-{
- uint16_t identifier; /*!< Identifier for the memory control block. */
- uint16_t offset; /*!< offset from aligned address to real address */
-} mem_align_cb_t;
-
-/* Component ID definition, used by tools. */
-#ifndef FSL_COMPONENT_ID
-#define FSL_COMPONENT_ID "platform.drivers.common"
-#endif
-
-#ifndef __GIC_PRIO_BITS
-#if defined(ENABLE_RAM_VECTOR_TABLE)
-uint32_t InstallIRQHandler(IRQn_Type irq, uint32_t irqHandler)
-{
-/* Addresses for VECTOR_TABLE and VECTOR_RAM come from the linker file */
-#if defined(__CC_ARM) || defined(__ARMCC_VERSION)
- extern uint32_t Image$$VECTOR_ROM$$Base[];
- extern uint32_t Image$$VECTOR_RAM$$Base[];
- extern uint32_t Image$$RW_m_data$$Base[];
-
-#define __VECTOR_TABLE Image$$VECTOR_ROM$$Base
-#define __VECTOR_RAM Image$$VECTOR_RAM$$Base
-#define __RAM_VECTOR_TABLE_SIZE (((uint32_t)Image$$RW_m_data$$Base - (uint32_t)Image$$VECTOR_RAM$$Base))
-#elif defined(__ICCARM__)
- extern uint32_t __RAM_VECTOR_TABLE_SIZE[];
- extern uint32_t __VECTOR_TABLE[];
- extern uint32_t __VECTOR_RAM[];
-#elif defined(__GNUC__)
- extern uint32_t __VECTOR_TABLE[];
- extern uint32_t __VECTOR_RAM[];
- extern uint32_t __RAM_VECTOR_TABLE_SIZE_BYTES[];
- uint32_t __RAM_VECTOR_TABLE_SIZE = (uint32_t)(__RAM_VECTOR_TABLE_SIZE_BYTES);
-#endif /* defined(__CC_ARM) || defined(__ARMCC_VERSION) */
- uint32_t n;
- uint32_t ret;
- uint32_t irqMaskValue;
-
- irqMaskValue = DisableGlobalIRQ();
- if (SCB->VTOR != (uint32_t)__VECTOR_RAM)
- {
- /* Copy the vector table from ROM to RAM */
- for (n = 0; n < ((uint32_t)__RAM_VECTOR_TABLE_SIZE) / sizeof(uint32_t); n++)
- {
- __VECTOR_RAM[n] = __VECTOR_TABLE[n];
- }
- /* Point the VTOR to the position of vector table */
- SCB->VTOR = (uint32_t)__VECTOR_RAM;
- }
-
- ret = __VECTOR_RAM[irq + 16];
- /* make sure the __VECTOR_RAM is noncachable */
- __VECTOR_RAM[irq + 16] = irqHandler;
-
- EnableGlobalIRQ(irqMaskValue);
-
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-
- return ret;
-}
-#endif /* ENABLE_RAM_VECTOR_TABLE. */
-#endif /* __GIC_PRIO_BITS. */
-
-#if (defined(FSL_FEATURE_SOC_SYSCON_COUNT) && (FSL_FEATURE_SOC_SYSCON_COUNT > 0))
-#if !(defined(FSL_FEATURE_SYSCON_STARTER_DISCONTINUOUS) && FSL_FEATURE_SYSCON_STARTER_DISCONTINUOUS)
-
-void EnableDeepSleepIRQ(IRQn_Type interrupt)
-{
- uint32_t intNumber = (uint32_t)interrupt;
-
- uint32_t index = 0;
-
- while (intNumber >= 32u)
- {
- index++;
- intNumber -= 32u;
- }
-
- SYSCON->STARTERSET[index] = 1u << intNumber;
- EnableIRQ(interrupt); /* also enable interrupt at NVIC */
-}
-
-void DisableDeepSleepIRQ(IRQn_Type interrupt)
-{
- uint32_t intNumber = (uint32_t)interrupt;
-
- DisableIRQ(interrupt); /* also disable interrupt at NVIC */
- uint32_t index = 0;
-
- while (intNumber >= 32u)
- {
- index++;
- intNumber -= 32u;
- }
-
- SYSCON->STARTERCLR[index] = 1u << intNumber;
-}
-#endif /* FSL_FEATURE_SYSCON_STARTER_DISCONTINUOUS */
-#endif /* FSL_FEATURE_SOC_SYSCON_COUNT */
-
-void *SDK_Malloc(size_t size, size_t alignbytes)
-{
- mem_align_cb_t *p_cb = NULL;
- uint32_t alignedsize = SDK_SIZEALIGN(size, alignbytes) + alignbytes + sizeof(mem_align_cb_t);
- void *p_align_addr, *p_addr = malloc(alignedsize);
-
- if (!p_addr)
- {
- return NULL;
- }
-
- p_align_addr = (void *)SDK_SIZEALIGN((uint32_t)p_addr + sizeof(mem_align_cb_t), alignbytes);
-
- p_cb = (mem_align_cb_t *)((uint32_t)p_align_addr - 4U);
- p_cb->identifier = SDK_MEM_MAGIC_NUMBER;
- p_cb->offset = (uint32_t)p_align_addr - (uint32_t)p_addr;
-
- return (void *)p_align_addr;
-}
-
-void SDK_Free(void *ptr)
-{
- mem_align_cb_t *p_cb = (mem_align_cb_t *)((uint32_t)ptr - 4U);
-
- if (p_cb->identifier != SDK_MEM_MAGIC_NUMBER)
- {
- return;
- }
-
- free((void *)((uint32_t)ptr - p_cb->offset));
-}
-
-/*!
- * @brief Delay function bases on while loop, every loop includes three instructions.
- *
- * @param count Counts of loop needed for dalay.
- */
-#ifndef __XCC__
-#if defined(__CC_ARM) /* This macro is arm v5 specific */
-/* clang-format off */
-__ASM static void DelayLoop(uint32_t count)
-{
-loop
- SUBS R0, R0, #1
- CMP R0, #0
- BNE loop
- BX LR
-}
-/* clang-format on */
-#elif defined(__ARMCC_VERSION) || defined(__ICCARM__) || defined(__GNUC__)
-/* Cortex-M0 has a smaller instruction set, SUBS isn't supported in thumb-16 mode reported from __GNUC__ compiler,
- * use SUB and CMP here for compatibility */
-static void DelayLoop(uint32_t count)
-{
- __ASM volatile(" MOV R0, %0" : : "r"(count));
- __ASM volatile(
- "loop: \n"
-#if defined(__GNUC__)
- " SUB R0, R0, #1 \n"
-#else
- " SUBS R0, R0, #1 \n"
-#endif
- " CMP R0, #0 \n"
-
- " BNE loop \n");
-}
-#endif /* defined(__CC_ARM) */
-
-/*!
- * @brief Delay at least for some time.
- * Please note that, this API uses while loop for delay, different run-time environments make the time not precise,
- * if precise delay count was needed, please implement a new delay function with hardware timer.
- *
- * @param delay_us Delay time in unit of microsecond.
- * @param coreClock_Hz Core clock frequency with Hz.
- */
-void SDK_DelayAtLeastUs(uint32_t delay_us, uint32_t coreClock_Hz)
-{
- assert(0U != delay_us);
- uint64_t count = USEC_TO_COUNT(delay_us, coreClock_Hz);
- assert(count <= UINT32_MAX);
-
- /* Divide value may be different in various environment to ensure delay is precise.
- * Every loop count includes three instructions, due to Cortex-M7 sometimes executes
- * two instructions in one period, through test here set divide 2. Other M cores use
- * divide 4. By the way, divide 2 or 4 could let odd count lost precision, but it does
- * not matter because other instructions outside while loop is enough to fill the time.
- */
-#if (__CORTEX_M == 7)
- count = count / 2;
-#else
- count = count / 4;
-#endif
- DelayLoop(count);
-}
-#endif
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_common.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_common.h
deleted file mode 100755
index a24fe1c2dc..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_common.h
+++ /dev/null
@@ -1,630 +0,0 @@
-/*
- * Copyright (c) 2015-2016, Freescale Semiconductor, Inc.
- * Copyright 2016-2018 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef _FSL_COMMON_H_
-#define _FSL_COMMON_H_
-
-#include <assert.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <string.h>
-#include <stdlib.h>
-
-#if defined(__ICCARM__)
-#include <stddef.h>
-#endif
-
-#include "fsl_device_registers.h"
-
-/*!
- * @addtogroup ksdk_common
- * @{
- */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*! @brief Construct a status code value from a group and code number. */
-#define MAKE_STATUS(group, code) ((((group)*100) + (code)))
-
-/*! @brief Construct the version number for drivers. */
-#define MAKE_VERSION(major, minor, bugfix) (((major) << 16) | ((minor) << 8) | (bugfix))
-
-/*! @name Driver version */
-/*@{*/
-/*! @brief common driver version 2.2.0. */
-#define FSL_COMMON_DRIVER_VERSION (MAKE_VERSION(2, 2, 0))
-/*@}*/
-
-/* Debug console type definition. */
-#define DEBUG_CONSOLE_DEVICE_TYPE_NONE 0U /*!< No debug console. */
-#define DEBUG_CONSOLE_DEVICE_TYPE_UART 1U /*!< Debug console based on UART. */
-#define DEBUG_CONSOLE_DEVICE_TYPE_LPUART 2U /*!< Debug console based on LPUART. */
-#define DEBUG_CONSOLE_DEVICE_TYPE_LPSCI 3U /*!< Debug console based on LPSCI. */
-#define DEBUG_CONSOLE_DEVICE_TYPE_USBCDC 4U /*!< Debug console based on USBCDC. */
-#define DEBUG_CONSOLE_DEVICE_TYPE_FLEXCOMM 5U /*!< Debug console based on FLEXCOMM. */
-#define DEBUG_CONSOLE_DEVICE_TYPE_IUART 6U /*!< Debug console based on i.MX UART. */
-#define DEBUG_CONSOLE_DEVICE_TYPE_VUSART 7U /*!< Debug console based on LPC_VUSART. */
-#define DEBUG_CONSOLE_DEVICE_TYPE_MINI_USART 8U /*!< Debug console based on LPC_USART. */
-#define DEBUG_CONSOLE_DEVICE_TYPE_SWO 9U /*!< Debug console based on SWO. */
-
-/*! @brief Status group numbers. */
-enum _status_groups
-{
- kStatusGroup_Generic = 0, /*!< Group number for generic status codes. */
- kStatusGroup_FLASH = 1, /*!< Group number for FLASH status codes. */
- kStatusGroup_LPSPI = 4, /*!< Group number for LPSPI status codes. */
- kStatusGroup_FLEXIO_SPI = 5, /*!< Group number for FLEXIO SPI status codes. */
- kStatusGroup_DSPI = 6, /*!< Group number for DSPI status codes. */
- kStatusGroup_FLEXIO_UART = 7, /*!< Group number for FLEXIO UART status codes. */
- kStatusGroup_FLEXIO_I2C = 8, /*!< Group number for FLEXIO I2C status codes. */
- kStatusGroup_LPI2C = 9, /*!< Group number for LPI2C status codes. */
- kStatusGroup_UART = 10, /*!< Group number for UART status codes. */
- kStatusGroup_I2C = 11, /*!< Group number for UART status codes. */
- kStatusGroup_LPSCI = 12, /*!< Group number for LPSCI status codes. */
- kStatusGroup_LPUART = 13, /*!< Group number for LPUART status codes. */
- kStatusGroup_SPI = 14, /*!< Group number for SPI status code.*/
- kStatusGroup_XRDC = 15, /*!< Group number for XRDC status code.*/
- kStatusGroup_SEMA42 = 16, /*!< Group number for SEMA42 status code.*/
- kStatusGroup_SDHC = 17, /*!< Group number for SDHC status code */
- kStatusGroup_SDMMC = 18, /*!< Group number for SDMMC status code */
- kStatusGroup_SAI = 19, /*!< Group number for SAI status code */
- kStatusGroup_MCG = 20, /*!< Group number for MCG status codes. */
- kStatusGroup_SCG = 21, /*!< Group number for SCG status codes. */
- kStatusGroup_SDSPI = 22, /*!< Group number for SDSPI status codes. */
- kStatusGroup_FLEXIO_I2S = 23, /*!< Group number for FLEXIO I2S status codes */
- kStatusGroup_FLEXIO_MCULCD = 24, /*!< Group number for FLEXIO LCD status codes */
- kStatusGroup_FLASHIAP = 25, /*!< Group number for FLASHIAP status codes */
- kStatusGroup_FLEXCOMM_I2C = 26, /*!< Group number for FLEXCOMM I2C status codes */
- kStatusGroup_I2S = 27, /*!< Group number for I2S status codes */
- kStatusGroup_IUART = 28, /*!< Group number for IUART status codes */
- kStatusGroup_CSI = 29, /*!< Group number for CSI status codes */
- kStatusGroup_MIPI_DSI = 30, /*!< Group number for MIPI DSI status codes */
- kStatusGroup_SDRAMC = 35, /*!< Group number for SDRAMC status codes. */
- kStatusGroup_POWER = 39, /*!< Group number for POWER status codes. */
- kStatusGroup_ENET = 40, /*!< Group number for ENET status codes. */
- kStatusGroup_PHY = 41, /*!< Group number for PHY status codes. */
- kStatusGroup_TRGMUX = 42, /*!< Group number for TRGMUX status codes. */
- kStatusGroup_SMARTCARD = 43, /*!< Group number for SMARTCARD status codes. */
- kStatusGroup_LMEM = 44, /*!< Group number for LMEM status codes. */
- kStatusGroup_QSPI = 45, /*!< Group number for QSPI status codes. */
- kStatusGroup_DMA = 50, /*!< Group number for DMA status codes. */
- kStatusGroup_EDMA = 51, /*!< Group number for EDMA status codes. */
- kStatusGroup_DMAMGR = 52, /*!< Group number for DMAMGR status codes. */
- kStatusGroup_FLEXCAN = 53, /*!< Group number for FlexCAN status codes. */
- kStatusGroup_LTC = 54, /*!< Group number for LTC status codes. */
- kStatusGroup_FLEXIO_CAMERA = 55, /*!< Group number for FLEXIO CAMERA status codes. */
- kStatusGroup_LPC_SPI = 56, /*!< Group number for LPC_SPI status codes. */
- kStatusGroup_LPC_USART = 57, /*!< Group number for LPC_USART status codes. */
- kStatusGroup_DMIC = 58, /*!< Group number for DMIC status codes. */
- kStatusGroup_SDIF = 59, /*!< Group number for SDIF status codes.*/
- kStatusGroup_SPIFI = 60, /*!< Group number for SPIFI status codes. */
- kStatusGroup_OTP = 61, /*!< Group number for OTP status codes. */
- kStatusGroup_MCAN = 62, /*!< Group number for MCAN status codes. */
- kStatusGroup_CAAM = 63, /*!< Group number for CAAM status codes. */
- kStatusGroup_ECSPI = 64, /*!< Group number for ECSPI status codes. */
- kStatusGroup_USDHC = 65, /*!< Group number for USDHC status codes.*/
- kStatusGroup_LPC_I2C = 66, /*!< Group number for LPC_I2C status codes.*/
- kStatusGroup_DCP = 67, /*!< Group number for DCP status codes.*/
- kStatusGroup_MSCAN = 68, /*!< Group number for MSCAN status codes.*/
- kStatusGroup_ESAI = 69, /*!< Group number for ESAI status codes. */
- kStatusGroup_FLEXSPI = 70, /*!< Group number for FLEXSPI status codes. */
- kStatusGroup_MMDC = 71, /*!< Group number for MMDC status codes. */
- kStatusGroup_PDM = 72, /*!< Group number for MIC status codes. */
- kStatusGroup_SDMA = 73, /*!< Group number for SDMA status codes. */
- kStatusGroup_ICS = 74, /*!< Group number for ICS status codes. */
- kStatusGroup_SPDIF = 75, /*!< Group number for SPDIF status codes. */
- kStatusGroup_LPC_MINISPI = 76, /*!< Group number for LPC_MINISPI status codes. */
- kStatusGroup_HASHCRYPT = 77, /*!< Group number for Hashcrypt status codes */
- kStatusGroup_LPC_SPI_SSP = 78, /*!< Group number for LPC_SPI_SSP status codes. */
- kStatusGroup_I3C = 79, /*!< Group number for I3C status codes */
- kStatusGroup_LPC_I2C_1 = 97, /*!< Group number for LPC_I2C_1 status codes. */
- kStatusGroup_NOTIFIER = 98, /*!< Group number for NOTIFIER status codes. */
- kStatusGroup_DebugConsole = 99, /*!< Group number for debug console status codes. */
- kStatusGroup_SEMC = 100, /*!< Group number for SEMC status codes. */
- kStatusGroup_ApplicationRangeStart = 101, /*!< Starting number for application groups. */
- kStatusGroup_IAP = 102, /*!< Group number for IAP status codes */
-
- kStatusGroup_HAL_GPIO = 121, /*!< Group number for HAL GPIO status codes. */
- kStatusGroup_HAL_UART = 122, /*!< Group number for HAL UART status codes. */
- kStatusGroup_HAL_TIMER = 123, /*!< Group number for HAL TIMER status codes. */
- kStatusGroup_HAL_SPI = 124, /*!< Group number for HAL SPI status codes. */
- kStatusGroup_HAL_I2C = 125, /*!< Group number for HAL I2C status codes. */
- kStatusGroup_HAL_FLASH = 126, /*!< Group number for HAL FLASH status codes. */
- kStatusGroup_HAL_PWM = 127, /*!< Group number for HAL PWM status codes. */
- kStatusGroup_HAL_RNG = 128, /*!< Group number for HAL RNG status codes. */
- kStatusGroup_TIMERMANAGER = 135, /*!< Group number for TiMER MANAGER status codes. */
- kStatusGroup_SERIALMANAGER = 136, /*!< Group number for SERIAL MANAGER status codes. */
- kStatusGroup_LED = 137, /*!< Group number for LED status codes. */
- kStatusGroup_BUTTON = 138, /*!< Group number for BUTTON status codes. */
- kStatusGroup_EXTERN_EEPROM = 139, /*!< Group number for EXTERN EEPROM status codes. */
- kStatusGroup_SHELL = 140, /*!< Group number for SHELL status codes. */
- kStatusGroup_MEM_MANAGER = 141, /*!< Group number for MEM MANAGER status codes. */
- kStatusGroup_LIST = 142, /*!< Group number for List status codes. */
- kStatusGroup_OSA = 143, /*!< Group number for OSA status codes. */
- kStatusGroup_COMMON_TASK = 144, /*!< Group number for Common task status codes. */
- kStatusGroup_MSG = 145, /*!< Group number for messaging status codes. */
- kStatusGroup_SDK_OCOTP = 146, /*!< Group number for OCOTP status codes. */
- kStatusGroup_SDK_FLEXSPINOR = 147, /*!< Group number for FLEXSPINOR status codes.*/
- kStatusGroup_CODEC = 148, /*!< Group number for codec status codes. */
- kStatusGroup_ASRC = 149, /*!< Group number for codec status ASRC. */
- kStatusGroup_OTFAD = 150, /*!< Group number for codec status codes. */
-};
-
-/*! @brief Generic status return codes. */
-enum
-{
- kStatus_Success = MAKE_STATUS(kStatusGroup_Generic, 0),
- kStatus_Fail = MAKE_STATUS(kStatusGroup_Generic, 1),
- kStatus_ReadOnly = MAKE_STATUS(kStatusGroup_Generic, 2),
- kStatus_OutOfRange = MAKE_STATUS(kStatusGroup_Generic, 3),
- kStatus_InvalidArgument = MAKE_STATUS(kStatusGroup_Generic, 4),
- kStatus_Timeout = MAKE_STATUS(kStatusGroup_Generic, 5),
- kStatus_NoTransferInProgress = MAKE_STATUS(kStatusGroup_Generic, 6),
-};
-
-/*! @brief Type used for all status and error return values. */
-typedef int32_t status_t;
-
-/*
- * Macro guard for whether to use default weak IRQ implementation in drivers
- */
-#ifndef FSL_DRIVER_TRANSFER_DOUBLE_WEAK_IRQ
-#define FSL_DRIVER_TRANSFER_DOUBLE_WEAK_IRQ 1
-#endif
-
-/*! @name Min/max macros */
-/* @{ */
-#if !defined(MIN)
-#define MIN(a, b) (((a) < (b)) ? (a) : (b))
-#endif
-
-#if !defined(MAX)
-#define MAX(a, b) (((a) > (b)) ? (a) : (b))
-#endif
-/* @} */
-
-/*! @brief Computes the number of elements in an array. */
-#if !defined(ARRAY_SIZE)
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-#endif
-
-/*! @name UINT16_MAX/UINT32_MAX value */
-/* @{ */
-#if !defined(UINT16_MAX)
-#define UINT16_MAX ((uint16_t)-1)
-#endif
-
-#if !defined(UINT32_MAX)
-#define UINT32_MAX ((uint32_t)-1)
-#endif
-/* @} */
-
-/*! @name Timer utilities */
-/* @{ */
-/*! Macro to convert a microsecond period to raw count value */
-#define USEC_TO_COUNT(us, clockFreqInHz) (uint64_t)(((uint64_t)(us) * (clockFreqInHz)) / 1000000U)
-/*! Macro to convert a raw count value to microsecond */
-#define COUNT_TO_USEC(count, clockFreqInHz) (uint64_t)((uint64_t)count * 1000000U / clockFreqInHz)
-
-/*! Macro to convert a millisecond period to raw count value */
-#define MSEC_TO_COUNT(ms, clockFreqInHz) (uint64_t)((uint64_t)ms * clockFreqInHz / 1000U)
-/*! Macro to convert a raw count value to millisecond */
-#define COUNT_TO_MSEC(count, clockFreqInHz) (uint64_t)((uint64_t)count * 1000U / clockFreqInHz)
-/* @} */
-
-/*! @name Alignment variable definition macros */
-/* @{ */
-#if (defined(__ICCARM__))
-/**
- * Workaround to disable MISRA C message suppress warnings for IAR compiler.
- * http://supp.iar.com/Support/?note=24725
- */
-_Pragma("diag_suppress=Pm120")
-#define SDK_PRAGMA(x) _Pragma(#x)
- _Pragma("diag_error=Pm120")
-/*! Macro to define a variable with alignbytes alignment */
-#define SDK_ALIGN(var, alignbytes) SDK_PRAGMA(data_alignment = alignbytes) var
-/*! Macro to define a variable with L1 d-cache line size alignment */
-#if defined(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE)
-#define SDK_L1DCACHE_ALIGN(var) SDK_PRAGMA(data_alignment = FSL_FEATURE_L1DCACHE_LINESIZE_BYTE) var
-#endif
-/*! Macro to define a variable with L2 cache line size alignment */
-#if defined(FSL_FEATURE_L2CACHE_LINESIZE_BYTE)
-#define SDK_L2CACHE_ALIGN(var) SDK_PRAGMA(data_alignment = FSL_FEATURE_L2CACHE_LINESIZE_BYTE) var
-#endif
-#elif defined(__CC_ARM) || defined(__ARMCC_VERSION)
-/*! Macro to define a variable with alignbytes alignment */
-#define SDK_ALIGN(var, alignbytes) __attribute__((aligned(alignbytes))) var
-/*! Macro to define a variable with L1 d-cache line size alignment */
-#if defined(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE)
-#define SDK_L1DCACHE_ALIGN(var) __attribute__((aligned(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE))) var
-#endif
-/*! Macro to define a variable with L2 cache line size alignment */
-#if defined(FSL_FEATURE_L2CACHE_LINESIZE_BYTE)
-#define SDK_L2CACHE_ALIGN(var) __attribute__((aligned(FSL_FEATURE_L2CACHE_LINESIZE_BYTE))) var
-#endif
-#elif defined(__GNUC__)
-/*! Macro to define a variable with alignbytes alignment */
-#define SDK_ALIGN(var, alignbytes) var __attribute__((aligned(alignbytes)))
-/*! Macro to define a variable with L1 d-cache line size alignment */
-#if defined(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE)
-#define SDK_L1DCACHE_ALIGN(var) var __attribute__((aligned(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE)))
-#endif
-/*! Macro to define a variable with L2 cache line size alignment */
-#if defined(FSL_FEATURE_L2CACHE_LINESIZE_BYTE)
-#define SDK_L2CACHE_ALIGN(var) var __attribute__((aligned(FSL_FEATURE_L2CACHE_LINESIZE_BYTE)))
-#endif
-#else
-#error Toolchain not supported
-#define SDK_ALIGN(var, alignbytes) var
-#if defined(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE)
-#define SDK_L1DCACHE_ALIGN(var) var
-#endif
-#if defined(FSL_FEATURE_L2CACHE_LINESIZE_BYTE)
-#define SDK_L2CACHE_ALIGN(var) var
-#endif
-#endif
-
-/*! Macro to change a value to a given size aligned value */
-#define SDK_SIZEALIGN(var, alignbytes) \
- ((unsigned int)((var) + ((alignbytes)-1)) & (unsigned int)(~(unsigned int)((alignbytes)-1)))
-/* @} */
-
-/*! @name Non-cacheable region definition macros */
-/* For initialized non-zero non-cacheable variables, please using "AT_NONCACHEABLE_SECTION_INIT(var) ={xx};" or
- * "AT_NONCACHEABLE_SECTION_ALIGN_INIT(var) ={xx};" in your projects to define them, for zero-inited non-cacheable variables,
- * please using "AT_NONCACHEABLE_SECTION(var);" or "AT_NONCACHEABLE_SECTION_ALIGN(var);" to define them, these zero-inited variables
- * will be initialized to zero in system startup.
- */
-/* @{ */
-#if (defined(__ICCARM__))
-#if ((!(defined(FSL_FEATURE_HAS_NO_NONCACHEABLE_SECTION) && FSL_FEATURE_HAS_NO_NONCACHEABLE_SECTION)) && defined(FSL_FEATURE_L1ICACHE_LINESIZE_BYTE))
-#define AT_NONCACHEABLE_SECTION(var) var @"NonCacheable"
-#define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) SDK_PRAGMA(data_alignment = alignbytes) var @"NonCacheable"
-#define AT_NONCACHEABLE_SECTION_INIT(var) var @"NonCacheable.init"
-#define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) SDK_PRAGMA(data_alignment = alignbytes) var @"NonCacheable.init"
-#else
-#define AT_NONCACHEABLE_SECTION(var) var
-#define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) SDK_PRAGMA(data_alignment = alignbytes) var
-#define AT_NONCACHEABLE_SECTION_INIT(var) var
-#define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) SDK_PRAGMA(data_alignment = alignbytes) var
-#endif
-#elif(defined(__CC_ARM) || defined(__ARMCC_VERSION))
-#if ((!(defined(FSL_FEATURE_HAS_NO_NONCACHEABLE_SECTION) && FSL_FEATURE_HAS_NO_NONCACHEABLE_SECTION)) && defined(FSL_FEATURE_L1ICACHE_LINESIZE_BYTE))
-#define AT_NONCACHEABLE_SECTION(var) __attribute__((section("NonCacheable"), zero_init)) var
-#define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) \
- __attribute__((section("NonCacheable"), zero_init)) __attribute__((aligned(alignbytes))) var
-#define AT_NONCACHEABLE_SECTION_INIT(var) __attribute__((section("NonCacheable.init"))) var
-#define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) \
- __attribute__((section("NonCacheable.init"))) __attribute__((aligned(alignbytes))) var
-#else
-#define AT_NONCACHEABLE_SECTION(var) var
-#define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) __attribute__((aligned(alignbytes))) var
-#define AT_NONCACHEABLE_SECTION_INIT(var) var
-#define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) __attribute__((aligned(alignbytes))) var
-#endif
-#elif(defined(__XCC__))
-#define AT_NONCACHEABLE_SECTION_INIT(var) __attribute__((section("NonCacheable.init"))) var
-#define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) \
- __attribute__((section("NonCacheable.init"))) var __attribute__((aligned(alignbytes)))
-#define AT_NONCACHEABLE_SECTION(var) __attribute__((section("NonCacheable"))) var
-#define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) \
- __attribute__((section("NonCacheable"))) var __attribute__((aligned(alignbytes)))
-#elif(defined(__GNUC__))
-/* For GCC, when the non-cacheable section is required, please define "__STARTUP_INITIALIZE_NONCACHEDATA"
- * in your projects to make sure the non-cacheable section variables will be initialized in system startup.
- */
-#if ((!(defined(FSL_FEATURE_HAS_NO_NONCACHEABLE_SECTION) && FSL_FEATURE_HAS_NO_NONCACHEABLE_SECTION)) && defined(FSL_FEATURE_L1ICACHE_LINESIZE_BYTE))
-#define AT_NONCACHEABLE_SECTION_INIT(var) __attribute__((section("NonCacheable.init"))) var
-#define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) \
- __attribute__((section("NonCacheable.init"))) var __attribute__((aligned(alignbytes)))
-#define AT_NONCACHEABLE_SECTION(var) __attribute__((section("NonCacheable,\"aw\",%nobits @"))) var
-#define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) \
- __attribute__((section("NonCacheable,\"aw\",%nobits @"))) var __attribute__((aligned(alignbytes)))
-#else
-#define AT_NONCACHEABLE_SECTION(var) var
-#define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) var __attribute__((aligned(alignbytes)))
-#define AT_NONCACHEABLE_SECTION_INIT(var) var
-#define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) var __attribute__((aligned(alignbytes)))
-#endif
-#else
-#error Toolchain not supported.
-#define AT_NONCACHEABLE_SECTION(var) var
-#define AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes) var
-#define AT_NONCACHEABLE_SECTION_INIT(var) var
-#define AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes) var
-#endif
-/* @} */
-
-/*! @name Time sensitive region */
-/* @{ */
-#if defined(FSL_SDK_DRIVER_QUICK_ACCESS_ENABLE) && FSL_SDK_DRIVER_QUICK_ACCESS_ENABLE
-#if (defined(__ICCARM__))
-#define AT_QUICKACCESS_SECTION_CODE(func) func @"CodeQuickAccess"
-#define AT_QUICKACCESS_SECTION_DATA(func) func @"DataQuickAccess"
-#elif(defined(__CC_ARM) || defined(__ARMCC_VERSION))
-#define AT_QUICKACCESS_SECTION_CODE(func) __attribute__((section("CodeQuickAccess"), __noinline__)) func
-#define AT_QUICKACCESS_SECTION_DATA(func) __attribute__((section("DataQuickAccess"))) func
-#elif(defined(__GNUC__))
-#define AT_QUICKACCESS_SECTION_CODE(func) __attribute__((section("CodeQuickAccess"), __noinline__)) func
-#define AT_QUICKACCESS_SECTION_DATA(func) __attribute__((section("DataQuickAccess"))) func
-#else
-#error Toolchain not supported.
-#endif /* defined(__ICCARM__) */
-#else
-#if (defined(__ICCARM__))
-#define AT_QUICKACCESS_SECTION_CODE(func) func
-#define AT_QUICKACCESS_SECTION_DATA(func) func
-#elif(defined(__CC_ARM) || defined(__ARMCC_VERSION))
-#define AT_QUICKACCESS_SECTION_CODE(func) func
-#define AT_QUICKACCESS_SECTION_DATA(func) func
-#elif(defined(__GNUC__))
-#define AT_QUICKACCESS_SECTION_CODE(func) func
-#define AT_QUICKACCESS_SECTION_DATA(func) func
-#else
-#error Toolchain not supported.
-#endif
-#endif /* __FSL_SDK_DRIVER_QUICK_ACCESS_ENABLE */
-/* @} */
-
-/*! @name Ram Function */
-#if (defined(__ICCARM__))
-#define RAMFUNCTION_SECTION_CODE(func) func @"RamFunction"
-#elif(defined(__CC_ARM) || defined(__ARMCC_VERSION))
-#define RAMFUNCTION_SECTION_CODE(func) __attribute__((section("RamFunction"))) func
-#elif(defined(__GNUC__))
-#define RAMFUNCTION_SECTION_CODE(func) __attribute__((section("RamFunction"))) func
-#else
-#error Toolchain not supported.
-#endif /* defined(__ICCARM__) */
-/* @} */
-
-/*! @name Suppress fallthrough warning macro */
-/* For switch case code block, if case section ends without "break;" statement, there wil be
- fallthrough warning with compiler flag -Wextra or -Wimplicit-fallthrough=n when using armgcc.
- To suppress this warning, "SUPPRESS_FALL_THROUGH_WARNING();" need to be added at the end of each
- case section which misses "break;"statement.
- */
-/* @{ */
-#if (defined(__GNUC__))
-#define SUPPRESS_FALL_THROUGH_WARNING() __attribute__ ((fallthrough))
-#else
-#define SUPPRESS_FALL_THROUGH_WARNING()
-#endif /* defined(__GNUC__) */
-/* @} */
-
-/*
- * The fsl_clock.h is included here because it needs MAKE_VERSION/MAKE_STATUS/status_t
- * defined in previous of this file.
- */
-#include "fsl_clock.h"
-
-/*
- * Chip level peripheral reset API, for MCUs that implement peripheral reset control external to a peripheral
- */
-#if ((defined(FSL_FEATURE_SOC_SYSCON_COUNT) && (FSL_FEATURE_SOC_SYSCON_COUNT > 0)) || \
- (defined(FSL_FEATURE_SOC_ASYNC_SYSCON_COUNT) && (FSL_FEATURE_SOC_ASYNC_SYSCON_COUNT > 0)))
-#include "fsl_reset.h"
-#endif
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-
-#if defined(__cplusplus)
- extern "C"
-{
-#endif
-
- /*!
- * @brief Enable specific interrupt.
- *
- * Enable LEVEL1 interrupt. For some devices, there might be multiple interrupt
- * levels. For example, there are NVIC and intmux. Here the interrupts connected
- * to NVIC are the LEVEL1 interrupts, because they are routed to the core directly.
- * The interrupts connected to intmux are the LEVEL2 interrupts, they are routed
- * to NVIC first then routed to core.
- *
- * This function only enables the LEVEL1 interrupts. The number of LEVEL1 interrupts
- * is indicated by the feature macro FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS.
- *
- * @param interrupt The IRQ number.
- * @retval kStatus_Success Interrupt enabled successfully
- * @retval kStatus_Fail Failed to enable the interrupt
- */
- static inline status_t EnableIRQ(IRQn_Type interrupt)
- {
- if (NotAvail_IRQn == interrupt)
- {
- return kStatus_Fail;
- }
-
-#if defined(FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS) && (FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS > 0)
- if (interrupt >= FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS)
- {
- return kStatus_Fail;
- }
-#endif
-
-#if defined(__GIC_PRIO_BITS)
- GIC_EnableIRQ(interrupt);
-#else
- NVIC_EnableIRQ(interrupt);
-#endif
- return kStatus_Success;
- }
-
- /*!
- * @brief Disable specific interrupt.
- *
- * Disable LEVEL1 interrupt. For some devices, there might be multiple interrupt
- * levels. For example, there are NVIC and intmux. Here the interrupts connected
- * to NVIC are the LEVEL1 interrupts, because they are routed to the core directly.
- * The interrupts connected to intmux are the LEVEL2 interrupts, they are routed
- * to NVIC first then routed to core.
- *
- * This function only disables the LEVEL1 interrupts. The number of LEVEL1 interrupts
- * is indicated by the feature macro FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS.
- *
- * @param interrupt The IRQ number.
- * @retval kStatus_Success Interrupt disabled successfully
- * @retval kStatus_Fail Failed to disable the interrupt
- */
- static inline status_t DisableIRQ(IRQn_Type interrupt)
- {
- if (NotAvail_IRQn == interrupt)
- {
- return kStatus_Fail;
- }
-
-#if defined(FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS) && (FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS > 0)
- if (interrupt >= FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS)
- {
- return kStatus_Fail;
- }
-#endif
-
-#if defined(__GIC_PRIO_BITS)
- GIC_DisableIRQ(interrupt);
-#else
- NVIC_DisableIRQ(interrupt);
-#endif
- return kStatus_Success;
- }
-
- /*!
- * @brief Disable the global IRQ
- *
- * Disable the global interrupt and return the current primask register. User is required to provided the primask
- * register for the EnableGlobalIRQ().
- *
- * @return Current primask value.
- */
- static inline uint32_t DisableGlobalIRQ(void)
- {
-#if defined (__XCC__)
- return 0;
-#else
-#if defined(CPSR_I_Msk)
- uint32_t cpsr = __get_CPSR() & CPSR_I_Msk;
-
- __disable_irq();
-
- return cpsr;
-#else
- uint32_t regPrimask = __get_PRIMASK();
-
- __disable_irq();
-
- return regPrimask;
-#endif
-#endif
- }
-
- /*!
- * @brief Enable the global IRQ
- *
- * Set the primask register with the provided primask value but not just enable the primask. The idea is for the
- * convenience of integration of RTOS. some RTOS get its own management mechanism of primask. User is required to
- * use the EnableGlobalIRQ() and DisableGlobalIRQ() in pair.
- *
- * @param primask value of primask register to be restored. The primask value is supposed to be provided by the
- * DisableGlobalIRQ().
- */
- static inline void EnableGlobalIRQ(uint32_t primask)
- {
-#if defined (__XCC__)
-#else
-#if defined(CPSR_I_Msk)
- __set_CPSR((__get_CPSR() & ~CPSR_I_Msk) | primask);
-#else
- __set_PRIMASK(primask);
-#endif
-#endif
- }
-
-#if defined(ENABLE_RAM_VECTOR_TABLE)
- /*!
- * @brief install IRQ handler
- *
- * @param irq IRQ number
- * @param irqHandler IRQ handler address
- * @return The old IRQ handler address
- */
- uint32_t InstallIRQHandler(IRQn_Type irq, uint32_t irqHandler);
-#endif /* ENABLE_RAM_VECTOR_TABLE. */
-
-#if (defined(FSL_FEATURE_SOC_SYSCON_COUNT) && (FSL_FEATURE_SOC_SYSCON_COUNT > 0))
- /*!
- * @brief Enable specific interrupt for wake-up from deep-sleep mode.
- *
- * Enable the interrupt for wake-up from deep sleep mode.
- * Some interrupts are typically used in sleep mode only and will not occur during
- * deep-sleep mode because relevant clocks are stopped. However, it is possible to enable
- * those clocks (significantly increasing power consumption in the reduced power mode),
- * making these wake-ups possible.
- *
- * @note This function also enables the interrupt in the NVIC (EnableIRQ() is called internaly).
- *
- * @param interrupt The IRQ number.
- */
- void EnableDeepSleepIRQ(IRQn_Type interrupt);
-
- /*!
- * @brief Disable specific interrupt for wake-up from deep-sleep mode.
- *
- * Disable the interrupt for wake-up from deep sleep mode.
- * Some interrupts are typically used in sleep mode only and will not occur during
- * deep-sleep mode because relevant clocks are stopped. However, it is possible to enable
- * those clocks (significantly increasing power consumption in the reduced power mode),
- * making these wake-ups possible.
- *
- * @note This function also disables the interrupt in the NVIC (DisableIRQ() is called internaly).
- *
- * @param interrupt The IRQ number.
- */
- void DisableDeepSleepIRQ(IRQn_Type interrupt);
-#endif /* FSL_FEATURE_SOC_SYSCON_COUNT */
-
- /*!
- * @brief Allocate memory with given alignment and aligned size.
- *
- * This is provided to support the dynamically allocated memory
- * used in cache-able region.
- * @param size The length required to malloc.
- * @param alignbytes The alignment size.
- * @retval The allocated memory.
- */
- void *SDK_Malloc(size_t size, size_t alignbytes);
-
- /*!
- * @brief Free memory.
- *
- * @param ptr The memory to be release.
- */
- void SDK_Free(void *ptr);
-
- /*!
- * @brief Delay at least for some time.
- * Please note that, this API uses while loop for delay, different run-time environments make the time not precise,
- * if precise delay count was needed, please implement a new delay function with hardware timer.
- *
- * @param delay_us Delay time in unit of microsecond.
- * @param coreClock_Hz Core clock frequency with Hz.
- */
- void SDK_DelayAtLeastUs(uint32_t delay_us, uint32_t coreClock_Hz);
-
-#if defined(__cplusplus)
-}
-#endif
-
-/*! @} */
-
-#endif /* _FSL_COMMON_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_ctimer.c b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_ctimer.c
deleted file mode 100755
index 590ab321c6..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_ctimer.c
+++ /dev/null
@@ -1,544 +0,0 @@
-/*
- * Copyright (c) 2016, Freescale Semiconductor, Inc.
- * Copyright 2016-2018 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_ctimer.h"
-
-/* Component ID definition, used by tools. */
-#ifndef FSL_COMPONENT_ID
-#define FSL_COMPONENT_ID "platform.drivers.ctimer"
-#endif
-
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-/*!
- * @brief Gets the instance from the base address
- *
- * @param base Ctimer peripheral base address
- *
- * @return The Timer instance
- */
-static uint32_t CTIMER_GetInstance(CTIMER_Type *base);
-
-/*******************************************************************************
- * Variables
- ******************************************************************************/
-/*! @brief Pointers to Timer bases for each instance. */
-static CTIMER_Type *const s_ctimerBases[] = CTIMER_BASE_PTRS;
-
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
-/*! @brief Pointers to Timer clocks for each instance. */
-static const clock_ip_name_t s_ctimerClocks[] = CTIMER_CLOCKS;
-#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
-
-#if !(defined(FSL_FEATURE_CTIMER_HAS_NO_RESET) && (FSL_FEATURE_CTIMER_HAS_NO_RESET))
-#if !(defined(FSL_SDK_DISABLE_DRIVER_RESET_CONTROL) && FSL_SDK_DISABLE_DRIVER_RESET_CONTROL)
-#if defined(FSL_FEATURE_CTIMER_WRITE_ZERO_ASSERT_RESET) && FSL_FEATURE_CTIMER_WRITE_ZERO_ASSERT_RESET
-/*! @brief Pointers to Timer resets for each instance, writing a zero asserts the reset */
-static const reset_ip_name_t s_ctimerResets[] = CTIMER_RSTS_N;
-#else
-/*! @brief Pointers to Timer resets for each instance, writing a one asserts the reset */
-static const reset_ip_name_t s_ctimerResets[] = CTIMER_RSTS;
-#endif
-#endif
-#endif /* FSL_SDK_DISABLE_DRIVER_RESET_CONTROL */
-
-/*! @brief Pointers real ISRs installed by drivers for each instance. */
-static ctimer_callback_t *s_ctimerCallback[FSL_FEATURE_SOC_CTIMER_COUNT] = {0};
-
-/*! @brief Callback type installed by drivers for each instance. */
-static ctimer_callback_type_t ctimerCallbackType[FSL_FEATURE_SOC_CTIMER_COUNT] = {kCTIMER_SingleCallback};
-
-/*! @brief Array to map timer instance to IRQ number. */
-static const IRQn_Type s_ctimerIRQ[] = CTIMER_IRQS;
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-static uint32_t CTIMER_GetInstance(CTIMER_Type *base)
-{
- uint32_t instance;
- uint32_t ctimerArrayCount = (sizeof(s_ctimerBases) / sizeof(s_ctimerBases[0]));
-
- /* Find the instance index from base address mappings. */
- for (instance = 0; instance < ctimerArrayCount; instance++)
- {
- if (s_ctimerBases[instance] == base)
- {
- break;
- }
- }
-
- assert(instance < ctimerArrayCount);
-
- return instance;
-}
-
-/*!
- * brief Ungates the clock and configures the peripheral for basic operation.
- *
- * note This API should be called at the beginning of the application before using the driver.
- *
- * param base Ctimer peripheral base address
- * param config Pointer to the user configuration structure.
- */
-void CTIMER_Init(CTIMER_Type *base, const ctimer_config_t *config)
-{
- assert(config);
-
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
- /* Enable the timer clock*/
- CLOCK_EnableClock(s_ctimerClocks[CTIMER_GetInstance(base)]);
-#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
-
-#if !(defined(FSL_SDK_DISABLE_DRIVER_RESET_CONTROL) && FSL_SDK_DISABLE_DRIVER_RESET_CONTROL)
-/* Reset the module. */
-#if !(defined(FSL_FEATURE_CTIMER_HAS_NO_RESET) && (FSL_FEATURE_CTIMER_HAS_NO_RESET))
- RESET_PeripheralReset(s_ctimerResets[CTIMER_GetInstance(base)]);
-#endif
-#endif /* FSL_SDK_DISABLE_DRIVER_RESET_CONTROL */
-
-/* Setup the cimer mode and count select */
-#if !(defined(FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE) && (FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE))
- base->CTCR = CTIMER_CTCR_CTMODE(config->mode) | CTIMER_CTCR_CINSEL(config->input);
-#endif
- /* Setup the timer prescale value */
- base->PR = CTIMER_PR_PRVAL(config->prescale);
-}
-
-/*!
- * brief Gates the timer clock.
- *
- * param base Ctimer peripheral base address
- */
-void CTIMER_Deinit(CTIMER_Type *base)
-{
- uint32_t index = CTIMER_GetInstance(base);
- /* Stop the timer */
- base->TCR &= ~CTIMER_TCR_CEN_MASK;
-
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
- /* Disable the timer clock*/
- CLOCK_DisableClock(s_ctimerClocks[index]);
-#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
-
- /* Disable IRQ at NVIC Level */
- DisableIRQ(s_ctimerIRQ[index]);
-}
-
-/*!
- * brief Fills in the timers configuration structure with the default settings.
- *
- * The default values are:
- * code
- * config->mode = kCTIMER_TimerMode;
- * config->input = kCTIMER_Capture_0;
- * config->prescale = 0;
- * endcode
- * param config Pointer to the user configuration structure.
- */
-void CTIMER_GetDefaultConfig(ctimer_config_t *config)
-{
- assert(config);
-
- /* Initializes the configure structure to zero. */
- memset(config, 0, sizeof(*config));
-
- /* Run as a timer */
- config->mode = kCTIMER_TimerMode;
- /* This field is ignored when mode is timer */
- config->input = kCTIMER_Capture_0;
- /* Timer counter is incremented on every APB bus clock */
- config->prescale = 0;
-}
-
-/*!
- * brief Configures the PWM signal parameters.
- *
- * Enables PWM mode on the match channel passed in and will then setup the match value
- * and other match parameters to generate a PWM signal.
- * This function will assign match channel 3 to set the PWM cycle.
- *
- * note When setting PWM output from multiple output pins, all should use the same PWM
- * frequency. Please use CTIMER_SetupPwmPeriod to set up the PWM with high resolution.
- *
- * param base Ctimer peripheral base address
- * param matchChannel Match pin to be used to output the PWM signal
- * param dutyCyclePercent PWM pulse width; the value should be between 0 to 100
- * param pwmFreq_Hz PWM signal frequency in Hz
- * param srcClock_Hz Timer counter clock in Hz
- * param enableInt Enable interrupt when the timer value reaches the match value of the PWM pulse,
- * if it is 0 then no interrupt is generated
- *
- * return kStatus_Success on success
- * kStatus_Fail If matchChannel passed in is 3; this channel is reserved to set the PWM cycle
- */
-status_t CTIMER_SetupPwm(CTIMER_Type *base,
- ctimer_match_t matchChannel,
- uint8_t dutyCyclePercent,
- uint32_t pwmFreq_Hz,
- uint32_t srcClock_Hz,
- bool enableInt)
-{
- assert(pwmFreq_Hz > 0);
-
- uint32_t reg;
- uint32_t period, pulsePeriod = 0;
- uint32_t timerClock = srcClock_Hz / (base->PR + 1);
- uint32_t index = CTIMER_GetInstance(base);
-
- if (matchChannel == kCTIMER_Match_3)
- {
- return kStatus_Fail;
- }
-
- /* Enable PWM mode on the channel */
- base->PWMC |= (1U << matchChannel);
-
- /* Clear the stop, reset and interrupt bits for this channel */
- reg = base->MCR;
- reg &= ~((CTIMER_MCR_MR0R_MASK | CTIMER_MCR_MR0S_MASK | CTIMER_MCR_MR0I_MASK) << (matchChannel * 3));
-
- /* If call back function is valid then enable match interrupt for the channel */
- if (enableInt)
- {
- reg |= (CTIMER_MCR_MR0I_MASK << (CTIMER_MCR_MR0I_SHIFT + (matchChannel * 3)));
- }
-
- /* Reset the counter when match on channel 3 */
- reg |= CTIMER_MCR_MR3R_MASK;
-
- base->MCR = reg;
-
- /* Calculate PWM period match value */
- period = (timerClock / pwmFreq_Hz) - 1;
-
- /* Calculate pulse width match value */
- if (dutyCyclePercent == 0)
- {
- pulsePeriod = period + 1;
- }
- else
- {
- pulsePeriod = (period * (100 - dutyCyclePercent)) / 100;
- }
-
- /* Match on channel 3 will define the PWM period */
- base->MR[kCTIMER_Match_3] = period;
-
- /* This will define the PWM pulse period */
- base->MR[matchChannel] = pulsePeriod;
- /* Clear status flags */
- CTIMER_ClearStatusFlags(base, CTIMER_IR_MR0INT_MASK << matchChannel);
- /* If call back function is valid then enable interrupt and update the call back function */
- if (enableInt)
- {
- EnableIRQ(s_ctimerIRQ[index]);
- }
-
- return kStatus_Success;
-}
-
-/*!
- * brief Configures the PWM signal parameters.
- *
- * Enables PWM mode on the match channel passed in and will then setup the match value
- * and other match parameters to generate a PWM signal.
- * This function will assign match channel 3 to set the PWM cycle.
- *
- * note When setting PWM output from multiple output pins, all should use the same PWM
- * period
- *
- * param base Ctimer peripheral base address
- * param matchChannel Match pin to be used to output the PWM signal
- * param pwmPeriod PWM period match value
- * param pulsePeriod Pulse width match value
- * param enableInt Enable interrupt when the timer value reaches the match value of the PWM pulse,
- * if it is 0 then no interrupt is generated
- *
- * return kStatus_Success on success
- * kStatus_Fail If matchChannel passed in is 3; this channel is reserved to set the PWM period
- */
-status_t CTIMER_SetupPwmPeriod(
- CTIMER_Type *base, ctimer_match_t matchChannel, uint32_t pwmPeriod, uint32_t pulsePeriod, bool enableInt)
-{
-/* Some CTimers only have 16bits , so the value is limited*/
-#if defined(FSL_FEATURE_SOC_CTIMER16B) && FSL_FEATURE_SOC_CTIMER16B
- assert(!((FSL_FEATURE_CTIMER_BIT_SIZEn(base) < 32) && (pulsePeriod > 0xFFFFU)));
-#endif
-
- uint32_t reg;
- uint32_t index = CTIMER_GetInstance(base);
-
- if (matchChannel == kCTIMER_Match_3)
- {
- return kStatus_Fail;
- }
-
- /* Enable PWM mode on the channel */
- base->PWMC |= (1U << matchChannel);
-
- /* Clear the stop, reset and interrupt bits for this channel */
- reg = base->MCR;
- reg &= ~((CTIMER_MCR_MR0R_MASK | CTIMER_MCR_MR0S_MASK | CTIMER_MCR_MR0I_MASK) << (matchChannel * 3));
-
- /* If call back function is valid then enable match interrupt for the channel */
- if (enableInt)
- {
- reg |= (CTIMER_MCR_MR0I_MASK << (CTIMER_MCR_MR0I_SHIFT + (matchChannel * 3)));
- }
-
- /* Reset the counter when match on channel 3 */
- reg |= CTIMER_MCR_MR3R_MASK;
-
- base->MCR = reg;
-
- /* Match on channel 3 will define the PWM period */
- base->MR[kCTIMER_Match_3] = pwmPeriod;
-
- /* This will define the PWM pulse period */
- base->MR[matchChannel] = pulsePeriod;
- /* Clear status flags */
- CTIMER_ClearStatusFlags(base, CTIMER_IR_MR0INT_MASK << matchChannel);
- /* If call back function is valid then enable interrupt and update the call back function */
- if (enableInt)
- {
- EnableIRQ(s_ctimerIRQ[index]);
- }
-
- return kStatus_Success;
-}
-
-/*!
- * brief Updates the duty cycle of an active PWM signal.
- *
- * note Please use CTIMER_UpdatePwmPulsePeriod to update the PWM with high resolution.
- *
- * param base Ctimer peripheral base address
- * param matchChannel Match pin to be used to output the PWM signal
- * param dutyCyclePercent New PWM pulse width; the value should be between 0 to 100
- */
-void CTIMER_UpdatePwmDutycycle(CTIMER_Type *base, ctimer_match_t matchChannel, uint8_t dutyCyclePercent)
-{
- uint32_t pulsePeriod = 0, period;
-
- /* Match channel 3 defines the PWM period */
- period = base->MR[kCTIMER_Match_3];
-
- /* Calculate pulse width match value */
- pulsePeriod = (period * dutyCyclePercent) / 100;
-
- /* For 0% dutycyle, make pulse period greater than period so the event will never occur */
- if (dutyCyclePercent == 0)
- {
- pulsePeriod = period + 1;
- }
- else
- {
- pulsePeriod = (period * (100 - dutyCyclePercent)) / 100;
- }
-
- /* Update dutycycle */
- base->MR[matchChannel] = pulsePeriod;
-}
-
-/*!
- * brief Setup the match register.
- *
- * User configuration is used to setup the match value and action to be taken when a match occurs.
- *
- * param base Ctimer peripheral base address
- * param matchChannel Match register to configure
- * param config Pointer to the match configuration structure
- */
-void CTIMER_SetupMatch(CTIMER_Type *base, ctimer_match_t matchChannel, const ctimer_match_config_t *config)
-{
-/* Some CTimers only have 16bits , so the value is limited*/
-#if defined(FSL_FEATURE_SOC_CTIMER16B) && FSL_FEATURE_SOC_CTIMER16B
- assert(!(FSL_FEATURE_CTIMER_BIT_SIZEn(base) < 32 && config->matchValue > 0xFFFFU));
-#endif
- uint32_t reg;
- uint32_t index = CTIMER_GetInstance(base);
-
- /* Set the counter operation when a match on this channel occurs */
- reg = base->MCR;
- reg &= ~((CTIMER_MCR_MR0R_MASK | CTIMER_MCR_MR0S_MASK | CTIMER_MCR_MR0I_MASK) << (matchChannel * 3));
- reg |= (uint32_t)((uint32_t)(config->enableCounterReset) << (CTIMER_MCR_MR0R_SHIFT + (matchChannel * 3)));
- reg |= (uint32_t)((uint32_t)(config->enableCounterStop) << (CTIMER_MCR_MR0S_SHIFT + (matchChannel * 3)));
- reg |= (uint32_t)((uint32_t)(config->enableInterrupt) << (CTIMER_MCR_MR0I_SHIFT + (matchChannel * 3)));
- base->MCR = reg;
-
- reg = base->EMR;
- /* Set the match output operation when a match on this channel occurs */
- reg &= ~(CTIMER_EMR_EMC0_MASK << (matchChannel * 2));
- reg |= (uint32_t)config->outControl << (CTIMER_EMR_EMC0_SHIFT + (matchChannel * 2));
-
- /* Set the initial state of the EM bit/output */
- reg &= ~(CTIMER_EMR_EM0_MASK << matchChannel);
- reg |= (uint32_t)config->outPinInitState << matchChannel;
- base->EMR = reg;
-
- /* Set the match value */
- base->MR[matchChannel] = config->matchValue;
- /* Clear status flags */
- CTIMER_ClearStatusFlags(base, CTIMER_IR_MR0INT_MASK << matchChannel);
- /* If interrupt is enabled then enable interrupt and update the call back function */
- if (config->enableInterrupt)
- {
- EnableIRQ(s_ctimerIRQ[index]);
- }
-}
-
-#if !(defined(FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE) && (FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE))
-/*!
- * brief Setup the capture.
- *
- * param base Ctimer peripheral base address
- * param capture Capture channel to configure
- * param edge Edge on the channel that will trigger a capture
- * param enableInt Flag to enable channel interrupts, if enabled then the registered call back
- * is called upon capture
- */
-void CTIMER_SetupCapture(CTIMER_Type *base,
- ctimer_capture_channel_t capture,
- ctimer_capture_edge_t edge,
- bool enableInt)
-{
- uint32_t reg = base->CCR;
- uint32_t index = CTIMER_GetInstance(base);
-
- /* Set the capture edge */
- reg &= ~((CTIMER_CCR_CAP0RE_MASK | CTIMER_CCR_CAP0FE_MASK | CTIMER_CCR_CAP0I_MASK) << (capture * 3));
- reg |= (uint32_t)edge << (CTIMER_CCR_CAP0RE_SHIFT + (capture * 3));
- /* Clear status flags */
- CTIMER_ClearStatusFlags(base, (kCTIMER_Capture0Flag << capture));
- /* If call back function is valid then enable capture interrupt for the channel and update the call back function */
- if (enableInt)
- {
- reg |= CTIMER_CCR_CAP0I_MASK << (capture * 3);
- EnableIRQ(s_ctimerIRQ[index]);
- }
- base->CCR = reg;
-}
-#endif
-
-/*!
- * brief Register callback.
- *
- * param base Ctimer peripheral base address
- * param cb_func callback function
- * param cb_type callback function type, singular or multiple
- */
-void CTIMER_RegisterCallBack(CTIMER_Type *base, ctimer_callback_t *cb_func, ctimer_callback_type_t cb_type)
-{
- uint32_t index = CTIMER_GetInstance(base);
- s_ctimerCallback[index] = cb_func;
- ctimerCallbackType[index] = cb_type;
-}
-
-void CTIMER_GenericIRQHandler(uint32_t index)
-{
- uint32_t int_stat, i, mask;
- /* Get Interrupt status flags */
- int_stat = CTIMER_GetStatusFlags(s_ctimerBases[index]);
- /* Clear the status flags that were set */
- CTIMER_ClearStatusFlags(s_ctimerBases[index], int_stat);
- if (ctimerCallbackType[index] == kCTIMER_SingleCallback)
- {
- if (s_ctimerCallback[index][0])
- {
- s_ctimerCallback[index][0](int_stat);
- }
- }
- else
- {
-#if defined(FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE) && FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE
- for (i = 0; i <= CTIMER_IR_MR3INT_SHIFT; i++)
-#else
-#if defined(FSL_FEATURE_CTIMER_HAS_IR_CR3INT) && FSL_FEATURE_CTIMER_HAS_IR_CR3INT
- for (i = 0; i <= CTIMER_IR_CR3INT_SHIFT; i++)
-#else
- for (i = 0; i <= CTIMER_IR_CR2INT_SHIFT; i++)
-#endif /* FSL_FEATURE_CTIMER_HAS_IR_CR3INT */
-#endif
- {
- mask = 0x01 << i;
- /* For each status flag bit that was set call the callback function if it is valid */
- if ((int_stat & mask) && (s_ctimerCallback[index][i]))
- {
- s_ctimerCallback[index][i](int_stat);
- }
- }
- }
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-
-/* IRQ handler functions overloading weak symbols in the startup */
-#if defined(CTIMER0)
-void CTIMER0_DriverIRQHandler(void)
-{
- CTIMER_GenericIRQHandler(0);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(CTIMER1)
-void CTIMER1_DriverIRQHandler(void)
-{
- CTIMER_GenericIRQHandler(1);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(CTIMER2)
-void CTIMER2_DriverIRQHandler(void)
-{
- CTIMER_GenericIRQHandler(2);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(CTIMER3)
-void CTIMER3_DriverIRQHandler(void)
-{
- CTIMER_GenericIRQHandler(3);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(CTIMER4)
-void CTIMER4_DriverIRQHandler(void)
-{
- CTIMER_GenericIRQHandler(4);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_ctimer.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_ctimer.h
deleted file mode 100755
index 8ae0d886a7..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_ctimer.h
+++ /dev/null
@@ -1,488 +0,0 @@
-/*
- * Copyright (c) 2016, Freescale Semiconductor, Inc.
- * Copyright 2016-2018 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-#ifndef _FSL_CTIMER_H_
-#define _FSL_CTIMER_H_
-
-#include "fsl_common.h"
-
-/*!
- * @addtogroup ctimer
- * @{
- */
-
-/*! @file */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*! @name Driver version */
-/*@{*/
-#define FSL_CTIMER_DRIVER_VERSION (MAKE_VERSION(2, 0, 2)) /*!< Version 2.0.2 */
-/*@}*/
-
-/*! @brief List of Timer capture channels */
-typedef enum _ctimer_capture_channel
-{
- kCTIMER_Capture_0 = 0U, /*!< Timer capture channel 0 */
- kCTIMER_Capture_1, /*!< Timer capture channel 1 */
- kCTIMER_Capture_2, /*!< Timer capture channel 2 */
-#if defined(FSL_FEATURE_CTIMER_HAS_CCR_CAP3) && FSL_FEATURE_CTIMER_HAS_CCR_CAP3
- kCTIMER_Capture_3 /*!< Timer capture channel 3 */
-#endif /* FSL_FEATURE_CTIMER_HAS_IR_CR3INT */
-} ctimer_capture_channel_t;
-
-/*! @brief List of capture edge options */
-typedef enum _ctimer_capture_edge
-{
- kCTIMER_Capture_RiseEdge = 1U, /*!< Capture on rising edge */
- kCTIMER_Capture_FallEdge = 2U, /*!< Capture on falling edge */
- kCTIMER_Capture_BothEdge = 3U, /*!< Capture on rising and falling edge */
-} ctimer_capture_edge_t;
-
-/*! @brief List of Timer match registers */
-typedef enum _ctimer_match
-{
- kCTIMER_Match_0 = 0U, /*!< Timer match register 0 */
- kCTIMER_Match_1, /*!< Timer match register 1 */
- kCTIMER_Match_2, /*!< Timer match register 2 */
- kCTIMER_Match_3 /*!< Timer match register 3 */
-} ctimer_match_t;
-
-/*! @brief List of output control options */
-typedef enum _ctimer_match_output_control
-{
- kCTIMER_Output_NoAction = 0U, /*!< No action is taken */
- kCTIMER_Output_Clear, /*!< Clear the EM bit/output to 0 */
- kCTIMER_Output_Set, /*!< Set the EM bit/output to 1 */
- kCTIMER_Output_Toggle /*!< Toggle the EM bit/output */
-} ctimer_match_output_control_t;
-
-/*! @brief List of Timer modes */
-typedef enum _ctimer_timer_mode
-{
- kCTIMER_TimerMode = 0U, /* TC is incremented every rising APB bus clock edge */
- kCTIMER_IncreaseOnRiseEdge, /* TC is incremented on rising edge of input signal */
- kCTIMER_IncreaseOnFallEdge, /* TC is incremented on falling edge of input signal */
- kCTIMER_IncreaseOnBothEdge /* TC is incremented on both edges of input signal */
-} ctimer_timer_mode_t;
-
-/*! @brief List of Timer interrupts */
-typedef enum _ctimer_interrupt_enable
-{
- kCTIMER_Match0InterruptEnable = CTIMER_MCR_MR0I_MASK, /*!< Match 0 interrupt */
- kCTIMER_Match1InterruptEnable = CTIMER_MCR_MR1I_MASK, /*!< Match 1 interrupt */
- kCTIMER_Match2InterruptEnable = CTIMER_MCR_MR2I_MASK, /*!< Match 2 interrupt */
- kCTIMER_Match3InterruptEnable = CTIMER_MCR_MR3I_MASK, /*!< Match 3 interrupt */
-#if !(defined(FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE) && (FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE))
- kCTIMER_Capture0InterruptEnable = CTIMER_CCR_CAP0I_MASK, /*!< Capture 0 interrupt */
- kCTIMER_Capture1InterruptEnable = CTIMER_CCR_CAP1I_MASK, /*!< Capture 1 interrupt */
- kCTIMER_Capture2InterruptEnable = CTIMER_CCR_CAP2I_MASK, /*!< Capture 2 interrupt */
-#if defined(FSL_FEATURE_CTIMER_HAS_CCR_CAP3) && FSL_FEATURE_CTIMER_HAS_CCR_CAP3
- kCTIMER_Capture3InterruptEnable = CTIMER_CCR_CAP3I_MASK, /*!< Capture 3 interrupt */
-#endif /* FSL_FEATURE_CTIMER_HAS_CCR_CAP3 */
-#endif
-} ctimer_interrupt_enable_t;
-
-/*! @brief List of Timer flags */
-typedef enum _ctimer_status_flags
-{
- kCTIMER_Match0Flag = CTIMER_IR_MR0INT_MASK, /*!< Match 0 interrupt flag */
- kCTIMER_Match1Flag = CTIMER_IR_MR1INT_MASK, /*!< Match 1 interrupt flag */
- kCTIMER_Match2Flag = CTIMER_IR_MR2INT_MASK, /*!< Match 2 interrupt flag */
- kCTIMER_Match3Flag = CTIMER_IR_MR3INT_MASK, /*!< Match 3 interrupt flag */
-#if !(defined(FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE) && (FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE))
- kCTIMER_Capture0Flag = CTIMER_IR_CR0INT_MASK, /*!< Capture 0 interrupt flag */
- kCTIMER_Capture1Flag = CTIMER_IR_CR1INT_MASK, /*!< Capture 1 interrupt flag */
- kCTIMER_Capture2Flag = CTIMER_IR_CR2INT_MASK, /*!< Capture 2 interrupt flag */
-#if defined(FSL_FEATURE_CTIMER_HAS_IR_CR3INT) && FSL_FEATURE_CTIMER_HAS_IR_CR3INT
- kCTIMER_Capture3Flag = CTIMER_IR_CR3INT_MASK, /*!< Capture 3 interrupt flag */
-#endif /* FSL_FEATURE_CTIMER_HAS_IR_CR3INT */
-#endif
-} ctimer_status_flags_t;
-
-typedef void (*ctimer_callback_t)(uint32_t flags);
-
-/*! @brief Callback type when registering for a callback. When registering a callback
- * an array of function pointers is passed the size could be 1 or 8, the callback
- * type will tell that.
- */
-typedef enum
-{
- kCTIMER_SingleCallback, /*!< Single Callback type where there is only one callback for the timer.
- based on the status flags different channels needs to be handled differently */
- kCTIMER_MultipleCallback /*!< Multiple Callback type where there can be 8 valid callbacks, one per channel.
- for both match/capture */
-} ctimer_callback_type_t;
-
-/*!
- * @brief Match configuration
- *
- * This structure holds the configuration settings for each match register.
- */
-typedef struct _ctimer_match_config
-{
- uint32_t matchValue; /*!< This is stored in the match register */
- bool enableCounterReset; /*!< true: Match will reset the counter
- false: Match will not reser the counter */
- bool enableCounterStop; /*!< true: Match will stop the counter
- false: Match will not stop the counter */
- ctimer_match_output_control_t outControl; /*!< Action to be taken on a match on the EM bit/output */
- bool outPinInitState; /*!< Initial value of the EM bit/output */
- bool enableInterrupt; /*!< true: Generate interrupt upon match
- false: Do not generate interrupt on match */
-
-} ctimer_match_config_t;
-
-/*!
- * @brief Timer configuration structure
- *
- * This structure holds the configuration settings for the Timer peripheral. To initialize this
- * structure to reasonable defaults, call the CTIMER_GetDefaultConfig() function and pass a
- * pointer to the configuration structure instance.
- *
- * The configuration structure can be made constant so as to reside in flash.
- */
-typedef struct _ctimer_config
-{
- ctimer_timer_mode_t mode; /*!< Timer mode */
- ctimer_capture_channel_t input; /*!< Input channel to increment the timer, used only in timer
- modes that rely on this input signal to increment TC */
- uint32_t prescale; /*!< Prescale value */
-} ctimer_config_t;
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/*!
- * @name Initialization and deinitialization
- * @{
- */
-
-/*!
- * @brief Ungates the clock and configures the peripheral for basic operation.
- *
- * @note This API should be called at the beginning of the application before using the driver.
- *
- * @param base Ctimer peripheral base address
- * @param config Pointer to the user configuration structure.
- */
-void CTIMER_Init(CTIMER_Type *base, const ctimer_config_t *config);
-
-/*!
- * @brief Gates the timer clock.
- *
- * @param base Ctimer peripheral base address
- */
-void CTIMER_Deinit(CTIMER_Type *base);
-
-/*!
- * @brief Fills in the timers configuration structure with the default settings.
- *
- * The default values are:
- * @code
- * config->mode = kCTIMER_TimerMode;
- * config->input = kCTIMER_Capture_0;
- * config->prescale = 0;
- * @endcode
- * @param config Pointer to the user configuration structure.
- */
-void CTIMER_GetDefaultConfig(ctimer_config_t *config);
-
-/*! @}*/
-
-/*!
- * @name PWM setup operations
- * @{
- */
-
-/*!
- * @brief Configures the PWM signal parameters.
- *
- * Enables PWM mode on the match channel passed in and will then setup the match value
- * and other match parameters to generate a PWM signal.
- * This function will assign match channel 3 to set the PWM cycle.
- *
- * @note When setting PWM output from multiple output pins, all should use the same PWM
- * period
- *
- * @param base Ctimer peripheral base address
- * @param matchChannel Match pin to be used to output the PWM signal
- * @param pwmPeriod PWM period match value
- * @param pulsePeriod Pulse width match value
- * @param enableInt Enable interrupt when the timer value reaches the match value of the PWM pulse,
- * if it is 0 then no interrupt is generated
- *
- * @return kStatus_Success on success
- * kStatus_Fail If matchChannel passed in is 3; this channel is reserved to set the PWM period
- */
-status_t CTIMER_SetupPwmPeriod(
- CTIMER_Type *base, ctimer_match_t matchChannel, uint32_t pwmPeriod, uint32_t pulsePeriod, bool enableInt);
-
-/*!
- * @brief Configures the PWM signal parameters.
- *
- * Enables PWM mode on the match channel passed in and will then setup the match value
- * and other match parameters to generate a PWM signal.
- * This function will assign match channel 3 to set the PWM cycle.
- *
- * @note When setting PWM output from multiple output pins, all should use the same PWM
- * frequency. Please use CTIMER_SetupPwmPeriod to set up the PWM with high resolution.
- *
- * @param base Ctimer peripheral base address
- * @param matchChannel Match pin to be used to output the PWM signal
- * @param dutyCyclePercent PWM pulse width; the value should be between 0 to 100
- * @param pwmFreq_Hz PWM signal frequency in Hz
- * @param srcClock_Hz Timer counter clock in Hz
- * @param enableInt Enable interrupt when the timer value reaches the match value of the PWM pulse,
- * if it is 0 then no interrupt is generated
- *
- * @return kStatus_Success on success
- * kStatus_Fail If matchChannel passed in is 3; this channel is reserved to set the PWM cycle
- */
-status_t CTIMER_SetupPwm(CTIMER_Type *base,
- ctimer_match_t matchChannel,
- uint8_t dutyCyclePercent,
- uint32_t pwmFreq_Hz,
- uint32_t srcClock_Hz,
- bool enableInt);
-
-/*!
- * @brief Updates the pulse period of an active PWM signal.
- *
- * @param base Ctimer peripheral base address
- * @param matchChannel Match pin to be used to output the PWM signal
- * @param pulsePeriod New PWM pulse width match value
- */
-static inline void CTIMER_UpdatePwmPulsePeriod(CTIMER_Type *base, ctimer_match_t matchChannel, uint32_t pulsePeriod)
-{
- /* Update PWM pulse period match value */
- base->MR[matchChannel] = pulsePeriod;
-}
-
-/*!
- * @brief Updates the duty cycle of an active PWM signal.
- *
- * @note Please use CTIMER_UpdatePwmPulsePeriod to update the PWM with high resolution.
- *
- * @param base Ctimer peripheral base address
- * @param matchChannel Match pin to be used to output the PWM signal
- * @param dutyCyclePercent New PWM pulse width; the value should be between 0 to 100
- */
-void CTIMER_UpdatePwmDutycycle(CTIMER_Type *base, ctimer_match_t matchChannel, uint8_t dutyCyclePercent);
-
-/*! @}*/
-
-/*!
- * @brief Setup the match register.
- *
- * User configuration is used to setup the match value and action to be taken when a match occurs.
- *
- * @param base Ctimer peripheral base address
- * @param matchChannel Match register to configure
- * @param config Pointer to the match configuration structure
- */
-void CTIMER_SetupMatch(CTIMER_Type *base, ctimer_match_t matchChannel, const ctimer_match_config_t *config);
-
-/*!
- * @brief Setup the capture.
- *
- * @param base Ctimer peripheral base address
- * @param capture Capture channel to configure
- * @param edge Edge on the channel that will trigger a capture
- * @param enableInt Flag to enable channel interrupts, if enabled then the registered call back
- * is called upon capture
- */
-void CTIMER_SetupCapture(CTIMER_Type *base,
- ctimer_capture_channel_t capture,
- ctimer_capture_edge_t edge,
- bool enableInt);
-
-/*!
- * @brief Get the timer count value from TC register.
- *
- * @param base Ctimer peripheral base address.
- * @return return the timer count value.
- */
-static inline uint32_t CTIMER_GetTimerCountValue(CTIMER_Type *base)
-{
- return (base->TC);
-}
-
-/*!
- * @brief Register callback.
- *
- * @param base Ctimer peripheral base address
- * @param cb_func callback function
- * @param cb_type callback function type, singular or multiple
- */
-void CTIMER_RegisterCallBack(CTIMER_Type *base, ctimer_callback_t *cb_func, ctimer_callback_type_t cb_type);
-
-/*!
- * @name Interrupt Interface
- * @{
- */
-
-/*!
- * @brief Enables the selected Timer interrupts.
- *
- * @param base Ctimer peripheral base address
- * @param mask The interrupts to enable. This is a logical OR of members of the
- * enumeration ::ctimer_interrupt_enable_t
- */
-static inline void CTIMER_EnableInterrupts(CTIMER_Type *base, uint32_t mask)
-{
- /* Enable match interrupts */
- base->MCR |= mask & (CTIMER_MCR_MR0I_MASK | CTIMER_MCR_MR1I_MASK | CTIMER_MCR_MR2I_MASK | CTIMER_MCR_MR3I_MASK);
-
-/* Enable capture interrupts */
-#if !(defined(FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE) && (FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE))
- base->CCR |= mask & (CTIMER_CCR_CAP0I_MASK | CTIMER_CCR_CAP1I_MASK | CTIMER_CCR_CAP2I_MASK
-#if defined(FSL_FEATURE_CTIMER_HAS_CCR_CAP3) && FSL_FEATURE_CTIMER_HAS_CCR_CAP3
- | CTIMER_CCR_CAP3I_MASK
-#endif /* FSL_FEATURE_CTIMER_HAS_CCR_CAP3 */
- );
-#endif
-}
-
-/*!
- * @brief Disables the selected Timer interrupts.
- *
- * @param base Ctimer peripheral base address
- * @param mask The interrupts to enable. This is a logical OR of members of the
- * enumeration ::ctimer_interrupt_enable_t
- */
-static inline void CTIMER_DisableInterrupts(CTIMER_Type *base, uint32_t mask)
-{
- /* Disable match interrupts */
- base->MCR &= ~(mask & (CTIMER_MCR_MR0I_MASK | CTIMER_MCR_MR1I_MASK | CTIMER_MCR_MR2I_MASK | CTIMER_MCR_MR3I_MASK));
-
-/* Disable capture interrupts */
-#if !(defined(FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE) && (FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE))
- base->CCR &= ~(mask & (CTIMER_CCR_CAP0I_MASK | CTIMER_CCR_CAP1I_MASK | CTIMER_CCR_CAP2I_MASK
-#if defined(FSL_FEATURE_CTIMER_HAS_CCR_CAP3) && FSL_FEATURE_CTIMER_HAS_CCR_CAP3
- | CTIMER_CCR_CAP3I_MASK
-#endif /* FSL_FEATURE_CTIMER_HAS_CCR_CAP3 */
- ));
-#endif
-}
-
-/*!
- * @brief Gets the enabled Timer interrupts.
- *
- * @param base Ctimer peripheral base address
- *
- * @return The enabled interrupts. This is the logical OR of members of the
- * enumeration ::ctimer_interrupt_enable_t
- */
-static inline uint32_t CTIMER_GetEnabledInterrupts(CTIMER_Type *base)
-{
- uint32_t enabledIntrs = 0;
-
- /* Get all the match interrupts enabled */
- enabledIntrs =
- base->MCR & (CTIMER_MCR_MR0I_MASK | CTIMER_MCR_MR1I_MASK | CTIMER_MCR_MR2I_MASK | CTIMER_MCR_MR3I_MASK);
-
-/* Get all the capture interrupts enabled */
-#if !(defined(FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE) && (FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE))
- enabledIntrs |= base->CCR & (CTIMER_CCR_CAP0I_MASK | CTIMER_CCR_CAP1I_MASK | CTIMER_CCR_CAP2I_MASK
-#if defined(FSL_FEATURE_CTIMER_HAS_CCR_CAP3) && FSL_FEATURE_CTIMER_HAS_CCR_CAP3
- | CTIMER_CCR_CAP3I_MASK
-#endif /* FSL_FEATURE_CTIMER_HAS_CCR_CAP3 */
- );
-#endif
-
- return enabledIntrs;
-}
-
-/*! @}*/
-
-/*!
- * @name Status Interface
- * @{
- */
-
-/*!
- * @brief Gets the Timer status flags.
- *
- * @param base Ctimer peripheral base address
- *
- * @return The status flags. This is the logical OR of members of the
- * enumeration ::ctimer_status_flags_t
- */
-static inline uint32_t CTIMER_GetStatusFlags(CTIMER_Type *base)
-{
- return base->IR;
-}
-
-/*!
- * @brief Clears the Timer status flags.
- *
- * @param base Ctimer peripheral base address
- * @param mask The status flags to clear. This is a logical OR of members of the
- * enumeration ::ctimer_status_flags_t
- */
-static inline void CTIMER_ClearStatusFlags(CTIMER_Type *base, uint32_t mask)
-{
- base->IR = mask;
-}
-
-/*! @}*/
-
-/*!
- * @name Counter Start and Stop
- * @{
- */
-
-/*!
- * @brief Starts the Timer counter.
- *
- * @param base Ctimer peripheral base address
- */
-static inline void CTIMER_StartTimer(CTIMER_Type *base)
-{
- base->TCR |= CTIMER_TCR_CEN_MASK;
-}
-
-/*!
- * @brief Stops the Timer counter.
- *
- * @param base Ctimer peripheral base address
- */
-static inline void CTIMER_StopTimer(CTIMER_Type *base)
-{
- base->TCR &= ~CTIMER_TCR_CEN_MASK;
-}
-
-/*! @}*/
-
-/*!
- * @brief Reset the counter.
- *
- * The timer counter and prescale counter are reset on the next positive edge of the APB clock.
- *
- * @param base Ctimer peripheral base address
- */
-static inline void CTIMER_Reset(CTIMER_Type *base)
-{
- base->TCR |= CTIMER_TCR_CRST_MASK;
- base->TCR &= ~CTIMER_TCR_CRST_MASK;
-}
-
-#if defined(__cplusplus)
-}
-#endif
-
-/*! @}*/
-
-#endif /* _FSL_CTIMER_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_flexcomm.c b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_flexcomm.c
deleted file mode 100755
index d51eb72f0c..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_flexcomm.c
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * Copyright (c) 2016, Freescale Semiconductor, Inc.
- * Copyright 2016-2019 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_common.h"
-#include "fsl_flexcomm.h"
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/* Component ID definition, used by tools. */
-#ifndef FSL_COMPONENT_ID
-#define FSL_COMPONENT_ID "platform.drivers.flexcomm"
-#endif
-
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-/*! @brief Set the FLEXCOMM mode . */
-static status_t FLEXCOMM_SetPeriph(FLEXCOMM_Type *base, FLEXCOMM_PERIPH_T periph, int lock);
-
-/*! @brief check whether flexcomm supports peripheral type */
-static bool FLEXCOMM_PeripheralIsPresent(FLEXCOMM_Type *base, FLEXCOMM_PERIPH_T periph);
-
-/*******************************************************************************
- * Variables
- ******************************************************************************/
-
-/*! @brief Pointers to real IRQ handlers installed by drivers for each instance. */
-static flexcomm_irq_handler_t s_flexcommIrqHandler[FSL_FEATURE_SOC_FLEXCOMM_COUNT];
-
-/*! @brief Pointers to handles for each instance to provide context to interrupt routines */
-static void *s_flexcommHandle[FSL_FEATURE_SOC_FLEXCOMM_COUNT];
-
-/*! @brief Array to map FLEXCOMM instance number to IRQ number. */
-IRQn_Type const kFlexcommIrqs[] = FLEXCOMM_IRQS;
-
-/*! @brief Array to map FLEXCOMM instance number to base address. */
-static const uint32_t s_flexcommBaseAddrs[FSL_FEATURE_SOC_FLEXCOMM_COUNT] = FLEXCOMM_BASE_ADDRS;
-
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
-/*! @brief IDs of clock for each FLEXCOMM module */
-static const clock_ip_name_t s_flexcommClocks[] = FLEXCOMM_CLOCKS;
-#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
-
-#if !(defined(FSL_FEATURE_FLEXCOMM_HAS_NO_RESET) && FSL_FEATURE_FLEXCOMM_HAS_NO_RESET)
-/*! @brief Pointers to FLEXCOMM resets for each instance. */
-static const reset_ip_name_t s_flexcommResets[] = FLEXCOMM_RSTS;
-#endif
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-/* check whether flexcomm supports peripheral type */
-static bool FLEXCOMM_PeripheralIsPresent(FLEXCOMM_Type *base, FLEXCOMM_PERIPH_T periph)
-{
- if (periph == FLEXCOMM_PERIPH_NONE)
- {
- return true;
- }
- else if (periph <= FLEXCOMM_PERIPH_I2S_TX)
- {
- return (base->PSELID & (uint32_t)(1 << ((uint32_t)periph + 3))) > (uint32_t)0 ? true : false;
- }
- else if (periph == FLEXCOMM_PERIPH_I2S_RX)
- {
- return (base->PSELID & (1 << 7)) > (uint32_t)0 ? true : false;
- }
- else
- {
- return false;
- }
-}
-
-/* Get the index corresponding to the FLEXCOMM */
-/*! brief Returns instance number for FLEXCOMM module with given base address. */
-uint32_t FLEXCOMM_GetInstance(void *base)
-{
- int i;
-
- for (i = 0; i < FSL_FEATURE_SOC_FLEXCOMM_COUNT; i++)
- {
- if ((uint32_t)base == s_flexcommBaseAddrs[i])
- {
- return i;
- }
- }
-
- assert(false);
- return 0;
-}
-
-/* Changes FLEXCOMM mode */
-static status_t FLEXCOMM_SetPeriph(FLEXCOMM_Type *base, FLEXCOMM_PERIPH_T periph, int lock)
-{
- /* Check whether peripheral type is present */
- if (!FLEXCOMM_PeripheralIsPresent(base, periph))
- {
- return kStatus_OutOfRange;
- }
-
- /* Flexcomm is locked to different peripheral type than expected */
- if ((base->PSELID & FLEXCOMM_PSELID_LOCK_MASK) && ((base->PSELID & FLEXCOMM_PSELID_PERSEL_MASK) != periph))
- {
- return kStatus_Fail;
- }
-
- /* Check if we are asked to lock */
- if (lock)
- {
- base->PSELID = (uint32_t)periph | FLEXCOMM_PSELID_LOCK_MASK;
- }
- else
- {
- base->PSELID = (uint32_t)periph;
- }
-
- return kStatus_Success;
-}
-
-/*! brief Initializes FLEXCOMM and selects peripheral mode according to the second parameter. */
-status_t FLEXCOMM_Init(void *base, FLEXCOMM_PERIPH_T periph)
-{
- int idx = FLEXCOMM_GetInstance(base);
-
- if (idx < 0)
- {
- return kStatus_InvalidArgument;
- }
-
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
- /* Enable the peripheral clock */
- CLOCK_EnableClock(s_flexcommClocks[idx]);
-#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
-
-#if !(defined(FSL_FEATURE_FLEXCOMM_HAS_NO_RESET) && FSL_FEATURE_FLEXCOMM_HAS_NO_RESET)
- /* Reset the FLEXCOMM module */
- RESET_PeripheralReset(s_flexcommResets[idx]);
-#endif
-
- /* Set the FLEXCOMM to given peripheral */
- return FLEXCOMM_SetPeriph((FLEXCOMM_Type *)base, periph, 0);
-}
-
-/*! brief Sets IRQ handler for given FLEXCOMM module. It is used by drivers register IRQ handler according to FLEXCOMM
- * mode */
-void FLEXCOMM_SetIRQHandler(void *base, flexcomm_irq_handler_t handler, void *handle)
-{
- uint32_t instance;
-
- /* Look up instance number */
- instance = FLEXCOMM_GetInstance(base);
-
- /* Clear handler first to avoid execution of the handler with wrong handle */
- s_flexcommIrqHandler[instance] = NULL;
- s_flexcommHandle[instance] = handle;
- s_flexcommIrqHandler[instance] = handler;
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-
-/* IRQ handler functions overloading weak symbols in the startup */
-#if defined(FLEXCOMM0)
-void FLEXCOMM0_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[0]);
- s_flexcommIrqHandler[0]((void *)s_flexcommBaseAddrs[0], s_flexcommHandle[0]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM1)
-void FLEXCOMM1_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[1]);
- s_flexcommIrqHandler[1]((void *)s_flexcommBaseAddrs[1], s_flexcommHandle[1]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM2)
-void FLEXCOMM2_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[2]);
- s_flexcommIrqHandler[2]((void *)s_flexcommBaseAddrs[2], s_flexcommHandle[2]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM3)
-void FLEXCOMM3_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[3]);
- s_flexcommIrqHandler[3]((void *)s_flexcommBaseAddrs[3], s_flexcommHandle[3]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM4)
-void FLEXCOMM4_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[4]);
- s_flexcommIrqHandler[4]((void *)s_flexcommBaseAddrs[4], s_flexcommHandle[4]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-
-#endif
-
-#if defined(FLEXCOMM5)
-void FLEXCOMM5_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[5]);
- s_flexcommIrqHandler[5]((void *)s_flexcommBaseAddrs[5], s_flexcommHandle[5]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM6)
-void FLEXCOMM6_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[6]);
- s_flexcommIrqHandler[6]((void *)s_flexcommBaseAddrs[6], s_flexcommHandle[6]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM7)
-void FLEXCOMM7_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[7]);
- s_flexcommIrqHandler[7]((void *)s_flexcommBaseAddrs[7], s_flexcommHandle[7]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM8)
-void FLEXCOMM8_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[8]);
- s_flexcommIrqHandler[8]((void *)s_flexcommBaseAddrs[8], s_flexcommHandle[8]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM9)
-void FLEXCOMM9_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[9]);
- s_flexcommIrqHandler[9]((void *)s_flexcommBaseAddrs[9], s_flexcommHandle[9]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM10)
-void FLEXCOMM10_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[10]);
- s_flexcommIrqHandler[10]((void *)s_flexcommBaseAddrs[10], s_flexcommHandle[10]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM11)
-void FLEXCOMM11_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[11]);
- s_flexcommIrqHandler[11]((void *)s_flexcommBaseAddrs[11], s_flexcommHandle[11]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM12)
-void FLEXCOMM12_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[12]);
- s_flexcommIrqHandler[12]((void *)s_flexcommBaseAddrs[12], s_flexcommHandle[12]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM13)
-void FLEXCOMM13_DriverIRQHandler(void)
-{
- assert(s_flexcommIrqHandler[13]);
- s_flexcommIrqHandler[13]((void *)s_flexcommBaseAddrs[13], s_flexcommHandle[13]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM14)
-void FLEXCOMM14_DriverIRQHandler(void)
-{
- uint32_t instance;
-
- /* Look up instance number */
- instance = FLEXCOMM_GetInstance(FLEXCOMM14);
- assert(s_flexcommIrqHandler[instance]);
- s_flexcommIrqHandler[instance]((void *)s_flexcommBaseAddrs[instance], s_flexcommHandle[instance]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM15)
-void FLEXCOMM15_DriverIRQHandler(void)
-{
- uint32_t instance;
-
- /* Look up instance number */
- instance = FLEXCOMM_GetInstance(FLEXCOMM15);
- assert(s_flexcommIrqHandler[instance]);
- s_flexcommIrqHandler[instance]((void *)s_flexcommBaseAddrs[instance], s_flexcommHandle[instance]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
-
-#if defined(FLEXCOMM16)
-void FLEXCOMM16_DriverIRQHandler(void)
-{
- uint32_t instance;
-
- /* Look up instance number */
- instance = FLEXCOMM_GetInstance(FLEXCOMM16);
- assert(s_flexcommIrqHandler[instance]);
- s_flexcommIrqHandler[instance]((void *)s_flexcommBaseAddrs[instance], s_flexcommHandle[instance]);
-/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
- exception return operation might vector to incorrect interrupt */
-#if defined __CORTEX_M && (__CORTEX_M == 4U)
- __DSB();
-#endif
-}
-#endif
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_flexcomm.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_flexcomm.h
deleted file mode 100755
index cf5b6ef99f..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_flexcomm.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2016, Freescale Semiconductor, Inc.
- * Copyright 2016-2019 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-#ifndef _FSL_FLEXCOMM_H_
-#define _FSL_FLEXCOMM_H_
-
-#include "fsl_common.h"
-
-/*!
- * @addtogroup flexcomm_driver
- * @{
- */
-
-/*! @name Driver version */
-/*@{*/
-/*! @brief FlexCOMM driver version 2.0.2. */
-#define FSL_FLEXCOMM_DRIVER_VERSION (MAKE_VERSION(2, 0, 2))
-/*@}*/
-
-/*! @brief FLEXCOMM peripheral modes. */
-typedef enum
-{
- FLEXCOMM_PERIPH_NONE, /*!< No peripheral */
- FLEXCOMM_PERIPH_USART, /*!< USART peripheral */
- FLEXCOMM_PERIPH_SPI, /*!< SPI Peripheral */
- FLEXCOMM_PERIPH_I2C, /*!< I2C Peripheral */
- FLEXCOMM_PERIPH_I2S_TX, /*!< I2S TX Peripheral */
- FLEXCOMM_PERIPH_I2S_RX, /*!< I2S RX Peripheral */
-} FLEXCOMM_PERIPH_T;
-
-/*! @brief Typedef for interrupt handler. */
-typedef void (*flexcomm_irq_handler_t)(void *base, void *handle);
-
-/*! @brief Array with IRQ number for each FLEXCOMM module. */
-extern IRQn_Type const kFlexcommIrqs[];
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/*! @brief Returns instance number for FLEXCOMM module with given base address. */
-uint32_t FLEXCOMM_GetInstance(void *base);
-
-/*! @brief Initializes FLEXCOMM and selects peripheral mode according to the second parameter. */
-status_t FLEXCOMM_Init(void *base, FLEXCOMM_PERIPH_T periph);
-
-/*! @brief Sets IRQ handler for given FLEXCOMM module. It is used by drivers register IRQ handler according to FLEXCOMM
- * mode */
-void FLEXCOMM_SetIRQHandler(void *base, flexcomm_irq_handler_t handler, void *handle);
-
-#if defined(__cplusplus)
-}
-#endif
-
-/*@}*/
-
-#endif /* _FSL_FLEXCOMM_H_*/
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_gpio.c b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_gpio.c
deleted file mode 100755
index 9a2d9ee0bd..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_gpio.c
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- * Copyright (c) 2016, Freescale Semiconductor, Inc.
- * Copyright 2016-2018 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_gpio.h"
-
-/* Component ID definition, used by tools. */
-#ifndef FSL_COMPONENT_ID
-#define FSL_COMPONENT_ID "platform.drivers.lpc_gpio"
-#endif
-
-/*******************************************************************************
- * Variables
- ******************************************************************************/
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
-/*! @brief Array to map FGPIO instance number to clock name. */
-static const clock_ip_name_t s_gpioClockName[] = GPIO_CLOCKS;
-#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
-
-#if !(defined(FSL_FEATURE_GPIO_HAS_NO_RESET) && FSL_FEATURE_GPIO_HAS_NO_RESET)
-/*! @brief Pointers to GPIO resets for each instance. */
-static const reset_ip_name_t s_gpioResets[] = GPIO_RSTS_N;
-#endif
-/*******************************************************************************
- * Prototypes
- ************ ******************************************************************/
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-/*!
- * brief Initializes the GPIO peripheral.
- *
- * This function ungates the GPIO clock.
- *
- * param base GPIO peripheral base pointer.
- * param port GPIO port number.
- */
-void GPIO_PortInit(GPIO_Type *base, uint32_t port)
-{
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
- assert(port < ARRAY_SIZE(s_gpioClockName));
-
- /* Upgate the GPIO clock */
- CLOCK_EnableClock(s_gpioClockName[port]);
-#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
-#if !(defined(FSL_FEATURE_GPIO_HAS_NO_RESET) && FSL_FEATURE_GPIO_HAS_NO_RESET)
- /* Reset the GPIO module */
- RESET_PeripheralReset(s_gpioResets[port]);
-#endif
-}
-
-/*!
- * brief Initializes a GPIO pin used by the board.
- *
- * To initialize the GPIO, define a pin configuration, either input or output, in the user file.
- * Then, call the GPIO_PinInit() function.
- *
- * This is an example to define an input pin or output pin configuration:
- * code
- * // Define a digital input pin configuration,
- * gpio_pin_config_t config =
- * {
- * kGPIO_DigitalInput,
- * 0,
- * }
- * //Define a digital output pin configuration,
- * gpio_pin_config_t config =
- * {
- * kGPIO_DigitalOutput,
- * 0,
- * }
- * endcode
- *
- * param base GPIO peripheral base pointer(Typically GPIO)
- * param port GPIO port number
- * param pin GPIO pin number
- * param config GPIO pin configuration pointer
- */
-void GPIO_PinInit(GPIO_Type *base, uint32_t port, uint32_t pin, const gpio_pin_config_t *config)
-{
- if (config->pinDirection == kGPIO_DigitalInput)
- {
-#if defined(FSL_FEATURE_GPIO_DIRSET_AND_DIRCLR) && (FSL_FEATURE_GPIO_DIRSET_AND_DIRCLR)
- base->DIRCLR[port] = 1U << pin;
-#else
- base->DIR[port] &= ~(1U << pin);
-#endif /*FSL_FEATURE_GPIO_DIRSET_AND_DIRCLR*/
- }
- else
- {
- /* Set default output value */
- if (config->outputLogic == 0U)
- {
- base->CLR[port] = (1U << pin);
- }
- else
- {
- base->SET[port] = (1U << pin);
- }
-/* Set pin direction */
-#if defined(FSL_FEATURE_GPIO_DIRSET_AND_DIRCLR) && (FSL_FEATURE_GPIO_DIRSET_AND_DIRCLR)
- base->DIRSET[port] = 1U << pin;
-#else
- base->DIR[port] |= 1U << pin;
-#endif /*FSL_FEATURE_GPIO_DIRSET_AND_DIRCLR*/
- }
-}
-
-#if defined(FSL_FEATURE_GPIO_HAS_INTERRUPT) && FSL_FEATURE_GPIO_HAS_INTERRUPT
-/*!
- * @brief Configures the gpio pin interrupt.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number
- * @param pin GPIO pin number.
- * @param config GPIO pin interrupt configuration..
- */
-void GPIO_SetPinInterruptConfig(GPIO_Type *base, uint32_t port, uint32_t pin, gpio_interrupt_config_t *config)
-{
- base->INTEDG[port] = base->INTEDG[port] | (config->mode << pin);
-
- base->INTPOL[port] = base->INTPOL[port] | (config->polarity << pin);
-}
-
-/*!
- * @brief Enables multiple pins interrupt.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number.
- * @param index GPIO interrupt number.
- * @param mask GPIO pin number macro.
- */
-void GPIO_PortEnableInterrupts(GPIO_Type *base, uint32_t port, uint32_t index, uint32_t mask)
-{
- if (kGPIO_InterruptA == index)
- {
- base->INTENA[port] = base->INTENA[port] | mask;
- }
- else if (kGPIO_InterruptB == index)
- {
- base->INTENB[port] = base->INTENB[port] | mask;
- }
- else
- {
- /*Should not enter here*/
- }
-}
-
-/*!
- * @brief Disables multiple pins interrupt.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number.
- * @param index GPIO interrupt number.
- * @param mask GPIO pin number macro.
- */
-void GPIO_PortDisableInterrupts(GPIO_Type *base, uint32_t port, uint32_t index, uint32_t mask)
-{
- if (kGPIO_InterruptA == index)
- {
- base->INTENA[port] = base->INTENA[port] & ~mask;
- }
- else if (kGPIO_InterruptB == index)
- {
- base->INTENB[port] = base->INTENB[port] & ~mask;
- }
- else
- {
- /*Should not enter here*/
- }
-}
-
-/*!
- * @brief Clears multiple pins interrupt flag. Status flags are cleared by
- * writing a 1 to the corresponding bit position.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number.
- * @param index GPIO interrupt number.
- * @param mask GPIO pin number macro.
- */
-void GPIO_PortClearInterruptFlags(GPIO_Type *base, uint32_t port, uint32_t index, uint32_t mask)
-{
- if (kGPIO_InterruptA == index)
- {
- base->INTSTATA[port] = mask;
- }
- else if (kGPIO_InterruptB == index)
- {
- base->INTSTATB[port] = mask;
- }
- else
- {
- /*Should not enter here*/
- }
-}
-
-/*!
- * @ Read port interrupt status.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number
- * @param index GPIO interrupt number.
- * @retval masked GPIO status value
- */
-uint32_t GPIO_PortGetInterruptStatus(GPIO_Type *base, uint32_t port, uint32_t index)
-{
- uint32_t status = 0U;
-
- if (kGPIO_InterruptA == index)
- {
- status = base->INTSTATA[port];
- }
- else if (kGPIO_InterruptB == index)
- {
- status = base->INTSTATB[port];
- }
- else
- {
- /*Should not enter here*/
- }
- return status;
-}
-
-/*!
- * @brief Enables the specific pin interrupt.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number.
- * @param pin GPIO pin number.
- * @param index GPIO interrupt number.
- */
-void GPIO_PinEnableInterrupt(GPIO_Type *base, uint32_t port, uint32_t pin, uint32_t index)
-{
- if (kGPIO_InterruptA == index)
- {
- base->INTENA[port] = base->INTENA[port] | (1U << pin);
- }
- else if (kGPIO_InterruptB == index)
- {
- base->INTENB[port] = base->INTENB[port] | (1U << pin);
- }
- else
- {
- /*Should not enter here*/
- }
-}
-
-/*!
- * @brief Disables the specific pin interrupt.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number.
- * @param pin GPIO pin number.
- * @param index GPIO interrupt number.
- */
-void GPIO_PinDisableInterrupt(GPIO_Type *base, uint32_t port, uint32_t pin, uint32_t index)
-{
- if (kGPIO_InterruptA == index)
- {
- base->INTENA[port] = base->INTENA[port] & ~(1U << pin);
- }
- else if (kGPIO_InterruptB == index)
- {
- base->INTENB[port] = base->INTENB[port] & ~(1U << pin);
- }
- else
- {
- /*Should not enter here*/
- }
-}
-
-/*!
- * @brief Clears the specific pin interrupt flag. Status flags are cleared by
- * writing a 1 to the corresponding bit position.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number.
- * @param index GPIO interrupt number.
- * @param mask GPIO pin number macro.
- */
-void GPIO_PinClearInterruptFlag(GPIO_Type *base, uint32_t port, uint32_t pin, uint32_t index)
-{
- if (kGPIO_InterruptA == index)
- {
- base->INTSTATA[port] = 1U << pin;
- }
- else if (kGPIO_InterruptB == index)
- {
- base->INTSTATB[port] = 1U << pin;
- }
- else
- {
- /*Should not enter here*/
- }
-}
-#endif /* FSL_FEATURE_GPIO_HAS_INTERRUPT */
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_gpio.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_gpio.h
deleted file mode 100755
index f1762502bc..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_gpio.h
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- * Copyright (c) 2016, Freescale Semiconductor, Inc.
- * Copyright 2016-2018 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef _LPC_GPIO_H_
-#define _LPC_GPIO_H_
-
-#include "fsl_common.h"
-
-/*!
- * @addtogroup lpc_gpio
- * @{
- */
-
-/*! @file */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*! @name Driver version */
-/*@{*/
-/*! @brief LPC GPIO driver version 2.1.3. */
-#define FSL_GPIO_DRIVER_VERSION (MAKE_VERSION(2, 1, 4))
-/*@}*/
-
-/*! @brief LPC GPIO direction definition */
-typedef enum _gpio_pin_direction
-{
- kGPIO_DigitalInput = 0U, /*!< Set current pin as digital input*/
- kGPIO_DigitalOutput = 1U, /*!< Set current pin as digital output*/
-} gpio_pin_direction_t;
-
-/*!
- * @brief The GPIO pin configuration structure.
- *
- * Every pin can only be configured as either output pin or input pin at a time.
- * If configured as a input pin, then leave the outputConfig unused.
- */
-typedef struct _gpio_pin_config
-{
- gpio_pin_direction_t pinDirection; /*!< GPIO direction, input or output */
- /* Output configurations, please ignore if configured as a input one */
- uint8_t outputLogic; /*!< Set default output logic, no use in input */
-} gpio_pin_config_t;
-
-#if (defined(FSL_FEATURE_GPIO_HAS_INTERRUPT) && FSL_FEATURE_GPIO_HAS_INTERRUPT)
-#define GPIO_PIN_INT_LEVEL 0x00U
-#define GPIO_PIN_INT_EDGE 0x01U
-
-#define PINT_PIN_INT_HIGH_OR_RISE_TRIGGER 0x00U
-#define PINT_PIN_INT_LOW_OR_FALL_TRIGGER 0x01U
-
-/*! @brief GPIO Pin Interrupt enable mode */
-typedef enum _gpio_pin_enable_mode
-{
- kGPIO_PinIntEnableLevel = GPIO_PIN_INT_LEVEL, /*!< Generate Pin Interrupt on level mode */
- kGPIO_PinIntEnableEdge = GPIO_PIN_INT_EDGE /*!< Generate Pin Interrupt on edge mode */
-} gpio_pin_enable_mode_t;
-
-/*! @brief GPIO Pin Interrupt enable polarity */
-typedef enum _gpio_pin_enable_polarity
-{
- kGPIO_PinIntEnableHighOrRise =
- PINT_PIN_INT_HIGH_OR_RISE_TRIGGER, /*!< Generate Pin Interrupt on high level or rising edge */
- kGPIO_PinIntEnableLowOrFall =
- PINT_PIN_INT_LOW_OR_FALL_TRIGGER /*!< Generate Pin Interrupt on low level or falling edge */
-} gpio_pin_enable_polarity_t;
-
-/*! @brief LPC GPIO interrupt index definition */
-typedef enum _gpio_interrupt_index
-{
- kGPIO_InterruptA = 0U, /*!< Set current pin as interrupt A*/
- kGPIO_InterruptB = 1U, /*!< Set current pin as interrupt B*/
-} gpio_interrupt_index_t;
-
-/*! @brief Configures the interrupt generation condition. */
-typedef struct _gpio_interrupt_config
-{
- uint8_t mode; /* The trigger mode of GPIO interrupts */
- uint8_t polarity; /* The polarity of GPIO interrupts */
-} gpio_interrupt_config_t;
-#endif
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/*! @name GPIO Configuration */
-/*@{*/
-
-/*!
- * @brief Initializes the GPIO peripheral.
- *
- * This function ungates the GPIO clock.
- *
- * @param base GPIO peripheral base pointer.
- * @param port GPIO port number.
- */
-void GPIO_PortInit(GPIO_Type *base, uint32_t port);
-
-/*!
- * @brief Initializes a GPIO pin used by the board.
- *
- * To initialize the GPIO, define a pin configuration, either input or output, in the user file.
- * Then, call the GPIO_PinInit() function.
- *
- * This is an example to define an input pin or output pin configuration:
- * @code
- * // Define a digital input pin configuration,
- * gpio_pin_config_t config =
- * {
- * kGPIO_DigitalInput,
- * 0,
- * }
- * //Define a digital output pin configuration,
- * gpio_pin_config_t config =
- * {
- * kGPIO_DigitalOutput,
- * 0,
- * }
- * @endcode
- *
- * @param base GPIO peripheral base pointer(Typically GPIO)
- * @param port GPIO port number
- * @param pin GPIO pin number
- * @param config GPIO pin configuration pointer
- */
-void GPIO_PinInit(GPIO_Type *base, uint32_t port, uint32_t pin, const gpio_pin_config_t *config);
-
-/*@}*/
-
-/*! @name GPIO Output Operations */
-/*@{*/
-
-/*!
- * @brief Sets the output level of the one GPIO pin to the logic 1 or 0.
- *
- * @param base GPIO peripheral base pointer(Typically GPIO)
- * @param port GPIO port number
- * @param pin GPIO pin number
- * @param output GPIO pin output logic level.
- * - 0: corresponding pin output low-logic level.
- * - 1: corresponding pin output high-logic level.
- */
-static inline void GPIO_PinWrite(GPIO_Type *base, uint32_t port, uint32_t pin, uint8_t output)
-{
- base->B[port][pin] = output;
-}
-
-/*@}*/
-/*! @name GPIO Input Operations */
-/*@{*/
-
-/*!
- * @brief Reads the current input value of the GPIO PIN.
- *
- * @param base GPIO peripheral base pointer(Typically GPIO)
- * @param port GPIO port number
- * @param pin GPIO pin number
- * @retval GPIO port input value
- * - 0: corresponding pin input low-logic level.
- * - 1: corresponding pin input high-logic level.
- */
-static inline uint32_t GPIO_PinRead(GPIO_Type *base, uint32_t port, uint32_t pin)
-{
- return (uint32_t)base->B[port][pin];
-}
-
-/*@}*/
-
-/*!
- * @brief Sets the output level of the multiple GPIO pins to the logic 1.
- *
- * @param base GPIO peripheral base pointer(Typically GPIO)
- * @param port GPIO port number
- * @param mask GPIO pin number macro
- */
-static inline void GPIO_PortSet(GPIO_Type *base, uint32_t port, uint32_t mask)
-{
- base->SET[port] = mask;
-}
-
-/*!
- * @brief Sets the output level of the multiple GPIO pins to the logic 0.
- *
- * @param base GPIO peripheral base pointer(Typically GPIO)
- * @param port GPIO port number
- * @param mask GPIO pin number macro
- */
-static inline void GPIO_PortClear(GPIO_Type *base, uint32_t port, uint32_t mask)
-{
- base->CLR[port] = mask;
-}
-
-/*!
- * @brief Reverses current output logic of the multiple GPIO pins.
- *
- * @param base GPIO peripheral base pointer(Typically GPIO)
- * @param port GPIO port number
- * @param mask GPIO pin number macro
- */
-static inline void GPIO_PortToggle(GPIO_Type *base, uint32_t port, uint32_t mask)
-{
- base->NOT[port] = mask;
-}
-
-/*@}*/
-
-/*!
- * @brief Reads the current input value of the whole GPIO port.
- *
- * @param base GPIO peripheral base pointer(Typically GPIO)
- * @param port GPIO port number
- */
-static inline uint32_t GPIO_PortRead(GPIO_Type *base, uint32_t port)
-{
- return (uint32_t)base->PIN[port];
-}
-
-/*@}*/
-/*! @name GPIO Mask Operations */
-/*@{*/
-
-/*!
- * @brief Sets port mask, 0 - enable pin, 1 - disable pin.
- *
- * @param base GPIO peripheral base pointer(Typically GPIO)
- * @param port GPIO port number
- * @param mask GPIO pin number macro
- */
-static inline void GPIO_PortMaskedSet(GPIO_Type *base, uint32_t port, uint32_t mask)
-{
- base->MASK[port] = mask;
-}
-
-/*!
- * @brief Sets the output level of the masked GPIO port. Only pins enabled by GPIO_SetPortMask() will be affected.
- *
- * @param base GPIO peripheral base pointer(Typically GPIO)
- * @param port GPIO port number
- * @param output GPIO port output value.
- */
-static inline void GPIO_PortMaskedWrite(GPIO_Type *base, uint32_t port, uint32_t output)
-{
- base->MPIN[port] = output;
-}
-
-/*!
- * @brief Reads the current input value of the masked GPIO port. Only pins enabled by GPIO_SetPortMask() will be
- * affected.
- *
- * @param base GPIO peripheral base pointer(Typically GPIO)
- * @param port GPIO port number
- * @retval masked GPIO port value
- */
-static inline uint32_t GPIO_PortMaskedRead(GPIO_Type *base, uint32_t port)
-{
- return (uint32_t)base->MPIN[port];
-}
-
-#if defined(FSL_FEATURE_GPIO_HAS_INTERRUPT) && FSL_FEATURE_GPIO_HAS_INTERRUPT
-/*!
- * @brief Configures the gpio pin interrupt.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number
- * @param pin GPIO pin number.
- * @param config GPIO pin interrupt configuration..
- */
-void GPIO_SetPinInterruptConfig(GPIO_Type *base, uint32_t port, uint32_t pin, gpio_interrupt_config_t *config);
-
-/*!
- * @brief Enables multiple pins interrupt.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number.
- * @param index GPIO interrupt number.
- * @param mask GPIO pin number macro.
- */
-void GPIO_PortEnableInterrupts(GPIO_Type *base, uint32_t port, uint32_t index, uint32_t mask);
-
-/*!
- * @brief Disables multiple pins interrupt.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number.
- * @param index GPIO interrupt number.
- * @param mask GPIO pin number macro.
- */
-void GPIO_PortDisableInterrupts(GPIO_Type *base, uint32_t port, uint32_t index, uint32_t mask);
-
-/*!
- * @brief Clears pin interrupt flag. Status flags are cleared by
- * writing a 1 to the corresponding bit position.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number.
- * @param index GPIO interrupt number.
- * @param mask GPIO pin number macro.
- */
-void GPIO_PortClearInterruptFlags(GPIO_Type *base, uint32_t port, uint32_t index, uint32_t mask);
-
-/*!
- * @ Read port interrupt status.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number
- * @param index GPIO interrupt number.
- * @retval masked GPIO status value
- */
-uint32_t GPIO_PortGetInterruptStatus(GPIO_Type *base, uint32_t port, uint32_t index);
-
-/*!
- * @brief Enables the specific pin interrupt.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number.
- * @param pin GPIO pin number.
- * @param index GPIO interrupt number.
- */
-void GPIO_PinEnableInterrupt(GPIO_Type *base, uint32_t port, uint32_t pin, uint32_t index);
-
-/*!
- * @brief Disables the specific pin interrupt.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number.
- * @param pin GPIO pin number.
- * @param index GPIO interrupt number.
- */
-void GPIO_PinDisableInterrupt(GPIO_Type *base, uint32_t port, uint32_t pin, uint32_t index);
-
-/*!
- * @brief Clears the specific pin interrupt flag. Status flags are cleared by
- * writing a 1 to the corresponding bit position.
- *
- * @param base GPIO base pointer.
- * @param port GPIO port number.
- * @param pin GPIO pin number.
- * @param index GPIO interrupt number.
- */
-void GPIO_PinClearInterruptFlag(GPIO_Type *base, uint32_t port, uint32_t pin, uint32_t index);
-
-#endif /* FSL_FEATURE_GPIO_HAS_INTERRUPT */
-
-/*@}*/
-
-#if defined(__cplusplus)
-}
-#endif
-
-/*!
- * @}
- */
-
-#endif /* _LPC_GPIO_H_*/
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_hashcrypt.c b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_hashcrypt.c
deleted file mode 100755
index b6c323c6dc..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_hashcrypt.c
+++ /dev/null
@@ -1,1316 +0,0 @@
-/*
- * Copyright 2017-2019 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_hashcrypt.h"
-
-/* Component ID definition, used by tools. */
-#ifndef FSL_COMPONENT_ID
-#define FSL_COMPONENT_ID "platform.drivers.hashcrypt"
-#endif
-
-/*******************************************************************************
- * Definitions
- *******************************************************************************/
-
-/*!< SHA-1 and SHA-256 block size */
-#define SHA_BLOCK_SIZE 64
-/*!< max number of blocks that can be proccessed in one run (master mode) */
-#define SHA_MASTER_MAX_BLOCKS 2048
-
-/*!< Use standard C library memcpy */
-#define hashcrypt_memcpy memcpy
-
-/*! Internal states of the HASH creation process */
-typedef enum _hashcrypt_sha_algo_state
-{
- kHASHCRYPT_HashInit = 1u, /*!< Init state, the NEW bit in SHA Control register has not been written yet. */
- kHASHCRYPT_HashUpdate, /*!< Update state, DIGEST registers contain running hash, NEW bit in SHA control register has
- been written. */
-} hashcrypt_sha_algo_state_t;
-
-/*! 64-byte block represented as byte array of 16 32-bit words */
-typedef union _sha_hash_block
-{
- uint32_t w[SHA_BLOCK_SIZE / 4]; /*!< array of 32-bit words */
- uint8_t b[SHA_BLOCK_SIZE]; /*!< byte array */
-} hashcrypt_sha_block_t;
-
-/*! internal sha context structure */
-typedef struct _hashcrypt_sha_ctx_internal
-{
- hashcrypt_sha_block_t blk; /*!< memory buffer. only full 64-byte blocks are written to SHA during hash updates */
- size_t blksz; /*!< number of valid bytes in memory buffer */
- hashcrypt_algo_t algo; /*!< selected algorithm from the set of supported algorithms */
- hashcrypt_sha_algo_state_t state; /*!< finite machine state of the hash software process */
- size_t fullMessageSize; /*!< track message size during SHA_Update(). The value is used for padding. */
- uint32_t remainingBlcks; /*!< number of remaining blocks to process in AHB master mode */
- hashcrypt_callback_t hashCallback; /*!< pointer to HASH callback function */
- void
- *userData; /*!< user data to be passed as an argument to callback function, once callback is invoked from isr */
-#if defined(FSL_FEATURE_HASHCRYPT_HAS_RELOAD_FEATURE) && (FSL_FEATURE_HASHCRYPT_HAS_RELOAD_FEATURE > 0)
- uint32_t runningHash[8]; /*!< running hash. up to SHA-256, that is 32 bytes. */
-#endif
-} hashcrypt_sha_ctx_internal_t;
-
-#if defined(FSL_FEATURE_HASHCRYPT_HAS_RELOAD_FEATURE) && (FSL_FEATURE_HASHCRYPT_HAS_RELOAD_FEATURE > 0)
-#define SHA1_LEN 5u
-#define SHA256_LEN 8u
-#define ALG_MODE_MASK 0xFFFFFFF8u /*!< Algorithm mode mask */
-#endif
-
-/*!< SHA-1 and SHA-256 digest length in bytes */
-enum _hashcrypt_sha_digest_len
-{
- kHASHCRYPT_OutLenSha1 = 20u,
- kHASHCRYPT_OutLenSha256 = 32u,
-};
-
-/*!< pointer to hash context structure used by isr */
-static hashcrypt_hash_ctx_t *s_ctx;
-
-/*!< macro for checking build time condition. It is used to assure the hashcrypt_sha_ctx_internal_t can fit into
- * hashcrypt_hash_ctx_t */
-#define BUILD_ASSERT(condition, msg) extern int msg[1 - 2 * (!(condition))] __attribute__((unused))
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-/*!
- * @brief Swap bytes withing 32-bit word.
- *
- * This function changes endianess of a 32-bit word.
- *
- * @param in 32-bit unsigned integer
- * @return 32-bit unsigned integer with different endianess (big endian to little endian and vice versa).
- */
-
-#define swap_bytes(in) __REV(in)
-
-/*!
- * @brief Increment a 16 byte integer.
- *
- * This function increments by one a 16 byte integer.
- *
- * @param input Pointer to a 16 byte integer to be incremented by one.
- */
-static void ctrIncrement(uint8_t *input)
-{
- int i = 15;
- while (input[i] == (uint8_t)0xFFu)
- {
- input[i] = (uint8_t)0x00u;
- i--;
- if (i < 0)
- {
- return;
- }
- }
-
- if (i >= 0)
- {
- input[i] += (uint8_t)1u;
- }
-}
-
-/*!
- * @brief Reads an unaligned word.
- *
- * This function creates a 32-bit word from an input array of four bytes.
- *
- * @param src Input array of four bytes. The array can start at any address in memory.
- * @return 32-bit unsigned int created from the input byte array.
- */
-
-/* Force lower optimization for Keil, otherwise it replaces inline LDR with LDM */
-#if defined(__CC_ARM)
-#pragma push
-#pragma O0
-#endif
-
-static inline uint32_t hashcrypt_get_word_from_unaligned(const uint8_t *srcAddr)
-{
-#if (!(defined(__CORTEX_M)) || (defined(__CORTEX_M) && (__CORTEX_M == 0)))
- register const uint8_t *src = srcAddr;
- /* Cortex M0 does not support misaligned loads */
- if (0U != ((uint32_t)src & 0x3u))
- {
- union _align_bytes_t
- {
- uint32_t word;
- uint8_t byte[sizeof(uint32_t)];
- } my_bytes;
-
- my_bytes.byte[0] = *src;
- my_bytes.byte[1] = src[1];
- my_bytes.byte[2] = src[2];
- my_bytes.byte[3] = src[3];
- return my_bytes.word;
- }
- else
- {
- /* addr aligned to 0-modulo-4 so it is safe to type cast */
- return *((const uint32_t *)(uint32_t)src);
- }
-#elif defined(__CC_ARM)
- /* -O3 optimization in Keil 5.15 and 5.16a uses LDM instruction here (LDM r4!, {r0})
- * which is wrong, because srcAddr might be unaligned.
- * LDM on unaligned address causes hard-fault. in contrary,
- * LDR supports unaligned address on Cortex M4 */
-
- register uint32_t retVal;
- __asm
- {
- LDR retVal, [srcAddr]
- }
- return retVal;
-#else
- return *((const uint32_t *)srcAddr);
-#endif
-}
-
-/* End lower optimization */
-#if defined(__CC_ARM)
-#pragma pop
-#endif
-
-static status_t hashcrypt_get_key_from_unaligned_src(uint8_t *dest, const uint8_t *src, size_t size)
-{
- status_t retVal = kStatus_InvalidArgument;
- uint32_t i;
-
- /* destination is SDK driver internal workspace and it must be aligned */
- assert(0x0 == ((uint32_t)dest & 0x1u));
- if ((uint32_t)dest & 0x1u)
- {
- return retVal;
- }
-
- for (i = 0; i < ((uint32_t)size / 4u); i++)
- {
- ((uint32_t *)dest)[i] = hashcrypt_get_word_from_unaligned(&src[i * sizeof(uint32_t)]);
- }
-
- return kStatus_Success;
-}
-
-/*!
- * @brief LDM to SHA engine INDATA and ALIAS registers.
- *
- * This function writes 16 words starting from the src address (must be word aligned)
- * to the dst address. Dst address does not increment (destination is peripheral module register INDATA).
- * Src address increments to load 16 consecutive words.
- *
- * @param dst peripheral register address (word aligned)
- * @param src address of the input 512-bit block (16 words) (word aligned)
- *
- */
-__STATIC_FORCEINLINE void hashcrypt_sha_ldm_stm_16_words(HASHCRYPT_Type *base, const uint32_t *src)
-{
- /*
- typedef struct _one_block
- {
- uint32_t a[8];
- } one_block_t;
-
- volatile one_block_t *ldst = (void *)(uintptr_t)(&base->INDATA);
- one_block_t *lsrc = (void *)(uintptr_t)src;
- *ldst = lsrc[0];
- *ldst = lsrc[1];
- */
- base->MEMADDR = HASHCRYPT_MEMADDR_BASE(src);
- base->MEMCTRL = HASHCRYPT_MEMCTRL_MASTER(1) | HASHCRYPT_MEMCTRL_COUNT(1);
-}
-
-/*!
- * @brief Loads data to Hashcrypt engine INDATA register.
- *
- * This function writes desired number of bytes starting from the src address (must be word aligned)
- * to the dst address. Dst address does not increment (destination is peripheral module register INDATA).
- * Src address increments to load consecutive words.
- *
- * @param dst peripheral register address (word aligned)
- * @param src address of the input block (word aligned)
- * @param size number of bytes to write (word aligned)
- *
- */
-__STATIC_INLINE void hashcrypt_load_data(HASHCRYPT_Type *base, const uint32_t *src, size_t size)
-{
- if (size >= sizeof(uint32_t))
- {
- base->INDATA = src[0];
- size -= sizeof(uint32_t);
- }
-
- for (uint32_t i = 0; i < size / 4; i++)
- {
- base->ALIAS[i] = src[i + 1];
- }
-}
-
-/*!
- * @brief Checks availability of HW AES key.
- *
- * This function checks if the AES key is present at dedicated hardware bus
- * and can be used at actual security level.
- *
- * @param base HASHCRYPT peripheral base address
- * @param handle Handle used for this request.
- * @return kStatus_Success if available, kStatus_Fail otherwise.
- *
- */
-static status_t hashcrypt_check_need_key(HASHCRYPT_Type *base, hashcrypt_handle_t *handle)
-{
- if (handle->keyType == kHASHCRYPT_SecretKey)
- {
- volatile uint32_t wait = 50u;
- /* wait until STATUS register is non-zero */
- while ((base->STATUS == 0) && (wait > 0))
- {
- wait--;
- }
- /* if NEEDKEY bit is not set, HW key is available */
- if (0 == (base->STATUS & HASHCRYPT_STATUS_NEEDKEY_MASK))
- {
- return kStatus_Success;
- }
- /* NEEDKEY is set, HW key is not available */
- return kStatus_Fail;
- }
- else
- {
- /* in case user key is used, return success */
- return kStatus_Success;
- }
-}
-
-/*!
- * @brief Read OUTDATA registers.
- *
- * This function copies OUTDATA to output buffer.
- *
- * @param base Hachcrypt peripheral base address.
- * @param[out] output Output buffer.
- * @param Number of bytes to copy.
- */
-static void hashcrypt_get_data(HASHCRYPT_Type *base, uint32_t *output, size_t outputSize)
-{
- uint32_t digest[8];
-
- while (0 == (base->STATUS & HASHCRYPT_STATUS_DIGEST_MASK))
- {
- }
-
- for (int i = 0; i < 8; i++)
- {
- digest[i] = swap_bytes(base->DIGEST0[i]);
- }
-
- if (outputSize > sizeof(digest))
- {
- outputSize = sizeof(digest);
- }
- hashcrypt_memcpy(output, digest, outputSize);
-}
-
-/*!
- * @brief Initialize the Hashcrypt engine for new operation.
- *
- * This function sets NEW and MODE fields in Hashcrypt Control register to start new operation.
- *
- * @param base Hashcrypt peripheral base address.
- * @param hashcrypt_algo_t Internal context.
- */
-static void hashcrypt_engine_init(HASHCRYPT_Type *base, hashcrypt_algo_t algo)
-{
- /* NEW bit must be set before we switch from previous mode otherwise new mode will not work correctly */
- base->CTRL = HASHCRYPT_CTRL_NEW_HASH(1);
- base->CTRL = HASHCRYPT_CTRL_MODE(algo) | HASHCRYPT_CTRL_NEW_HASH(1);
-}
-
-/*!
- * @brief Loads user key to INDATA register.
- *
- * This function writes user key stored in handle into HashCrypt INDATA register.
- *
- * @param base Hashcrypt peripheral base address.
- * @param handle Handle used for this request.
- */
-static void hashcrypt_aes_load_userKey(HASHCRYPT_Type *base, hashcrypt_handle_t *handle)
-{
- size_t keySize = 0;
-
- switch (handle->keySize)
- {
- case kHASHCRYPT_Aes128:
- keySize = 16;
- break;
- case kHASHCRYPT_Aes192:
- keySize = 24;
- break;
- case kHASHCRYPT_Aes256:
- keySize = 32;
- break;
- default:
- break;
- }
- if (keySize == 0)
- {
- return;
- }
- hashcrypt_load_data(base, &handle->keyWord[0], keySize);
-}
-
-/*!
- * @brief Performs AES encryption/decryption of one data block.
- *
- * This function encrypts/decrypts one block of data with specified size.
- *
- * @param base Hashcrypt peripheral base address.
- * @param input input data
- * @param output output data
- * @param size size of data block to process in bytes (must be 16bytes multiple).
- */
-static status_t hashcrypt_aes_one_block(HASHCRYPT_Type *base, const uint8_t *input, uint8_t *output, size_t size)
-{
- status_t status = kStatus_Fail;
- int idx = 0;
-
- /* we use AHB master mode as much as possible */
- /* however, it can work only with aligned input data */
- /* so, if unaligned, we do memcpy to temp buffer on stack, which is aligned, and use AHB mode to read data in */
- /* then we read data back to it and do memcpy to the output buffer */
- if (((uint32_t)input & 0x3u) || ((uint32_t)output & 0x3u))
- {
- uint32_t temp[256 / sizeof(uint32_t)];
- int cnt = 0;
- while (size)
- {
- size_t actSz = size >= 256u ? 256u : size;
- size_t actSzOrig = actSz;
- memcpy(temp, input + 256 * cnt, actSz);
- size -= actSz;
- base->MEMADDR = HASHCRYPT_MEMADDR_BASE(temp);
- base->MEMCTRL = HASHCRYPT_MEMCTRL_MASTER(1) | HASHCRYPT_MEMCTRL_COUNT(actSz / 16);
- int outidx = 0;
- while (actSz)
- {
- while (0 == (base->STATUS & HASHCRYPT_STATUS_DIGEST_MASK))
- {
- }
- for (int i = 0; i < 4; i++)
- {
- (temp + outidx)[i] = swap_bytes(base->DIGEST0[i]);
- }
- outidx += HASHCRYPT_AES_BLOCK_SIZE / 4;
- actSz -= HASHCRYPT_AES_BLOCK_SIZE;
- }
- memcpy(output + 256 * cnt, temp, actSzOrig);
- cnt++;
- }
- }
- else
- {
- base->MEMADDR = HASHCRYPT_MEMADDR_BASE(input);
- base->MEMCTRL = HASHCRYPT_MEMCTRL_MASTER(1) | HASHCRYPT_MEMCTRL_COUNT(size / 16);
- while (size >= HASHCRYPT_AES_BLOCK_SIZE)
- {
- /* Get result */
- while (0 == (base->STATUS & HASHCRYPT_STATUS_DIGEST_MASK))
- {
- }
-
- for (int i = 0; i < 4; i++)
- {
- ((uint32_t *)output + idx)[i] = swap_bytes(base->DIGEST0[i]);
- }
-
- idx += HASHCRYPT_AES_BLOCK_SIZE / 4;
- size -= HASHCRYPT_AES_BLOCK_SIZE;
- }
- }
-
- if (0 == (base->STATUS & HASHCRYPT_STATUS_ERROR_MASK))
- {
- status = kStatus_Success;
- }
-
- return status;
-}
-
-/*!
- * @brief Check validity of algoritm.
- *
- * This function checks the validity of input argument.
- *
- * @param algo Tested algorithm value.
- * @return kStatus_Success if valid, kStatus_InvalidArgument otherwise.
- */
-static status_t hashcrypt_sha_check_input_alg(HASHCRYPT_Type *base, hashcrypt_algo_t algo)
-{
- if ((algo == kHASHCRYPT_Sha1) || (algo == kHASHCRYPT_Sha256))
- {
- return kStatus_Success;
- }
-
- return kStatus_InvalidArgument;
-}
-
-/*!
- * @brief Check validity of input arguments.
- *
- * This function checks the validity of input arguments.
- *
- * @param base SHA peripheral base address.
- * @param ctx Memory buffer given by user application where the SHA_Init/SHA_Update/SHA_Finish store context.
- * @param algo Tested algorithm value.
- * @return kStatus_Success if valid, kStatus_InvalidArgument otherwise.
- */
-static status_t hashcrypt_sha_check_input_args(HASHCRYPT_Type *base, hashcrypt_hash_ctx_t *ctx, hashcrypt_algo_t algo)
-{
- /* Check validity of input algorithm */
- if (kStatus_Success != hashcrypt_sha_check_input_alg(base, algo))
- {
- return kStatus_InvalidArgument;
- }
-
- if ((NULL == ctx) || (NULL == base))
- {
- return kStatus_InvalidArgument;
- }
-
- return kStatus_Success;
-}
-
-/*!
- * @brief Check validity of internal software context.
- *
- * This function checks if the internal context structure looks correct.
- *
- * @param ctxInternal Internal context.
- * @return kStatus_Success if valid, kStatus_InvalidArgument otherwise.
- */
-static status_t hashcrypt_sha_check_context(HASHCRYPT_Type *base, hashcrypt_sha_ctx_internal_t *ctxInternal)
-{
- if ((NULL == ctxInternal) || (kStatus_Success != hashcrypt_sha_check_input_alg(base, ctxInternal->algo)))
- {
- return kStatus_InvalidArgument;
- }
- return kStatus_Success;
-}
-
-/*!
- * @brief Load 512-bit block (16 words) into SHA engine.
- *
- * This function aligns the input block and moves it into SHA engine INDATA.
- * CPU polls the WAITING bit and then moves data by using LDM and STM instructions.
- *
- * @param base SHA peripheral base address.
- * @param blk 512-bit block
- */
-static void hashcrypt_sha_one_block(HASHCRYPT_Type *base, const uint8_t *blk)
-{
- uint32_t temp[SHA_BLOCK_SIZE / sizeof(uint32_t)];
- const uint32_t *actBlk;
-
- /* make sure the 512-bit block is word aligned */
- if ((uintptr_t)blk & 0x3u)
- {
- hashcrypt_memcpy(temp, blk, SHA_BLOCK_SIZE);
- actBlk = (const uint32_t *)(uintptr_t)temp;
- }
- else
- {
- actBlk = (const uint32_t *)(uintptr_t)blk;
- }
-
- /* poll waiting. */
- while (0 == (base->STATUS & HASHCRYPT_STATUS_WAITING_MASK))
- {
- }
- /* feed INDATA (and ALIASes). use STM instruction. */
- hashcrypt_sha_ldm_stm_16_words(base, actBlk);
-}
-
-/*!
- * @brief Adds message to current hash.
- *
- * This function merges the message to fill the internal buffer, empties the internal buffer if
- * it becomes full, then process all remaining message data.
- *
- *
- * @param base SHA peripheral base address.
- * @param ctxInternal Internal context.
- * @param message Input message.
- * @param messageSize Size of input message in bytes.
- * @return kStatus_Success.
- */
-static status_t hashcrypt_sha_process_message_data(HASHCRYPT_Type *base,
- hashcrypt_sha_ctx_internal_t *ctxInternal,
- const uint8_t *message,
- size_t messageSize)
-{
- /* first fill the internal buffer to full block */
- if (ctxInternal->blksz)
- {
- size_t toCopy = SHA_BLOCK_SIZE - ctxInternal->blksz;
- hashcrypt_memcpy(&ctxInternal->blk.b[ctxInternal->blksz], message, toCopy);
- message += toCopy;
- messageSize -= toCopy;
-
- /* process full internal block */
- hashcrypt_sha_one_block(base, &ctxInternal->blk.b[0]);
- }
-
- /* process all full blocks in message[] */
- if (messageSize >= SHA_BLOCK_SIZE)
- {
- if ((uintptr_t)message & 0x3u)
- {
- while (messageSize >= SHA_BLOCK_SIZE)
- {
- hashcrypt_sha_one_block(base, message);
- message += SHA_BLOCK_SIZE;
- messageSize -= SHA_BLOCK_SIZE;
- }
- }
- else
- {
- /* poll waiting. */
- while (0 == (base->STATUS & HASHCRYPT_STATUS_WAITING_MASK))
- {
- }
- uint32_t blkNum = (messageSize >> 6); /* div by 64 bytes */
- uint32_t blkBytes = blkNum * 64u; /* number of bytes in 64 bytes blocks */
- base->MEMADDR = HASHCRYPT_MEMADDR_BASE(message);
- base->MEMCTRL = HASHCRYPT_MEMCTRL_MASTER(1) | HASHCRYPT_MEMCTRL_COUNT(blkNum);
- message += blkBytes;
- messageSize -= blkBytes;
- while (0 == (base->STATUS & HASHCRYPT_STATUS_DIGEST_MASK))
- {
- }
- }
- }
-
- /* copy last incomplete message bytes into internal block */
- hashcrypt_memcpy(&ctxInternal->blk.b[0], message, messageSize);
- ctxInternal->blksz = messageSize;
- return kStatus_Success;
-}
-
-/*!
- * @brief Finalize the running hash to make digest.
- *
- * This function empties the internal buffer, adds padding bits, and generates final digest.
- *
- * @param base SHA peripheral base address.
- * @param ctxInternal Internal context.
- * @return kStatus_Success.
- */
-static status_t hashcrypt_sha_finalize(HASHCRYPT_Type *base, hashcrypt_sha_ctx_internal_t *ctxInternal)
-{
- hashcrypt_sha_block_t lastBlock;
-
- memset(&lastBlock, 0, sizeof(hashcrypt_sha_block_t));
-
- /* this is last call, so need to flush buffered message bytes along with padding */
- if (ctxInternal->blksz <= 55u)
- {
- /* last data is 440 bits or less. */
- hashcrypt_memcpy(&lastBlock.b[0], &ctxInternal->blk.b[0], ctxInternal->blksz);
- lastBlock.b[ctxInternal->blksz] = (uint8_t)0x80U;
- lastBlock.w[SHA_BLOCK_SIZE / 4 - 1] = swap_bytes(8u * ctxInternal->fullMessageSize);
- hashcrypt_sha_one_block(base, &lastBlock.b[0]);
- }
- else
- {
- if (ctxInternal->blksz < SHA_BLOCK_SIZE)
- {
- ctxInternal->blk.b[ctxInternal->blksz] = (uint8_t)0x80U;
- for (uint32_t i = ctxInternal->blksz + 1u; i < SHA_BLOCK_SIZE; i++)
- {
- ctxInternal->blk.b[i] = 0;
- }
- }
- else
- {
- lastBlock.b[0] = (uint8_t)0x80U;
- }
-
- hashcrypt_sha_one_block(base, &ctxInternal->blk.b[0]);
- lastBlock.w[SHA_BLOCK_SIZE / 4 - 1] = swap_bytes(8u * ctxInternal->fullMessageSize);
- hashcrypt_sha_one_block(base, &lastBlock.b[0]);
- }
- /* poll wait for final digest */
- while (0 == (base->STATUS & HASHCRYPT_STATUS_DIGEST_MASK))
- {
- }
- return kStatus_Success;
-}
-
-static void hashcrypt_save_running_hash(HASHCRYPT_Type *base, hashcrypt_sha_ctx_internal_t *ctxInternal)
-{
-#if defined(FSL_FEATURE_HASHCRYPT_HAS_RELOAD_FEATURE) && (FSL_FEATURE_HASHCRYPT_HAS_RELOAD_FEATURE > 0)
- size_t len = (ctxInternal->algo == kHASHCRYPT_Sha1) ? SHA1_LEN : SHA256_LEN;
-
- /* Wait until digest is ready */
- while (0 == (base->STATUS & HASHCRYPT_STATUS_DIGEST_MASK))
- {
- }
-
- /* Store partial digest to context */
- for (int i = 0; i < len; i++)
- {
- ctxInternal->runningHash[i] = base->DIGEST0[i];
- }
-#endif
-}
-
-static void hashcrypt_restore_running_hash(HASHCRYPT_Type *base, hashcrypt_sha_ctx_internal_t *ctxInternal)
-{
-#if defined(FSL_FEATURE_HASHCRYPT_HAS_RELOAD_FEATURE) && (FSL_FEATURE_HASHCRYPT_HAS_RELOAD_FEATURE > 0)
- size_t len = (ctxInternal->algo == kHASHCRYPT_Sha1) ? SHA1_LEN : SHA256_LEN;
-
- /* Set corresponding mode before reloadning the runningHash */
- base->CTRL = (base->CTRL & ALG_MODE_MASK) | HASHCRYPT_CTRL_MODE(ctxInternal->algo);
- /* Set RELOAD bit to allow registers to be used */
- base->CTRL |= HASHCRYPT_CTRL_RELOAD_MASK;
-
- /* Reload partial hash digest */
- for (int i = 0; i < len; i++)
- {
- base->RELOAD[i] = ctxInternal->runningHash[i];
- }
- /* Clear RELOAD register before continuing */
- base->CTRL &= ~HASHCRYPT_CTRL_RELOAD_MASK;
-#endif
-}
-
-status_t HASHCRYPT_SHA(HASHCRYPT_Type *base,
- hashcrypt_algo_t algo,
- const uint8_t *input,
- size_t inputSize,
- uint8_t *output,
- size_t *outputSize)
-{
- hashcrypt_hash_ctx_t hashCtx;
- status_t status;
-
- status = HASHCRYPT_SHA_Init(base, &hashCtx, algo);
- if (status != kStatus_Success)
- {
- return status;
- }
-
- status = HASHCRYPT_SHA_Update(base, &hashCtx, input, inputSize);
- if (status != kStatus_Success)
- {
- return status;
- }
-
- status = HASHCRYPT_SHA_Finish(base, &hashCtx, output, outputSize);
-
- return status;
-}
-
-status_t HASHCRYPT_SHA_Init(HASHCRYPT_Type *base, hashcrypt_hash_ctx_t *ctx, hashcrypt_algo_t algo)
-{
- status_t status;
-
- hashcrypt_sha_ctx_internal_t *ctxInternal;
- /* compile time check for the correct structure size */
- BUILD_ASSERT(sizeof(hashcrypt_hash_ctx_t) >= sizeof(hashcrypt_sha_ctx_internal_t), hashcrypt_hash_ctx_t_size);
-
- status = hashcrypt_sha_check_input_args(base, ctx, algo);
- if (status != kStatus_Success)
- {
- return status;
- }
-
- /* set algorithm in context struct for later use */
- ctxInternal = (hashcrypt_sha_ctx_internal_t *)ctx;
- ctxInternal->algo = algo;
- ctxInternal->blksz = 0u;
-#ifdef HASHCRYPT_SHA_DO_WIPE_CONTEXT
- for (int i = 0; i < sizeof(ctxInternal->blk.w) / sizeof(ctxInternal->blk.w[0]); i++)
- {
- ctxInternal->blk.w[i] = 0u;
- }
-#endif /* HASHCRYPT_SHA_DO_WIPE_CONTEXT */
- ctxInternal->state = kHASHCRYPT_HashInit;
- ctxInternal->fullMessageSize = 0;
- return kStatus_Success;
-}
-
-status_t HASHCRYPT_SHA_Update(HASHCRYPT_Type *base, hashcrypt_hash_ctx_t *ctx, const uint8_t *input, size_t inputSize)
-{
- bool isUpdateState;
- status_t status;
- hashcrypt_sha_ctx_internal_t *ctxInternal;
- size_t blockSize;
-
- if (inputSize == 0)
- {
- return kStatus_Success;
- }
-
- ctxInternal = (hashcrypt_sha_ctx_internal_t *)ctx;
-#ifdef HASHCRYPT_SHA_DO_CHECK_CONTEXT
- status = hashcrypt_sha_check_context(base, ctxInternal);
- if (kStatus_Success != status)
- {
- return status;
- }
-#endif /* HASHCRYPT_SHA_DO_CHECK_CONTEXT */
-
- ctxInternal->fullMessageSize += inputSize;
- blockSize = SHA_BLOCK_SIZE;
- /* if we are still less than 64 bytes, keep only in context */
- if ((ctxInternal->blksz + inputSize) <= blockSize)
- {
- hashcrypt_memcpy((&ctxInternal->blk.b[0]) + ctxInternal->blksz, input, inputSize);
- ctxInternal->blksz += inputSize;
- return kStatus_Success;
- }
- else
- {
- isUpdateState = ctxInternal->state == kHASHCRYPT_HashUpdate;
- if (!isUpdateState)
- {
- /* start NEW hash */
- hashcrypt_engine_init(base, ctxInternal->algo);
- ctxInternal->state = kHASHCRYPT_HashUpdate;
- }
- else
- {
- hashcrypt_restore_running_hash(base, ctxInternal);
- }
- }
-
- /* process message data */
- status = hashcrypt_sha_process_message_data(base, ctxInternal, input, inputSize);
- hashcrypt_save_running_hash(base, ctxInternal);
- return status;
-}
-
-status_t HASHCRYPT_SHA_Finish(HASHCRYPT_Type *base, hashcrypt_hash_ctx_t *ctx, uint8_t *output, size_t *outputSize)
-{
- size_t algOutSize = 0;
- status_t status;
- hashcrypt_sha_ctx_internal_t *ctxInternal;
-#ifdef HASHCRYPT_SHA_DO_CHECK_CONTEXT
- uint32_t *ctxW;
- uint32_t i;
-#endif /* HASHCRYPT_SHA_DO_CHECK_CONTEXT */
-
- if (output == NULL)
- {
- return kStatus_InvalidArgument;
- }
-
- ctxInternal = (hashcrypt_sha_ctx_internal_t *)ctx;
-#ifdef HASHCRYPT_SHA_DO_CHECK_CONTEXT
- status = hashcrypt_sha_check_context(base, ctxInternal);
- if (kStatus_Success != status)
- {
- return status;
- }
-#endif /* HASHCRYPT_SHA_DO_CHECK_CONTEXT */
-
- if (ctxInternal->state == kHASHCRYPT_HashInit)
- {
- hashcrypt_engine_init(base, ctxInternal->algo);
- }
- else
- {
- hashcrypt_restore_running_hash(base, ctxInternal);
- }
-
- size_t outSize = 0u;
-
- /* compute algorithm output length */
- switch (ctxInternal->algo)
- {
- case kHASHCRYPT_Sha1:
- outSize = kHASHCRYPT_OutLenSha1;
- break;
- case kHASHCRYPT_Sha256:
- outSize = kHASHCRYPT_OutLenSha256;
- break;
- default:
- break;
- }
- algOutSize = outSize;
-
- /* flush message last incomplete block, if there is any, and add padding bits */
- status = hashcrypt_sha_finalize(base, ctxInternal);
-
- if (outputSize)
- {
- if (algOutSize < *outputSize)
- {
- *outputSize = algOutSize;
- }
- else
- {
- algOutSize = *outputSize;
- }
- }
-
- hashcrypt_get_data(base, (uint32_t *)output, algOutSize);
-
-#ifdef HASHCRYPT_SHA_DO_WIPE_CONTEXT
- ctxW = (uint32_t *)ctx;
- for (i = 0; i < HASHCRYPT_HASH_CTX_SIZE; i++)
- {
- ctxW[i] = 0u;
- }
-#endif /* HASHCRYPT_SHA_DO_WIPE_CONTEXT */
- return status;
-}
-
-void HASHCRYPT_SHA_SetCallback(HASHCRYPT_Type *base,
- hashcrypt_hash_ctx_t *ctx,
- hashcrypt_callback_t callback,
- void *userData)
-{
- hashcrypt_sha_ctx_internal_t *ctxInternal;
-
- s_ctx = ctx;
- ctxInternal = (hashcrypt_sha_ctx_internal_t *)ctx;
- ctxInternal->hashCallback = callback;
- ctxInternal->userData = userData;
-
- EnableIRQ(HASHCRYPT_IRQn);
-}
-
-status_t HASHCRYPT_SHA_UpdateNonBlocking(HASHCRYPT_Type *base,
- hashcrypt_hash_ctx_t *ctx,
- const uint8_t *input,
- size_t inputSize)
-{
- hashcrypt_sha_ctx_internal_t *ctxInternal;
- uint32_t numBlocks;
- status_t status;
-
- if (inputSize == 0)
- {
- return kStatus_Success;
- }
-
- if ((uintptr_t)input & 0x3U)
- {
- return kStatus_Fail;
- }
-
- ctxInternal = (hashcrypt_sha_ctx_internal_t *)ctx;
- status = hashcrypt_sha_check_context(base, ctxInternal);
- if (kStatus_Success != status)
- {
- return status;
- }
-
- ctxInternal->fullMessageSize = inputSize;
- ctxInternal->remainingBlcks = inputSize / SHA_BLOCK_SIZE;
- ctxInternal->blksz = inputSize % SHA_BLOCK_SIZE;
-
- /* copy last incomplete block to context */
- if ((ctxInternal->blksz > 0) && (ctxInternal->blksz <= SHA_BLOCK_SIZE))
- {
- hashcrypt_memcpy((&ctxInternal->blk.b[0]), input + SHA_BLOCK_SIZE * ctxInternal->remainingBlcks,
- ctxInternal->blksz);
- }
-
- if (ctxInternal->remainingBlcks >= SHA_MASTER_MAX_BLOCKS)
- {
- numBlocks = SHA_MASTER_MAX_BLOCKS - 1;
- }
- else
- {
- numBlocks = ctxInternal->remainingBlcks;
- }
- /* update remainingBlks so that ISR can run another hash if necessary */
- ctxInternal->remainingBlcks -= numBlocks;
-
- /* compute hash using AHB Master mode for full blocks */
- if (numBlocks > 0)
- {
- ctxInternal->state = kHASHCRYPT_HashUpdate;
- hashcrypt_engine_init(base, ctxInternal->algo);
-
- /* Enable digest and error interrupts and start hash */
- base->INTENSET = HASHCRYPT_INTENCLR_DIGEST_MASK | HASHCRYPT_INTENCLR_ERROR_MASK;
- base->MEMADDR = HASHCRYPT_MEMADDR_BASE(input);
- base->MEMCTRL = HASHCRYPT_MEMCTRL_MASTER(1) | HASHCRYPT_MEMCTRL_COUNT(numBlocks);
- }
- /* no full blocks, invoke callback directly */
- else
- {
- ctxInternal->hashCallback(HASHCRYPT, ctx, status, ctxInternal->userData);
- }
-
- return status;
-}
-
-status_t HASHCRYPT_AES_SetKey(HASHCRYPT_Type *base, hashcrypt_handle_t *handle, const uint8_t *key, size_t keySize)
-{
- status_t retVal = kStatus_InvalidArgument;
-
- switch (keySize)
- {
- case 16:
- handle->keySize = kHASHCRYPT_Aes128;
- break;
- case 24:
- handle->keySize = kHASHCRYPT_Aes192;
- break;
- case 32:
- handle->keySize = kHASHCRYPT_Aes256;
- break;
- default:
- handle->keySize = kHASHCRYPT_InvalidKey;
- break;
- }
-
- if (handle->keySize == kHASHCRYPT_InvalidKey)
- {
- return retVal;
- }
-
- if (handle->keyType == kHASHCRYPT_SecretKey)
- {
- /* for kHASHCRYPT_SecretKey just return Success */
- retVal = kStatus_Success;
- }
- else if (handle->keyType == kHASHCRYPT_UserKey)
- {
- retVal = hashcrypt_get_key_from_unaligned_src((uint8_t *)&handle->keyWord[0], key, keySize);
- }
- else
- {
- retVal = kStatus_InvalidArgument;
- }
-
- return retVal;
-}
-
-status_t HASHCRYPT_AES_EncryptEcb(
- HASHCRYPT_Type *base, hashcrypt_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size)
-{
- status_t status = kStatus_Fail;
-
- if ((size % 16u) || (handle->keySize == kHASHCRYPT_InvalidKey))
- {
- return kStatus_InvalidArgument;
- }
-
- uint32_t keyType = (handle->keyType == kHASHCRYPT_UserKey) ? 0 : 1u;
- base->CRYPTCFG = HASHCRYPT_CRYPTCFG_AESMODE(kHASHCRYPT_AesEcb) | HASHCRYPT_CRYPTCFG_AESDECRYPT(AES_ENCRYPT) |
- HASHCRYPT_CRYPTCFG_AESSECRET(keyType) | HASHCRYPT_CRYPTCFG_AESKEYSZ(handle->keySize) |
- HASHCRYPT_CRYPTCFG_MSW1ST_OUT(1) | HASHCRYPT_CRYPTCFG_SWAPKEY(1) | HASHCRYPT_CRYPTCFG_SWAPDAT(1) |
- HASHCRYPT_CRYPTCFG_MSW1ST(1);
-
- hashcrypt_engine_init(base, kHASHCRYPT_Aes);
-
- /* in case of HW AES key, check if it is available */
- if (hashcrypt_check_need_key(base, handle) != kStatus_Success)
- {
- return kStatus_Fail;
- }
-
- /* load key if kHASHCRYPT_UserKey is selected */
- if (handle->keyType == kHASHCRYPT_UserKey)
- {
- hashcrypt_aes_load_userKey(base, handle);
- }
-
- /* load message and get result */
- status = hashcrypt_aes_one_block(base, plaintext, ciphertext, size);
-
- return status;
-}
-
-status_t HASHCRYPT_AES_DecryptEcb(
- HASHCRYPT_Type *base, hashcrypt_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size)
-{
- status_t status = kStatus_Fail;
-
- if ((size % 16u) || (handle->keySize == kHASHCRYPT_InvalidKey))
- {
- return kStatus_InvalidArgument;
- }
-
- uint32_t keyType = (handle->keyType == kHASHCRYPT_UserKey) ? 0 : 1u;
- base->CRYPTCFG = HASHCRYPT_CRYPTCFG_AESMODE(kHASHCRYPT_AesEcb) | HASHCRYPT_CRYPTCFG_AESDECRYPT(AES_DECRYPT) |
- HASHCRYPT_CRYPTCFG_AESSECRET(keyType) | HASHCRYPT_CRYPTCFG_AESKEYSZ(handle->keySize) |
- HASHCRYPT_CRYPTCFG_MSW1ST_OUT(1) | HASHCRYPT_CRYPTCFG_SWAPKEY(1) | HASHCRYPT_CRYPTCFG_SWAPDAT(1) |
- HASHCRYPT_CRYPTCFG_MSW1ST(1);
-
- hashcrypt_engine_init(base, kHASHCRYPT_Aes);
-
- /* in case of HW AES key, check if it is available */
- if (hashcrypt_check_need_key(base, handle) != kStatus_Success)
- {
- return kStatus_Fail;
- }
-
- /* load key if kHASHCRYPT_UserKey is selected */
- if (handle->keyType == kHASHCRYPT_UserKey)
- {
- hashcrypt_aes_load_userKey(base, handle);
- }
-
- /* load message and get result */
- status = hashcrypt_aes_one_block(base, ciphertext, plaintext, size);
-
- return status;
-}
-
-status_t HASHCRYPT_AES_EncryptCbc(HASHCRYPT_Type *base,
- hashcrypt_handle_t *handle,
- const uint8_t *plaintext,
- uint8_t *ciphertext,
- size_t size,
- const uint8_t iv[16])
-{
- status_t status = kStatus_Fail;
-
- if ((size % 16u) || (handle->keySize == kHASHCRYPT_InvalidKey))
- {
- return kStatus_InvalidArgument;
- }
-
- uint32_t keyType = (handle->keyType == kHASHCRYPT_UserKey) ? 0 : 1u;
- base->CRYPTCFG = HASHCRYPT_CRYPTCFG_AESMODE(kHASHCRYPT_AesCbc) | HASHCRYPT_CRYPTCFG_AESDECRYPT(AES_ENCRYPT) |
- HASHCRYPT_CRYPTCFG_AESSECRET(keyType) | HASHCRYPT_CRYPTCFG_AESKEYSZ(handle->keySize) |
- HASHCRYPT_CRYPTCFG_MSW1ST_OUT(1) | HASHCRYPT_CRYPTCFG_SWAPKEY(1) | HASHCRYPT_CRYPTCFG_SWAPDAT(1) |
- HASHCRYPT_CRYPTCFG_MSW1ST(1);
-
- hashcrypt_engine_init(base, kHASHCRYPT_Aes);
-
- /* in case of HW AES key, check if it is available */
- if (hashcrypt_check_need_key(base, handle) != kStatus_Success)
- {
- return kStatus_Fail;
- }
-
- /* load key if kHASHCRYPT_UserKey is selected */
- if (handle->keyType == kHASHCRYPT_UserKey)
- {
- hashcrypt_aes_load_userKey(base, handle);
- }
-
- /* load 16b iv */
- hashcrypt_load_data(base, (uint32_t *)iv, 16);
-
- /* load message and get result */
- status = hashcrypt_aes_one_block(base, plaintext, ciphertext, size);
-
- return status;
-}
-
-status_t HASHCRYPT_AES_DecryptCbc(HASHCRYPT_Type *base,
- hashcrypt_handle_t *handle,
- const uint8_t *ciphertext,
- uint8_t *plaintext,
- size_t size,
- const uint8_t iv[16])
-{
- status_t status = kStatus_Fail;
-
- if ((size % 16u) || (handle->keySize == kHASHCRYPT_InvalidKey))
- {
- return kStatus_InvalidArgument;
- }
-
- uint32_t keyType = (handle->keyType == kHASHCRYPT_UserKey) ? 0 : 1u;
- base->CRYPTCFG = HASHCRYPT_CRYPTCFG_AESMODE(kHASHCRYPT_AesCbc) | HASHCRYPT_CRYPTCFG_AESDECRYPT(AES_DECRYPT) |
- HASHCRYPT_CRYPTCFG_AESSECRET(keyType) | HASHCRYPT_CRYPTCFG_AESKEYSZ(handle->keySize) |
- HASHCRYPT_CRYPTCFG_MSW1ST_OUT(1) | HASHCRYPT_CRYPTCFG_SWAPKEY(1) | HASHCRYPT_CRYPTCFG_SWAPDAT(1) |
- HASHCRYPT_CRYPTCFG_MSW1ST(1);
-
- hashcrypt_engine_init(base, kHASHCRYPT_Aes);
-
- /* in case of HW AES key, check if it is available */
- if (hashcrypt_check_need_key(base, handle) != kStatus_Success)
- {
- return kStatus_Fail;
- }
-
- /* load key if kHASHCRYPT_UserKey is selected */
- if (handle->keyType == kHASHCRYPT_UserKey)
- {
- hashcrypt_aes_load_userKey(base, handle);
- }
-
- /* load iv */
- hashcrypt_load_data(base, (uint32_t *)iv, 16);
-
- /* load message and get result */
- status = hashcrypt_aes_one_block(base, ciphertext, plaintext, size);
-
- return status;
-}
-
-status_t HASHCRYPT_AES_CryptCtr(HASHCRYPT_Type *base,
- hashcrypt_handle_t *handle,
- const uint8_t *input,
- uint8_t *output,
- size_t size,
- uint8_t counter[HASHCRYPT_AES_BLOCK_SIZE],
- uint8_t counterlast[HASHCRYPT_AES_BLOCK_SIZE],
- size_t *szLeft)
-{
- uint32_t lastSize;
- uint8_t lastBlock[HASHCRYPT_AES_BLOCK_SIZE] = {0};
- uint8_t *lastEncryptedCounter;
- status_t status = kStatus_Fail;
-
- if (handle->keySize == kHASHCRYPT_InvalidKey)
- {
- return kStatus_InvalidArgument;
- }
-
- uint32_t keyType = (handle->keyType == kHASHCRYPT_UserKey) ? 0 : 1u;
- base->CRYPTCFG = HASHCRYPT_CRYPTCFG_AESMODE(kHASHCRYPT_AesCtr) | HASHCRYPT_CRYPTCFG_AESDECRYPT(AES_ENCRYPT) |
- HASHCRYPT_CRYPTCFG_AESSECRET(keyType) | HASHCRYPT_CRYPTCFG_AESKEYSZ(handle->keySize) |
- HASHCRYPT_CRYPTCFG_MSW1ST_OUT(1) | HASHCRYPT_CRYPTCFG_SWAPKEY(1) | HASHCRYPT_CRYPTCFG_SWAPDAT(1) |
- HASHCRYPT_CRYPTCFG_MSW1ST(1);
-
- hashcrypt_engine_init(base, kHASHCRYPT_Aes);
-
- /* in case of HW AES key, check if it is available */
- if (hashcrypt_check_need_key(base, handle) != kStatus_Success)
- {
- return kStatus_Fail;
- }
-
- /* load key if kHASHCRYPT_UserKey is selected */
- if (handle->keyType == kHASHCRYPT_UserKey)
- {
- hashcrypt_aes_load_userKey(base, handle);
- }
-
- /* load nonce */
- hashcrypt_load_data(base, (uint32_t *)counter, 16);
-
- lastSize = size % HASHCRYPT_AES_BLOCK_SIZE;
- size -= lastSize;
-
- /* encrypt full 16byte blocks */
- hashcrypt_aes_one_block(base, input, output, size);
-
- while (size)
- {
- ctrIncrement(counter);
- size -= 16u;
- input += 16;
- output += 16;
- }
-
- if (lastSize)
- {
- if (counterlast)
- {
- lastEncryptedCounter = counterlast;
- }
- else
- {
- lastEncryptedCounter = lastBlock;
- }
-
- /* Perform encryption with all zeros to get last counter. XOR with zeros doesn't change. */
- status = hashcrypt_aes_one_block(base, lastBlock, lastEncryptedCounter, HASHCRYPT_AES_BLOCK_SIZE);
- if (status != kStatus_Success)
- {
- return status;
- }
- /* remain output = input XOR counterlast */
- for (uint32_t i = 0; i < lastSize; i++)
- {
- output[i] = input[i] ^ lastEncryptedCounter[i];
- }
- /* Increment counter parameter */
- ctrIncrement(counter);
- }
- else
- {
- lastSize = HASHCRYPT_AES_BLOCK_SIZE;
- /* no remaining bytes in couterlast so clearing it */
- if (counterlast)
- {
- memset(counterlast, 0, HASHCRYPT_AES_BLOCK_SIZE);
- }
- }
-
- if (szLeft)
- {
- *szLeft = HASHCRYPT_AES_BLOCK_SIZE - lastSize;
- }
-
- return kStatus_Success;
-}
-
-void HASHCRYPT_DriverIRQHandler(void)
-{
- hashcrypt_sha_ctx_internal_t *ctxInternal;
- HASHCRYPT_Type *base = HASHCRYPT;
- uint32_t numBlocks;
- status_t status;
-
- ctxInternal = (hashcrypt_sha_ctx_internal_t *)s_ctx;
-
- if (0 == (base->STATUS & HASHCRYPT_STATUS_ERROR_MASK))
- {
- if (ctxInternal->remainingBlcks > 0)
- {
- if (ctxInternal->remainingBlcks >= SHA_MASTER_MAX_BLOCKS)
- {
- numBlocks = SHA_MASTER_MAX_BLOCKS - 1;
- }
- else
- {
- numBlocks = ctxInternal->remainingBlcks;
- }
- /* some blocks still remaining, update remainingBlcks for next ISR and start another hash */
- ctxInternal->remainingBlcks -= numBlocks;
- base->MEMCTRL = HASHCRYPT_MEMCTRL_MASTER(1) | HASHCRYPT_MEMCTRL_COUNT(numBlocks);
- return;
- }
- /* no full blocks left, disable interrupts and AHB master mode */
- base->INTENCLR = HASHCRYPT_INTENCLR_DIGEST_MASK | HASHCRYPT_INTENCLR_ERROR_MASK;
- base->MEMCTRL = HASHCRYPT_MEMCTRL_MASTER(0);
- hashcrypt_save_running_hash(base, ctxInternal);
- status = kStatus_Success;
- }
- else
- {
- status = kStatus_Fail;
- }
-
- /* Invoke callback if there is one */
- if (NULL != ctxInternal->hashCallback)
- {
- ctxInternal->hashCallback(HASHCRYPT, s_ctx, status, ctxInternal->userData);
- }
-}
-
-void HASHCRYPT_Init(HASHCRYPT_Type *base)
-{
- RESET_PeripheralReset(kHASHCRYPT_RST_SHIFT_RSTn);
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
- CLOCK_EnableClock(kCLOCK_HashCrypt);
-#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
-}
-
-void HASHCRYPT_Deinit(HASHCRYPT_Type *base)
-{
- RESET_SetPeripheralReset(kHASHCRYPT_RST_SHIFT_RSTn);
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
- CLOCK_DisableClock(kCLOCK_HashCrypt);
-#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
-}
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_hashcrypt.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_hashcrypt.h
deleted file mode 100755
index 2e5ca47f8d..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_hashcrypt.h
+++ /dev/null
@@ -1,438 +0,0 @@
-/*
- * Copyright 2017-2019 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-#ifndef _FSL_HASHCRYPT_H_
-#define _FSL_HASHCRYPT_H_
-
-#include "fsl_common.h"
-
-/*! @brief HASHCRYPT status return codes. */
-enum _hashcrypt_status
-{
- kStatus_HASHCRYPT_Again =
- MAKE_STATUS(kStatusGroup_HASHCRYPT, 0), /*!< Non-blocking function shall be called again. */
-};
-
-/*******************************************************************************
- * Definitions
- *******************************************************************************/
-
-/*!
- * @addtogroup hashcrypt_driver
- * @{
- */
-/*! @name Driver version */
-/*@{*/
-/*! @brief HASHCRYPT driver version. Version 2.1.0.
- *
- * Current version: 2.1.0
- *
- * Change log:
- * - Version 2.0.0
- * - Initial version
- * - Version 2.0.1
- * - Support loading AES key from unaligned address
- * - Version 2.0.2
- * - Support loading AES key from unaligned address for different compiler and core variants
- * - Version 2.0.3
- * - Remove SHA512 and AES ICB algorithm definitions
- * - Version 2.0.4
- * - Add SHA context switch support
- * - Version 2.1.0
- * - Update the register name and macro to align with new header.
- */
-#define FSL_HASHCRYPT_DRIVER_VERSION (MAKE_VERSION(2, 1, 0))
-/*@}*/
-
-/*! @brief Algorithm definitions correspond with the values for Mode field in Control register !*/
-#define HASHCRYPT_MODE_SHA1 0x1
-#define HASHCRYPT_MODE_SHA256 0x2
-#define HASHCRYPT_MODE_AES 0x4
-
-/*! @brief Algorithm used for Hashcrypt operation */
-typedef enum _hashcrypt_algo_t
-{
- kHASHCRYPT_Sha1 = HASHCRYPT_MODE_SHA1, /*!< SHA_1 */
- kHASHCRYPT_Sha256 = HASHCRYPT_MODE_SHA256, /*!< SHA_256 */
- kHASHCRYPT_Aes = HASHCRYPT_MODE_AES, /*!< AES */
-} hashcrypt_algo_t;
-
-/*! @} */
-
-/*******************************************************************************
- * AES Definitions
- *******************************************************************************/
-
-/*!
- * @addtogroup hashcrypt_driver_aes
- * @{
- */
-
-/*! AES block size in bytes */
-#define HASHCRYPT_AES_BLOCK_SIZE 16
-#define AES_ENCRYPT 0
-#define AES_DECRYPT 1
-
-/*! @brief AES mode */
-typedef enum _hashcrypt_aes_mode_t
-{
- kHASHCRYPT_AesEcb = 0U, /*!< AES ECB mode */
- kHASHCRYPT_AesCbc = 1U, /*!< AES CBC mode */
- kHASHCRYPT_AesCtr = 2U, /*!< AES CTR mode */
-} hashcrypt_aes_mode_t;
-
-/*! @brief Size of AES key */
-typedef enum _hashcrypt_aes_keysize_t
-{
- kHASHCRYPT_Aes128 = 0U, /*!< AES 128 bit key */
- kHASHCRYPT_Aes192 = 1U, /*!< AES 192 bit key */
- kHASHCRYPT_Aes256 = 2U, /*!< AES 256 bit key */
- kHASHCRYPT_InvalidKey = 3U, /*!< AES invalid key */
-} hashcrypt_aes_keysize_t;
-
-/*! @brief HASHCRYPT key source selection.
- *
- */
-typedef enum _hashcrypt_key
-{
- kHASHCRYPT_UserKey = 0xc3c3U, /*!< HASHCRYPT user key */
- kHASHCRYPT_SecretKey = 0x3c3cU, /*!< HASHCRYPT secret key (dedicated hw bus from PUF) */
-} hashcrypt_key_t;
-
-/*! @brief Specify HASHCRYPT's key resource. */
-struct _hashcrypt_handle
-{
- uint32_t keyWord[8]; /*!< Copy of user key (set by HASHCRYPT_AES_SetKey(). */
- hashcrypt_aes_keysize_t keySize;
- hashcrypt_key_t keyType; /*!< For operations with key (such as AES encryption/decryption), specify key type. */
-} __attribute__((aligned));
-
-typedef struct _hashcrypt_handle hashcrypt_handle_t;
-
-/*!
- *@}
- */ /* end of hashcrypt_driver_aes */
-
-/*******************************************************************************
- * HASH Definitions
- ******************************************************************************/
-/*!
- * @addtogroup hashcrypt_driver_hash
- * @{
- */
-
-/*! @brief HASHCRYPT HASH Context size. */
-#if defined(FSL_FEATURE_HASHCRYPT_HAS_RELOAD_FEATURE) && (FSL_FEATURE_HASHCRYPT_HAS_RELOAD_FEATURE > 0)
-#define HASHCRYPT_HASH_CTX_SIZE 30
-#else
-#define HASHCRYPT_HASH_CTX_SIZE 22
-#endif
-
-/*! @brief Storage type used to save hash context. */
-typedef struct _hashcrypt_hash_ctx_t
-{
- uint32_t x[HASHCRYPT_HASH_CTX_SIZE]; /*!< storage */
-} hashcrypt_hash_ctx_t;
-
-/*! @brief HASHCRYPT background hash callback function. */
-typedef void (*hashcrypt_callback_t)(HASHCRYPT_Type *base, hashcrypt_hash_ctx_t *ctx, status_t status, void *userData);
-
-/*!
- *@}
- */ /* end of hashcrypt_driver_hash */
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/*!
- * @addtogroup hashcrypt_driver
- * @{
- */
-
-/*!
- * @brief Enables clock and disables reset for HASHCRYPT peripheral.
- *
- * Enable clock and disable reset for HASHCRYPT.
- *
- * @param base HASHCRYPT base address
- */
-void HASHCRYPT_Init(HASHCRYPT_Type *base);
-
-/*!
- * @brief Disables clock for HASHCRYPT peripheral.
- *
- * Disable clock and enable reset.
- *
- * @param base HASHCRYPT base address
- */
-void HASHCRYPT_Deinit(HASHCRYPT_Type *base);
-
-/*!
- *@}
- */ /* end of hashcrypt_driver */
-
-/*******************************************************************************
- * AES API
- ******************************************************************************/
-
-/*!
- * @addtogroup hashcrypt_driver_aes
- * @{
- */
-
-/*!
- * @brief Set AES key to hashcrypt_handle_t struct and optionally to HASHCRYPT.
- *
- * Sets the AES key for encryption/decryption with the hashcrypt_handle_t structure.
- * The hashcrypt_handle_t input argument specifies key source.
- *
- * @param base HASHCRYPT peripheral base address.
- * @param handle Handle used for the request.
- * @param key 0-mod-4 aligned pointer to AES key.
- * @param keySize AES key size in bytes. Shall equal 16, 24 or 32.
- * @return status from set key operation
- */
-status_t HASHCRYPT_AES_SetKey(HASHCRYPT_Type *base, hashcrypt_handle_t *handle, const uint8_t *key, size_t keySize);
-
-/*!
- * @brief Encrypts AES on one or multiple 128-bit block(s).
- *
- * Encrypts AES.
- * The source plaintext and destination ciphertext can overlap in system memory.
- *
- * @param base HASHCRYPT peripheral base address
- * @param handle Handle used for this request.
- * @param plaintext Input plain text to encrypt
- * @param[out] ciphertext Output cipher text
- * @param size Size of input and output data in bytes. Must be multiple of 16 bytes.
- * @return Status from encrypt operation
- */
-status_t HASHCRYPT_AES_EncryptEcb(
- HASHCRYPT_Type *base, hashcrypt_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size);
-
-/*!
- * @brief Decrypts AES on one or multiple 128-bit block(s).
- *
- * Decrypts AES.
- * The source ciphertext and destination plaintext can overlap in system memory.
- *
- * @param base HASHCRYPT peripheral base address
- * @param handle Handle used for this request.
- * @param ciphertext Input plain text to encrypt
- * @param[out] plaintext Output cipher text
- * @param size Size of input and output data in bytes. Must be multiple of 16 bytes.
- * @return Status from decrypt operation
- */
-status_t HASHCRYPT_AES_DecryptEcb(
- HASHCRYPT_Type *base, hashcrypt_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size);
-
-/*!
- * @brief Encrypts AES using CBC block mode.
- *
- * @param base HASHCRYPT peripheral base address
- * @param handle Handle used for this request.
- * @param plaintext Input plain text to encrypt
- * @param[out] ciphertext Output cipher text
- * @param size Size of input and output data in bytes. Must be multiple of 16 bytes.
- * @param iv Input initial vector to combine with the first input block.
- * @return Status from encrypt operation
- */
-status_t HASHCRYPT_AES_EncryptCbc(HASHCRYPT_Type *base,
- hashcrypt_handle_t *handle,
- const uint8_t *plaintext,
- uint8_t *ciphertext,
- size_t size,
- const uint8_t iv[16]);
-
-/*!
- * @brief Decrypts AES using CBC block mode.
- *
- * @param base HASHCRYPT peripheral base address
- * @param handle Handle used for this request.
- * @param ciphertext Input cipher text to decrypt
- * @param[out] plaintext Output plain text
- * @param size Size of input and output data in bytes. Must be multiple of 16 bytes.
- * @param iv Input initial vector to combine with the first input block.
- * @return Status from decrypt operation
- */
-status_t HASHCRYPT_AES_DecryptCbc(HASHCRYPT_Type *base,
- hashcrypt_handle_t *handle,
- const uint8_t *ciphertext,
- uint8_t *plaintext,
- size_t size,
- const uint8_t iv[16]);
-
-/*!
- * @brief Encrypts or decrypts AES using CTR block mode.
- *
- * Encrypts or decrypts AES using CTR block mode.
- * AES CTR mode uses only forward AES cipher and same algorithm for encryption and decryption.
- * The only difference between encryption and decryption is that, for encryption, the input argument
- * is plain text and the output argument is cipher text. For decryption, the input argument is cipher text
- * and the output argument is plain text.
- *
- * @param base HASHCRYPT peripheral base address
- * @param handle Handle used for this request.
- * @param input Input data for CTR block mode
- * @param[out] output Output data for CTR block mode
- * @param size Size of input and output data in bytes
- * @param[in,out] counter Input counter (updates on return)
- * @param[out] counterlast Output cipher of last counter, for chained CTR calls (statefull encryption). NULL can be
- * passed if chained calls are
- * not used.
- * @param[out] szLeft Output number of bytes in left unused in counterlast block. NULL can be passed if chained calls
- * are not used.
- * @return Status from encrypt operation
- */
-status_t HASHCRYPT_AES_CryptCtr(HASHCRYPT_Type *base,
- hashcrypt_handle_t *handle,
- const uint8_t *input,
- uint8_t *output,
- size_t size,
- uint8_t counter[HASHCRYPT_AES_BLOCK_SIZE],
- uint8_t counterlast[HASHCRYPT_AES_BLOCK_SIZE],
- size_t *szLeft);
-
-/*!
- *@}
- */ /* end of hashcrypt_driver_aes */
-
-/*******************************************************************************
- * HASH API
- ******************************************************************************/
-
-/*!
- * @addtogroup hashcrypt_driver_hash
- * @{
- */
-
-/*!
- * @brief Create HASH on given data
- *
- * Perform the full SHA in one function call. The function is blocking.
- *
- * @param base HASHCRYPT peripheral base address
- * @param algo Underlaying algorithm to use for hash computation.
- * @param input Input data
- * @param inputSize Size of input data in bytes
- * @param[out] output Output hash data
- * @param[out] outputSize Output parameter storing the size of the output hash in bytes
- * @return Status of the one call hash operation.
- */
-status_t HASHCRYPT_SHA(HASHCRYPT_Type *base,
- hashcrypt_algo_t algo,
- const uint8_t *input,
- size_t inputSize,
- uint8_t *output,
- size_t *outputSize);
-
-/*!
- * @brief Initialize HASH context
- *
- * This function initializes the HASH.
- *
- * @param base HASHCRYPT peripheral base address
- * @param[out] ctx Output hash context
- * @param algo Underlaying algorithm to use for hash computation.
- * @return Status of initialization
- */
-status_t HASHCRYPT_SHA_Init(HASHCRYPT_Type *base, hashcrypt_hash_ctx_t *ctx, hashcrypt_algo_t algo);
-
-/*!
- * @brief Add data to current HASH
- *
- * Add data to current HASH. This can be called repeatedly with an arbitrary amount of data to be
- * hashed. The functions blocks. If it returns kStatus_Success, the running hash
- * has been updated (HASHCRYPT has processed the input data), so the memory at \p input pointer
- * can be released back to system. The HASHCRYPT context buffer is updated with the running hash
- * and with all necessary information to support possible context switch.
- *
- * @param base HASHCRYPT peripheral base address
- * @param[in,out] ctx HASH context
- * @param input Input data
- * @param inputSize Size of input data in bytes
- * @return Status of the hash update operation
- */
-status_t HASHCRYPT_SHA_Update(HASHCRYPT_Type *base, hashcrypt_hash_ctx_t *ctx, const uint8_t *input, size_t inputSize);
-
-/*!
- * @brief Finalize hashing
- *
- * Outputs the final hash (computed by HASHCRYPT_HASH_Update()) and erases the context.
- *
- * @param base HASHCRYPT peripheral base address
- * @param[in,out] ctx Input hash context
- * @param[out] output Output hash data
- * @param[in,out] outputSize Optional parameter (can be passed as NULL). On function entry, it specifies the size of
- * output[] buffer. On function return, it stores the number of updated output bytes.
- * @return Status of the hash finish operation
- */
-status_t HASHCRYPT_SHA_Finish(HASHCRYPT_Type *base, hashcrypt_hash_ctx_t *ctx, uint8_t *output, size_t *outputSize);
-
-/*!
- *@}
- */ /* end of hashcrypt_driver_hash */
-
-/*!
- * @addtogroup hashcrypt_background_driver_hash
- * @{
- */
-
-/*!
- * @brief Initializes the HASHCRYPT handle for background hashing.
- *
- * This function initializes the hash context for background hashing
- * (Non-blocking) APIs. This is less typical interface to hash function, but can be used
- * for parallel processing, when main CPU has something else to do.
- * Example is digital signature RSASSA-PKCS1-V1_5-VERIFY((n,e),M,S) algorithm, where
- * background hashing of M can be started, then CPU can compute S^e mod n
- * (in parallel with background hashing) and once the digest becomes available,
- * CPU can proceed to comparison of EM with EM'.
- *
- * @param base HASHCRYPT peripheral base address.
- * @param[out] ctx Hash context.
- * @param callback Callback function.
- * @param userData User data (to be passed as an argument to callback function, once callback is invoked from isr).
- */
-void HASHCRYPT_SHA_SetCallback(HASHCRYPT_Type *base,
- hashcrypt_hash_ctx_t *ctx,
- hashcrypt_callback_t callback,
- void *userData);
-
-/*!
- * @brief Create running hash on given data.
- *
- * Configures the HASHCRYPT to compute new running hash as AHB master
- * and returns immediately. HASHCRYPT AHB Master mode supports only aligned \p input
- * address and can be called only once per continuous block of data. Every call to this function
- * must be preceded with HASHCRYPT_SHA_Init() and finished with HASHCRYPT_SHA_Finish().
- * Once callback function is invoked by HASHCRYPT isr, it should set a flag
- * for the main application to finalize the hashing (padding) and to read out the final digest
- * by calling HASHCRYPT_SHA_Finish().
- *
- * @param base HASHCRYPT peripheral base address
- * @param ctx Specifies callback. Last incomplete 512-bit block of the input is copied into clear buffer for padding.
- * @param input 32-bit word aligned pointer to Input data.
- * @param inputSize Size of input data in bytes (must be word aligned)
- * @return Status of the hash update operation.
- */
-status_t HASHCRYPT_SHA_UpdateNonBlocking(HASHCRYPT_Type *base,
- hashcrypt_hash_ctx_t *ctx,
- const uint8_t *input,
- size_t inputSize);
-/*!
- *@}
- */ /* end of hashcrypt_background_driver_hash */
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* _FSL_HASHCRYPT_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_iap.c b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_iap.c
deleted file mode 100755
index 650bb6045f..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_iap.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Copyright 2018 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#include "fsl_iap.h"
-#include "fsl_iap_ffr.h"
-#include "fsl_device_registers.h"
-/* Component ID definition, used by tools. */
-#ifndef FSL_COMPONENT_ID
-#define FSL_COMPONENT_ID "platform.drivers.iap1"
-#endif
-
-/*!
- * @addtogroup flash_driver_api
- * @{
- */
-
-#define ROM_API_TREE ((uint32_t *)0x130010f0)
-#define BOOTLOADER_API_TREE_POINTER ((bootloader_tree_t *)ROM_API_TREE)
-
-static uint32_t S_VersionMajor = 0;
-
-typedef status_t (*EraseCommend_t)(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, uint32_t key);
-typedef status_t (*ProgramCommend_t)(flash_config_t *config, uint32_t start, uint8_t *src, uint32_t lengthInBytes);
-typedef status_t (*VerifyProgramCommend_t)(flash_config_t *config,
- uint32_t start,
- uint32_t lengthInBytes,
- const uint8_t *expectedData,
- uint32_t *failedAddress,
- uint32_t *failedData);
-/*
- *!@brief Structure of version property.
- *
- *!@ingroup bl_core
- */
-typedef union StandardVersion
-{
- struct
- {
- uint32_t bugfix : 8; /*!< bugfix version [7:0] */
- uint32_t minor : 8; /*!< minor version [15:8] */
- uint32_t major : 8; /*!< major version [23:16] */
- uint32_t name : 8; /*!< name [31:24] */
- };
- uint32_t version; /*!< combined version numbers. */
-#if defined(__cplusplus)
- StandardVersion() : version(0)
- {
- }
- StandardVersion(uint32_t version) : version(version)
- {
- }
-#endif
-} standard_version_t;
-
-/*! @brief Interface for the flash driver.*/
-typedef struct FlashDriverInterface
-{
- standard_version_t version; /*!< flash driver API version number.*/
-
- /*!< Flash driver.*/
- status_t (*flash_init)(flash_config_t *config);
- status_t (*flash_erase)(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, uint32_t key);
- status_t (*flash_program)(flash_config_t *config, uint32_t start, uint8_t *src, uint32_t lengthInBytes);
- status_t (*flash_verify_erase)(flash_config_t *config, uint32_t start, uint32_t lengthInBytes);
- status_t (*flash_verify_program)(flash_config_t *config,
- uint32_t start,
- uint32_t lengthInBytes,
- const uint8_t *expectedData,
- uint32_t *failedAddress,
- uint32_t *failedData);
- status_t (*flash_get_property)(flash_config_t *config, flash_property_tag_t whichProperty, uint32_t *value);
- status_t (*flash_erase_with_checker)(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, uint32_t key);
- status_t (*flash_program_with_checker)(flash_config_t *config,
- uint32_t start,
- uint8_t *src,
- uint32_t lengthInBytes);
- status_t (*flash_verify_program_with_checker)(flash_config_t *config,
- uint32_t start,
- uint32_t lengthInBytes,
- const uint8_t *expectedData,
- uint32_t *failedAddress,
- uint32_t *failedData);
- /*!< Flash FFR driver*/
- status_t (*ffr_init)(flash_config_t *config);
- status_t (*ffr_deinit)(flash_config_t *config);
- status_t (*ffr_cust_factory_page_write)(flash_config_t *config, uint8_t *page_data, bool seal_part);
- status_t (*ffr_get_uuid)(flash_config_t *config, uint8_t *uuid);
- status_t (*ffr_get_customer_data)(flash_config_t *config, uint8_t *pData, uint32_t offset, uint32_t len);
- status_t (*ffr_keystore_write)(flash_config_t *config, ffr_key_store_t *pKeyStore);
- status_t (*ffr_keystore_get_ac)(flash_config_t *config, uint8_t *pActivationCode);
- status_t (*ffr_keystore_get_kc)(flash_config_t *config, uint8_t *pKeyCode, ffr_key_type_t keyIndex);
- status_t (*ffr_infield_page_write)(flash_config_t *config, uint8_t *page_data, uint32_t valid_len);
- status_t (*ffr_get_customer_infield_data)(flash_config_t *config, uint8_t *pData, uint32_t offset, uint32_t len);
-} flash_driver_interface_t;
-
-/*!
- * @brief Root of the bootloader API tree.
- *
- * An instance of this struct resides in read-only memory in the bootloader. It
- * provides a user application access to APIs exported by the bootloader.
- *
- * @note The order of existing fields must not be changed.
- */
-typedef struct BootloaderTree
-{
- void (*runBootloader)(void *arg); /*!< Function to start the bootloader executing. */
- standard_version_t bootloader_version; /*!< Bootloader version number. */
- const char *copyright; /*!< Copyright string. */
- const uint32_t *reserved; /*!< Do NOT use. */
- const flash_driver_interface_t *flashDriver; /*!< Flash driver API. */
-} bootloader_tree_t;
-
-/*******************************************************************************
- * Variables
- ******************************************************************************/
-
-/*! @brief Global pointer to the flash driver API table in ROM. */
-flash_driver_interface_t *FLASH_API_TREE;
-/*! Get pointer to flash driver API table in ROM. */
-#define FLASH_API_TREE BOOTLOADER_API_TREE_POINTER->flashDriver
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-/*! See fsl_iap.h for documentation of this function. */
-status_t FLASH_Init(flash_config_t *config)
-{
- assert(FLASH_API_TREE);
- config->modeConfig.sysFreqInMHz = kSysToFlashFreq_defaultInMHz;
- S_VersionMajor = BOOTLOADER_API_TREE_POINTER->bootloader_version.major;
- return FLASH_API_TREE->flash_init(config);
-}
-
-/*! See fsl_iap.h for documentation of this function. */
-status_t FLASH_Erase(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, uint32_t key)
-{
- if (S_VersionMajor == 2)
- {
- EraseCommend_t EraseCommand =
- (EraseCommend_t)(0x1300413b); /*!< get the flash erase api location adress int rom */
- return EraseCommand(config, start, lengthInBytes, key);
- }
- else
- {
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->flash_erase(config, start, lengthInBytes, key);
- }
-}
-
-/*! See fsl_iap.h for documentation of this function. */
-status_t FLASH_Program(flash_config_t *config, uint32_t start, uint8_t *src, uint32_t lengthInBytes)
-{
- if (S_VersionMajor == 2)
- {
- ProgramCommend_t ProgramCommend =
- (ProgramCommend_t)(0x1300419d); /*!< get the flash program api location adress in rom*/
- return ProgramCommend(config, start, src, lengthInBytes);
- }
- else
- {
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->flash_program(config, start, src, lengthInBytes);
- }
-}
-
-/*! See fsl_iap.h for documentation of this function. */
-status_t FLASH_VerifyErase(flash_config_t *config, uint32_t start, uint32_t lengthInBytes)
-{
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->flash_verify_erase(config, start, lengthInBytes);
-}
-
-/*! See fsl_iap.h for documentation of this function. */
-status_t FLASH_VerifyProgram(flash_config_t *config,
- uint32_t start,
- uint32_t lengthInBytes,
- const uint8_t *expectedData,
- uint32_t *failedAddress,
- uint32_t *failedData)
-{
- if (S_VersionMajor == 2)
- {
- VerifyProgramCommend_t VerifyProgramCommend =
- (VerifyProgramCommend_t)(0x1300427d); /*!< get the flash verify program api location adress in
- rom*/
- return VerifyProgramCommend(config, start, lengthInBytes, expectedData, failedAddress, failedData);
- }
- else
- {
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->flash_verify_program(config, start, lengthInBytes, expectedData, failedAddress,
- failedData);
- }
-}
-
-/*! See fsl_iap.h for documentation of this function.*/
-status_t FLASH_GetProperty(flash_config_t *config, flash_property_tag_t whichProperty, uint32_t *value)
-{
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->flash_get_property(config, whichProperty, value);
-}
-/********************************************************************************
- * fsl iap ffr CODE
- *******************************************************************************/
-
-/*! See fsl_iap_ffr.h for documentation of this function. */
-status_t FFR_Init(flash_config_t *config)
-{
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->ffr_init(config);
-}
-
-/*! See fsl_iap_ffr.h for documentation of this function. */
-status_t FFR_Deinit(flash_config_t *config)
-{
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->ffr_deinit(config);
-}
-
-/*! See fsl_iap_ffr.h for documentation of this function. */
-status_t FFR_CustFactoryPageWrite(flash_config_t *config, uint8_t *page_data, bool seal_part)
-{
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->ffr_cust_factory_page_write(config, page_data, seal_part);
-}
-
-/*! See fsl_iap_ffr.h for documentation of this function. */
-status_t FFR_GetUUID(flash_config_t *config, uint8_t *uuid)
-{
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->ffr_get_uuid(config, uuid);
-}
-
-/*! See fsl_iap_ffr.h for documentation of this function. */
-status_t FFR_GetCustomerData(flash_config_t *config, uint8_t *pData, uint32_t offset, uint32_t len)
-{
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->ffr_get_customer_data(config, pData, offset, len);
-}
-
-/*! See fsl_iap_ffr.h for documentation of this function. */
-status_t FFR_KeystoreWrite(flash_config_t *config, ffr_key_store_t *pKeyStore)
-{
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->ffr_keystore_write(config, pKeyStore);
-}
-
-/*! See fsl_iap_ffr.h for documentation of this function. */
-status_t FFR_KeystoreGetAC(flash_config_t *config, uint8_t *pActivationCode)
-{
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->ffr_keystore_get_ac(config, pActivationCode);
-}
-
-/*! See fsl_iap_ffr.h for documentation of this function. */
-status_t FFR_KeystoreGetKC(flash_config_t *config, uint8_t *pKeyCode, ffr_key_type_t keyIndex)
-{
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->ffr_keystore_get_kc(config, pKeyCode, keyIndex);
-}
-
-/*! See fsl_iap_ffr.h for documentation of this function. */
-status_t FFR_InfieldPageWrite(flash_config_t *config, uint8_t *page_data, uint32_t valid_len)
-{
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->ffr_infield_page_write(config, page_data, valid_len);
-}
-
-/*! See fsl_iap_ffr.h for documentation of this function. */
-status_t FFR_GetCustomerInfieldData(flash_config_t *config, uint8_t *pData, uint32_t offset, uint32_t len)
-{
- assert(FLASH_API_TREE);
- return FLASH_API_TREE->ffr_get_customer_infield_data(config, pData, offset, len);
-}
-
-/*! @}*/
-
-/********************************************************************************
- * EOF
- *******************************************************************************/
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_iap.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_iap.h
deleted file mode 100755
index c57f667078..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_iap.h
+++ /dev/null
@@ -1,498 +0,0 @@
-/*
- * Copyright 2018 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#ifndef __FSL_IAP_H_
-#define __FSL_IAP_H_
-
-#include "fsl_common.h"
-/*!
- * @addtogroup flash_driver
- * @{
- */
-
-/*! @file */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-/*!
- * @name Flash version
- * @{
- */
-/*! @brief Constructs the version number for drivers. */
-#if !defined(MAKE_VERSION)
-#define MAKE_VERSION(major, minor, bugfix) (((major) << 16) | ((minor) << 8) | (bugfix))
-#endif
-
-/*! @brief Flash driver version for SDK*/
-#define FSL_FLASH_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) /*!< Version 2.0.0. */
-
-/*! @brief Flash driver version for ROM*/
-enum _flash_driver_version_constants
-{
- kFLASH_DriverVersionName = 'F', /*!< Flash driver version name.*/
- kFLASH_DriverVersionMajor = 2, /*!< Major flash driver version.*/
- kFLASH_DriverVersionMinor = 0, /*!< Minor flash driver version.*/
- kFLASH_DriverVersionBugfix = 0 /*!< Bugfix for flash driver version.*/
-};
-
-/*@}*/
-
-/*!
- * @name Flash configuration
- * @{
- */
-/*! @brief Flash IP Type. */
-#if !defined(FSL_FEATURE_FLASH_IP_IS_C040HD_ATFC)
-#define FSL_FEATURE_FLASH_IP_IS_C040HD_ATFC (1)
-#endif
-#if !defined(FSL_FEATURE_FLASH_IP_IS_C040HD_FC)
-#define FSL_FEATURE_FLASH_IP_IS_C040HD_FC (0)
-#endif
-
-/*!
- * @name Flash status
- * @{
- */
-/*! @brief Flash driver status group. */
-#if defined(kStatusGroup_FlashDriver)
-#define kStatusGroupGeneric kStatusGroup_Generic
-#define kStatusGroupFlashDriver kStatusGroup_FlashDriver
-#elif defined(kStatusGroup_FLASHIAP)
-#define kStatusGroupGeneric kStatusGroup_Generic
-#define kStatusGroupFlashDriver kStatusGroup_FLASH
-#else
-#define kStatusGroupGeneric 0
-#define kStatusGroupFlashDriver 1
-#endif
-
-/*! @brief Constructs a status code value from a group and a code number. */
-#if !defined(MAKE_STATUS)
-#define MAKE_STATUS(group, code) ((((group)*100) + (code)))
-#endif
-
-/*!
- * @brief Flash driver status codes.
- */
-enum _flash_status
-{
- kStatus_FLASH_Success = MAKE_STATUS(kStatusGroupGeneric, 0), /*!< API is executed successfully*/
- kStatus_FLASH_InvalidArgument = MAKE_STATUS(kStatusGroupGeneric, 4), /*!< Invalid argument*/
- kStatus_FLASH_SizeError = MAKE_STATUS(kStatusGroupFlashDriver, 0), /*!< Error size*/
- kStatus_FLASH_AlignmentError =
- MAKE_STATUS(kStatusGroupFlashDriver, 1), /*!< Parameter is not aligned with the specified baseline*/
- kStatus_FLASH_AddressError = MAKE_STATUS(kStatusGroupFlashDriver, 2), /*!< Address is out of range */
- kStatus_FLASH_AccessError =
- MAKE_STATUS(kStatusGroupFlashDriver, 3), /*!< Invalid instruction codes and out-of bound addresses */
- kStatus_FLASH_ProtectionViolation = MAKE_STATUS(
- kStatusGroupFlashDriver, 4), /*!< The program/erase operation is requested to execute on protected areas */
- kStatus_FLASH_CommandFailure =
- MAKE_STATUS(kStatusGroupFlashDriver, 5), /*!< Run-time error during command execution. */
- kStatus_FLASH_UnknownProperty = MAKE_STATUS(kStatusGroupFlashDriver, 6), /*!< Unknown property.*/
- kStatus_FLASH_EraseKeyError = MAKE_STATUS(kStatusGroupFlashDriver, 7), /*!< API erase key is invalid.*/
- kStatus_FLASH_RegionExecuteOnly =
- MAKE_STATUS(kStatusGroupFlashDriver, 8), /*!< The current region is execute-only.*/
- kStatus_FLASH_ExecuteInRamFunctionNotReady =
- MAKE_STATUS(kStatusGroupFlashDriver, 9), /*!< Execute-in-RAM function is not available.*/
-
- kStatus_FLASH_CommandNotSupported = MAKE_STATUS(kStatusGroupFlashDriver, 11), /*!< Flash API is not supported.*/
- kStatus_FLASH_ReadOnlyProperty = MAKE_STATUS(kStatusGroupFlashDriver, 12), /*!< The flash property is read-only.*/
- kStatus_FLASH_InvalidPropertyValue =
- MAKE_STATUS(kStatusGroupFlashDriver, 13), /*!< The flash property value is out of range.*/
- kStatus_FLASH_InvalidSpeculationOption =
- MAKE_STATUS(kStatusGroupFlashDriver, 14), /*!< The option of flash prefetch speculation is invalid.*/
- kStatus_FLASH_EccError = MAKE_STATUS(kStatusGroupFlashDriver,
- 0x10), /*!< A correctable or uncorrectable error during command execution. */
- kStatus_FLASH_CompareError =
- MAKE_STATUS(kStatusGroupFlashDriver, 0x11), /*!< Destination and source memory contents do not match. */
- kStatus_FLASH_RegulationLoss = MAKE_STATUS(kStatusGroupFlashDriver, 0x12), /*!< A loss of regulation during read. */
- kStatus_FLASH_InvalidWaitStateCycles =
- MAKE_STATUS(kStatusGroupFlashDriver, 0x13), /*!< The wait state cycle set to r/w mode is invalid. */
-
- kStatus_FLASH_OutOfDateCfpaPage =
- MAKE_STATUS(kStatusGroupFlashDriver, 0x20), /*!< CFPA page version is out of date. */
- kStatus_FLASH_BlankIfrPageData = MAKE_STATUS(kStatusGroupFlashDriver, 0x21), /*!< Blank page cannnot be read. */
- kStatus_FLASH_EncryptedRegionsEraseNotDoneAtOnce =
- MAKE_STATUS(kStatusGroupFlashDriver, 0x22), /*!< Encrypted flash subregions are not erased at once. */
- kStatus_FLASH_ProgramVerificationNotAllowed = MAKE_STATUS(
- kStatusGroupFlashDriver, 0x23), /*!< Program verification is not allowed when the encryption is enabled. */
- kStatus_FLASH_HashCheckError =
- MAKE_STATUS(kStatusGroupFlashDriver, 0x24), /*!< Hash check of page data is failed. */
- kStatus_FLASH_SealedFfrRegion = MAKE_STATUS(kStatusGroupFlashDriver, 0x25), /*!< The FFR region is sealed. */
- kStatus_FLASH_FfrRegionWriteBroken = MAKE_STATUS(
- kStatusGroupFlashDriver, 0x26), /*!< The FFR Spec region is not allowed to be written discontinuously. */
- kStatus_FLASH_NmpaAccessNotAllowed =
- MAKE_STATUS(kStatusGroupFlashDriver, 0x27), /*!< The NMPA region is not allowed to be read/written/erased. */
- kStatus_FLASH_CmpaCfgDirectEraseNotAllowed =
- MAKE_STATUS(kStatusGroupFlashDriver, 0x28), /*!< The CMPA Cfg region is not allowed to be erased directly. */
- kStatus_FLASH_FfrBankIsLocked = MAKE_STATUS(kStatusGroupFlashDriver, 0x29), /*!< The FFR bank region is locked. */
-};
-/*@}*/
-
-/*!
- * @name Flash API key
- * @{
- */
-/*! @brief Constructs the four character code for the Flash driver API key. */
-#if !defined(FOUR_CHAR_CODE)
-#define FOUR_CHAR_CODE(a, b, c, d) (((d) << 24) | ((c) << 16) | ((b) << 8) | ((a)))
-#endif
-
-/*!
- * @brief Enumeration for Flash driver API keys.
- *
- * @note The resulting value is built with a byte order such that the string
- * being readable in expected order when viewed in a hex editor, if the value
- * is treated as a 32-bit little endian value.
- */
-enum _flash_driver_api_keys
-{
- kFLASH_ApiEraseKey = FOUR_CHAR_CODE('l', 'f', 'e', 'k') /*!< Key value used to validate all flash erase APIs.*/
-};
-/*@}*/
-
-/*!
- * @brief Enumeration for various flash properties.
- */
-typedef enum _flash_property_tag
-{
- kFLASH_PropertyPflashSectorSize = 0x00U, /*!< Pflash sector size property.*/
- kFLASH_PropertyPflashTotalSize = 0x01U, /*!< Pflash total size property.*/
- kFLASH_PropertyPflashBlockSize = 0x02U, /*!< Pflash block size property.*/
- kFLASH_PropertyPflashBlockCount = 0x03U, /*!< Pflash block count property.*/
- kFLASH_PropertyPflashBlockBaseAddr = 0x04U, /*!< Pflash block base address property.*/
-
- kFLASH_PropertyPflashPageSize = 0x30U, /*!< Pflash page size property.*/
- kFLASH_PropertyPflashSystemFreq = 0x31U, /*!< System Frequency System Frequency.*/
-
- kFLASH_PropertyFfrSectorSize = 0x40U, /*!< FFR sector size property.*/
- kFLASH_PropertyFfrTotalSize = 0x41U, /*!< FFR total size property.*/
- kFLASH_PropertyFfrBlockBaseAddr = 0x42U, /*!< FFR block base address property.*/
- kFLASH_PropertyFfrPageSize = 0x43U, /*!< FFR page size property.*/
-} flash_property_tag_t;
-
-/*!
- * @brief Enumeration for flash max pages to erase.
- */
-enum _flash_max_erase_page_value
-{
- kFLASH_MaxPagesToErase = 100U /*!< The max value in pages to erase. */
-};
-
-/*!
- * @brief Enumeration for flash alignment property.
- */
-enum _flash_alignment_property
-{
- kFLASH_AlignementUnitVerifyErase = 4, /*!< The alignment unit in bytes used for verify erase operation.*/
- kFLASH_AlignementUnitProgram = 512, /*!< The alignment unit in bytes used for program operation.*/
- /*kFLASH_AlignementUnitVerifyProgram = 4,*/ /*!< The alignment unit in bytes used for verify program operation.*/
- kFLASH_AlignementUnitSingleWordRead = 16 /*!< The alignment unit in bytes used for SingleWordRead command.*/
-};
-
-/*!
- * @brief Enumeration for flash read ecc option
- */
-enum _flash_read_ecc_option
-{
- kFLASH_ReadWithEccOn = 0, /*! ECC is on */
- kFLASH_ReadWithEccOff = 1, /*! ECC is off */
-};
-
-/* set flash Controller timing before flash init */
-enum _flash_freq_tag
-{
- kSysToFlashFreq_lowInMHz = 12u,
- kSysToFlashFreq_defaultInMHz = 96u,
-};
-
-/*!
- * @brief Enumeration for flash read margin option
- */
-enum _flash_read_margin_option
-{
- kFLASH_ReadMarginNormal = 0, /*!< Normal read */
- kFLASH_ReadMarginVsProgram = 1, /*!< Margin vs. program */
- kFLASH_ReadMarginVsErase = 2, /*!< Margin vs. erase */
- kFLASH_ReadMarginIllegalBitCombination = 3 /*!< Illegal bit combination */
-};
-
-/*!
- * @brief Enumeration for flash read dmacc option
- */
-enum _flash_read_dmacc_option
-{
- kFLASH_ReadDmaccDisabled = 0, /*!< Memory word */
- kFLASH_ReadDmaccEnabled = 1, /*!< DMACC word */
-};
-
-/*!
- * @brief Enumeration for flash ramp control option
- */
-enum _flash_ramp_control_option
-{
- kFLASH_RampControlDivisionFactorReserved = 0, /*!< Reserved */
- kFLASH_RampControlDivisionFactor256 = 1, /*!< clk48mhz / 256 = 187.5KHz */
- kFLASH_RampControlDivisionFactor128 = 2, /*!< clk48mhz / 128 = 375KHz */
- kFLASH_RampControlDivisionFactor64 = 3 /*!< clk48mhz / 64 = 750KHz */
-};
-
-/*! @brief Flash ECC log info. */
-typedef struct _flash_ecc_log
-{
- uint32_t firstEccEventAddress;
- uint32_t eccErrorCount;
- uint32_t eccCorrectionCount;
- uint32_t reserved;
-} flash_ecc_log_t;
-
-/*! @brief Flash controller paramter config. */
-typedef struct _flash_mode_config
-{
- uint32_t sysFreqInMHz;
- /* ReadSingleWord parameter. */
- struct
- {
- uint8_t readWithEccOff : 1;
- uint8_t readMarginLevel : 2;
- uint8_t readDmaccWord : 1;
- uint8_t reserved0 : 4;
- uint8_t reserved1[3];
- } readSingleWord;
- /* SetWriteMode parameter. */
- struct
- {
- uint8_t programRampControl;
- uint8_t eraseRampControl;
- uint8_t reserved[2];
- } setWriteMode;
- /* SetReadMode parameter. */
- struct
- {
- uint16_t readInterfaceTimingTrim;
- uint16_t readControllerTimingTrim;
- uint8_t readWaitStates;
- uint8_t reserved[3];
- } setReadMode;
-} flash_mode_config_t;
-
-/*! @brief Flash controller paramter config. */
-typedef struct _flash_ffr_config
-{
- uint32_t ffrBlockBase;
- uint32_t ffrTotalSize;
- uint32_t ffrPageSize;
- uint32_t cfpaPageVersion;
- uint32_t cfpaPageOffset;
-} flash_ffr_config_t;
-
-/*! @brief Flash driver state information.
- *
- * An instance of this structure is allocated by the user of the flash driver and
- * passed into each of the driver APIs.
- */
-typedef struct _flash_config
-{
- uint32_t PFlashBlockBase; /*!< A base address of the first PFlash block */
- uint32_t PFlashTotalSize; /*!< The size of the combined PFlash block. */
- uint32_t PFlashBlockCount; /*!< A number of PFlash blocks. */
- uint32_t PFlashPageSize; /*!< The size in bytes of a page of PFlash. */
- uint32_t PFlashSectorSize; /*!< The size in bytes of a sector of PFlash. */
- flash_ffr_config_t ffrConfig;
- flash_mode_config_t modeConfig;
-} flash_config_t;
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/*!
- * @name Initialization
- * @{
- */
-
-/*!
- * @brief Initializes the global flash properties structure members.
- *
- * This function checks and initializes the Flash module for the other Flash APIs.
- *
- * @param config Pointer to the storage for the driver runtime state.
- *
- * @retval #kStatus_FLASH_Success API was executed successfully.
- * @retval #kStatus_FLASH_InvalidArgument An invalid argument is provided.
- * @retval #kStatus_FLASH_CommandFailure Run-time error during the command execution.
- * @retval #kStatus_FLASH_CommandNotSupported Flash API is not supported.
- * @retval #kStatus_FLASH_EccError A correctable or uncorrectable error during command execution.
- */
-status_t FLASH_Init(flash_config_t *config);
-
-/*@}*/
-
-/*!
- * @name Erasing
- * @{
- */
-
-/*!
- * @brief Erases the flash sectors encompassed by parameters passed into function.
- *
- * This function erases the appropriate number of flash sectors based on the
- * desired start address and length.
- *
- * @param config The pointer to the storage for the driver runtime state.
- * @param start The start address of the desired flash memory to be erased.
- * The start address does not need to be sector-aligned.
- * @param lengthInBytes The length, given in bytes (not words or long-words)
- * to be erased. Must be word-aligned.
- * @param key The value used to validate all flash erase APIs.
- *
- * @retval #kStatus_FLASH_Success API was executed successfully.
- * @retval #kStatus_FLASH_InvalidArgument An invalid argument is provided.
- * @retval #kStatus_FLASH_AlignmentError The parameter is not aligned with the specified baseline.
- * @retval #kStatus_FLASH_AddressError The address is out of range.
- * @retval #kStatus_FLASH_EraseKeyError The API erase key is invalid.
- * @retval #kStatus_FLASH_CommandFailure Run-time error during the command execution.
- * @retval #kStatus_FLASH_CommandNotSupported Flash API is not supported.
- * @retval #kStatus_FLASH_EccError A correctable or uncorrectable error during command execution.
- */
-status_t FLASH_Erase(flash_config_t *config, uint32_t start, uint32_t lengthInBytes, uint32_t key);
-
-/*@}*/
-
-/*!
- * @name Programming
- * @{
- */
-
-/*!
- * @brief Programs flash with data at locations passed in through parameters.
- *
- * This function programs the flash memory with the desired data for a given
- * flash area as determined by the start address and the length.
- *
- * @param config A pointer to the storage for the driver runtime state.
- * @param start The start address of the desired flash memory to be programmed. Must be
- * word-aligned.
- * @param src A pointer to the source buffer of data that is to be programmed
- * into the flash.
- * @param lengthInBytes The length, given in bytes (not words or long-words),
- * to be programmed. Must be word-aligned.
- *
- * @retval #kStatus_FLASH_Success API was executed successfully.
- * @retval #kStatus_FLASH_InvalidArgument An invalid argument is provided.
- * @retval #kStatus_FLASH_AlignmentError Parameter is not aligned with the specified baseline.
- * @retval #kStatus_FLASH_AddressError Address is out of range.
- * @retval #kStatus_FLASH_AccessError Invalid instruction codes and out-of bounds addresses.
- * @retval #kStatus_FLASH_CommandFailure Run-time error during the command execution.
- * @retval #kStatus_FLASH_CommandFailure Run-time error during the command execution.
- * @retval #kStatus_FLASH_CommandNotSupported Flash API is not supported.
- * @retval #kStatus_FLASH_EccError A correctable or uncorrectable error during command execution.
- */
-status_t FLASH_Program(flash_config_t *config, uint32_t start, uint8_t *src, uint32_t lengthInBytes);
-
-/*@}*/
-
-/*!
- * @name Verification
- * @{
- */
-
-/*!
- * @brief Verifies an erasure of the desired flash area at a specified margin level.
- *
- * This function checks the appropriate number of flash sectors based on
- * the desired start address and length to check whether the flash is erased
- * to the specified read margin level.
- *
- * @param config A pointer to the storage for the driver runtime state.
- * @param start The start address of the desired flash memory to be verified.
- * The start address does not need to be sector-aligned but must be word-aligned.
- * @param lengthInBytes The length, given in bytes (not words or long-words),
- * to be verified. Must be word-aligned.
- * @param margin Read margin choice.
- *
- * @retval #kStatus_FLASH_Success API was executed successfully.
- * @retval #kStatus_FLASH_InvalidArgument An invalid argument is provided.
- * @retval #kStatus_FLASH_AlignmentError Parameter is not aligned with specified baseline.
- * @retval #kStatus_FLASH_AddressError Address is out of range.
- * @retval #kStatus_FLASH_AccessError Invalid instruction codes and out-of bounds addresses.
- * @retval #kStatus_FLASH_CommandFailure Run-time error during the command execution.
- * @retval #kStatus_FLASH_CommandFailure Run-time error during the command execution.
- * @retval #kStatus_FLASH_CommandNotSupported Flash API is not supported.
- * @retval #kStatus_FLASH_EccError A correctable or uncorrectable error during command execution.
- */
-status_t FLASH_VerifyErase(flash_config_t *config, uint32_t start, uint32_t lengthInBytes);
-
-/*!
- * @brief Verifies programming of the desired flash area at a specified margin level.
- *
- * This function verifies the data programed in the flash memory using the
- * Flash Program Check Command and compares it to the expected data for a given
- * flash area as determined by the start address and length.
- *
- * @param config A pointer to the storage for the driver runtime state.
- * @param start The start address of the desired flash memory to be verified. Must be word-aligned.
- * @param lengthInBytes The length, given in bytes (not words or long-words),
- * to be verified. Must be word-aligned.
- * @param expectedData A pointer to the expected data that is to be
- * verified against.
- * @param margin Read margin choice.
- * @param failedAddress A pointer to the returned failing address.
- * @param failedData A pointer to the returned failing data. Some derivatives do
- * not include failed data as part of the FCCOBx registers. In this
- * case, zeros are returned upon failure.
- *
- * @retval #kStatus_FLASH_Success API was executed successfully.
- * @retval #kStatus_FLASH_InvalidArgument An invalid argument is provided.
- * @retval #kStatus_FLASH_AlignmentError Parameter is not aligned with specified baseline.
- * @retval #kStatus_FLASH_AddressError Address is out of range.
- * @retval #kStatus_FLASH_AccessError Invalid instruction codes and out-of bounds addresses.
- * @retval #kStatus_FLASH_CommandFailure Run-time error during the command execution.
- * @retval #kStatus_FLASH_CommandFailure Run-time error during the command execution.
- * @retval #kStatus_FLASH_CommandNotSupported Flash API is not supported.
- * @retval #kStatus_FLASH_EccError A correctable or uncorrectable error during command execution.
- */
-status_t FLASH_VerifyProgram(flash_config_t *config,
- uint32_t start,
- uint32_t lengthInBytes,
- const uint8_t *expectedData,
- uint32_t *failedAddress,
- uint32_t *failedData);
-
-/*@}*/
-
-/*!
- * @name Properties
- * @{
- */
-
-/*!
- * @brief Returns the desired flash property.
- *
- * @param config A pointer to the storage for the driver runtime state.
- * @param whichProperty The desired property from the list of properties in
- * enum flash_property_tag_t
- * @param value A pointer to the value returned for the desired flash property.
- *
- * @retval #kStatus_FLASH_Success API was executed successfully.
- * @retval #kStatus_FLASH_InvalidArgument An invalid argument is provided.
- * @retval #kStatus_FLASH_UnknownProperty An unknown property tag.
- */
-status_t FLASH_GetProperty(flash_config_t *config, flash_property_tag_t whichProperty, uint32_t *value);
-
-/*@}*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __FLASH_FLASH_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_iap_ffr.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_iap_ffr.h
deleted file mode 100755
index 9d2b2311af..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_iap_ffr.h
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright 2018 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#ifndef __FSL_IAP_FFR_H_
-#define __FSL_IAP_FFR_H_
-
-#include "fsl_iap.h"
-
-/*!
- * @addtogroup flash_ifr_driver
- * @{
- */
-
-/*! @file */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-/*!
- * @name Flash IFR version
- * @{
- */
-/*! @brief Flash IFR driver version for SDK*/
-#define FSL_FLASH_IFR_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) /*!< Version 2.0.0. */
-/*@}*/
-
-/*! @brief Alignment(down) utility. */
-#if !defined(ALIGN_DOWN)
-#define ALIGN_DOWN(x, a) ((x) & (uint32_t)(-((int32_t)(a))))
-#endif
-
-/*! @brief Alignment(up) utility. */
-#if !defined(ALIGN_UP)
-#define ALIGN_UP(x, a) (-((int32_t)((uint32_t)(-((int32_t)(x))) & (uint32_t)(-((int32_t)(a))))))
-#endif
-
-#define FLASH_FFR_MAX_PAGE_SIZE (512u)
-#define FLASH_FFR_HASH_DIGEST_SIZE (32u)
-#define FLASH_FFR_IV_CODE_SIZE (52u)
-
-enum _flash_ffr_page_offset
-{
- kFfrPageOffset_CFPA = 0, /*!< Customer In-Field programmed area*/
- kFfrPageOffset_CFPA_Scratch = 0, /*!< CFPA Scratch page */
- kFfrPageOffset_CFPA_Cfg = 1, /*!< CFPA Configuration area (Ping page)*/
- kFfrPageOffset_CFPA_CfgPong = 2, /*!< Same as CFPA page (Pong page)*/
-
- kFfrPageOffset_CMPA = 3, /*!< Customer Manufacturing programmed area*/
- kFfrPageOffset_CMPA_Cfg = 3, /*!< CMPA Configuration area (Part of CMPA)*/
- kFfrPageOffset_CMPA_Key = 4, /*!< Key Store area (Part of CMPA)*/
-
- kFfrPageOffset_NMPA = 7, /*!< NXP Manufacturing programmed area*/
- kFfrPageOffset_NMPA_Romcp = 7, /*!< ROM patch area (Part of NMPA)*/
- kFfrPageOffset_NMPA_Repair = 9, /*!< Repair area (Part of NMPA)*/
- kFfrPageOffset_NMPA_Cfg = 15, /*!< NMPA configuration area (Part of NMPA)*/
- kFfrPageOffset_NMPA_End = 16, /*!< Reserved (Part of NMPA)*/
-};
-
-enum _flash_ffr_page_num
-{
- kFfrPageNum_CFPA = 3, /*!< Customer In-Field programmed area*/
- kFfrPageNum_CMPA = 4, /*!< Customer Manufacturing programmed area*/
- kFfrPageNum_NMPA = 10, /*!< NXP Manufacturing programmed area*/
-
- kFfrPageNum_CMPA_Cfg = 1,
- kFfrPageNum_CMPA_Key = 3,
- kFfrPageNum_NMPA_Romcp = 2,
-
- kFfrPageNum_SpecArea = kFfrPageNum_CFPA + kFfrPageNum_CMPA,
- kFfrPageNum_Total = (kFfrPageNum_CFPA + kFfrPageNum_CMPA + kFfrPageNum_NMPA),
-};
-
-enum _flash_ffr_block_size
-{
- kFfrBlockSize_Key = 52u,
- kFfrBlockSize_ActivationCode = 1192u,
-};
-
-typedef enum _cfpa_cfg_cmpa_prog_process
-{
- kFfrCmpaProgProcess_Pre = 0x0u,
- kFfrCmpaProgProcess_Post = 0xFFFFFFFFu,
-} cmpa_prog_process_t;
-
-typedef struct _cfpa_cfg_iv_code
-{
- uint32_t keycodeHeader;
- uint8_t reserved[FLASH_FFR_IV_CODE_SIZE];
-} cfpa_cfg_iv_code_t;
-
-typedef struct _cfpa_cfg_info
-{
- uint32_t header; /*!< [0x000-0x003] */
- uint32_t version; /*!< [0x004-0x007 */
- uint32_t secureFwVersion; /*!< [0x008-0x00b */
- uint32_t nsFwVersion; /*!< [0x00c-0x00f] */
- uint32_t imageKeyRevoke; /*!< [0x010-0x013] */
- uint8_t reserved0[4]; /*!< [0x014-0x017] */
- uint32_t rotkhRevoke; /*!< [0x018-0x01b] */
- uint32_t vendorUsage; /*!< [0x01c-0x01f] */
- uint32_t dcfgNsPin; /*!< [0x020-0x013] */
- uint32_t dcfgNsDflt; /*!< [0x024-0x017] */
- uint32_t enableFaMode; /*!< [0x028-0x02b] */
- uint8_t reserved1[4]; /*!< [0x02c-0x02f] */
- cfpa_cfg_iv_code_t ivCodePrinceRegion[3]; /*!< [0x030-0x0d7] */
- uint8_t reserved2[264]; /*!< [0x0d8-0x1df] */
- uint8_t sha256[32]; /*!< [0x1e0-0x1ff] */
-} cfpa_cfg_info_t;
-
-#define FFR_BOOTCFG_BOOTSPEED_MASK (0x18U)
-#define FFR_BOOTCFG_BOOTSPEED_SHIFT (7U)
-#define FFR_BOOTCFG_BOOTSPEED_48MHZ (0x0U)
-#define FFR_BOOTCFG_BOOTSPEED_96MHZ (0x1U)
-
-#define FFR_USBID_VENDORID_MASK (0xFFFFU)
-#define FFR_USBID_VENDORID_SHIFT (0U)
-#define FFR_USBID_PRODUCTID_MASK (0xFFFF0000U)
-#define FFR_USBID_PRODUCTID_SHIFT (16U)
-
-typedef struct _cmpa_cfg_info
-{
- uint32_t bootCfg; /*!< [0x000-0x003] */
- uint32_t spiFlashCfg; /*!< [0x004-0x007] */
- struct
- {
- uint16_t vid;
- uint16_t pid;
- } usbId; /*!< [0x008-0x00b] */
- uint32_t sdioCfg; /*!< [0x00c-0x00f] */
- uint32_t dcfgPin; /*!< [0x010-0x013] */
- uint32_t dcfgDflt; /*!< [0x014-0x017] */
- uint32_t dapVendorUsage; /*!< [0x018-0x01b] */
- uint32_t secureBootCfg; /*!< [0x01c-0x01f] */
- uint32_t princeBaseAddr; /*!< [0x020-0x023] */
- uint32_t princeSr[3]; /*!< [0x024-0x02f] */
- uint8_t reserved0[32]; /*!< [0x030-0x04f] */
- uint32_t rotkh[8]; /*!< [0x050-0x06f] */
- uint8_t reserved1[368]; /*!< [0x070-0x1df] */
- uint8_t sha256[32]; /*!< [0x1e0-0x1ff] */
-} cmpa_cfg_info_t;
-
-typedef struct _cmpa_key_store_header
-{
- uint32_t header;
- uint8_t reserved[4];
-} cmpa_key_store_header_t;
-
-#define FFR_SYSTEM_SPEED_CODE_MASK (0x3U)
-#define FFR_SYSTEM_SPEED_CODE_SHIFT (0U)
-#define FFR_SYSTEM_SPEED_CODE_FRO12MHZ_12MHZ (0x0U)
-#define FFR_SYSTEM_SPEED_CODE_FROHF96MHZ_24MHZ (0x1U)
-#define FFR_SYSTEM_SPEED_CODE_FROHF96MHZ_48MHZ (0x2U)
-#define FFR_SYSTEM_SPEED_CODE_FROHF96MHZ_96MHZ (0x3U)
-
-#define FFR_PERIPHERALCFG_PERI_MASK (0x7FFFFFFFU)
-#define FFR_PERIPHERALCFG_PERI_SHIFT (0U)
-#define FFR_PERIPHERALCFG_COREEN_MASK (0x10000000U)
-#define FFR_PERIPHERALCFG_COREEN_SHIFT (31U)
-
-typedef struct _nmpa_cfg_info
-{
- uint16_t fro32kCfg; /*!< [0x000-0x001] */
- uint8_t reserved0[6]; /*!< [0x002-0x007] */
- uint8_t sysCfg; /*!< [0x008-0x008] */
- uint8_t reserved1[7]; /*!< [0x009-0x00f] */
- struct
- {
- uint32_t data;
- uint32_t reserved[3];
- } GpoInitData[3]; /*!< [0x010-0x03f] */
- uint32_t GpoDataChecksum[4]; /*!< [0x040-0x04f] */
- uint32_t finalTestBatchId[4]; /*!< [0x050-0x05f] */
- uint32_t deviceType; /*!< [0x060-0x063] */
- uint32_t finalTestProgVersion; /*!< [0x064-0x067] */
- uint32_t finalTestDate; /*!< [0x068-0x06b] */
- uint32_t finalTestTime; /*!< [0x06c-0x06f] */
- uint32_t uuid[4]; /*!< [0x070-0x07f] */
- uint8_t reserved2[32]; /*!< [0x080-0x09f] */
- uint32_t peripheralCfg; /*!< [0x0a0-0x0a3] */
- uint32_t ramSizeCfg; /*!< [0x0a4-0x0a7] */
- uint32_t flashSizeCfg; /*!< [0x0a8-0x0ab] */
- uint8_t reserved3[36]; /*!< [0x0ac-0x0cf] */
- uint8_t fro1mCfg; /*!< [0x0d0-0x0d0] */
- uint8_t reserved4[15]; /*!< [0x0d1-0x0df] */
- uint32_t dcdc[4]; /*!< [0x0e0-0x0ef] */
- uint32_t bod; /*!< [0x0f0-0x0f3] */
- uint8_t reserved5[12]; /*!< [0x0f4-0x0ff] */
- uint8_t calcHashReserved[192]; /*!< [0x100-0x1bf] */
- uint8_t sha256[32]; /*!< [0x1c0-0x1df] */
- uint32_t ecidBackup[4]; /*!< [0x1e0-0x1ef] */
- uint32_t pageChecksum[4]; /*!< [0x1f0-0x1ff] */
-} nmpa_cfg_info_t;
-
-typedef struct _ffr_key_store
-{
- uint8_t reserved[3][FLASH_FFR_MAX_PAGE_SIZE];
-} ffr_key_store_t;
-
-typedef enum _ffr_key_type
-{
- kFFR_KeyTypeSbkek = 0x00U,
- kFFR_KeyTypeUser = 0x01U,
- kFFR_KeyTypeUds = 0x02U,
- kFFR_KeyTypePrinceRegion0 = 0x03U,
- kFFR_KeyTypePrinceRegion1 = 0x04U,
- kFFR_KeyTypePrinceRegion2 = 0x05U,
-} ffr_key_type_t;
-
-typedef enum _ffr_bank_type
-{
- kFFR_BankTypeBank0_NMPA = 0x00U,
- kFFR_BankTypeBank1_CMPA = 0x01U,
- kFFR_BankTypeBank2_CFPA = 0x02U
-} ffr_bank_type_t;
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/*!
- * @name FFR APIs
- * @{
- */
-
-/*! Initializes the global FFR properties structure members.*/
-status_t FFR_Init(flash_config_t *config);
-
-/*!
- * @brief Enable firewall for all flash banks.
- * FFR region will be locked, After this function executed.
- */
-status_t FFR_Deinit(flash_config_t *config);
-
-/*! APIs to access CFPA pages */
-status_t FFR_InfieldPageWrite(flash_config_t *config, uint8_t *page_data, uint32_t valid_len);
-/*! Generic read function, used by customer to read data stored in 'Customer In-field Page. */
-status_t FFR_GetCustomerInfieldData(flash_config_t *config, uint8_t *pData, uint32_t offset, uint32_t len);
-
-/*! APIs to access CMPA pages */
-/*!
- * @brief This routine will erase "customer factory page" and program the page with passed data.
- * If 'seal_part' parameter is TRUE then the routine will compute SHA256 hash of
- * the page contents and then programs the pages.
- * 1.During development customer code uses this API with 'seal_part' set to FALSE.
- * 2.During manufacturing this parameter should be set to TRUE to seal the part
- * from further modifications
- */
-status_t FFR_CustFactoryPageWrite(flash_config_t *config, uint8_t *page_data, bool seal_part);
-/*! Read data stored in 'Customer Factory CFG Page'. */
-status_t FFR_GetCustomerData(flash_config_t *config, uint8_t *pData, uint32_t offset, uint32_t len);
-status_t FFR_KeystoreWrite(flash_config_t *config, ffr_key_store_t *pKeyStore);
-status_t FFR_KeystoreGetAC(flash_config_t *config, uint8_t *pActivationCode);
-status_t FFR_KeystoreGetKC(flash_config_t *config, uint8_t *pKeyCode, ffr_key_type_t keyIndex);
-
-/*! APIs to access NMPA pages */
-/*! Read data stored in 'NXP Manufacuring Programmed CFG Page'. */
-status_t FFR_GetUUID(flash_config_t *config, uint8_t *uuid);
-
-#ifdef __cplusplus
-}
-#endif
-
-/*@}*/
-
-#endif /*! __FSL_FLASH_FFR_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_iocon.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_iocon.h
deleted file mode 100755
index cf0cbd1321..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_iocon.h
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Copyright (c) 2016, Freescale Semiconductor, Inc.
- * Copyright 2016-2019 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef _FSL_IOCON_H_
-#define _FSL_IOCON_H_
-
-#include "fsl_common.h"
-
-/*!
- * @addtogroup lpc_iocon
- * @{
- */
-
-/*! @file */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/* Component ID definition, used by tools. */
-#ifndef FSL_COMPONENT_ID
-#define FSL_COMPONENT_ID "platform.drivers.lpc_iocon"
-#endif
-
-/*! @name Driver version */
-/*@{*/
-/*! @brief IOCON driver version 2.1.1. */
-#define FSL_IOCON_DRIVER_VERSION (MAKE_VERSION(2, 1, 1))
-/*@}*/
-
-/**
- * @brief Array of IOCON pin definitions passed to IOCON_SetPinMuxing() must be in this format
- */
-typedef struct _iocon_group
-{
- uint32_t port : 8; /* Pin port */
- uint32_t pin : 8; /* Pin number */
- uint32_t ionumber : 8; /* IO number */
- uint32_t modefunc : 16; /* Function and mode */
-} iocon_group_t;
-
-/**
- * @brief IOCON function and mode selection definitions
- * @note See the User Manual for specific modes and functions supported by the various pins.
- */
-#if defined(FSL_FEATURE_IOCON_FUNC_FIELD_WIDTH) && (FSL_FEATURE_IOCON_FUNC_FIELD_WIDTH == 4)
-#define IOCON_FUNC0 0x0 /*!< Selects pin function 0 */
-#define IOCON_FUNC1 0x1 /*!< Selects pin function 1 */
-#define IOCON_FUNC2 0x2 /*!< Selects pin function 2 */
-#define IOCON_FUNC3 0x3 /*!< Selects pin function 3 */
-#define IOCON_FUNC4 0x4 /*!< Selects pin function 4 */
-#define IOCON_FUNC5 0x5 /*!< Selects pin function 5 */
-#define IOCON_FUNC6 0x6 /*!< Selects pin function 6 */
-#define IOCON_FUNC7 0x7 /*!< Selects pin function 7 */
-#define IOCON_FUNC8 0x8 /*!< Selects pin function 8 */
-#define IOCON_FUNC9 0x9 /*!< Selects pin function 9 */
-#define IOCON_FUNC10 0xA /*!< Selects pin function 10 */
-#define IOCON_FUNC11 0xB /*!< Selects pin function 11 */
-#define IOCON_FUNC12 0xC /*!< Selects pin function 12 */
-#define IOCON_FUNC13 0xD /*!< Selects pin function 13 */
-#define IOCON_FUNC14 0xE /*!< Selects pin function 14 */
-#define IOCON_FUNC15 0xF /*!< Selects pin function 15 */
-#if defined(IOCON_PIO_MODE_SHIFT)
-#define IOCON_MODE_INACT (0x0 << IOCON_PIO_MODE_SHIFT) /*!< No addition pin function */
-#define IOCON_MODE_PULLDOWN (0x1 << IOCON_PIO_MODE_SHIFT) /*!< Selects pull-down function */
-#define IOCON_MODE_PULLUP (0x2 << IOCON_PIO_MODE_SHIFT) /*!< Selects pull-up function */
-#define IOCON_MODE_REPEATER (0x3 << IOCON_PIO_MODE_SHIFT) /*!< Selects pin repeater function */
-#endif
-
-#if defined(IOCON_PIO_I2CSLEW_SHIFT)
-#define IOCON_GPIO_MODE (0x1 << IOCON_PIO_I2CSLEW_SHIFT) /*!< GPIO Mode */
-#define IOCON_I2C_SLEW (0x0 << IOCON_PIO_I2CSLEW_SHIFT) /*!< I2C Slew Rate Control */
-#endif
-
-#if defined(IOCON_PIO_EGP_SHIFT)
-#define IOCON_GPIO_MODE (0x1 << IOCON_PIO_EGP_SHIFT) /*!< GPIO Mode */
-#define IOCON_I2C_SLEW (0x0 << IOCON_PIO_EGP_SHIFT) /*!< I2C Slew Rate Control */
-#endif
-
-#if defined(IOCON_PIO_SLEW_SHIFT)
-#define IOCON_SLEW_STANDARD (0x0 << IOCON_PIO_SLEW_SHIFT) /*!< Driver Slew Rate Control */
-#define IOCON_SLEW_FAST (0x1 << IOCON_PIO_SLEW_SHIFT) /*!< Driver Slew Rate Control */
-#endif
-
-#if defined(IOCON_PIO_INVERT_SHIFT)
-#define IOCON_INV_EN (0x1 << IOCON_PIO_INVERT_SHIFT) /*!< Enables invert function on input */
-#endif
-
-#if defined(IOCON_PIO_DIGIMODE_SHIFT)
-#define IOCON_ANALOG_EN (0x0 << IOCON_PIO_DIGIMODE_SHIFT) /*!< Enables analog function by setting 0 to bit 7 */
-#define IOCON_DIGITAL_EN \
- (0x1 << IOCON_PIO_DIGIMODE_SHIFT) /*!< Enables digital function by setting 1 to bit 7(default) */
-#endif
-
-#if defined(IOCON_PIO_FILTEROFF_SHIFT)
-#define IOCON_INPFILT_OFF (0x1 << IOCON_PIO_FILTEROFF_SHIFT) /*!< Input filter Off for GPIO pins */
-#define IOCON_INPFILT_ON (0x0 << IOCON_PIO_FILTEROFF_SHIFT) /*!< Input filter On for GPIO pins */
-#endif
-
-#if defined(IOCON_PIO_I2CDRIVE_SHIFT)
-#define IOCON_I2C_LOWDRIVER (0x0 << IOCON_PIO_I2CDRIVE_SHIFT) /*!< Low drive, Output drive sink is 4 mA */
-#define IOCON_I2C_HIGHDRIVER (0x1 << IOCON_PIO_I2CDRIVE_SHIFT) /*!< High drive, Output drive sink is 20 mA */
-#endif
-
-#if defined(IOCON_PIO_OD_SHIFT)
-#define IOCON_OPENDRAIN_EN (0x1 << IOCON_PIO_OD_SHIFT) /*!< Enables open-drain function */
-#endif
-
-#if defined(IOCON_PIO_I2CFILTER_SHIFT)
-#define IOCON_I2CFILTER_OFF (0x1 << IOCON_PIO_I2CFILTER_SHIFT) /*!< I2C 50 ns glitch filter enabled */
-#define IOCON_I2CFILTER_ON (0x0 << IOCON_PIO_I2CFILTER_SHIFT) /*!< I2C 50 ns glitch filter not enabled, */
-#endif
-
-#if defined(IOCON_PIO_ASW_SHIFT)
-#define IOCON_AWS_EN (0x1 << IOCON_PIO_ASW_SHIFT) /*!< Enables analog switch function */
-#endif
-
-#if defined(IOCON_PIO_SSEL_SHIFT)
-#define IOCON_SSEL_3V3 (0x0 << IOCON_PIO_SSEL_SHIFT) /*!< 3V3 signaling in I2C mode */
-#define IOCON_SSEL_1V8 (0x1 << IOCON_PIO_SSEL_SHIFT) /*!< 1V8 signaling in I2C mode */
-#endif
-
-#if defined(IOCON_PIO_ECS_SHIFT)
-#define IOCON_ECS_OFF (0x0 << IOCON_PIO_ECS_SHIFT) /*!< IO is an open drain cell */
-#define IOCON_ECS_ON (0x1 << IOCON_PIO_ECS_SHIFT) /*!< Pull-up resistor is connected */
-#endif
-
-#if defined(IOCON_PIO_S_MODE_SHIFT)
-#define IOCON_S_MODE_0CLK (0x0 << IOCON_PIO_S_MODE_SHIFT) /*!< Bypass input filter */
-#define IOCON_S_MODE_1CLK \
- (0x1 << IOCON_PIO_S_MODE_SHIFT) /*!< Input pulses shorter than 1 filter clock are rejected \ \ \ \ \
- */
-#define IOCON_S_MODE_2CLK \
- (0x2 << IOCON_PIO_S_MODE_SHIFT) /*!< Input pulses shorter than 2 filter clock2 are rejected \ \ \ \ \
- */
-#define IOCON_S_MODE_3CLK \
- (0x3 << IOCON_PIO_S_MODE_SHIFT) /*!< Input pulses shorter than 3 filter clock2 are rejected \ \ \ \ \
- */
-#define IOCON_S_MODE(clks) ((clks) << IOCON_PIO_S_MODE_SHIFT) /*!< Select clocks for digital input filter mode */
-#endif
-
-#if defined(IOCON_PIO_CLK_DIV_SHIFT)
-#define IOCON_CLKDIV(div) \
- ((div) \
- << IOCON_PIO_CLK_DIV_SHIFT) /*!< Select peripheral clock divider for input filter sampling clock, 2^n, n=0-6 */
-#endif
-
-#else
-#define IOCON_FUNC0 0x0 /*!< Selects pin function 0 */
-#define IOCON_FUNC1 0x1 /*!< Selects pin function 1 */
-#define IOCON_FUNC2 0x2 /*!< Selects pin function 2 */
-#define IOCON_FUNC3 0x3 /*!< Selects pin function 3 */
-#define IOCON_FUNC4 0x4 /*!< Selects pin function 4 */
-#define IOCON_FUNC5 0x5 /*!< Selects pin function 5 */
-#define IOCON_FUNC6 0x6 /*!< Selects pin function 6 */
-#define IOCON_FUNC7 0x7 /*!< Selects pin function 7 */
-
-#if defined(IOCON_PIO_MODE_SHIFT)
-#define IOCON_MODE_INACT (0x0 << IOCON_PIO_MODE_SHIFT) /*!< No addition pin function */
-#define IOCON_MODE_PULLDOWN (0x1 << IOCON_PIO_MODE_SHIFT) /*!< Selects pull-down function */
-#define IOCON_MODE_PULLUP (0x2 << IOCON_PIO_MODE_SHIFT) /*!< Selects pull-up function */
-#define IOCON_MODE_REPEATER (0x3 << IOCON_PIO_MODE_SHIFT) /*!< Selects pin repeater function */
-#endif
-
-#if defined(IOCON_PIO_I2CSLEW_SHIFT)
-#define IOCON_GPIO_MODE (0x1 << IOCON_PIO_I2CSLEW_SHIFT) /*!< GPIO Mode */
-#define IOCON_I2C_SLEW (0x0 << IOCON_PIO_I2CSLEW_SHIFT) /*!< I2C Slew Rate Control */
-#endif
-
-#if defined(IOCON_PIO_EGP_SHIFT)
-#define IOCON_GPIO_MODE (0x1 << IOCON_PIO_EGP_SHIFT) /*!< GPIO Mode */
-#define IOCON_I2C_SLEW (0x0 << IOCON_PIO_EGP_SHIFT) /*!< I2C Slew Rate Control */
-#endif
-
-#if defined(IOCON_PIO_INVERT_SHIFT)
-#define IOCON_INV_EN (0x1 << IOCON_PIO_INVERT_SHIFT) /*!< Enables invert function on input */
-#endif
-
-#if defined(IOCON_PIO_DIGIMODE_SHIFT)
-#define IOCON_ANALOG_EN (0x0 << IOCON_PIO_DIGIMODE_SHIFT) /*!< Enables analog function by setting 0 to bit 7 */
-#define IOCON_DIGITAL_EN \
- (0x1 << IOCON_PIO_DIGIMODE_SHIFT) /*!< Enables digital function by setting 1 to bit 7(default) */
-#endif
-
-#if defined(IOCON_PIO_FILTEROFF_SHIFT)
-#define IOCON_INPFILT_OFF (0x1 << IOCON_PIO_FILTEROFF_SHIFT) /*!< Input filter Off for GPIO pins */
-#define IOCON_INPFILT_ON (0x0 << IOCON_PIO_FILTEROFF_SHIFT) /*!< Input filter On for GPIO pins */
-#endif
-
-#if defined(IOCON_PIO_I2CDRIVE_SHIFT)
-#define IOCON_I2C_LOWDRIVER (0x0 << IOCON_PIO_I2CDRIVE_SHIFT) /*!< Low drive, Output drive sink is 4 mA */
-#define IOCON_I2C_HIGHDRIVER (0x1 << IOCON_PIO_I2CDRIVE_SHIFT) /*!< High drive, Output drive sink is 20 mA */
-#endif
-
-#if defined(IOCON_PIO_OD_SHIFT)
-#define IOCON_OPENDRAIN_EN (0x1 << IOCON_PIO_OD_SHIFT) /*!< Enables open-drain function */
-#endif
-
-#if defined(IOCON_PIO_I2CFILTER_SHIFT)
-#define IOCON_I2CFILTER_OFF (0x1 << IOCON_PIO_I2CFILTER_SHIFT) /*!< I2C 50 ns glitch filter enabled */
-#define IOCON_I2CFILTER_ON (0x0 << IOCON_PIO_I2CFILTER_SHIFT) /*!< I2C 50 ns glitch filter not enabled */
-#endif
-
-#if defined(IOCON_PIO_S_MODE_SHIFT)
-#define IOCON_S_MODE_0CLK (0x0 << IOCON_PIO_S_MODE_SHIFT) /*!< Bypass input filter */
-#define IOCON_S_MODE_1CLK \
- (0x1 << IOCON_PIO_S_MODE_SHIFT) /*!< Input pulses shorter than 1 filter clock are rejected \ \ \ \ \
- */
-#define IOCON_S_MODE_2CLK \
- (0x2 << IOCON_PIO_S_MODE_SHIFT) /*!< Input pulses shorter than 2 filter clock2 are rejected \ \ \ \ \
- */
-#define IOCON_S_MODE_3CLK \
- (0x3 << IOCON_PIO_S_MODE_SHIFT) /*!< Input pulses shorter than 3 filter clock2 are rejected \ \ \ \ \
- */
-#define IOCON_S_MODE(clks) ((clks) << IOCON_PIO_S_MODE_SHIFT) /*!< Select clocks for digital input filter mode */
-#endif
-
-#if defined(IOCON_PIO_CLK_DIV_SHIFT)
-#define IOCON_CLKDIV(div) \
- ((div) \
- << IOCON_PIO_CLK_DIV_SHIFT) /*!< Select peripheral clock divider for input filter sampling clock, 2^n, n=0-6 */
-#endif
-
-#endif
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#if (defined(FSL_FEATURE_IOCON_ONE_DIMENSION) && (FSL_FEATURE_IOCON_ONE_DIMENSION == 1))
-/**
- * @brief Sets I/O Control pin mux
- * @param base : The base of IOCON peripheral on the chip
- * @param ionumber : GPIO number to mux
- * @param modefunc : OR'ed values of type IOCON_*
- * @return Nothing
- */
-__STATIC_INLINE void IOCON_PinMuxSet(IOCON_Type *base, uint8_t ionumber, uint32_t modefunc)
-{
- base->PIO[ionumber] = modefunc;
-}
-#else
-/**
- * @brief Sets I/O Control pin mux
- * @param base : The base of IOCON peripheral on the chip
- * @param port : GPIO port to mux
- * @param pin : GPIO pin to mux
- * @param modefunc : OR'ed values of type IOCON_*
- * @return Nothing
- */
-__STATIC_INLINE void IOCON_PinMuxSet(IOCON_Type *base, uint8_t port, uint8_t pin, uint32_t modefunc)
-{
- base->PIO[port][pin] = modefunc;
-}
-#endif
-
-/**
- * @brief Set all I/O Control pin muxing
- * @param base : The base of IOCON peripheral on the chip
- * @param pinArray : Pointer to array of pin mux selections
- * @param arrayLength : Number of entries in pinArray
- * @return Nothing
- */
-__STATIC_INLINE void IOCON_SetPinMuxing(IOCON_Type *base, const iocon_group_t *pinArray, uint32_t arrayLength)
-{
- uint32_t i;
-
- for (i = 0; i < arrayLength; i++)
- {
-#if (defined(FSL_FEATURE_IOCON_ONE_DIMENSION) && (FSL_FEATURE_IOCON_ONE_DIMENSION == 1))
- IOCON_PinMuxSet(base, pinArray[i].ionumber, pinArray[i].modefunc);
-#else
- IOCON_PinMuxSet(base, pinArray[i].port, pinArray[i].pin, pinArray[i].modefunc);
-#endif /* FSL_FEATURE_IOCON_ONE_DIMENSION */
- }
-}
-
-/* @} */
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* _FSL_IOCON_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_power.c b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_power.c
deleted file mode 100755
index a0b8331753..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_power.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (c) 2016, Freescale Semiconductor, Inc.
- * Copyright 2016, NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-#include "fsl_common.h"
-#include "fsl_power.h"
-/* Component ID definition, used by tools. */
-#ifndef FSL_COMPONENT_ID
-#define FSL_COMPONENT_ID "platform.drivers.power"
-#endif
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-/* Empty file since implementation is in header file and power library */
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_power.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_power.h
deleted file mode 100755
index 381d9007f4..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_power.h
+++ /dev/null
@@ -1,544 +0,0 @@
-/*
- * Copyright 2017, NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-#ifndef _FSL_POWER_H_
-#define _FSL_POWER_H_
-
-#include "fsl_common.h"
-#include "fsl_device_registers.h"
-#include <stdint.h>
-
-/*!
- * @addtogroup power
- * @{
- */
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*! @name Driver version */
-/*@{*/
-/*! @brief power driver version 1.0.0. */
-#define FSL_POWER_DRIVER_VERSION (MAKE_VERSION(1, 0, 0))
-/*@}*/
-
-/* Power mode configuration API parameter */
-typedef enum _power_mode_config
-{
- kPmu_Sleep = 0U,
- kPmu_Deep_Sleep = 1U,
- kPmu_PowerDown = 2U,
- kPmu_Deep_PowerDown = 3U,
-} power_mode_cfg_t;
-
-/**
- * @brief Analog components power modes control during low power modes
- */
-typedef enum pd_bits
-{
- kPDRUNCFG_PD_DCDC = (1UL << 0),
- kPDRUNCFG_PD_BIAS = (1UL << 1),
- kPDRUNCFG_PD_BODCORE = (1UL << 2),
- kPDRUNCFG_PD_BODVBAT = (1UL << 3),
- kPDRUNCFG_PD_FRO1M = (1UL << 4),
- kPDRUNCFG_PD_FRO192M = (1UL << 5),
- kPDRUNCFG_PD_FRO32K = (1UL << 6),
- kPDRUNCFG_PD_XTAL32K = (1UL << 7),
- kPDRUNCFG_PD_XTAL32M = (1UL << 8),
- kPDRUNCFG_PD_PLL0 = (1UL << 9),
- kPDRUNCFG_PD_PLL1 = (1UL << 10),
- kPDRUNCFG_PD_USB0_PHY = (1UL << 11),
- kPDRUNCFG_PD_USB1_PHY = (1UL << 12),
- kPDRUNCFG_PD_COMP = (1UL << 13),
- kPDRUNCFG_PD_TEMPSENS = (1UL << 14),
- kPDRUNCFG_PD_GPADC = (1UL << 15),
- kPDRUNCFG_PD_LDOMEM = (1UL << 16),
- kPDRUNCFG_PD_LDODEEPSLEEP = (1UL << 17),
- kPDRUNCFG_PD_LDOUSBHS = (1UL << 18),
- kPDRUNCFG_PD_LDOGPADC = (1UL << 19),
- kPDRUNCFG_PD_LDOXO32M = (1UL << 20),
- kPDRUNCFG_PD_LDOFLASHNV = (1UL << 21),
- kPDRUNCFG_PD_RNG = (1UL << 22),
- kPDRUNCFG_PD_PLL0_SSCG = (1UL << 23),
- kPDRUNCFG_PD_ROM = (1UL << 24),
- /*
- This enum member has no practical meaning,it is used to avoid MISRA issue,
- user should not trying to use it.
- */
- kPDRUNCFG_ForceUnsigned = 0x80000000U,
-} pd_bit_t;
-
-/*@brief BOD VBAT level */
-typedef enum _power_bod_vbat_level
-{
- kPOWER_BodVbatLevel1000mv = 0, /*!< Brown out detector VBAT level 1V */
- kPOWER_BodVbatLevel1100mv = 1, /*!< Brown out detector VBAT level 1.1V */
- kPOWER_BodVbatLevel1200mv = 2, /*!< Brown out detector VBAT level 1.2V */
- kPOWER_BodVbatLevel1300mv = 3, /*!< Brown out detector VBAT level 1.3V */
- kPOWER_BodVbatLevel1400mv = 4, /*!< Brown out detector VBAT level 1.4V */
- kPOWER_BodVbatLevel1500mv = 5, /*!< Brown out detector VBAT level 1.5V */
- kPOWER_BodVbatLevel1600mv = 6, /*!< Brown out detector VBAT level 1.6V */
- kPOWER_BodVbatLevel1650mv = 7, /*!< Brown out detector VBAT level 1.65V */
- kPOWER_BodVbatLevel1700mv = 8, /*!< Brown out detector VBAT level 1.7V */
- kPOWER_BodVbatLevel1750mv = 9, /*!< Brown out detector VBAT level 1.75V */
- kPOWER_BodVbatLevel1800mv = 10, /*!< Brown out detector VBAT level 1.8V */
- kPOWER_BodVbatLevel1900mv = 11, /*!< Brown out detector VBAT level 1.9V */
- kPOWER_BodVbatLevel2000mv = 12, /*!< Brown out detector VBAT level 2V */
- kPOWER_BodVbatLevel2100mv = 13, /*!< Brown out detector VBAT level 2.1V */
- kPOWER_BodVbatLevel2200mv = 14, /*!< Brown out detector VBAT level 2.2V */
- kPOWER_BodVbatLevel2300mv = 15, /*!< Brown out detector VBAT level 2.3V */
- kPOWER_BodVbatLevel2400mv = 16, /*!< Brown out detector VBAT level 2.4V */
- kPOWER_BodVbatLevel2500mv = 17, /*!< Brown out detector VBAT level 2.5V */
- kPOWER_BodVbatLevel2600mv = 18, /*!< Brown out detector VBAT level 2.6V */
- kPOWER_BodVbatLevel2700mv = 19, /*!< Brown out detector VBAT level 2.7V */
- kPOWER_BodVbatLevel2806mv = 20, /*!< Brown out detector VBAT level 2.806V */
- kPOWER_BodVbatLevel2900mv = 21, /*!< Brown out detector VBAT level 2.9V */
- kPOWER_BodVbatLevel3000mv = 22, /*!< Brown out detector VBAT level 3.0V */
- kPOWER_BodVbatLevel3100mv = 23, /*!< Brown out detector VBAT level 3.1V */
- kPOWER_BodVbatLevel3200mv = 24, /*!< Brown out detector VBAT level 3.2V */
- kPOWER_BodVbatLevel3300mv = 25, /*!< Brown out detector VBAT level 3.3V */
-} power_bod_vbat_level_t;
-
-/*@brief BOD Hysteresis control */
-typedef enum _power_bod_hyst
-{
- kPOWER_BodHystLevel25mv = 0U, /*!< BOD Hysteresis control level 25mv */
- kPOWER_BodHystLevel50mv = 1U, /*!< BOD Hysteresis control level 50mv */
- kPOWER_BodHystLevel75mv = 2U, /*!< BOD Hysteresis control level 75mv */
- kPOWER_BodHystLevel100mv = 3U, /*!< BOD Hysteresis control level 100mv */
-} power_bod_hyst_t;
-
-/*@brief BOD core level */
-typedef enum _power_bod_core_level
-{
- kPOWER_BodCoreLevel600mv = 0, /*!< Brown out detector core level 600mV */
- kPOWER_BodCoreLevel650mv = 1, /*!< Brown out detector core level 650mV */
- kPOWER_BodCoreLevel700mv = 2, /*!< Brown out detector core level 700mV */
- kPOWER_BodCoreLevel750mv = 3, /*!< Brown out detector core level 750mV */
- kPOWER_BodCoreLevel800mv = 4, /*!< Brown out detector core level 800mV */
- kPOWER_BodCoreLevel850mv = 5, /*!< Brown out detector core level 850mV */
- kPOWER_BodCoreLevel900mv = 6, /*!< Brown out detector core level 900mV */
- kPOWER_BodCoreLevel950mv = 7, /*!< Brown out detector core level 950mV */
-} power_bod_core_level_t;
-
-/**
- * @brief SRAM instances retention control during low power modes
- */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAMX0 \
- (1UL << 0) /*!< Enable SRAMX_0 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAMX1 \
- (1UL << 1) /*!< Enable SRAMX_1 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAMX2 \
- (1UL << 2) /*!< Enable SRAMX_2 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAMX3 \
- (1UL << 3) /*!< Enable SRAMX_3 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAM00 \
- (1UL << 4) /*!< Enable SRAM0_0 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAM01 \
- (1UL << 5) /*!< Enable SRAM0_1 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAM10 \
- (1UL << 6) /*!< Enable SRAM1_0 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAM20 \
- (1UL << 7) /*!< Enable SRAM2_0 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAM30 \
- (1UL << 8) /*!< Enable SRAM3_0 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAM31 \
- (1UL << 9) /*!< Enable SRAM3_1 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAM40 \
- (1UL << 10) /*!< Enable SRAM4_0 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAM41 \
- (1UL << 11) /*!< Enable SRAM4_1 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAM42 \
- (1UL << 12) /*!< Enable SRAM4_2 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAM43 \
- (1UL << 13) /*!< Enable SRAM4_3 retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAM_USB_HS \
- (1UL << 14) /*!< Enable SRAM USB HS retention when entering in Low power modes */
-#define LOWPOWER_SRAMRETCTRL_RETEN_RAM_PUF \
- (1UL << 15) /*!< Enable SRAM PUFF retention when entering in Low power modes */
-
-/**
- * @brief Low Power Modes Wake up sources
- */
-#define WAKEUP_SYS (1ULL << 0) /*!< [SLEEP, DEEP SLEEP ] */ /* WWDT0_IRQ and BOD_IRQ*/
-#define WAKEUP_SDMA0 (1ULL << 1) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_GPIO_GLOBALINT0 (1ULL << 2) /*!< [SLEEP, DEEP SLEEP, POWER DOWN ] */
-#define WAKEUP_GPIO_GLOBALINT1 (1ULL << 3) /*!< [SLEEP, DEEP SLEEP, POWER DOWN ] */
-#define WAKEUP_GPIO_INT0_0 (1ULL << 4) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_GPIO_INT0_1 (1ULL << 5) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_GPIO_INT0_2 (1ULL << 6) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_GPIO_INT0_3 (1ULL << 7) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_UTICK (1ULL << 8) /*!< [SLEEP, ] */
-#define WAKEUP_MRT (1ULL << 9) /*!< [SLEEP, ] */
-#define WAKEUP_CTIMER0 (1ULL << 10) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_CTIMER1 (1ULL << 11) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_SCT (1ULL << 12) /*!< [SLEEP, ] */
-#define WAKEUP_CTIMER3 (1ULL << 13) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_FLEXCOMM0 (1ULL << 14) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_FLEXCOMM1 (1ULL << 15) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_FLEXCOMM2 (1ULL << 16) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_FLEXCOMM3 (1ULL << 17) /*!< [SLEEP, DEEP SLEEP, POWER DOWN ] */
-#define WAKEUP_FLEXCOMM4 (1ULL << 18) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_FLEXCOMM5 (1ULL << 19) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_FLEXCOMM6 (1ULL << 20) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_FLEXCOMM7 (1ULL << 21) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_ADC (1ULL << 22) /*!< [SLEEP, ] */
-#define WAKEUP_ACMP_CAPT (1ULL << 24) /*!< [SLEEP, DEEP SLEEP, POWER DOWN ] */
-// reserved (1ULL << 25)
-// reserved (1ULL << 26)
-#define WAKEUP_USB0_NEEDCLK (1ULL << 27) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_USB0 (1ULL << 28) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_RTC_LITE_ALARM_WAKEUP (1ULL << 29) /*!< [SLEEP, DEEP SLEEP, POWER DOWN, DEEP POWER DOWN] */
-#define WAKEUP_EZH_ARCH_B (1ULL << 30) /*!< [SLEEP, ] */
-#define WAKEUP_WAKEUP_MAILBOX (1ULL << 31) /*!< [SLEEP, DEEP SLEEP, POWER DOWN ] */
-#define WAKEUP_GPIO_INT0_4 (1ULL << 32) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_GPIO_INT0_5 (1ULL << 33) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_GPIO_INT0_6 (1ULL << 34) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_GPIO_INT0_7 (1ULL << 35) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_CTIMER2 (1ULL << 36) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_CTIMER4 (1ULL << 37) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_OS_EVENT_TIMER (1ULL << 38) /*!< [SLEEP, DEEP SLEEP, POWER DOWN, DEEP POWER DOWN] */
-// reserved (1ULL << 39)
-// reserved (1ULL << 40)
-// reserved (1ULL << 41)
-#define WAKEUP_SDIO (1ULL << 42) /*!< [SLEEP, ] */
-// reserved (1ULL << 43)
-// reserved (1ULL << 44)
-// reserved (1ULL << 45)
-// reserved (1ULL << 46)
-#define WAKEUP_USB1 (1ULL << 47) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_USB1_NEEDCLK (1ULL << 48) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_SEC_HYPERVISOR_CALL (1ULL << 49) /*!< [SLEEP, ] */
-#define WAKEUP_SEC_GPIO_INT0_0 (1ULL << 50) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_SEC_GPIO_INT0_1 (1ULL << 51) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_PLU (1ULL << 52) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_SEC_VIO (1ULL << 53)
-#define WAKEUP_SHA (1ULL << 54) /*!< [SLEEP, ] */
-#define WAKEUP_CASPER (1ULL << 55) /*!< [SLEEP, ] */
-#define WAKEUP_PUFF (1ULL << 56) /*!< [SLEEP, ] */
-#define WAKEUP_PQ (1ULL << 57) /*!< [SLEEP, ] */
-#define WAKEUP_SDMA1 (1ULL << 58) /*!< [SLEEP, DEEP SLEEP ] */
-#define WAKEUP_LSPI_HS (1ULL << 59) /*!< [SLEEP, DEEP SLEEP ] */
-// reserved WAKEUP_PVTVF0_AMBER (1ULL << 60)
-// reserved WAKEUP_PVTVF0_RED (1ULL << 61)
-// reserved WAKEUP_PVTVF1_AMBER (1ULL << 62)
-#define WAKEUP_ALLWAKEUPIOS (1ULL << 63) /*!< [ , DEEP POWER DOWN] */
-
-/**
- * @brief Sleep Postpone
- */
-#define LOWPOWER_HWWAKE_FORCED (1UL << 0) /*!< Force peripheral clocking to stay on during deep-sleep mode. */
-#define LOWPOWER_HWWAKE_PERIPHERALS \
- (1UL << 1) /*!< Wake for Flexcomms. Any Flexcomm FIFO reaching the level specified by its own TXLVL will cause \
- peripheral clocking to wake up temporarily while the related status is asserted */
-#define LOWPOWER_HWWAKE_SDMA0 \
- (1UL << 3) /*!< Wake for DMA0. DMA0 being busy will cause peripheral clocking to remain running until DMA \
- completes. Used in conjonction with LOWPOWER_HWWAKE_PERIPHERALS */
-#define LOWPOWER_HWWAKE_SDMA1 \
- (1UL << 5) /*!< Wake for DMA1. DMA0 being busy will cause peripheral clocking to remain running until DMA \
- completes. Used in conjonction with LOWPOWER_HWWAKE_PERIPHERALS */
-#define LOWPOWER_HWWAKE_ENABLE_FRO192M \
- (1UL << 31) /*!< Need to be set if FRO192M is disable - via PDCTRL0 - in Deep Sleep mode and any of \
- LOWPOWER_HWWAKE_PERIPHERALS, LOWPOWER_HWWAKE_SDMA0 or LOWPOWER_HWWAKE_SDMA1 is set */
-
-#define LOWPOWER_CPURETCTRL_ENA_DISABLE 0 /*!< In POWER DOWN mode, CPU Retention is disabled */
-#define LOWPOWER_CPURETCTRL_ENA_ENABLE 1 /*!< In POWER DOWN mode, CPU Retention is enabled */
-/**
- * @brief Wake up I/O sources
- */
-#define LOWPOWER_WAKEUPIOSRC_PIO0_INDEX 0 /*!< Pin P1( 1) */
-#define LOWPOWER_WAKEUPIOSRC_PIO1_INDEX 2 /*!< Pin P0(28) */
-#define LOWPOWER_WAKEUPIOSRC_PIO2_INDEX 4 /*!< Pin P1(18) */
-#define LOWPOWER_WAKEUPIOSRC_PIO3_INDEX 6 /*!< Pin P1(30) */
-
-#define LOWPOWER_WAKEUPIOSRC_DISABLE 0 /*!< Wake up is disable */
-#define LOWPOWER_WAKEUPIOSRC_RISING 1 /*!< Wake up on rising edge */
-#define LOWPOWER_WAKEUPIOSRC_FALLING 2 /*!< Wake up on falling edge */
-#define LOWPOWER_WAKEUPIOSRC_RISING_FALLING 3 /*!< Wake up on both rising or falling edges */
-
-#define LOWPOWER_WAKEUPIO_PIO0_PULLUPDOWN_INDEX 8 /*!< Wake-up I/O 0 pull-up/down configuration index */
-#define LOWPOWER_WAKEUPIO_PIO1_PULLUPDOWN_INDEX 9 /*!< Wake-up I/O 1 pull-up/down configuration index */
-#define LOWPOWER_WAKEUPIO_PIO2_PULLUPDOWN_INDEX 10 /*!< Wake-up I/O 2 pull-up/down configuration index */
-#define LOWPOWER_WAKEUPIO_PIO3_PULLUPDOWN_INDEX 11 /*!< Wake-up I/O 3 pull-up/down configuration index */
-
-#define LOWPOWER_WAKEUPIO_PIO0_PULLUPDOWN_MASK \
- (1UL << LOWPOWER_WAKEUPIO_PIO0_PULLUPDOWN_INDEX) /*!< Wake-up I/O 0 pull-up/down mask */
-#define LOWPOWER_WAKEUPIO_PIO1_PULLUPDOWN_MASK \
- (1UL << LOWPOWER_WAKEUPIO_PIO1_PULLUPDOWN_INDEX) /*!< Wake-up I/O 1 pull-up/down mask */
-#define LOWPOWER_WAKEUPIO_PIO2_PULLUPDOWN_MASK \
- (1UL << LOWPOWER_WAKEUPIO_PIO2_PULLUPDOWN_INDEX) /*!< Wake-up I/O 2 pull-up/down mask */
-#define LOWPOWER_WAKEUPIO_PIO3_PULLUPDOWN_MASK \
- (1UL << LOWPOWER_WAKEUPIO_PIO3_PULLUPDOWN_INDEX) /*!< Wake-up I/O 3 pull-up/down mask */
-
-#define LOWPOWER_WAKEUPIO_PULLDOWN 0 /*!< Select pull-down */
-#define LOWPOWER_WAKEUPIO_PULLUP 1 /*!< Select pull-up */
-
-#define LOWPOWER_WAKEUPIO_PIO0_DISABLEPULLUPDOWN_INDEX \
- 12 /*!< Wake-up I/O 0 pull-up/down disable/enable control index */
-#define LOWPOWER_WAKEUPIO_PIO1_DISABLEPULLUPDOWN_INDEX \
- 13 /*!< Wake-up I/O 1 pull-up/down disable/enable control index */
-#define LOWPOWER_WAKEUPIO_PIO2_DISABLEPULLUPDOWN_INDEX \
- 14 /*!< Wake-up I/O 2 pull-up/down disable/enable control index */
-#define LOWPOWER_WAKEUPIO_PIO3_DISABLEPULLUPDOWN_INDEX \
- 15 /*!< Wake-up I/O 3 pull-up/down disable/enable control index */
-#define LOWPOWER_WAKEUPIO_PIO0_DISABLEPULLUPDOWN_MASK \
- (1UL << LOWPOWER_WAKEUPIO_PIO0_DISABLEPULLUPDOWN_INDEX) /*!< Wake-up I/O 0 pull-up/down disable/enable mask */
-#define LOWPOWER_WAKEUPIO_PIO1_DISABLEPULLUPDOWN_MASK \
- (1UL << LOWPOWER_WAKEUPIO_PIO1_DISABLEPULLUPDOWN_INDEX) /*!< Wake-up I/O 1 pull-up/down disable/enable mask */
-#define LOWPOWER_WAKEUPIO_PIO2_DISABLEPULLUPDOWN_MASK \
- (1UL << LOWPOWER_WAKEUPIO_PIO2_DISABLEPULLUPDOWN_INDEX) /*!< Wake-up I/O 2 pull-up/down disable/enable mask */
-#define LOWPOWER_WAKEUPIO_PIO3_DISABLEPULLUPDOWN_MASK \
- (1UL << LOWPOWER_WAKEUPIO_PIO3_DISABLEPULLUPDOWN_INDEX) /*!< Wake-up I/O 3 pull-up/down disable/enable mask */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*******************************************************************************
- * API
- ******************************************************************************/
-
-/*!
- * @brief API to enable PDRUNCFG bit in the Syscon. Note that enabling the bit powers down the peripheral
- *
- * @param en peripheral for which to enable the PDRUNCFG bit
- * @return none
- */
-static inline void POWER_EnablePD(pd_bit_t en)
-{
- /* PDRUNCFGSET */
- PMC->PDRUNCFGSET0 = (uint32_t)en;
-}
-
-/*!
- * @brief API to disable PDRUNCFG bit in the Syscon. Note that disabling the bit powers up the peripheral
- *
- * @param en peripheral for which to disable the PDRUNCFG bit
- * @return none
- */
-static inline void POWER_DisablePD(pd_bit_t en)
-{
- /* PDRUNCFGCLR */
- PMC->PDRUNCFGCLR0 = (uint32_t)en;
-}
-
-/*!
- * @brief set BOD VBAT level.
- *
- * @param level BOD detect level
- * @param hyst BoD Hysteresis control
- * @param enBodVbatReset VBAT brown out detect reset
- */
-static inline void POWER_SetBodVbatLevel(power_bod_vbat_level_t level, power_bod_hyst_t hyst, bool enBodVbatReset)
-{
- PMC->BODVBAT = (PMC->BODVBAT & (~(PMC_BODVBAT_TRIGLVL_MASK | PMC_BODVBAT_HYST_MASK))) | PMC_BODVBAT_TRIGLVL(level) |
- PMC_BODVBAT_HYST(hyst);
- PMC->RESETCTRL =
- (PMC->RESETCTRL & (~PMC_RESETCTRL_BODVBATRESETENABLE_MASK)) | PMC_RESETCTRL_BODVBATRESETENABLE(enBodVbatReset);
-}
-
-#if defined(PMC_BODCORE_TRIGLVL_MASK)
-/*!
- * @brief set BOD core level.
- *
- * @param level BOD detect level
- * @param hyst BoD Hysteresis control
- * @param enBodCoreReset core brown out detect reset
- */
-static inline void POWER_SetBodCoreLevel(power_bod_core_level_t level, power_bod_hyst_t hyst, bool enBodCoreReset)
-{
- PMC->BODCORE = (PMC->BODCORE & (~(PMC_BODCORE_TRIGLVL_MASK | PMC_BODCORE_HYST_MASK))) | PMC_BODCORE_TRIGLVL(level) |
- PMC_BODCORE_HYST(hyst);
- PMC->RESETCTRL =
- (PMC->RESETCTRL & (~PMC_RESETCTRL_BODCORERESETENABLE_MASK)) | PMC_RESETCTRL_BODCORERESETENABLE(enBodCoreReset);
-}
-#endif
-
-/*!
- * @brief API to enable deep sleep bit in the ARM Core.
- *
- * @param none
- * @return none
- */
-static inline void POWER_EnableDeepSleep(void)
-{
- SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
-}
-
-/*!
- * @brief API to disable deep sleep bit in the ARM Core.
- *
- * @param none
- * @return none
- */
-static inline void POWER_DisableDeepSleep(void)
-{
- SCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk;
-}
-
-/**
- * @brief Shut off the Flash and execute the _WFI(), then power up the Flash after wake-up event
- * This MUST BE EXECUTED outside the Flash:
- * either from ROM or from SRAM. The rest could stay in Flash. But, for consistency, it is
- * preferable to have all functions defined in this file implemented in ROM.
- * @param None
- * @return Nothing
- */
-void POWER_CycleCpuAndFlash(void);
-
-/**
- * @brief Configures and enters in DEEP-SLEEP low power mode
- * @param exclude_from_pd:
- * @param sram_retention_ctrl:
- * @param wakeup_interrupts:
- * @param hardware_wake_ctrl:
-
- * @return Nothing
- *
- * !!! IMPORTANT NOTES :
- 0 - CPU0 & System CLock frequency is switched to FRO12MHz and is NOT restored back by the API.
- * 1 - CPU0 Interrupt Enable registers (NVIC->ISER) are modified by this function. They are restored back in
- case of CPU retention or if POWERDOWN is not taken (for instance because an interrupt is pending).
- * 2 - The Non Maskable Interrupt (NMI) is disabled and its configuration before calling this function will be
- restored back if POWERDOWN is not taken (for instance because an RTC or OSTIMER interrupt is pending).
- * 3 - The HARD FAULT handler should execute from SRAM. (The Hard fault handler should initiate a full chip
- reset) reset)
- */
-void POWER_EnterDeepSleep(uint32_t exclude_from_pd,
- uint32_t sram_retention_ctrl,
- uint64_t wakeup_interrupts,
- uint32_t hardware_wake_ctrl);
-
-/**
- * @brief Configures and enters in POWERDOWN low power mode
- * @param exclude_from_pd:
- * @param sram_retention_ctrl:
- * @param wakeup_interrupts:
- * @param cpu_retention_ctrl: 0 = CPU retention is disable / 1 = CPU retention is enabled, all other values are
- RESERVED.
-
- * @return Nothing
- *
- * !!! IMPORTANT NOTES :
- 0 - CPU0 & System CLock frequency is switched to FRO12MHz and is NOT restored back by the API.
- * 1 - CPU0 Interrupt Enable registers (NVIC->ISER) are modified by this function. They are restored back in
- case of CPU retention or if POWERDOWN is not taken (for instance because an interrupt is pending).
- * 2 - The Non Maskable Interrupt (NMI) is disabled and its configuration before calling this function will be
- restored back if POWERDOWN is not taken (for instance because an RTC or OSTIMER interrupt is pending).
- * 3 - In case of CPU retention, it is the responsability of the user to make sure that SRAM instance
- containing the stack used to call this function WILL BE preserved during low power (via parameter
- "sram_retention_ctrl")
- * 4 - The HARD FAULT handler should execute from SRAM. (The Hard fault handler should initiate a full chip
- reset) reset)
- */
-
-void POWER_EnterPowerDown(uint32_t exclude_from_pd,
- uint32_t sram_retention_ctrl,
- uint64_t wakeup_interrupts,
- uint32_t cpu_retention_ctrl);
-
-/**
- * @brief Configures and enters in DEEPPOWERDOWN low power mode
- * @param exclude_from_pd:
- * @param sram_retention_ctrl:
- * @param wakeup_interrupts:
- * @param wakeup_io_ctrl:
-
- * @return Nothing
- *
- * !!! IMPORTANT NOTES :
- 0 - CPU0 & System CLock frequency is switched to FRO12MHz and is NOT restored back by the API.
- * 1 - CPU0 Interrupt Enable registers (NVIC->ISER) are modified by this function. They are restored back if
- DEEPPOWERDOWN is not taken (for instance because an RTC or OSTIMER interrupt is pending).
- * 2 - The Non Maskable Interrupt (NMI) is disabled and its configuration before calling this function will be
- restored back if DEEPPOWERDOWN is not taken (for instance because an RTC or OSTIMER interrupt is pending).
- * 3 - The HARD FAULT handler should execute from SRAM. (The Hard fault handler should initiate a full chip
- reset)
- */
-void POWER_EnterDeepPowerDown(uint32_t exclude_from_pd,
- uint32_t sram_retention_ctrl,
- uint64_t wakeup_interrupts,
- uint32_t wakeup_io_ctrl);
-
-/**
- * @brief Configures and enters in SLEEP low power mode
- * @param :
- * @return Nothing
- */
-void POWER_EnterSleep(void);
-
-/*!
- * @brief Power Library API to choose normal regulation and set the voltage for the desired operating frequency.
- *
- * @param system_freq_hz - The desired frequency (in Hertz) at which the part would like to operate,
- * note that the voltage and flash wait states should be set before changing frequency
- * @return none
- */
-void POWER_SetVoltageForFreq(uint32_t system_freq_hz);
-
-/*!
- * @brief Power Library API to return the library version.
- *
- * @param none
- * @return version number of the power library
- */
-uint32_t POWER_GetLibVersion(void);
-
-/**
- * @brief Sets board-specific trim values for 16MHz XTAL
- * @param pi32_32MfXtalIecLoadpF_x100 Load capacitance, pF x 100. For example, 6pF becomes 600, 1.2pF becomes 120
- * @param pi32_32MfXtalPPcbParCappF_x100 PCB +ve parasitic capacitance, pF x 100. For example, 6pF becomes 600, 1.2pF
- * becomes 120
- * @param pi32_32MfXtalNPcbParCappF_x100 PCB -ve parasitic capacitance, pF x 100. For example, 6pF becomes 600, 1.2pF
- * becomes 120
- * @return none
- * @note Following default Values can be used:
- * pi32_32MfXtalIecLoadpF_x100 Load capacitance, pF x 100 : 600
- * pi32_32MfXtalPPcbParCappF_x100 PCB +ve parasitic capacitance, pF x 100 : 20
- * pi32_32MfXtalNPcbParCappF_x100 PCB -ve parasitic capacitance, pF x 100 : 40
- */
-extern void POWER_Xtal16mhzCapabankTrim(int32_t pi32_16MfXtalIecLoadpF_x100,
- int32_t pi32_16MfXtalPPcbParCappF_x100,
- int32_t pi32_16MfXtalNPcbParCappF_x100);
-/**
- * @brief Sets board-specific trim values for 32kHz XTAL
- * @param pi32_32kfXtalIecLoadpF_x100 Load capacitance, pF x 100. For example, 6pF becomes 600, 1.2pF becomes 120
- * @param pi32_32kfXtalPPcbParCappF_x100 PCB +ve parasitic capacitance, pF x 100. For example, 6pF becomes 600, 1.2pF
- becomes 120
- * @param pi32_32kfXtalNPcbParCappF_x100 PCB -ve parasitic capacitance, pF x 100. For example, 6pF becomes 600, 1.2pF
- becomes 120
-
- * @return none
- * @note Following default Values can be used:
- * pi32_32kfXtalIecLoadpF_x100 Load capacitance, pF x 100 : 600
- * pi32_32kfXtalPPcbParCappF_x100 PCB +ve parasitic capacitance, pF x 100 : 40
- * pi32_32kfXtalNPcbParCappF_x100 PCB -ve parasitic capacitance, pF x 100 : 40
- */
-extern void POWER_Xtal32khzCapabankTrim(int32_t pi32_32kfXtalIecLoadpF_x100,
- int32_t pi32_32kfXtalPPcbParCappF_x100,
- int32_t pi32_32kfXtalNPcbParCappF_x100);
-/**
- * @brief Enables and sets LDO for 16MHz XTAL
- * @param none
- * @return none
- */
-extern void POWER_SetXtal16mhzLdo(void);
-
-/**
- * @brief Set up 16-MHz XTAL Trimmings
- * @param amp Amplitude
- * @param gm Transconductance
- * @return none
- */
-extern void POWER_SetXtal16mhzTrim(uint32_t amp, uint32_t gm);
-#ifdef __cplusplus
-}
-#endif
-
-/**
- * @}
- */
-
-#endif /* _FSL_POWER_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_reset.c b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_reset.c
deleted file mode 100755
index 4326e0dae2..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_reset.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2016, Freescale Semiconductor, Inc.
- * Copyright 2016, NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_common.h"
-#include "fsl_reset.h"
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-/* Component ID definition, used by tools. */
-#ifndef FSL_COMPONENT_ID
-#define FSL_COMPONENT_ID "platform.drivers.reset"
-#endif
-
-/*******************************************************************************
- * Variables
- ******************************************************************************/
-
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-#if (defined(FSL_FEATURE_SOC_SYSCON_COUNT) && (FSL_FEATURE_SOC_SYSCON_COUNT > 0))
-
-/*!
- * brief Assert reset to peripheral.
- *
- * Asserts reset signal to specified peripheral module.
- *
- * param peripheral Assert reset to this peripheral. The enum argument contains encoding of reset register
- * and reset bit position in the reset register.
- */
-void RESET_SetPeripheralReset(reset_ip_name_t peripheral)
-{
- const uint32_t regIndex = ((uint32_t)peripheral & 0xFFFF0000u) >> 16;
- const uint32_t bitPos = ((uint32_t)peripheral & 0x0000FFFFu);
- const uint32_t bitMask = 1UL << bitPos;
-
- assert(bitPos < 32u);
-
- /* reset register is in SYSCON */
- /* set bit */
- SYSCON->PRESETCTRLSET[regIndex] = bitMask;
- /* wait until it reads 0b1 */
- while (0u == (SYSCON->PRESETCTRLX[regIndex] & bitMask))
- {
- }
-}
-
-/*!
- * brief Clear reset to peripheral.
- *
- * Clears reset signal to specified peripheral module, allows it to operate.
- *
- * param peripheral Clear reset to this peripheral. The enum argument contains encoding of reset register
- * and reset bit position in the reset register.
- */
-void RESET_ClearPeripheralReset(reset_ip_name_t peripheral)
-{
- const uint32_t regIndex = ((uint32_t)peripheral & 0xFFFF0000u) >> 16;
- const uint32_t bitPos = ((uint32_t)peripheral & 0x0000FFFFu);
- const uint32_t bitMask = 1UL << bitPos;
-
- assert(bitPos < 32u);
-
- /* reset register is in SYSCON */
-
- /* clear bit */
- SYSCON->PRESETCTRLCLR[regIndex] = bitMask;
- /* wait until it reads 0b0 */
- while (bitMask == (SYSCON->PRESETCTRLX[regIndex] & bitMask))
- {
- }
-}
-
-/*!
- * brief Reset peripheral module.
- *
- * Reset peripheral module.
- *
- * param peripheral Peripheral to reset. The enum argument contains encoding of reset register
- * and reset bit position in the reset register.
- */
-void RESET_PeripheralReset(reset_ip_name_t peripheral)
-{
- RESET_SetPeripheralReset(peripheral);
- RESET_ClearPeripheralReset(peripheral);
-}
-
-#endif /* FSL_FEATURE_SOC_SYSCON_COUNT || FSL_FEATURE_SOC_ASYNC_SYSCON_COUNT */
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_reset.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_reset.h
deleted file mode 100755
index 5d8015bb49..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_reset.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * Copyright (c) 2016, Freescale Semiconductor, Inc.
- * Copyright 2016, NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef _FSL_RESET_H_
-#define _FSL_RESET_H_
-
-#include <assert.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <string.h>
-#include "fsl_device_registers.h"
-
-/*!
- * @addtogroup ksdk_common
- * @{
- */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*! @name Driver version */
-/*@{*/
-/*! @brief reset driver version 2.0.2. */
-#define FSL_RESET_DRIVER_VERSION (MAKE_VERSION(2, 0, 2))
-/*@}*/
-
-/*!
- * @brief Enumeration for peripheral reset control bits
- *
- * Defines the enumeration for peripheral reset control bits in PRESETCTRL/ASYNCPRESETCTRL registers
- */
-typedef enum _SYSCON_RSTn
-{
- kROM_RST_SHIFT_RSTn = 0 | 1U, /**< ROM reset control */
- kSRAM1_RST_SHIFT_RSTn = 0 | 3U, /**< SRAM1 reset control */
- kSRAM2_RST_SHIFT_RSTn = 0 | 4U, /**< SRAM2 reset control */
- kSRAM3_RST_SHIFT_RSTn = 0 | 5U, /**< SRAM3 reset control */
- kSRAM4_RST_SHIFT_RSTn = 0 | 6U, /**< SRAM4 reset control */
- kFLASH_RST_SHIFT_RSTn = 0 | 7U, /**< Flash controller reset control */
- kFMC_RST_SHIFT_RSTn = 0 | 8U, /**< Flash accelerator reset control */
- kSPIFI_RST_SHIFT_RSTn = 0 | 10U, /**< SPIFI reset control */
- kMUX0_RST_SHIFT_RSTn = 0 | 11U, /**< Input mux0 reset control */
- kIOCON_RST_SHIFT_RSTn = 0 | 13U, /**< IOCON reset control */
- kGPIO0_RST_SHIFT_RSTn = 0 | 14U, /**< GPIO0 reset control */
- kGPIO1_RST_SHIFT_RSTn = 0 | 15U, /**< GPIO1 reset control */
- kGPIO2_RST_SHIFT_RSTn = 0 | 16U, /**< GPIO2 reset control */
- kGPIO3_RST_SHIFT_RSTn = 0 | 17U, /**< GPIO3 reset control */
- kPINT_RST_SHIFT_RSTn = 0 | 18U, /**< Pin interrupt (PINT) reset control */
- kGINT_RST_SHIFT_RSTn = 0 | 19U, /**< Grouped interrupt (PINT) reset control. */
- kDMA0_RST_SHIFT_RSTn = 0 | 20U, /**< DMA reset control */
- kCRC_RST_SHIFT_RSTn = 0 | 21U, /**< CRC reset control */
- kWWDT_RST_SHIFT_RSTn = 0 | 22U, /**< Watchdog timer reset control */
- kRTC_RST_SHIFT_RSTn = 0 | 23U, /**< RTC reset control */
- kMAILBOX_RST_SHIFT_RSTn = 0 | 26U, /**< Mailbox reset control */
- kADC0_RST_SHIFT_RSTn = 0 | 27U, /**< ADC0 reset control */
-
- kMRT_RST_SHIFT_RSTn = 65536 | 0U, /**< Multi-rate timer (MRT) reset control */
- kOSTIMER0_RST_SHIFT_RSTn = 65536 | 1U, /**< OSTimer0 reset control */
- kSCT0_RST_SHIFT_RSTn = 65536 | 2U, /**< SCTimer/PWM 0 (SCT0) reset control */
- kSCTIPU_RST_SHIFT_RSTn = 65536 | 6U, /**< SCTIPU reset control */
- kUTICK_RST_SHIFT_RSTn = 65536 | 10U, /**< Micro-tick timer reset control */
- kFC0_RST_SHIFT_RSTn = 65536 | 11U, /**< Flexcomm Interface 0 reset control */
- kFC1_RST_SHIFT_RSTn = 65536 | 12U, /**< Flexcomm Interface 1 reset control */
- kFC2_RST_SHIFT_RSTn = 65536 | 13U, /**< Flexcomm Interface 2 reset control */
- kFC3_RST_SHIFT_RSTn = 65536 | 14U, /**< Flexcomm Interface 3 reset control */
- kFC4_RST_SHIFT_RSTn = 65536 | 15U, /**< Flexcomm Interface 4 reset control */
- kFC5_RST_SHIFT_RSTn = 65536 | 16U, /**< Flexcomm Interface 5 reset control */
- kFC6_RST_SHIFT_RSTn = 65536 | 17U, /**< Flexcomm Interface 6 reset control */
- kFC7_RST_SHIFT_RSTn = 65536 | 18U, /**< Flexcomm Interface 7 reset control */
- kCTIMER2_RST_SHIFT_RSTn = 65536 | 22U, /**< CTimer 2 reset control */
- kUSB0D_RST_SHIFT_RSTn = 65536 | 25U, /**< USB0 Device reset control */
- kCTIMER0_RST_SHIFT_RSTn = 65536 | 26U, /**< CTimer 0 reset control */
- kCTIMER1_RST_SHIFT_RSTn = 65536 | 27U, /**< CTimer 1 reset control */
- kPVT_RST_SHIFT_RSTn = 65536 | 28U, /**< PVT reset control */
- kEZHA_RST_SHIFT_RSTn = 65536 | 30U, /**< EZHA reset control */
- kEZHB_RST_SHIFT_RSTn = 65536 | 31U, /**< EZHB reset control */
-
- kDMA1_RST_SHIFT_RSTn = 131072 | 1U, /**< DMA1 reset control */
- kCMP_RST_SHIFT_RSTn = 131072 | 2U, /**< CMP reset control */
- kSDIO_RST_SHIFT_RSTn = 131072 | 3U, /**< SDIO reset control */
- kUSB1H_RST_SHIFT_RSTn = 131072 | 4U, /**< USBHS Host reset control */
- kUSB1D_RST_SHIFT_RSTn = 131072 | 5U, /**< USBHS Device reset control */
- kUSB1RAM_RST_SHIFT_RSTn = 131072 | 6U, /**< USB RAM reset control */
- kUSB1_RST_SHIFT_RSTn = 131072 | 7U, /**< USBHS reset control */
- kFREQME_RST_SHIFT_RSTn = 131072 | 8U, /**< FREQME reset control */
- kGPIO4_RST_SHIFT_RSTn = 131072 | 9U, /**< GPIO4 reset control */
- kGPIO5_RST_SHIFT_RSTn = 131072 | 10U, /**< GPIO5 reset control */
- kAES_RST_SHIFT_RSTn = 131072 | 11U, /**< AES reset control */
- kOTP_RST_SHIFT_RSTn = 131072 | 12U, /**< OTP reset control */
- kRNG_RST_SHIFT_RSTn = 131072 | 13U, /**< RNG reset control */
- kMUX1_RST_SHIFT_RSTn = 131072 | 14U, /**< Input mux1 reset control */
- kUSB0HMR_RST_SHIFT_RSTn = 131072 | 16U, /**< USB0HMR reset control */
- kUSB0HSL_RST_SHIFT_RSTn = 131072 | 17U, /**< USB0HSL reset control */
- kHASHCRYPT_RST_SHIFT_RSTn = 131072 | 18U, /**< HASHCRYPT reset control */
- kPOWERQUAD_RST_SHIFT_RSTn = 131072 | 19U, /**< PowerQuad reset control */
- kPLULUT_RST_SHIFT_RSTn = 131072 | 20U, /**< PLU LUT reset control */
- kCTIMER3_RST_SHIFT_RSTn = 131072 | 21U, /**< CTimer 3 reset control */
- kCTIMER4_RST_SHIFT_RSTn = 131072 | 22U, /**< CTimer 4 reset control */
- kPUF_RST_SHIFT_RSTn = 131072 | 23U, /**< PUF reset control */
- kCASPER_RST_SHIFT_RSTn = 131072 | 24U, /**< CASPER reset control */
- kCAP0_RST_SHIFT_RSTn = 131072 | 25U, /**< CASPER reset control */
- kOSTIMER1_RST_SHIFT_RSTn = 131072 | 26U, /**< OSTIMER1 reset control */
- kANALOGCTL_RST_SHIFT_RSTn = 131072 | 27U, /**< ANALOG_CTL reset control */
- kHSLSPI_RST_SHIFT_RSTn = 131072 | 28U, /**< HS LSPI reset control */
- kGPIOSEC_RST_SHIFT_RSTn = 131072 | 29U, /**< GPIO Secure reset control */
- kGPIOSECINT_RST_SHIFT_RSTn = 131072 | 30U, /**< GPIO Secure int reset control */
-} SYSCON_RSTn_t;
-
-/** Array initializers with peripheral reset bits **/
-#define ADC_RSTS \
- { \
- kADC0_RST_SHIFT_RSTn \
- } /* Reset bits for ADC peripheral */
-#define AES_RSTS \
- { \
- kAES_RST_SHIFT_RSTn \
- } /* Reset bits for AES peripheral */
-#define CRC_RSTS \
- { \
- kCRC_RST_SHIFT_RSTn \
- } /* Reset bits for CRC peripheral */
-#define CTIMER_RSTS \
- { \
- kCTIMER0_RST_SHIFT_RSTn, kCTIMER1_RST_SHIFT_RSTn, kCTIMER2_RST_SHIFT_RSTn, kCTIMER3_RST_SHIFT_RSTn, \
- kCTIMER4_RST_SHIFT_RSTn \
- } /* Reset bits for CTIMER peripheral */
-#define DMA_RSTS_N \
- { \
- kDMA0_RST_SHIFT_RSTn, kDMA1_RST_SHIFT_RSTn \
- } /* Reset bits for DMA peripheral */
-
-#define FLEXCOMM_RSTS \
- { \
- kFC0_RST_SHIFT_RSTn, kFC1_RST_SHIFT_RSTn, kFC2_RST_SHIFT_RSTn, kFC3_RST_SHIFT_RSTn, kFC4_RST_SHIFT_RSTn, \
- kFC5_RST_SHIFT_RSTn, kFC6_RST_SHIFT_RSTn, kFC7_RST_SHIFT_RSTn, kHSLSPI_RST_SHIFT_RSTn \
- } /* Reset bits for FLEXCOMM peripheral */
-#define GINT_RSTS \
- { \
- kGINT_RST_SHIFT_RSTn, kGINT_RST_SHIFT_RSTn \
- } /* Reset bits for GINT peripheral. GINT0 & GINT1 share same slot */
-#define GPIO_RSTS_N \
- { \
- kGPIO0_RST_SHIFT_RSTn, kGPIO1_RST_SHIFT_RSTn, kGPIO2_RST_SHIFT_RSTn, kGPIO3_RST_SHIFT_RSTn, \
- kGPIO4_RST_SHIFT_RSTn, kGPIO5_RST_SHIFT_RSTn \
- } /* Reset bits for GPIO peripheral */
-#define INPUTMUX_RSTS \
- { \
- kMUX0_RST_SHIFT_RSTn, kMUX1_RST_SHIFT_RSTn \
- } /* Reset bits for INPUTMUX peripheral */
-#define IOCON_RSTS \
- { \
- kIOCON_RST_SHIFT_RSTn \
- } /* Reset bits for IOCON peripheral */
-#define FLASH_RSTS \
- { \
- kFLASH_RST_SHIFT_RSTn, kFMC_RST_SHIFT_RSTn \
- } /* Reset bits for Flash peripheral */
-#define MRT_RSTS \
- { \
- kMRT_RST_SHIFT_RSTn \
- } /* Reset bits for MRT peripheral */
-#define OTP_RSTS \
- { \
- kOTP_RST_SHIFT_RSTn \
- } /* Reset bits for OTP peripheral */
-#define PINT_RSTS \
- { \
- kPINT_RST_SHIFT_RSTn \
- } /* Reset bits for PINT peripheral */
-#define RNG_RSTS \
- { \
- kRNG_RST_SHIFT_RSTn \
- } /* Reset bits for RNG peripheral */
-#define SDIO_RST \
- { \
- kSDIO_RST_SHIFT_RSTn \
- } /* Reset bits for SDIO peripheral */
-#define SCT_RSTS \
- { \
- kSCT0_RST_SHIFT_RSTn \
- } /* Reset bits for SCT peripheral */
-#define SPIFI_RSTS \
- { \
- kSPIFI_RST_SHIFT_RSTn \
- } /* Reset bits for SPIFI peripheral */
-#define USB0D_RST \
- { \
- kUSB0D_RST_SHIFT_RSTn \
- } /* Reset bits for USB0D peripheral */
-#define USB0HMR_RST \
- { \
- kUSB0HMR_RST_SHIFT_RSTn \
- } /* Reset bits for USB0HMR peripheral */
-#define USB0HSL_RST \
- { \
- kUSB0HSL_RST_SHIFT_RSTn \
- } /* Reset bits for USB0HSL peripheral */
-#define USB1H_RST \
- { \
- kUSB1H_RST_SHIFT_RSTn \
- } /* Reset bits for USB1H peripheral */
-#define USB1D_RST \
- { \
- kUSB1D_RST_SHIFT_RSTn \
- } /* Reset bits for USB1D peripheral */
-#define USB1RAM_RST \
- { \
- kUSB1RAM_RST_SHIFT_RSTn \
- } /* Reset bits for USB1RAM peripheral */
-#define UTICK_RSTS \
- { \
- kUTICK_RST_SHIFT_RSTn \
- } /* Reset bits for UTICK peripheral */
-#define WWDT_RSTS \
- { \
- kWWDT_RST_SHIFT_RSTn \
- } /* Reset bits for WWDT peripheral */
-#define CAPT_RSTS_N \
- { \
- kCAP0_RST_SHIFT_RSTn \
- } /* Reset bits for CAPT peripheral */
-#define PLU_RSTS_N \
- { \
- kPLULUT_RST_SHIFT_RSTn \
- } /* Reset bits for PLU peripheral */
-#define OSTIMER_RSTS \
- { \
- kOSTIMER0_RST_SHIFT_RSTn \
- } /* Reset bits for OSTIMER peripheral */
-typedef SYSCON_RSTn_t reset_ip_name_t;
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/*!
- * @brief Assert reset to peripheral.
- *
- * Asserts reset signal to specified peripheral module.
- *
- * @param peripheral Assert reset to this peripheral. The enum argument contains encoding of reset register
- * and reset bit position in the reset register.
- */
-void RESET_SetPeripheralReset(reset_ip_name_t peripheral);
-
-/*!
- * @brief Clear reset to peripheral.
- *
- * Clears reset signal to specified peripheral module, allows it to operate.
- *
- * @param peripheral Clear reset to this peripheral. The enum argument contains encoding of reset register
- * and reset bit position in the reset register.
- */
-void RESET_ClearPeripheralReset(reset_ip_name_t peripheral);
-
-/*!
- * @brief Reset peripheral module.
- *
- * Reset peripheral module.
- *
- * @param peripheral Peripheral to reset. The enum argument contains encoding of reset register
- * and reset bit position in the reset register.
- */
-void RESET_PeripheralReset(reset_ip_name_t peripheral);
-
-#if defined(__cplusplus)
-}
-#endif
-
-/*! @} */
-
-#endif /* _FSL_RESET_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_rng.c b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_rng.c
deleted file mode 100755
index f281e4e489..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_rng.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright 2017 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_rng.h"
-
-/* Component ID definition, used by tools. */
-#ifndef FSL_COMPONENT_ID
-#define FSL_COMPONENT_ID "platform.drivers.rng_1"
-#endif
-
-/*******************************************************************************
- * Definitions
- *******************************************************************************/
-
-/*******************************************************************************
- * Prototypes
- *******************************************************************************/
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-void RNG_Init(RNG_Type *base)
-{
- /* Clear ring oscilator disable bit*/
- PMC->PDRUNCFGCLR0 = PMC_PDRUNCFG0_PDEN_RNG_MASK;
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
- CLOCK_EnableClock(kCLOCK_Rng);
-#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
-}
-
-void RNG_Deinit(RNG_Type *base)
-{
- /* Set ring oscilator disable bit*/
- PMC->PDRUNCFGSET0 = PMC_PDRUNCFG0_PDEN_RNG_MASK;
-#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
- CLOCK_DisableClock(kCLOCK_Rng);
-#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
-}
-
-status_t RNG_GetRandomData(RNG_Type *base, void *data, size_t dataSize)
-{
- status_t result = kStatus_Fail;
- uint32_t random32;
- uint32_t randomSize;
- uint8_t *pRandom;
- uint8_t *pData = (uint8_t *)data;
- uint32_t i;
-
- /* Check input parameters.*/
- if (!(base && data && dataSize))
- {
- result = kStatus_InvalidArgument;
- }
- else
- {
- /* Check that ring oscilator is enabled */
- if (!(PMC->PDRUNCFG0 & PMC_PDRUNCFG0_PDEN_RNG_MASK))
- {
- do
- {
- /* Read Entropy.*/
- random32 = base->RANDOM_NUMBER;
- pRandom = (uint8_t *)&random32;
-
- if (dataSize < sizeof(random32))
- {
- randomSize = dataSize;
- }
- else
- {
- randomSize = sizeof(random32);
- }
-
- for (i = 0; i < randomSize; i++)
- {
- *pData++ = *pRandom++;
- }
-
- dataSize -= randomSize;
- } while (dataSize > 0);
-
- result = kStatus_Success;
- }
- }
-
- return result;
-}
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_rng.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_rng.h
deleted file mode 100755
index e5a7e90c48..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_rng.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2017 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef _FSL_RNG_DRIVER_H_
-#define _FSL_RNG_DRIVER_H_
-
-#include "fsl_common.h"
-
-/*!
- * @addtogroup rng
- * @{
- */
-
-/*******************************************************************************
- * Definitions
- *******************************************************************************/
-
-/*! @name Driver version */
-/*@{*/
-/*! @brief RNG driver version. Version 2.0.0.
- *
- * Current version: 2.0.0
- *
- * Change log:
- * - Version 2.0.0
- * - Initial version
- */
-#define FSL_RNG_DRIVER_VERSION (MAKE_VERSION(2, 0, 0))
-/*@}*/
-
-/*******************************************************************************
- * API
- *******************************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/*!
- * @brief Initializes the RNG.
- *
- * This function initializes the RNG.
- * When called, the RNG module and ring oscillator is enabled.
- *
- * @param base RNG base address
- * @param userConfig Pointer to the initialization configuration structure.
- * @return If successful, returns the kStatus_RNG_Success. Otherwise, it returns an error.
- */
-void RNG_Init(RNG_Type *base);
-
-/*!
- * @brief Shuts down the RNG.
- *
- * This function shuts down the RNG.
- *
- * @param base RNG base address.
- */
-void RNG_Deinit(RNG_Type *base);
-
-/*!
- * @brief Gets random data.
- *
- * This function gets random data from the RNG.
- *
- * @param base RNG base address.
- * @param data Pointer address used to store random data.
- * @param dataSize Size of the buffer pointed by the data parameter.
- * @return random data
- */
-status_t RNG_GetRandomData(RNG_Type *base, void *data, size_t data_size);
-
-/*!
- * @brief Returns random 32-bit number.
- *
- * This function gets random number from the RNG.
- *
- * @param base RNG base address.
- * @return random number
- */
-static inline uint32_t RNG_GetRandomWord(RNG_Type *base)
-{
- return base->RANDOM_NUMBER;
-}
-
-#if defined(__cplusplus)
-}
-#endif
-
-/*! @}*/
-
-#endif /*_FSL_RNG_H_*/
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_usart.c b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_usart.c
deleted file mode 100755
index 10ac7e1fe8..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_usart.c
+++ /dev/null
@@ -1,957 +0,0 @@
-/*
- * Copyright (c) 2016, Freescale Semiconductor, Inc.
- * Copyright 2016-2019 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_usart.h"
-#include "fsl_device_registers.h"
-#include "fsl_flexcomm.h"
-
-/* Component ID definition, used by tools. */
-#ifndef FSL_COMPONENT_ID
-#define FSL_COMPONENT_ID "platform.drivers.flexcomm_usart"
-#endif
-
-enum _usart_transfer_states
-{
- kUSART_TxIdle, /* TX idle. */
- kUSART_TxBusy, /* TX busy. */
- kUSART_RxIdle, /* RX idle. */
- kUSART_RxBusy /* RX busy. */
-};
-
-/*******************************************************************************
- * Variables
- ******************************************************************************/
-
-/*! @brief IRQ name array */
-static const IRQn_Type s_usartIRQ[] = USART_IRQS;
-
-/*! @brief Array to map USART instance number to base address. */
-static const uint32_t s_usartBaseAddrs[FSL_FEATURE_SOC_USART_COUNT] = USART_BASE_ADDRS;
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-/* Get the index corresponding to the USART */
-/*! brief Returns instance number for USART peripheral base address. */
-uint32_t USART_GetInstance(USART_Type *base)
-{
- int i;
-
- for (i = 0; i < FSL_FEATURE_SOC_USART_COUNT; i++)
- {
- if ((uint32_t)base == s_usartBaseAddrs[i])
- {
- return i;
- }
- }
-
- assert(false);
- return 0;
-}
-
-/*!
- * brief Get the length of received data in RX ring buffer.
- *
- * param handle USART handle pointer.
- * return Length of received data in RX ring buffer.
- */
-size_t USART_TransferGetRxRingBufferLength(usart_handle_t *handle)
-{
- size_t size;
-
- /* Check arguments */
- assert(NULL != handle);
- uint16_t rxRingBufferHead = handle->rxRingBufferHead;
- uint16_t rxRingBufferTail = handle->rxRingBufferTail;
-
- if (rxRingBufferTail > rxRingBufferHead)
- {
- size = (size_t)(rxRingBufferHead + (uint16_t)handle->rxRingBufferSize - rxRingBufferTail);
- }
- else
- {
- size = (size_t)(rxRingBufferHead - rxRingBufferTail);
- }
- return size;
-}
-
-static bool USART_TransferIsRxRingBufferFull(usart_handle_t *handle)
-{
- bool full;
-
- /* Check arguments */
- assert(NULL != handle);
-
- if (USART_TransferGetRxRingBufferLength(handle) == (handle->rxRingBufferSize - 1U))
- {
- full = true;
- }
- else
- {
- full = false;
- }
- return full;
-}
-
-/*!
- * brief Sets up the RX ring buffer.
- *
- * This function sets up the RX ring buffer to a specific USART handle.
- *
- * When the RX ring buffer is used, data received are stored into the ring buffer even when the
- * user doesn't call the USART_TransferReceiveNonBlocking() API. If there is already data received
- * in the ring buffer, the user can get the received data from the ring buffer directly.
- *
- * note When using the RX ring buffer, one byte is reserved for internal use. In other
- * words, if p ringBufferSize is 32, then only 31 bytes are used for saving data.
- *
- * param base USART peripheral base address.
- * param handle USART handle pointer.
- * param ringBuffer Start address of the ring buffer for background receiving. Pass NULL to disable the ring buffer.
- * param ringBufferSize size of the ring buffer.
- */
-void USART_TransferStartRingBuffer(USART_Type *base, usart_handle_t *handle, uint8_t *ringBuffer, size_t ringBufferSize)
-{
- /* Check arguments */
- assert(NULL != base);
- assert(NULL != handle);
- assert(NULL != ringBuffer);
-
- /* Setup the ringbuffer address */
- handle->rxRingBuffer = ringBuffer;
- handle->rxRingBufferSize = ringBufferSize;
- handle->rxRingBufferHead = 0U;
- handle->rxRingBufferTail = 0U;
- /* ring buffer is ready we can start receiving data */
- base->FIFOINTENSET |= USART_FIFOINTENSET_RXLVL_MASK | USART_FIFOINTENSET_RXERR_MASK;
-}
-
-/*!
- * brief Aborts the background transfer and uninstalls the ring buffer.
- *
- * This function aborts the background transfer and uninstalls the ring buffer.
- *
- * param base USART peripheral base address.
- * param handle USART handle pointer.
- */
-void USART_TransferStopRingBuffer(USART_Type *base, usart_handle_t *handle)
-{
- /* Check arguments */
- assert(NULL != base);
- assert(NULL != handle);
-
- if (handle->rxState == kUSART_RxIdle)
- {
- base->FIFOINTENCLR = USART_FIFOINTENCLR_RXLVL_MASK | USART_FIFOINTENCLR_RXERR_MASK;
- }
- handle->rxRingBuffer = NULL;
- handle->rxRingBufferSize = 0U;
- handle->rxRingBufferHead = 0U;
- handle->rxRingBufferTail = 0U;
-}
-
-/*!
- * brief Initializes a USART instance with user configuration structure and peripheral clock.
- *
- * This function configures the USART module with the user-defined settings. The user can configure the configuration
- * structure and also get the default configuration by using the USART_GetDefaultConfig() function.
- * Example below shows how to use this API to configure USART.
- * code
- * usart_config_t usartConfig;
- * usartConfig.baudRate_Bps = 115200U;
- * usartConfig.parityMode = kUSART_ParityDisabled;
- * usartConfig.stopBitCount = kUSART_OneStopBit;
- * USART_Init(USART1, &usartConfig, 20000000U);
- * endcode
- *
- * param base USART peripheral base address.
- * param config Pointer to user-defined configuration structure.
- * param srcClock_Hz USART clock source frequency in HZ.
- * retval kStatus_USART_BaudrateNotSupport Baudrate is not support in current clock source.
- * retval kStatus_InvalidArgument USART base address is not valid
- * retval kStatus_Success Status USART initialize succeed
- */
-status_t USART_Init(USART_Type *base, const usart_config_t *config, uint32_t srcClock_Hz)
-{
- int result;
-
- /* check arguments */
- assert(!((NULL == base) || (NULL == config) || (0 == srcClock_Hz)));
- if ((NULL == base) || (NULL == config) || (0 == srcClock_Hz))
- {
- return kStatus_InvalidArgument;
- }
-
- /* initialize flexcomm to USART mode */
- result = FLEXCOMM_Init(base, FLEXCOMM_PERIPH_USART);
- if (kStatus_Success != result)
- {
- return result;
- }
-
- if (config->enableTx)
- {
- /* empty and enable txFIFO */
- base->FIFOCFG |= USART_FIFOCFG_EMPTYTX_MASK | USART_FIFOCFG_ENABLETX_MASK;
- /* setup trigger level */
- base->FIFOTRIG &= ~(USART_FIFOTRIG_TXLVL_MASK);
- base->FIFOTRIG |= USART_FIFOTRIG_TXLVL(config->txWatermark);
- /* enable trigger interrupt */
- base->FIFOTRIG |= USART_FIFOTRIG_TXLVLENA_MASK;
- }
-
- /* empty and enable rxFIFO */
- if (config->enableRx)
- {
- base->FIFOCFG |= USART_FIFOCFG_EMPTYRX_MASK | USART_FIFOCFG_ENABLERX_MASK;
- /* setup trigger level */
- base->FIFOTRIG &= ~(USART_FIFOTRIG_RXLVL_MASK);
- base->FIFOTRIG |= USART_FIFOTRIG_RXLVL(config->rxWatermark);
- /* enable trigger interrupt */
- base->FIFOTRIG |= USART_FIFOTRIG_RXLVLENA_MASK;
- }
- /* setup configuration and enable USART */
- base->CFG = USART_CFG_PARITYSEL(config->parityMode) | USART_CFG_STOPLEN(config->stopBitCount) |
- USART_CFG_DATALEN(config->bitCountPerChar) | USART_CFG_LOOP(config->loopback) |
- USART_CFG_SYNCEN(config->syncMode >> 1) | USART_CFG_SYNCMST(config->syncMode) |
- USART_CFG_CLKPOL(config->clockPolarity) | USART_CFG_ENABLE_MASK;
-
- /* Setup baudrate */
- result = USART_SetBaudRate(base, config->baudRate_Bps, srcClock_Hz);
- if (kStatus_Success != result)
- {
- return result;
- }
- /* Setting continuous Clock configuration. used for synchronous mode. */
- USART_EnableContinuousSCLK(base, config->enableContinuousSCLK);
-
- return kStatus_Success;
-}
-
-/*!
- * brief Deinitializes a USART instance.
- *
- * This function waits for TX complete, disables TX and RX, and disables the USART clock.
- *
- * param base USART peripheral base address.
- */
-void USART_Deinit(USART_Type *base)
-{
- /* Check arguments */
- assert(NULL != base);
- while (!(base->STAT & USART_STAT_TXIDLE_MASK))
- {
- }
- /* Disable interrupts, disable dma requests, disable peripheral */
- base->FIFOINTENCLR = USART_FIFOINTENCLR_TXERR_MASK | USART_FIFOINTENCLR_RXERR_MASK | USART_FIFOINTENCLR_TXLVL_MASK |
- USART_FIFOINTENCLR_RXLVL_MASK;
- base->FIFOCFG &= ~(USART_FIFOCFG_DMATX_MASK | USART_FIFOCFG_DMARX_MASK);
- base->CFG &= ~(USART_CFG_ENABLE_MASK);
-}
-
-/*!
- * brief Gets the default configuration structure.
- *
- * This function initializes the USART configuration structure to a default value. The default
- * values are:
- * usartConfig->baudRate_Bps = 115200U;
- * usartConfig->parityMode = kUSART_ParityDisabled;
- * usartConfig->stopBitCount = kUSART_OneStopBit;
- * usartConfig->bitCountPerChar = kUSART_8BitsPerChar;
- * usartConfig->loopback = false;
- * usartConfig->enableTx = false;
- * usartConfig->enableRx = false;
- *
- * param config Pointer to configuration structure.
- */
-void USART_GetDefaultConfig(usart_config_t *config)
-{
- /* Check arguments */
- assert(NULL != config);
-
- /* Initializes the configure structure to zero. */
- memset(config, 0, sizeof(*config));
-
- /* Set always all members ! */
- config->baudRate_Bps = 115200U;
- config->parityMode = kUSART_ParityDisabled;
- config->stopBitCount = kUSART_OneStopBit;
- config->bitCountPerChar = kUSART_8BitsPerChar;
- config->loopback = false;
- config->enableRx = false;
- config->enableTx = false;
- config->txWatermark = kUSART_TxFifo0;
- config->rxWatermark = kUSART_RxFifo1;
- config->syncMode = kUSART_SyncModeDisabled;
- config->enableContinuousSCLK = false;
- config->clockPolarity = kUSART_RxSampleOnFallingEdge;
-}
-
-/*!
- * brief Sets the USART instance baud rate.
- *
- * This function configures the USART module baud rate. This function is used to update
- * the USART module baud rate after the USART module is initialized by the USART_Init.
- * code
- * USART_SetBaudRate(USART1, 115200U, 20000000U);
- * endcode
- *
- * param base USART peripheral base address.
- * param baudrate_Bps USART baudrate to be set.
- * param srcClock_Hz USART clock source frequency in HZ.
- * retval kStatus_USART_BaudrateNotSupport Baudrate is not support in current clock source.
- * retval kStatus_Success Set baudrate succeed.
- * retval kStatus_InvalidArgument One or more arguments are invalid.
- */
-status_t USART_SetBaudRate(USART_Type *base, uint32_t baudrate_Bps, uint32_t srcClock_Hz)
-{
- uint32_t best_diff = (uint32_t)-1, best_osrval = 0xf, best_brgval = (uint32_t)-1;
- uint32_t osrval, brgval, diff, baudrate;
-
- /* check arguments */
- assert(!((NULL == base) || (0 == baudrate_Bps) || (0 == srcClock_Hz)));
- if ((NULL == base) || (0 == baudrate_Bps) || (0 == srcClock_Hz))
- {
- return kStatus_InvalidArgument;
- }
-
- /* If synchronous master mode is enabled, only configure the BRG value. */
- if (base->CFG & USART_CFG_SYNCEN_MASK)
- {
- if (base->CFG & USART_CFG_SYNCMST_MASK)
- {
- brgval = srcClock_Hz / baudrate_Bps;
- base->BRG = brgval - 1;
- }
- }
- else
- {
- /*
- * Smaller values of OSR can make the sampling position within a data bit less accurate and may
- * potentially cause more noise errors or incorrect data.
- */
- for (osrval = best_osrval; osrval >= 8; osrval--)
- {
- brgval = (((srcClock_Hz * 10) / ((osrval + 1) * baudrate_Bps)) - 5) / 10;
- if (brgval > 0xFFFF)
- {
- continue;
- }
- baudrate = srcClock_Hz / ((osrval + 1) * (brgval + 1));
- diff = baudrate_Bps < baudrate ? baudrate - baudrate_Bps : baudrate_Bps - baudrate;
- if (diff < best_diff)
- {
- best_diff = diff;
- best_osrval = osrval;
- best_brgval = brgval;
- }
- }
-
- /* value over range */
- if (best_brgval > 0xFFFF)
- {
- return kStatus_USART_BaudrateNotSupport;
- }
-
- base->OSR = best_osrval;
- base->BRG = best_brgval;
- }
-
- return kStatus_Success;
-}
-
-/*!
- * brief Writes to the TX register using a blocking method.
- *
- * This function polls the TX register, waits for the TX register to be empty or for the TX FIFO
- * to have room and writes data to the TX buffer.
- *
- * param base USART peripheral base address.
- * param data Start address of the data to write.
- * param length Size of the data to write.
- */
-void USART_WriteBlocking(USART_Type *base, const uint8_t *data, size_t length)
-{
- /* Check arguments */
- assert(!((NULL == base) || (NULL == data)));
- if ((NULL == base) || (NULL == data))
- {
- return;
- }
- /* Check whether txFIFO is enabled */
- if (!(base->FIFOCFG & USART_FIFOCFG_ENABLETX_MASK))
- {
- return;
- }
- for (; length > 0; length--)
- {
- /* Loop until txFIFO get some space for new data */
- while (!(base->FIFOSTAT & USART_FIFOSTAT_TXNOTFULL_MASK))
- {
- }
- base->FIFOWR = *data;
- data++;
- }
- /* Wait to finish transfer */
- while (!(base->STAT & USART_STAT_TXIDLE_MASK))
- {
- }
-}
-
-/*!
- * brief Read RX data register using a blocking method.
- *
- * This function polls the RX register, waits for the RX register to be full or for RX FIFO to
- * have data and read data from the TX register.
- *
- * param base USART peripheral base address.
- * param data Start address of the buffer to store the received data.
- * param length Size of the buffer.
- * retval kStatus_USART_FramingError Receiver overrun happened while receiving data.
- * retval kStatus_USART_ParityError Noise error happened while receiving data.
- * retval kStatus_USART_NoiseError Framing error happened while receiving data.
- * retval kStatus_USART_RxError Overflow or underflow rxFIFO happened.
- * retval kStatus_Success Successfully received all data.
- */
-status_t USART_ReadBlocking(USART_Type *base, uint8_t *data, size_t length)
-{
- uint32_t status;
-
- /* check arguments */
- assert(!((NULL == base) || (NULL == data)));
- if ((NULL == base) || (NULL == data))
- {
- return kStatus_InvalidArgument;
- }
-
- /* Check whether rxFIFO is enabled */
- if (!(base->FIFOCFG & USART_FIFOCFG_ENABLERX_MASK))
- {
- return kStatus_Fail;
- }
- for (; length > 0; length--)
- {
- /* loop until rxFIFO have some data to read */
- while (!(base->FIFOSTAT & USART_FIFOSTAT_RXNOTEMPTY_MASK))
- {
- }
- /* check receive status */
- status = base->STAT;
- if (status & USART_STAT_FRAMERRINT_MASK)
- {
- base->STAT |= USART_STAT_FRAMERRINT_MASK;
- return kStatus_USART_FramingError;
- }
- if (status & USART_STAT_PARITYERRINT_MASK)
- {
- base->STAT |= USART_STAT_PARITYERRINT_MASK;
- return kStatus_USART_ParityError;
- }
- if (status & USART_STAT_RXNOISEINT_MASK)
- {
- base->STAT |= USART_STAT_RXNOISEINT_MASK;
- return kStatus_USART_NoiseError;
- }
- /* check rxFIFO status */
- if (base->FIFOSTAT & USART_FIFOSTAT_RXERR_MASK)
- {
- base->FIFOCFG |= USART_FIFOCFG_EMPTYRX_MASK;
- base->FIFOSTAT |= USART_FIFOSTAT_RXERR_MASK;
- return kStatus_USART_RxError;
- }
-
- *data = base->FIFORD;
- data++;
- }
- return kStatus_Success;
-}
-
-/*!
- * brief Initializes the USART handle.
- *
- * This function initializes the USART handle which can be used for other USART
- * transactional APIs. Usually, for a specified USART instance,
- * call this API once to get the initialized handle.
- *
- * param base USART peripheral base address.
- * param handle USART handle pointer.
- * param callback The callback function.
- * param userData The parameter of the callback function.
- */
-status_t USART_TransferCreateHandle(USART_Type *base,
- usart_handle_t *handle,
- usart_transfer_callback_t callback,
- void *userData)
-{
- int32_t instance = 0;
-
- /* Check 'base' */
- assert(!((NULL == base) || (NULL == handle)));
- if ((NULL == base) || (NULL == handle))
- {
- return kStatus_InvalidArgument;
- }
-
- instance = USART_GetInstance(base);
-
- memset(handle, 0, sizeof(*handle));
- /* Set the TX/RX state. */
- handle->rxState = kUSART_RxIdle;
- handle->txState = kUSART_TxIdle;
- /* Set the callback and user data. */
- handle->callback = callback;
- handle->userData = userData;
- handle->rxWatermark = (usart_rxfifo_watermark_t)USART_FIFOTRIG_RXLVL_GET(base);
- handle->txWatermark = (usart_txfifo_watermark_t)USART_FIFOTRIG_TXLVL_GET(base);
-
- FLEXCOMM_SetIRQHandler(base, (flexcomm_irq_handler_t)USART_TransferHandleIRQ, handle);
-
- /* Enable interrupt in NVIC. */
- EnableIRQ(s_usartIRQ[instance]);
-
- return kStatus_Success;
-}
-
-/*!
- * brief Transmits a buffer of data using the interrupt method.
- *
- * This function sends data using an interrupt method. This is a non-blocking function, which
- * returns directly without waiting for all data to be written to the TX register. When
- * all data is written to the TX register in the IRQ handler, the USART driver calls the callback
- * function and passes the ref kStatus_USART_TxIdle as status parameter.
- *
- * note The kStatus_USART_TxIdle is passed to the upper layer when all data is written
- * to the TX register. However it does not ensure that all data are sent out. Before disabling the TX,
- * check the kUSART_TransmissionCompleteFlag to ensure that the TX is finished.
- *
- * param base USART peripheral base address.
- * param handle USART handle pointer.
- * param xfer USART transfer structure. See #usart_transfer_t.
- * retval kStatus_Success Successfully start the data transmission.
- * retval kStatus_USART_TxBusy Previous transmission still not finished, data not all written to TX register yet.
- * retval kStatus_InvalidArgument Invalid argument.
- */
-status_t USART_TransferSendNonBlocking(USART_Type *base, usart_handle_t *handle, usart_transfer_t *xfer)
-{
- /* Check arguments */
- assert(!((NULL == base) || (NULL == handle) || (NULL == xfer)));
- if ((NULL == base) || (NULL == handle) || (NULL == xfer))
- {
- return kStatus_InvalidArgument;
- }
- /* Check xfer members */
- assert(!((0 == xfer->dataSize) || (NULL == xfer->data)));
- if ((0 == xfer->dataSize) || (NULL == xfer->data))
- {
- return kStatus_InvalidArgument;
- }
-
- /* Return error if current TX busy. */
- if (kUSART_TxBusy == handle->txState)
- {
- return kStatus_USART_TxBusy;
- }
- else
- {
- handle->txData = xfer->data;
- handle->txDataSize = xfer->dataSize;
- handle->txDataSizeAll = xfer->dataSize;
- handle->txState = kUSART_TxBusy;
- /* Enable transmiter interrupt. */
- base->FIFOINTENSET |= USART_FIFOINTENSET_TXLVL_MASK;
- }
- return kStatus_Success;
-}
-
-/*!
- * brief Aborts the interrupt-driven data transmit.
- *
- * This function aborts the interrupt driven data sending. The user can get the remainBtyes to find out
- * how many bytes are still not sent out.
- *
- * param base USART peripheral base address.
- * param handle USART handle pointer.
- */
-void USART_TransferAbortSend(USART_Type *base, usart_handle_t *handle)
-{
- assert(NULL != handle);
-
- /* Disable interrupts */
- USART_DisableInterrupts(base, kUSART_TxLevelInterruptEnable);
- /* Empty txFIFO */
- base->FIFOCFG |= USART_FIFOCFG_EMPTYTX_MASK;
-
- handle->txDataSize = 0;
- handle->txState = kUSART_TxIdle;
-}
-
-/*!
- * brief Get the number of bytes that have been written to USART TX register.
- *
- * This function gets the number of bytes that have been written to USART TX
- * register by interrupt method.
- *
- * param base USART peripheral base address.
- * param handle USART handle pointer.
- * param count Send bytes count.
- * retval kStatus_NoTransferInProgress No send in progress.
- * retval kStatus_InvalidArgument Parameter is invalid.
- * retval kStatus_Success Get successfully through the parameter \p count;
- */
-status_t USART_TransferGetSendCount(USART_Type *base, usart_handle_t *handle, uint32_t *count)
-{
- assert(NULL != handle);
- assert(NULL != count);
-
- if (kUSART_TxIdle == handle->txState)
- {
- return kStatus_NoTransferInProgress;
- }
-
- *count = handle->txDataSizeAll - handle->txDataSize;
-
- return kStatus_Success;
-}
-
-/*!
- * brief Receives a buffer of data using an interrupt method.
- *
- * This function receives data using an interrupt method. This is a non-blocking function, which
- * returns without waiting for all data to be received.
- * If the RX ring buffer is used and not empty, the data in the ring buffer is copied and
- * the parameter p receivedBytes shows how many bytes are copied from the ring buffer.
- * After copying, if the data in the ring buffer is not enough to read, the receive
- * request is saved by the USART driver. When the new data arrives, the receive request
- * is serviced first. When all data is received, the USART driver notifies the upper layer
- * through a callback function and passes the status parameter ref kStatus_USART_RxIdle.
- * For example, the upper layer needs 10 bytes but there are only 5 bytes in the ring buffer.
- * The 5 bytes are copied to the xfer->data and this function returns with the
- * parameter p receivedBytes set to 5. For the left 5 bytes, newly arrived data is
- * saved from the xfer->data[5]. When 5 bytes are received, the USART driver notifies the upper layer.
- * If the RX ring buffer is not enabled, this function enables the RX and RX interrupt
- * to receive data to the xfer->data. When all data is received, the upper layer is notified.
- *
- * param base USART peripheral base address.
- * param handle USART handle pointer.
- * param xfer USART transfer structure, see #usart_transfer_t.
- * param receivedBytes Bytes received from the ring buffer directly.
- * retval kStatus_Success Successfully queue the transfer into transmit queue.
- * retval kStatus_USART_RxBusy Previous receive request is not finished.
- * retval kStatus_InvalidArgument Invalid argument.
- */
-status_t USART_TransferReceiveNonBlocking(USART_Type *base,
- usart_handle_t *handle,
- usart_transfer_t *xfer,
- size_t *receivedBytes)
-{
- uint32_t i;
- /* How many bytes to copy from ring buffer to user memory. */
- size_t bytesToCopy = 0U;
- /* How many bytes to receive. */
- size_t bytesToReceive;
- /* How many bytes currently have received. */
- size_t bytesCurrentReceived;
- uint32_t regPrimask = 0U;
-
- /* Check arguments */
- assert(!((NULL == base) || (NULL == handle) || (NULL == xfer)));
- if ((NULL == base) || (NULL == handle) || (NULL == xfer))
- {
- return kStatus_InvalidArgument;
- }
- /* Check xfer members */
- assert(!((0 == xfer->dataSize) || (NULL == xfer->data)));
- if ((0 == xfer->dataSize) || (NULL == xfer->data))
- {
- return kStatus_InvalidArgument;
- }
-
- /* How to get data:
- 1. If RX ring buffer is not enabled, then save xfer->data and xfer->dataSize
- to uart handle, enable interrupt to store received data to xfer->data. When
- all data received, trigger callback.
- 2. If RX ring buffer is enabled and not empty, get data from ring buffer first.
- If there are enough data in ring buffer, copy them to xfer->data and return.
- If there are not enough data in ring buffer, copy all of them to xfer->data,
- save the xfer->data remained empty space to uart handle, receive data
- to this empty space and trigger callback when finished. */
- if (kUSART_RxBusy == handle->rxState)
- {
- return kStatus_USART_RxBusy;
- }
- else
- {
- bytesToReceive = xfer->dataSize;
- bytesCurrentReceived = 0U;
- /* If RX ring buffer is used. */
- if (handle->rxRingBuffer)
- {
- /* Disable IRQ, protect ring buffer. */
- regPrimask = DisableGlobalIRQ();
- /* How many bytes in RX ring buffer currently. */
- bytesToCopy = USART_TransferGetRxRingBufferLength(handle);
- if (bytesToCopy)
- {
- bytesToCopy = MIN(bytesToReceive, bytesToCopy);
- bytesToReceive -= bytesToCopy;
- /* Copy data from ring buffer to user memory. */
- for (i = 0U; i < bytesToCopy; i++)
- {
- xfer->data[bytesCurrentReceived++] = handle->rxRingBuffer[handle->rxRingBufferTail];
- /* Wrap to 0. Not use modulo (%) because it might be large and slow. */
- if (handle->rxRingBufferTail + 1U == handle->rxRingBufferSize)
- {
- handle->rxRingBufferTail = 0U;
- }
- else
- {
- handle->rxRingBufferTail++;
- }
- }
- }
- /* If ring buffer does not have enough data, still need to read more data. */
- if (bytesToReceive)
- {
- /* No data in ring buffer, save the request to UART handle. */
- handle->rxData = xfer->data + bytesCurrentReceived;
- handle->rxDataSize = bytesToReceive;
- handle->rxDataSizeAll = bytesToReceive;
- handle->rxState = kUSART_RxBusy;
- }
- /* Enable IRQ if previously enabled. */
- EnableGlobalIRQ(regPrimask);
- /* Call user callback since all data are received. */
- if (0 == bytesToReceive)
- {
- if (handle->callback)
- {
- handle->callback(base, handle, kStatus_USART_RxIdle, handle->userData);
- }
- }
- }
- /* Ring buffer not used. */
- else
- {
- handle->rxData = xfer->data + bytesCurrentReceived;
- handle->rxDataSize = bytesToReceive;
- handle->rxDataSizeAll = bytesToReceive;
- handle->rxState = kUSART_RxBusy;
-
- /* Enable RX interrupt. */
- base->FIFOINTENSET |= USART_FIFOINTENSET_RXLVL_MASK;
- }
- /* Return the how many bytes have read. */
- if (receivedBytes)
- {
- *receivedBytes = bytesCurrentReceived;
- }
- }
- return kStatus_Success;
-}
-
-/*!
- * brief Aborts the interrupt-driven data receiving.
- *
- * This function aborts the interrupt-driven data receiving. The user can get the remainBytes to find out
- * how many bytes not received yet.
- *
- * param base USART peripheral base address.
- * param handle USART handle pointer.
- */
-void USART_TransferAbortReceive(USART_Type *base, usart_handle_t *handle)
-{
- assert(NULL != handle);
-
- /* Only abort the receive to handle->rxData, the RX ring buffer is still working. */
- if (!handle->rxRingBuffer)
- {
- /* Disable interrupts */
- USART_DisableInterrupts(base, kUSART_RxLevelInterruptEnable);
- /* Empty rxFIFO */
- base->FIFOCFG |= USART_FIFOCFG_EMPTYRX_MASK;
- }
-
- handle->rxDataSize = 0U;
- handle->rxState = kUSART_RxIdle;
-}
-
-/*!
- * brief Get the number of bytes that have been received.
- *
- * This function gets the number of bytes that have been received.
- *
- * param base USART peripheral base address.
- * param handle USART handle pointer.
- * param count Receive bytes count.
- * retval kStatus_NoTransferInProgress No receive in progress.
- * retval kStatus_InvalidArgument Parameter is invalid.
- * retval kStatus_Success Get successfully through the parameter \p count;
- */
-status_t USART_TransferGetReceiveCount(USART_Type *base, usart_handle_t *handle, uint32_t *count)
-{
- assert(NULL != handle);
- assert(NULL != count);
-
- if (kUSART_RxIdle == handle->rxState)
- {
- return kStatus_NoTransferInProgress;
- }
-
- *count = handle->rxDataSizeAll - handle->rxDataSize;
-
- return kStatus_Success;
-}
-
-/*!
- * brief USART IRQ handle function.
- *
- * This function handles the USART transmit and receive IRQ request.
- *
- * param base USART peripheral base address.
- * param handle USART handle pointer.
- */
-void USART_TransferHandleIRQ(USART_Type *base, usart_handle_t *handle)
-{
- /* Check arguments */
- assert((NULL != base) && (NULL != handle));
-
- bool receiveEnabled = (handle->rxDataSize) || (handle->rxRingBuffer);
- bool sendEnabled = handle->txDataSize;
- uint8_t rxdata;
- size_t tmpsize;
-
- /* If RX overrun. */
- if (base->FIFOSTAT & USART_FIFOSTAT_RXERR_MASK)
- {
- /* Clear rx error state. */
- base->FIFOSTAT |= USART_FIFOSTAT_RXERR_MASK;
- /* clear rxFIFO */
- base->FIFOCFG |= USART_FIFOCFG_EMPTYRX_MASK;
- /* Trigger callback. */
- if (handle->callback)
- {
- handle->callback(base, handle, kStatus_USART_RxError, handle->userData);
- }
- }
- while ((receiveEnabled && (base->FIFOSTAT & USART_FIFOSTAT_RXNOTEMPTY_MASK)) ||
- (sendEnabled && (base->FIFOSTAT & USART_FIFOSTAT_TXNOTFULL_MASK)))
- {
- /* Receive data */
- if (receiveEnabled && (base->FIFOSTAT & USART_FIFOSTAT_RXNOTEMPTY_MASK))
- {
- /* Receive to app bufffer if app buffer is present */
- if (handle->rxDataSize)
- {
- rxdata = (uint8_t)base->FIFORD;
- *handle->rxData = rxdata;
- handle->rxDataSize--;
- handle->rxData++;
- receiveEnabled = ((handle->rxDataSize != 0) || (handle->rxRingBuffer));
- if (!handle->rxDataSize)
- {
- if (!handle->rxRingBuffer)
- {
- base->FIFOINTENCLR = USART_FIFOINTENCLR_RXLVL_MASK | USART_FIFOINTENSET_RXERR_MASK;
- }
- handle->rxState = kUSART_RxIdle;
- if (handle->callback)
- {
- handle->callback(base, handle, kStatus_USART_RxIdle, handle->userData);
- }
- }
- }
- /* Otherwise receive to ring buffer if ring buffer is present */
- else
- {
- if (handle->rxRingBuffer)
- {
- /* If RX ring buffer is full, trigger callback to notify over run. */
- if (USART_TransferIsRxRingBufferFull(handle))
- {
- if (handle->callback)
- {
- handle->callback(base, handle, kStatus_USART_RxRingBufferOverrun, handle->userData);
- }
- }
- /* If ring buffer is still full after callback function, the oldest data is overridden. */
- if (USART_TransferIsRxRingBufferFull(handle))
- {
- /* Increase handle->rxRingBufferTail to make room for new data. */
- if (handle->rxRingBufferTail + 1U == handle->rxRingBufferSize)
- {
- handle->rxRingBufferTail = 0U;
- }
- else
- {
- handle->rxRingBufferTail++;
- }
- }
- /* Read data. */
- rxdata = (uint8_t)base->FIFORD;
- handle->rxRingBuffer[handle->rxRingBufferHead] = rxdata;
- /* Increase handle->rxRingBufferHead. */
- if (handle->rxRingBufferHead + 1U == handle->rxRingBufferSize)
- {
- handle->rxRingBufferHead = 0U;
- }
- else
- {
- handle->rxRingBufferHead++;
- }
- }
- }
- }
- /* Send data */
- if (sendEnabled && (base->FIFOSTAT & USART_FIFOSTAT_TXNOTFULL_MASK))
- {
- base->FIFOWR = *handle->txData;
- handle->txDataSize--;
- handle->txData++;
- sendEnabled = handle->txDataSize != 0;
- if (!sendEnabled)
- {
- base->FIFOINTENCLR = USART_FIFOINTENCLR_TXLVL_MASK;
- handle->txState = kUSART_TxIdle;
-
- base->INTENSET |= USART_INTENSET_TXIDLEEN_MASK;
- }
- }
- }
-
- /* Tx idle and the interrupt is enabled. */
- if ((0U != (base->INTENSET & USART_INTENSET_TXIDLEEN_MASK)) &&
- (0U != (base->INTSTAT & USART_INTSTAT_TXIDLE_MASK)) && (handle->txState == (uint8_t)kUSART_TxIdle))
- {
- /* Disable tx idle interrupt */
- base->INTENCLR |= USART_INTENCLR_TXIDLECLR_MASK;
- /* Trigger callback. */
- if (handle->callback)
- {
- handle->callback(base, handle, kStatus_USART_TxIdle, handle->userData);
- }
- }
-
- /* ring buffer is not used */
- if (NULL == handle->rxRingBuffer)
- {
- tmpsize = handle->rxDataSize;
-
- /* restore if rx transfer ends and rxLevel is different from default value */
- if ((tmpsize == 0U) && (USART_FIFOTRIG_RXLVL_GET(base) != handle->rxWatermark))
- {
- base->FIFOTRIG =
- (base->FIFOTRIG & (~USART_FIFOTRIG_RXLVL_MASK)) | USART_FIFOTRIG_RXLVL(handle->rxWatermark);
- }
- /* decrease level if rx transfer is bellow */
- if ((tmpsize != 0U) && (tmpsize < (USART_FIFOTRIG_RXLVL_GET(base) + 1U)))
- {
- base->FIFOTRIG = (base->FIFOTRIG & (~USART_FIFOTRIG_RXLVL_MASK)) | (USART_FIFOTRIG_RXLVL(tmpsize - 1U));
- }
- }
-}
diff --git a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_usart.h b/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_usart.h
deleted file mode 100755
index d30d7e3daf..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/drivers/fsl_usart.h
+++ /dev/null
@@ -1,718 +0,0 @@
-/*
- * Copyright (c) 2016, Freescale Semiconductor, Inc.
- * Copyright 2016-2019 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-#ifndef _FSL_USART_H_
-#define _FSL_USART_H_
-
-#include "fsl_common.h"
-
-/*!
- * @addtogroup usart_driver
- * @{
- */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*! @name Driver version */
-/*@{*/
-/*! @brief USART driver version 2.1.1. */
-#define FSL_USART_DRIVER_VERSION (MAKE_VERSION(2, 1, 1))
-/*@}*/
-
-#define USART_FIFOTRIG_TXLVL_GET(base) (((base)->FIFOTRIG & USART_FIFOTRIG_TXLVL_MASK) >> USART_FIFOTRIG_TXLVL_SHIFT)
-#define USART_FIFOTRIG_RXLVL_GET(base) (((base)->FIFOTRIG & USART_FIFOTRIG_RXLVL_MASK) >> USART_FIFOTRIG_RXLVL_SHIFT)
-
-/*! @brief Error codes for the USART driver. */
-enum _usart_status
-{
- kStatus_USART_TxBusy = MAKE_STATUS(kStatusGroup_LPC_USART, 0), /*!< Transmitter is busy. */
- kStatus_USART_RxBusy = MAKE_STATUS(kStatusGroup_LPC_USART, 1), /*!< Receiver is busy. */
- kStatus_USART_TxIdle = MAKE_STATUS(kStatusGroup_LPC_USART, 2), /*!< USART transmitter is idle. */
- kStatus_USART_RxIdle = MAKE_STATUS(kStatusGroup_LPC_USART, 3), /*!< USART receiver is idle. */
- kStatus_USART_TxError = MAKE_STATUS(kStatusGroup_LPC_USART, 7), /*!< Error happens on txFIFO. */
- kStatus_USART_RxError = MAKE_STATUS(kStatusGroup_LPC_USART, 9), /*!< Error happens on rxFIFO. */
- kStatus_USART_RxRingBufferOverrun = MAKE_STATUS(kStatusGroup_LPC_USART, 8), /*!< Error happens on rx ring buffer */
- kStatus_USART_NoiseError = MAKE_STATUS(kStatusGroup_LPC_USART, 10), /*!< USART noise error. */
- kStatus_USART_FramingError = MAKE_STATUS(kStatusGroup_LPC_USART, 11), /*!< USART framing error. */
- kStatus_USART_ParityError = MAKE_STATUS(kStatusGroup_LPC_USART, 12), /*!< USART parity error. */
- kStatus_USART_BaudrateNotSupport =
- MAKE_STATUS(kStatusGroup_LPC_USART, 13), /*!< Baudrate is not support in current clock source */
-};
-
-/*! @brief USART synchronous mode. */
-typedef enum _usart_sync_mode
-{
- kUSART_SyncModeDisabled = 0x0U, /*!< Asynchronous mode. */
- kUSART_SyncModeSlave = 0x2U, /*!< Synchronous slave mode. */
- kUSART_SyncModeMaster = 0x3U, /*!< Synchronous master mode. */
-} usart_sync_mode_t;
-
-/*! @brief USART parity mode. */
-typedef enum _usart_parity_mode
-{
- kUSART_ParityDisabled = 0x0U, /*!< Parity disabled */
- kUSART_ParityEven = 0x2U, /*!< Parity enabled, type even, bit setting: PE|PT = 10 */
- kUSART_ParityOdd = 0x3U, /*!< Parity enabled, type odd, bit setting: PE|PT = 11 */
-} usart_parity_mode_t;
-
-/*! @brief USART stop bit count. */
-typedef enum _usart_stop_bit_count
-{
- kUSART_OneStopBit = 0U, /*!< One stop bit */
- kUSART_TwoStopBit = 1U, /*!< Two stop bits */
-} usart_stop_bit_count_t;
-
-/*! @brief USART data size. */
-typedef enum _usart_data_len
-{
- kUSART_7BitsPerChar = 0U, /*!< Seven bit mode */
- kUSART_8BitsPerChar = 1U, /*!< Eight bit mode */
-} usart_data_len_t;
-
-/*! @brief USART clock polarity configuration, used in sync mode.*/
-typedef enum _usart_clock_polarity
-{
- kUSART_RxSampleOnFallingEdge = 0x0U, /*!< Un_RXD is sampled on the falling edge of SCLK. */
- kUSART_RxSampleOnRisingEdge = 0x1U, /*!< Un_RXD is sampled on the rising edge of SCLK. */
-} usart_clock_polarity_t;
-
-/*! @brief txFIFO watermark values */
-typedef enum _usart_txfifo_watermark
-{
- kUSART_TxFifo0 = 0, /*!< USART tx watermark is empty */
- kUSART_TxFifo1 = 1, /*!< USART tx watermark at 1 item */
- kUSART_TxFifo2 = 2, /*!< USART tx watermark at 2 items */
- kUSART_TxFifo3 = 3, /*!< USART tx watermark at 3 items */
- kUSART_TxFifo4 = 4, /*!< USART tx watermark at 4 items */
- kUSART_TxFifo5 = 5, /*!< USART tx watermark at 5 items */
- kUSART_TxFifo6 = 6, /*!< USART tx watermark at 6 items */
- kUSART_TxFifo7 = 7, /*!< USART tx watermark at 7 items */
-} usart_txfifo_watermark_t;
-
-/*! @brief rxFIFO watermark values */
-typedef enum _usart_rxfifo_watermark
-{
- kUSART_RxFifo1 = 0, /*!< USART rx watermark at 1 item */
- kUSART_RxFifo2 = 1, /*!< USART rx watermark at 2 items */
- kUSART_RxFifo3 = 2, /*!< USART rx watermark at 3 items */
- kUSART_RxFifo4 = 3, /*!< USART rx watermark at 4 items */
- kUSART_RxFifo5 = 4, /*!< USART rx watermark at 5 items */
- kUSART_RxFifo6 = 5, /*!< USART rx watermark at 6 items */
- kUSART_RxFifo7 = 6, /*!< USART rx watermark at 7 items */
- kUSART_RxFifo8 = 7, /*!< USART rx watermark at 8 items */
-} usart_rxfifo_watermark_t;
-
-/*!
- * @brief USART interrupt configuration structure, default settings all disabled.
- */
-enum _usart_interrupt_enable
-{
- kUSART_TxErrorInterruptEnable = (USART_FIFOINTENSET_TXERR_MASK),
- kUSART_RxErrorInterruptEnable = (USART_FIFOINTENSET_RXERR_MASK),
- kUSART_TxLevelInterruptEnable = (USART_FIFOINTENSET_TXLVL_MASK),
- kUSART_RxLevelInterruptEnable = (USART_FIFOINTENSET_RXLVL_MASK),
-};
-
-/*!
- * @brief USART status flags.
- *
- * This provides constants for the USART status flags for use in the USART functions.
- */
-enum _usart_flags
-{
- kUSART_TxError = (USART_FIFOSTAT_TXERR_MASK), /*!< TEERR bit, sets if TX buffer is error */
- kUSART_RxError = (USART_FIFOSTAT_RXERR_MASK), /*!< RXERR bit, sets if RX buffer is error */
- kUSART_TxFifoEmptyFlag = (USART_FIFOSTAT_TXEMPTY_MASK), /*!< TXEMPTY bit, sets if TX buffer is empty */
- kUSART_TxFifoNotFullFlag = (USART_FIFOSTAT_TXNOTFULL_MASK), /*!< TXNOTFULL bit, sets if TX buffer is not full */
- kUSART_RxFifoNotEmptyFlag = (USART_FIFOSTAT_RXNOTEMPTY_MASK), /*!< RXNOEMPTY bit, sets if RX buffer is not empty */
- kUSART_RxFifoFullFlag = (USART_FIFOSTAT_RXFULL_MASK), /*!< RXFULL bit, sets if RX buffer is full */
-};
-
-/*! @brief USART configuration structure. */
-typedef struct _usart_config
-{
- uint32_t baudRate_Bps; /*!< USART baud rate */
- usart_parity_mode_t parityMode; /*!< Parity mode, disabled (default), even, odd */
- usart_stop_bit_count_t stopBitCount; /*!< Number of stop bits, 1 stop bit (default) or 2 stop bits */
- usart_data_len_t bitCountPerChar; /*!< Data length - 7 bit, 8 bit */
- bool loopback; /*!< Enable peripheral loopback */
- bool enableRx; /*!< Enable RX */
- bool enableTx; /*!< Enable TX */
- bool enableContinuousSCLK; /*!< USART continuous Clock generation enable in synchronous master mode. */
- usart_txfifo_watermark_t txWatermark; /*!< txFIFO watermark */
- usart_rxfifo_watermark_t rxWatermark; /*!< rxFIFO watermark */
- usart_sync_mode_t syncMode; /*!< Transfer mode select - asynchronous, synchronous master, synchronous slave. */
- usart_clock_polarity_t clockPolarity; /*!< Selects the clock polarity and sampling edge in synchronous mode. */
-} usart_config_t;
-
-/*! @brief USART transfer structure. */
-typedef struct _usart_transfer
-{
- uint8_t *data; /*!< The buffer of data to be transfer.*/
- size_t dataSize; /*!< The byte count to be transfer. */
-} usart_transfer_t;
-
-/* Forward declaration of the handle typedef. */
-typedef struct _usart_handle usart_handle_t;
-
-/*! @brief USART transfer callback function. */
-typedef void (*usart_transfer_callback_t)(USART_Type *base, usart_handle_t *handle, status_t status, void *userData);
-
-/*! @brief USART handle structure. */
-struct _usart_handle
-{
- uint8_t *volatile txData; /*!< Address of remaining data to send. */
- volatile size_t txDataSize; /*!< Size of the remaining data to send. */
- size_t txDataSizeAll; /*!< Size of the data to send out. */
- uint8_t *volatile rxData; /*!< Address of remaining data to receive. */
- volatile size_t rxDataSize; /*!< Size of the remaining data to receive. */
- size_t rxDataSizeAll; /*!< Size of the data to receive. */
-
- uint8_t *rxRingBuffer; /*!< Start address of the receiver ring buffer. */
- size_t rxRingBufferSize; /*!< Size of the ring buffer. */
- volatile uint16_t rxRingBufferHead; /*!< Index for the driver to store received data into ring buffer. */
- volatile uint16_t rxRingBufferTail; /*!< Index for the user to get data from the ring buffer. */
-
- usart_transfer_callback_t callback; /*!< Callback function. */
- void *userData; /*!< USART callback function parameter.*/
-
- volatile uint8_t txState; /*!< TX transfer state. */
- volatile uint8_t rxState; /*!< RX transfer state */
-
- usart_txfifo_watermark_t txWatermark; /*!< txFIFO watermark */
- usart_rxfifo_watermark_t rxWatermark; /*!< rxFIFO watermark */
-};
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif /* _cplusplus */
-
-/*! @brief Returns instance number for USART peripheral base address. */
-uint32_t USART_GetInstance(USART_Type *base);
-
-/*!
- * @name Initialization and deinitialization
- * @{
- */
-
-/*!
- * @brief Initializes a USART instance with user configuration structure and peripheral clock.
- *
- * This function configures the USART module with the user-defined settings. The user can configure the configuration
- * structure and also get the default configuration by using the USART_GetDefaultConfig() function.
- * Example below shows how to use this API to configure USART.
- * @code
- * usart_config_t usartConfig;
- * usartConfig.baudRate_Bps = 115200U;
- * usartConfig.parityMode = kUSART_ParityDisabled;
- * usartConfig.stopBitCount = kUSART_OneStopBit;
- * USART_Init(USART1, &usartConfig, 20000000U);
- * @endcode
- *
- * @param base USART peripheral base address.
- * @param config Pointer to user-defined configuration structure.
- * @param srcClock_Hz USART clock source frequency in HZ.
- * @retval kStatus_USART_BaudrateNotSupport Baudrate is not support in current clock source.
- * @retval kStatus_InvalidArgument USART base address is not valid
- * @retval kStatus_Success Status USART initialize succeed
- */
-status_t USART_Init(USART_Type *base, const usart_config_t *config, uint32_t srcClock_Hz);
-
-/*!
- * @brief Deinitializes a USART instance.
- *
- * This function waits for TX complete, disables TX and RX, and disables the USART clock.
- *
- * @param base USART peripheral base address.
- */
-void USART_Deinit(USART_Type *base);
-
-/*!
- * @brief Gets the default configuration structure.
- *
- * This function initializes the USART configuration structure to a default value. The default
- * values are:
- * usartConfig->baudRate_Bps = 115200U;
- * usartConfig->parityMode = kUSART_ParityDisabled;
- * usartConfig->stopBitCount = kUSART_OneStopBit;
- * usartConfig->bitCountPerChar = kUSART_8BitsPerChar;
- * usartConfig->loopback = false;
- * usartConfig->enableTx = false;
- * usartConfig->enableRx = false;
- *
- * @param config Pointer to configuration structure.
- */
-void USART_GetDefaultConfig(usart_config_t *config);
-
-/*!
- * @brief Sets the USART instance baud rate.
- *
- * This function configures the USART module baud rate. This function is used to update
- * the USART module baud rate after the USART module is initialized by the USART_Init.
- * @code
- * USART_SetBaudRate(USART1, 115200U, 20000000U);
- * @endcode
- *
- * @param base USART peripheral base address.
- * @param baudrate_Bps USART baudrate to be set.
- * @param srcClock_Hz USART clock source frequency in HZ.
- * @retval kStatus_USART_BaudrateNotSupport Baudrate is not support in current clock source.
- * @retval kStatus_Success Set baudrate succeed.
- * @retval kStatus_InvalidArgument One or more arguments are invalid.
- */
-status_t USART_SetBaudRate(USART_Type *base, uint32_t baudrate_Bps, uint32_t srcClock_Hz);
-
-/* @} */
-
-/*!
- * @name Status
- * @{
- */
-
-/*!
- * @brief Get USART status flags.
- *
- * This function get all USART status flags, the flags are returned as the logical
- * OR value of the enumerators @ref _usart_flags. To check a specific status,
- * compare the return value with enumerators in @ref _usart_flags.
- * For example, to check whether the TX is empty:
- * @code
- * if (kUSART_TxFifoNotFullFlag & USART_GetStatusFlags(USART1))
- * {
- * ...
- * }
- * @endcode
- *
- * @param base USART peripheral base address.
- * @return USART status flags which are ORed by the enumerators in the _usart_flags.
- */
-static inline uint32_t USART_GetStatusFlags(USART_Type *base)
-{
- return base->FIFOSTAT;
-}
-
-/*!
- * @brief Clear USART status flags.
- *
- * This function clear supported USART status flags
- * Flags that can be cleared or set are:
- * kUSART_TxError
- * kUSART_RxError
- * For example:
- * @code
- * USART_ClearStatusFlags(USART1, kUSART_TxError | kUSART_RxError)
- * @endcode
- *
- * @param base USART peripheral base address.
- * @param mask status flags to be cleared.
- */
-static inline void USART_ClearStatusFlags(USART_Type *base, uint32_t mask)
-{
- /* Only TXERR, RXERR fields support write. Remaining fields should be set to zero */
- base->FIFOSTAT = mask & (USART_FIFOSTAT_TXERR_MASK | USART_FIFOSTAT_RXERR_MASK);
-}
-
-/* @} */
-
-/*!
- * @name Interrupts
- * @{
- */
-
-/*!
- * @brief Enables USART interrupts according to the provided mask.
- *
- * This function enables the USART interrupts according to the provided mask. The mask
- * is a logical OR of enumeration members. See @ref _usart_interrupt_enable.
- * For example, to enable TX empty interrupt and RX full interrupt:
- * @code
- * USART_EnableInterrupts(USART1, kUSART_TxLevelInterruptEnable | kUSART_RxLevelInterruptEnable);
- * @endcode
- *
- * @param base USART peripheral base address.
- * @param mask The interrupts to enable. Logical OR of @ref _usart_interrupt_enable.
- */
-static inline void USART_EnableInterrupts(USART_Type *base, uint32_t mask)
-{
- base->FIFOINTENSET = mask & 0xF;
-}
-
-/*!
- * @brief Disables USART interrupts according to a provided mask.
- *
- * This function disables the USART interrupts according to a provided mask. The mask
- * is a logical OR of enumeration members. See @ref _usart_interrupt_enable.
- * This example shows how to disable the TX empty interrupt and RX full interrupt:
- * @code
- * USART_DisableInterrupts(USART1, kUSART_TxLevelInterruptEnable | kUSART_RxLevelInterruptEnable);
- * @endcode
- *
- * @param base USART peripheral base address.
- * @param mask The interrupts to disable. Logical OR of @ref _usart_interrupt_enable.
- */
-static inline void USART_DisableInterrupts(USART_Type *base, uint32_t mask)
-{
- base->FIFOINTENCLR = mask & 0xF;
-}
-
-/*!
- * @brief Returns enabled USART interrupts.
- *
- * This function returns the enabled USART interrupts.
- *
- * @param base USART peripheral base address.
- */
-static inline uint32_t USART_GetEnabledInterrupts(USART_Type *base)
-{
- return base->FIFOINTENSET;
-}
-
-/*!
- * @brief Enable DMA for Tx
- */
-static inline void USART_EnableTxDMA(USART_Type *base, bool enable)
-{
- if (enable)
- {
- base->FIFOCFG |= USART_FIFOCFG_DMATX_MASK;
- }
- else
- {
- base->FIFOCFG &= ~(USART_FIFOCFG_DMATX_MASK);
- }
-}
-
-/*!
- * @brief Enable DMA for Rx
- */
-static inline void USART_EnableRxDMA(USART_Type *base, bool enable)
-{
- if (enable)
- {
- base->FIFOCFG |= USART_FIFOCFG_DMARX_MASK;
- }
- else
- {
- base->FIFOCFG &= ~(USART_FIFOCFG_DMARX_MASK);
- }
-}
-
-/*!
- * @brief Enable CTS.
- * This function will determine whether CTS is used for flow control.
- *
- * @param base USART peripheral base address.
- * @param enable Enable CTS or not, true for enable and false for disable.
- */
-static inline void USART_EnableCTS(USART_Type *base, bool enable)
-{
- if (enable)
- {
- base->CFG |= USART_CFG_CTSEN_MASK;
- }
- else
- {
- base->CFG &= ~USART_CFG_CTSEN_MASK;
- }
-}
-
-/*!
- * @brief Continuous Clock generation.
- * By default, SCLK is only output while data is being transmitted in synchronous mode.
- * Enable this funciton, SCLK will run continuously in synchronous mode, allowing
- * characters to be received on Un_RxD independently from transmission on Un_TXD).
- *
- * @param base USART peripheral base address.
- * @param enable Enable Continuous Clock generation mode or not, true for enable and false for disable.
- */
-static inline void USART_EnableContinuousSCLK(USART_Type *base, bool enable)
-{
- if (enable)
- {
- base->CTL |= USART_CTL_CC_MASK;
- }
- else
- {
- base->CTL &= ~USART_CTL_CC_MASK;
- }
-}
-
-/*!
- * @brief Enable Continuous Clock generation bit auto clear.
- * While enable this cuntion, the Continuous Clock bit is automatically cleared when a complete
- * character has been received. This bit is cleared at the same time.
- *
- * @param base USART peripheral base address.
- * @param enable Enable auto clear or not, true for enable and false for disable.
- */
-static inline void USART_EnableAutoClearSCLK(USART_Type *base, bool enable)
-{
- if (enable)
- {
- base->CTL |= USART_CTL_CLRCCONRX_MASK;
- }
- else
- {
- base->CTL &= ~USART_CTL_CLRCCONRX_MASK;
- }
-}
-/* @} */
-
-/*!
- * @name Bus Operations
- * @{
- */
-
-/*!
- * @brief Writes to the FIFOWR register.
- *
- * This function writes data to the txFIFO directly. The upper layer must ensure
- * that txFIFO has space for data to write before calling this function.
- *
- * @param base USART peripheral base address.
- * @param data The byte to write.
- */
-static inline void USART_WriteByte(USART_Type *base, uint8_t data)
-{
- base->FIFOWR = data;
-}
-
-/*!
- * @brief Reads the FIFORD register directly.
- *
- * This function reads data from the rxFIFO directly. The upper layer must
- * ensure that the rxFIFO is not empty before calling this function.
- *
- * @param base USART peripheral base address.
- * @return The byte read from USART data register.
- */
-static inline uint8_t USART_ReadByte(USART_Type *base)
-{
- return base->FIFORD;
-}
-
-/*!
- * @brief Writes to the TX register using a blocking method.
- *
- * This function polls the TX register, waits for the TX register to be empty or for the TX FIFO
- * to have room and writes data to the TX buffer.
- *
- * @param base USART peripheral base address.
- * @param data Start address of the data to write.
- * @param length Size of the data to write.
- */
-void USART_WriteBlocking(USART_Type *base, const uint8_t *data, size_t length);
-
-/*!
- * @brief Read RX data register using a blocking method.
- *
- * This function polls the RX register, waits for the RX register to be full or for RX FIFO to
- * have data and read data from the TX register.
- *
- * @param base USART peripheral base address.
- * @param data Start address of the buffer to store the received data.
- * @param length Size of the buffer.
- * @retval kStatus_USART_FramingError Receiver overrun happened while receiving data.
- * @retval kStatus_USART_ParityError Noise error happened while receiving data.
- * @retval kStatus_USART_NoiseError Framing error happened while receiving data.
- * @retval kStatus_USART_RxError Overflow or underflow rxFIFO happened.
- * @retval kStatus_Success Successfully received all data.
- */
-status_t USART_ReadBlocking(USART_Type *base, uint8_t *data, size_t length);
-
-/* @} */
-
-/*!
- * @name Transactional
- * @{
- */
-
-/*!
- * @brief Initializes the USART handle.
- *
- * This function initializes the USART handle which can be used for other USART
- * transactional APIs. Usually, for a specified USART instance,
- * call this API once to get the initialized handle.
- *
- * @param base USART peripheral base address.
- * @param handle USART handle pointer.
- * @param callback The callback function.
- * @param userData The parameter of the callback function.
- */
-status_t USART_TransferCreateHandle(USART_Type *base,
- usart_handle_t *handle,
- usart_transfer_callback_t callback,
- void *userData);
-
-/*!
- * @brief Transmits a buffer of data using the interrupt method.
- *
- * This function sends data using an interrupt method. This is a non-blocking function, which
- * returns directly without waiting for all data to be written to the TX register. When
- * all data is written to the TX register in the IRQ handler, the USART driver calls the callback
- * function and passes the @ref kStatus_USART_TxIdle as status parameter.
- *
- * @note The kStatus_USART_TxIdle is passed to the upper layer when all data is written
- * to the TX register. However it does not ensure that all data are sent out. Before disabling the TX,
- * check the kUSART_TransmissionCompleteFlag to ensure that the TX is finished.
- *
- * @param base USART peripheral base address.
- * @param handle USART handle pointer.
- * @param xfer USART transfer structure. See #usart_transfer_t.
- * @retval kStatus_Success Successfully start the data transmission.
- * @retval kStatus_USART_TxBusy Previous transmission still not finished, data not all written to TX register yet.
- * @retval kStatus_InvalidArgument Invalid argument.
- */
-status_t USART_TransferSendNonBlocking(USART_Type *base, usart_handle_t *handle, usart_transfer_t *xfer);
-
-/*!
- * @brief Sets up the RX ring buffer.
- *
- * This function sets up the RX ring buffer to a specific USART handle.
- *
- * When the RX ring buffer is used, data received are stored into the ring buffer even when the
- * user doesn't call the USART_TransferReceiveNonBlocking() API. If there is already data received
- * in the ring buffer, the user can get the received data from the ring buffer directly.
- *
- * @note When using the RX ring buffer, one byte is reserved for internal use. In other
- * words, if @p ringBufferSize is 32, then only 31 bytes are used for saving data.
- *
- * @param base USART peripheral base address.
- * @param handle USART handle pointer.
- * @param ringBuffer Start address of the ring buffer for background receiving. Pass NULL to disable the ring buffer.
- * @param ringBufferSize size of the ring buffer.
- */
-void USART_TransferStartRingBuffer(USART_Type *base,
- usart_handle_t *handle,
- uint8_t *ringBuffer,
- size_t ringBufferSize);
-
-/*!
- * @brief Aborts the background transfer and uninstalls the ring buffer.
- *
- * This function aborts the background transfer and uninstalls the ring buffer.
- *
- * @param base USART peripheral base address.
- * @param handle USART handle pointer.
- */
-void USART_TransferStopRingBuffer(USART_Type *base, usart_handle_t *handle);
-
-/*!
- * @brief Get the length of received data in RX ring buffer.
- *
- * @param handle USART handle pointer.
- * @return Length of received data in RX ring buffer.
- */
-size_t USART_TransferGetRxRingBufferLength(usart_handle_t *handle);
-
-/*!
- * @brief Aborts the interrupt-driven data transmit.
- *
- * This function aborts the interrupt driven data sending. The user can get the remainBtyes to find out
- * how many bytes are still not sent out.
- *
- * @param base USART peripheral base address.
- * @param handle USART handle pointer.
- */
-void USART_TransferAbortSend(USART_Type *base, usart_handle_t *handle);
-
-/*!
- * @brief Get the number of bytes that have been written to USART TX register.
- *
- * This function gets the number of bytes that have been written to USART TX
- * register by interrupt method.
- *
- * @param base USART peripheral base address.
- * @param handle USART handle pointer.
- * @param count Send bytes count.
- * @retval kStatus_NoTransferInProgress No send in progress.
- * @retval kStatus_InvalidArgument Parameter is invalid.
- * @retval kStatus_Success Get successfully through the parameter \p count;
- */
-status_t USART_TransferGetSendCount(USART_Type *base, usart_handle_t *handle, uint32_t *count);
-
-/*!
- * @brief Receives a buffer of data using an interrupt method.
- *
- * This function receives data using an interrupt method. This is a non-blocking function, which
- * returns without waiting for all data to be received.
- * If the RX ring buffer is used and not empty, the data in the ring buffer is copied and
- * the parameter @p receivedBytes shows how many bytes are copied from the ring buffer.
- * After copying, if the data in the ring buffer is not enough to read, the receive
- * request is saved by the USART driver. When the new data arrives, the receive request
- * is serviced first. When all data is received, the USART driver notifies the upper layer
- * through a callback function and passes the status parameter @ref kStatus_USART_RxIdle.
- * For example, the upper layer needs 10 bytes but there are only 5 bytes in the ring buffer.
- * The 5 bytes are copied to the xfer->data and this function returns with the
- * parameter @p receivedBytes set to 5. For the left 5 bytes, newly arrived data is
- * saved from the xfer->data[5]. When 5 bytes are received, the USART driver notifies the upper layer.
- * If the RX ring buffer is not enabled, this function enables the RX and RX interrupt
- * to receive data to the xfer->data. When all data is received, the upper layer is notified.
- *
- * @param base USART peripheral base address.
- * @param handle USART handle pointer.
- * @param xfer USART transfer structure, see #usart_transfer_t.
- * @param receivedBytes Bytes received from the ring buffer directly.
- * @retval kStatus_Success Successfully queue the transfer into transmit queue.
- * @retval kStatus_USART_RxBusy Previous receive request is not finished.
- * @retval kStatus_InvalidArgument Invalid argument.
- */
-status_t USART_TransferReceiveNonBlocking(USART_Type *base,
- usart_handle_t *handle,
- usart_transfer_t *xfer,
- size_t *receivedBytes);
-
-/*!
- * @brief Aborts the interrupt-driven data receiving.
- *
- * This function aborts the interrupt-driven data receiving. The user can get the remainBytes to find out
- * how many bytes not received yet.
- *
- * @param base USART peripheral base address.
- * @param handle USART handle pointer.
- */
-void USART_TransferAbortReceive(USART_Type *base, usart_handle_t *handle);
-
-/*!
- * @brief Get the number of bytes that have been received.
- *
- * This function gets the number of bytes that have been received.
- *
- * @param base USART peripheral base address.
- * @param handle USART handle pointer.
- * @param count Receive bytes count.
- * @retval kStatus_NoTransferInProgress No receive in progress.
- * @retval kStatus_InvalidArgument Parameter is invalid.
- * @retval kStatus_Success Get successfully through the parameter \p count;
- */
-status_t USART_TransferGetReceiveCount(USART_Type *base, usart_handle_t *handle, uint32_t *count);
-
-/*!
- * @brief USART IRQ handle function.
- *
- * This function handles the USART transmit and receive IRQ request.
- *
- * @param base USART peripheral base address.
- * @param handle USART handle pointer.
- */
-void USART_TransferHandleIRQ(USART_Type *base, usart_handle_t *handle);
-
-/* @} */
-
-#if defined(__cplusplus)
-}
-#endif
-
-/*! @}*/
-
-#endif /* _FSL_USART_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console.c b/platform/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console.c
deleted file mode 100755
index da4da95359..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console.c
+++ /dev/null
@@ -1,1178 +0,0 @@
-/*
- * This is a modified version of the file printf.c, which was distributed
- * by Motorola as part of the M5407C3BOOT.zip package used to initialize
- * the M5407C3 evaluation board.
- *
- * Copyright:
- * 1999-2000 MOTOROLA, INC. All Rights Reserved.
- * You are hereby granted a copyright license to use, modify, and
- * distribute the SOFTWARE so long as this entire notice is
- * retained without alteration in any modified and/or redistributed
- * versions, and that such modified versions are clearly identified
- * as such. No licenses are granted by implication, estoppel or
- * otherwise under any patents or trademarks of Motorola, Inc. This
- * software is provided on an "AS IS" basis and without warranty.
- *
- * To the maximum extent permitted by applicable law, MOTOROLA
- * DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING
- * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
- * PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH REGARD TO THE
- * SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) AND ANY
- * ACCOMPANYING WRITTEN MATERIALS.
- *
- * To the maximum extent permitted by applicable law, IN NO EVENT
- * SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING
- * WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS
- * INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY
- * LOSS) ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
- *
- * Motorola assumes no responsibility for the maintenance and support
- * of this software
-
- * Copyright (c) 2015, Freescale Semiconductor, Inc.
- * Copyright 2016-2019 NXP
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include <stdarg.h>
-#include <stdlib.h>
-#if defined(__CC_ARM) || defined(__ARMCC_VERSION)
-#include <stdio.h>
-#endif
-
-#ifdef FSL_RTOS_FREE_RTOS
-#include "FreeRTOS.h"
-#include "semphr.h"
-#include "task.h"
-#endif
-
-#include "fsl_debug_console_conf.h"
-#include "fsl_str.h"
-
-#include "fsl_common.h"
-#include "serial_manager.h"
-
-#include "fsl_debug_console.h"
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-#ifndef NDEBUG
-#if (defined(DEBUG_CONSOLE_ASSERT_DISABLE) && (DEBUG_CONSOLE_ASSERT_DISABLE > 0U))
-#undef assert
-#define assert(n)
-#endif
-#endif
-
-#if SDK_DEBUGCONSOLE
-#define DEBUG_CONSOLE_FUNCTION_PREFIX
-#else
-#define DEBUG_CONSOLE_FUNCTION_PREFIX static
-#endif
-
-/*! @brief character backspace ASCII value */
-#define DEBUG_CONSOLE_BACKSPACE 127U
-
-/* lock definition */
-#if (DEBUG_CONSOLE_SYNCHRONIZATION_MODE == DEBUG_CONSOLE_SYNCHRONIZATION_FREERTOS)
-
-static SemaphoreHandle_t s_debugConsoleReadSemaphore;
-#if (defined(DEBUG_CONSOLE_RX_ENABLE) && (DEBUG_CONSOLE_RX_ENABLE > 0U))
-static SemaphoreHandle_t s_debugConsoleReadWaitSemaphore;
-#endif
-
-#elif (DEBUG_CONSOLE_SYNCHRONIZATION_MODE == DEBUG_CONSOLE_SYNCHRONIZATION_BM)
-
-#if (defined(DEBUG_CONSOLE_RX_ENABLE) && (DEBUG_CONSOLE_RX_ENABLE > 0U))
-static volatile uint8_t s_debugConsoleReadWaitSemaphore;
-#endif
-
-#else
-
-#endif /* DEBUG_CONSOLE_SYNCHRONIZATION_MODE == DEBUG_CONSOLE_SYNCHRONIZATION_FREERTOS */
-
-/*! @brief get current runing environment is ISR or not */
-#ifdef __CA7_REV
-#define IS_RUNNING_IN_ISR() SystemGetIRQNestingLevel()
-#else
-#define IS_RUNNING_IN_ISR() __get_IPSR()
-#endif /* __CA7_REV */
-
-/* semaphore definition */
-#if (DEBUG_CONSOLE_SYNCHRONIZATION_MODE == DEBUG_CONSOLE_SYNCHRONIZATION_FREERTOS)
-
-/* mutex semaphore */
-/* clang-format off */
-#define DEBUG_CONSOLE_CREATE_MUTEX_SEMAPHORE(mutex) ((mutex) = xSemaphoreCreateMutex())
-#define DEBUG_CONSOLE_DESTROY_MUTEX_SEMAPHORE(mutex) \
- do \
- { \
- if(NULL != mutex) \
- { \
- vSemaphoreDelete(mutex); \
- mutex = NULL; \
- } \
- } while(0)
-
-#define DEBUG_CONSOLE_GIVE_MUTEX_SEMAPHORE(mutex) \
-{ \
- if (IS_RUNNING_IN_ISR() == 0U) \
- { \
- (void)xSemaphoreGive(mutex); \
- } \
-}
-
-#define DEBUG_CONSOLE_TAKE_MUTEX_SEMAPHORE_BLOCKING(mutex) \
-{ \
- if (IS_RUNNING_IN_ISR() == 0U) \
- { \
- (void)xSemaphoreTake(mutex, portMAX_DELAY); \
- } \
-}
-
-#define DEBUG_CONSOLE_TAKE_MUTEX_SEMAPHORE_NONBLOCKING(mutex, result) \
-{ \
- if (IS_RUNNING_IN_ISR() == 0U) \
- { \
- result = xSemaphoreTake(mutex, 0U); \
- } \
- else \
- { \
- result = 1U; \
- } \
-}
-
-/* Binary semaphore */
-#define DEBUG_CONSOLE_CREATE_BINARY_SEMAPHORE(binary) ((binary) = xSemaphoreCreateBinary())
-#define DEBUG_CONSOLE_DESTROY_BINARY_SEMAPHORE(binary) \
- do \
- { \
- if(NULL != binary) \
- { \
- vSemaphoreDelete(binary); \
- binary = NULL; \
- } \
- } while(0)
-#define DEBUG_CONSOLE_TAKE_BINARY_SEMAPHORE_BLOCKING(binary) ((void)xSemaphoreTake(binary, portMAX_DELAY))
-#define DEBUG_CONSOLE_GIVE_BINARY_SEMAPHORE_FROM_ISR(binary) ((void)xSemaphoreGiveFromISR(binary, NULL))
-
-#elif (DEBUG_CONSOLE_SYNCHRONIZATION_BM == DEBUG_CONSOLE_SYNCHRONIZATION_MODE)
-
-#define DEBUG_CONSOLE_CREATE_MUTEX_SEMAPHORE(mutex)
-#define DEBUG_CONSOLE_DESTROY_MUTEX_SEMAPHORE(mutex)
-#define DEBUG_CONSOLE_TAKE_MUTEX_SEMAPHORE_BLOCKING(mutex)
-#define DEBUG_CONSOLE_GIVE_MUTEX_SEMAPHORE(mutex)
-#define DEBUG_CONSOLE_TAKE_MUTEX_SEMAPHORE_NONBLOCKING(mutex, result) (result = 1U)
-
-#define DEBUG_CONSOLE_CREATE_BINARY_SEMAPHORE(binary)
-#define DEBUG_CONSOLE_DESTROY_BINARY_SEMAPHORE(binary)
-#ifdef DEBUG_CONSOLE_TRANSFER_NON_BLOCKING
-#define DEBUG_CONSOLE_TAKE_BINARY_SEMAPHORE_BLOCKING(binary) \
- { \
- while (!binary) \
- { \
- } \
- binary = false; \
- }
-#define DEBUG_CONSOLE_GIVE_BINARY_SEMAPHORE_FROM_ISR(binary) (binary = true)
-#else
-#define DEBUG_CONSOLE_TAKE_BINARY_SEMAPHORE_BLOCKING(binary)
-#define DEBUG_CONSOLE_GIVE_BINARY_SEMAPHORE_FROM_ISR(binary)
-#endif /* DEBUG_CONSOLE_TRANSFER_NON_BLOCKING */
-/* clang-format on */
-
-/* add other implementation here
- *such as :
- * #elif(DEBUG_CONSOLE_SYNCHRONIZATION_MODE == DDEBUG_CONSOLE_SYNCHRONIZATION_xxx)
- */
-
-#else
-
-#error RTOS type is not defined by DEBUG_CONSOLE_SYNCHRONIZATION_MODE.
-
-#endif /* DEBUG_CONSOLE_SYNCHRONIZATION_MODE == DEBUG_CONSOLE_SYNCHRONIZATION_FREERTOS */
-
-#ifdef DEBUG_CONSOLE_TRANSFER_NON_BLOCKING
-/* receive state structure */
-typedef struct _debug_console_write_ring_buffer
-{
- uint32_t ringBufferSize;
- volatile uint32_t ringHead;
- volatile uint32_t ringTail;
- uint8_t ringBuffer[DEBUG_CONSOLE_TRANSMIT_BUFFER_LEN];
-} debug_console_write_ring_buffer_t;
-#endif
-
-typedef struct _debug_console_state_struct
-{
- uint8_t serialHandleBuffer[SERIAL_MANAGER_HANDLE_SIZE];
- serial_handle_t serialHandle; /*!< serial manager handle */
-#ifdef DEBUG_CONSOLE_TRANSFER_NON_BLOCKING
- debug_console_write_ring_buffer_t writeRingBuffer;
- uint8_t readRingBuffer[DEBUG_CONSOLE_RECEIVE_BUFFER_LEN];
-#endif
- uint8_t serialWriteHandleBuffer[SERIAL_MANAGER_WRITE_HANDLE_SIZE];
- uint8_t serialReadHandleBuffer[SERIAL_MANAGER_READ_HANDLE_SIZE];
-} debug_console_state_struct_t;
-
-/*******************************************************************************
- * Variables
- ******************************************************************************/
-
-/*! @brief Debug console state information. */
-static debug_console_state_struct_t s_debugConsoleState;
-serial_handle_t g_serialHandle; /*!< serial manager handle */
-
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-/*!
- * @brief This is a printf call back function which is used to relocate the log to buffer
- * or print the log immediately when the local buffer is full.
- *
- * @param[in] buf Buffer to store log.
- * @param[in] indicator Buffer index.
- * @param[in] val Target character to store.
- * @param[in] len length of the character
- *
- */
-#if SDK_DEBUGCONSOLE
-static void DbgConsole_PrintCallback(char *buf, int32_t *indicator, char dbgVal, int len);
-#endif
-
-status_t DbgConsole_ReadOneCharacter(uint8_t *ch);
-int DbgConsole_SendData(uint8_t *ch, size_t size);
-int DbgConsole_SendDataReliable(uint8_t *ch, size_t size);
-int DbgConsole_ReadLine(uint8_t *buf, size_t size);
-int DbgConsole_ReadCharacter(uint8_t *ch);
-
-#if ((SDK_DEBUGCONSOLE > 0U) || \
- ((SDK_DEBUGCONSOLE == 0U) && defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING) && \
- (defined(DEBUG_CONSOLE_TX_RELIABLE_ENABLE) && (DEBUG_CONSOLE_TX_RELIABLE_ENABLE > 0U))))
-DEBUG_CONSOLE_FUNCTION_PREFIX status_t DbgConsole_Flush(void);
-#endif
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-#if defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING)
-
-static void DbgConsole_SerialManagerTxCallback(void *callbackParam,
- serial_manager_callback_message_t *message,
- serial_manager_status_t status)
-{
- debug_console_state_struct_t *ioState;
- uint32_t sendDataLength;
-
- if ((NULL == callbackParam) || (NULL == message))
- {
- return;
- }
-
- ioState = (debug_console_state_struct_t *)callbackParam;
-
- ioState->writeRingBuffer.ringTail += message->length;
- if (ioState->writeRingBuffer.ringTail >= ioState->writeRingBuffer.ringBufferSize)
- {
- ioState->writeRingBuffer.ringTail = 0U;
- }
-
- if (kStatus_SerialManager_Success == status)
- {
- if (ioState->writeRingBuffer.ringTail != ioState->writeRingBuffer.ringHead)
- {
- if (ioState->writeRingBuffer.ringHead > ioState->writeRingBuffer.ringTail)
- {
- sendDataLength = ioState->writeRingBuffer.ringHead - ioState->writeRingBuffer.ringTail;
- }
- else
- {
- sendDataLength = ioState->writeRingBuffer.ringBufferSize - ioState->writeRingBuffer.ringTail;
- }
-
- (void)SerialManager_WriteNonBlocking(
- ((serial_write_handle_t)&ioState->serialWriteHandleBuffer[0]),
- &ioState->writeRingBuffer.ringBuffer[ioState->writeRingBuffer.ringTail], sendDataLength);
- }
- }
- else if (kStatus_SerialManager_Canceled == status)
- {
- ioState->writeRingBuffer.ringTail = 0U;
- ioState->writeRingBuffer.ringHead = 0U;
- }
- else
- {
- /*MISRA rule 16.4*/
- }
-}
-
-#if (defined(DEBUG_CONSOLE_RX_ENABLE) && (DEBUG_CONSOLE_RX_ENABLE > 0U))
-
-static void DbgConsole_SerialManagerRxCallback(void *callbackParam,
- serial_manager_callback_message_t *message,
- serial_manager_status_t status)
-{
- if ((NULL == callbackParam) || (NULL == message))
- {
- return;
- }
-
- if (kStatus_SerialManager_Notify == status)
- {
- }
- else if (kStatus_SerialManager_Success == status)
- {
- /* release s_debugConsoleReadWaitSemaphore from RX callback */
- DEBUG_CONSOLE_GIVE_BINARY_SEMAPHORE_FROM_ISR(s_debugConsoleReadWaitSemaphore);
- }
- else
- {
- /*MISRA rule 16.4*/
- }
-}
-#endif
-
-#endif
-
-status_t DbgConsole_ReadOneCharacter(uint8_t *ch)
-{
-#if (defined(DEBUG_CONSOLE_RX_ENABLE) && (DEBUG_CONSOLE_RX_ENABLE > 0U))
-
-#if defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING) && \
- (DEBUG_CONSOLE_SYNCHRONIZATION_MODE == DEBUG_CONSOLE_SYNCHRONIZATION_BM) && defined(OSA_USED)
- return kStatus_Fail;
-#else
- status_t status = (status_t)kStatus_SerialManager_Error;
-
-/* recieve one char every time */
-#if defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING)
- status = (status_t)SerialManager_ReadNonBlocking(
- ((serial_read_handle_t)&s_debugConsoleState.serialReadHandleBuffer[0]), ch, 1);
-#else
- status = (status_t)SerialManager_ReadBlocking(
- ((serial_read_handle_t)&s_debugConsoleState.serialReadHandleBuffer[0]), ch, 1);
-#endif
- if ((status_t)kStatus_SerialManager_Success != status)
- {
- return (status_t)kStatus_Fail;
- }
- /* wait s_debugConsoleReadWaitSemaphore from RX callback */
- DEBUG_CONSOLE_TAKE_BINARY_SEMAPHORE_BLOCKING(s_debugConsoleReadWaitSemaphore);
-
- return (status_t)kStatus_Success;
-#endif
-
-#else
-
- return (status_t)kStatus_Fail;
-
-#endif
-}
-
-#if DEBUG_CONSOLE_ENABLE_ECHO_FUNCTION
-static status_t DbgConsole_EchoCharacter(uint8_t *ch, bool isGetChar, int *index)
-{
- /* Due to scanf take \n and \r as end of string,should not echo */
- if (((*ch != (uint8_t)'\r') && (*ch != (uint8_t)'\n')) || (isGetChar))
- {
- /* recieve one char every time */
- if (1 != DbgConsole_SendDataReliable(ch, 1U))
- {
- return (status_t)kStatus_Fail;
- }
- }
-
- if ((!isGetChar) && (index != NULL))
- {
- if (DEBUG_CONSOLE_BACKSPACE == *ch)
- {
- if ((*index >= 2))
- {
- *index -= 2;
- }
- else
- {
- *index = 0;
- }
- }
- }
-
- return (status_t)kStatus_Success;
-}
-#endif
-
-int DbgConsole_SendData(uint8_t *ch, size_t size)
-{
- status_t status = (status_t)kStatus_SerialManager_Error;
-#if defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING)
- uint32_t sendDataLength;
- int txBusy = 0;
-#endif
- assert(NULL != ch);
- assert(0 != size);
-
-#if defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING)
- uint32_t regPrimask = DisableGlobalIRQ();
- if (s_debugConsoleState.writeRingBuffer.ringHead != s_debugConsoleState.writeRingBuffer.ringTail)
- {
- txBusy = 1;
- sendDataLength =
- (s_debugConsoleState.writeRingBuffer.ringHead + s_debugConsoleState.writeRingBuffer.ringBufferSize -
- s_debugConsoleState.writeRingBuffer.ringTail) %
- s_debugConsoleState.writeRingBuffer.ringBufferSize;
- }
- else
- {
- sendDataLength = 0U;
- }
- sendDataLength = s_debugConsoleState.writeRingBuffer.ringBufferSize - sendDataLength - 1;
- if (sendDataLength < size)
- {
- EnableGlobalIRQ(regPrimask);
- return -1;
- }
- for (int i = 0; i < (int)size; i++)
- {
- s_debugConsoleState.writeRingBuffer.ringBuffer[s_debugConsoleState.writeRingBuffer.ringHead++] = ch[i];
- if (s_debugConsoleState.writeRingBuffer.ringHead >= s_debugConsoleState.writeRingBuffer.ringBufferSize)
- {
- s_debugConsoleState.writeRingBuffer.ringHead = 0U;
- }
- }
-
- status = (status_t)kStatus_SerialManager_Success;
-
- if (txBusy == 0)
- {
- if (s_debugConsoleState.writeRingBuffer.ringHead > s_debugConsoleState.writeRingBuffer.ringTail)
- {
- sendDataLength =
- s_debugConsoleState.writeRingBuffer.ringHead - s_debugConsoleState.writeRingBuffer.ringTail;
- }
- else
- {
- sendDataLength =
- s_debugConsoleState.writeRingBuffer.ringBufferSize - s_debugConsoleState.writeRingBuffer.ringTail;
- }
-
- status = (status_t)SerialManager_WriteNonBlocking(
- ((serial_write_handle_t)&s_debugConsoleState.serialWriteHandleBuffer[0]),
- &s_debugConsoleState.writeRingBuffer.ringBuffer[s_debugConsoleState.writeRingBuffer.ringTail],
- sendDataLength);
- }
- EnableGlobalIRQ(regPrimask);
-#else
- status = (status_t)SerialManager_WriteBlocking(
- ((serial_write_handle_t)&s_debugConsoleState.serialWriteHandleBuffer[0]), ch, size);
-#endif
- return (((status_t)kStatus_Success == status) ? (int)size : -1);
-}
-
-int DbgConsole_SendDataReliable(uint8_t *ch, size_t size)
-{
-#if defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING)
-#if (defined(DEBUG_CONSOLE_TX_RELIABLE_ENABLE) && (DEBUG_CONSOLE_TX_RELIABLE_ENABLE > 0U))
- status_t status = kStatus_SerialManager_Error;
- uint32_t sendDataLength;
- uint32_t totalLength = size;
- int sentLength;
-#endif /* DEBUG_CONSOLE_TX_RELIABLE_ENABLE */
-#else
- status_t status = kStatus_SerialManager_Error;
-#endif /* DEBUG_CONSOLE_TRANSFER_NON_BLOCKING */
-
- assert(NULL != ch);
- assert(0 != size);
-
- if (NULL == g_serialHandle)
- {
- return 0;
- }
-
-#if defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING)
-
-#if (defined(DEBUG_CONSOLE_TX_RELIABLE_ENABLE) && (DEBUG_CONSOLE_TX_RELIABLE_ENABLE > 0U))
- do
- {
- uint32_t regPrimask = DisableGlobalIRQ();
- if (s_debugConsoleState.writeRingBuffer.ringHead != s_debugConsoleState.writeRingBuffer.ringTail)
- {
- sendDataLength =
- (s_debugConsoleState.writeRingBuffer.ringHead + s_debugConsoleState.writeRingBuffer.ringBufferSize -
- s_debugConsoleState.writeRingBuffer.ringTail) %
- s_debugConsoleState.writeRingBuffer.ringBufferSize;
- }
- else
- {
- sendDataLength = 0U;
- }
- sendDataLength = s_debugConsoleState.writeRingBuffer.ringBufferSize - sendDataLength - 1U;
-
- if (sendDataLength > 0U)
- {
- if (sendDataLength > totalLength)
- {
- sendDataLength = totalLength;
- }
-
- sentLength = DbgConsole_SendData(&ch[size - totalLength], sendDataLength);
- if (sentLength > 0)
- {
- totalLength = totalLength - (uint32_t)sentLength;
- }
- }
- EnableGlobalIRQ(regPrimask);
-
- if (totalLength != 0U)
- {
- status = DbgConsole_Flush();
- if ((status_t)kStatus_Success != status)
- {
- break;
- }
- }
- } while (totalLength != 0U);
- return (status_t)(uint32_t)((uint32_t)size - totalLength);
-#else
- return DbgConsole_SendData(ch, size);
-#endif /* DEBUG_CONSOLE_TX_RELIABLE_ENABLE */
-
-#else
- status = (status_t)SerialManager_WriteBlocking(
- ((serial_write_handle_t)&s_debugConsoleState.serialWriteHandleBuffer[0]), ch, size);
- return (((status_t)kStatus_Success == status) ? (int)size : -1);
-#endif /* DEBUG_CONSOLE_TRANSFER_NON_BLOCKING */
-}
-
-int DbgConsole_ReadLine(uint8_t *buf, size_t size)
-{
- int i = 0;
-
- assert(buf != NULL);
-
- if (NULL == g_serialHandle)
- {
- return -1;
- }
-
- /* take mutex lock function */
- DEBUG_CONSOLE_TAKE_MUTEX_SEMAPHORE_BLOCKING(s_debugConsoleReadSemaphore);
-
- do
- {
- /* recieve one char every time */
- if ((status_t)kStatus_Success != DbgConsole_ReadOneCharacter(&buf[i]))
- {
- /* release mutex lock function */
- DEBUG_CONSOLE_GIVE_MUTEX_SEMAPHORE(s_debugConsoleReadSemaphore);
- i = -1;
- break;
- }
-#if DEBUG_CONSOLE_ENABLE_ECHO_FUNCTION
- (void)DbgConsole_EchoCharacter(&buf[i], false, &i);
-#endif
- /* analysis data */
- if (((uint8_t)'\r' == buf[i]) || ((uint8_t)'\n' == buf[i]))
- {
- /* End of Line. */
- if (0 == i)
- {
- buf[i] = (uint8_t)'\0';
- continue;
- }
- else
- {
- break;
- }
- }
- i++;
- } while (i < (int)size);
-
- /* get char should not add '\0'*/
- if (i == (int)size)
- {
- buf[i] = (uint8_t)'\0';
- }
- else
- {
- buf[i + 1] = (uint8_t)'\0';
- }
-
- /* release mutex lock function */
- DEBUG_CONSOLE_GIVE_MUTEX_SEMAPHORE(s_debugConsoleReadSemaphore);
-
- return i;
-}
-
-int DbgConsole_ReadCharacter(uint8_t *ch)
-{
- int ret;
-
- assert(ch);
-
- if (NULL == g_serialHandle)
- {
- return -1;
- }
-
- /* take mutex lock function */
- DEBUG_CONSOLE_TAKE_MUTEX_SEMAPHORE_BLOCKING(s_debugConsoleReadSemaphore);
- /* read one character */
- if ((status_t)kStatus_Success == DbgConsole_ReadOneCharacter(ch))
- {
- ret = 1;
-#if DEBUG_CONSOLE_ENABLE_ECHO_FUNCTION
- (void)DbgConsole_EchoCharacter(ch, true, NULL);
-#endif
- }
- else
- {
- ret = -1;
- }
-
- /* release mutex lock function */
- DEBUG_CONSOLE_GIVE_MUTEX_SEMAPHORE(s_debugConsoleReadSemaphore);
-
- return ret;
-}
-
-#if SDK_DEBUGCONSOLE
-static void DbgConsole_PrintCallback(char *buf, int32_t *indicator, char dbgVal, int len)
-{
- int i = 0;
-
- for (i = 0; i < len; i++)
- {
- if (((uint32_t)*indicator + 1UL) >= DEBUG_CONSOLE_PRINTF_MAX_LOG_LEN)
- {
- (void)DbgConsole_SendDataReliable((uint8_t *)buf, (uint32_t)(*indicator));
- *indicator = 0;
- }
-
- buf[*indicator] = dbgVal;
- (*indicator)++;
- }
-}
-#endif
-
-/*************Code for DbgConsole Init, Deinit, Printf, Scanf *******************************/
-
-#if ((SDK_DEBUGCONSOLE == DEBUGCONSOLE_REDIRECT_TO_SDK) || defined(SDK_DEBUGCONSOLE_UART))
-/* See fsl_debug_console.h for documentation of this function. */
-status_t DbgConsole_Init(uint8_t instance, uint32_t baudRate, serial_port_type_t device, uint32_t clkSrcFreq)
-{
- serial_manager_config_t serialConfig;
- status_t status = (status_t)kStatus_SerialManager_Error;
-
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
- serial_port_uart_config_t uartConfig = {
- .instance = instance,
- .clockRate = clkSrcFreq,
- .baudRate = baudRate,
- .parityMode = kSerialManager_UartParityDisabled,
- .stopBitCount = kSerialManager_UartOneStopBit,
- .enableRx = 1,
- .enableTx = 1,
- };
-#endif
-
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
- serial_port_usb_cdc_config_t usbCdcConfig = {
- .controllerIndex = (serial_port_usb_cdc_controller_index_t)instance,
- };
-#endif
-
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
- serial_port_swo_config_t swoConfig = {
- .clockRate = clkSrcFreq,
- .baudRate = baudRate,
- .port = instance,
- .protocol = kSerialManager_SwoProtocolNrz,
- };
-#endif
-
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
- serial_port_usb_cdc_virtual_config_t usbCdcVirtualConfig = {
- .controllerIndex = (serial_port_usb_cdc_virtual_controller_index_t)instance,
- };
-#endif
- serialConfig.type = device;
-#if defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING)
- serialConfig.ringBuffer = &s_debugConsoleState.readRingBuffer[0];
- serialConfig.ringBufferSize = DEBUG_CONSOLE_RECEIVE_BUFFER_LEN;
-#endif
-
- if (kSerialPort_Uart == device)
- {
-#if (defined(SERIAL_PORT_TYPE_UART) && (SERIAL_PORT_TYPE_UART > 0U))
- serialConfig.portConfig = &uartConfig;
-#else
- return status;
-#endif
- }
- else if (kSerialPort_UsbCdc == device)
- {
-#if (defined(SERIAL_PORT_TYPE_USBCDC) && (SERIAL_PORT_TYPE_USBCDC > 0U))
- serialConfig.portConfig = &usbCdcConfig;
-#else
- return status;
-#endif
- }
- else if (kSerialPort_Swo == device)
- {
-#if (defined(SERIAL_PORT_TYPE_SWO) && (SERIAL_PORT_TYPE_SWO > 0U))
- serialConfig.portConfig = &swoConfig;
-#else
- return status;
-#endif
- }
- else if (kSerialPort_UsbCdcVirtual == device)
- {
-#if (defined(SERIAL_PORT_TYPE_USBCDC_VIRTUAL) && (SERIAL_PORT_TYPE_USBCDC_VIRTUAL > 0U))
- serialConfig.portConfig = &usbCdcVirtualConfig;
-#else
- return status;
-#endif
- }
- else
- {
- return status;
- }
-
- (void)memset(&s_debugConsoleState, 0, sizeof(s_debugConsoleState));
-
-#if defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING)
- s_debugConsoleState.writeRingBuffer.ringBufferSize = DEBUG_CONSOLE_TRANSMIT_BUFFER_LEN;
-#endif
-
- s_debugConsoleState.serialHandle = (serial_handle_t)&s_debugConsoleState.serialHandleBuffer[0];
- status = (status_t)SerialManager_Init(s_debugConsoleState.serialHandle, &serialConfig);
-
- assert(kStatus_SerialManager_Success == status);
-
- DEBUG_CONSOLE_CREATE_MUTEX_SEMAPHORE(s_debugConsoleReadSemaphore);
-#if (defined(DEBUG_CONSOLE_RX_ENABLE) && (DEBUG_CONSOLE_RX_ENABLE > 0U))
- DEBUG_CONSOLE_CREATE_BINARY_SEMAPHORE(s_debugConsoleReadWaitSemaphore);
-#endif
-
- {
- status = (status_t)SerialManager_OpenWriteHandle(
- s_debugConsoleState.serialHandle, ((serial_write_handle_t)&s_debugConsoleState.serialWriteHandleBuffer[0]));
- assert(kStatus_SerialManager_Success == status);
-#if defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING)
- (void)SerialManager_InstallTxCallback(((serial_write_handle_t)&s_debugConsoleState.serialWriteHandleBuffer[0]),
- DbgConsole_SerialManagerTxCallback, &s_debugConsoleState);
-#endif
- }
-
-#if (defined(DEBUG_CONSOLE_RX_ENABLE) && (DEBUG_CONSOLE_RX_ENABLE > 0U))
- {
- status = (status_t)SerialManager_OpenReadHandle(
- s_debugConsoleState.serialHandle, ((serial_read_handle_t)&s_debugConsoleState.serialReadHandleBuffer[0]));
- assert(kStatus_SerialManager_Success == status);
-#if defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING)
- (void)SerialManager_InstallRxCallback(((serial_read_handle_t)&s_debugConsoleState.serialReadHandleBuffer[0]),
- DbgConsole_SerialManagerRxCallback, &s_debugConsoleState);
-#endif
- }
-#endif
-
- g_serialHandle = s_debugConsoleState.serialHandle;
-
- return kStatus_Success;
-}
-
-/* See fsl_debug_console.h for documentation of this function. */
-status_t DbgConsole_Deinit(void)
-{
- {
- if (s_debugConsoleState.serialHandle != NULL)
- {
- (void)SerialManager_CloseWriteHandle(
- ((serial_write_handle_t)&s_debugConsoleState.serialWriteHandleBuffer[0]));
- }
- }
-#if (defined(DEBUG_CONSOLE_RX_ENABLE) && (DEBUG_CONSOLE_RX_ENABLE > 0U))
- {
- if (s_debugConsoleState.serialHandle != NULL)
- {
- (void)SerialManager_CloseReadHandle(((serial_read_handle_t)&s_debugConsoleState.serialReadHandleBuffer[0]));
- }
- }
-#endif
- if (s_debugConsoleState.serialHandle)
- {
- if (kStatus_SerialManager_Success == SerialManager_Deinit(s_debugConsoleState.serialHandle))
- {
- s_debugConsoleState.serialHandle = NULL;
- g_serialHandle = NULL;
- }
- }
-#if (defined(DEBUG_CONSOLE_RX_ENABLE) && (DEBUG_CONSOLE_RX_ENABLE > 0U))
- DEBUG_CONSOLE_DESTROY_BINARY_SEMAPHORE(s_debugConsoleReadWaitSemaphore);
-#endif
- DEBUG_CONSOLE_DESTROY_MUTEX_SEMAPHORE(s_debugConsoleReadSemaphore);
-
- return (status_t)kStatus_Success;
-}
-#endif /* ((SDK_DEBUGCONSOLE == DEBUGCONSOLE_REDIRECT_TO_SDK) || defined(SDK_DEBUGCONSOLE_UART)) */
-
-#if ((SDK_DEBUGCONSOLE > 0U) || \
- ((SDK_DEBUGCONSOLE == 0U) && defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING) && \
- (defined(DEBUG_CONSOLE_TX_RELIABLE_ENABLE) && (DEBUG_CONSOLE_TX_RELIABLE_ENABLE > 0U))))
-DEBUG_CONSOLE_FUNCTION_PREFIX status_t DbgConsole_Flush(void)
-{
-#if defined(DEBUG_CONSOLE_TRANSFER_NON_BLOCKING)
-
-#if (DEBUG_CONSOLE_SYNCHRONIZATION_MODE == DEBUG_CONSOLE_SYNCHRONIZATION_BM) && defined(OSA_USED)
-
- if (s_debugConsoleState.writeRingBuffer.ringHead != s_debugConsoleState.writeRingBuffer.ringTail)
- {
- return (status_t)kStatus_Fail;
- }
-
-#else
-
- while (s_debugConsoleState.writeRingBuffer.ringHead != s_debugConsoleState.writeRingBuffer.ringTail)
- {
-#if (DEBUG_CONSOLE_SYNCHRONIZATION_MODE == DEBUG_CONSOLE_SYNCHRONIZATION_FREERTOS)
- if (0U == IS_RUNNING_IN_ISR())
- {
- if (taskSCHEDULER_RUNNING == xTaskGetSchedulerState())
- {
- vTaskDelay(1);
- }
- }
- else
- {
- return (status_t)kStatus_Fail;
- }
-#endif
- }
-
-#endif
-
-#endif
- return (status_t)kStatus_Success;
-}
-#endif
-
-#if SDK_DEBUGCONSOLE
-/* See fsl_debug_console.h for documentation of this function. */
-int DbgConsole_Printf(const char *formatString, ...)
-{
- va_list ap;
- int logLength = 0, dbgResult = 0;
- char printBuf[DEBUG_CONSOLE_PRINTF_MAX_LOG_LEN] = {'\0'};
-
- if (NULL == g_serialHandle)
- {
- return 0;
- }
-
- va_start(ap, formatString);
- /* format print log first */
- logLength = StrFormatPrintf(formatString, ap, printBuf, DbgConsole_PrintCallback);
- /* print log */
- dbgResult = DbgConsole_SendDataReliable((uint8_t *)printBuf, (size_t)logLength);
-
- va_end(ap);
-
- return dbgResult;
-}
-
-/* See fsl_debug_console.h for documentation of this function. */
-int DbgConsole_Putchar(int ch)
-{
- /* print char */
- return DbgConsole_SendDataReliable((uint8_t *)&ch, 1U);
-}
-
-/* See fsl_debug_console.h for documentation of this function. */
-int DbgConsole_Scanf(char *formatString, ...)
-{
- va_list ap;
- int formatResult;
- char scanfBuf[DEBUG_CONSOLE_SCANF_MAX_LOG_LEN + 1U] = {'\0'};
-
- /* scanf log */
- (void)DbgConsole_ReadLine((uint8_t *)scanfBuf, DEBUG_CONSOLE_SCANF_MAX_LOG_LEN);
- /* get va_list */
- va_start(ap, formatString);
- /* format scanf log */
- formatResult = StrFormatScanf(scanfBuf, formatString, ap);
-
- va_end(ap);
-
- return formatResult;
-}
-
-#ifdef DEBUG_CONSOLE_TRANSFER_NON_BLOCKING
-status_t DbgConsole_TryGetchar(char *ch)
-{
-#if (defined(DEBUG_CONSOLE_RX_ENABLE) && (DEBUG_CONSOLE_RX_ENABLE > 0U))
- uint32_t length = 0;
- status_t status = (status_t)kStatus_Fail;
-
- assert(ch);
-
- if (NULL == g_serialHandle)
- {
- return kStatus_Fail;
- }
-
- /* take mutex lock function */
- DEBUG_CONSOLE_TAKE_MUTEX_SEMAPHORE_BLOCKING(s_debugConsoleReadSemaphore);
-
- if (kStatus_SerialManager_Success ==
- SerialManager_TryRead(((serial_read_handle_t)&s_debugConsoleState.serialReadHandleBuffer[0]), (uint8_t *)ch, 1,
- &length))
- {
- if (length != 0U)
- {
-#if DEBUG_CONSOLE_ENABLE_ECHO_FUNCTION
- (void)DbgConsole_EchoCharacter((uint8_t *)ch, true, NULL);
-#endif
- status = (status_t)kStatus_Success;
- }
- }
- /* release mutex lock function */
- DEBUG_CONSOLE_GIVE_MUTEX_SEMAPHORE(s_debugConsoleReadSemaphore);
- return status;
-#else
- return (status_t)kStatus_Fail;
-#endif
-}
-#endif
-
-/* See fsl_debug_console.h for documentation of this function. */
-int DbgConsole_Getchar(void)
-{
- uint8_t ch = 0U;
-
- /* Get char */
- (void)DbgConsole_ReadCharacter(&ch);
-
- return (int)ch;
-}
-
-#endif /* SDK_DEBUGCONSOLE */
-
-/*************Code to support toolchain's printf, scanf *******************************/
-/* These function __write and __read is used to support IAR toolchain to printf and scanf*/
-#if (defined(__ICCARM__))
-#if defined(SDK_DEBUGCONSOLE_UART)
-#pragma weak __write
-size_t __write(int handle, const unsigned char *buffer, size_t size)
-{
- if (buffer == 0)
- {
- /*
- * This means that we should flush internal buffers. Since we don't we just return.
- * (Remember, "handle" == -1 means that all handles should be flushed.)
- */
- return 0;
- }
-
- /* This function only writes to "standard out" and "standard err" for all other file handles it returns failure. */
- if ((handle != 1) && (handle != 2))
- {
- return ((size_t)-1);
- }
-
- /* Send data. */
- DbgConsole_SendDataReliable((uint8_t *)buffer, size);
-
- return size;
-}
-
-#pragma weak __read
-size_t __read(int handle, unsigned char *buffer, size_t size)
-{
- uint8_t ch = 0U;
- int actualSize = 0U;
-
- /* This function only reads from "standard in", for all other file handles it returns failure. */
- if (handle != 0)
- {
- return ((size_t)-1);
- }
-
- /* Receive data.*/
- for (; size > 0; size--)
- {
- DbgConsole_ReadCharacter(&ch);
- if (ch == 0)
- {
- break;
- }
-
- *buffer++ = ch;
- actualSize++;
- }
-
- return actualSize;
-}
-#endif /* SDK_DEBUGCONSOLE_UART */
-
-/* support LPC Xpresso with RedLib */
-#elif (defined(__REDLIB__))
-
-#if (defined(SDK_DEBUGCONSOLE_UART))
-int __attribute__((weak)) __sys_write(int handle, char *buffer, int size)
-{
- if (buffer == 0)
- {
- /* return -1 if error. */
- return -1;
- }
-
- /* This function only writes to "standard out" and "standard err" for all other file handles it returns failure. */
- if ((handle != 1) && (handle != 2))
- {
- return -1;
- }
-
- /* Send data. */
- DbgConsole_SendDataReliable((uint8_t *)buffer, size);
-
- return 0;
-}
-
-int __attribute__((weak)) __sys_readc(void)
-{
- char tmp;
-
- /* Receive data. */
- DbgConsole_ReadCharacter((uint8_t *)&tmp);
-
- return tmp;
-}
-#endif
-
-/* These function fputc and fgetc is used to support KEIL toolchain to printf and scanf*/
-#elif defined(__CC_ARM) || defined(__ARMCC_VERSION)
-#if defined(SDK_DEBUGCONSOLE_UART)
-#if defined(__CC_ARM)
-struct __FILE
-{
- int handle;
- /*
- * Whatever you require here. If the only file you are using is standard output using printf() for debugging,
- * no file handling is required.
- */
-};
-#endif
-
-/* FILE is typedef in stdio.h. */
-#pragma weak __stdout
-#pragma weak __stdin
-FILE __stdout;
-FILE __stdin;
-
-#pragma weak fputc
-int fputc(int ch, FILE *f)
-{
- /* Send data. */
- return DbgConsole_SendDataReliable((uint8_t *)(&ch), 1);
-}
-
-#pragma weak fgetc
-int fgetc(FILE *f)
-{
- char ch;
-
- /* Receive data. */
- DbgConsole_ReadCharacter((uint8_t *)&ch);
-
- return ch;
-}
-
-/*
- * Terminate the program, passing a return code back to the user.
- * This function may not return.
- */
-void _sys_exit(int returncode)
-{
- while (1)
- {
- }
-}
-
-/*
- * Writes a character to the output channel. This function is used
- * for last-resort error message output.
- */
-void _ttywrch(int ch)
-{
- char ench = ch;
- DbgConsole_SendDataReliable((uint8_t *)(&ench), 1);
-}
-
-char *_sys_command_string(char *cmd, int len)
-{
- return (cmd);
-}
-#endif /* SDK_DEBUGCONSOLE_UART */
-
-/* These function __write and __read is used to support ARM_GCC, KDS, Atollic toolchains to printf and scanf*/
-#elif (defined(__GNUC__))
-
-#if ((defined(__GNUC__) && (!defined(__MCUXPRESSO)) && (defined(SDK_DEBUGCONSOLE_UART))) || \
- (defined(__MCUXPRESSO) && (defined(SDK_DEBUGCONSOLE_UART))))
-int __attribute__((weak)) _write(int handle, char *buffer, int size);
-int __attribute__((weak)) _write(int handle, char *buffer, int size)
-{
- if (buffer == NULL)
- {
- /* return -1 if error. */
- return -1;
- }
-
- /* This function only writes to "standard out" and "standard err" for all other file handles it returns failure. */
- if ((handle != 1) && (handle != 2))
- {
- return -1;
- }
-
- /* Send data. */
- (void)DbgConsole_SendDataReliable((uint8_t *)buffer, (size_t)size);
-
- return size;
-}
-
-int __attribute__((weak)) _read(int handle, char *buffer, int size);
-int __attribute__((weak)) _read(int handle, char *buffer, int size)
-{
- uint8_t ch = 0U;
- int actualSize = 0;
-
- /* This function only reads from "standard in", for all other file handles it returns failure. */
- if (handle != 0)
- {
- return -1;
- }
-
- /* Receive data. */
- for (; size > 0; size--)
- {
- if (DbgConsole_ReadCharacter(&ch) < 0)
- {
- break;
- }
-
- *buffer++ = (char)ch;
- actualSize++;
-
- if ((ch == 0U) || (ch == (uint8_t)'\n') || (ch == (uint8_t)'\r'))
- {
- break;
- }
- }
-
- return (actualSize > 0) ? actualSize : -1;
-}
-#endif
-
-#endif /* __ICCARM__ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console.h b/platform/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console.h
deleted file mode 100755
index a51890f4ff..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console.h
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (c) 2013 - 2015, Freescale Semiconductor, Inc.
- * Copyright 2016-2018 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Debug console shall provide input and output functions to scan and print formatted data.
- * o Support a format specifier for PRINTF follows this prototype "%[flags][width][.precision][length]specifier"
- * - [flags] :'-', '+', '#', ' ', '0'
- * - [width]: number (0,1...)
- * - [.precision]: number (0,1...)
- * - [length]: do not support
- * - [specifier]: 'd', 'i', 'f', 'F', 'x', 'X', 'o', 'p', 'u', 'c', 's', 'n'
- * o Support a format specifier for SCANF follows this prototype " %[*][width][length]specifier"
- * - [*]: is supported.
- * - [width]: number (0,1...)
- * - [length]: 'h', 'hh', 'l','ll','L'. ignore ('j','z','t')
- * - [specifier]: 'd', 'i', 'u', 'f', 'F', 'e', 'E', 'g', 'G', 'a', 'A', 'o', 'c', 's'
- */
-
-#ifndef _FSL_DEBUGCONSOLE_H_
-#define _FSL_DEBUGCONSOLE_H_
-
-#include "fsl_common.h"
-#include "serial_manager.h"
-
-/*!
- * @addtogroup debugconsole
- * @{
- */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-extern serial_handle_t g_serialHandle; /*!< serial manager handle */
-
-/*! @brief Definition select redirect toolchain printf, scanf to uart or not. */
-#define DEBUGCONSOLE_REDIRECT_TO_TOOLCHAIN 0U /*!< Select toolchain printf and scanf. */
-#define DEBUGCONSOLE_REDIRECT_TO_SDK 1U /*!< Select SDK version printf, scanf. */
-#define DEBUGCONSOLE_DISABLE 2U /*!< Disable debugconsole function. */
-
-/*! @brief Definition to select sdk or toolchain printf, scanf. The macro only support
- * to be redefined in project setting.
- */
-#ifndef SDK_DEBUGCONSOLE
-#define SDK_DEBUGCONSOLE 1U
-#endif
-
-#if defined(SDK_DEBUGCONSOLE) && !(SDK_DEBUGCONSOLE)
-#include <stdio.h>
-#endif
-
-/*! @brief Definition to select redirect toolchain printf, scanf to uart or not.
- *
- * if SDK_DEBUGCONSOLE defined to 0,it represents select toolchain printf, scanf.
- * if SDK_DEBUGCONSOLE defined to 1,it represents select SDK version printf, scanf.
- * if SDK_DEBUGCONSOLE defined to 2,it represents disable debugconsole function.
- */
-#if SDK_DEBUGCONSOLE == DEBUGCONSOLE_DISABLE /* Disable debug console */
-#define PRINTF
-#define SCANF
-#define PUTCHAR
-#define GETCHAR
-#elif SDK_DEBUGCONSOLE == DEBUGCONSOLE_REDIRECT_TO_SDK /* Select printf, scanf, putchar, getchar of SDK version. */
-#define PRINTF DbgConsole_Printf
-#define SCANF DbgConsole_Scanf
-#define PUTCHAR DbgConsole_Putchar
-#define GETCHAR DbgConsole_Getchar
-#elif SDK_DEBUGCONSOLE == DEBUGCONSOLE_REDIRECT_TO_TOOLCHAIN /* Select printf, scanf, putchar, getchar of toolchain. \ \
- */
-#define PRINTF printf
-#define SCANF scanf
-#define PUTCHAR putchar
-#define GETCHAR getchar
-#endif /* SDK_DEBUGCONSOLE */
-
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif /* __cplusplus */
-
-/*! @name Initialization*/
-/* @{ */
-
-#if ((SDK_DEBUGCONSOLE == DEBUGCONSOLE_REDIRECT_TO_SDK) || defined(SDK_DEBUGCONSOLE_UART))
-/*!
- * @brief Initializes the peripheral used for debug messages.
- *
- * Call this function to enable debug log messages to be output via the specified peripheral
- * initialized by the serial manager module.
- * After this function has returned, stdout and stdin are connected to the selected peripheral.
- *
- * @param instance The instance of the module.
- * @param baudRate The desired baud rate in bits per second.
- * @param device Low level device type for the debug console, can be one of the following.
- * @arg kSerialPort_Uart,
- * @arg kSerialPort_UsbCdc
- * @arg kSerialPort_UsbCdcVirtual.
- * @param clkSrcFreq Frequency of peripheral source clock.
- *
- * @return Indicates whether initialization was successful or not.
- * @retval kStatus_Success Execution successfully
- */
-status_t DbgConsole_Init(uint8_t instance, uint32_t baudRate, serial_port_type_t device, uint32_t clkSrcFreq);
-
-/*!
- * @brief De-initializes the peripheral used for debug messages.
- *
- * Call this function to disable debug log messages to be output via the specified peripheral
- * initialized by the serial manager module.
- *
- * @return Indicates whether de-initialization was successful or not.
- */
-status_t DbgConsole_Deinit(void);
-#else
-/*!
- * Use an error to replace the DbgConsole_Init when SDK_DEBUGCONSOLE is not DEBUGCONSOLE_REDIRECT_TO_SDK and
- * SDK_DEBUGCONSOLE_UART is not defined.
- */
-static inline status_t DbgConsole_Init(uint8_t instance,
- uint32_t baudRate,
- serial_port_type_t device,
- uint32_t clkSrcFreq)
-{
- (void)instance;
- (void)baudRate;
- (void)device;
- (void)clkSrcFreq;
- return (status_t)kStatus_Fail;
-}
-/*!
- * Use an error to replace the DbgConsole_Deinit when SDK_DEBUGCONSOLE is not DEBUGCONSOLE_REDIRECT_TO_SDK and
- * SDK_DEBUGCONSOLE_UART is not defined.
- */
-static inline status_t DbgConsole_Deinit(void)
-{
- return (status_t)kStatus_Fail;
-}
-#endif /* ((SDK_DEBUGCONSOLE == DEBUGCONSOLE_REDIRECT_TO_SDK) || defined(SDK_DEBUGCONSOLE_UART)) */
-
-#if SDK_DEBUGCONSOLE
-/*!
- * @brief Writes formatted output to the standard output stream.
- *
- * Call this function to write a formatted output to the standard output stream.
- *
- * @param formatString Format control string.
- * @return Returns the number of characters printed or a negative value if an error occurs.
- */
-int DbgConsole_Printf(const char *formatString, ...);
-
-/*!
- * @brief Writes a character to stdout.
- *
- * Call this function to write a character to stdout.
- *
- * @param ch Character to be written.
- * @return Returns the character written.
- */
-int DbgConsole_Putchar(int ch);
-
-/*!
- * @brief Reads formatted data from the standard input stream.
- *
- * Call this function to read formatted data from the standard input stream.
- *
- * @note Due the limitation in the BM OSA environment (CPU is blocked in the function,
- * other tasks will not be scheduled), the function cannot be used when the
- * DEBUG_CONSOLE_TRANSFER_NON_BLOCKING is set in the BM OSA environment.
- * And an error is returned when the function called in this case. The suggestion
- * is that polling the non-blocking function DbgConsole_TryGetchar to get the input char.
- *
- * @param formatString Format control string.
- * @return Returns the number of fields successfully converted and assigned.
- */
-int DbgConsole_Scanf(char *formatString, ...);
-
-/*!
- * @brief Reads a character from standard input.
- *
- * Call this function to read a character from standard input.
- *
- * @note Due the limitation in the BM OSA environment (CPU is blocked in the function,
- * other tasks will not be scheduled), the function cannot be used when the
- * DEBUG_CONSOLE_TRANSFER_NON_BLOCKING is set in the BM OSA environment.
- * And an error is returned when the function called in this case. The suggestion
- * is that polling the non-blocking function DbgConsole_TryGetchar to get the input char.
- *
- * @return Returns the character read.
- */
-int DbgConsole_Getchar(void);
-
-/*!
- * @brief Debug console flush.
- *
- * Call this function to wait the tx buffer empty.
- * If interrupt transfer is using, make sure the global IRQ is enable before call this function
- * This function should be called when
- * 1, before enter power down mode
- * 2, log is required to print to terminal immediately
- * @return Indicates whether wait idle was successful or not.
- */
-status_t DbgConsole_Flush(void);
-
-#ifdef DEBUG_CONSOLE_TRANSFER_NON_BLOCKING
-/*!
- * @brief Debug console try to get char
- * This function provides a API which will not block current task, if character is
- * available return it, otherwise return fail.
- * @param ch the address of char to receive
- * @return Indicates get char was successful or not.
- */
-status_t DbgConsole_TryGetchar(char *ch);
-#endif
-
-#endif /* SDK_DEBUGCONSOLE */
-
-/*! @} */
-
-#if defined(__cplusplus)
-}
-#endif /* __cplusplus */
-
-/*! @} */
-
-#endif /* _FSL_DEBUGCONSOLE_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console_conf.h b/platform/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console_conf.h
deleted file mode 100755
index 366c6cdc21..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console_conf.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright 2017 - 2019 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-#ifndef _FSL_DEBUG_CONSOLE_CONF_H_
-#define _FSL_DEBUG_CONSOLE_CONF_H_
-
-/****************Debug console configuration********************/
-
-/*! @brief If Non-blocking mode is needed, please define it at project setting,
- * otherwise blocking mode is the default transfer mode.
- * Warning: If you want to use non-blocking transfer,please make sure the corresponding
- * IO interrupt is enable, otherwise there is no output.
- * And non-blocking is combine with buffer, no matter bare-metal or rtos.
- * Below shows how to configure in your project if you want to use non-blocking mode.
- * For IAR, right click project and select "Options", define it in "C/C++ Compiler->Preprocessor->Defined symbols".
- * For KEIL, click "Options for Target…", define it in "C/C++->Preprocessor Symbols->Define".
- * For ARMGCC, open CmakeLists.txt and add the following lines,
- * "SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG_CONSOLE_TRANSFER_NON_BLOCKING")" for debug target.
- * "SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DDEBUG_CONSOLE_TRANSFER_NON_BLOCKING")" for release target.
- * For MCUxpresso, right click project and select "Properties", define it in "C/C++ Build->Settings->MCU C
- * Complier->Preprocessor".
- *
- */
-#ifdef DEBUG_CONSOLE_TRANSFER_NON_BLOCKING
-/*! @brief define the transmit buffer length which is used to store the multi task log, buffer is enabled automatically
- * when
- * non-blocking transfer is using,
- * This value will affect the RAM's ultilization, should be set per paltform's capability and software requirement.
- * If it is configured too small, log maybe missed , because the log will not be
- * buffered if the buffer is full, and the print will return immediately with -1.
- * And this value should be multiple of 4 to meet memory alignment.
- *
- */
-#ifndef DEBUG_CONSOLE_TRANSMIT_BUFFER_LEN
-#define DEBUG_CONSOLE_TRANSMIT_BUFFER_LEN (512U)
-#endif /* DEBUG_CONSOLE_TRANSMIT_BUFFER_LEN */
-
-/*! @brief define the receive buffer length which is used to store the user input, buffer is enabled automatically when
- * non-blocking transfer is using,
- * This value will affect the RAM's ultilization, should be set per paltform's capability and software requirement.
- * If it is configured too small, log maybe missed, because buffer will be overwrited if buffer is too small.
- * And this value should be multiple of 4 to meet memory alignment.
- *
- */
-#ifndef DEBUG_CONSOLE_RECEIVE_BUFFER_LEN
-#define DEBUG_CONSOLE_RECEIVE_BUFFER_LEN (1024U)
-#endif /* DEBUG_CONSOLE_RECEIVE_BUFFER_LEN */
-
-/*!@ brief Whether enable the reliable TX function
- * If the macro is zero, the reliable TX function of the debug console is disabled.
- * When the macro is zero, the string of PRINTF will be thrown away after the transmit buffer is full.
- */
-#ifndef DEBUG_CONSOLE_TX_RELIABLE_ENABLE
-#define DEBUG_CONSOLE_TX_RELIABLE_ENABLE (1U)
-#endif /* DEBUG_CONSOLE_RX_ENABLE */
-
-#else
-#define DEBUG_CONSOLE_TRANSFER_BLOCKING
-#endif /* DEBUG_CONSOLE_TRANSFER_NON_BLOCKING */
-
-/*!@ brief Whether enable the RX function
- * If the macro is zero, the receive function of the debug console is disabled.
- */
-#ifndef DEBUG_CONSOLE_RX_ENABLE
-#define DEBUG_CONSOLE_RX_ENABLE (1U)
-#endif /* DEBUG_CONSOLE_RX_ENABLE */
-
-/*!@ brief define the MAX log length debug console support , that is when you call printf("log", x);, the log
- * length can not bigger than this value.
- * This macro decide the local log buffer length, the buffer locate at stack, the stack maybe overflow if
- * the buffer is too big and current task stack size not big enough.
- */
-#ifndef DEBUG_CONSOLE_PRINTF_MAX_LOG_LEN
-#define DEBUG_CONSOLE_PRINTF_MAX_LOG_LEN (128U)
-#endif /* DEBUG_CONSOLE_PRINTF_MAX_LOG_LEN */
-
-/*!@ brief define the buffer support buffer scanf log length, that is when you call scanf("log", &x);, the log
- * length can not bigger than this value.
- * As same as the DEBUG_CONSOLE_BUFFER_PRINTF_MAX_LOG_LEN.
- */
-#ifndef DEBUG_CONSOLE_SCANF_MAX_LOG_LEN
-#define DEBUG_CONSOLE_SCANF_MAX_LOG_LEN (20U)
-#endif /* DEBUG_CONSOLE_SCANF_MAX_LOG_LEN */
-
-/*! @brief Debug console synchronization
- * User should not change these macro for synchronization mode, but add the
- * corresponding synchronization mechanism per different software environment.
- * Such as, if another RTOS is used,
- * add:
- * #define DEBUG_CONSOLE_SYNCHRONIZATION_XXXX 3
- * in this configuration file and implement the synchronization in fsl.log.c.
- */
-/*! @brief synchronization for baremetal software */
-#define DEBUG_CONSOLE_SYNCHRONIZATION_BM 0
-/*! @brief synchronization for freertos software */
-#define DEBUG_CONSOLE_SYNCHRONIZATION_FREERTOS 1
-
-/*! @brief RTOS synchronization mechanism disable
- * If not defined, default is enable, to avoid multitask log print mess.
- * If other RTOS is used, you can implement the RTOS's specific synchronization mechanism in fsl.log.c
- * If synchronization is disabled, log maybe messed on terminal.
- */
-#ifndef DEBUG_CONSOLE_DISABLE_RTOS_SYNCHRONIZATION
-#ifdef DEBUG_CONSOLE_TRANSFER_NON_BLOCKING
-#ifdef FSL_RTOS_FREE_RTOS
-#define DEBUG_CONSOLE_SYNCHRONIZATION_MODE DEBUG_CONSOLE_SYNCHRONIZATION_FREERTOS
-#else
-#define DEBUG_CONSOLE_SYNCHRONIZATION_MODE DEBUG_CONSOLE_SYNCHRONIZATION_BM
-#endif /* FSL_RTOS_FREE_RTOS */
-#else
-#define DEBUG_CONSOLE_SYNCHRONIZATION_MODE DEBUG_CONSOLE_SYNCHRONIZATION_BM
-#endif /* DEBUG_CONSOLE_TRANSFER_NON_BLOCKING */
-#endif /* DEBUG_CONSOLE_DISABLE_RTOS_SYNCHRONIZATION */
-
-/*! @brief echo function support
- * If you want to use the echo function,please define DEBUG_CONSOLE_ENABLE_ECHO
- * at your project setting.
- */
-#ifndef DEBUG_CONSOLE_ENABLE_ECHO
-#define DEBUG_CONSOLE_ENABLE_ECHO_FUNCTION 0
-#else
-#define DEBUG_CONSOLE_ENABLE_ECHO_FUNCTION 1
-#endif /* DEBUG_CONSOLE_ENABLE_ECHO */
-
-/*********************************************************************/
-
-/***************Debug console other configuration*********************/
-/*! @brief Definition to printf the float number. */
-#ifndef PRINTF_FLOAT_ENABLE
-#define PRINTF_FLOAT_ENABLE 0U
-#endif /* PRINTF_FLOAT_ENABLE */
-
-/*! @brief Definition to scanf the float number. */
-#ifndef SCANF_FLOAT_ENABLE
-#define SCANF_FLOAT_ENABLE 0U
-#endif /* SCANF_FLOAT_ENABLE */
-
-/*! @brief Definition to support advanced format specifier for printf. */
-#ifndef PRINTF_ADVANCED_ENABLE
-#define PRINTF_ADVANCED_ENABLE 0U
-#endif /* PRINTF_ADVANCED_ENABLE */
-
-/*! @brief Definition to support advanced format specifier for scanf. */
-#ifndef SCANF_ADVANCED_ENABLE
-#define SCANF_ADVANCED_ENABLE 0U
-#endif /* SCANF_ADVANCED_ENABLE */
-
-/*! @brief Definition to select virtual com(USB CDC) as the debug console. */
-#ifndef BOARD_USE_VIRTUALCOM
-#define BOARD_USE_VIRTUALCOM 0U
-#endif
-/*******************************************************************/
-
-#endif /* _FSL_DEBUG_CONSOLE_CONF_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_assert.c b/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_assert.c
deleted file mode 100755
index 9052faf9cb..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_assert.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2015-2016, Freescale Semiconductor, Inc.
- * Copyright 2016-2017 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_common.h"
-#include "fsl_debug_console.h"
-
-#ifndef NDEBUG
-#if (defined(__CC_ARM)) || (defined(__ARMCC_VERSION)) || (defined(__ICCARM__))
-void __aeabi_assert(const char *failedExpr, const char *file, int line)
-{
- PRINTF("ASSERT ERROR \" %s \": file \"%s\" Line \"%d\" \n", failedExpr, file, line);
- for (;;)
- {
- __BKPT(0);
- }
-}
-#elif (defined(__GNUC__))
-void __assert_func(const char *file, int line, const char *func, const char *failedExpr)
-{
- PRINTF("ASSERT ERROR \" %s \": file \"%s\" Line \"%d\" function name \"%s\" \n", failedExpr, file, line, func);
- for (;;)
- {
- __BKPT(0);
- }
-}
-#endif /* (defined(__CC_ARM) || (defined(__ICCARM__)) || (defined(__ARMCC_VERSION)) */
-#endif /* NDEBUG */
diff --git a/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_notifier.c b/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_notifier.c
deleted file mode 100755
index 393c83a797..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_notifier.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (c) 2015, Freescale Semiconductor, Inc.
- * Copyright 2016-2017 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "fsl_notifier.h"
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-
-/*******************************************************************************
- * Variables
- ******************************************************************************/
-
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-/*!
- * brief Creates a Notifier handle.
- *
- * param notifierHandle A pointer to the notifier handle.
- * param configs A pointer to an array with references to all configurations which is handled by the Notifier.
- * param configsNumber Number of configurations. Size of the configuration array.
- * param callbacks A pointer to an array of callback configurations.
- * If there are no callbacks to register during Notifier initialization, use NULL value.
- * param callbacksNumber Number of registered callbacks. Size of the callbacks array.
- * param userFunction User function.
- * param userData User data passed to user function.
- * return An error Code or kStatus_Success.
- */
-status_t NOTIFIER_CreateHandle(notifier_handle_t *notifierHandle,
- notifier_user_config_t **configs,
- uint8_t configsNumber,
- notifier_callback_config_t *callbacks,
- uint8_t callbacksNumber,
- notifier_user_function_t userFunction,
- void *userData)
-{
- /* Check input parameter - at least one configuration is required and userFunction must exist */
- if ((configs == NULL) || (configsNumber == 0U) || (userFunction == NULL))
- {
- return kStatus_Fail;
- }
- /* Initialize handle structure */
- memset(notifierHandle, 0, sizeof(notifier_handle_t));
- /* Store references to user-defined configurations */
- notifierHandle->configsTable = configs;
- notifierHandle->configsNumber = configsNumber;
- /* Store references to user-defined callback configurations */
- if (callbacks != NULL)
- {
- notifierHandle->callbacksTable = callbacks;
- notifierHandle->callbacksNumber = callbacksNumber;
- /* If all callbacks return success, then the errorCallbackIndex is callbacksNumber */
- notifierHandle->errorCallbackIndex = callbacksNumber;
- }
- notifierHandle->userFunction = userFunction;
- notifierHandle->userData = userData;
-
- return kStatus_Success;
-}
-
-/*!
- * brief Switches the configuration according to a pre-defined structure.
- *
- * This function sets the system to the target configuration. Before transition,
- * the Notifier sends notifications to all callbacks registered to the callback table.
- * Callbacks are invoked in the following order: All registered callbacks are notified
- * ordered by index in the callbacks array. The same order is used for before and after switch notifications.
- * The notifications before the configuration switch can be used to obtain confirmation about
- * the change from registered callbacks. If any registered callback denies the
- * configuration change, further execution of this function depends on the notifier policy: the
- * configuration change is either forced (kNOTIFIER_PolicyForcible) or exited (kNOTIFIER_PolicyAgreement).
- * When configuration change is forced, the result of the before switch notifications are ignored. If an
- * agreement is required, if any callback returns an error code, further notifications
- * before switch notifications are cancelled and all already notified callbacks are re-invoked.
- * The index of the callback which returned error code during pre-switch notifications is stored
- * (any error codes during callbacks re-invocation are ignored) and NOTIFIER_GetErrorCallback() can be used to get it.
- * Regardless of the policies, if any callback returns an error code, an error code indicating in which phase
- * the error occurred is returned when NOTIFIER_SwitchConfig() exits.
- * param notifierHandle pointer to notifier handle
- * param configIndex Index of the target configuration.
- * param policy Transaction policy, kNOTIFIER_PolicyAgreement or kNOTIFIER_PolicyForcible.
- *
- * return An error code or kStatus_Success.
- *
- */
-status_t NOTIFIER_SwitchConfig(notifier_handle_t *notifierHandle, uint8_t configIndex, notifier_policy_t policy)
-{
- uint8_t currentStaticCallback = 0U; /* Index to array of statically registered call-backs */
- status_t returnCode = kStatus_Success; /* Function return */
-
- notifier_notification_block_t notifyBlock; /* Callback notification block */
- notifier_callback_config_t *callbackConfig; /* Pointer to callback configuration */
-
- /* Set errorcallbackindex as callbacksNumber, which means no callback error now */
- notifierHandle->errorCallbackIndex = notifierHandle->callbacksNumber;
-
- /* Requested configuration availability check */
- if (configIndex >= notifierHandle->configsNumber)
- {
- return kStatus_OutOfRange;
- }
-
- /* Initialization of local variables from the Notifier handle structure */
-
- notifyBlock.policy = policy;
- notifyBlock.targetConfig = notifierHandle->configsTable[configIndex];
- notifyBlock.notifyType = kNOTIFIER_NotifyBefore;
-
- /* From all statically registered call-backs... */
- for (currentStaticCallback = 0U; currentStaticCallback < notifierHandle->callbacksNumber; currentStaticCallback++)
- {
- callbackConfig = &(notifierHandle->callbacksTable[currentStaticCallback]);
- /* ...notify only those which asked to be called before the configuration switch */
- if (((uint32_t)callbackConfig->callbackType) & kNOTIFIER_CallbackBefore)
- {
- /* In case that call-back returned error code mark it, store the call-back handle and eventually cancel
- * the configuration switch */
- if (callbackConfig->callback(&notifyBlock, callbackConfig->callbackData) != kStatus_Success)
- {
- returnCode = kStatus_NOTIFIER_ErrorNotificationBefore;
- notifierHandle->errorCallbackIndex = currentStaticCallback;
- /* If not forcing configuration switch, call all already notified call-backs to revert their state
- * as the switch is canceled */
- if (policy != kNOTIFIER_PolicyForcible)
- {
- break;
- }
- }
- }
- }
-
- /* Set configuration */
-
- /* In case that any call-back returned error code and policy doesn't force the configuration set, go to after
- * switch call-backs */
- if ((policy == kNOTIFIER_PolicyForcible) || (returnCode == kStatus_Success))
- {
- returnCode = notifierHandle->userFunction(notifierHandle->configsTable[configIndex], notifierHandle->userData);
- if (returnCode != kStatus_Success)
- {
- return returnCode;
- }
- /* Update current configuration index */
- notifierHandle->currentConfigIndex = configIndex;
- notifyBlock.notifyType = kNOTIFIER_NotifyAfter;
- /* From all statically registered call-backs... */
- for (currentStaticCallback = 0U; currentStaticCallback < notifierHandle->callbacksNumber;
- currentStaticCallback++)
- {
- callbackConfig = &(notifierHandle->callbacksTable[currentStaticCallback]);
- /* ...notify only those which asked to be called after the configuration switch */
- if (((uint32_t)callbackConfig->callbackType) & kNOTIFIER_CallbackAfter)
- {
- /* In case that call-back returned error code mark it and store the call-back handle */
- if (callbackConfig->callback(&notifyBlock, callbackConfig->callbackData) != kStatus_Success)
- {
- returnCode = kStatus_NOTIFIER_ErrorNotificationAfter;
- notifierHandle->errorCallbackIndex = currentStaticCallback;
- if (policy != kNOTIFIER_PolicyForcible)
- {
- break;
- }
- }
- }
- }
- }
- else
- {
- /* End of unsuccessful switch */
- notifyBlock.notifyType = kNOTIFIER_NotifyRecover;
- while (currentStaticCallback--)
- {
- callbackConfig = &(notifierHandle->callbacksTable[currentStaticCallback]);
- if (((uint32_t)callbackConfig->callbackType) & kNOTIFIER_CallbackBefore)
- {
- callbackConfig->callback(&notifyBlock, callbackConfig->callbackData);
- }
- }
- }
-
- return returnCode;
-}
-
-/*!
- * brief This function returns the last failed notification callback.
- *
- * This function returns an index of the last callback that failed during the configuration switch while
- * the last NOTIFIER_SwitchConfig() was called. If the last NOTIFIER_SwitchConfig() call ended successfully
- * value equal to callbacks number is returned. The returned value represents an index in the array of
- * static call-backs.
- *
- * param notifierHandle Pointer to the notifier handle
- * return Callback Index of the last failed callback or value equal to callbacks count.
- */
-uint8_t NOTIFIER_GetErrorCallbackIndex(notifier_handle_t *notifierHandle)
-{
- return notifierHandle->errorCallbackIndex;
-}
diff --git a/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_notifier.h b/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_notifier.h
deleted file mode 100755
index d93578c13f..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_notifier.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * Copyright (c) 2015, Freescale Semiconductor, Inc.
- * Copyright 2016-2017 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef _FSL_NOTIFIER_H_
-#define _FSL_NOTIFIER_H_
-
-#include "fsl_common.h"
-/*!
- * @addtogroup notifier
- * @{
- */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*!
- * @brief Notifier error codes.
- *
- * Used as return value of Notifier functions.
- */
-enum _notifier_status
-{
- kStatus_NOTIFIER_ErrorNotificationBefore =
- MAKE_STATUS(kStatusGroup_NOTIFIER, 0), /*!< An error occurs during send "BEFORE" notification. */
- kStatus_NOTIFIER_ErrorNotificationAfter =
- MAKE_STATUS(kStatusGroup_NOTIFIER, 1), /*!< An error occurs during send "AFTER" notification. */
-};
-
-/*!
- * @brief Notifier policies.
- *
- * Defines whether the user function execution is forced or not.
- * For kNOTIFIER_PolicyForcible, the user function is executed regardless of the callback results,
- * while kNOTIFIER_PolicyAgreement policy is used to exit NOTIFIER_SwitchConfig()
- * when any of the callbacks returns error code.
- * See also NOTIFIER_SwitchConfig() description.
- */
-typedef enum _notifier_policy
-{
- kNOTIFIER_PolicyAgreement, /*!< NOTIFIER_SwitchConfig() method is exited when any of the callbacks returns error
- code. */
- kNOTIFIER_PolicyForcible, /*!< The user function is executed regardless of the results. */
-} notifier_policy_t;
-
-/*! @brief Notification type. Used to notify registered callbacks */
-typedef enum _notifier_notification_type
-{
- kNOTIFIER_NotifyRecover = 0x00U, /*!< Notify IP to recover to previous work state. */
- kNOTIFIER_NotifyBefore = 0x01U, /*!< Notify IP that configuration setting is going to change. */
- kNOTIFIER_NotifyAfter = 0x02U, /*!< Notify IP that configuration setting has been changed. */
-} notifier_notification_type_t;
-
-/*!
- * @brief The callback type, which indicates kinds of notification the callback handles.
- *
- * Used in the callback configuration structure (notifier_callback_config_t)
- * to specify when the registered callback is called during configuration switch initiated by the
- * NOTIFIER_SwitchConfig().
- * Callback can be invoked in following situations.
- * - Before the configuration switch (Callback return value can affect NOTIFIER_SwitchConfig()
- * execution. See the NOTIFIER_SwitchConfig() and notifier_policy_t documentation).
- * - After an unsuccessful attempt to switch configuration
- * - After a successful configuration switch
- */
-typedef enum _notifier_callback_type
-{
- kNOTIFIER_CallbackBefore = 0x01U, /*!< Callback handles BEFORE notification. */
- kNOTIFIER_CallbackAfter = 0x02U, /*!< Callback handles AFTER notification. */
- kNOTIFIER_CallbackBeforeAfter = 0x03U, /*!< Callback handles BEFORE and AFTER notification. */
-} notifier_callback_type_t;
-
-/*! @brief Notifier user configuration type.
- *
- * Reference of the user defined configuration is stored in an array; the notifier switches between these configurations
- * based on this array.
- */
-typedef void notifier_user_config_t;
-
-/*! @brief Notifier user function prototype
- * Use this function to execute specific operations in configuration switch.
- * Before and after this function execution, different notification is sent to registered callbacks.
- * If this function returns any error code, NOTIFIER_SwitchConfig() exits.
- *
- * @param targetConfig target Configuration.
- * @param userData Refers to other specific data passed to user function.
- * @return An error code or kStatus_Success.
- */
-typedef status_t (*notifier_user_function_t)(notifier_user_config_t *targetConfig, void *userData);
-
-/*! @brief notification block passed to the registered callback function. */
-typedef struct _notifier_notification_block
-{
- notifier_user_config_t *targetConfig; /*!< Pointer to target configuration. */
- notifier_policy_t policy; /*!< Configure transition policy. */
- notifier_notification_type_t notifyType; /*!< Configure notification type. */
-} notifier_notification_block_t;
-
-/*!
- * @brief Callback prototype.
- *
- * Declaration of a callback. It is common for registered callbacks.
- * Reference to function of this type is part of the notifier_callback_config_t callback configuration structure.
- * Depending on callback type, function of this prototype is called (see NOTIFIER_SwitchConfig())
- * before configuration switch, after it or in both use cases to notify about
- * the switch progress (see notifier_callback_type_t). When called, the type of the notification
- * is passed as a parameter along with the reference to the target configuration structure (see
- * notifier_notification_block_t) and any data passed during the callback registration. When notified before the
- * configuration switch, depending on the configuration switch policy (see notifier_policy_t), the callback may deny the
- * execution of the user function by returning an error code different than kStatus_Success (see
- * NOTIFIER_SwitchConfig()).
- *
- * @param notify Notification block.
- * @param data Callback data. Refers to the data passed during callback registration. Intended to
- * pass any driver or application data such as internal state information.
- * @return An error code or kStatus_Success.
- */
-typedef status_t (*notifier_callback_t)(notifier_notification_block_t *notify, void *data);
-
-/*!
- * @brief Callback configuration structure.
- *
- * This structure holds the configuration of callbacks.
- * Callbacks of this type are expected to be statically allocated.
- * This structure contains the following application-defined data.
- * callback - pointer to the callback function
- * callbackType - specifies when the callback is called
- * callbackData - pointer to the data passed to the callback.
- */
-typedef struct _notifier_callback_config
-{
- notifier_callback_t callback; /*!< Pointer to the callback function. */
- notifier_callback_type_t callbackType; /*!< Callback type. */
- void *callbackData; /*!< Pointer to the data passed to the callback. */
-} notifier_callback_config_t;
-
-/*!
- * @brief Notifier handle structure.
- *
- * Notifier handle structure. Contains data necessary for the Notifier proper function.
- * Stores references to registered configurations, callbacks, information about their numbers,
- * user function, user data, and other internal data.
- * NOTIFIER_CreateHandle() must be called to initialize this handle.
- */
-typedef struct _notifier_handle
-{
- notifier_user_config_t **configsTable; /*!< Pointer to configure table. */
- uint8_t configsNumber; /*!< Number of configurations. */
- notifier_callback_config_t *callbacksTable; /*!< Pointer to callback table. */
- uint8_t callbacksNumber; /*!< Maximum number of callback configurations. */
- uint8_t errorCallbackIndex; /*!< Index of callback returns error. */
- uint8_t currentConfigIndex; /*!< Index of current configuration. */
- notifier_user_function_t userFunction; /*!< User function. */
- void *userData; /*!< User data passed to user function. */
-} notifier_handle_t;
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/*!
- * @brief Creates a Notifier handle.
- *
- * @param notifierHandle A pointer to the notifier handle.
- * @param configs A pointer to an array with references to all configurations which is handled by the Notifier.
- * @param configsNumber Number of configurations. Size of the configuration array.
- * @param callbacks A pointer to an array of callback configurations.
- * If there are no callbacks to register during Notifier initialization, use NULL value.
- * @param callbacksNumber Number of registered callbacks. Size of the callbacks array.
- * @param userFunction User function.
- * @param userData User data passed to user function.
- * @return An error Code or kStatus_Success.
- */
-status_t NOTIFIER_CreateHandle(notifier_handle_t *notifierHandle,
- notifier_user_config_t **configs,
- uint8_t configsNumber,
- notifier_callback_config_t *callbacks,
- uint8_t callbacksNumber,
- notifier_user_function_t userFunction,
- void *userData);
-
-/*!
- * @brief Switches the configuration according to a pre-defined structure.
- *
- * This function sets the system to the target configuration. Before transition,
- * the Notifier sends notifications to all callbacks registered to the callback table.
- * Callbacks are invoked in the following order: All registered callbacks are notified
- * ordered by index in the callbacks array. The same order is used for before and after switch notifications.
- * The notifications before the configuration switch can be used to obtain confirmation about
- * the change from registered callbacks. If any registered callback denies the
- * configuration change, further execution of this function depends on the notifier policy: the
- * configuration change is either forced (kNOTIFIER_PolicyForcible) or exited (kNOTIFIER_PolicyAgreement).
- * When configuration change is forced, the result of the before switch notifications are ignored. If an
- * agreement is required, if any callback returns an error code, further notifications
- * before switch notifications are cancelled and all already notified callbacks are re-invoked.
- * The index of the callback which returned error code during pre-switch notifications is stored
- * (any error codes during callbacks re-invocation are ignored) and NOTIFIER_GetErrorCallback() can be used to get it.
- * Regardless of the policies, if any callback returns an error code, an error code indicating in which phase
- * the error occurred is returned when NOTIFIER_SwitchConfig() exits.
- * @param notifierHandle pointer to notifier handle
- * @param configIndex Index of the target configuration.
- * @param policy Transaction policy, kNOTIFIER_PolicyAgreement or kNOTIFIER_PolicyForcible.
- *
- * @return An error code or kStatus_Success.
- *
- */
-status_t NOTIFIER_SwitchConfig(notifier_handle_t *notifierHandle, uint8_t configIndex, notifier_policy_t policy);
-
-/*!
- * @brief This function returns the last failed notification callback.
- *
- * This function returns an index of the last callback that failed during the configuration switch while
- * the last NOTIFIER_SwitchConfig() was called. If the last NOTIFIER_SwitchConfig() call ended successfully
- * value equal to callbacks number is returned. The returned value represents an index in the array of
- * static call-backs.
- *
- * @param notifierHandle Pointer to the notifier handle
- * @return Callback Index of the last failed callback or value equal to callbacks count.
- */
-uint8_t NOTIFIER_GetErrorCallbackIndex(notifier_handle_t *notifierHandle);
-
-#if defined(__cplusplus)
-}
-#endif /* __cplusplus */
-
-/*! @}*/
-
-#endif /* _FSL_NOTIFIER_H_ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_sbrk.c b/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_sbrk.c
deleted file mode 100755
index 9899c90b93..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_sbrk.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2015, Freescale Semiconductor, Inc.
- * Copyright 2016-2017 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-#if defined(__GNUC__)
-#include <stdio.h>
-#include <errno.h>
-#endif
-
-#if defined(__GNUC__)
-/*!
- * @brief Function to override ARMGCC default function _sbrk
- *
- * _sbrk is called by malloc. ARMGCC default _sbrk compares "SP" register and
- * heap end, if heap end is larger than "SP", then _sbrk returns error and
- * memory allocation failed. This function changes to compare __HeapLimit with
- * heap end.
- */
-caddr_t _sbrk(int incr)
-{
- extern char end __asm("end");
- extern char heap_limit __asm("__HeapLimit");
- static char *heap_end;
- char *prev_heap_end;
-
- if (heap_end == NULL)
- heap_end = &end;
-
- prev_heap_end = heap_end;
-
- if ((unsigned int)heap_end + incr > (unsigned int)(&heap_limit))
- {
- errno = ENOMEM;
- return (caddr_t)-1;
- }
-
- heap_end = (char *)((unsigned int)heap_end + incr);
-
- return (caddr_t)prev_heap_end;
-}
-#endif
diff --git a/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_shell.c b/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_shell.c
deleted file mode 100755
index d5394903aa..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_shell.c
+++ /dev/null
@@ -1,970 +0,0 @@
-/*
- * Copyright (c) 2015, Freescale Semiconductor, Inc.
- * Copyright 2016-2019 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * POSIX getopt for Windows
- * Code given out at the 1985 UNIFORUM conference in Dallas.
- *
- * From std-unix@ut-sally.UUCP (Moderator, John Quarterman) Sun Nov 3 14:34:15 1985
- * Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site gatech.CSNET
- * Posting-Version: version B 2.10.2 9/18/84; site ut-sally.UUCP
- * Path: gatech!akgua!mhuxv!mhuxt!mhuxr!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!ut-sally!std-unix
- * From: std-unix@ut-sally.UUCP (Moderator, John Quarterman)
- * Newsgroups: mod.std.unix
- * Subject: public domain AT&T getopt source
- * Message-ID: <3352@ut-sally.UUCP>
- * Date: 3 Nov 85 19:34:15 GMT
- * Date-Received: 4 Nov 85 12:25:09 GMT
- * Organization: IEEE/P1003 Portable Operating System Environment Committee
- * Lines: 91
- * Approved: jsq@ut-sally.UUC
- * Here's something you've all been waiting for: the AT&T public domain
- * source for getopt(3). It is the code which was given out at the 1985
- * UNIFORUM conference in Dallas. I obtained it by electronic mail
- * directly from AT&T. The people there assure me that it is indeed
- * in the public domain
- * There is no manual page. That is because the one they gave out at
- * UNIFORUM was slightly different from the current System V Release 2
- * manual page. The difference apparently involved a note about the
- * famous rules 5 and 6, recommending using white space between an option
- * and its first argument, and not grouping options that have arguments.
- * Getopt itself is currently lenient about both of these things White
- * space is allowed, but not mandatory, and the last option in a group can
- * have an argument. That particular version of the man page evidently
- * has no official existence, and my source at AT&T did not send a copy.
- * The current SVR2 man page reflects the actual behavor of this getopt.
- * However, I am not about to post a copy of anything licensed by AT&T.
- */
-
-#include <assert.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include "fsl_str.h"
-
-#include "generic_list.h"
-#include "serial_manager.h"
-
-#include "fsl_shell.h"
-
-/*
- * The OSA_USED macro can only be defined when the OSA component is used.
- * If the source code of the OSA component does not exist, the OSA_USED cannot be defined.
- * OR, If OSA component is not added into project event the OSA source code exists, the OSA_USED
- * also cannot be defined.
- * The source code path of the OSA component is <MCUXpresso_SDK>/components/osa.
- *
- */
-#if defined(OSA_USED)
-
-#if (defined(SHELL_USE_COMMON_TASK) && (SHELL_USE_COMMON_TASK > 0U))
-#include "common_task.h"
-#else
-#include "fsl_os_abstraction.h"
-#endif
-
-#endif
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-#define KEY_ESC (0x1BU)
-#define KET_DEL (0x7FU)
-
-#define SHELL_EVENT_DATA_ARRIVED (1U << 0)
-#define SHELL_EVENT_DATA_SENT (1U << 1)
-
-#define SHELL_SPRINTF_BUFFER_SIZE (64U)
-
-/*! @brief A type for the handle special key. */
-typedef enum _fun_key_status
-{
- kSHELL_Normal = 0U, /*!< Normal key */
- kSHELL_Special = 1U, /*!< Special key */
- kSHELL_Function = 2U, /*!< Function key */
-} fun_key_status_t;
-
-/*! @brief Data structure for Shell environment. */
-typedef struct _shell_context_handle
-{
- list_label_t commandContextListHead; /*!< Command shellContextHandle list queue head */
- serial_handle_t serialHandle; /*!< Serial manager handle */
- uint8_t
- serialWriteHandleBuffer[SERIAL_MANAGER_WRITE_HANDLE_SIZE]; /*!< The buffer for serial manager write handle */
- serial_write_handle_t serialWriteHandle; /*!< The serial manager write handle */
- uint8_t serialReadHandleBuffer[SERIAL_MANAGER_READ_HANDLE_SIZE]; /*!< The buffer for serial manager read handle */
- serial_read_handle_t serialReadHandle; /*!< The serial manager read handle */
- char *prompt; /*!< Prompt string */
-#if (defined(SHELL_NON_BLOCKING_MODE) && (SHELL_NON_BLOCKING_MODE > 0U))
-
-#if defined(OSA_USED)
-
-#if (defined(SHELL_USE_COMMON_TASK) && (SHELL_USE_COMMON_TASK > 0U))
- common_task_message_t commontaskMsg; /*!< Message for common task */
-#else
- uint8_t event[OSA_EVENT_HANDLE_SIZE]; /*!< Event instance */
- uint8_t taskId[OSA_TASK_HANDLE_SIZE]; /*!< Task handle */
-#endif
-
-#endif
-
-#endif
- char line[SHELL_BUFFER_SIZE]; /*!< Consult buffer */
- char hist_buf[SHELL_HISTORY_COUNT][SHELL_BUFFER_SIZE]; /*!< History buffer*/
- char printBuffer[SHELL_SPRINTF_BUFFER_SIZE]; /*!< Buffer for print */
- uint32_t printLength; /*!< All length has been printed */
- uint16_t hist_current; /*!< Current history command in hist buff*/
- uint16_t hist_count; /*!< Total history command in hist buff*/
- enum _fun_key_status stat; /*!< Special key status */
- uint8_t cmd_num; /*!< Number of user commands */
- uint8_t l_pos; /*!< Total line position */
- uint8_t c_pos; /*!< Current line position */
- volatile uint8_t notificationPost; /*!< The serial manager notification is post */
- uint8_t exit; /*!< Exit Flag*/
- uint8_t printBusy; /*!< Print is busy */
-} shell_context_handle_t;
-
-#define SHELL_STRUCT_OFFSET(type, field) ((size_t) & (((type *)0)->field))
-#define SHEEL_COMMAND_POINTER(node) ((shell_command_t *)(((uint32_t)node) - SHELL_STRUCT_OFFSET(shell_command_t, link)))
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-static shell_status_t SHELL_HelpCommand(shell_handle_t shellHandle, int32_t argc, char **argv); /*!< help command */
-
-static shell_status_t SHELL_ExitCommand(shell_handle_t shellHandle, int32_t argc, char **argv); /*!< exit command */
-
-static int32_t SHELL_ParseLine(const char *cmd, uint32_t len, char *argv[]); /*!< parse line command */
-
-static int32_t SHELL_StringCompare(const char *str1, const char *str2, int32_t count); /*!< compare string command */
-
-static void SHELL_ProcessCommand(shell_context_handle_t *shellContextHandle, const char *cmd); /*!< process a command */
-
-static void SHELL_GetHistoryCommand(shell_context_handle_t *shellContextHandle,
- uint8_t hist_pos); /*!< get commands history */
-
-static void SHELL_AutoComplete(shell_context_handle_t *shellContextHandle); /*!< auto complete command */
-
-static shell_status_t SHELL_GetChar(shell_context_handle_t *shellContextHandle,
- uint8_t *ch); /*!< get a char from communication interface */
-
-#if (defined(SHELL_NON_BLOCKING_MODE) && (SHELL_NON_BLOCKING_MODE > 0U))
-static void SHELL_Task(void *param); /*!< Shell task*/
-#endif
-
-/*******************************************************************************
- * Variables
- ******************************************************************************/
-
-static SHELL_COMMAND_DEFINE(help, "\r\n\"help\": List all the registered commands\r\n", SHELL_HelpCommand, 0);
-static SHELL_COMMAND_DEFINE(exit, "\r\n\"exit\": Exit program\r\n", SHELL_ExitCommand, 0);
-
-static char s_paramBuffer[SHELL_BUFFER_SIZE];
-
-#if (defined(SHELL_NON_BLOCKING_MODE) && (SHELL_NON_BLOCKING_MODE > 0U))
-
-#if defined(OSA_USED)
-
-#if (defined(SHELL_USE_COMMON_TASK) && (SHELL_USE_COMMON_TASK > 0U))
-
-#else
-/*
- * \brief Defines the serial manager task's stack
- */
-OSA_TASK_DEFINE(SHELL_Task, SHELL_TASK_PRIORITY, 1, SHELL_TASK_STACK_SIZE, false);
-#endif
-
-#endif
-
-#endif
-/*******************************************************************************
- * Code
- ******************************************************************************/
-
-#if (defined(SHELL_NON_BLOCKING_MODE) && (SHELL_NON_BLOCKING_MODE > 0U))
-static void SHELL_SerialManagerRxCallback(void *callbackParam,
- serial_manager_callback_message_t *message,
- serial_manager_status_t status)
-{
- shell_context_handle_t *shellHandle;
-
- assert(callbackParam);
- assert(message);
-
- shellHandle = (shell_context_handle_t *)callbackParam;
-
- if (!shellHandle->notificationPost)
- {
- shellHandle->notificationPost = 1U;
-#if defined(OSA_USED)
-
-#if (defined(SHELL_USE_COMMON_TASK) && (SHELL_USE_COMMON_TASK > 0U))
- shellHandle->commontaskMsg.callback = SHELL_Task;
- shellHandle->commontaskMsg.callbackParam = shellHandle;
- COMMON_TASK_post_message(&shellHandle->commontaskMsg);
-#else
- (void)OSA_EventSet((osa_event_handle_t)shellHandle->event, SHELL_EVENT_DATA_ARRIVED);
-#endif
-
-#else
- SHELL_Task(shellHandle);
-#endif
- }
-}
-#endif
-
-static void SHELL_WriteBuffer(char *buffer, int32_t *indicator, char val, int len)
-{
- shell_context_handle_t *shellContextHandle;
- int i = 0;
- shellContextHandle = (shell_context_handle_t *)buffer;
-
- for (i = 0; i < len; i++)
- {
- if ((uint32_t)(*indicator + 1) >= SHELL_SPRINTF_BUFFER_SIZE)
- {
- (void)SerialManager_WriteBlocking(shellContextHandle->serialWriteHandle,
- (uint8_t *)shellContextHandle->printBuffer, (uint32_t)*indicator);
- shellContextHandle->printLength += (uint32_t)*indicator;
- *indicator = 0;
- }
-
- shellContextHandle->printBuffer[*indicator] = val;
- (*indicator)++;
- }
-}
-
-static int SHELL_Sprintf(void *buffer, const char *formatString, va_list ap)
-{
- shell_context_handle_t *shellContextHandle;
- uint32_t length;
- shellContextHandle = (shell_context_handle_t *)buffer;
-
- length = (uint32_t)StrFormatPrintf(formatString, ap, (char *)buffer, SHELL_WriteBuffer);
- shellContextHandle->printLength += length;
- return (int32_t)length;
-}
-
-#if (defined(SHELL_NON_BLOCKING_MODE) && (SHELL_NON_BLOCKING_MODE > 0U))
-static void SHELL_Task(void *param)
-#else
-void SHELL_Task(shell_handle_t shellHandle)
-#endif
-{
-#if (defined(SHELL_NON_BLOCKING_MODE) && (SHELL_NON_BLOCKING_MODE > 0U))
- shell_context_handle_t *shellContextHandle = (shell_context_handle_t *)param;
-#else
- shell_context_handle_t *shellContextHandle = (shell_context_handle_t *)shellHandle;
-#endif
- uint8_t ch;
-
- if (NULL != shellContextHandle)
- {
-#if (defined(SHELL_NON_BLOCKING_MODE) && (SHELL_NON_BLOCKING_MODE > 0U))
-
-#if defined(OSA_USED)
-
-#if (defined(SHELL_USE_COMMON_TASK) && (SHELL_USE_COMMON_TASK > 0U))
-#else
- osa_event_flags_t ev = 0;
-
- do
- {
- if (KOSA_StatusSuccess == OSA_EventWait((osa_event_handle_t)shellContextHandle->event, osaEventFlagsAll_c,
- false, osaWaitForever_c, &ev))
- {
- if (ev & SHELL_EVENT_DATA_ARRIVED)
-#endif
-
-#endif
-
-#endif
- {
- shellContextHandle->notificationPost = 0;
- do
- {
- if ((bool)shellContextHandle->exit)
- {
- if (shellContextHandle->serialReadHandle != NULL)
- {
- (void)SerialManager_CloseReadHandle(shellContextHandle->serialReadHandle);
- shellContextHandle->serialReadHandle = NULL;
- }
- if (shellContextHandle->serialWriteHandle != NULL)
- {
- (void)SerialManager_CloseWriteHandle(shellContextHandle->serialWriteHandle);
- shellContextHandle->serialWriteHandle = NULL;
- }
- break;
- }
- if (kStatus_SHELL_Success != (shell_status_t)SHELL_GetChar(shellContextHandle, &ch))
- {
- /* If error occurred when getting a char, exit the task and waiting the new data arriving. */
- break;
- }
-
- /* Special key */
- if (ch == KEY_ESC)
- {
- shellContextHandle->stat = kSHELL_Special;
- continue;
- }
- else if (shellContextHandle->stat == kSHELL_Special)
- {
- /* Function key */
- if ((char)ch == '[')
- {
- shellContextHandle->stat = kSHELL_Function;
- continue;
- }
- shellContextHandle->stat = kSHELL_Normal;
- }
- else if (shellContextHandle->stat == kSHELL_Function)
- {
- shellContextHandle->stat = kSHELL_Normal;
-
- switch ((uint8_t)ch)
- {
- /* History operation here */
- case 'A': /* Up key */
- SHELL_GetHistoryCommand(shellContextHandle, (uint8_t)shellContextHandle->hist_current);
- if (shellContextHandle->hist_current < (shellContextHandle->hist_count - 1U))
- {
- shellContextHandle->hist_current++;
- }
- break;
- case 'B': /* Down key */
- SHELL_GetHistoryCommand(shellContextHandle, (uint8_t)shellContextHandle->hist_current);
- if (shellContextHandle->hist_current > 0U)
- {
- shellContextHandle->hist_current--;
- }
- break;
- case 'D': /* Left key */
- if ((bool)shellContextHandle->c_pos)
- {
- (void)SHELL_Write(shellContextHandle, "\b", 1);
- shellContextHandle->c_pos--;
- }
- break;
- case 'C': /* Right key */
- if (shellContextHandle->c_pos < shellContextHandle->l_pos)
- {
- (void)SHELL_Write(shellContextHandle,
- &shellContextHandle->line[shellContextHandle->c_pos], 1);
- shellContextHandle->c_pos++;
- }
- break;
- default:
- break;
- }
- continue;
- }
- /* Handle tab key */
- else if ((char)ch == '\t')
- {
-#if SHELL_AUTO_COMPLETE
- /* Move the cursor to the beginning of line */
- int i;
- for (i = 0; i < shellContextHandle->c_pos; i++)
- {
- (void)SHELL_Write(shellContextHandle, "\b", 1);
- }
- /* Do auto complete */
- SHELL_AutoComplete(shellContextHandle);
- /* Move position to end */
- shellContextHandle->c_pos = shellContextHandle->l_pos = (uint8_t)strlen(shellContextHandle->line);
-#endif
- continue;
- }
- /* Handle backspace key */
- else if ((ch == KET_DEL) || ((char)ch == '\b'))
- {
- /* There must be at last one char */
- if (shellContextHandle->c_pos == 0U)
- {
- continue;
- }
-
- shellContextHandle->l_pos--;
- shellContextHandle->c_pos--;
-
- if (shellContextHandle->l_pos > shellContextHandle->c_pos)
- {
- (void)memmove(&shellContextHandle->line[shellContextHandle->c_pos],
- &shellContextHandle->line[shellContextHandle->c_pos + 1U],
- shellContextHandle->l_pos - shellContextHandle->c_pos);
- shellContextHandle->line[shellContextHandle->l_pos] = 0U;
- (void)SHELL_Write(shellContextHandle, "\b", 1);
- (void)SHELL_Write(shellContextHandle, &shellContextHandle->line[shellContextHandle->c_pos],
- strlen(&shellContextHandle->line[shellContextHandle->c_pos]));
- (void)SHELL_Write(shellContextHandle, " \b", 3);
-
- /* Reset position */
- int i;
- for (i = shellContextHandle->c_pos; i <= shellContextHandle->l_pos; i++)
- {
- (void)SHELL_Write(shellContextHandle, "\b", 1);
- }
- }
- else /* Normal backspace operation */
- {
- (void)SHELL_Write(shellContextHandle, "\b \b", 3);
- shellContextHandle->line[shellContextHandle->l_pos] = 0U;
- }
- continue;
- }
- else
- {
- }
-
- /* Input too long */
- if (shellContextHandle->l_pos >= (SHELL_BUFFER_SIZE - 1U))
- {
- shellContextHandle->l_pos = 0;
- }
-
- /* Handle end of line, break */
- if (((char)ch == '\r') || ((char)ch == '\n'))
- {
- static char endoflinechar = 0U;
-
- if (((uint8_t)endoflinechar != 0U) && ((uint8_t)endoflinechar != ch))
- {
- continue;
- }
- else
- {
- endoflinechar = (char)ch;
- (void)SHELL_Write(shellContextHandle, "\r\n", 2);
- /* If command line is NULL, will start a new transfer */
- if (0U == strlen(shellContextHandle->line))
- {
- (void)SHELL_Write(shellContextHandle, shellContextHandle->prompt,
- strlen(shellContextHandle->prompt));
- continue;
- }
- SHELL_ProcessCommand(shellContextHandle, shellContextHandle->line);
- /* Reset all params */
- shellContextHandle->c_pos = shellContextHandle->l_pos = 0;
- shellContextHandle->hist_current = 0;
- (void)SHELL_Write(shellContextHandle, shellContextHandle->prompt,
- strlen(shellContextHandle->prompt));
- memset(shellContextHandle->line, 0, sizeof(shellContextHandle->line));
- continue;
- }
- }
-
- /* Normal character */
- if (shellContextHandle->c_pos < shellContextHandle->l_pos)
- {
- (void)memmove(&shellContextHandle->line[shellContextHandle->c_pos + 1U],
- &shellContextHandle->line[shellContextHandle->c_pos],
- shellContextHandle->l_pos - shellContextHandle->c_pos);
- shellContextHandle->line[shellContextHandle->c_pos] = (char)ch;
- (void)SHELL_Write(shellContextHandle, &shellContextHandle->line[shellContextHandle->c_pos],
- strlen(&shellContextHandle->line[shellContextHandle->c_pos]));
- /* Move the cursor to new position */
- int i;
- for (i = shellContextHandle->c_pos; i < shellContextHandle->l_pos; i++)
- {
- (void)SHELL_Write(shellContextHandle, "\b", 1);
- }
- }
- else
- {
- shellContextHandle->line[shellContextHandle->l_pos] = (char)ch;
- (void)SHELL_Write(shellContextHandle, &shellContextHandle->line[shellContextHandle->l_pos], 1);
- }
-
- ch = 0;
- shellContextHandle->l_pos++;
- shellContextHandle->c_pos++;
- } while (!shellContextHandle->exit);
- }
-#if (defined(SHELL_NON_BLOCKING_MODE) && (SHELL_NON_BLOCKING_MODE > 0U))
-
-#if defined(OSA_USED)
-
-#if (defined(SHELL_USE_COMMON_TASK) && (SHELL_USE_COMMON_TASK > 0U))
-#else
- }
- } while (gUseRtos_c);
-#endif
-
-#endif
-
-#endif
- }
-}
-
-static shell_status_t SHELL_HelpCommand(shell_handle_t shellHandle, int32_t argc, char **argv)
-{
- shell_context_handle_t *shellContextHandle = (shell_context_handle_t *)shellHandle;
- shell_command_t *shellCommandContextHandle;
- list_element_handle_t p = LIST_GetHead(&shellContextHandle->commandContextListHead);
-
- while (p != NULL)
- {
- shellCommandContextHandle = SHEEL_COMMAND_POINTER(p);
- if ((shellCommandContextHandle->pcHelpString != NULL) && (bool)strlen(shellCommandContextHandle->pcHelpString))
- {
- (void)SHELL_Write(shellContextHandle, shellCommandContextHandle->pcHelpString,
- strlen(shellCommandContextHandle->pcHelpString));
- }
-
- p = LIST_GetNext(p);
- }
- return kStatus_SHELL_Success;
-}
-
-static shell_status_t SHELL_ExitCommand(shell_handle_t shellHandle, int32_t argc, char **argv)
-{
- shell_context_handle_t *shellContextHandle = (shell_context_handle_t *)shellHandle;
- /* Skip warning */
- (void)SHELL_Write(shellContextHandle, "\r\nSHELL exited\r\n", strlen("\r\nSHELL exited\r\n"));
- shellContextHandle->exit = (uint8_t) true;
- return kStatus_SHELL_Success;
-}
-
-static void SHELL_ProcessCommand(shell_context_handle_t *shellContextHandle, const char *cmd)
-{
- shell_command_t *tmpCommand = NULL;
- const char *tmpCommandString;
- int32_t argc;
- char *argv[SHELL_BUFFER_SIZE];
- list_element_handle_t p;
- uint8_t flag = 1;
- uint8_t tmpCommandLen;
- uint8_t tmpLen;
- uint8_t i = 0;
-
- tmpLen = (uint8_t)strlen(cmd);
- argc = SHELL_ParseLine(cmd, tmpLen, argv);
-
- if ((argc > 0))
- {
- p = LIST_GetHead(&shellContextHandle->commandContextListHead);
- while (p != NULL)
- {
- tmpCommand = SHEEL_COMMAND_POINTER(p);
- tmpCommandString = tmpCommand->pcCommand;
- tmpCommandLen = (uint8_t)strlen(tmpCommandString);
- /* Compare with space or end of string */
- if ((cmd[tmpCommandLen] == ' ') || (cmd[tmpCommandLen] == (char)0x00))
- {
- if (SHELL_StringCompare(tmpCommandString, argv[0], (uint32_t)tmpCommandLen) == 0)
- {
- /* support commands with optional number of parameters */
- if (tmpCommand->cExpectedNumberOfParameters == (uint8_t)SHELL_IGNORE_PARAMETER_COUNT)
- {
- flag = 0;
- }
- else if ((tmpCommand->cExpectedNumberOfParameters == 0U) && (argc == 1))
- {
- flag = 0;
- }
- else if (tmpCommand->cExpectedNumberOfParameters > 0U)
- {
- if ((argc - 1U) == tmpCommand->cExpectedNumberOfParameters)
- {
- flag = 0;
- }
- }
- else
- {
- flag = 1;
- }
- break;
- }
- }
- p = LIST_GetNext(p);
- }
- if (NULL == p)
- {
- tmpCommand = NULL;
- }
- }
-
- if ((tmpCommand != NULL) && (flag == 1U))
- {
- (void)SHELL_Write(
- shellContextHandle,
- "\r\nIncorrect command parameter(s). Enter \"help\" to view a list of available commands.\r\n\r\n",
- strlen(
- "\r\nIncorrect command parameter(s). Enter \"help\" to view a list of available commands.\r\n\r\n"));
- tmpCommand = NULL;
- }
- else if (tmpCommand != NULL)
- {
- tmpLen = (uint8_t)strlen(cmd);
- /* Compare with last command. Push back to history buffer if different */
- if (tmpLen != (uint8_t)SHELL_StringCompare(cmd, shellContextHandle->hist_buf[0], (int32_t)strlen(cmd)))
- {
- for (i = SHELL_HISTORY_COUNT - 1U; i > 0U; i--)
- {
- (void)memset(shellContextHandle->hist_buf[i], '\0', SHELL_BUFFER_SIZE);
- tmpLen = (uint8_t)strlen(shellContextHandle->hist_buf[i - 1U]);
- (void)memcpy(shellContextHandle->hist_buf[i], shellContextHandle->hist_buf[i - 1U], tmpLen);
- }
- (void)memset(shellContextHandle->hist_buf[0], '\0', SHELL_BUFFER_SIZE);
- tmpLen = (uint8_t)strlen(cmd);
- (void)memcpy(shellContextHandle->hist_buf[0], cmd, tmpLen);
- if (shellContextHandle->hist_count < SHELL_HISTORY_COUNT)
- {
- shellContextHandle->hist_count++;
- }
- }
- tmpCommand->pFuncCallBack(shellContextHandle, argc, argv);
- tmpCommand = NULL;
- }
- else
- {
- (void)SHELL_Write(
- shellContextHandle,
- "\r\nCommand not recognized. Enter 'help' to view a list of available commands.\r\n\r\n",
- strlen("\r\nCommand not recognized. Enter 'help' to view a list of available commands.\r\n\r\n"));
- tmpCommand = NULL;
- }
-}
-
-static void SHELL_GetHistoryCommand(shell_context_handle_t *shellContextHandle, uint8_t hist_pos)
-{
- uint8_t i;
- uint32_t tmp;
-
- if (shellContextHandle->hist_buf[0][0] == '\0')
- {
- shellContextHandle->hist_current = 0;
- return;
- }
-
-#if 0 /*hist_pos is passed from hist_current. And hist_current is only changed in case 'A'/'B',as hist_count is 3 \
- most, it can't be more than 3 */
- if (hist_pos >= SHELL_HISTORY_COUNT)
- {
- hist_pos = SHELL_HISTORY_COUNT - 1U;
- }
-#endif
-
- tmp = strlen(shellContextHandle->line);
- /* Clear current if have */
- if (tmp > 0U)
- {
- (void)memset(shellContextHandle->line, '\0', tmp);
- for (i = 0; i < tmp; i++)
- {
- (void)SHELL_Write(shellContextHandle, "\b \b", 3);
- }
- }
-
- shellContextHandle->l_pos = (uint8_t)strlen(shellContextHandle->hist_buf[hist_pos]);
- shellContextHandle->c_pos = shellContextHandle->l_pos;
- (void)memcpy(shellContextHandle->line, shellContextHandle->hist_buf[hist_pos], shellContextHandle->l_pos);
- (void)SHELL_Write(shellContextHandle, shellContextHandle->hist_buf[hist_pos],
- strlen(shellContextHandle->hist_buf[hist_pos]));
-}
-
-static void SHELL_AutoComplete(shell_context_handle_t *shellContextHandle)
-{
- int32_t minLen;
- list_element_handle_t p;
- shell_command_t *tmpCommand = NULL;
- const char *namePtr;
- const char *cmdName;
-
- minLen = SHELL_BUFFER_SIZE;
- namePtr = NULL;
-
- /* Empty tab, list all commands */
- if (shellContextHandle->line[0] == '\0')
- {
- (void)SHELL_HelpCommand(shellContextHandle, 0, NULL);
- return;
- }
-
- SHELL_Write(shellContextHandle, "\r\n", 2);
-
- /* Do auto complete */
- p = LIST_GetHead(&shellContextHandle->commandContextListHead);
- while (p != NULL)
- {
- tmpCommand = SHEEL_COMMAND_POINTER(p);
- cmdName = tmpCommand->pcCommand;
- if (SHELL_StringCompare(shellContextHandle->line, cmdName, (int32_t)strlen(shellContextHandle->line)) == 0)
- {
- /* Show possible matches */
- SHELL_Printf(shellContextHandle, "%s\r\n", (char *)cmdName);
- if (minLen > ((int32_t)strlen(cmdName)))
- {
- namePtr = cmdName;
- minLen = (int32_t)strlen(namePtr);
- }
- }
- p = LIST_GetNext(p);
- }
- /* Auto complete string */
- if (namePtr != NULL)
- {
- (void)memcpy(shellContextHandle->line, namePtr, (uint32_t)minLen);
- }
- (void)SHELL_Write(shellContextHandle, shellContextHandle->prompt, strlen(shellContextHandle->prompt));
- (void)SHELL_Write(shellContextHandle, shellContextHandle->line, strlen(shellContextHandle->line));
- return;
-}
-
-static int32_t SHELL_StringCompare(const char *str1, const char *str2, int32_t count)
-{
- while ((bool)(count--))
- {
- if (*str1++ != *str2++)
- {
- return (int32_t) * (unsigned char *)(str1 - 1) - *(unsigned char *)(str2 - 1);
- }
- }
- return 0;
-}
-
-static int32_t SHELL_ParseLine(const char *cmd, uint32_t len, char *argv[])
-{
- uint32_t argc;
- char *p;
- uint32_t position;
-
- /* Init params */
- (void)memset(s_paramBuffer, '\0', len + 1U);
- (void)memcpy(s_paramBuffer, cmd, len);
-
- p = s_paramBuffer;
- position = 0;
- argc = 0;
-
- while (position < len)
- {
- /* Skip all blanks */
- while ((position < len) && ((char)(*p) == ' '))
- {
- *p = '\0';
- p++;
- position++;
- }
-
- if (position >= len)
- {
- break;
- }
-
- /* Process begin of a string */
- if (*p == '"')
- {
- p++;
- position++;
- argv[argc] = p;
- argc++;
- /* Skip this string */
- while ((*p != '"') && (position < len))
- {
- p++;
- position++;
- }
- /* Skip '"' */
- *p = '\0';
- p++;
- position++;
- }
- else /* Normal char */
- {
- argv[argc] = p;
- argc++;
- while (((char)*p != ' ') && (position < len))
- {
- p++;
- position++;
- }
- }
- }
- return (int32_t)argc;
-}
-
-static shell_status_t SHELL_GetChar(shell_context_handle_t *shellContextHandle, uint8_t *ch)
-{
-#if (defined(SHELL_NON_BLOCKING_MODE) && (SHELL_NON_BLOCKING_MODE > 0U))
- uint32_t length = 0;
-
- SerialManager_TryRead(shellContextHandle->serialReadHandle, ch, 1, &length);
-
- if (length > 0)
- {
- return kStatus_SHELL_Success;
- }
- else
- {
- return kStatus_SHELL_Error;
- }
-#else
- return (shell_status_t)SerialManager_ReadBlocking(shellContextHandle->serialReadHandle, ch, 1);
-#endif
-}
-
-shell_status_t SHELL_Init(shell_handle_t shellHandle, serial_handle_t serialHandle, char *prompt)
-{
- shell_context_handle_t *shellContextHandle;
- serial_manager_status_t status = kStatus_SerialManager_Error;
- (void)status;
-
- assert(shellHandle);
- assert(serialHandle);
- assert(prompt);
-
- if (SHELL_HANDLE_SIZE < sizeof(shell_context_handle_t))
- {
- return kStatus_SHELL_Error;
- }
-
- shellContextHandle = (shell_context_handle_t *)shellHandle;
-
- /* memory set for shellHandle */
- (void)memset(shellHandle, 0, SHELL_HANDLE_SIZE);
-
-#if (defined(SHELL_NON_BLOCKING_MODE) && (SHELL_NON_BLOCKING_MODE > 0U))
-
-#if defined(OSA_USED)
-
-#if (defined(SHELL_USE_COMMON_TASK) && (SHELL_USE_COMMON_TASK > 0U))
- COMMON_TASK_init();
-#else
- if (KOSA_StatusSuccess != OSA_EventCreate((osa_event_handle_t)shellContextHandle->event, true))
- {
- return kStatus_SHELL_Error;
- }
-
- if (KOSA_StatusSuccess !=
- OSA_TaskCreate((osa_task_handle_t)shellContextHandle->taskId, OSA_TASK(SHELL_Task), shellContextHandle))
- {
- return kStatus_SHELL_Error;
- }
-#endif
-
-#endif
-
-#endif
-
- shellContextHandle->prompt = prompt;
- shellContextHandle->serialHandle = serialHandle;
-
- shellContextHandle->serialWriteHandle = (serial_write_handle_t)&shellContextHandle->serialWriteHandleBuffer[0];
- status = SerialManager_OpenWriteHandle(shellContextHandle->serialHandle, shellContextHandle->serialWriteHandle);
- assert(kStatus_SerialManager_Success == status);
-
- shellContextHandle->serialReadHandle = (serial_read_handle_t)&shellContextHandle->serialReadHandleBuffer[0];
- status = SerialManager_OpenReadHandle(shellContextHandle->serialHandle, shellContextHandle->serialReadHandle);
- assert(kStatus_SerialManager_Success == status);
-
-#if (defined(SHELL_NON_BLOCKING_MODE) && (SHELL_NON_BLOCKING_MODE > 0U))
- SerialManager_InstallRxCallback(shellContextHandle->serialReadHandle, SHELL_SerialManagerRxCallback,
- shellContextHandle);
-#endif
-
- (void)SHELL_RegisterCommand(shellContextHandle, SHELL_COMMAND(help));
- (void)SHELL_RegisterCommand(shellContextHandle, SHELL_COMMAND(exit));
-
- (void)SHELL_Write(shellContextHandle, "\r\nSHELL build: ", strlen("\r\nSHELL build: "));
- (void)SHELL_Write(shellContextHandle, __DATE__, strlen(__DATE__));
- (void)SHELL_Write(shellContextHandle, "\r\nCopyright 2018 NXP\r\n", strlen("\r\nCopyright 2018 NXP\r\n"));
- (void)SHELL_Write(shellContextHandle, shellContextHandle->prompt, strlen(shellContextHandle->prompt));
-
- return kStatus_SHELL_Success;
-}
-
-shell_status_t SHELL_RegisterCommand(shell_handle_t shellHandle, shell_command_t *command)
-{
- shell_context_handle_t *shellContextHandle = (shell_context_handle_t *)shellHandle;
- assert(shellHandle);
- assert(command);
-
- /* memory set for shellHandle */
- (void)memset(&command->link, 0, sizeof(command->link));
-
- (void)LIST_AddTail(&shellContextHandle->commandContextListHead, &command->link);
-
- return kStatus_SHELL_Success;
-}
-
-shell_status_t SHELL_UnregisterCommand(shell_command_t *command)
-{
- assert(command);
-
- (void)LIST_RemoveElement(&command->link);
-
- /* memory set for shellHandle */
- (void)memset(&command->link, 0, sizeof(command->link));
-
- return kStatus_SHELL_Success;
-}
-
-shell_status_t SHELL_Write(shell_handle_t shellHandle, char *buffer, uint32_t length)
-{
- shell_context_handle_t *shellContextHandle;
- uint32_t primask;
- shell_status_t status = kStatus_SHELL_Error;
-
- assert(shellHandle);
- assert(buffer);
-
- if (!(bool)length)
- {
- return kStatus_SHELL_Success;
- }
-
- shellContextHandle = (shell_context_handle_t *)shellHandle;
-
- primask = DisableGlobalIRQ();
- if ((bool)shellContextHandle->printBusy)
- {
- EnableGlobalIRQ(primask);
- return kStatus_SHELL_Error;
- }
- shellContextHandle->printBusy = 1U;
- EnableGlobalIRQ(primask);
-
- status =
- (shell_status_t)SerialManager_WriteBlocking(shellContextHandle->serialWriteHandle, (uint8_t *)buffer, length);
-
- shellContextHandle->printBusy = 0U;
-
- return status;
-}
-
-int SHELL_Printf(shell_handle_t shellHandle, const char *formatString, ...)
-{
- shell_context_handle_t *shellContextHandle;
- uint32_t length;
- uint32_t primask;
- va_list ap;
-
- assert(shellHandle);
- assert(formatString);
-
- shellContextHandle = (shell_context_handle_t *)shellHandle;
-
- primask = DisableGlobalIRQ();
- if ((bool)shellContextHandle->printBusy)
- {
- EnableGlobalIRQ(primask);
- return -1;
- }
- shellContextHandle->printBusy = 1U;
- EnableGlobalIRQ(primask);
-
- va_start(ap, formatString);
-
- shellContextHandle->printLength = 0U;
- length = (uint32_t)SHELL_Sprintf(shellHandle, formatString, ap);
- (void)SerialManager_WriteBlocking(shellContextHandle->serialWriteHandle, (uint8_t *)shellContextHandle->printBuffer,
- length);
- va_end(ap);
-
- shellContextHandle->printBusy = 0U;
- return (int32_t)shellContextHandle->printLength;
-}
diff --git a/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_shell.h b/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_shell.h
deleted file mode 100755
index 9eaf951ff0..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/utilities/fsl_shell.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (c) 2015, Freescale Semiconductor, Inc.
- * Copyright 2016-2019 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef __FSL_SHELL_H__
-#define __FSL_SHELL_H__
-
-/*!
- * @addtogroup SHELL
- * @{
- */
-
-#include "fsl_common.h"
-#include "serial_manager.h"
-#include "generic_list.h"
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*! @brief Whether use non-blocking mode. */
-#ifndef SHELL_NON_BLOCKING_MODE
-#define SHELL_NON_BLOCKING_MODE SERIAL_MANAGER_NON_BLOCKING_MODE
-#endif
-
-/*! @brief Macro to set on/off auto-complete feature. */
-#define SHELL_AUTO_COMPLETE (1U)
-
-/*! @brief Macro to set console buffer size. */
-#define SHELL_BUFFER_SIZE (64U)
-
-/*! @brief Macro to set maximum arguments in command. */
-#define SHELL_MAX_ARGS (8U)
-
-/*! @brief Macro to set maximum count of history commands. */
-#define SHELL_HISTORY_COUNT (3U)
-
-/*! @brief Macro to bypass arguments check */
-#define SHELL_IGNORE_PARAMETER_COUNT (0xFF)
-
-/*! @brief The handle size of the shell module. It is the sum of the SHELL_HISTORY_COUNT * SHELL_BUFFER_SIZE +
- * SHELL_BUFFER_SIZE + SERIAL_MANAGER_READ_HANDLE_SIZE + SERIAL_MANAGER_WRITE_HANDLE_SIZE*/
-#define SHELL_HANDLE_SIZE (520U)
-
-#define SHELL_USE_COMMON_TASK (1U)
-#define SHELL_TASK_PRIORITY (2U)
-#define SHELL_TASK_STACK_SIZE (1000U)
-
-typedef enum _shell_status
-{
- kStatus_SHELL_Success = kStatus_Success, /*!< Success */
- kStatus_SHELL_Error = MAKE_STATUS(kStatusGroup_SHELL, 1), /*!< Failed */
- kStatus_SHELL_OpenWriteHandleFailed = MAKE_STATUS(kStatusGroup_SHELL, 2), /*!< Open write handle failed */
- kStatus_SHELL_OpenReadHandleFailed = MAKE_STATUS(kStatusGroup_SHELL, 3), /*!< Open read handle failed */
-} shell_status_t;
-
-/*! @brief The handle of the shell module */
-typedef void *shell_handle_t;
-
-/*! @brief User command function prototype. */
-typedef shell_status_t (*cmd_function_t)(shell_handle_t shellHandle, int32_t argc, char **argv);
-
-/*! @brief User command data configuration structure. */
-typedef struct _shell_command
-{
- const char *pcCommand; /*!< The command that is executed. For example "help". It must be all lower case. */
- char *pcHelpString; /*!< String that describes how to use the command. It should start with the command itself,
- and end with "\r\n". For example "help: Returns a list of all the commands\r\n". */
- const cmd_function_t
- pFuncCallBack; /*!< A pointer to the callback function that returns the output generated by the command. */
- uint8_t cExpectedNumberOfParameters; /*!< Commands expect a fixed number of parameters, which may be zero. */
- list_element_t link; /*!< link of the element */
-} shell_command_t;
-
-#if defined(__ICCARM__)
-/* disable misra 19.13 */
-_Pragma("diag_suppress=Pm120")
-#endif
-/*!
- * @brief Defines the shell command structure
- *
- * This macro is used to define the shell command structure #shell_command_t.
- * And then uses the macro SHELL_COMMAND to get the command structure pointer.
- * The macro should not be used in any function.
- *
- * This is a example,
- * @code
- * SHELL_COMMAND_DEFINE(exit, "\r\n\"exit\": Exit program\r\n", SHELL_ExitCommand, 0);
- * SHELL_RegisterCommand(s_shellHandle, SHELL_COMMAND(exit));
- * @endcode
- *
- * @param command The command string of the command. The double quotes do not need. Such as exit for "exit",
- * help for "Help", read for "read".
- * @param descriptor The description of the command is used for showing the command usage when "help" is typing.
- * @param callback The callback of the command is used to handle the command line when the input command is matched.
- * @param paramCount The max parameter count of the current command.
- */
-#define SHELL_COMMAND_DEFINE(command, descriptor, callback, paramCount) \
- \
- shell_command_t g_shellCommand##command = { \
- (#command), (descriptor), (callback), (paramCount), {0}, \
- }
-
-/*!
- * @brief Gets the shell command pointer
- *
- * This macro is used to get the shell command pointer. The macro should not be used before the macro
- * SHELL_COMMAND_DEFINE is used.
- *
- * @param command The command string of the command. The double quotes do not need. Such as exit for "exit",
- * help for "Help", read for "read".
- */
-#define SHELL_COMMAND(command) &g_shellCommand##command
-
-#if defined(__ICCARM__)
- _Pragma("diag_default=Pm120")
-#endif
-
-/*******************************************************************************
- * API
- ******************************************************************************/
-
-#if defined(__cplusplus)
- extern "C"
-{
-#endif /* _cplusplus */
-
- /*!
- * @name Shell functional operation
- * @{
- */
-
- /*!
- * @brief Initializes the shell module
- *
- * This function must be called before calling all other Shell functions.
- * Call operation the Shell commands with user-defined settings.
- * The example below shows how to set up the Shell and
- * how to call the SHELL_Init function by passing in these parameters.
- * This is an example.
- * @code
- * static uint8_t s_shellHandleBuffer[SHELL_HANDLE_SIZE];
- * static shell_handle_t s_shellHandle = &s_shellHandleBuffer[0];
- * SHELL_Init(s_shellHandle, s_serialHandle, "Test@SHELL>");
- * @endcode
- * @param shellHandle Pointer to point to a memory space of size #SHELL_HANDLE_SIZE allocated by the caller.
- * @param serialHandle The serial manager module handle pointer.
- * @param prompt The string prompt pointer of Shell. Only the global variable can be passed.
- * @retval kStatus_SHELL_Success The shell initialization succeed.
- * @retval kStatus_SHELL_Error An error occurred when the shell is initialized.
- * @retval kStatus_SHELL_OpenWriteHandleFailed Open the write handle failed.
- * @retval kStatus_SHELL_OpenReadHandleFailed Open the read handle failed.
- */
- shell_status_t SHELL_Init(shell_handle_t shellHandle, serial_handle_t serialHandle, char *prompt);
-
- /*!
- * @brief Registers the shell command
- *
- * This function is used to register the shell command by using the command configuration #shell_command_config_t.
- * This is a example,
- * @code
- * SHELL_COMMAND_DEFINE(exit, "\r\n\"exit\": Exit program\r\n", SHELL_ExitCommand, 0);
- * SHELL_RegisterCommand(s_shellHandle, SHELL_COMMAND(exit));
- * @endcode
- * @param shellHandle The shell module handle pointer.
- * @param command The command element.
- * @retval kStatus_SHELL_Success Successfully register the command.
- * @retval kStatus_SHELL_Error An error occurred.
- */
- shell_status_t SHELL_RegisterCommand(shell_handle_t shellHandle, shell_command_t * shellCommand);
-
- /*!
- * @brief Unregisters the shell command
- *
- * This function is used to unregister the shell command.
- *
- * @param command The command element.
- * @retval kStatus_SHELL_Success Successfully unregister the command.
- */
- shell_status_t SHELL_UnregisterCommand(shell_command_t * shellCommand);
-
- /*!
- * @brief Sends data to the shell output stream.
- *
- * This function is used to send data to the shell output stream.
- *
- * @param shellHandle The shell module handle pointer.
- * @param buffer Start address of the data to write.
- * @param length Length of the data to write.
- * @retval kStatus_SHELL_Success Successfully send data.
- * @retval kStatus_SHELL_Error An error occurred.
- */
- shell_status_t SHELL_Write(shell_handle_t shellHandle, char *buffer, uint32_t length);
-
- /*!
- * @brief Writes formatted output to the shell output stream.
- *
- * Call this function to write a formatted output to the shell output stream.
- *
- * @param shellHandle The shell module handle pointer.
- *
- * @param formatString Format string.
- * @return Returns the number of characters printed or a negative value if an error occurs.
- */
- int SHELL_Printf(shell_handle_t shellHandle, const char *formatString, ...);
-
-/*!
- * @brief The task function for Shell.
- * The task function for Shell; The function should be polled by upper layer.
- * This function does not return until Shell command exit was called.
- *
- * @param shellHandle The shell module handle pointer.
- */
-#if !(defined(SHELL_NON_BLOCKING_MODE) && (SHELL_NON_BLOCKING_MODE > 0U))
- void SHELL_Task(shell_handle_t shellHandle);
-#endif
-
- /* @} */
-
-#if defined(__cplusplus)
-}
-#endif
-
-/*! @}*/
-
-#endif /* __FSL_SHELL_H__ */
diff --git a/platform/ext/target/nxp/common/Native_Driver/utilities/str/fsl_str.c b/platform/ext/target/nxp/common/Native_Driver/utilities/str/fsl_str.c
deleted file mode 100755
index c4d1a0c798..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/utilities/str/fsl_str.c
+++ /dev/null
@@ -1,1324 +0,0 @@
-/*
- * Copyright 2017 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-#include <math.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include "fsl_str.h"
-#include "fsl_debug_console_conf.h"
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*! @brief The overflow value.*/
-#ifndef HUGE_VAL
-#define HUGE_VAL (99.e99)
-#endif /* HUGE_VAL */
-
-#if PRINTF_ADVANCED_ENABLE
-/*! @brief Specification modifier flags for printf. */
-enum _debugconsole_printf_flag
-{
- kPRINTF_Minus = 0x01U, /*!< Minus FLag. */
- kPRINTF_Plus = 0x02U, /*!< Plus Flag. */
- kPRINTF_Space = 0x04U, /*!< Space Flag. */
- kPRINTF_Zero = 0x08U, /*!< Zero Flag. */
- kPRINTF_Pound = 0x10U, /*!< Pound Flag. */
- kPRINTF_LengthChar = 0x20U, /*!< Length: Char Flag. */
- kPRINTF_LengthShortInt = 0x40U, /*!< Length: Short Int Flag. */
- kPRINTF_LengthLongInt = 0x80U, /*!< Length: Long Int Flag. */
- kPRINTF_LengthLongLongInt = 0x100U, /*!< Length: Long Long Int Flag. */
-};
-#endif /* PRINTF_ADVANCED_ENABLE */
-
-/*! @brief Specification modifier flags for scanf. */
-enum _debugconsole_scanf_flag
-{
- kSCANF_Suppress = 0x2U, /*!< Suppress Flag. */
- kSCANF_DestMask = 0x7cU, /*!< Destination Mask. */
- kSCANF_DestChar = 0x4U, /*!< Destination Char Flag. */
- kSCANF_DestString = 0x8U, /*!< Destination String FLag. */
- kSCANF_DestSet = 0x10U, /*!< Destination Set Flag. */
- kSCANF_DestInt = 0x20U, /*!< Destination Int Flag. */
- kSCANF_DestFloat = 0x30U, /*!< Destination Float Flag. */
- kSCANF_LengthMask = 0x1f00U, /*!< Length Mask Flag. */
-#if SCANF_ADVANCED_ENABLE
- kSCANF_LengthChar = 0x100U, /*!< Length Char Flag. */
- kSCANF_LengthShortInt = 0x200U, /*!< Length ShortInt Flag. */
- kSCANF_LengthLongInt = 0x400U, /*!< Length LongInt Flag. */
- kSCANF_LengthLongLongInt = 0x800U, /*!< Length LongLongInt Flag. */
-#endif /* SCANF_ADVANCED_ENABLE */
-#if SCANF_FLOAT_ENABLE
- kSCANF_LengthLongLongDouble = 0x1000U, /*!< Length LongLongDuoble Flag. */
-#endif /*PRINTF_FLOAT_ENABLE */
- kSCANF_TypeSinged = 0x2000U, /*!< TypeSinged Flag. */
-};
-
-/*! @brief Keil: suppress ellipsis warning in va_arg usage below. */
-#if defined(__CC_ARM)
-#pragma diag_suppress 1256
-#endif /* __CC_ARM */
-
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-/*!
- * @brief Scanline function which ignores white spaces.
- *
- * @param[in] s The address of the string pointer to update.
- * @return String without white spaces.
- */
-static uint32_t ScanIgnoreWhiteSpace(const char **s);
-
-/*!
- * @brief Converts a radix number to a string and return its length.
- *
- * @param[in] numstr Converted string of the number.
- * @param[in] nump Pointer to the number.
- * @param[in] neg Polarity of the number.
- * @param[in] radix The radix to be converted to.
- * @param[in] use_caps Used to identify %x/X output format.
-
- * @return Length of the converted string.
- */
-static int32_t ConvertRadixNumToString(char *numstr, void *nump, int32_t neg, int32_t radix, bool use_caps);
-
-#if PRINTF_FLOAT_ENABLE
-/*!
- * @brief Converts a floating radix number to a string and return its length.
- *
- * @param[in] numstr Converted string of the number.
- * @param[in] nump Pointer to the number.
- * @param[in] radix The radix to be converted to.
- * @param[in] precision_width Specify the precision width.
-
- * @return Length of the converted string.
- */
-static int32_t ConvertFloatRadixNumToString(char *numstr, void *nump, int32_t radix, uint32_t precision_width);
-#endif /* PRINTF_FLOAT_ENABLE */
-
-/*!
- *
- */
-double modf(double input_dbl, double *intpart_ptr);
-
-/*************Code for process formatted data*******************************/
-
-static uint32_t ScanIgnoreWhiteSpace(const char **s)
-{
- uint8_t count = 0;
- uint8_t c;
-
- c = **s;
- while ((c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') || (c == '\v') || (c == '\f'))
- {
- count++;
- (*s)++;
- c = **s;
- }
- return count;
-}
-
-static int32_t ConvertRadixNumToString(char *numstr, void *nump, int32_t neg, int32_t radix, bool use_caps)
-{
-#if PRINTF_ADVANCED_ENABLE
- int64_t a;
- int64_t b;
- int64_t c;
-
- uint64_t ua;
- uint64_t ub;
- uint64_t uc;
-#else
- int32_t a;
- int32_t b;
- int32_t c;
-
- uint32_t ua;
- uint32_t ub;
- uint32_t uc;
-#endif /* PRINTF_ADVANCED_ENABLE */
-
- int32_t nlen;
- char *nstrp;
-
- nlen = 0;
- nstrp = numstr;
- *nstrp++ = '\0';
-
- if (neg)
- {
-#if PRINTF_ADVANCED_ENABLE
- a = *(int64_t *)nump;
-#else
- a = *(int32_t *)nump;
-#endif /* PRINTF_ADVANCED_ENABLE */
- if (a == 0)
- {
- *nstrp = '0';
- ++nlen;
- return nlen;
- }
- while (a != 0)
- {
-#if PRINTF_ADVANCED_ENABLE
- b = (int64_t)a / (int64_t)radix;
- c = (int64_t)a - ((int64_t)b * (int64_t)radix);
- if (c < 0)
- {
- uc = (uint64_t)c;
- c = (int64_t)(~uc) + 1 + '0';
- }
-#else
- b = a / radix;
- c = a - (b * radix);
- if (c < 0)
- {
- uc = (uint32_t)c;
- c = (uint32_t)(~uc) + 1 + '0';
- }
-#endif /* PRINTF_ADVANCED_ENABLE */
- else
- {
- c = c + '0';
- }
- a = b;
- *nstrp++ = (char)c;
- ++nlen;
- }
- }
- else
- {
-#if PRINTF_ADVANCED_ENABLE
- ua = *(uint64_t *)nump;
-#else
- ua = *(uint32_t *)nump;
-#endif /* PRINTF_ADVANCED_ENABLE */
- if (ua == 0)
- {
- *nstrp = '0';
- ++nlen;
- return nlen;
- }
- while (ua != 0)
- {
-#if PRINTF_ADVANCED_ENABLE
- ub = (uint64_t)ua / (uint64_t)radix;
- uc = (uint64_t)ua - ((uint64_t)ub * (uint64_t)radix);
-#else
- ub = ua / (uint32_t)radix;
- uc = ua - (ub * (uint32_t)radix);
-#endif /* PRINTF_ADVANCED_ENABLE */
-
- if (uc < 10)
- {
- uc = uc + '0';
- }
- else
- {
- uc = uc - 10 + (use_caps ? 'A' : 'a');
- }
- ua = ub;
- *nstrp++ = (char)uc;
- ++nlen;
- }
- }
- return nlen;
-}
-
-#if PRINTF_FLOAT_ENABLE
-static int32_t ConvertFloatRadixNumToString(char *numstr, void *nump, int32_t radix, uint32_t precision_width)
-{
- int32_t a;
- int32_t b;
- int32_t c;
- int32_t i;
- uint32_t uc;
- double fa;
- double dc;
- double fb;
- double r;
- double fractpart;
- double intpart;
-
- int32_t nlen;
- char *nstrp;
- nlen = 0;
- nstrp = numstr;
- *nstrp++ = '\0';
- r = *(double *)nump;
- if (!r)
- {
- *nstrp = '0';
- ++nlen;
- return nlen;
- }
- fractpart = modf((double)r, (double *)&intpart);
- /* Process fractional part. */
- for (i = 0; i < precision_width; i++)
- {
- fractpart *= radix;
- }
- if (r >= 0)
- {
- fa = fractpart + (double)0.5;
- if (fa >= pow(10, precision_width))
- {
- intpart++;
- }
- }
- else
- {
- fa = fractpart - (double)0.5;
- if (fa <= -pow(10, precision_width))
- {
- intpart--;
- }
- }
- for (i = 0; i < precision_width; i++)
- {
- fb = fa / (int32_t)radix;
- dc = (fa - (int64_t)fb * (int32_t)radix);
- c = (int32_t)dc;
- if (c < 0)
- {
- uc = (uint32_t)c;
- c = (int32_t)(~uc) + 1 + '0';
- }
- else
- {
- c = c + '0';
- }
- fa = fb;
- *nstrp++ = (char)c;
- ++nlen;
- }
- *nstrp++ = (char)'.';
- ++nlen;
- a = (int32_t)intpart;
- if (a == 0)
- {
- *nstrp++ = '0';
- ++nlen;
- }
- else
- {
- while (a != 0)
- {
- b = (int32_t)a / (int32_t)radix;
- c = (int32_t)a - ((int32_t)b * (int32_t)radix);
- if (c < 0)
- {
- uc = (uint32_t)c;
- c = (int32_t)(~uc) + 1 + '0';
- }
- else
- {
- c = c + '0';
- }
- a = b;
- *nstrp++ = (char)c;
- ++nlen;
- }
- }
- return nlen;
-}
-#endif /* PRINTF_FLOAT_ENABLE */
-
-/*!
- * brief This function outputs its parameters according to a formatted string.
- *
- * note I/O is performed by calling given function pointer using following
- * (*func_ptr)(c);
- *
- * param[in] fmt_ptr Format string for printf.
- * param[in] args_ptr Arguments to printf.
- * param[in] buf pointer to the buffer
- * param cb print callback function pointer
- *
- * return Number of characters to be print
- */
-int StrFormatPrintf(const char *fmt, va_list ap, char *buf, printfCb cb)
-{
- /* va_list ap; */
- char *p;
- int32_t c;
-
- char vstr[33];
- char *vstrp = NULL;
- int32_t vlen = 0;
-
- int32_t done;
- int32_t count = 0;
-
- uint32_t field_width;
- uint32_t precision_width;
- char *sval;
- int32_t cval;
- bool use_caps;
- uint8_t radix = 0;
-
-#if PRINTF_ADVANCED_ENABLE
- uint32_t flags_used;
- int32_t schar, dschar;
- int64_t ival;
- uint64_t uval = 0;
- bool valid_precision_width;
-#else
- int32_t ival;
- uint32_t uval = 0;
-#endif /* PRINTF_ADVANCED_ENABLE */
-
-#if PRINTF_FLOAT_ENABLE
- double fval;
-#endif /* PRINTF_FLOAT_ENABLE */
-
- /* Start parsing apart the format string and display appropriate formats and data. */
- for (p = (char *)fmt; (c = *p) != 0; p++)
- {
- /*
- * All formats begin with a '%' marker. Special chars like
- * '\n' or '\t' are normally converted to the appropriate
- * character by the __compiler__. Thus, no need for this
- * routine to account for the '\' character.
- */
- if (c != '%')
- {
- cb(buf, &count, c, 1);
- /* By using 'continue', the next iteration of the loop is used, skipping the code that follows. */
- continue;
- }
-
- use_caps = true;
-
-#if PRINTF_ADVANCED_ENABLE
- /* First check for specification modifier flags. */
- flags_used = 0;
- done = false;
- while (!done)
- {
- switch (*++p)
- {
- case '-':
- flags_used |= kPRINTF_Minus;
- break;
- case '+':
- flags_used |= kPRINTF_Plus;
- break;
- case ' ':
- flags_used |= kPRINTF_Space;
- break;
- case '0':
- flags_used |= kPRINTF_Zero;
- break;
- case '#':
- flags_used |= kPRINTF_Pound;
- break;
- default:
- /* We've gone one char too far. */
- --p;
- done = true;
- break;
- }
- }
-#endif /* PRINTF_ADVANCED_ENABLE */
-
- /* Next check for minimum field width. */
- field_width = 0;
- done = false;
- while (!done)
- {
- c = *++p;
- if ((c >= '0') && (c <= '9'))
- {
- field_width = (field_width * 10) + (c - '0');
- }
-#if PRINTF_ADVANCED_ENABLE
- else if (c == '*')
- {
- field_width = (uint32_t)va_arg(ap, uint32_t);
- }
-#endif /* PRINTF_ADVANCED_ENABLE */
- else
- {
- /* We've gone one char too far. */
- --p;
- done = true;
- }
- }
- /* Next check for the width and precision field separator. */
- precision_width = 6;
-#if PRINTF_ADVANCED_ENABLE
- valid_precision_width = false;
-#endif /* PRINTF_ADVANCED_ENABLE */
- if (*++p == '.')
- {
- /* Must get precision field width, if present. */
- precision_width = 0;
- done = false;
- while (!done)
- {
- c = *++p;
- if ((c >= '0') && (c <= '9'))
- {
- precision_width = (precision_width * 10) + (c - '0');
-#if PRINTF_ADVANCED_ENABLE
- valid_precision_width = true;
-#endif /* PRINTF_ADVANCED_ENABLE */
- }
-#if PRINTF_ADVANCED_ENABLE
- else if (c == '*')
- {
- precision_width = (uint32_t)va_arg(ap, uint32_t);
- valid_precision_width = true;
- }
-#endif /* PRINTF_ADVANCED_ENABLE */
- else
- {
- /* We've gone one char too far. */
- --p;
- done = true;
- }
- }
- }
- else
- {
- /* We've gone one char too far. */
- --p;
- }
-#if PRINTF_ADVANCED_ENABLE
- /*
- * Check for the length modifier.
- */
- switch (/* c = */ *++p)
- {
- case 'h':
- if (*++p != 'h')
- {
- flags_used |= kPRINTF_LengthShortInt;
- --p;
- }
- else
- {
- flags_used |= kPRINTF_LengthChar;
- }
- break;
- case 'l':
- if (*++p != 'l')
- {
- flags_used |= kPRINTF_LengthLongInt;
- --p;
- }
- else
- {
- flags_used |= kPRINTF_LengthLongLongInt;
- }
- break;
- default:
- /* we've gone one char too far */
- --p;
- break;
- }
-#endif /* PRINTF_ADVANCED_ENABLE */
- /* Now we're ready to examine the format. */
- c = *++p;
- {
- if ((c == 'd') || (c == 'i') || (c == 'f') || (c == 'F') || (c == 'x') || (c == 'X') || (c == 'o') ||
- (c == 'b') || (c == 'p') || (c == 'u'))
- {
- if ((c == 'd') || (c == 'i'))
- {
-#if PRINTF_ADVANCED_ENABLE
- if (flags_used & kPRINTF_LengthLongLongInt)
- {
- ival = (int64_t)va_arg(ap, int64_t);
- }
- else
-#endif /* PRINTF_ADVANCED_ENABLE */
- {
- ival = (int32_t)va_arg(ap, int32_t);
- }
- vlen = ConvertRadixNumToString(vstr, &ival, true, 10, use_caps);
- vstrp = &vstr[vlen];
-#if PRINTF_ADVANCED_ENABLE
- if (ival < 0)
- {
- schar = '-';
- ++vlen;
- }
- else
- {
- if (flags_used & kPRINTF_Plus)
- {
- schar = '+';
- ++vlen;
- }
- else
- {
- if (flags_used & kPRINTF_Space)
- {
- schar = ' ';
- ++vlen;
- }
- else
- {
- schar = 0;
- }
- }
- }
- dschar = false;
- /* Do the ZERO pad. */
- if (flags_used & kPRINTF_Zero)
- {
- if (schar)
- {
- cb(buf, &count, schar, 1);
- }
- dschar = true;
-
- cb(buf, &count, '0', field_width - vlen);
- vlen = field_width;
- }
- else
- {
- if (!(flags_used & kPRINTF_Minus))
- {
- cb(buf, &count, ' ', field_width - vlen);
- if (schar)
- {
- cb(buf, &count, schar, 1);
- }
- dschar = true;
- }
- }
- /* The string was built in reverse order, now display in correct order. */
- if ((!dschar) && schar)
- {
- cb(buf, &count, schar, 1);
- }
-#endif /* PRINTF_ADVANCED_ENABLE */
- }
-
-#if PRINTF_FLOAT_ENABLE
- if ((c == 'f') || (c == 'F'))
- {
- fval = (double)va_arg(ap, double);
- vlen = ConvertFloatRadixNumToString(vstr, &fval, 10, precision_width);
- vstrp = &vstr[vlen];
-
-#if PRINTF_ADVANCED_ENABLE
- if (fval < 0)
- {
- schar = '-';
- ++vlen;
- }
- else
- {
- if (flags_used & kPRINTF_Plus)
- {
- schar = '+';
- ++vlen;
- }
- else
- {
- if (flags_used & kPRINTF_Space)
- {
- schar = ' ';
- ++vlen;
- }
- else
- {
- schar = 0;
- }
- }
- }
- dschar = false;
- if (flags_used & kPRINTF_Zero)
- {
- if (schar)
- {
- cb(buf, &count, schar, 1);
- }
- dschar = true;
- cb(buf, &count, '0', field_width - vlen);
- vlen = field_width;
- }
- else
- {
- if (!(flags_used & kPRINTF_Minus))
- {
- cb(buf, &count, ' ', field_width - vlen);
- if (schar)
- {
- cb(buf, &count, schar, 1);
- }
- dschar = true;
- }
- }
- if ((!dschar) && schar)
- {
- cb(buf, &count, schar, 1);
- }
-#endif /* PRINTF_ADVANCED_ENABLE */
- }
-#endif /* PRINTF_FLOAT_ENABLE */
- if ((c == 'X') || (c == 'x'))
- {
- if (c == 'x')
- {
- use_caps = false;
- }
-#if PRINTF_ADVANCED_ENABLE
- if (flags_used & kPRINTF_LengthLongLongInt)
- {
- uval = (uint64_t)va_arg(ap, uint64_t);
- }
- else
-#endif /* PRINTF_ADVANCED_ENABLE */
- {
- uval = (uint32_t)va_arg(ap, uint32_t);
- }
- vlen = ConvertRadixNumToString(vstr, &uval, false, 16, use_caps);
- vstrp = &vstr[vlen];
-
-#if PRINTF_ADVANCED_ENABLE
- dschar = false;
- if (flags_used & kPRINTF_Zero)
- {
- if (flags_used & kPRINTF_Pound)
- {
- cb(buf, &count, '0', 1);
- cb(buf, &count, (use_caps ? 'X' : 'x'), 1);
- dschar = true;
- }
- cb(buf, &count, '0', field_width - vlen);
- vlen = field_width;
- }
- else
- {
- if (!(flags_used & kPRINTF_Minus))
- {
- if (flags_used & kPRINTF_Pound)
- {
- vlen += 2;
- }
- cb(buf, &count, ' ', field_width - vlen);
- if (flags_used & kPRINTF_Pound)
- {
- cb(buf, &count, '0', 1);
- cb(buf, &count, (use_caps ? 'X' : 'x'), 1);
- dschar = true;
- }
- }
- }
-
- if ((flags_used & kPRINTF_Pound) && (!dschar))
- {
- cb(buf, &count, '0', 1);
- cb(buf, &count, (use_caps ? 'X' : 'x'), 1);
- vlen += 2;
- }
-#endif /* PRINTF_ADVANCED_ENABLE */
- }
- if ((c == 'o') || (c == 'b') || (c == 'p') || (c == 'u'))
- {
-#if PRINTF_ADVANCED_ENABLE
- if (flags_used & kPRINTF_LengthLongLongInt)
- {
- uval = (uint64_t)va_arg(ap, uint64_t);
- }
- else
-#endif /* PRINTF_ADVANCED_ENABLE */
- {
- uval = (uint32_t)va_arg(ap, uint32_t);
- }
-
- if (c == 'o')
- {
- radix = 8;
- }
- else if (c == 'b')
- {
- radix = 2;
- }
- else if (c == 'p')
- {
- radix = 16;
- }
- else
- {
- radix = 10;
- }
-
- vlen = ConvertRadixNumToString(vstr, &uval, false, radix, use_caps);
- vstrp = &vstr[vlen];
-#if PRINTF_ADVANCED_ENABLE
- if (flags_used & kPRINTF_Zero)
- {
- cb(buf, &count, '0', field_width - vlen);
- vlen = field_width;
- }
- else
- {
- if (!(flags_used & kPRINTF_Minus))
- {
- cb(buf, &count, ' ', field_width - vlen);
- }
- }
-#endif /* PRINTF_ADVANCED_ENABLE */
- }
-#if !PRINTF_ADVANCED_ENABLE
- cb(buf, &count, ' ', field_width - vlen);
-#endif /* !PRINTF_ADVANCED_ENABLE */
- if (vstrp != NULL)
- {
- while (*vstrp)
- {
- cb(buf, &count, *vstrp--, 1);
- }
- }
-#if PRINTF_ADVANCED_ENABLE
- if (flags_used & kPRINTF_Minus)
- {
- cb(buf, &count, ' ', field_width - vlen);
- }
-#endif /* PRINTF_ADVANCED_ENABLE */
- }
- else if (c == 'c')
- {
- cval = (char)va_arg(ap, uint32_t);
- cb(buf, &count, cval, 1);
- }
- else if (c == 's')
- {
- sval = (char *)va_arg(ap, char *);
- if (sval)
- {
-#if PRINTF_ADVANCED_ENABLE
- if (valid_precision_width)
- {
- vlen = precision_width;
- }
- else
- {
- vlen = strlen(sval);
- }
-#else
- vlen = strlen(sval);
-#endif /* PRINTF_ADVANCED_ENABLE */
-#if PRINTF_ADVANCED_ENABLE
- if (!(flags_used & kPRINTF_Minus))
-#endif /* PRINTF_ADVANCED_ENABLE */
- {
- cb(buf, &count, ' ', field_width - vlen);
- }
-
-#if PRINTF_ADVANCED_ENABLE
- if (valid_precision_width)
- {
- while ((*sval) && (vlen > 0))
- {
- cb(buf, &count, *sval++, 1);
- vlen--;
- }
- /* In case that vlen sval is shorter than vlen */
- vlen = precision_width - vlen;
- }
- else
- {
-#endif /* PRINTF_ADVANCED_ENABLE */
- while (*sval)
- {
- cb(buf, &count, *sval++, 1);
- }
-#if PRINTF_ADVANCED_ENABLE
- }
-#endif /* PRINTF_ADVANCED_ENABLE */
-
-#if PRINTF_ADVANCED_ENABLE
- if (flags_used & kPRINTF_Minus)
- {
- cb(buf, &count, ' ', field_width - vlen);
- }
-#endif /* PRINTF_ADVANCED_ENABLE */
- }
- }
- else
- {
- cb(buf, &count, c, 1);
- }
- }
- }
-
- return count;
-}
-
-/*!
- * brief Converts an input line of ASCII characters based upon a provided
- * string format.
- *
- * param[in] line_ptr The input line of ASCII data.
- * param[in] format Format first points to the format string.
- * param[in] args_ptr The list of parameters.
- *
- * return Number of input items converted and assigned.
- * retval IO_EOF When line_ptr is empty string "".
- */
-int StrFormatScanf(const char *line_ptr, char *format, va_list args_ptr)
-{
- uint8_t base;
- int8_t neg;
- /* Identifier for the format string. */
- char *c = format;
- char temp;
- char *buf;
- /* Flag telling the conversion specification. */
- uint32_t flag = 0;
- /* Filed width for the matching input streams. */
- uint32_t field_width;
- /* How many arguments are assigned except the suppress. */
- uint32_t nassigned = 0;
- /* How many characters are read from the input streams. */
- uint32_t n_decode = 0;
-
- int32_t val;
-
- const char *s;
- /* Identifier for the input string. */
- const char *p = line_ptr;
-
-#if SCANF_FLOAT_ENABLE
- double fnum = 0.0;
-#endif /* SCANF_FLOAT_ENABLE */
- /* Return EOF error before any conversion. */
- if (*p == '\0')
- {
- return -1;
- }
-
- /* Decode directives. */
- while ((*c) && (*p))
- {
- /* Ignore all white-spaces in the format strings. */
- if (ScanIgnoreWhiteSpace((const char **)&c))
- {
- n_decode += ScanIgnoreWhiteSpace(&p);
- }
- else if ((*c != '%') || ((*c == '%') && (*(c + 1) == '%')))
- {
- /* Ordinary characters. */
- c++;
- if (*p == *c)
- {
- n_decode++;
- p++;
- c++;
- }
- else
- {
- /* Match failure. Misalignment with C99, the unmatched characters need to be pushed back to stream.
- * However, it is deserted now. */
- break;
- }
- }
- else
- {
- /* convernsion specification */
- c++;
- /* Reset. */
- flag = 0;
- field_width = 0;
- base = 0;
-
- /* Loop to get full conversion specification. */
- while ((*c) && (!(flag & kSCANF_DestMask)))
- {
- switch (*c)
- {
-#if SCANF_ADVANCED_ENABLE
- case '*':
- if (flag & kSCANF_Suppress)
- {
- /* Match failure. */
- return nassigned;
- }
- flag |= kSCANF_Suppress;
- c++;
- break;
- case 'h':
- if (flag & kSCANF_LengthMask)
- {
- /* Match failure. */
- return nassigned;
- }
-
- if (c[1] == 'h')
- {
- flag |= kSCANF_LengthChar;
- c++;
- }
- else
- {
- flag |= kSCANF_LengthShortInt;
- }
- c++;
- break;
- case 'l':
- if (flag & kSCANF_LengthMask)
- {
- /* Match failure. */
- return nassigned;
- }
-
- if (c[1] == 'l')
- {
- flag |= kSCANF_LengthLongLongInt;
- c++;
- }
- else
- {
- flag |= kSCANF_LengthLongInt;
- }
- c++;
- break;
-#endif /* SCANF_ADVANCED_ENABLE */
-#if SCANF_FLOAT_ENABLE
- case 'L':
- if (flag & kSCANF_LengthMask)
- {
- /* Match failure. */
- return nassigned;
- }
- flag |= kSCANF_LengthLongLongDouble;
- c++;
- break;
-#endif /* SCANF_FLOAT_ENABLE */
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (field_width)
- {
- /* Match failure. */
- return nassigned;
- }
- do
- {
- field_width = field_width * 10 + *c - '0';
- c++;
- } while ((*c >= '0') && (*c <= '9'));
- break;
- case 'd':
- base = 10;
- flag |= kSCANF_TypeSinged;
- flag |= kSCANF_DestInt;
- c++;
- break;
- case 'u':
- base = 10;
- flag |= kSCANF_DestInt;
- c++;
- break;
- case 'o':
- base = 8;
- flag |= kSCANF_DestInt;
- c++;
- break;
- case 'x':
- case 'X':
- base = 16;
- flag |= kSCANF_DestInt;
- c++;
- break;
- case 'i':
- base = 0;
- flag |= kSCANF_DestInt;
- c++;
- break;
-#if SCANF_FLOAT_ENABLE
- case 'a':
- case 'A':
- case 'e':
- case 'E':
- case 'f':
- case 'F':
- case 'g':
- case 'G':
- flag |= kSCANF_DestFloat;
- c++;
- break;
-#endif /* SCANF_FLOAT_ENABLE */
- case 'c':
- flag |= kSCANF_DestChar;
- if (!field_width)
- {
- field_width = 1;
- }
- c++;
- break;
- case 's':
- flag |= kSCANF_DestString;
- c++;
- break;
- default:
- return nassigned;
- }
- }
-
- if (!(flag & kSCANF_DestMask))
- {
- /* Format strings are exhausted. */
- return nassigned;
- }
-
- if (!field_width)
- {
- /* Large than length of a line. */
- field_width = 99;
- }
-
- /* Matching strings in input streams and assign to argument. */
- switch (flag & kSCANF_DestMask)
- {
- case kSCANF_DestChar:
- s = (const char *)p;
- buf = va_arg(args_ptr, char *);
- while ((field_width--) && (*p))
- {
- if (!(flag & kSCANF_Suppress))
- {
- *buf++ = *p++;
- }
- else
- {
- p++;
- }
- n_decode++;
- }
-
- if ((!(flag & kSCANF_Suppress)) && (s != p))
- {
- nassigned++;
- }
- break;
- case kSCANF_DestString:
- n_decode += ScanIgnoreWhiteSpace(&p);
- s = p;
- buf = va_arg(args_ptr, char *);
- while ((field_width--) && (*p != '\0') && (*p != ' ') && (*p != '\t') && (*p != '\n') &&
- (*p != '\r') && (*p != '\v') && (*p != '\f'))
- {
- if (flag & kSCANF_Suppress)
- {
- p++;
- }
- else
- {
- *buf++ = *p++;
- }
- n_decode++;
- }
-
- if ((!(flag & kSCANF_Suppress)) && (s != p))
- {
- /* Add NULL to end of string. */
- *buf = '\0';
- nassigned++;
- }
- break;
- case kSCANF_DestInt:
- n_decode += ScanIgnoreWhiteSpace(&p);
- s = p;
- val = 0;
- if ((base == 0) || (base == 16))
- {
- if ((s[0] == '0') && ((s[1] == 'x') || (s[1] == 'X')))
- {
- base = 16;
- if (field_width >= 1)
- {
- p += 2;
- n_decode += 2;
- field_width -= 2;
- }
- }
- }
-
- if (base == 0)
- {
- if (s[0] == '0')
- {
- base = 8;
- }
- else
- {
- base = 10;
- }
- }
-
- neg = 1;
- switch (*p)
- {
- case '-':
- neg = -1;
- n_decode++;
- p++;
- field_width--;
- break;
- case '+':
- neg = 1;
- n_decode++;
- p++;
- field_width--;
- break;
- default:
- break;
- }
-
- while ((*p) && (field_width--))
- {
- if ((*p <= '9') && (*p >= '0'))
- {
- temp = *p - '0';
- }
- else if ((*p <= 'f') && (*p >= 'a'))
- {
- temp = *p - 'a' + 10;
- }
- else if ((*p <= 'F') && (*p >= 'A'))
- {
- temp = *p - 'A' + 10;
- }
- else
- {
- temp = base;
- }
-
- if (temp >= base)
- {
- break;
- }
- else
- {
- val = base * val + temp;
- }
- p++;
- n_decode++;
- }
- val *= neg;
- if (!(flag & kSCANF_Suppress))
- {
-#if SCANF_ADVANCED_ENABLE
- switch (flag & kSCANF_LengthMask)
- {
- case kSCANF_LengthChar:
- if (flag & kSCANF_TypeSinged)
- {
- *va_arg(args_ptr, signed char *) = (signed char)val;
- }
- else
- {
- *va_arg(args_ptr, unsigned char *) = (unsigned char)val;
- }
- break;
- case kSCANF_LengthShortInt:
- if (flag & kSCANF_TypeSinged)
- {
- *va_arg(args_ptr, signed short *) = (signed short)val;
- }
- else
- {
- *va_arg(args_ptr, unsigned short *) = (unsigned short)val;
- }
- break;
- case kSCANF_LengthLongInt:
- if (flag & kSCANF_TypeSinged)
- {
- *va_arg(args_ptr, signed long int *) = (signed long int)val;
- }
- else
- {
- *va_arg(args_ptr, unsigned long int *) = (unsigned long int)val;
- }
- break;
- case kSCANF_LengthLongLongInt:
- if (flag & kSCANF_TypeSinged)
- {
- *va_arg(args_ptr, signed long long int *) = (signed long long int)val;
- }
- else
- {
- *va_arg(args_ptr, unsigned long long int *) = (unsigned long long int)val;
- }
- break;
- default:
- /* The default type is the type int. */
- if (flag & kSCANF_TypeSinged)
- {
- *va_arg(args_ptr, signed int *) = (signed int)val;
- }
- else
- {
- *va_arg(args_ptr, unsigned int *) = (unsigned int)val;
- }
- break;
- }
-#else
- /* The default type is the type int. */
- if (flag & kSCANF_TypeSinged)
- {
- *va_arg(args_ptr, signed int *) = (signed int)val;
- }
- else
- {
- *va_arg(args_ptr, unsigned int *) = (unsigned int)val;
- }
-#endif /* SCANF_ADVANCED_ENABLE */
- nassigned++;
- }
- break;
-#if SCANF_FLOAT_ENABLE
- case kSCANF_DestFloat:
- n_decode += ScanIgnoreWhiteSpace(&p);
- fnum = strtod(p, (char **)&s);
-
- if ((fnum >= HUGE_VAL) || (fnum <= -HUGE_VAL))
- {
- break;
- }
-
- n_decode += (int)(s) - (int)(p);
- p = s;
- if (!(flag & kSCANF_Suppress))
- {
- if (flag & kSCANF_LengthLongLongDouble)
- {
- *va_arg(args_ptr, double *) = fnum;
- }
- else
- {
- *va_arg(args_ptr, float *) = (float)fnum;
- }
- nassigned++;
- }
- break;
-#endif /* SCANF_FLOAT_ENABLE */
- default:
- return nassigned;
- }
- }
- }
- return nassigned;
-}
diff --git a/platform/ext/target/nxp/common/Native_Driver/utilities/str/fsl_str.h b/platform/ext/target/nxp/common/Native_Driver/utilities/str/fsl_str.h
deleted file mode 100755
index bf7adcc52a..0000000000
--- a/platform/ext/target/nxp/common/Native_Driver/utilities/str/fsl_str.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2017 NXP
- * All rights reserved.
- *
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#ifndef _FSL_STR_H
-#define _FSL_STR_H
-
-#include "fsl_common.h"
-
-/*!
- * @addtogroup debugconsole
- * @{
- */
-
-/*******************************************************************************
- * Prototypes
- ******************************************************************************/
-#if defined(__cplusplus)
-extern "C" {
-#endif /* __cplusplus */
-
-/*!
- * @brief A function pointer which is used when format printf log.
- */
-typedef void (*printfCb)(char *buf, int32_t *indicator, char val, int len);
-
-/*!
- * @brief This function outputs its parameters according to a formatted string.
- *
- * @note I/O is performed by calling given function pointer using following
- * (*func_ptr)(c);
- *
- * @param[in] fmt Format string for printf.
- * @param[in] ap Arguments to printf.
- * @param[in] buf pointer to the buffer
- * @param cb print callbck function pointer
- *
- * @return Number of characters to be print
- */
-int StrFormatPrintf(const char *fmt, va_list ap, char *buf, printfCb cb);
-
-/*!
- * @brief Converts an input line of ASCII characters based upon a provided
- * string format.
- *
- * @param[in] line_ptr The input line of ASCII data.
- * @param[in] format Format first points to the format string.
- * @param[in] args_ptr The list of parameters.
- *
- * @return Number of input items converted and assigned.
- * @retval IO_EOF When line_ptr is empty string "".
- */
-int StrFormatScanf(const char *line_ptr, char *format, va_list args_ptr);
-
-#if defined(__cplusplus)
-}
-#endif /* __cplusplus */
-
-/*! @} */
-
-#endif /* _FSL_STR_H */
diff --git a/platform/ext/target/nxp/common/plat_attest_hal.c b/platform/ext/target/nxp/common/plat_attest_hal.c
new file mode 100644
index 0000000000..ff1624968b
--- /dev/null
+++ b/platform/ext/target/nxp/common/plat_attest_hal.c
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright 2020 NXP. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#include <stddef.h>
+#include <stdint.h>
+#include "tfm_attest_hal.h"
+#include "tfm_plat_boot_seed.h"
+#include "tfm_plat_device_id.h"
+
+#include "log/tfm_log.h"
+
+#ifdef PLAT_HAS_BOOT_SEED /* Platform has boot seed register */
+#include "fsl_common.h"
+#endif
+
+/*!
+ * \def BOOT_SEED
+ *
+ * \brief Fixed value for boot seed used for test.
+ */
+#define BOOT_SEED 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, \
+ 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, \
+ 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, \
+ 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF
+
+static const uint8_t boot_seed[BOOT_SEED_SIZE] = {BOOT_SEED};
+
+/* Example verification service URL for initial attestation token */
+static const char verification_service_url[] = "www.trustedfirmware.org";
+
+/* Example profile definition document for initial attestation token */
+static const char attestation_profile_definition[] = "PSA_IOT_PROFILE_1";
+
+static const uint8_t implementation_id[] = {
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB,
+ 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
+ 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD,
+};
+
+static const uint8_t example_ean_13[] = "060456527282910010";
+
+enum tfm_security_lifecycle_t tfm_attest_hal_get_security_lifecycle(void)
+{
+ return TFM_SLC_SECURED;
+}
+
+const char *
+tfm_attest_hal_get_verification_service(uint32_t *size)
+{
+ *size = sizeof(verification_service_url) - 1;
+
+ return verification_service_url;
+}
+
+const char *
+tfm_attest_hal_get_profile_definition(uint32_t *size)
+{
+ *size = sizeof(attestation_profile_definition) - 1;
+
+ return attestation_profile_definition;
+}
+
+/**
+ * \brief Copy data in source buffer to the destination buffer
+ *
+ * \param[out] p_dst Pointer to destation buffer
+ * \param[in] p_src Pointer to source buffer
+ * \param[in] size Length of data to be copied
+ */
+static inline void copy_buf(uint8_t *p_dst, const uint8_t *p_src, size_t size)
+{
+ uint32_t i;
+
+ for (i = size; i > 0; i--) {
+ *p_dst = *p_src;
+ p_src++;
+ p_dst++;
+ }
+}
+
+enum tfm_plat_err_t tfm_plat_get_boot_seed(uint32_t size, uint8_t *buf)
+{
+ uint8_t *p_dst = buf;
+ const uint8_t *p_src = boot_seed;
+
+ if (size != BOOT_SEED_SIZE) {
+ return TFM_PLAT_ERR_SYSTEM_ERR;
+ }
+
+#ifdef PLAT_HAS_BOOT_SEED /* Platform has boot seed register */
+
+ if(SYSCON->BOOT_SEED_REG0 != 0) /* Check if the seed was generated */
+ {
+ p_src = (uint8_t *)&SYSCON->BOOT_SEED_REG0; /* Array of BOOT_SEED_REG[0-7] */
+ }
+
+#endif
+
+ copy_buf(p_dst, p_src, size);
+
+ return TFM_PLAT_ERR_SUCCESS;
+}
+
+enum tfm_plat_err_t tfm_plat_get_implementation_id(uint32_t *size,
+ uint8_t *buf)
+{
+ const uint8_t *p_impl_id = implementation_id;
+ uint32_t impl_id_size = sizeof(implementation_id);
+
+ if (*size < impl_id_size) {
+ return TFM_PLAT_ERR_SYSTEM_ERR;
+ }
+
+ copy_buf(buf, p_impl_id, impl_id_size);
+ *size = impl_id_size;
+
+ return TFM_PLAT_ERR_SUCCESS;
+}
+
+enum tfm_plat_err_t tfm_plat_get_hw_version(uint32_t *size, uint8_t *buf)
+{
+ const uint8_t *p_hw_version = example_ean_13;
+ uint32_t hw_version_size = sizeof(example_ean_13) - 1;
+
+ if (*size < hw_version_size) {
+ return TFM_PLAT_ERR_SYSTEM_ERR;
+ }
+
+ copy_buf(buf, p_hw_version, hw_version_size);
+ *size = hw_version_size;
+
+ return TFM_PLAT_ERR_SUCCESS;
+}
diff --git a/platform/ext/target/nxp/common/plat_attestation_key.c b/platform/ext/target/nxp/common/plat_attestation_key.c
new file mode 100644
index 0000000000..643cb2e04e
--- /dev/null
+++ b/platform/ext/target/nxp/common/plat_attestation_key.c
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2017-2020 Arm Limited. All rights reserved.
+ * Copyright 2020 NXP. All rights reserved.
+ *
+ * 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.
+ */
+
+#include "tfm_plat_crypto_keys.h"
+#include <stddef.h>
+
+
+#ifndef TFM_ATTESTATION_KEY_ADDR
+/*
+ * This file contains the hard coded version of the ECDSA P-256 secret key in:
+ * platform/ext/common/template/tfm_initial_attestation_key.pem
+ *
+ * As a P-256 key, the private key is 32 bytes long.
+ *
+ * This key is used to sign the initial attestation token.
+ * The secret key is stored in raw format, without any encoding(ASN.1, COSE).
+ *
+ * ####### DO NOT USE THIS KEY IN PRODUCTION #######
+ */
+
+/* Initial attestation private key in raw format, without any encoding.
+ * It belongs to the ECDSA P-256 curve.
+ * It MUST be present on the device.
+ */
+TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_INITIAL_ATTESTATION", "PSA-ROT")
+const uint8_t initial_attestation_private_key[] =
+{
+ 0xA9, 0xB4, 0x54, 0xB2, 0x6D, 0x6F, 0x90, 0xA4,
+ 0xEA, 0x31, 0x19, 0x35, 0x64, 0xCB, 0xA9, 0x1F,
+ 0xEC, 0x6F, 0x9A, 0x00, 0x2A, 0x7D, 0xC0, 0x50,
+ 0x4B, 0x92, 0xA1, 0x93, 0x71, 0x34, 0x58, 0x5F
+};
+#define TFM_ATTESTATION_KEY_ADDR initial_attestation_private_key
+
+#endif /* TFM_ATTESTATION_KEY_ADDR */
+
+#ifndef TFM_ATTESTATION_KEY_SIZE
+#define TFM_ATTESTATION_KEY_SIZE (32)
+#endif
+
+/* Type of the EC curve which the key belongs to, in PSA curve ID form */
+#ifndef TFM_ATTESTATION_KEY_TYPE
+#define TFM_ATTESTATION_KEY_TYPE PSA_ECC_CURVE_SECP256R1
+#endif
+
+/**
+ * \brief Copy the key to the destination buffer
+ *
+ * \param[out] p_dst Pointer to buffer where to store the key
+ * \param[in] p_src Pointer to the key
+ * \param[in] size Length of the key
+ */
+static inline void copy_key(uint8_t *p_dst, const uint8_t *p_src, size_t size)
+{
+ uint32_t i;
+
+ for (i = size; i > 0; i--) {
+ *p_dst = *p_src;
+ p_src++;
+ p_dst++;
+ }
+}
+
+enum tfm_plat_err_t
+tfm_plat_get_initial_attest_key(uint8_t *key_buf,
+ uint32_t size,
+ struct ecc_key_t *ecc_key,
+ psa_ecc_family_t *curve_type)
+{
+ uint8_t *key_dst;
+ const uint8_t *key_src;
+ uint32_t key_size;
+ uint32_t full_key_size = TFM_ATTESTATION_KEY_SIZE;
+
+ if (size < full_key_size) {
+ return TFM_PLAT_ERR_SYSTEM_ERR;
+ }
+
+ /* Set the EC curve type which the key belongs to */
+ *curve_type = TFM_ATTESTATION_KEY_TYPE;
+
+ /* Copy the private key to the buffer, it MUST be present */
+ key_dst = key_buf;
+ key_src = (const uint8_t *)TFM_ATTESTATION_KEY_ADDR;
+ key_size = TFM_ATTESTATION_KEY_SIZE;
+ copy_key(key_dst, key_src, key_size);
+ ecc_key->priv_key = key_dst;
+ ecc_key->priv_key_size = key_size;
+
+ ecc_key->pubx_key = NULL;
+ ecc_key->pubx_key_size = 0;
+ ecc_key->puby_key = NULL;
+ ecc_key->puby_key_size = 0;
+
+ return TFM_PLAT_ERR_SUCCESS;
+}
diff --git a/platform/ext/target/nxp/common/plat_huk_key.c b/platform/ext/target/nxp/common/plat_huk_key.c
new file mode 100644
index 0000000000..4bd700b736
--- /dev/null
+++ b/platform/ext/target/nxp/common/plat_huk_key.c
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2017-2020 Arm Limited. All rights reserved.
+ * Copyright 2020 NXP. All rights reserved.
+ *
+ * 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.
+ */
+
+//#include "platform/include/tfm_plat_crypto_keys.h"
+#include "tfm_plat_defs.h"
+#include <stddef.h>
+
+#include "tfm_mbedcrypto_include.h" /* Use Mbed-Crypto PSA */
+
+#include "log/tfm_log.h"
+
+#ifndef TFM_HUK_KEY_DERIVATION
+ #define TFM_HUK_KEY_DERIVATION 1 /* Enable Key derivation from HUK */
+#endif
+
+
+/* Functions in this file should be implemented by platform vendor. For
+ * the security of the storage system, it is critical to use a hardware unique
+ * key. For the security of the attestation, it is critical to use a unique key
+ * pair and keep the private key is secret.
+ */
+#ifndef TFM_HUK_KEY_ADDR
+static const uint8_t sample_tfm_key[] =
+ {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \
+ 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F};
+
+#define TFM_HUK_KEY_ADDR sample_tfm_key
+#endif
+#ifndef TFM_HUK_KEY_LEN
+#define TFM_HUK_KEY_LEN (16)
+#endif
+
+#if !TFM_HUK_KEY_DERIVATION
+/**
+ * \brief Copy the key to the destination buffer
+ *
+ * \param[out] p_dst Pointer to buffer where to store the key
+ * \param[in] p_src Pointer to the key
+ * \param[in] size Length of the key
+ */
+static inline void copy_key(uint8_t *p_dst, const uint8_t *p_src, size_t size)
+{
+ uint32_t i;
+
+ for (i = size; i > 0; i--) {
+ *p_dst = *p_src;
+ p_src++;
+ p_dst++;
+ }
+}
+#endif
+
+enum tfm_plat_err_t tfm_plat_get_huk_derived_key(const uint8_t *label,
+ size_t label_size,
+ const uint8_t *context,
+ size_t context_size,
+ uint8_t *key,
+ size_t key_size)
+{
+ (void)label;
+ (void)label_size;
+ (void)context;
+ (void)context_size;
+
+#if TFM_HUK_KEY_DERIVATION /* Create the storage key from the key derivation operation */
+ {
+ psa_status_t status;
+ psa_key_handle_t base_key;
+ psa_key_derivation_operation_t op = PSA_KEY_DERIVATION_OPERATION_INIT;
+ psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
+ psa_algorithm_t alg = PSA_ALG_HKDF(PSA_ALG_SHA_256); /* HMAC-based Extract-and-Expand Key Derivation Function (HKDF) using SHA-256 [RFC5869] */
+
+ /* Import HUK key for use in key derivation. */
+ psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_DERIVE);
+ psa_set_key_algorithm(&attributes, alg);
+ psa_set_key_type(&attributes, PSA_KEY_TYPE_DERIVE);
+ status = psa_import_key(&attributes, (const uint8_t *)TFM_HUK_KEY_ADDR, TFM_HUK_KEY_LEN, &base_key);
+ if (status != PSA_SUCCESS) {
+ LOG_MSG("Failed to import a key\n");
+ return TFM_PLAT_ERR_SYSTEM_ERR;
+ }
+
+ /* Set up a key derivation operation */
+ status = psa_key_derivation_setup(&op, alg);
+ if (status != PSA_SUCCESS) {
+ LOG_MSG("Failed to Set up a key derivation operation\n");
+ goto err_release_key;
+ }
+
+ status = psa_key_derivation_set_capacity(&op, key_size);
+ if (status != PSA_SUCCESS) {
+ LOG_MSG("Failed to set capacity\n");
+ goto err_release_op;
+ }
+
+ /* Initial keying material */
+ status = psa_key_derivation_input_key(&op,
+ PSA_KEY_DERIVATION_INPUT_SECRET,
+ base_key);
+ if (status != PSA_SUCCESS) {
+ LOG_MSG("Failed to input key\n");
+ goto err_release_op;
+ }
+
+ /* Supply the key label as an input to the key derivation.
+ Application- and context-specific information */
+ status = psa_key_derivation_input_bytes(&op, PSA_KEY_DERIVATION_INPUT_INFO,
+ label,
+ label_size);
+ if (status != PSA_SUCCESS) {
+ LOG_MSG("Failed to psa_key_derivation_input_bytes()\n");
+ goto err_release_op;
+ }
+
+ /* Create the storage key from the key derivation operation */
+ status = psa_key_derivation_output_bytes(&op, key, key_size);
+ if (status != PSA_SUCCESS) {
+ LOG_MSG("Failed to psa_key_derivation_output_bytes()\n");
+ goto err_release_op;
+ }
+
+ /* Free resources associated with the key derivation operation */
+ (void)psa_close_key(base_key);
+ (void)psa_key_derivation_abort(&op);
+
+ return TFM_PLAT_ERR_SUCCESS;
+
+ err_release_op:
+ (void)psa_key_derivation_abort(&op);
+ err_release_key:
+ (void)psa_close_key(base_key);
+ return TFM_PLAT_ERR_SYSTEM_ERR;
+ }
+
+#else /* Original code does not do any darivation */
+ if (key_size > TFM_HUK_KEY_LEN) {
+ return TFM_PLAT_ERR_SYSTEM_ERR;
+ }
+
+ /* FIXME: Do key derivation */
+ copy_key(key, TFM_HUK_KEY_ADDR, key_size);
+
+ return TFM_PLAT_ERR_SUCCESS;
+#endif
+
+}
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/plat_test.c b/platform/ext/target/nxp/common/plat_test.c
index 977524f0c9..c5cba55c90 100755..100644
--- a/platform/ext/target/nxp/lpcxpresso55s69/plat_test.c
+++ b/platform/ext/target/nxp/common/plat_test.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2019-2021, Arm Limited. All rights reserved.
+ * Copyright 2019-2020 NXP. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -86,7 +87,6 @@ void tfm_plat_test_secure_timer_start(void)
{
/* Match Configuration */
ctimer_match_config_t matchConfig;
- /* ctimer_callback_t cb_func; */
ctimer_config_t config;
/* Use 12 MHz clock for some of the Ctimer */
@@ -129,7 +129,6 @@ void tfm_plat_test_non_secure_timer_start(void)
{
/* Match Configuration */
ctimer_match_config_t matchConfig;
- // ctimer_callback_t cb_func;
ctimer_config_t config;
/* Use 12 MHz clock for some of the Ctimer */
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/services/src/tfm_platform_system.c b/platform/ext/target/nxp/common/services/src/tfm_platform_system.c
index 328666ee55..328666ee55 100755..100644
--- a/platform/ext/target/nxp/lpcxpresso55s69/services/src/tfm_platform_system.c
+++ b/platform/ext/target/nxp/common/services/src/tfm_platform_system.c
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/spm_hal.c b/platform/ext/target/nxp/common/spm_hal.c
index 00d4bc2392..b9a6e98912 100755..100644
--- a/platform/ext/target/nxp/lpcxpresso55s69/spm_hal.c
+++ b/platform/ext/target/nxp/common/spm_hal.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright 2019-2020 NXP. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -11,10 +12,10 @@
#include "tfm_platform_core_api.h"
#include "target_cfg.h"
#include "mpu_armv8m_drv.h"
-#include "region.h"
-#include "region_defs.h"
#include "utilities.h"
+
#include "Driver_Common.h"
+#include "log/tfm_log.h"
/* Get address of memory regions to configure MPU */
extern const struct memory_region_limits memory_regions;
@@ -22,7 +23,7 @@ extern const struct memory_region_limits memory_regions;
struct mpu_armv8m_dev_t dev_mpu_s = { MPU_BASE };
#ifdef CONFIG_TFM_ENABLE_MEMORY_PROTECT
-#define PARTITION_REGION_PERIPH_START 5
+#define PARTITION_REGION_PERIPH_START 6 //NXP 5
#define PARTITION_REGION_PERIPH_MAX_NUM 2
uint32_t periph_num_count = 0;
@@ -65,7 +66,7 @@ enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
HARDFAULT_NMI_ENABLE);
}
#endif /* defined(CONFIG_TFM_ENABLE_MEMORY_PROTECT) && (TFM_LVL != 1) */
- if (platform_data->periph_ppc_bank != 0) {
+ if (platform_data->periph_ppc_bank != 0 /* PPC_SP_DO_NOT_CONFIGURE */) {
ppc_configure_to_secure(platform_data->periph_ppc_bank,
platform_data->periph_ppc_loc, privileged);
@@ -75,11 +76,11 @@ enum tfm_plat_err_t tfm_spm_hal_configure_default_isolation(
void SEC_VIO_IRQHandler(void)
{
- /* Clear interrupt flag and pending IRQ */
+ /* Clear interrupt flag and pending IRQ */
NVIC_ClearPendingIRQ(SEC_VIO_IRQn);
/* Print fault message and block execution */
- ERROR_MSG("Security violation!");
+ ERROR_MSG("Oops... MPC fault!!!");
/* Inform TF-M core that isolation boundary has been violated */
tfm_access_violation_handler();
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/tfm_hal_isolation.c b/platform/ext/target/nxp/common/tfm_hal_isolation.c
index b90445c28c..425c8d56c8 100644
--- a/platform/ext/target/nxp/lpcxpresso55s69/tfm_hal_isolation.c
+++ b/platform/ext/target/nxp/common/tfm_hal_isolation.c
@@ -11,13 +11,59 @@
#include "region.h"
#include "target_cfg.h"
#include "tfm_hal_isolation.h"
+#include "region_defs.h" //NXP
+#include "log/tfm_log.h"
#ifdef CONFIG_TFM_ENABLE_MEMORY_PROTECT
+#if TFM_LVL == 3
+REGION_DECLARE(Load$$LR$$, LR_VENEER, $$Base);
+REGION_DECLARE(Load$$LR$$, LR_VENEER, $$Limit);
+REGION_DECLARE(Image$$, PT_RO_START, $$Base);
+REGION_DECLARE(Image$$, PT_RO_END, $$Base);
+REGION_DECLARE(Image$$, PT_PRIV_RWZI_START, $$Base);
+REGION_DECLARE(Image$$, PT_PRIV_RWZI_END, $$Base);
+
+static uint32_t g_static_region_cnt;
+
+static struct mpu_armv8m_region_cfg_t isolation_regions[] = {
+ {
+ 0, /* will be updated before using */
+ (uint32_t)&REGION_NAME(Load$$LR$$, LR_VENEER, $$Base),
+ (uint32_t)&REGION_NAME(Load$$LR$$, LR_VENEER, $$Limit),
+ MPU_ARMV8M_MAIR_ATTR_CODE_IDX,
+ MPU_ARMV8M_XN_EXEC_OK,
+ MPU_ARMV8M_AP_RO_PRIV_UNPRIV,
+ MPU_ARMV8M_SH_NONE,
+ },
+ {
+ 0, /* will be updated before using */
+ (uint32_t)&REGION_NAME(Image$$, PT_RO_START, $$Base),
+ (uint32_t)&REGION_NAME(Image$$, PT_RO_END, $$Base),
+ MPU_ARMV8M_MAIR_ATTR_CODE_IDX,
+ MPU_ARMV8M_XN_EXEC_OK,
+ MPU_ARMV8M_AP_RO_PRIV_UNPRIV,
+ MPU_ARMV8M_SH_NONE,
+ },
+ /* For isolation Level 3, set up static isolation for privileged data.
+ * Unprivileged data is dynamically set during Partition sheduling.
+ */
+ {
+ 0, /* will be updated before using */
+ (uint32_t)&REGION_NAME(Image$$, PT_PRIV_RWZI_START, $$Base),
+ (uint32_t)&REGION_NAME(Image$$, PT_PRIV_RWZI_END, $$Base),
+ MPU_ARMV8M_MAIR_ATTR_DATA_IDX,
+ MPU_ARMV8M_XN_EXEC_NEVER,
+ MPU_ARMV8M_AP_RW_PRIV_ONLY,
+ MPU_ARMV8M_SH_NONE,
+ },
+};
+#else /* TFM_LVL == 3 */
#define MPU_REGION_VENEERS 0
#define MPU_REGION_TFM_UNPRIV_CODE 1
#define MPU_REGION_NS_STACK 2
#define PARTITION_REGION_RO 3
#define PARTITION_REGION_RW_STACK 4
+#define PARTITION_NS_DATA 5 //NXP
#ifdef TFM_SP_META_PTR_ENABLE
#define MPU_REGION_SP_META_PTR 7
#endif /* TFM_SP_META_PTR_ENABLE */
@@ -35,33 +81,47 @@ REGION_DECLARE(Image$$, TFM_SP_META_PTR, $$RW$$Base);
REGION_DECLARE(Image$$, TFM_SP_META_PTR, $$RW$$Limit);
#endif
-/* Get address of memory regions to configure MPU */
extern const struct memory_region_limits memory_regions;
+
+#endif /* TFM_LVL == 3 */
#endif /* CONFIG_TFM_ENABLE_MEMORY_PROTECT */
enum tfm_hal_status_t tfm_hal_set_up_static_boundaries(void)
{
- int32_t ret = ARM_DRIVER_OK;
-
/* Set up isolation boundaries between SPE and NSPE */
sau_and_idau_cfg();
- ret = ahb_secure_control_memory_init();
- if (ret != ARM_DRIVER_OK) {
+ if (mpc_init_cfg() != ARM_DRIVER_OK) {
return TFM_HAL_ERROR_GENERIC;
}
- ret = ahb_secure_control_peripheral_init();
- if (ret != ARM_DRIVER_OK) {
+ if (ppc_init_cfg() != ARM_DRIVER_OK) {
return TFM_HAL_ERROR_GENERIC;
}
/* Set up static isolation boundaries inside SPE */
#ifdef CONFIG_TFM_ENABLE_MEMORY_PROTECT
- struct mpu_armv8m_region_cfg_t region_cfg;
struct mpu_armv8m_dev_t dev_mpu_s = { MPU_BASE };
mpu_armv8m_clean(&dev_mpu_s);
+#if TFM_LVL == 3
+ uint32_t cnt;
+ int32_t i;
+
+ /* Update MPU region numbers. The numbers start from 0 and are continuous */
+ cnt = sizeof(isolation_regions) / sizeof(isolation_regions[0]);
+ g_static_region_cnt = cnt;
+ for (i = 0; i < cnt; i++) {
+ /* Update region number */
+ isolation_regions[i].region_nr = i;
+ /* Enable regions */
+ if (mpu_armv8m_region_enable(&dev_mpu_s, &isolation_regions[i])
+ != MPU_ARMV8M_OK) {
+ return TFM_HAL_ERROR_GENERIC;
+ }
+ }
+#else /* TFM_LVL == 3 */
+ struct mpu_armv8m_region_cfg_t region_cfg;
/* Veneer region */
region_cfg.region_nr = MPU_REGION_VENEERS;
@@ -75,6 +135,11 @@ enum tfm_hal_status_t tfm_hal_set_up_static_boundaries(void)
return TFM_HAL_ERROR_GENERIC;
}
+#if TARGET_DEBUG_LOG //NXP
+ LOG_MSG("=== [MPU Unpriviladged] =======\r\n");
+ LOG_MSG("Veneers = [0x%x, 0x%x] \r\n", region_cfg.region_base, region_cfg.region_limit);
+#endif
+
/* TFM Core unprivileged code region */
region_cfg.region_nr = MPU_REGION_TFM_UNPRIV_CODE;
region_cfg.region_base =
@@ -89,6 +154,10 @@ enum tfm_hal_status_t tfm_hal_set_up_static_boundaries(void)
return TFM_HAL_ERROR_GENERIC;
}
+#if TARGET_DEBUG_LOG //NXP
+ LOG_MSG("Code = [0x%x, 0x%x] \r\n", region_cfg.region_base, region_cfg.region_limit);
+#endif
+
/* NSPM PSP */
region_cfg.region_nr = MPU_REGION_NS_STACK;
region_cfg.region_base =
@@ -103,6 +172,10 @@ enum tfm_hal_status_t tfm_hal_set_up_static_boundaries(void)
return TFM_HAL_ERROR_GENERIC;
}
+#if TARGET_DEBUG_LOG //NXP
+ LOG_MSG("NS STACK = [0x%x, 0x%x] \r\n", region_cfg.region_base, region_cfg.region_limit);
+#endif
+
/* RO region */
region_cfg.region_nr = PARTITION_REGION_RO;
region_cfg.region_base =
@@ -117,6 +190,10 @@ enum tfm_hal_status_t tfm_hal_set_up_static_boundaries(void)
return TFM_HAL_ERROR_GENERIC;
}
+#if TARGET_DEBUG_LOG //NXP
+ LOG_MSG("RO APP CODE = [0x%x, 0x%x] \r\n", region_cfg.region_base, region_cfg.region_limit);
+#endif
+
/* RW, ZI and stack as one region */
region_cfg.region_nr = PARTITION_REGION_RW_STACK;
region_cfg.region_base =
@@ -130,6 +207,27 @@ enum tfm_hal_status_t tfm_hal_set_up_static_boundaries(void)
if (mpu_armv8m_region_enable(&dev_mpu_s, &region_cfg) != MPU_ARMV8M_OK) {
return TFM_HAL_ERROR_GENERIC;
}
+#if TARGET_DEBUG_LOG //NXP
+ LOG_MSG("RW,ZI APP = [0x%x, 0x%x] \r\n", region_cfg.region_base, region_cfg.region_limit);
+ LOG_MSG("===============================\r\n");
+#endif
+
+ /* NS Data, mark as nonpriviladged */ //NXP
+ region_cfg.region_nr = PARTITION_NS_DATA;
+ region_cfg.region_base = NS_DATA_START;
+ region_cfg.region_limit = NS_DATA_LIMIT;
+ region_cfg.region_attridx = MPU_ARMV8M_MAIR_ATTR_DATA_IDX;
+ region_cfg.attr_access = MPU_ARMV8M_AP_RW_PRIV_UNPRIV;
+ region_cfg.attr_sh = MPU_ARMV8M_SH_NONE;
+ region_cfg.attr_exec = MPU_ARMV8M_XN_EXEC_NEVER;
+ if (mpu_armv8m_region_enable(&dev_mpu_s, &region_cfg) != MPU_ARMV8M_OK) {
+ return TFM_HAL_ERROR_GENERIC;
+ }
+
+#if TARGET_DEBUG_LOG
+ LOG_MSG("NS Data = [0x%x, 0x%x] \r\n", NS_DATA_START, NS_DATA_LIMIT);
+ LOG_MSG("===============================\r\n");
+#endif
#ifdef TFM_SP_META_PTR_ENABLE
/* TFM partition metadata pointer region */
@@ -145,11 +243,40 @@ enum tfm_hal_status_t tfm_hal_set_up_static_boundaries(void)
if (mpu_armv8m_region_enable(&dev_mpu_s, &region_cfg) != MPU_ARMV8M_OK) {
return TFM_HAL_ERROR_GENERIC;
}
+#endif /* TFM_SP_META_PTR_ENABLE */
+#endif /* TFM_LVL == 3 */
+
+ /* Enable MPU */
+ if (mpu_armv8m_enable(&dev_mpu_s,
+ PRIVILEGED_DEFAULT_ENABLE,
+ HARDFAULT_NMI_ENABLE) != MPU_ARMV8M_OK) {
+ return TFM_HAL_ERROR_GENERIC;
+ }
#endif
- mpu_armv8m_enable(&dev_mpu_s, PRIVILEGED_DEFAULT_ENABLE,
- HARDFAULT_NMI_ENABLE);
-#endif /* CONFIG_TFM_ENABLE_MEMORY_PROTECT */
+ return TFM_HAL_SUCCESS;
+}
+#if TFM_LVL == 3
+enum tfm_hal_status_t tfm_hal_mpu_update_partition_boundary(uintptr_t start,
+ uintptr_t end)
+{
+ struct mpu_armv8m_region_cfg_t cfg;
+ enum mpu_armv8m_error_t mpu_err;
+ struct mpu_armv8m_dev_t dev_mpu_s = { MPU_BASE };
+
+ /* Partition boundary regions is right after static regions */
+ cfg.region_nr = g_static_region_cnt;
+ cfg.region_base = start;
+ cfg.region_limit = end;
+ cfg.region_attridx = MPU_ARMV8M_MAIR_ATTR_DATA_IDX;
+ cfg.attr_access = MPU_ARMV8M_AP_RW_PRIV_UNPRIV;
+ cfg.attr_exec = MPU_ARMV8M_XN_EXEC_NEVER;
+ cfg.attr_sh = MPU_ARMV8M_SH_NONE;
+ mpu_err = mpu_armv8m_region_enable(&dev_mpu_s, &cfg);
+ if (mpu_err != MPU_ARMV8M_OK) {
+ return TFM_HAL_ERROR_GENERIC;
+ }
return TFM_HAL_SUCCESS;
}
+#endif /* TFM_LVL == 3 */
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/CMakeLists.txt b/platform/ext/target/nxp/lpcxpresso55s69/CMakeLists.txt
index 4c21e68c6c..a9532c0a74 100644
--- a/platform/ext/target/nxp/lpcxpresso55s69/CMakeLists.txt
+++ b/platform/ext/target/nxp/lpcxpresso55s69/CMakeLists.txt
@@ -1,5 +1,6 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+# Copyright (c) 2021, NXP Semiconductors. All rights reserved.
# Copyright (c) 2020, Linaro. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -7,6 +8,9 @@
#-------------------------------------------------------------------------------
cmake_policy(SET CMP0076 NEW)
+
+include(pull_drivers.cmake)
+
set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR})
string(TOLOWER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_LOWER)
@@ -68,6 +72,7 @@ target_include_directories(platform_s
.
Native_Driver
Native_Driver/project_template/s
+ Native_Driver/drivers
Device/Config
Device/Include
partition
@@ -83,29 +88,29 @@ target_include_directories(platform_s
target_sources(platform_s
PRIVATE
target_cfg.c
- spm_hal.c
- tfm_hal_isolation.c
+ ../common/spm_hal.c
+ ../common/tfm_hal_isolation.c
Native_Driver/project_template/s/board.c
Native_Driver/project_template/s/clock_config.c
Native_Driver/project_template/s/peripherals.c
Native_Driver/project_template/s/pin_mux.c
Native_Driver/system_LPC55S69_cm33_core0.c
+ Native_Driver/drivers/fsl_clock.c
+ Native_Driver/drivers/fsl_power.c
+ Native_Driver/drivers/fsl_reset.c
../common/CMSIS_Driver/Driver_Flash.c
../common/CMSIS_Driver/Driver_USART.c
- ../common/Native_Driver/components/lists/generic_list.c
- ../common/Native_Driver/components/serial_manager/serial_manager.c
- ../common/Native_Driver/components/serial_manager/serial_port_uart.c
- ../common/Native_Driver/components/uart/usart_adapter.c
+ ../common/Native_Driver/components/lists/fsl_component_generic_list.c
+ ../common/Native_Driver/components/serial_manager/fsl_component_serial_manager.c
+ ../common/Native_Driver/components/serial_manager/fsl_component_serial_port_uart.c
+ ../common/Native_Driver/components/uart/fsl_adapter_usart.c
../common/Native_Driver/drivers/fsl_casper.c
- ../common/Native_Driver/drivers/fsl_clock.c
../common/Native_Driver/drivers/fsl_common.c
../common/Native_Driver/drivers/fsl_ctimer.c
../common/Native_Driver/drivers/fsl_flexcomm.c
../common/Native_Driver/drivers/fsl_gpio.c
../common/Native_Driver/drivers/fsl_hashcrypt.c
../common/Native_Driver/drivers/fsl_iap.c
- ../common/Native_Driver/drivers/fsl_power.c
- ../common/Native_Driver/drivers/fsl_reset.c
../common/Native_Driver/drivers/fsl_rng.c
../common/Native_Driver/drivers/fsl_usart.c
../common/Native_Driver/utilities/fsl_assert.c
@@ -114,8 +119,8 @@ target_sources(platform_s
../common/Native_Driver/utilities/str/fsl_str.c
../common/Native_Driver/mpu_armv8m_drv.c
${CMAKE_SOURCE_DIR}/platform/ext/common/tfm_hal_isolation_mpu_v8m.c
- $<$<BOOL:${TFM_PARTITION_PLATFORM}>:${CMAKE_CURRENT_SOURCE_DIR}/plat_test.c>
- $<$<BOOL:${TFM_PARTITION_PLATFORM}>:${CMAKE_CURRENT_SOURCE_DIR}/services/src/tfm_platform_system.c>
+ $<$<BOOL:${TFM_PARTITION_PLATFORM}>:${PLATFORM_DIR}/ext/target/nxp/common/plat_test.c>
+ $<$<BOOL:${TFM_PARTITION_PLATFORM}>:${PLATFORM_DIR}/ext/target/nxp/common/services/src/tfm_platform_system.c>
)
target_compile_options(platform_s
@@ -142,6 +147,7 @@ target_include_directories(platform_ns
Device/Include
Native_Driver
Native_Driver/project_template/ns
+ Native_Driver/drivers
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/lists
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/serial_manager
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/uart
@@ -158,29 +164,29 @@ target_sources(platform_ns
Native_Driver/project_template/ns/clock_config.c
Native_Driver/project_template/ns/peripherals.c
Native_Driver/project_template/ns/pin_mux.c
+ Native_Driver/drivers/fsl_clock.c
+ Native_Driver/drivers/fsl_power.c
+ Native_Driver/drivers/fsl_reset.c
${PLATFORM_DIR}/ext/target/nxp/common/CMSIS_Driver/Driver_USART.c
- ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/lists/generic_list.c
- ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_manager.c
- ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/serial_manager/serial_port_uart.c
- ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/uart/usart_adapter.c
+ ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/lists/fsl_component_generic_list.c
+ ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/serial_manager/fsl_component_serial_manager.c
+ ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/serial_manager/fsl_component_serial_port_uart.c
+ ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/uart/fsl_adapter_usart.c
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_casper.c
- ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_clock.c
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_common.c
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_ctimer.c
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_flexcomm.c
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_gpio.c
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_hashcrypt.c
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_iap.c
- ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_power.c
- ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_reset.c
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_rng.c
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_usart.c
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/utilities/fsl_assert.c
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/utilities/fsl_sbrk.c
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console.c
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/utilities/str/fsl_str.c
- $<$<BOOL:${TFM_PARTITION_PLATFORM}>:${CMAKE_CURRENT_SOURCE_DIR}/plat_test.c>
- $<$<BOOL:${TFM_PARTITION_PLATFORM}>:${CMAKE_CURRENT_SOURCE_DIR}/services/src/tfm_platform_system.c>
+ $<$<BOOL:${TFM_PARTITION_PLATFORM}>:${PLATFORM_DIR}/ext/target/nxp/common/plat_test.c>
+ $<$<BOOL:${TFM_PARTITION_PLATFORM}>:${PLATFORM_DIR}/ext/target/nxp/common/services/src/tfm_platform_system.c>
)
#========================= Platform BL2 =======================================#
@@ -192,6 +198,7 @@ if(BL2)
Device/Include
Native_Driver
Native_Driver/project_template/bl2
+ Native_Driver/drivers
${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers
PRIVATE
.
@@ -209,19 +216,19 @@ if(BL2)
Native_Driver/project_template/bl2/clock_config.c
Native_Driver/project_template/bl2/pin_mux.c
Native_Driver/system_LPC55S69_cm33_core0.c
+ Native_Driver/drivers/fsl_clock.c
+ Native_Driver/drivers/fsl_power.c
+ Native_Driver/drivers/fsl_reset.c
../common/CMSIS_Driver/Driver_Flash.c
../common/CMSIS_Driver/Driver_USART.c
- ../common/Native_Driver/components/serial_manager/serial_manager.c
- ../common/Native_Driver/components/serial_manager/serial_port_uart.c
- ../common/Native_Driver/components/uart/usart_adapter.c
+ ../common/Native_Driver/components/serial_manager/fsl_component_serial_manager.c
+ ../common/Native_Driver/components/serial_manager/fsl_component_serial_port_uart.c
+ ../common/Native_Driver/components/uart/fsl_adapter_usart.c
../common/Native_Driver/drivers/fsl_casper.c
- ../common/Native_Driver/drivers/fsl_clock.c
../common/Native_Driver/drivers/fsl_common.c
../common/Native_Driver/drivers/fsl_flexcomm.c
../common/Native_Driver/drivers/fsl_hashcrypt.c
../common/Native_Driver/drivers/fsl_iap.c
- ../common/Native_Driver/drivers/fsl_power.c
- ../common/Native_Driver/drivers/fsl_reset.c
../common/Native_Driver/drivers/fsl_rng.c
../common/Native_Driver/drivers/fsl_usart.c
../common/Native_Driver/utilities/fsl_assert.c
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/Device/Source/armgcc/startup_LPC55S69_cm33_core0_ns.S b/platform/ext/target/nxp/lpcxpresso55s69/Device/Source/armgcc/startup_LPC55S69_cm33_core0_ns.S
index b678a0dfc5..32bf748a88 100755
--- a/platform/ext/target/nxp/lpcxpresso55s69/Device/Source/armgcc/startup_LPC55S69_cm33_core0_ns.S
+++ b/platform/ext/target/nxp/lpcxpresso55s69/Device/Source/armgcc/startup_LPC55S69_cm33_core0_ns.S
@@ -40,69 +40,68 @@ __Vectors:
.long PendSV_Handler /* PendSV Handler*/
.long SysTick_Handler /* SysTick Handler*/
- /* External Interrupts */
- .long WDT_BOD_IRQHandler /* Windowed watchdog timer, Brownout detect, Flash interrupt */
- .long DMA0_IRQHandler /* DMA0 controller */
- .long GINT0_IRQHandler /* GPIO group 0 */
- .long GINT1_IRQHandler /* GPIO group 1 */
- .long PIN_INT0_IRQHandler /* Pin interrupt 0 or pattern match engine slice 0 */
- .long PIN_INT1_IRQHandler /* Pin interrupt 1or pattern match engine slice 1 */
- .long PIN_INT2_IRQHandler /* Pin interrupt 2 or pattern match engine slice 2 */
- .long PIN_INT3_IRQHandler /* Pin interrupt 3 or pattern match engine slice 3 */
- .long UTICK0_IRQHandler /* Micro-tick Timer */
- .long MRT0_IRQHandler /* Multi-rate timer */
- .long CTIMER0_IRQHandler /* Standard counter/timer CTIMER0 */
- .long CTIMER1_IRQHandler /* Standard counter/timer CTIMER1 */
- .long SCT0_IRQHandler /* SCTimer/PWM */
- .long CTIMER3_IRQHandler /* Standard counter/timer CTIMER3 */
- .long FLEXCOMM0_IRQHandler /* Flexcomm Interface 0 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM1_IRQHandler /* Flexcomm Interface 1 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM2_IRQHandler /* Flexcomm Interface 2 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM3_IRQHandler /* Flexcomm Interface 3 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM4_IRQHandler /* Flexcomm Interface 4 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM5_IRQHandler /* Flexcomm Interface 5 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM6_IRQHandler /* Flexcomm Interface 6 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM7_IRQHandler /* Flexcomm Interface 7 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long ADC0_IRQHandler /* ADC0 */
- .long Reserved39_IRQHandler /* Reserved interrupt */
- .long ACMP_IRQHandler /* ACMP interrupts */
- .long Reserved41_IRQHandler /* Reserved interrupt */
- .long Reserved42_IRQHandler /* Reserved interrupt */
- .long USB0_NEEDCLK_IRQHandler /* USB Activity Wake-up Interrupt */
- .long USB0_IRQHandler /* USB device */
- .long RTC_IRQHandler /* RTC alarm and wake-up interrupts */
- .long Reserved46_IRQHandler /* Reserved interrupt */
- .long MAILBOX_IRQHandler /* WAKEUP,Mailbox interrupt (present on selected devices) */
- .long PIN_INT4_IRQHandler /* Pin interrupt 4 or pattern match engine slice 4 int */
- .long PIN_INT5_IRQHandler /* Pin interrupt 5 or pattern match engine slice 5 int */
- .long PIN_INT6_IRQHandler /* Pin interrupt 6 or pattern match engine slice 6 int */
- .long PIN_INT7_IRQHandler /* Pin interrupt 7 or pattern match engine slice 7 int */
- .long CTIMER2_IRQHandler /* Standard counter/timer CTIMER2 */
- .long CTIMER4_IRQHandler /* Standard counter/timer CTIMER4 */
- .long OS_EVENT_IRQHandler /* OSEVTIMER0 and OSEVTIMER0_WAKEUP interrupts */
- .long Reserved55_IRQHandler /* Reserved interrupt */
- .long Reserved56_IRQHandler /* Reserved interrupt */
- .long Reserved57_IRQHandler /* Reserved interrupt */
- .long SDIO_IRQHandler /* SD/MMC */
- .long Reserved59_IRQHandler /* Reserved interrupt */
- .long Reserved60_IRQHandler /* Reserved interrupt */
- .long Reserved61_IRQHandler /* Reserved interrupt */
- .long USB1_UTMI_IRQHandler /* USB1_UTMI */
- .long USB1_IRQHandler /* USB1 interrupt */
- .long USB1_NEEDCLK_IRQHandler /* USB1 activity */
- .long SEC_HYPERVISOR_CALL_IRQHandler /* SEC_HYPERVISOR_CALL interrupt */
- .long SEC_GPIO_INT0_IRQ0_IRQHandler /* SEC_GPIO_INT0_IRQ0 interrupt */
- .long SEC_GPIO_INT0_IRQ1_IRQHandler /* SEC_GPIO_INT0_IRQ1 interrupt */
- .long PLU_IRQHandler /* PLU interrupt */
- .long SEC_VIO_IRQHandler /* SEC_VIO interrupt */
- .long HASHCRYPT_IRQHandler /* HASHCRYPT interrupt */
- .long CASER_IRQHandler /* CASPER interrupt */
- .long PUF_IRQHandler /* PUF interrupt */
- .long PQ_IRQHandler /* PQ interrupt */
- .long DMA1_IRQHandler /* DMA1 interrupt */
- .long LSPI_HS_IRQHandler /* Flexcomm Interface 8 (SPI, , FLEXCOMM) */
-
- .size __Vectors, . - __Vectors
+ /* External Interrupts*/
+ .long WDT_BOD_IRQHandler /* Windowed watchdog timer, Brownout detect, Flash interrupt */
+ .long DMA0_IRQHandler /* DMA0 controller */
+ .long GINT0_IRQHandler /* GPIO group 0 */
+ .long GINT1_IRQHandler /* GPIO group 1 */
+ .long PIN_INT0_IRQHandler /* Pin interrupt 0 or pattern match engine slice 0 */
+ .long PIN_INT1_IRQHandler /* Pin interrupt 1or pattern match engine slice 1 */
+ .long PIN_INT2_IRQHandler /* Pin interrupt 2 or pattern match engine slice 2 */
+ .long PIN_INT3_IRQHandler /* Pin interrupt 3 or pattern match engine slice 3 */
+ .long UTICK0_IRQHandler /* Micro-tick Timer */
+ .long MRT0_IRQHandler /* Multi-rate timer */
+ .long CTIMER0_IRQHandler /* Standard counter/timer CTIMER0 */
+ .long CTIMER1_IRQHandler /* Standard counter/timer CTIMER1 */
+ .long SCT0_IRQHandler /* SCTimer/PWM */
+ .long CTIMER3_IRQHandler /* Standard counter/timer CTIMER3 */
+ .long FLEXCOMM0_IRQHandler /* Flexcomm Interface 0 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM1_IRQHandler /* Flexcomm Interface 1 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM2_IRQHandler /* Flexcomm Interface 2 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM3_IRQHandler /* Flexcomm Interface 3 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM4_IRQHandler /* Flexcomm Interface 4 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM5_IRQHandler /* Flexcomm Interface 5 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM6_IRQHandler /* Flexcomm Interface 6 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM7_IRQHandler /* Flexcomm Interface 7 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long ADC0_IRQHandler /* ADC0 */
+ .long Reserved39_IRQHandler /* Reserved interrupt */
+ .long ACMP_IRQHandler /* ACMP interrupts */
+ .long Reserved41_IRQHandler /* Reserved interrupt */
+ .long Reserved42_IRQHandler /* Reserved interrupt */
+ .long USB0_NEEDCLK_IRQHandler /* USB Activity Wake-up Interrupt */
+ .long USB0_IRQHandler /* USB device */
+ .long RTC_IRQHandler /* RTC alarm and wake-up interrupts */
+ .long Reserved46_IRQHandler /* Reserved interrupt */
+ .long MAILBOX_IRQHandler /* WAKEUP,Mailbox interrupt (present on selected devices) */
+ .long PIN_INT4_IRQHandler /* Pin interrupt 4 or pattern match engine slice 4 int */
+ .long PIN_INT5_IRQHandler /* Pin interrupt 5 or pattern match engine slice 5 int */
+ .long PIN_INT6_IRQHandler /* Pin interrupt 6 or pattern match engine slice 6 int */
+ .long PIN_INT7_IRQHandler /* Pin interrupt 7 or pattern match engine slice 7 int */
+ .long CTIMER2_IRQHandler /* Standard counter/timer CTIMER2 */
+ .long CTIMER4_IRQHandler /* Standard counter/timer CTIMER4 */
+ .long OS_EVENT_IRQHandler /* OSEVTIMER0 and OSEVTIMER0_WAKEUP interrupts */
+ .long Reserved55_IRQHandler /* Reserved interrupt */
+ .long Reserved56_IRQHandler /* Reserved interrupt */
+ .long Reserved57_IRQHandler /* Reserved interrupt */
+ .long SDIO_IRQHandler /* SD/MMC */
+ .long Reserved59_IRQHandler /* Reserved interrupt */
+ .long Reserved60_IRQHandler /* Reserved interrupt */
+ .long Reserved61_IRQHandler /* Reserved interrupt */
+ .long USB1_PHY_IRQHandler /* USB1_PHY */
+ .long USB1_IRQHandler /* USB1 interrupt */
+ .long USB1_NEEDCLK_IRQHandler /* USB1 activity */
+ .long SEC_HYPERVISOR_CALL_IRQHandler /* SEC_HYPERVISOR_CALL interrupt */
+ .long SEC_GPIO_INT0_IRQ0_IRQHandler /* SEC_GPIO_INT0_IRQ0 interrupt */
+ .long SEC_GPIO_INT0_IRQ1_IRQHandler /* SEC_GPIO_INT0_IRQ1 interrupt */
+ .long PLU_IRQHandler /* PLU interrupt */
+ .long SEC_VIO_IRQHandler /* SEC_VIO interrupt */
+ .long HASHCRYPT_IRQHandler /* HASHCRYPT interrupt */
+ .long CASER_IRQHandler /* CASPER interrupt */
+ .long PUF_IRQHandler /* PUF interrupt */
+ .long PQ_IRQHandler /* PQ interrupt */
+ .long DMA1_IRQHandler /* DMA1 interrupt */
+ .long FLEXCOMM8_IRQHandler /* Flexcomm Interface 8 (SPI, , FLEXCOMM) */
+ .size __Vectors, . - __Vectors
.text
.thumb
@@ -232,7 +231,6 @@ Reset_Handler:
#endif /* __STARTUP_CLEAR_BSS_MULTIPLE || __STARTUP_CLEAR_BSS */
mrs r0, control /* Get control value */
- orr r0, r0, #1 /* Select switch to unprivilage mode */
orr r0, r0, #2 /* Select switch to PSP */
msr control, r0
ldr r0, =Image$$ARM_LIB_STACK$$ZI$$Limit
@@ -715,12 +713,12 @@ Reserved61_IRQHandler:
.align 1
.thumb_func
- .weak USB1_UTMI_IRQHandler
- .type USB1_UTMI_IRQHandler, %function
-USB1_UTMI_IRQHandler:
- ldr r0,=USB1_UTMI_DriverIRQHandler
+ .weak USB1_PHY_IRQHandler
+ .type USB1_PHY_IRQHandler, %function
+USB1_PHY_IRQHandler:
+ ldr r0,=USB1_PHY_DriverIRQHandler
bx r0
- .size USB1_UTMI_IRQHandler, . - USB1_UTMI_IRQHandler
+ .size USB1_PHY_IRQHandler, . - USB1_PHY_IRQHandler
.align 1
.thumb_func
@@ -832,12 +830,12 @@ DMA1_IRQHandler:
.align 1
.thumb_func
- .weak LSPI_HS_IRQHandler
- .type LSPI_HS_IRQHandler, %function
-LSPI_HS_IRQHandler:
- ldr r0,=LSPI_HS_DriverIRQHandler
+ .weak FLEXCOMM8_IRQHandler
+ .type FLEXCOMM8_IRQHandler, %function
+FLEXCOMM8_IRQHandler:
+ ldr r0,=FLEXCOMM8_DriverIRQHandler
bx r0
- .size LSPI_HS_IRQHandler, . - LSPI_HS_IRQHandler
+ .size FLEXCOMM8_IRQHandler, . - FLEXCOMM8_IRQHandler
/* Macro to define default handlers. Default handler
* will be weak symbol and just dead loops. They can be
@@ -850,65 +848,65 @@ LSPI_HS_IRQHandler:
def_irq_handler MemManage_Handler
def_irq_handler BusFault_Handler
def_irq_handler DebugMon_Handler
- def_irq_handler WDT_BOD_DriverIRQHandler
- def_irq_handler DMA0_DriverIRQHandler
- def_irq_handler GINT0_DriverIRQHandler
- def_irq_handler GINT1_DriverIRQHandler
- def_irq_handler PIN_INT0_DriverIRQHandler
- def_irq_handler PIN_INT1_DriverIRQHandler
- def_irq_handler PIN_INT2_DriverIRQHandler
- def_irq_handler PIN_INT3_DriverIRQHandler
- def_irq_handler UTICK0_DriverIRQHandler
- def_irq_handler MRT0_DriverIRQHandler
- def_irq_handler CTIMER0_DriverIRQHandler
- def_irq_handler CTIMER1_DriverIRQHandler
- def_irq_handler SCT0_DriverIRQHandler
- def_irq_handler CTIMER3_DriverIRQHandler
- def_irq_handler FLEXCOMM0_DriverIRQHandler
- def_irq_handler FLEXCOMM1_DriverIRQHandler
- def_irq_handler FLEXCOMM2_DriverIRQHandler
- def_irq_handler FLEXCOMM3_DriverIRQHandler
- def_irq_handler FLEXCOMM4_DriverIRQHandler
- def_irq_handler FLEXCOMM5_DriverIRQHandler
- def_irq_handler FLEXCOMM6_DriverIRQHandler
- def_irq_handler FLEXCOMM7_DriverIRQHandler
- def_irq_handler ADC0_DriverIRQHandler
- def_irq_handler Reserved39_DriverIRQHandler
- def_irq_handler ACMP_DriverIRQHandler
- def_irq_handler Reserved41_DriverIRQHandler
- def_irq_handler Reserved42_DriverIRQHandler
- def_irq_handler USB0_NEEDCLK_DriverIRQHandler
- def_irq_handler USB0_DriverIRQHandler
- def_irq_handler RTC_DriverIRQHandler
- def_irq_handler Reserved46_DriverIRQHandler
- def_irq_handler MAILBOX_DriverIRQHandler
- def_irq_handler PIN_INT4_DriverIRQHandler
- def_irq_handler PIN_INT5_DriverIRQHandler
- def_irq_handler PIN_INT6_DriverIRQHandler
- def_irq_handler PIN_INT7_DriverIRQHandler
- def_irq_handler CTIMER2_DriverIRQHandler
- def_irq_handler CTIMER4_DriverIRQHandler
- def_irq_handler OS_EVENT_DriverIRQHandler
- def_irq_handler Reserved55_DriverIRQHandler
- def_irq_handler Reserved56_DriverIRQHandler
- def_irq_handler Reserved57_DriverIRQHandler
- def_irq_handler SDIO_DriverIRQHandler
- def_irq_handler Reserved59_DriverIRQHandler
- def_irq_handler Reserved60_DriverIRQHandler
- def_irq_handler Reserved61_DriverIRQHandler
- def_irq_handler USB1_UTMI_DriverIRQHandler
- def_irq_handler USB1_DriverIRQHandler
- def_irq_handler USB1_NEEDCLK_DriverIRQHandler
- def_irq_handler SEC_HYPERVISOR_CALL_DriverIRQHandler
- def_irq_handler SEC_GPIO_INT0_IRQ0_DriverIRQHandler
- def_irq_handler SEC_GPIO_INT0_IRQ1_DriverIRQHandler
- def_irq_handler PLU_DriverIRQHandler
- def_irq_handler SEC_VIO_DriverIRQHandler
- def_irq_handler HASHCRYPT_DriverIRQHandler
- def_irq_handler CASER_DriverIRQHandler
- def_irq_handler PUF_DriverIRQHandler
- def_irq_handler PQ_DriverIRQHandler
- def_irq_handler DMA1_DriverIRQHandler
- def_irq_handler LSPI_HS_DriverIRQHandler
+ def_irq_handler WDT_BOD_DriverIRQHandler /* Windowed watchdog timer, Brownout detect, Flash interrupt */
+ def_irq_handler DMA0_DriverIRQHandler /* DMA0 controller */
+ def_irq_handler GINT0_DriverIRQHandler /* GPIO group 0 */
+ def_irq_handler GINT1_DriverIRQHandler /* GPIO group 1 */
+ def_irq_handler PIN_INT0_DriverIRQHandler /* Pin interrupt 0 or pattern match engine slice 0 */
+ def_irq_handler PIN_INT1_DriverIRQHandler /* Pin interrupt 1or pattern match engine slice 1 */
+ def_irq_handler PIN_INT2_DriverIRQHandler /* Pin interrupt 2 or pattern match engine slice 2 */
+ def_irq_handler PIN_INT3_DriverIRQHandler /* Pin interrupt 3 or pattern match engine slice 3 */
+ def_irq_handler UTICK0_DriverIRQHandler /* Micro-tick Timer */
+ def_irq_handler MRT0_DriverIRQHandler /* Multi-rate timer */
+ def_irq_handler CTIMER0_DriverIRQHandler /* Standard counter/timer CTIMER0 */
+ def_irq_handler CTIMER1_DriverIRQHandler /* Standard counter/timer CTIMER1 */
+ def_irq_handler SCT0_DriverIRQHandler /* SCTimer/PWM */
+ def_irq_handler CTIMER3_DriverIRQHandler /* Standard counter/timer CTIMER3 */
+ def_irq_handler FLEXCOMM0_DriverIRQHandler /* Flexcomm Interface 0 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM1_DriverIRQHandler /* Flexcomm Interface 1 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM2_DriverIRQHandler /* Flexcomm Interface 2 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM3_DriverIRQHandler /* Flexcomm Interface 3 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM4_DriverIRQHandler /* Flexcomm Interface 4 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM5_DriverIRQHandler /* Flexcomm Interface 5 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM6_DriverIRQHandler /* Flexcomm Interface 6 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM7_DriverIRQHandler /* Flexcomm Interface 7 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler ADC0_DriverIRQHandler /* ADC0 */
+ def_irq_handler Reserved39_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler ACMP_DriverIRQHandler /* ACMP interrupts */
+ def_irq_handler Reserved41_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler Reserved42_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler USB0_NEEDCLK_DriverIRQHandler /* USB Activity Wake-up Interrupt */
+ def_irq_handler USB0_DriverIRQHandler /* USB device */
+ def_irq_handler RTC_DriverIRQHandler /* RTC alarm and wake-up interrupts */
+ def_irq_handler Reserved46_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler MAILBOX_DriverIRQHandler /* WAKEUP,Mailbox interrupt (present on selected devices) */
+ def_irq_handler PIN_INT4_DriverIRQHandler /* Pin interrupt 4 or pattern match engine slice 4 int */
+ def_irq_handler PIN_INT5_DriverIRQHandler /* Pin interrupt 5 or pattern match engine slice 5 int */
+ def_irq_handler PIN_INT6_DriverIRQHandler /* Pin interrupt 6 or pattern match engine slice 6 int */
+ def_irq_handler PIN_INT7_DriverIRQHandler /* Pin interrupt 7 or pattern match engine slice 7 int */
+ def_irq_handler CTIMER2_DriverIRQHandler /* Standard counter/timer CTIMER2 */
+ def_irq_handler CTIMER4_DriverIRQHandler /* Standard counter/timer CTIMER4 */
+ def_irq_handler OS_EVENT_DriverIRQHandler /* OSEVTIMER0 and OSEVTIMER0_WAKEUP interrupts */
+ def_irq_handler Reserved55_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler Reserved56_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler Reserved57_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler SDIO_DriverIRQHandler /* SD/MMC */
+ def_irq_handler Reserved59_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler Reserved60_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler Reserved61_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler USB1_PHY_DriverIRQHandler /* USB1_PHY */
+ def_irq_handler USB1_DriverIRQHandler /* USB1 interrupt */
+ def_irq_handler USB1_NEEDCLK_DriverIRQHandler /* USB1 activity */
+ def_irq_handler SEC_HYPERVISOR_CALL_DriverIRQHandler /* SEC_HYPERVISOR_CALL interrupt */
+ def_irq_handler SEC_GPIO_INT0_IRQ0_DriverIRQHandler /* SEC_GPIO_INT0_IRQ0 interrupt */
+ def_irq_handler SEC_GPIO_INT0_IRQ1_DriverIRQHandler /* SEC_GPIO_INT0_IRQ1 interrupt */
+ def_irq_handler PLU_DriverIRQHandler /* PLU interrupt */
+ def_irq_handler SEC_VIO_DriverIRQHandler /* SEC_VIO interrupt */
+ def_irq_handler HASHCRYPT_DriverIRQHandler /* HASHCRYPT interrupt */
+ def_irq_handler CASER_DriverIRQHandler /* CASPER interrupt */
+ def_irq_handler PUF_DriverIRQHandler /* PUF interrupt */
+ def_irq_handler PQ_DriverIRQHandler /* PQ interrupt */
+ def_irq_handler DMA1_DriverIRQHandler /* DMA1 interrupt */
+ def_irq_handler FLEXCOMM8_DriverIRQHandler /* Flexcomm Interface 8 (SPI, , FLEXCOMM) */
.end
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/Device/Source/armgcc/startup_LPC55S69_cm33_core0_s.S b/platform/ext/target/nxp/lpcxpresso55s69/Device/Source/armgcc/startup_LPC55S69_cm33_core0_s.S
index 2b4dff0899..01aa5961a9 100755
--- a/platform/ext/target/nxp/lpcxpresso55s69/Device/Source/armgcc/startup_LPC55S69_cm33_core0_s.S
+++ b/platform/ext/target/nxp/lpcxpresso55s69/Device/Source/armgcc/startup_LPC55S69_cm33_core0_s.S
@@ -1,5 +1,5 @@
;/*
-; * Copyright (c) 2009-2020 ARM Limited
+; * Copyright (c) 2009-2020 Arm Limited
; *
; * Licensed under the Apache License, Version 2.0 (the "License");
; * you may not use this file except in compliance with the License.
@@ -43,68 +43,67 @@ __Vectors:
.long PendSV_Handler /* PendSV Handler*/
.long SysTick_Handler /* SysTick Handler*/
- /* External Interrupts */
- .long WDT_BOD_IRQHandler /* Windowed watchdog timer, Brownout detect, Flash interrupt */
- .long DMA0_IRQHandler /* DMA0 controller */
- .long GINT0_IRQHandler /* GPIO group 0 */
- .long GINT1_IRQHandler /* GPIO group 1 */
- .long PIN_INT0_IRQHandler /* Pin interrupt 0 or pattern match engine slice 0 */
- .long PIN_INT1_IRQHandler /* Pin interrupt 1or pattern match engine slice 1 */
- .long PIN_INT2_IRQHandler /* Pin interrupt 2 or pattern match engine slice 2 */
- .long PIN_INT3_IRQHandler /* Pin interrupt 3 or pattern match engine slice 3 */
- .long UTICK0_IRQHandler /* Micro-tick Timer */
- .long MRT0_IRQHandler /* Multi-rate timer */
- .long CTIMER0_IRQHandler /* Standard counter/timer CTIMER0 */
- .long CTIMER1_IRQHandler /* Standard counter/timer CTIMER1 */
- .long SCT0_IRQHandler /* SCTimer/PWM */
- .long CTIMER3_IRQHandler /* Standard counter/timer CTIMER3 */
- .long FLEXCOMM0_IRQHandler /* Flexcomm Interface 0 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM1_IRQHandler /* Flexcomm Interface 1 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM2_IRQHandler /* Flexcomm Interface 2 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM3_IRQHandler /* Flexcomm Interface 3 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM4_IRQHandler /* Flexcomm Interface 4 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM5_IRQHandler /* Flexcomm Interface 5 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM6_IRQHandler /* Flexcomm Interface 6 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long FLEXCOMM7_IRQHandler /* Flexcomm Interface 7 (USART, SPI, I2C, I2S, FLEXCOMM) */
- .long ADC0_IRQHandler /* ADC0 */
- .long Reserved39_IRQHandler /* Reserved interrupt */
- .long ACMP_IRQHandler /* ACMP interrupts */
- .long Reserved41_IRQHandler /* Reserved interrupt */
- .long Reserved42_IRQHandler /* Reserved interrupt */
- .long USB0_NEEDCLK_IRQHandler /* USB Activity Wake-up Interrupt */
- .long USB0_IRQHandler /* USB device */
- .long RTC_IRQHandler /* RTC alarm and wake-up interrupts */
- .long Reserved46_IRQHandler /* Reserved interrupt */
- .long MAILBOX_IRQHandler /* WAKEUP,Mailbox interrupt (present on selected devices) */
- .long PIN_INT4_IRQHandler /* Pin interrupt 4 or pattern match engine slice 4 int */
- .long PIN_INT5_IRQHandler /* Pin interrupt 5 or pattern match engine slice 5 int */
- .long PIN_INT6_IRQHandler /* Pin interrupt 6 or pattern match engine slice 6 int */
- .long PIN_INT7_IRQHandler /* Pin interrupt 7 or pattern match engine slice 7 int */
- .long CTIMER2_IRQHandler /* Standard counter/timer CTIMER2 */
- .long CTIMER4_IRQHandler /* Standard counter/timer CTIMER4 */
- .long OS_EVENT_IRQHandler /* OSEVTIMER0 and OSEVTIMER0_WAKEUP interrupts */
- .long Reserved55_IRQHandler /* Reserved interrupt */
- .long Reserved56_IRQHandler /* Reserved interrupt */
- .long Reserved57_IRQHandler /* Reserved interrupt */
- .long SDIO_IRQHandler /* SD/MMC */
- .long Reserved59_IRQHandler /* Reserved interrupt */
- .long Reserved60_IRQHandler /* Reserved interrupt */
- .long Reserved61_IRQHandler /* Reserved interrupt */
- .long USB1_UTMI_IRQHandler /* USB1_UTMI */
- .long USB1_IRQHandler /* USB1 interrupt */
- .long USB1_NEEDCLK_IRQHandler /* USB1 activity */
- .long SEC_HYPERVISOR_CALL_IRQHandler /* SEC_HYPERVISOR_CALL interrupt */
- .long SEC_GPIO_INT0_IRQ0_IRQHandler /* SEC_GPIO_INT0_IRQ0 interrupt */
- .long SEC_GPIO_INT0_IRQ1_IRQHandler /* SEC_GPIO_INT0_IRQ1 interrupt */
- .long PLU_IRQHandler /* PLU interrupt */
- .long SEC_VIO_IRQHandler /* SEC_VIO interrupt */
- .long HASHCRYPT_IRQHandler /* HASHCRYPT interrupt */
- .long CASER_IRQHandler /* CASPER interrupt */
- .long PUF_IRQHandler /* PUF interrupt */
- .long PQ_IRQHandler /* PQ interrupt */
- .long DMA1_IRQHandler /* DMA1 interrupt */
- .long LSPI_HS_IRQHandler /* Flexcomm Interface 8 (SPI, , FLEXCOMM) */
-
+ /* External Interrupts*/
+ .long WDT_BOD_IRQHandler /* Windowed watchdog timer, Brownout detect, Flash interrupt */
+ .long DMA0_IRQHandler /* DMA0 controller */
+ .long GINT0_IRQHandler /* GPIO group 0 */
+ .long GINT1_IRQHandler /* GPIO group 1 */
+ .long PIN_INT0_IRQHandler /* Pin interrupt 0 or pattern match engine slice 0 */
+ .long PIN_INT1_IRQHandler /* Pin interrupt 1or pattern match engine slice 1 */
+ .long PIN_INT2_IRQHandler /* Pin interrupt 2 or pattern match engine slice 2 */
+ .long PIN_INT3_IRQHandler /* Pin interrupt 3 or pattern match engine slice 3 */
+ .long UTICK0_IRQHandler /* Micro-tick Timer */
+ .long MRT0_IRQHandler /* Multi-rate timer */
+ .long CTIMER0_IRQHandler /* Standard counter/timer CTIMER0 */
+ .long CTIMER1_IRQHandler /* Standard counter/timer CTIMER1 */
+ .long SCT0_IRQHandler /* SCTimer/PWM */
+ .long CTIMER3_IRQHandler /* Standard counter/timer CTIMER3 */
+ .long FLEXCOMM0_IRQHandler /* Flexcomm Interface 0 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM1_IRQHandler /* Flexcomm Interface 1 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM2_IRQHandler /* Flexcomm Interface 2 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM3_IRQHandler /* Flexcomm Interface 3 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM4_IRQHandler /* Flexcomm Interface 4 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM5_IRQHandler /* Flexcomm Interface 5 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM6_IRQHandler /* Flexcomm Interface 6 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long FLEXCOMM7_IRQHandler /* Flexcomm Interface 7 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ .long ADC0_IRQHandler /* ADC0 */
+ .long Reserved39_IRQHandler /* Reserved interrupt */
+ .long ACMP_IRQHandler /* ACMP interrupts */
+ .long Reserved41_IRQHandler /* Reserved interrupt */
+ .long Reserved42_IRQHandler /* Reserved interrupt */
+ .long USB0_NEEDCLK_IRQHandler /* USB Activity Wake-up Interrupt */
+ .long USB0_IRQHandler /* USB device */
+ .long RTC_IRQHandler /* RTC alarm and wake-up interrupts */
+ .long Reserved46_IRQHandler /* Reserved interrupt */
+ .long MAILBOX_IRQHandler /* WAKEUP,Mailbox interrupt (present on selected devices) */
+ .long PIN_INT4_IRQHandler /* Pin interrupt 4 or pattern match engine slice 4 int */
+ .long PIN_INT5_IRQHandler /* Pin interrupt 5 or pattern match engine slice 5 int */
+ .long PIN_INT6_IRQHandler /* Pin interrupt 6 or pattern match engine slice 6 int */
+ .long PIN_INT7_IRQHandler /* Pin interrupt 7 or pattern match engine slice 7 int */
+ .long CTIMER2_IRQHandler /* Standard counter/timer CTIMER2 */
+ .long CTIMER4_IRQHandler /* Standard counter/timer CTIMER4 */
+ .long OS_EVENT_IRQHandler /* OSEVTIMER0 and OSEVTIMER0_WAKEUP interrupts */
+ .long Reserved55_IRQHandler /* Reserved interrupt */
+ .long Reserved56_IRQHandler /* Reserved interrupt */
+ .long Reserved57_IRQHandler /* Reserved interrupt */
+ .long SDIO_IRQHandler /* SD/MMC */
+ .long Reserved59_IRQHandler /* Reserved interrupt */
+ .long Reserved60_IRQHandler /* Reserved interrupt */
+ .long Reserved61_IRQHandler /* Reserved interrupt */
+ .long USB1_PHY_IRQHandler /* USB1_PHY */
+ .long USB1_IRQHandler /* USB1 interrupt */
+ .long USB1_NEEDCLK_IRQHandler /* USB1 activity */
+ .long SEC_HYPERVISOR_CALL_IRQHandler /* SEC_HYPERVISOR_CALL interrupt */
+ .long SEC_GPIO_INT0_IRQ0_IRQHandler /* SEC_GPIO_INT0_IRQ0 interrupt */
+ .long SEC_GPIO_INT0_IRQ1_IRQHandler /* SEC_GPIO_INT0_IRQ1 interrupt */
+ .long PLU_IRQHandler /* PLU interrupt */
+ .long SEC_VIO_IRQHandler /* SEC_VIO interrupt */
+ .long HASHCRYPT_IRQHandler /* HASHCRYPT interrupt */
+ .long CASER_IRQHandler /* CASPER interrupt */
+ .long PUF_IRQHandler /* PUF interrupt */
+ .long PQ_IRQHandler /* PQ interrupt */
+ .long DMA1_IRQHandler /* DMA1 interrupt */
+ .long FLEXCOMM8_IRQHandler /* Flexcomm Interface 8 (SPI, , FLEXCOMM) */
.size __Vectors, . - __Vectors
.text
@@ -717,12 +716,12 @@ Reserved61_IRQHandler:
.align 1
.thumb_func
- .weak USB1_UTMI_IRQHandler
- .type USB1_UTMI_IRQHandler, %function
-USB1_UTMI_IRQHandler:
- ldr r0,=USB1_UTMI_DriverIRQHandler
+ .weak USB1_PHY_IRQHandler
+ .type USB1_PHY_IRQHandler, %function
+USB1_PHY_IRQHandler:
+ ldr r0,=USB1_PHY_DriverIRQHandler
bx r0
- .size USB1_UTMI_IRQHandler, . - USB1_UTMI_IRQHandler
+ .size USB1_PHY_IRQHandler, . - USB1_PHY_IRQHandler
.align 1
.thumb_func
@@ -834,12 +833,12 @@ DMA1_IRQHandler:
.align 1
.thumb_func
- .weak LSPI_HS_IRQHandler
- .type LSPI_HS_IRQHandler, %function
-LSPI_HS_IRQHandler:
- ldr r0,=LSPI_HS_DriverIRQHandler
+ .weak FLEXCOMM8_IRQHandler
+ .type FLEXCOMM8_IRQHandler, %function
+FLEXCOMM8_IRQHandler:
+ ldr r0,=FLEXCOMM8_DriverIRQHandler
bx r0
- .size LSPI_HS_IRQHandler, . - LSPI_HS_IRQHandler
+ .size FLEXCOMM8_IRQHandler, . - FLEXCOMM8_IRQHandler
/* Macro to define default handlers. Default handler
* will be weak symbol and just dead loops. They can be
@@ -854,65 +853,65 @@ LSPI_HS_IRQHandler:
def_irq_handler UsageFault_Handler
def_irq_handler SecureFault_Handler
def_irq_handler DebugMon_Handler
- def_irq_handler WDT_BOD_DriverIRQHandler
- def_irq_handler DMA0_DriverIRQHandler
- def_irq_handler GINT0_DriverIRQHandler
- def_irq_handler GINT1_DriverIRQHandler
- def_irq_handler PIN_INT0_DriverIRQHandler
- def_irq_handler PIN_INT1_DriverIRQHandler
- def_irq_handler PIN_INT2_DriverIRQHandler
- def_irq_handler PIN_INT3_DriverIRQHandler
- def_irq_handler UTICK0_DriverIRQHandler
- def_irq_handler MRT0_DriverIRQHandler
- def_irq_handler CTIMER0_DriverIRQHandler
- def_irq_handler CTIMER1_DriverIRQHandler
- def_irq_handler SCT0_DriverIRQHandler
- def_irq_handler CTIMER3_DriverIRQHandler
- def_irq_handler FLEXCOMM0_DriverIRQHandler
- def_irq_handler FLEXCOMM1_DriverIRQHandler
- def_irq_handler FLEXCOMM2_DriverIRQHandler
- def_irq_handler FLEXCOMM3_DriverIRQHandler
- def_irq_handler FLEXCOMM4_DriverIRQHandler
- def_irq_handler FLEXCOMM5_DriverIRQHandler
- def_irq_handler FLEXCOMM6_DriverIRQHandler
- def_irq_handler FLEXCOMM7_DriverIRQHandler
- def_irq_handler ADC0_DriverIRQHandler
- def_irq_handler Reserved39_DriverIRQHandler
- def_irq_handler ACMP_DriverIRQHandler
- def_irq_handler Reserved41_DriverIRQHandler
- def_irq_handler Reserved42_DriverIRQHandler
- def_irq_handler USB0_NEEDCLK_DriverIRQHandler
- def_irq_handler USB0_DriverIRQHandler
- def_irq_handler RTC_DriverIRQHandler
- def_irq_handler Reserved46_DriverIRQHandler
- def_irq_handler MAILBOX_DriverIRQHandler
- def_irq_handler PIN_INT4_DriverIRQHandler
- def_irq_handler PIN_INT5_DriverIRQHandler
- def_irq_handler PIN_INT6_DriverIRQHandler
- def_irq_handler PIN_INT7_DriverIRQHandler
- def_irq_handler CTIMER2_DriverIRQHandler
- def_irq_handler CTIMER4_DriverIRQHandler
- def_irq_handler OS_EVENT_DriverIRQHandler
- def_irq_handler Reserved55_DriverIRQHandler
- def_irq_handler Reserved56_DriverIRQHandler
- def_irq_handler Reserved57_DriverIRQHandler
- def_irq_handler SDIO_DriverIRQHandler
- def_irq_handler Reserved59_DriverIRQHandler
- def_irq_handler Reserved60_DriverIRQHandler
- def_irq_handler Reserved61_DriverIRQHandler
- def_irq_handler USB1_UTMI_DriverIRQHandler
- def_irq_handler USB1_DriverIRQHandler
- def_irq_handler USB1_NEEDCLK_DriverIRQHandler
- def_irq_handler SEC_HYPERVISOR_CALL_DriverIRQHandler
- def_irq_handler SEC_GPIO_INT0_IRQ0_DriverIRQHandler
- def_irq_handler SEC_GPIO_INT0_IRQ1_DriverIRQHandler
- def_irq_handler PLU_DriverIRQHandler
- def_irq_handler SEC_VIO_DriverIRQHandler
- def_irq_handler HASHCRYPT_DriverIRQHandler
- def_irq_handler CASER_DriverIRQHandler
- def_irq_handler PUF_DriverIRQHandler
- def_irq_handler PQ_DriverIRQHandler
- def_irq_handler DMA1_DriverIRQHandler
- def_irq_handler LSPI_HS_DriverIRQHandler
+ def_irq_handler WDT_BOD_DriverIRQHandler /* Windowed watchdog timer, Brownout detect, Flash interrupt */
+ def_irq_handler DMA0_DriverIRQHandler /* DMA0 controller */
+ def_irq_handler GINT0_DriverIRQHandler /* GPIO group 0 */
+ def_irq_handler GINT1_DriverIRQHandler /* GPIO group 1 */
+ def_irq_handler PIN_INT0_DriverIRQHandler /* Pin interrupt 0 or pattern match engine slice 0 */
+ def_irq_handler PIN_INT1_DriverIRQHandler /* Pin interrupt 1or pattern match engine slice 1 */
+ def_irq_handler PIN_INT2_DriverIRQHandler /* Pin interrupt 2 or pattern match engine slice 2 */
+ def_irq_handler PIN_INT3_DriverIRQHandler /* Pin interrupt 3 or pattern match engine slice 3 */
+ def_irq_handler UTICK0_DriverIRQHandler /* Micro-tick Timer */
+ def_irq_handler MRT0_DriverIRQHandler /* Multi-rate timer */
+ def_irq_handler CTIMER0_DriverIRQHandler /* Standard counter/timer CTIMER0 */
+ def_irq_handler CTIMER1_DriverIRQHandler /* Standard counter/timer CTIMER1 */
+ def_irq_handler SCT0_DriverIRQHandler /* SCTimer/PWM */
+ def_irq_handler CTIMER3_DriverIRQHandler /* Standard counter/timer CTIMER3 */
+ def_irq_handler FLEXCOMM0_DriverIRQHandler /* Flexcomm Interface 0 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM1_DriverIRQHandler /* Flexcomm Interface 1 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM2_DriverIRQHandler /* Flexcomm Interface 2 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM3_DriverIRQHandler /* Flexcomm Interface 3 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM4_DriverIRQHandler /* Flexcomm Interface 4 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM5_DriverIRQHandler /* Flexcomm Interface 5 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM6_DriverIRQHandler /* Flexcomm Interface 6 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler FLEXCOMM7_DriverIRQHandler /* Flexcomm Interface 7 (USART, SPI, I2C, I2S, FLEXCOMM) */
+ def_irq_handler ADC0_DriverIRQHandler /* ADC0 */
+ def_irq_handler Reserved39_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler ACMP_DriverIRQHandler /* ACMP interrupts */
+ def_irq_handler Reserved41_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler Reserved42_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler USB0_NEEDCLK_DriverIRQHandler /* USB Activity Wake-up Interrupt */
+ def_irq_handler USB0_DriverIRQHandler /* USB device */
+ def_irq_handler RTC_DriverIRQHandler /* RTC alarm and wake-up interrupts */
+ def_irq_handler Reserved46_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler MAILBOX_DriverIRQHandler /* WAKEUP,Mailbox interrupt (present on selected devices) */
+ def_irq_handler PIN_INT4_DriverIRQHandler /* Pin interrupt 4 or pattern match engine slice 4 int */
+ def_irq_handler PIN_INT5_DriverIRQHandler /* Pin interrupt 5 or pattern match engine slice 5 int */
+ def_irq_handler PIN_INT6_DriverIRQHandler /* Pin interrupt 6 or pattern match engine slice 6 int */
+ def_irq_handler PIN_INT7_DriverIRQHandler /* Pin interrupt 7 or pattern match engine slice 7 int */
+ def_irq_handler CTIMER2_DriverIRQHandler /* Standard counter/timer CTIMER2 */
+ def_irq_handler CTIMER4_DriverIRQHandler /* Standard counter/timer CTIMER4 */
+ def_irq_handler OS_EVENT_DriverIRQHandler /* OSEVTIMER0 and OSEVTIMER0_WAKEUP interrupts */
+ def_irq_handler Reserved55_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler Reserved56_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler Reserved57_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler SDIO_DriverIRQHandler /* SD/MMC */
+ def_irq_handler Reserved59_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler Reserved60_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler Reserved61_DriverIRQHandler /* Reserved interrupt */
+ def_irq_handler USB1_PHY_DriverIRQHandler /* USB1_PHY */
+ def_irq_handler USB1_DriverIRQHandler /* USB1 interrupt */
+ def_irq_handler USB1_NEEDCLK_DriverIRQHandler /* USB1 activity */
+ def_irq_handler SEC_HYPERVISOR_CALL_DriverIRQHandler /* SEC_HYPERVISOR_CALL interrupt */
+ def_irq_handler SEC_GPIO_INT0_IRQ0_DriverIRQHandler /* SEC_GPIO_INT0_IRQ0 interrupt */
+ def_irq_handler SEC_GPIO_INT0_IRQ1_DriverIRQHandler /* SEC_GPIO_INT0_IRQ1 interrupt */
+ def_irq_handler PLU_DriverIRQHandler /* PLU interrupt */
+ def_irq_handler SEC_VIO_DriverIRQHandler /* SEC_VIO interrupt */
+ def_irq_handler HASHCRYPT_DriverIRQHandler /* HASHCRYPT interrupt */
+ def_irq_handler CASER_DriverIRQHandler /* CASPER interrupt */
+ def_irq_handler PUF_DriverIRQHandler /* PUF interrupt */
+ def_irq_handler PQ_DriverIRQHandler /* PQ interrupt */
+ def_irq_handler DMA1_DriverIRQHandler /* DMA1 interrupt */
+ def_irq_handler FLEXCOMM8_DriverIRQHandler /* Flexcomm Interface 8 (SPI, , FLEXCOMM) */
.end
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core0.h b/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core0.h
deleted file mode 100755
index 35817d0d29..0000000000
--- a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core0.h
+++ /dev/null
@@ -1,27477 +0,0 @@
-/*
-** ###################################################################
-** Processors: LPC55S69JBD100_cm33_core0
-** LPC55S69JBD64_cm33_core0
-** LPC55S69JEV98_cm33_core0
-**
-** Compilers: GNU C Compiler
-** IAR ANSI C/C++ Compiler for ARM
-** Keil ARM C/C++ Compiler
-** MCUXpresso Compiler
-**
-** Reference manual: LPC55S6x/LPC55S2x/LPC552x User manual(UM11126) Rev.1.3 16 May 2019
-** Version: rev. 1.1, 2019-05-16
-** Build: b200311
-**
-** Abstract:
-** CMSIS Peripheral Access Layer for LPC55S69_cm33_core0
-**
-** Copyright 1997-2016 Freescale Semiconductor, Inc.
-** Copyright 2016-2020 NXP
-** All rights reserved.
-**
-** SPDX-License-Identifier: BSD-3-Clause
-**
-** http: www.nxp.com
-** mail: support@nxp.com
-**
-** Revisions:
-** - rev. 1.0 (2018-08-22)
-** Initial version based on v0.2UM
-** - rev. 1.1 (2019-05-16)
-** Initial A1 version based on v1.3UM
-**
-** ###################################################################
-*/
-
-/*!
- * @file LPC55S69_cm33_core0.h
- * @version 1.1
- * @date 2019-05-16
- * @brief CMSIS Peripheral Access Layer for LPC55S69_cm33_core0
- *
- * CMSIS Peripheral Access Layer for LPC55S69_cm33_core0
- */
-
-#ifndef _LPC55S69_CM33_CORE0_H_
-#define _LPC55S69_CM33_CORE0_H_ /**< Symbol preventing repeated inclusion */
-
-/** Memory map major version (memory maps with equal major version number are
- * compatible) */
-#define MCU_MEM_MAP_VERSION 0x0100U
-/** Memory map minor version */
-#define MCU_MEM_MAP_VERSION_MINOR 0x0001U
-
-
-/* ----------------------------------------------------------------------------
- -- Interrupt vector numbers
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup Interrupt_vector_numbers Interrupt vector numbers
- * @{
- */
-
-/** Interrupt Number Definitions */
-#define NUMBER_OF_INT_VECTORS 76 /**< Number of interrupts in the Vector table */
-
-typedef enum IRQn {
- /* Auxiliary constants */
- NotAvail_IRQn = -128, /**< Not available device specific interrupt */
-
- /* Core interrupts */
- NonMaskableInt_IRQn = -14, /**< Non Maskable Interrupt */
- HardFault_IRQn = -13, /**< Cortex-M33 SV Hard Fault Interrupt */
- MemoryManagement_IRQn = -12, /**< Cortex-M33 Memory Management Interrupt */
- BusFault_IRQn = -11, /**< Cortex-M33 Bus Fault Interrupt */
- UsageFault_IRQn = -10, /**< Cortex-M33 Usage Fault Interrupt */
- SecureFault_IRQn = -9, /**< Cortex-M33 Secure Fault Interrupt */
- SVCall_IRQn = -5, /**< Cortex-M33 SV Call Interrupt */
- DebugMonitor_IRQn = -4, /**< Cortex-M33 Debug Monitor Interrupt */
- PendSV_IRQn = -2, /**< Cortex-M33 Pend SV Interrupt */
- SysTick_IRQn = -1, /**< Cortex-M33 System Tick Interrupt */
-
- /* Device specific interrupts */
- WDT_BOD_IRQn = 0, /**< Windowed watchdog timer, Brownout detect, Flash interrupt */
- DMA0_IRQn = 1, /**< DMA0 controller */
- GINT0_IRQn = 2, /**< GPIO group 0 */
- GINT1_IRQn = 3, /**< GPIO group 1 */
- PIN_INT0_IRQn = 4, /**< Pin interrupt 0 or pattern match engine slice 0 */
- PIN_INT1_IRQn = 5, /**< Pin interrupt 1or pattern match engine slice 1 */
- PIN_INT2_IRQn = 6, /**< Pin interrupt 2 or pattern match engine slice 2 */
- PIN_INT3_IRQn = 7, /**< Pin interrupt 3 or pattern match engine slice 3 */
- UTICK0_IRQn = 8, /**< Micro-tick Timer */
- MRT0_IRQn = 9, /**< Multi-rate timer */
- CTIMER0_IRQn = 10, /**< Standard counter/timer CTIMER0 */
- CTIMER1_IRQn = 11, /**< Standard counter/timer CTIMER1 */
- SCT0_IRQn = 12, /**< SCTimer/PWM */
- CTIMER3_IRQn = 13, /**< Standard counter/timer CTIMER3 */
- FLEXCOMM0_IRQn = 14, /**< Flexcomm Interface 0 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM1_IRQn = 15, /**< Flexcomm Interface 1 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM2_IRQn = 16, /**< Flexcomm Interface 2 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM3_IRQn = 17, /**< Flexcomm Interface 3 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM4_IRQn = 18, /**< Flexcomm Interface 4 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM5_IRQn = 19, /**< Flexcomm Interface 5 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM6_IRQn = 20, /**< Flexcomm Interface 6 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM7_IRQn = 21, /**< Flexcomm Interface 7 (USART, SPI, I2C, I2S, FLEXCOMM) */
- ADC0_IRQn = 22, /**< ADC0 */
- Reserved39_IRQn = 23, /**< Reserved interrupt */
- ACMP_IRQn = 24, /**< ACMP interrupts */
- Reserved41_IRQn = 25, /**< Reserved interrupt */
- Reserved42_IRQn = 26, /**< Reserved interrupt */
- USB0_NEEDCLK_IRQn = 27, /**< USB Activity Wake-up Interrupt */
- USB0_IRQn = 28, /**< USB device */
- RTC_IRQn = 29, /**< RTC alarm and wake-up interrupts */
- Reserved46_IRQn = 30, /**< Reserved interrupt */
- MAILBOX_IRQn = 31, /**< WAKEUP,Mailbox interrupt (present on selected devices) */
- PIN_INT4_IRQn = 32, /**< Pin interrupt 4 or pattern match engine slice 4 int */
- PIN_INT5_IRQn = 33, /**< Pin interrupt 5 or pattern match engine slice 5 int */
- PIN_INT6_IRQn = 34, /**< Pin interrupt 6 or pattern match engine slice 6 int */
- PIN_INT7_IRQn = 35, /**< Pin interrupt 7 or pattern match engine slice 7 int */
- CTIMER2_IRQn = 36, /**< Standard counter/timer CTIMER2 */
- CTIMER4_IRQn = 37, /**< Standard counter/timer CTIMER4 */
- OS_EVENT_IRQn = 38, /**< OSEVTIMER0 and OSEVTIMER0_WAKEUP interrupts */
- Reserved55_IRQn = 39, /**< Reserved interrupt */
- Reserved56_IRQn = 40, /**< Reserved interrupt */
- Reserved57_IRQn = 41, /**< Reserved interrupt */
- SDIO_IRQn = 42, /**< SD/MMC */
- Reserved59_IRQn = 43, /**< Reserved interrupt */
- Reserved60_IRQn = 44, /**< Reserved interrupt */
- Reserved61_IRQn = 45, /**< Reserved interrupt */
- USB1_PHY_IRQn = 46, /**< USB1_PHY */
- USB1_IRQn = 47, /**< USB1 interrupt */
- USB1_NEEDCLK_IRQn = 48, /**< USB1 activity */
- SEC_HYPERVISOR_CALL_IRQn = 49, /**< SEC_HYPERVISOR_CALL interrupt */
- SEC_GPIO_INT0_IRQ0_IRQn = 50, /**< SEC_GPIO_INT0_IRQ0 interrupt */
- SEC_GPIO_INT0_IRQ1_IRQn = 51, /**< SEC_GPIO_INT0_IRQ1 interrupt */
- PLU_IRQn = 52, /**< PLU interrupt */
- SEC_VIO_IRQn = 53, /**< SEC_VIO interrupt */
- HASHCRYPT_IRQn = 54, /**< HASHCRYPT interrupt */
- CASER_IRQn = 55, /**< CASPER interrupt */
- PUF_IRQn = 56, /**< PUF interrupt */
- PQ_IRQn = 57, /**< PQ interrupt */
- DMA1_IRQn = 58, /**< DMA1 interrupt */
- FLEXCOMM8_IRQn = 59 /**< Flexcomm Interface 8 (SPI, , FLEXCOMM) */
-} IRQn_Type;
-
-/*!
- * @}
- */ /* end of group Interrupt_vector_numbers */
-
-
-/* ----------------------------------------------------------------------------
- -- Cortex M33 Core Configuration
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup Cortex_Core_Configuration Cortex M33 Core Configuration
- * @{
- */
-
-#define __MPU_PRESENT 1 /**< Defines if an MPU is present or not */
-#define __NVIC_PRIO_BITS 3 /**< Number of priority bits implemented in the NVIC */
-#define __Vendor_SysTickConfig 0 /**< Vendor specific implementation of SysTickConfig is defined */
-#define __FPU_PRESENT 1 /**< Defines if an FPU is present or not */
-#define __DSP_PRESENT 1 /**< Defines if Armv8-M Mainline core supports DSP instructions */
-#define __SAUREGION_PRESENT 1 /**< Defines if an SAU is present or not */
-
-#include "core_cm33.h" /* Core Peripheral Access Layer */
-#include "system_LPC55S69_cm33_core0.h" /* Device specific configuration file */
-
-/*!
- * @}
- */ /* end of group Cortex_Core_Configuration */
-
-
-/* ----------------------------------------------------------------------------
- -- Mapping Information
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup Mapping_Information Mapping Information
- * @{
- */
-
-/** Mapping Information */
-/*!
- * @addtogroup dma_request
- * @{
- */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*!
- * @brief Structure for the DMA hardware request
- *
- * Defines the structure for the DMA hardware request collections. The user can configure the
- * hardware request to trigger the DMA transfer accordingly. The index
- * of the hardware request varies according to the to SoC.
- */
-typedef enum _dma_request_source
-{
- kDma0RequestHashCrypt = 0U, /**< HashCrypt */
- kDma1RequestHashCrypt = 0U, /**< HashCrypt */
- kDma0RequestNoDMARequest1 = 1U, /**< No DMA request 1 */
- kDma1RequestNoDMARequest1 = 1U, /**< No DMA request 1 */
- kDma0RequestFlexcomm8Rx = 2U, /**< Flexcomm Interface 8 RX */
- kDma1RequestFlexcomm8Rx = 2U, /**< Flexcomm Interface 8 RX */
- kDma0RequestFlexcomm8Tx = 3U, /**< Flexcomm Interface 8 TX */
- kDma1RequestFlexcomm8Tx = 3U, /**< Flexcomm Interface 8 TX */
- kDma0RequestFlexcomm0Rx = 4U, /**< Flexcomm Interface 0 RX/I2C Slave */
- kDma1RequestFlexcomm0Rx = 4U, /**< Flexcomm Interface 0 RX/I2C Slave */
- kDma0RequestFlexcomm0Tx = 5U, /**< Flexcomm Interface 0 TX/I2C Master */
- kDma1RequestFlexcomm0Tx = 5U, /**< Flexcomm Interface 0 TX/I2C Master */
- kDma0RequestFlexcomm1Rx = 6U, /**< Flexcomm Interface 1 RX/I2C Slave */
- kDma1RequestFlexcomm1Rx = 6U, /**< Flexcomm Interface 1 RX/I2C Slave */
- kDma0RequestFlexcomm1Tx = 7U, /**< Flexcomm Interface 1 TX/I2C Master */
- kDma1RequestFlexcomm1Tx = 7U, /**< Flexcomm Interface 1 TX/I2C Master */
- kDma0RequestFlexcomm3Rx = 8U, /**< Flexcomm Interface 3 RX/I2C Slave */
- kDma1RequestFlexcomm3Rx = 8U, /**< Flexcomm Interface 3 RX/I2C Slave */
- kDma0RequestFlexcomm3Tx = 9U, /**< Flexcomm Interface 3 TX/I2C Master */
- kDma1RequestFlexcomm3Tx = 9U, /**< Flexcomm Interface 3 TX/I2C Master */
- kDma0RequestFlexcomm2Rx = 10U, /**< Flexcomm Interface 2 RX/I2C Slave */
- kDma0RequestFlexcomm2Tx = 11U, /**< Flexcomm Interface 2 TX/I2C Master */
- kDma0RequestFlexcomm4Rx = 12U, /**< Flexcomm Interface 4 RX/I2C Slave */
- kDma0RequestFlexcomm4Tx = 13U, /**< Flexcomm Interface 4 TX/I2C Master */
- kDma0RequestFlexcomm5Rx = 14U, /**< Flexcomm Interface 5 RX/I2C Slave */
- kDma0RequestFlexcomm5Tx = 15U, /**< Flexcomm Interface 5 TX/I2C Master */
- kDma0RequestFlexcomm6Rx = 16U, /**< Flexcomm Interface 6 RX/I2C Slave */
- kDma0RequestFlexcomm6Tx = 17U, /**< Flexcomm Interface 6 TX/I2C Master */
- kDma0RequestFlexcomm7Rx = 18U, /**< Flexcomm Interface 7 RX/I2C Slave */
- kDma0RequestFlexcomm7Tx = 19U, /**< Flexcomm Interface 7 TX/I2C Master */
- kDma0RequestNoDMARequest20 = 20U, /**< No DMA request 20 */
- kDma0RequestADC0FIFO0 = 21U, /**< ADC0 FIFO 0 */
- kDma0RequestADC0FIFO1 = 22U, /**< ADC0 FIFO 1 */
-} dma_request_source_t;
-
-/* @} */
-
-
-/*!
- * @}
- */ /* end of group Mapping_Information */
-
-
-/* ----------------------------------------------------------------------------
- -- Device Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup Peripheral_access_layer Device Peripheral Access Layer
- * @{
- */
-
-
-/*
-** Start of section using anonymous unions
-*/
-
-#if defined(__ARMCC_VERSION)
- #if (__ARMCC_VERSION >= 6010050)
- #pragma clang diagnostic push
- #else
- #pragma push
- #pragma anon_unions
- #endif
-#elif defined(__GNUC__)
- /* anonymous unions are enabled by default */
-#elif defined(__IAR_SYSTEMS_ICC__)
- #pragma language=extended
-#else
- #error Not supported compiler type
-#endif
-
-/* ----------------------------------------------------------------------------
- -- ADC Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup ADC_Peripheral_Access_Layer ADC Peripheral Access Layer
- * @{
- */
-
-/** ADC - Register Layout Typedef */
-typedef struct {
- __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */
- __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */
- uint8_t RESERVED_0[8];
- __IO uint32_t CTRL; /**< ADC Control Register, offset: 0x10 */
- __IO uint32_t STAT; /**< ADC Status Register, offset: 0x14 */
- __IO uint32_t IE; /**< Interrupt Enable Register, offset: 0x18 */
- __IO uint32_t DE; /**< DMA Enable Register, offset: 0x1C */
- __IO uint32_t CFG; /**< ADC Configuration Register, offset: 0x20 */
- __IO uint32_t PAUSE; /**< ADC Pause Register, offset: 0x24 */
- uint8_t RESERVED_1[12];
- __O uint32_t SWTRIG; /**< Software Trigger Register, offset: 0x34 */
- __IO uint32_t TSTAT; /**< Trigger Status Register, offset: 0x38 */
- uint8_t RESERVED_2[4];
- __IO uint32_t OFSTRIM; /**< ADC Offset Trim Register, offset: 0x40 */
- uint8_t RESERVED_3[92];
- __IO uint32_t TCTRL[16]; /**< Trigger Control Register, array offset: 0xA0, array step: 0x4 */
- __IO uint32_t FCTRL[2]; /**< FIFO Control Register, array offset: 0xE0, array step: 0x4 */
- uint8_t RESERVED_4[8];
- __I uint32_t GCC[2]; /**< Gain Calibration Control, array offset: 0xF0, array step: 0x4 */
- __IO uint32_t GCR[2]; /**< Gain Calculation Result, array offset: 0xF8, array step: 0x4 */
- struct { /* offset: 0x100, array step: 0x8 */
- __IO uint32_t CMDL; /**< ADC Command Low Buffer Register, array offset: 0x100, array step: 0x8 */
- __IO uint32_t CMDH; /**< ADC Command High Buffer Register, array offset: 0x104, array step: 0x8 */
- } CMD[15];
- uint8_t RESERVED_5[136];
- __IO uint32_t CV[4]; /**< Compare Value Register, array offset: 0x200, array step: 0x4 */
- uint8_t RESERVED_6[240];
- __I uint32_t RESFIFO[2]; /**< ADC Data Result FIFO Register, array offset: 0x300, array step: 0x4 */
- uint8_t RESERVED_7[248];
- __IO uint32_t CAL_GAR[33]; /**< Calibration General A-Side Registers, array offset: 0x400, array step: 0x4 */
- uint8_t RESERVED_8[124];
- __IO uint32_t CAL_GBR[33]; /**< Calibration General B-Side Registers, array offset: 0x500, array step: 0x4 */
- uint8_t RESERVED_9[2680];
- __IO uint32_t TST; /**< ADC Test Register, offset: 0xFFC */
-} ADC_Type;
-
-/* ----------------------------------------------------------------------------
- -- ADC Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup ADC_Register_Masks ADC Register Masks
- * @{
- */
-
-/*! @name VERID - Version ID Register */
-/*! @{ */
-#define ADC_VERID_RES_MASK (0x1U)
-#define ADC_VERID_RES_SHIFT (0U)
-/*! RES - Resolution
- * 0b0..Up to 13-bit differential/12-bit single ended resolution supported.
- * 0b1..Up to 16-bit differential/16-bit single ended resolution supported.
- */
-#define ADC_VERID_RES(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_RES_SHIFT)) & ADC_VERID_RES_MASK)
-#define ADC_VERID_DIFFEN_MASK (0x2U)
-#define ADC_VERID_DIFFEN_SHIFT (1U)
-/*! DIFFEN - Differential Supported
- * 0b0..Differential operation not supported.
- * 0b1..Differential operation supported. CMDLa[CTYPE] controls fields implemented.
- */
-#define ADC_VERID_DIFFEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_DIFFEN_SHIFT)) & ADC_VERID_DIFFEN_MASK)
-#define ADC_VERID_MVI_MASK (0x8U)
-#define ADC_VERID_MVI_SHIFT (3U)
-/*! MVI - Multi Vref Implemented
- * 0b0..Single voltage reference high (VREFH) input supported.
- * 0b1..Multiple voltage reference high (VREFH) inputs supported.
- */
-#define ADC_VERID_MVI(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_MVI_SHIFT)) & ADC_VERID_MVI_MASK)
-#define ADC_VERID_CSW_MASK (0x70U)
-#define ADC_VERID_CSW_SHIFT (4U)
-/*! CSW - Channel Scale Width
- * 0b000..Channel scaling not supported.
- * 0b001..Channel scaling supported. 1-bit CSCALE control field.
- * 0b110..Channel scaling supported. 6-bit CSCALE control field.
- */
-#define ADC_VERID_CSW(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_CSW_SHIFT)) & ADC_VERID_CSW_MASK)
-#define ADC_VERID_VR1RNGI_MASK (0x100U)
-#define ADC_VERID_VR1RNGI_SHIFT (8U)
-/*! VR1RNGI - Voltage Reference 1 Range Control Bit Implemented
- * 0b0..Range control not required. CFG[VREF1RNG] is not implemented.
- * 0b1..Range control required. CFG[VREF1RNG] is implemented.
- */
-#define ADC_VERID_VR1RNGI(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_VR1RNGI_SHIFT)) & ADC_VERID_VR1RNGI_MASK)
-#define ADC_VERID_IADCKI_MASK (0x200U)
-#define ADC_VERID_IADCKI_SHIFT (9U)
-/*! IADCKI - Internal ADC Clock implemented
- * 0b0..Internal clock source not implemented.
- * 0b1..Internal clock source (and CFG[ADCKEN]) implemented.
- */
-#define ADC_VERID_IADCKI(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_IADCKI_SHIFT)) & ADC_VERID_IADCKI_MASK)
-#define ADC_VERID_CALOFSI_MASK (0x400U)
-#define ADC_VERID_CALOFSI_SHIFT (10U)
-/*! CALOFSI - Calibration Function Implemented
- * 0b0..Calibration Not Implemented.
- * 0b1..Calibration Implemented.
- */
-#define ADC_VERID_CALOFSI(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_CALOFSI_SHIFT)) & ADC_VERID_CALOFSI_MASK)
-#define ADC_VERID_NUM_SEC_MASK (0x800U)
-#define ADC_VERID_NUM_SEC_SHIFT (11U)
-/*! NUM_SEC - Number of Single Ended Outputs Supported
- * 0b0..This design supports one single ended conversion at a time.
- * 0b1..This design supports two simultanious single ended conversions.
- */
-#define ADC_VERID_NUM_SEC(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_NUM_SEC_SHIFT)) & ADC_VERID_NUM_SEC_MASK)
-#define ADC_VERID_NUM_FIFO_MASK (0x7000U)
-#define ADC_VERID_NUM_FIFO_SHIFT (12U)
-/*! NUM_FIFO - Number of FIFOs
- * 0b000..N/A
- * 0b001..This design supports one result FIFO.
- * 0b010..This design supports two result FIFOs.
- * 0b011..This design supports three result FIFOs.
- * 0b100..This design supports four result FIFOs.
- */
-#define ADC_VERID_NUM_FIFO(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_NUM_FIFO_SHIFT)) & ADC_VERID_NUM_FIFO_MASK)
-#define ADC_VERID_MINOR_MASK (0xFF0000U)
-#define ADC_VERID_MINOR_SHIFT (16U)
-/*! MINOR - Minor Version Number
- */
-#define ADC_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_MINOR_SHIFT)) & ADC_VERID_MINOR_MASK)
-#define ADC_VERID_MAJOR_MASK (0xFF000000U)
-#define ADC_VERID_MAJOR_SHIFT (24U)
-/*! MAJOR - Major Version Number
- */
-#define ADC_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_MAJOR_SHIFT)) & ADC_VERID_MAJOR_MASK)
-/*! @} */
-
-/*! @name PARAM - Parameter Register */
-/*! @{ */
-#define ADC_PARAM_TRIG_NUM_MASK (0xFFU)
-#define ADC_PARAM_TRIG_NUM_SHIFT (0U)
-/*! TRIG_NUM - Trigger Number
- */
-#define ADC_PARAM_TRIG_NUM(x) (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_TRIG_NUM_SHIFT)) & ADC_PARAM_TRIG_NUM_MASK)
-#define ADC_PARAM_FIFOSIZE_MASK (0xFF00U)
-#define ADC_PARAM_FIFOSIZE_SHIFT (8U)
-/*! FIFOSIZE - Result FIFO Depth
- * 0b00000001..Result FIFO depth = 1 dataword.
- * 0b00000100..Result FIFO depth = 4 datawords.
- * 0b00001000..Result FIFO depth = 8 datawords.
- * 0b00010000..Result FIFO depth = 16 datawords.
- * 0b00100000..Result FIFO depth = 32 datawords.
- * 0b01000000..Result FIFO depth = 64 datawords.
- */
-#define ADC_PARAM_FIFOSIZE(x) (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_FIFOSIZE_SHIFT)) & ADC_PARAM_FIFOSIZE_MASK)
-#define ADC_PARAM_CV_NUM_MASK (0xFF0000U)
-#define ADC_PARAM_CV_NUM_SHIFT (16U)
-/*! CV_NUM - Compare Value Number
- */
-#define ADC_PARAM_CV_NUM(x) (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_CV_NUM_SHIFT)) & ADC_PARAM_CV_NUM_MASK)
-#define ADC_PARAM_CMD_NUM_MASK (0xFF000000U)
-#define ADC_PARAM_CMD_NUM_SHIFT (24U)
-/*! CMD_NUM - Command Buffer Number
- */
-#define ADC_PARAM_CMD_NUM(x) (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_CMD_NUM_SHIFT)) & ADC_PARAM_CMD_NUM_MASK)
-/*! @} */
-
-/*! @name CTRL - ADC Control Register */
-/*! @{ */
-#define ADC_CTRL_ADCEN_MASK (0x1U)
-#define ADC_CTRL_ADCEN_SHIFT (0U)
-/*! ADCEN - ADC Enable
- * 0b0..ADC is disabled.
- * 0b1..ADC is enabled.
- */
-#define ADC_CTRL_ADCEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_ADCEN_SHIFT)) & ADC_CTRL_ADCEN_MASK)
-#define ADC_CTRL_RST_MASK (0x2U)
-#define ADC_CTRL_RST_SHIFT (1U)
-/*! RST - Software Reset
- * 0b0..ADC logic is not reset.
- * 0b1..ADC logic is reset.
- */
-#define ADC_CTRL_RST(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_RST_SHIFT)) & ADC_CTRL_RST_MASK)
-#define ADC_CTRL_DOZEN_MASK (0x4U)
-#define ADC_CTRL_DOZEN_SHIFT (2U)
-/*! DOZEN - Doze Enable
- * 0b0..ADC is enabled in Doze mode.
- * 0b1..ADC is disabled in Doze mode.
- */
-#define ADC_CTRL_DOZEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_DOZEN_SHIFT)) & ADC_CTRL_DOZEN_MASK)
-#define ADC_CTRL_CAL_REQ_MASK (0x8U)
-#define ADC_CTRL_CAL_REQ_SHIFT (3U)
-/*! CAL_REQ - Auto-Calibration Request
- * 0b0..No request for auto-calibration has been made.
- * 0b1..A request for auto-calibration has been made
- */
-#define ADC_CTRL_CAL_REQ(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_CAL_REQ_SHIFT)) & ADC_CTRL_CAL_REQ_MASK)
-#define ADC_CTRL_CALOFS_MASK (0x10U)
-#define ADC_CTRL_CALOFS_SHIFT (4U)
-/*! CALOFS - Configure for offset calibration function
- * 0b0..Calibration function disabled
- * 0b1..Request for offset calibration function
- */
-#define ADC_CTRL_CALOFS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_CALOFS_SHIFT)) & ADC_CTRL_CALOFS_MASK)
-#define ADC_CTRL_RSTFIFO0_MASK (0x100U)
-#define ADC_CTRL_RSTFIFO0_SHIFT (8U)
-/*! RSTFIFO0 - Reset FIFO 0
- * 0b0..No effect.
- * 0b1..FIFO 0 is reset.
- */
-#define ADC_CTRL_RSTFIFO0(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_RSTFIFO0_SHIFT)) & ADC_CTRL_RSTFIFO0_MASK)
-#define ADC_CTRL_RSTFIFO1_MASK (0x200U)
-#define ADC_CTRL_RSTFIFO1_SHIFT (9U)
-/*! RSTFIFO1 - Reset FIFO 1
- * 0b0..No effect.
- * 0b1..FIFO 1 is reset.
- */
-#define ADC_CTRL_RSTFIFO1(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_RSTFIFO1_SHIFT)) & ADC_CTRL_RSTFIFO1_MASK)
-#define ADC_CTRL_CAL_AVGS_MASK (0x70000U)
-#define ADC_CTRL_CAL_AVGS_SHIFT (16U)
-/*! CAL_AVGS - Auto-Calibration Averages
- * 0b000..Single conversion.
- * 0b001..2 conversions averaged.
- * 0b010..4 conversions averaged.
- * 0b011..8 conversions averaged.
- * 0b100..16 conversions averaged.
- * 0b101..32 conversions averaged.
- * 0b110..64 conversions averaged.
- * 0b111..128 conversions averaged.
- */
-#define ADC_CTRL_CAL_AVGS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_CAL_AVGS_SHIFT)) & ADC_CTRL_CAL_AVGS_MASK)
-/*! @} */
-
-/*! @name STAT - ADC Status Register */
-/*! @{ */
-#define ADC_STAT_RDY0_MASK (0x1U)
-#define ADC_STAT_RDY0_SHIFT (0U)
-/*! RDY0 - Result FIFO 0 Ready Flag
- * 0b0..Result FIFO 0 data level not above watermark level.
- * 0b1..Result FIFO 0 holding data above watermark level.
- */
-#define ADC_STAT_RDY0(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_RDY0_SHIFT)) & ADC_STAT_RDY0_MASK)
-#define ADC_STAT_FOF0_MASK (0x2U)
-#define ADC_STAT_FOF0_SHIFT (1U)
-/*! FOF0 - Result FIFO 0 Overflow Flag
- * 0b0..No result FIFO 0 overflow has occurred since the last time the flag was cleared.
- * 0b1..At least one result FIFO 0 overflow has occurred since the last time the flag was cleared.
- */
-#define ADC_STAT_FOF0(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_FOF0_SHIFT)) & ADC_STAT_FOF0_MASK)
-#define ADC_STAT_RDY1_MASK (0x4U)
-#define ADC_STAT_RDY1_SHIFT (2U)
-/*! RDY1 - Result FIFO1 Ready Flag
- * 0b0..Result FIFO1 data level not above watermark level.
- * 0b1..Result FIFO1 holding data above watermark level.
- */
-#define ADC_STAT_RDY1(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_RDY1_SHIFT)) & ADC_STAT_RDY1_MASK)
-#define ADC_STAT_FOF1_MASK (0x8U)
-#define ADC_STAT_FOF1_SHIFT (3U)
-/*! FOF1 - Result FIFO1 Overflow Flag
- * 0b0..No result FIFO1 overflow has occurred since the last time the flag was cleared.
- * 0b1..At least one result FIFO1 overflow has occurred since the last time the flag was cleared.
- */
-#define ADC_STAT_FOF1(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_FOF1_SHIFT)) & ADC_STAT_FOF1_MASK)
-#define ADC_STAT_TEXC_INT_MASK (0x100U)
-#define ADC_STAT_TEXC_INT_SHIFT (8U)
-/*! TEXC_INT - Interrupt Flag For High Priority Trigger Exception
- * 0b0..No trigger exceptions have occurred.
- * 0b1..A trigger exception has occurred and is pending acknowledgement.
- */
-#define ADC_STAT_TEXC_INT(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_TEXC_INT_SHIFT)) & ADC_STAT_TEXC_INT_MASK)
-#define ADC_STAT_TCOMP_INT_MASK (0x200U)
-#define ADC_STAT_TCOMP_INT_SHIFT (9U)
-/*! TCOMP_INT - Interrupt Flag For Trigger Completion
- * 0b0..Either IE[TCOMP_IE] is set to 0, or no trigger sequences have run to completion.
- * 0b1..Trigger sequence has been completed and all data is stored in the associated FIFO.
- */
-#define ADC_STAT_TCOMP_INT(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_TCOMP_INT_SHIFT)) & ADC_STAT_TCOMP_INT_MASK)
-#define ADC_STAT_CAL_RDY_MASK (0x400U)
-#define ADC_STAT_CAL_RDY_SHIFT (10U)
-/*! CAL_RDY - Calibration Ready
- * 0b0..Calibration is incomplete or hasn't been ran.
- * 0b1..The ADC is calibrated.
- */
-#define ADC_STAT_CAL_RDY(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_CAL_RDY_SHIFT)) & ADC_STAT_CAL_RDY_MASK)
-#define ADC_STAT_ADC_ACTIVE_MASK (0x800U)
-#define ADC_STAT_ADC_ACTIVE_SHIFT (11U)
-/*! ADC_ACTIVE - ADC Active
- * 0b0..The ADC is IDLE. There are no pending triggers to service and no active commands are being processed.
- * 0b1..The ADC is processing a conversion, running through the power up delay, or servicing a trigger.
- */
-#define ADC_STAT_ADC_ACTIVE(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_ADC_ACTIVE_SHIFT)) & ADC_STAT_ADC_ACTIVE_MASK)
-#define ADC_STAT_TRGACT_MASK (0xF0000U)
-#define ADC_STAT_TRGACT_SHIFT (16U)
-/*! TRGACT - Trigger Active
- * 0b0000..Command (sequence) associated with Trigger 0 currently being executed.
- * 0b0001..Command (sequence) associated with Trigger 1 currently being executed.
- * 0b0010..Command (sequence) associated with Trigger 2 currently being executed.
- * 0b0011-0b1111..Command (sequence) from the associated Trigger number is currently being executed.
- */
-#define ADC_STAT_TRGACT(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_TRGACT_SHIFT)) & ADC_STAT_TRGACT_MASK)
-#define ADC_STAT_CMDACT_MASK (0xF000000U)
-#define ADC_STAT_CMDACT_SHIFT (24U)
-/*! CMDACT - Command Active
- * 0b0000..No command is currently in progress.
- * 0b0001..Command 1 currently being executed.
- * 0b0010..Command 2 currently being executed.
- * 0b0011-0b1111..Associated command number is currently being executed.
- */
-#define ADC_STAT_CMDACT(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_CMDACT_SHIFT)) & ADC_STAT_CMDACT_MASK)
-/*! @} */
-
-/*! @name IE - Interrupt Enable Register */
-/*! @{ */
-#define ADC_IE_FWMIE0_MASK (0x1U)
-#define ADC_IE_FWMIE0_SHIFT (0U)
-/*! FWMIE0 - FIFO 0 Watermark Interrupt Enable
- * 0b0..FIFO 0 watermark interrupts are not enabled.
- * 0b1..FIFO 0 watermark interrupts are enabled.
- */
-#define ADC_IE_FWMIE0(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_FWMIE0_SHIFT)) & ADC_IE_FWMIE0_MASK)
-#define ADC_IE_FOFIE0_MASK (0x2U)
-#define ADC_IE_FOFIE0_SHIFT (1U)
-/*! FOFIE0 - Result FIFO 0 Overflow Interrupt Enable
- * 0b0..FIFO 0 overflow interrupts are not enabled.
- * 0b1..FIFO 0 overflow interrupts are enabled.
- */
-#define ADC_IE_FOFIE0(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_FOFIE0_SHIFT)) & ADC_IE_FOFIE0_MASK)
-#define ADC_IE_FWMIE1_MASK (0x4U)
-#define ADC_IE_FWMIE1_SHIFT (2U)
-/*! FWMIE1 - FIFO1 Watermark Interrupt Enable
- * 0b0..FIFO1 watermark interrupts are not enabled.
- * 0b1..FIFO1 watermark interrupts are enabled.
- */
-#define ADC_IE_FWMIE1(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_FWMIE1_SHIFT)) & ADC_IE_FWMIE1_MASK)
-#define ADC_IE_FOFIE1_MASK (0x8U)
-#define ADC_IE_FOFIE1_SHIFT (3U)
-/*! FOFIE1 - Result FIFO1 Overflow Interrupt Enable
- * 0b0..No result FIFO1 overflow has occurred since the last time the flag was cleared.
- * 0b1..At least one result FIFO1 overflow has occurred since the last time the flag was cleared.
- */
-#define ADC_IE_FOFIE1(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_FOFIE1_SHIFT)) & ADC_IE_FOFIE1_MASK)
-#define ADC_IE_TEXC_IE_MASK (0x100U)
-#define ADC_IE_TEXC_IE_SHIFT (8U)
-/*! TEXC_IE - Trigger Exception Interrupt Enable
- * 0b0..Trigger exception interrupts are disabled.
- * 0b1..Trigger exception interrupts are enabled.
- */
-#define ADC_IE_TEXC_IE(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_TEXC_IE_SHIFT)) & ADC_IE_TEXC_IE_MASK)
-#define ADC_IE_TCOMP_IE_MASK (0xFFFF0000U)
-#define ADC_IE_TCOMP_IE_SHIFT (16U)
-/*! TCOMP_IE - Trigger Completion Interrupt Enable
- * 0b0000000000000000..Trigger completion interrupts are disabled.
- * 0b0000000000000001..Trigger completion interrupts are enabled for trigger source 0 only.
- * 0b0000000000000010..Trigger completion interrupts are enabled for trigger source 1 only.
- * 0b0000000000000011-0b1111111111111110..Associated trigger completion interrupts are enabled.
- * 0b1111111111111111..Trigger completion interrupts are enabled for every trigger source.
- */
-#define ADC_IE_TCOMP_IE(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_TCOMP_IE_SHIFT)) & ADC_IE_TCOMP_IE_MASK)
-/*! @} */
-
-/*! @name DE - DMA Enable Register */
-/*! @{ */
-#define ADC_DE_FWMDE0_MASK (0x1U)
-#define ADC_DE_FWMDE0_SHIFT (0U)
-/*! FWMDE0 - FIFO 0 Watermark DMA Enable
- * 0b0..DMA request disabled.
- * 0b1..DMA request enabled.
- */
-#define ADC_DE_FWMDE0(x) (((uint32_t)(((uint32_t)(x)) << ADC_DE_FWMDE0_SHIFT)) & ADC_DE_FWMDE0_MASK)
-#define ADC_DE_FWMDE1_MASK (0x2U)
-#define ADC_DE_FWMDE1_SHIFT (1U)
-/*! FWMDE1 - FIFO1 Watermark DMA Enable
- * 0b0..DMA request disabled.
- * 0b1..DMA request enabled.
- */
-#define ADC_DE_FWMDE1(x) (((uint32_t)(((uint32_t)(x)) << ADC_DE_FWMDE1_SHIFT)) & ADC_DE_FWMDE1_MASK)
-/*! @} */
-
-/*! @name CFG - ADC Configuration Register */
-/*! @{ */
-#define ADC_CFG_TPRICTRL_MASK (0x3U)
-#define ADC_CFG_TPRICTRL_SHIFT (0U)
-/*! TPRICTRL - ADC trigger priority control
- * 0b00..If a higher priority trigger is detected during command processing, the current conversion is aborted
- * and the new command specified by the trigger is started.
- * 0b01..If a higher priority trigger is received during command processing, the current command is stopped after
- * after completing the current conversion. If averaging is enabled, the averaging loop will be completed.
- * However, CMDHa[LOOP] will be ignored and the higher priority trigger will be serviced.
- * 0b10..If a higher priority trigger is received during command processing, the current command will be
- * completed (averaging, looping, compare) before servicing the higher priority trigger.
- * 0b11..RESERVED
- */
-#define ADC_CFG_TPRICTRL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_TPRICTRL_SHIFT)) & ADC_CFG_TPRICTRL_MASK)
-#define ADC_CFG_PWRSEL_MASK (0x30U)
-#define ADC_CFG_PWRSEL_SHIFT (4U)
-/*! PWRSEL - Power Configuration Select
- * 0b00..Lowest power setting.
- * 0b01..Higher power setting than 0b0.
- * 0b10..Higher power setting than 0b1.
- * 0b11..Highest power setting.
- */
-#define ADC_CFG_PWRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_PWRSEL_SHIFT)) & ADC_CFG_PWRSEL_MASK)
-#define ADC_CFG_REFSEL_MASK (0xC0U)
-#define ADC_CFG_REFSEL_SHIFT (6U)
-/*! REFSEL - Voltage Reference Selection
- * 0b00..(Default) Option 1 setting.
- * 0b01..Option 2 setting.
- * 0b10..Option 3 setting.
- * 0b11..Reserved
- */
-#define ADC_CFG_REFSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_REFSEL_SHIFT)) & ADC_CFG_REFSEL_MASK)
-#define ADC_CFG_TRES_MASK (0x100U)
-#define ADC_CFG_TRES_SHIFT (8U)
-/*! TRES - Trigger Resume Enable
- * 0b0..Trigger sequences interrupted by a high priority trigger exception will not be automatically resumed or restarted.
- * 0b1..Trigger sequences interrupted by a high priority trigger exception will be automatically resumed or restarted.
- */
-#define ADC_CFG_TRES(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_TRES_SHIFT)) & ADC_CFG_TRES_MASK)
-#define ADC_CFG_TCMDRES_MASK (0x200U)
-#define ADC_CFG_TCMDRES_SHIFT (9U)
-/*! TCMDRES - Trigger Command Resume
- * 0b0..Trigger sequences interrupted by a high priority trigger exception will be automatically restarted.
- * 0b1..Trigger sequences interrupted by a high priority trigger exception will be resumed from the command executing before the exception.
- */
-#define ADC_CFG_TCMDRES(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_TCMDRES_SHIFT)) & ADC_CFG_TCMDRES_MASK)
-#define ADC_CFG_HPT_EXDI_MASK (0x400U)
-#define ADC_CFG_HPT_EXDI_SHIFT (10U)
-/*! HPT_EXDI - High Priority Trigger Exception Disable
- * 0b0..High priority trigger exceptions are enabled.
- * 0b1..High priority trigger exceptions are disabled.
- */
-#define ADC_CFG_HPT_EXDI(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_HPT_EXDI_SHIFT)) & ADC_CFG_HPT_EXDI_MASK)
-#define ADC_CFG_PUDLY_MASK (0xFF0000U)
-#define ADC_CFG_PUDLY_SHIFT (16U)
-/*! PUDLY - Power Up Delay
- */
-#define ADC_CFG_PUDLY(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_PUDLY_SHIFT)) & ADC_CFG_PUDLY_MASK)
-#define ADC_CFG_PWREN_MASK (0x10000000U)
-#define ADC_CFG_PWREN_SHIFT (28U)
-/*! PWREN - ADC Analog Pre-Enable
- * 0b0..ADC analog circuits are only enabled while conversions are active. Performance is affected due to analog startup delays.
- * 0b1..ADC analog circuits are pre-enabled and ready to execute conversions without startup delays (at the cost
- * of higher DC current consumption). A single power up delay (CFG[PUDLY]) is executed immediately once PWREN
- * is set, and any detected trigger does not begin ADC operation until the power up delay time has passed.
- * After this initial delay expires the analog will remain pre-enabled, and no additional delays will be
- * executed.
- */
-#define ADC_CFG_PWREN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_PWREN_SHIFT)) & ADC_CFG_PWREN_MASK)
-/*! @} */
-
-/*! @name PAUSE - ADC Pause Register */
-/*! @{ */
-#define ADC_PAUSE_PAUSEDLY_MASK (0x1FFU)
-#define ADC_PAUSE_PAUSEDLY_SHIFT (0U)
-/*! PAUSEDLY - Pause Delay
- */
-#define ADC_PAUSE_PAUSEDLY(x) (((uint32_t)(((uint32_t)(x)) << ADC_PAUSE_PAUSEDLY_SHIFT)) & ADC_PAUSE_PAUSEDLY_MASK)
-#define ADC_PAUSE_PAUSEEN_MASK (0x80000000U)
-#define ADC_PAUSE_PAUSEEN_SHIFT (31U)
-/*! PAUSEEN - PAUSE Option Enable
- * 0b0..Pause operation disabled
- * 0b1..Pause operation enabled
- */
-#define ADC_PAUSE_PAUSEEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_PAUSE_PAUSEEN_SHIFT)) & ADC_PAUSE_PAUSEEN_MASK)
-/*! @} */
-
-/*! @name SWTRIG - Software Trigger Register */
-/*! @{ */
-#define ADC_SWTRIG_SWT0_MASK (0x1U)
-#define ADC_SWTRIG_SWT0_SHIFT (0U)
-/*! SWT0 - Software trigger 0 event
- * 0b0..No trigger 0 event generated.
- * 0b1..Trigger 0 event generated.
- */
-#define ADC_SWTRIG_SWT0(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT0_SHIFT)) & ADC_SWTRIG_SWT0_MASK)
-#define ADC_SWTRIG_SWT1_MASK (0x2U)
-#define ADC_SWTRIG_SWT1_SHIFT (1U)
-/*! SWT1 - Software trigger 1 event
- * 0b0..No trigger 1 event generated.
- * 0b1..Trigger 1 event generated.
- */
-#define ADC_SWTRIG_SWT1(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT1_SHIFT)) & ADC_SWTRIG_SWT1_MASK)
-#define ADC_SWTRIG_SWT2_MASK (0x4U)
-#define ADC_SWTRIG_SWT2_SHIFT (2U)
-/*! SWT2 - Software trigger 2 event
- * 0b0..No trigger 2 event generated.
- * 0b1..Trigger 2 event generated.
- */
-#define ADC_SWTRIG_SWT2(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT2_SHIFT)) & ADC_SWTRIG_SWT2_MASK)
-#define ADC_SWTRIG_SWT3_MASK (0x8U)
-#define ADC_SWTRIG_SWT3_SHIFT (3U)
-/*! SWT3 - Software trigger 3 event
- * 0b0..No trigger 3 event generated.
- * 0b1..Trigger 3 event generated.
- */
-#define ADC_SWTRIG_SWT3(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT3_SHIFT)) & ADC_SWTRIG_SWT3_MASK)
-#define ADC_SWTRIG_SWT4_MASK (0x10U)
-#define ADC_SWTRIG_SWT4_SHIFT (4U)
-/*! SWT4 - Software trigger 4 event
- * 0b0..No trigger 4 event generated.
- * 0b1..Trigger 4 event generated.
- */
-#define ADC_SWTRIG_SWT4(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT4_SHIFT)) & ADC_SWTRIG_SWT4_MASK)
-#define ADC_SWTRIG_SWT5_MASK (0x20U)
-#define ADC_SWTRIG_SWT5_SHIFT (5U)
-/*! SWT5 - Software trigger 5 event
- * 0b0..No trigger 5 event generated.
- * 0b1..Trigger 5 event generated.
- */
-#define ADC_SWTRIG_SWT5(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT5_SHIFT)) & ADC_SWTRIG_SWT5_MASK)
-#define ADC_SWTRIG_SWT6_MASK (0x40U)
-#define ADC_SWTRIG_SWT6_SHIFT (6U)
-/*! SWT6 - Software trigger 6 event
- * 0b0..No trigger 6 event generated.
- * 0b1..Trigger 6 event generated.
- */
-#define ADC_SWTRIG_SWT6(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT6_SHIFT)) & ADC_SWTRIG_SWT6_MASK)
-#define ADC_SWTRIG_SWT7_MASK (0x80U)
-#define ADC_SWTRIG_SWT7_SHIFT (7U)
-/*! SWT7 - Software trigger 7 event
- * 0b0..No trigger 7 event generated.
- * 0b1..Trigger 7 event generated.
- */
-#define ADC_SWTRIG_SWT7(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT7_SHIFT)) & ADC_SWTRIG_SWT7_MASK)
-#define ADC_SWTRIG_SWT8_MASK (0x100U)
-#define ADC_SWTRIG_SWT8_SHIFT (8U)
-/*! SWT8 - Software trigger 8 event
- * 0b0..No trigger 8 event generated.
- * 0b1..Trigger 8 event generated.
- */
-#define ADC_SWTRIG_SWT8(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT8_SHIFT)) & ADC_SWTRIG_SWT8_MASK)
-#define ADC_SWTRIG_SWT9_MASK (0x200U)
-#define ADC_SWTRIG_SWT9_SHIFT (9U)
-/*! SWT9 - Software trigger 9 event
- * 0b0..No trigger 9 event generated.
- * 0b1..Trigger 9 event generated.
- */
-#define ADC_SWTRIG_SWT9(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT9_SHIFT)) & ADC_SWTRIG_SWT9_MASK)
-#define ADC_SWTRIG_SWT10_MASK (0x400U)
-#define ADC_SWTRIG_SWT10_SHIFT (10U)
-/*! SWT10 - Software trigger 10 event
- * 0b0..No trigger 10 event generated.
- * 0b1..Trigger 10 event generated.
- */
-#define ADC_SWTRIG_SWT10(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT10_SHIFT)) & ADC_SWTRIG_SWT10_MASK)
-#define ADC_SWTRIG_SWT11_MASK (0x800U)
-#define ADC_SWTRIG_SWT11_SHIFT (11U)
-/*! SWT11 - Software trigger 11 event
- * 0b0..No trigger 11 event generated.
- * 0b1..Trigger 11 event generated.
- */
-#define ADC_SWTRIG_SWT11(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT11_SHIFT)) & ADC_SWTRIG_SWT11_MASK)
-#define ADC_SWTRIG_SWT12_MASK (0x1000U)
-#define ADC_SWTRIG_SWT12_SHIFT (12U)
-/*! SWT12 - Software trigger 12 event
- * 0b0..No trigger 12 event generated.
- * 0b1..Trigger 12 event generated.
- */
-#define ADC_SWTRIG_SWT12(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT12_SHIFT)) & ADC_SWTRIG_SWT12_MASK)
-#define ADC_SWTRIG_SWT13_MASK (0x2000U)
-#define ADC_SWTRIG_SWT13_SHIFT (13U)
-/*! SWT13 - Software trigger 13 event
- * 0b0..No trigger 13 event generated.
- * 0b1..Trigger 13 event generated.
- */
-#define ADC_SWTRIG_SWT13(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT13_SHIFT)) & ADC_SWTRIG_SWT13_MASK)
-#define ADC_SWTRIG_SWT14_MASK (0x4000U)
-#define ADC_SWTRIG_SWT14_SHIFT (14U)
-/*! SWT14 - Software trigger 14 event
- * 0b0..No trigger 14 event generated.
- * 0b1..Trigger 14 event generated.
- */
-#define ADC_SWTRIG_SWT14(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT14_SHIFT)) & ADC_SWTRIG_SWT14_MASK)
-#define ADC_SWTRIG_SWT15_MASK (0x8000U)
-#define ADC_SWTRIG_SWT15_SHIFT (15U)
-/*! SWT15 - Software trigger 15 event
- * 0b0..No trigger 15 event generated.
- * 0b1..Trigger 15 event generated.
- */
-#define ADC_SWTRIG_SWT15(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT15_SHIFT)) & ADC_SWTRIG_SWT15_MASK)
-/*! @} */
-
-/*! @name TSTAT - Trigger Status Register */
-/*! @{ */
-#define ADC_TSTAT_TEXC_NUM_MASK (0xFFFFU)
-#define ADC_TSTAT_TEXC_NUM_SHIFT (0U)
-/*! TEXC_NUM - Trigger Exception Number
- * 0b0000000000000000..No triggers have been interrupted by a high priority exception. Or CFG[TRES] = 1.
- * 0b0000000000000001..Trigger 0 has been interrupted by a high priority exception.
- * 0b0000000000000010..Trigger 1 has been interrupted by a high priority exception.
- * 0b0000000000000011-0b1111111111111110..Associated trigger sequence has interrupted by a high priority exception.
- * 0b1111111111111111..Every trigger sequence has been interrupted by a high priority exception.
- */
-#define ADC_TSTAT_TEXC_NUM(x) (((uint32_t)(((uint32_t)(x)) << ADC_TSTAT_TEXC_NUM_SHIFT)) & ADC_TSTAT_TEXC_NUM_MASK)
-#define ADC_TSTAT_TCOMP_FLAG_MASK (0xFFFF0000U)
-#define ADC_TSTAT_TCOMP_FLAG_SHIFT (16U)
-/*! TCOMP_FLAG - Trigger Completion Flag
- * 0b0000000000000000..No triggers have been completed. Trigger completion interrupts are disabled.
- * 0b0000000000000001..Trigger 0 has been completed and triger 0 has enabled completion interrupts.
- * 0b0000000000000010..Trigger 1 has been completed and triger 1 has enabled completion interrupts.
- * 0b0000000000000011-0b1111111111111110..Associated trigger sequence has completed and has enabled completion interrupts.
- * 0b1111111111111111..Every trigger sequence has been completed and every trigger has enabled completion interrupts.
- */
-#define ADC_TSTAT_TCOMP_FLAG(x) (((uint32_t)(((uint32_t)(x)) << ADC_TSTAT_TCOMP_FLAG_SHIFT)) & ADC_TSTAT_TCOMP_FLAG_MASK)
-/*! @} */
-
-/*! @name OFSTRIM - ADC Offset Trim Register */
-/*! @{ */
-#define ADC_OFSTRIM_OFSTRIM_A_MASK (0x1FU)
-#define ADC_OFSTRIM_OFSTRIM_A_SHIFT (0U)
-/*! OFSTRIM_A - Trim for offset
- */
-#define ADC_OFSTRIM_OFSTRIM_A(x) (((uint32_t)(((uint32_t)(x)) << ADC_OFSTRIM_OFSTRIM_A_SHIFT)) & ADC_OFSTRIM_OFSTRIM_A_MASK)
-#define ADC_OFSTRIM_OFSTRIM_B_MASK (0x1F0000U)
-#define ADC_OFSTRIM_OFSTRIM_B_SHIFT (16U)
-/*! OFSTRIM_B - Trim for offset
- */
-#define ADC_OFSTRIM_OFSTRIM_B(x) (((uint32_t)(((uint32_t)(x)) << ADC_OFSTRIM_OFSTRIM_B_SHIFT)) & ADC_OFSTRIM_OFSTRIM_B_MASK)
-/*! @} */
-
-/*! @name TCTRL - Trigger Control Register */
-/*! @{ */
-#define ADC_TCTRL_HTEN_MASK (0x1U)
-#define ADC_TCTRL_HTEN_SHIFT (0U)
-/*! HTEN - Trigger enable
- * 0b0..Hardware trigger source disabled
- * 0b1..Hardware trigger source enabled
- */
-#define ADC_TCTRL_HTEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_HTEN_SHIFT)) & ADC_TCTRL_HTEN_MASK)
-#define ADC_TCTRL_FIFO_SEL_A_MASK (0x2U)
-#define ADC_TCTRL_FIFO_SEL_A_SHIFT (1U)
-/*! FIFO_SEL_A - SAR Result Destination For Channel A
- * 0b0..Result written to FIFO 0
- * 0b1..Result written to FIFO 1
- */
-#define ADC_TCTRL_FIFO_SEL_A(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_FIFO_SEL_A_SHIFT)) & ADC_TCTRL_FIFO_SEL_A_MASK)
-#define ADC_TCTRL_FIFO_SEL_B_MASK (0x4U)
-#define ADC_TCTRL_FIFO_SEL_B_SHIFT (2U)
-/*! FIFO_SEL_B - SAR Result Destination For Channel B
- * 0b0..Result written to FIFO 0
- * 0b1..Result written to FIFO 1
- */
-#define ADC_TCTRL_FIFO_SEL_B(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_FIFO_SEL_B_SHIFT)) & ADC_TCTRL_FIFO_SEL_B_MASK)
-#define ADC_TCTRL_TPRI_MASK (0xF00U)
-#define ADC_TCTRL_TPRI_SHIFT (8U)
-/*! TPRI - Trigger priority setting
- * 0b0000..Set to highest priority, Level 1
- * 0b0001-0b1110..Set to corresponding priority level
- * 0b1111..Set to lowest priority, Level 16
- */
-#define ADC_TCTRL_TPRI(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_TPRI_SHIFT)) & ADC_TCTRL_TPRI_MASK)
-#define ADC_TCTRL_RSYNC_MASK (0x8000U)
-#define ADC_TCTRL_RSYNC_SHIFT (15U)
-/*! RSYNC - Trigger Resync
- */
-#define ADC_TCTRL_RSYNC(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_RSYNC_SHIFT)) & ADC_TCTRL_RSYNC_MASK)
-#define ADC_TCTRL_TDLY_MASK (0xF0000U)
-#define ADC_TCTRL_TDLY_SHIFT (16U)
-/*! TDLY - Trigger delay select
- */
-#define ADC_TCTRL_TDLY(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_TDLY_SHIFT)) & ADC_TCTRL_TDLY_MASK)
-#define ADC_TCTRL_TCMD_MASK (0xF000000U)
-#define ADC_TCTRL_TCMD_SHIFT (24U)
-/*! TCMD - Trigger command select
- * 0b0000..Not a valid selection from the command buffer. Trigger event is ignored.
- * 0b0001..CMD1 is executed
- * 0b0010-0b1110..Corresponding CMD is executed
- * 0b1111..CMD15 is executed
- */
-#define ADC_TCTRL_TCMD(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_TCMD_SHIFT)) & ADC_TCTRL_TCMD_MASK)
-/*! @} */
-
-/* The count of ADC_TCTRL */
-#define ADC_TCTRL_COUNT (16U)
-
-/*! @name FCTRL - FIFO Control Register */
-/*! @{ */
-#define ADC_FCTRL_FCOUNT_MASK (0x1FU)
-#define ADC_FCTRL_FCOUNT_SHIFT (0U)
-/*! FCOUNT - Result FIFO counter
- */
-#define ADC_FCTRL_FCOUNT(x) (((uint32_t)(((uint32_t)(x)) << ADC_FCTRL_FCOUNT_SHIFT)) & ADC_FCTRL_FCOUNT_MASK)
-#define ADC_FCTRL_FWMARK_MASK (0xF0000U)
-#define ADC_FCTRL_FWMARK_SHIFT (16U)
-/*! FWMARK - Watermark level selection
- */
-#define ADC_FCTRL_FWMARK(x) (((uint32_t)(((uint32_t)(x)) << ADC_FCTRL_FWMARK_SHIFT)) & ADC_FCTRL_FWMARK_MASK)
-/*! @} */
-
-/* The count of ADC_FCTRL */
-#define ADC_FCTRL_COUNT (2U)
-
-/*! @name GCC - Gain Calibration Control */
-/*! @{ */
-#define ADC_GCC_GAIN_CAL_MASK (0xFFFFU)
-#define ADC_GCC_GAIN_CAL_SHIFT (0U)
-/*! GAIN_CAL - Gain Calibration Value
- */
-#define ADC_GCC_GAIN_CAL(x) (((uint32_t)(((uint32_t)(x)) << ADC_GCC_GAIN_CAL_SHIFT)) & ADC_GCC_GAIN_CAL_MASK)
-#define ADC_GCC_RDY_MASK (0x1000000U)
-#define ADC_GCC_RDY_SHIFT (24U)
-/*! RDY - Gain Calibration Value Valid
- * 0b0..The gain calibration value is invalid. Run the auto-calibration routine for this value to be written.
- * 0b1..The gain calibration value is valid. It should be used to update the GCRa[GCALR] register field.
- */
-#define ADC_GCC_RDY(x) (((uint32_t)(((uint32_t)(x)) << ADC_GCC_RDY_SHIFT)) & ADC_GCC_RDY_MASK)
-/*! @} */
-
-/* The count of ADC_GCC */
-#define ADC_GCC_COUNT (2U)
-
-/*! @name GCR - Gain Calculation Result */
-/*! @{ */
-#define ADC_GCR_GCALR_MASK (0xFFFFU)
-#define ADC_GCR_GCALR_SHIFT (0U)
-/*! GCALR - Gain Calculation Result
- */
-#define ADC_GCR_GCALR(x) (((uint32_t)(((uint32_t)(x)) << ADC_GCR_GCALR_SHIFT)) & ADC_GCR_GCALR_MASK)
-#define ADC_GCR_RDY_MASK (0x1000000U)
-#define ADC_GCR_RDY_SHIFT (24U)
-/*! RDY - Gain Calculation Ready
- * 0b0..The gain offset calculation value is invalid.
- * 0b1..The gain calibration value is valid.
- */
-#define ADC_GCR_RDY(x) (((uint32_t)(((uint32_t)(x)) << ADC_GCR_RDY_SHIFT)) & ADC_GCR_RDY_MASK)
-/*! @} */
-
-/* The count of ADC_GCR */
-#define ADC_GCR_COUNT (2U)
-
-/*! @name CMDL - ADC Command Low Buffer Register */
-/*! @{ */
-#define ADC_CMDL_ADCH_MASK (0x1FU)
-#define ADC_CMDL_ADCH_SHIFT (0U)
-/*! ADCH - Input channel select
- * 0b00000..Select CH0A or CH0B or CH0A/CH0B pair.
- * 0b00001..Select CH1A or CH1B or CH1A/CH1B pair.
- * 0b00010..Select CH2A or CH2B or CH2A/CH2B pair.
- * 0b00011..Select CH3A or CH3B or CH3A/CH3B pair.
- * 0b00100-0b11101..Select corresponding channel CHnA or CHnB or CHnA/CHnB pair.
- * 0b11110..Select CH30A or CH30B or CH30A/CH30B pair.
- * 0b11111..Select CH31A or CH31B or CH31A/CH31B pair.
- */
-#define ADC_CMDL_ADCH(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDL_ADCH_SHIFT)) & ADC_CMDL_ADCH_MASK)
-#define ADC_CMDL_CTYPE_MASK (0x60U)
-#define ADC_CMDL_CTYPE_SHIFT (5U)
-/*! CTYPE - Conversion Type
- * 0b00..Single-Ended Mode. Only A side channel is converted.
- * 0b01..Single-Ended Mode. Only B side channel is converted.
- * 0b10..Differential Mode. A-B.
- * 0b11..Dual-Single-Ended Mode. Both A side and B side channels are converted independently.
- */
-#define ADC_CMDL_CTYPE(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDL_CTYPE_SHIFT)) & ADC_CMDL_CTYPE_MASK)
-#define ADC_CMDL_MODE_MASK (0x80U)
-#define ADC_CMDL_MODE_SHIFT (7U)
-/*! MODE - Select resolution of conversions
- * 0b0..Standard resolution. Single-ended 12-bit conversion; Differential 13-bit conversion with 2's complement output.
- * 0b1..High resolution. Single-ended 16-bit conversion; Differential 16-bit conversion with 2's complement output.
- */
-#define ADC_CMDL_MODE(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDL_MODE_SHIFT)) & ADC_CMDL_MODE_MASK)
-/*! @} */
-
-/* The count of ADC_CMDL */
-#define ADC_CMDL_COUNT (15U)
-
-/*! @name CMDH - ADC Command High Buffer Register */
-/*! @{ */
-#define ADC_CMDH_CMPEN_MASK (0x3U)
-#define ADC_CMDH_CMPEN_SHIFT (0U)
-/*! CMPEN - Compare Function Enable
- * 0b00..Compare disabled.
- * 0b01..Reserved
- * 0b10..Compare enabled. Store on true.
- * 0b11..Compare enabled. Repeat channel acquisition (sample/convert/compare) until true.
- */
-#define ADC_CMDH_CMPEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_CMPEN_SHIFT)) & ADC_CMDH_CMPEN_MASK)
-#define ADC_CMDH_WAIT_TRIG_MASK (0x4U)
-#define ADC_CMDH_WAIT_TRIG_SHIFT (2U)
-/*! WAIT_TRIG - Wait for trigger assertion before execution.
- * 0b0..This command will be automatically executed.
- * 0b1..The active trigger must be asserted again before executing this command.
- */
-#define ADC_CMDH_WAIT_TRIG(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_WAIT_TRIG_SHIFT)) & ADC_CMDH_WAIT_TRIG_MASK)
-#define ADC_CMDH_LWI_MASK (0x80U)
-#define ADC_CMDH_LWI_SHIFT (7U)
-/*! LWI - Loop with Increment
- * 0b0..Auto channel increment disabled
- * 0b1..Auto channel increment enabled
- */
-#define ADC_CMDH_LWI(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_LWI_SHIFT)) & ADC_CMDH_LWI_MASK)
-#define ADC_CMDH_STS_MASK (0x700U)
-#define ADC_CMDH_STS_SHIFT (8U)
-/*! STS - Sample Time Select
- * 0b000..Minimum sample time of 3 ADCK cycles.
- * 0b001..3 + 21 ADCK cycles; 5 ADCK cycles total sample time.
- * 0b010..3 + 22 ADCK cycles; 7 ADCK cycles total sample time.
- * 0b011..3 + 23 ADCK cycles; 11 ADCK cycles total sample time.
- * 0b100..3 + 24 ADCK cycles; 19 ADCK cycles total sample time.
- * 0b101..3 + 25 ADCK cycles; 35 ADCK cycles total sample time.
- * 0b110..3 + 26 ADCK cycles; 67 ADCK cycles total sample time.
- * 0b111..3 + 27 ADCK cycles; 131 ADCK cycles total sample time.
- */
-#define ADC_CMDH_STS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_STS_SHIFT)) & ADC_CMDH_STS_MASK)
-#define ADC_CMDH_AVGS_MASK (0x7000U)
-#define ADC_CMDH_AVGS_SHIFT (12U)
-/*! AVGS - Hardware Average Select
- * 0b000..Single conversion.
- * 0b001..2 conversions averaged.
- * 0b010..4 conversions averaged.
- * 0b011..8 conversions averaged.
- * 0b100..16 conversions averaged.
- * 0b101..32 conversions averaged.
- * 0b110..64 conversions averaged.
- * 0b111..128 conversions averaged.
- */
-#define ADC_CMDH_AVGS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_AVGS_SHIFT)) & ADC_CMDH_AVGS_MASK)
-#define ADC_CMDH_LOOP_MASK (0xF0000U)
-#define ADC_CMDH_LOOP_SHIFT (16U)
-/*! LOOP - Loop Count Select
- * 0b0000..Looping not enabled. Command executes 1 time.
- * 0b0001..Loop 1 time. Command executes 2 times.
- * 0b0010..Loop 2 times. Command executes 3 times.
- * 0b0011-0b1110..Loop corresponding number of times. Command executes LOOP+1 times.
- * 0b1111..Loop 15 times. Command executes 16 times.
- */
-#define ADC_CMDH_LOOP(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_LOOP_SHIFT)) & ADC_CMDH_LOOP_MASK)
-#define ADC_CMDH_NEXT_MASK (0xF000000U)
-#define ADC_CMDH_NEXT_SHIFT (24U)
-/*! NEXT - Next Command Select
- * 0b0000..No next command defined. Terminate conversions at completion of current command. If lower priority
- * trigger pending, begin command associated with lower priority trigger.
- * 0b0001..Select CMD1 command buffer register as next command.
- * 0b0010-0b1110..Select corresponding CMD command buffer register as next command
- * 0b1111..Select CMD15 command buffer register as next command.
- */
-#define ADC_CMDH_NEXT(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_NEXT_SHIFT)) & ADC_CMDH_NEXT_MASK)
-/*! @} */
-
-/* The count of ADC_CMDH */
-#define ADC_CMDH_COUNT (15U)
-
-/*! @name CV - Compare Value Register */
-/*! @{ */
-#define ADC_CV_CVL_MASK (0xFFFFU)
-#define ADC_CV_CVL_SHIFT (0U)
-/*! CVL - Compare Value Low.
- */
-#define ADC_CV_CVL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CV_CVL_SHIFT)) & ADC_CV_CVL_MASK)
-#define ADC_CV_CVH_MASK (0xFFFF0000U)
-#define ADC_CV_CVH_SHIFT (16U)
-/*! CVH - Compare Value High.
- */
-#define ADC_CV_CVH(x) (((uint32_t)(((uint32_t)(x)) << ADC_CV_CVH_SHIFT)) & ADC_CV_CVH_MASK)
-/*! @} */
-
-/* The count of ADC_CV */
-#define ADC_CV_COUNT (4U)
-
-/*! @name RESFIFO - ADC Data Result FIFO Register */
-/*! @{ */
-#define ADC_RESFIFO_D_MASK (0xFFFFU)
-#define ADC_RESFIFO_D_SHIFT (0U)
-/*! D - Data result
- */
-#define ADC_RESFIFO_D(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_D_SHIFT)) & ADC_RESFIFO_D_MASK)
-#define ADC_RESFIFO_TSRC_MASK (0xF0000U)
-#define ADC_RESFIFO_TSRC_SHIFT (16U)
-/*! TSRC - Trigger Source
- * 0b0000..Trigger source 0 initiated this conversion.
- * 0b0001..Trigger source 1 initiated this conversion.
- * 0b0010-0b1110..Corresponding trigger source initiated this conversion.
- * 0b1111..Trigger source 15 initiated this conversion.
- */
-#define ADC_RESFIFO_TSRC(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_TSRC_SHIFT)) & ADC_RESFIFO_TSRC_MASK)
-#define ADC_RESFIFO_LOOPCNT_MASK (0xF00000U)
-#define ADC_RESFIFO_LOOPCNT_SHIFT (20U)
-/*! LOOPCNT - Loop count value
- * 0b0000..Result is from initial conversion in command.
- * 0b0001..Result is from second conversion in command.
- * 0b0010-0b1110..Result is from LOOPCNT+1 conversion in command.
- * 0b1111..Result is from 16th conversion in command.
- */
-#define ADC_RESFIFO_LOOPCNT(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_LOOPCNT_SHIFT)) & ADC_RESFIFO_LOOPCNT_MASK)
-#define ADC_RESFIFO_CMDSRC_MASK (0xF000000U)
-#define ADC_RESFIFO_CMDSRC_SHIFT (24U)
-/*! CMDSRC - Command Buffer Source
- * 0b0000..Not a valid value CMDSRC value for a dataword in RESFIFO. 0x0 is only found in initial FIFO state
- * prior to an ADC conversion result dataword being stored to a RESFIFO buffer.
- * 0b0001..CMD1 buffer used as control settings for this conversion.
- * 0b0010-0b1110..Corresponding command buffer used as control settings for this conversion.
- * 0b1111..CMD15 buffer used as control settings for this conversion.
- */
-#define ADC_RESFIFO_CMDSRC(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_CMDSRC_SHIFT)) & ADC_RESFIFO_CMDSRC_MASK)
-#define ADC_RESFIFO_VALID_MASK (0x80000000U)
-#define ADC_RESFIFO_VALID_SHIFT (31U)
-/*! VALID - FIFO entry is valid
- * 0b0..FIFO is empty. Discard any read from RESFIFO.
- * 0b1..FIFO record read from RESFIFO is valid.
- */
-#define ADC_RESFIFO_VALID(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_VALID_SHIFT)) & ADC_RESFIFO_VALID_MASK)
-/*! @} */
-
-/* The count of ADC_RESFIFO */
-#define ADC_RESFIFO_COUNT (2U)
-
-/*! @name CAL_GAR - Calibration General A-Side Registers */
-/*! @{ */
-#define ADC_CAL_GAR_CAL_GAR_VAL_MASK (0xFFFFU)
-#define ADC_CAL_GAR_CAL_GAR_VAL_SHIFT (0U)
-/*! CAL_GAR_VAL - Calibration General A Side Register Element
- */
-#define ADC_CAL_GAR_CAL_GAR_VAL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CAL_GAR_CAL_GAR_VAL_SHIFT)) & ADC_CAL_GAR_CAL_GAR_VAL_MASK)
-/*! @} */
-
-/* The count of ADC_CAL_GAR */
-#define ADC_CAL_GAR_COUNT (33U)
-
-/*! @name CAL_GBR - Calibration General B-Side Registers */
-/*! @{ */
-#define ADC_CAL_GBR_CAL_GBR_VAL_MASK (0xFFFFU)
-#define ADC_CAL_GBR_CAL_GBR_VAL_SHIFT (0U)
-/*! CAL_GBR_VAL - Calibration General B Side Register Element
- */
-#define ADC_CAL_GBR_CAL_GBR_VAL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CAL_GBR_CAL_GBR_VAL_SHIFT)) & ADC_CAL_GBR_CAL_GBR_VAL_MASK)
-/*! @} */
-
-/* The count of ADC_CAL_GBR */
-#define ADC_CAL_GBR_COUNT (33U)
-
-/*! @name TST - ADC Test Register */
-/*! @{ */
-#define ADC_TST_CST_LONG_MASK (0x1U)
-#define ADC_TST_CST_LONG_SHIFT (0U)
-/*! CST_LONG - Calibration Sample Time Long
- * 0b0..Normal sample time. Minimum sample time of 3 ADCK cycles.
- * 0b1..Increased sample time. 67 ADCK cycles total sample time.
- */
-#define ADC_TST_CST_LONG(x) (((uint32_t)(((uint32_t)(x)) << ADC_TST_CST_LONG_SHIFT)) & ADC_TST_CST_LONG_MASK)
-#define ADC_TST_FOFFM_MASK (0x100U)
-#define ADC_TST_FOFFM_SHIFT (8U)
-/*! FOFFM - Force M-side positive offset
- * 0b0..Normal operation. No forced offset.
- * 0b1..Test configuration. Forced positive offset on MDAC.
- */
-#define ADC_TST_FOFFM(x) (((uint32_t)(((uint32_t)(x)) << ADC_TST_FOFFM_SHIFT)) & ADC_TST_FOFFM_MASK)
-#define ADC_TST_FOFFP_MASK (0x200U)
-#define ADC_TST_FOFFP_SHIFT (9U)
-/*! FOFFP - Force P-side positive offset
- * 0b0..Normal operation. No forced offset.
- * 0b1..Test configuration. Forced positive offset on PDAC.
- */
-#define ADC_TST_FOFFP(x) (((uint32_t)(((uint32_t)(x)) << ADC_TST_FOFFP_SHIFT)) & ADC_TST_FOFFP_MASK)
-#define ADC_TST_FOFFM2_MASK (0x400U)
-#define ADC_TST_FOFFM2_SHIFT (10U)
-/*! FOFFM2 - Force M-side negative offset
- * 0b0..Normal operation. No forced offset.
- * 0b1..Test configuration. Forced negative offset on MDAC.
- */
-#define ADC_TST_FOFFM2(x) (((uint32_t)(((uint32_t)(x)) << ADC_TST_FOFFM2_SHIFT)) & ADC_TST_FOFFM2_MASK)
-#define ADC_TST_FOFFP2_MASK (0x800U)
-#define ADC_TST_FOFFP2_SHIFT (11U)
-/*! FOFFP2 - Force P-side negative offset
- * 0b0..Normal operation. No forced offset.
- * 0b1..Test configuration. Forced negative offset on PDAC.
- */
-#define ADC_TST_FOFFP2(x) (((uint32_t)(((uint32_t)(x)) << ADC_TST_FOFFP2_SHIFT)) & ADC_TST_FOFFP2_MASK)
-#define ADC_TST_TESTEN_MASK (0x800000U)
-#define ADC_TST_TESTEN_SHIFT (23U)
-/*! TESTEN - Enable test configuration
- * 0b0..Normal operation. Test configuration not enabled.
- * 0b1..Hardware BIST Test in progress.
- */
-#define ADC_TST_TESTEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_TST_TESTEN_SHIFT)) & ADC_TST_TESTEN_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group ADC_Register_Masks */
-
-
-/* ADC - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral ADC0 base address */
- #define ADC0_BASE (0x500A0000u)
- /** Peripheral ADC0 base address */
- #define ADC0_BASE_NS (0x400A0000u)
- /** Peripheral ADC0 base pointer */
- #define ADC0 ((ADC_Type *)ADC0_BASE)
- /** Peripheral ADC0 base pointer */
- #define ADC0_NS ((ADC_Type *)ADC0_BASE_NS)
- /** Array initializer of ADC peripheral base addresses */
- #define ADC_BASE_ADDRS { ADC0_BASE }
- /** Array initializer of ADC peripheral base pointers */
- #define ADC_BASE_PTRS { ADC0 }
- /** Array initializer of ADC peripheral base addresses */
- #define ADC_BASE_ADDRS_NS { ADC0_BASE_NS }
- /** Array initializer of ADC peripheral base pointers */
- #define ADC_BASE_PTRS_NS { ADC0_NS }
-#else
- /** Peripheral ADC0 base address */
- #define ADC0_BASE (0x400A0000u)
- /** Peripheral ADC0 base pointer */
- #define ADC0 ((ADC_Type *)ADC0_BASE)
- /** Array initializer of ADC peripheral base addresses */
- #define ADC_BASE_ADDRS { ADC0_BASE }
- /** Array initializer of ADC peripheral base pointers */
- #define ADC_BASE_PTRS { ADC0 }
-#endif
-/** Interrupt vectors for the ADC peripheral type */
-#define ADC_IRQS { ADC0_IRQn }
-
-/*!
- * @}
- */ /* end of group ADC_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- AHB_SECURE_CTRL Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup AHB_SECURE_CTRL_Peripheral_Access_Layer AHB_SECURE_CTRL Peripheral Access Layer
- * @{
- */
-
-/** AHB_SECURE_CTRL - Register Layout Typedef */
-typedef struct {
- struct { /* offset: 0x0, array step: 0x30 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for Flash and ROM slaves., array offset: 0x0, array step: 0x30 */
- uint8_t RESERVED_0[12];
- __IO uint32_t SEC_CTRL_FLASH_MEM_RULE[3]; /**< Security access rules for FLASH sector 0 to sector 20. Each Flash sector is 32 Kbytes. There are 20 FLASH sectors in total., array offset: 0x10, array step: index*0x30, index2*0x4 */
- uint8_t RESERVED_1[4];
- __IO uint32_t SEC_CTRL_ROM_MEM_RULE[4]; /**< Security access rules for ROM sector 0 to sector 31. Each ROM sector is 4 Kbytes. There are 32 ROM sectors in total., array offset: 0x20, array step: index*0x30, index2*0x4 */
- } SEC_CTRL_FLASH_ROM[1];
- struct { /* offset: 0x30, array step: 0x14 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for RAMX slaves., array offset: 0x30, array step: 0x14 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[1]; /**< Security access rules for RAMX slaves., array offset: 0x40, array step: index*0x14, index2*0x4 */
- } SEC_CTRL_RAMX[1];
- uint8_t RESERVED_0[12];
- struct { /* offset: 0x50, array step: 0x18 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for RAM0 slaves., array offset: 0x50, array step: 0x18 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[2]; /**< Security access rules for RAM0 slaves., array offset: 0x60, array step: index*0x18, index2*0x4 */
- } SEC_CTRL_RAM0[1];
- uint8_t RESERVED_1[8];
- struct { /* offset: 0x70, array step: 0x18 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for RAM1 slaves., array offset: 0x70, array step: 0x18 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[2]; /**< Security access rules for RAM1 slaves., array offset: 0x80, array step: index*0x18, index2*0x4 */
- } SEC_CTRL_RAM1[1];
- uint8_t RESERVED_2[8];
- struct { /* offset: 0x90, array step: 0x18 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for RAM2 slaves., array offset: 0x90, array step: 0x18 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[2]; /**< Security access rules for RAM2 slaves., array offset: 0xA0, array step: index*0x18, index2*0x4 */
- } SEC_CTRL_RAM2[1];
- uint8_t RESERVED_3[8];
- struct { /* offset: 0xB0, array step: 0x18 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for RAM3 slaves., array offset: 0xB0, array step: 0x18 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[2]; /**< Security access rules for RAM3 slaves., array offset: 0xC0, array step: index*0x18, index2*0x4 */
- } SEC_CTRL_RAM3[1];
- uint8_t RESERVED_4[8];
- struct { /* offset: 0xD0, array step: 0x14 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for RAM4 slaves., array offset: 0xD0, array step: 0x14 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[1]; /**< Security access rules for RAM4 slaves., array offset: 0xE0, array step: index*0x14, index2*0x4 */
- } SEC_CTRL_RAM4[1];
- uint8_t RESERVED_5[12];
- struct { /* offset: 0xF0, array step: 0x30 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for both APB Bridges slaves., array offset: 0xF0, array step: 0x30 */
- uint8_t RESERVED_0[12];
- __IO uint32_t SEC_CTRL_APB_BRIDGE0_MEM_CTRL0; /**< Security access rules for APB Bridge 0 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 0 sectors in total., array offset: 0x100, array step: 0x30 */
- __IO uint32_t SEC_CTRL_APB_BRIDGE0_MEM_CTRL1; /**< Security access rules for APB Bridge 0 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 0 sectors in total., array offset: 0x104, array step: 0x30 */
- __IO uint32_t SEC_CTRL_APB_BRIDGE0_MEM_CTRL2; /**< Security access rules for APB Bridge 0 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 0 sectors in total., array offset: 0x108, array step: 0x30 */
- uint8_t RESERVED_1[4];
- __IO uint32_t SEC_CTRL_APB_BRIDGE1_MEM_CTRL0; /**< Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total., array offset: 0x110, array step: 0x30 */
- __IO uint32_t SEC_CTRL_APB_BRIDGE1_MEM_CTRL1; /**< Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total., array offset: 0x114, array step: 0x30 */
- __IO uint32_t SEC_CTRL_APB_BRIDGE1_MEM_CTRL2; /**< Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total., array offset: 0x118, array step: 0x30 */
- __IO uint32_t SEC_CTRL_APB_BRIDGE1_MEM_CTRL3; /**< Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total., array offset: 0x11C, array step: 0x30 */
- } SEC_CTRL_APB_BRIDGE[1];
- __IO uint32_t SEC_CTRL_AHB_PORT8_SLAVE0_RULE; /**< Security access rules for AHB peripherals., offset: 0x120 */
- __IO uint32_t SEC_CTRL_AHB_PORT8_SLAVE1_RULE; /**< Security access rules for AHB peripherals., offset: 0x124 */
- uint8_t RESERVED_6[8];
- __IO uint32_t SEC_CTRL_AHB_PORT9_SLAVE0_RULE; /**< Security access rules for AHB peripherals., offset: 0x130 */
- __IO uint32_t SEC_CTRL_AHB_PORT9_SLAVE1_RULE; /**< Security access rules for AHB peripherals., offset: 0x134 */
- uint8_t RESERVED_7[8];
- struct { /* offset: 0x140, array step: 0x14 */
- __IO uint32_t SLAVE0_RULE; /**< Security access rules for AHB peripherals., array offset: 0x140, array step: 0x14 */
- __IO uint32_t SLAVE1_RULE; /**< Security access rules for AHB peripherals., array offset: 0x144, array step: 0x14 */
- uint8_t RESERVED_0[8];
- __IO uint32_t SEC_CTRL_AHB_SEC_CTRL_MEM_RULE[1]; /**< Security access rules for AHB_SEC_CTRL_AHB., array offset: 0x150, array step: index*0x14, index2*0x4 */
- } SEC_CTRL_AHB_PORT10[1];
- uint8_t RESERVED_8[12];
- struct { /* offset: 0x160, array step: 0x14 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for USB High speed RAM slaves., array offset: 0x160, array step: 0x14 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[1]; /**< Security access rules for RAM_USB_HS., array offset: 0x170, array step: index*0x14, index2*0x4 */
- } SEC_CTRL_USB_HS[1];
- uint8_t RESERVED_9[3212];
- __I uint32_t SEC_VIO_ADDR[12]; /**< most recent security violation address for AHB port n, array offset: 0xE00, array step: 0x4 */
- uint8_t RESERVED_10[80];
- __I uint32_t SEC_VIO_MISC_INFO[12]; /**< most recent security violation miscellaneous information for AHB port n, array offset: 0xE80, array step: 0x4 */
- uint8_t RESERVED_11[80];
- __IO uint32_t SEC_VIO_INFO_VALID; /**< security violation address/information registers valid flags, offset: 0xF00 */
- uint8_t RESERVED_12[124];
- __IO uint32_t SEC_GPIO_MASK0; /**< Secure GPIO mask for port 0 pins., offset: 0xF80 */
- __IO uint32_t SEC_GPIO_MASK1; /**< Secure GPIO mask for port 1 pins., offset: 0xF84 */
- uint8_t RESERVED_13[8];
- __IO uint32_t SEC_CPU_INT_MASK0; /**< Secure Interrupt mask for CPU1, offset: 0xF90 */
- __IO uint32_t SEC_CPU_INT_MASK1; /**< Secure Interrupt mask for CPU1, offset: 0xF94 */
- uint8_t RESERVED_14[36];
- __IO uint32_t SEC_MASK_LOCK; /**< Security General Purpose register access control., offset: 0xFBC */
- uint8_t RESERVED_15[16];
- __IO uint32_t MASTER_SEC_LEVEL; /**< master secure level register, offset: 0xFD0 */
- __IO uint32_t MASTER_SEC_ANTI_POL_REG; /**< master secure level anti-pole register, offset: 0xFD4 */
- uint8_t RESERVED_16[20];
- __IO uint32_t CPU0_LOCK_REG; /**< Miscalleneous control signals for in Cortex M33 (CPU0), offset: 0xFEC */
- __IO uint32_t CPU1_LOCK_REG; /**< Miscalleneous control signals for in micro-Cortex M33 (CPU1), offset: 0xFF0 */
- uint8_t RESERVED_17[4];
- __IO uint32_t MISC_CTRL_DP_REG; /**< secure control duplicate register, offset: 0xFF8 */
- __IO uint32_t MISC_CTRL_REG; /**< secure control register, offset: 0xFFC */
-} AHB_SECURE_CTRL_Type;
-
-/* ----------------------------------------------------------------------------
- -- AHB_SECURE_CTRL Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup AHB_SECURE_CTRL_Register_Masks AHB_SECURE_CTRL Register Masks
- * @{
- */
-
-/*! @name SEC_CTRL_FLASH_ROM_SLAVE_RULE - Security access rules for Flash and ROM slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_FLASH_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_FLASH_RULE_SHIFT (0U)
-/*! FLASH_RULE - Security access rules for the whole FLASH : 0x0000_0000 - 0x0009_FFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_FLASH_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_FLASH_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_FLASH_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_ROM_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_ROM_RULE_SHIFT (4U)
-/*! ROM_RULE - Security access rules for the whole ROM : 0x0300_0000 - 0x0301_FFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_ROM_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_ROM_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_ROM_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_FLASH_MEM_RULE - Security access rules for FLASH sector 0 to sector 20. Each Flash sector is 32 Kbytes. There are 20 FLASH sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_COUNT2 (3U)
-
-/*! @name SEC_CTRL_ROM_MEM_RULE - Security access rules for ROM sector 0 to sector 31. Each ROM sector is 4 Kbytes. There are 32 ROM sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_COUNT2 (4U)
-
-/*! @name SEC_CTRL_RAMX_SLAVE_RULE - Security access rules for RAMX slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE_RAMX_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE_RAMX_RULE_SHIFT (0U)
-/*! RAMX_RULE - Security access rules for the whole RAMX : 0x0400_0000 - 0x0400_7FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE_RAMX_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE_RAMX_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE_RAMX_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_RAMX_MEM_RULE - Security access rules for RAMX slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_COUNT2 (1U)
-
-/*! @name SEC_CTRL_RAM0_SLAVE_RULE - Security access rules for RAM0 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE_RAM0_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE_RAM0_RULE_SHIFT (0U)
-/*! RAM0_RULE - Security access rules for the whole RAM0 : 0x2000_0000 - 0x2000_FFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE_RAM0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE_RAM0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE_RAM0_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_RAM0_MEM_RULE - Security access rules for RAM0 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_COUNT2 (2U)
-
-/*! @name SEC_CTRL_RAM1_SLAVE_RULE - Security access rules for RAM1 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE_RAM1_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE_RAM1_RULE_SHIFT (0U)
-/*! RAM1_RULE - Security access rules for the whole RAM1 : 0x2001_0000 - 0x2001_FFFF" name="0
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE_RAM1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE_RAM1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE_RAM1_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_RAM1_MEM_RULE - Security access rules for RAM1 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_COUNT2 (2U)
-
-/*! @name SEC_CTRL_RAM2_SLAVE_RULE - Security access rules for RAM2 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE_RAM2_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE_RAM2_RULE_SHIFT (0U)
-/*! RAM2_RULE - Security access rules for the whole RAM2 : 0x2002_0000 - 0x2002_FFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE_RAM2_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE_RAM2_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE_RAM2_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_RAM2_MEM_RULE - Security access rules for RAM2 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_COUNT2 (2U)
-
-/*! @name SEC_CTRL_RAM3_SLAVE_RULE - Security access rules for RAM3 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE_RAM3_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE_RAM3_RULE_SHIFT (0U)
-/*! RAM3_RULE - Security access rules for the whole RAM3: 0x2003_0000 - 0x2003_FFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE_RAM3_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE_RAM3_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE_RAM3_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_RAM3_MEM_RULE - Security access rules for RAM3 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_COUNT2 (2U)
-
-/*! @name SEC_CTRL_RAM4_SLAVE_RULE - Security access rules for RAM4 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE_RAM4_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE_RAM4_RULE_SHIFT (0U)
-/*! RAM4_RULE - Security access rules for the whole RAM4 : 0x2004_0000 - 0x2004_3FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE_RAM4_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE_RAM4_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE_RAM4_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_RAM4_MEM_RULE - Security access rules for RAM4 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE3_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_COUNT2 (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE_SLAVE_RULE - Security access rules for both APB Bridges slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE0_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE0_RULE_SHIFT (0U)
-/*! APBBRIDGE0_RULE - Security access rules for the whole APB Bridge 0
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE1_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE1_RULE_SHIFT (4U)
-/*! APBBRIDGE1_RULE - Security access rules for the whole APB Bridge 1
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE1_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE0_MEM_CTRL0 - Security access rules for APB Bridge 0 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 0 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SYSCON_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SYSCON_RULE_SHIFT (0U)
-/*! SYSCON_RULE - System Configuration
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SYSCON_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SYSCON_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SYSCON_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_IOCON_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_IOCON_RULE_SHIFT (4U)
-/*! IOCON_RULE - I/O Configuration
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_IOCON_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_IOCON_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_IOCON_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT0_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT0_RULE_SHIFT (8U)
-/*! GINT0_RULE - GPIO input Interrupt 0
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT1_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT1_RULE_SHIFT (12U)
-/*! GINT1_RULE - GPIO input Interrupt 1
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT1_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_PINT_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_PINT_RULE_SHIFT (16U)
-/*! PINT_RULE - Pin Interrupt and Pattern match
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_PINT_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_PINT_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_PINT_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SEC_PINT_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SEC_PINT_RULE_SHIFT (20U)
-/*! SEC_PINT_RULE - Secure Pin Interrupt and Pattern match
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SEC_PINT_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SEC_PINT_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SEC_PINT_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_INPUTMUX_RULE_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_INPUTMUX_RULE_SHIFT (24U)
-/*! INPUTMUX_RULE - Peripheral input multiplexing
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_INPUTMUX_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_INPUTMUX_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_INPUTMUX_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE0_MEM_CTRL1 - Security access rules for APB Bridge 0 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 0 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER0_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER0_RULE_SHIFT (0U)
-/*! CTIMER0_RULE - Standard counter/Timer 0
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER1_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER1_RULE_SHIFT (4U)
-/*! CTIMER1_RULE - Standard counter/Timer 1
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER1_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_WWDT_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_WWDT_RULE_SHIFT (16U)
-/*! WWDT_RULE - Windiwed wtachdog Timer
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_WWDT_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_WWDT_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_WWDT_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_MRT_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_MRT_RULE_SHIFT (20U)
-/*! MRT_RULE - Multi-rate Timer
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_MRT_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_MRT_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_MRT_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_UTICK_RULE_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_UTICK_RULE_SHIFT (24U)
-/*! UTICK_RULE - Micro-Timer
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_UTICK_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_UTICK_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_UTICK_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE0_MEM_CTRL2 - Security access rules for APB Bridge 0 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 0 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2_ANACTRL_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2_ANACTRL_RULE_SHIFT (12U)
-/*! ANACTRL_RULE - Analog Modules controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2_ANACTRL_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2_ANACTRL_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2_ANACTRL_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE1_MEM_CTRL0 - Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_PMC_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_PMC_RULE_SHIFT (0U)
-/*! PMC_RULE - Power Management Controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_PMC_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_PMC_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_PMC_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_SYSCTRL_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_SYSCTRL_RULE_SHIFT (12U)
-/*! SYSCTRL_RULE - System Controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_SYSCTRL_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_SYSCTRL_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_SYSCTRL_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE1_MEM_CTRL1 - Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER2_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER2_RULE_SHIFT (0U)
-/*! CTIMER2_RULE - Standard counter/Timer 2
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER2_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER2_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER2_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER3_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER3_RULE_SHIFT (4U)
-/*! CTIMER3_RULE - Standard counter/Timer 3
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER3_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER3_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER3_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER4_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER4_RULE_SHIFT (8U)
-/*! CTIMER4_RULE - Standard counter/Timer 4
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER4_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER4_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER4_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_RTC_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_RTC_RULE_SHIFT (16U)
-/*! RTC_RULE - Real Time Counter
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_RTC_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_RTC_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_RTC_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_OSEVENT_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_OSEVENT_RULE_SHIFT (20U)
-/*! OSEVENT_RULE - OS Event Timer
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_OSEVENT_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_OSEVENT_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_OSEVENT_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE1_MEM_CTRL2 - Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_FLASH_CTRL_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_FLASH_CTRL_RULE_SHIFT (16U)
-/*! FLASH_CTRL_RULE - Flash Controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_FLASH_CTRL_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_FLASH_CTRL_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_FLASH_CTRL_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_PRINCE_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_PRINCE_RULE_SHIFT (20U)
-/*! PRINCE_RULE - Prince
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_PRINCE_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_PRINCE_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_PRINCE_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE1_MEM_CTRL3 - Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_USBHPHY_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_USBHPHY_RULE_SHIFT (0U)
-/*! USBHPHY_RULE - USB High Speed Phy controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_USBHPHY_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_USBHPHY_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_USBHPHY_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_RNG_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_RNG_RULE_SHIFT (8U)
-/*! RNG_RULE - True Random Number Generator
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_RNG_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_RNG_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_RNG_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PUF_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PUF_RULE_SHIFT (12U)
-/*! PUF_RULE - PUF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PUF_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PUF_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PUF_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PLU_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PLU_RULE_SHIFT (20U)
-/*! PLU_RULE - Programmable Look-Up logic
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PLU_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PLU_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PLU_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_COUNT (1U)
-
-/*! @name SEC_CTRL_AHB_PORT8_SLAVE0_RULE - Security access rules for AHB peripherals. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_DMA0_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_DMA0_RULE_SHIFT (8U)
-/*! DMA0_RULE - DMA Controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_DMA0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_DMA0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_DMA0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FS_USB_DEV_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FS_USB_DEV_RULE_SHIFT (16U)
-/*! FS_USB_DEV_RULE - USB Full-speed device
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FS_USB_DEV_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FS_USB_DEV_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FS_USB_DEV_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_SCT_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_SCT_RULE_SHIFT (20U)
-/*! SCT_RULE - SCTimer
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_SCT_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_SCT_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_SCT_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM0_RULE_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM0_RULE_SHIFT (24U)
-/*! FLEXCOMM0_RULE - Flexcomm interface 0
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM1_RULE_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM1_RULE_SHIFT (28U)
-/*! FLEXCOMM1_RULE - Flexcomm interface 1
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM1_RULE_MASK)
-/*! @} */
-
-/*! @name SEC_CTRL_AHB_PORT8_SLAVE1_RULE - Security access rules for AHB peripherals. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM2_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM2_RULE_SHIFT (0U)
-/*! FLEXCOMM2_RULE - Flexcomm interface 2
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM2_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM2_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM2_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM3_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM3_RULE_SHIFT (4U)
-/*! FLEXCOMM3_RULE - Flexcomm interface 3
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM3_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM3_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM3_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM4_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM4_RULE_SHIFT (8U)
-/*! FLEXCOMM4_RULE - Flexcomm interface 4
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM4_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM4_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM4_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_MAILBOX_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_MAILBOX_RULE_SHIFT (12U)
-/*! MAILBOX_RULE - Inter CPU communication Mailbox
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_MAILBOX_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_MAILBOX_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_MAILBOX_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_GPIO0_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_GPIO0_RULE_SHIFT (16U)
-/*! GPIO0_RULE - High Speed GPIO
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_GPIO0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_GPIO0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_GPIO0_RULE_MASK)
-/*! @} */
-
-/*! @name SEC_CTRL_AHB_PORT9_SLAVE0_RULE - Security access rules for AHB peripherals. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_USB_HS_DEV_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_USB_HS_DEV_RULE_SHIFT (16U)
-/*! USB_HS_DEV_RULE - USB high Speed device registers
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_USB_HS_DEV_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_USB_HS_DEV_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_USB_HS_DEV_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_CRC_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_CRC_RULE_SHIFT (20U)
-/*! CRC_RULE - CRC engine
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_CRC_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_CRC_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_CRC_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM5_RULE_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM5_RULE_SHIFT (24U)
-/*! FLEXCOMM5_RULE - Flexcomm interface 5
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM5_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM5_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM5_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM6_RULE_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM6_RULE_SHIFT (28U)
-/*! FLEXCOMM6_RULE - Flexcomm interface 6
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM6_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM6_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM6_RULE_MASK)
-/*! @} */
-
-/*! @name SEC_CTRL_AHB_PORT9_SLAVE1_RULE - Security access rules for AHB peripherals. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_FLEXCOMM7_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_FLEXCOMM7_RULE_SHIFT (0U)
-/*! FLEXCOMM7_RULE - Flexcomm interface 7
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_FLEXCOMM7_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_FLEXCOMM7_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_FLEXCOMM7_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_SDIO_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_SDIO_RULE_SHIFT (12U)
-/*! SDIO_RULE - SDMMC card interface
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_SDIO_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_SDIO_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_SDIO_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_DBG_MAILBOX_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_DBG_MAILBOX_RULE_SHIFT (16U)
-/*! DBG_MAILBOX_RULE - Debug mailbox (aka ISP-AP)
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_DBG_MAILBOX_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_DBG_MAILBOX_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_DBG_MAILBOX_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_HS_LSPI_RULE_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_HS_LSPI_RULE_SHIFT (28U)
-/*! HS_LSPI_RULE - High Speed SPI
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_HS_LSPI_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_HS_LSPI_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_HS_LSPI_RULE_MASK)
-/*! @} */
-
-/*! @name SEC_CTRL_AHB_PORT10_SLAVE0_RULE - Security access rules for AHB peripherals. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_ADC_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_ADC_RULE_SHIFT (0U)
-/*! ADC_RULE - ADC
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_ADC_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_ADC_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_ADC_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_FS_HOST_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_FS_HOST_RULE_SHIFT (8U)
-/*! USB_FS_HOST_RULE - USB Full Speed Host registers.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_FS_HOST_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_FS_HOST_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_FS_HOST_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_HS_HOST_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_HS_HOST_RULE_SHIFT (12U)
-/*! USB_HS_HOST_RULE - USB High speed host registers
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_HS_HOST_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_HS_HOST_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_HS_HOST_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_HASH_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_HASH_RULE_SHIFT (16U)
-/*! HASH_RULE - SHA-2 crypto registers
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_HASH_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_HASH_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_HASH_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_CASPER_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_CASPER_RULE_SHIFT (20U)
-/*! CASPER_RULE - RSA/ECC crypto accelerator
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_CASPER_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_CASPER_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_CASPER_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_PQ_RULE_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_PQ_RULE_SHIFT (24U)
-/*! PQ_RULE - Power Quad (CPU0 processor hardware accelerator)
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_PQ_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_PQ_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_PQ_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_DMA1_RULE_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_DMA1_RULE_SHIFT (28U)
-/*! DMA1_RULE - DMA Controller (Secure)
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_DMA1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_DMA1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_DMA1_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_AHB_PORT10_SLAVE1_RULE - Security access rules for AHB peripherals. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_GPIO1_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_GPIO1_RULE_SHIFT (0U)
-/*! GPIO1_RULE - Secure High Speed GPIO
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_GPIO1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_GPIO1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_GPIO1_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_AHB_SEC_CTRL_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_AHB_SEC_CTRL_RULE_SHIFT (4U)
-/*! AHB_SEC_CTRL_RULE - AHB Secure Controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_AHB_SEC_CTRL_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_AHB_SEC_CTRL_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_AHB_SEC_CTRL_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_AHB_SEC_CTRL_MEM_RULE - Security access rules for AHB_SEC_CTRL_AHB. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_0_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_0_RULE_SHIFT (0U)
-/*! AHB_SEC_CTRL_SECT_0_RULE - Address space: 0x400A_0000 - 0x400A_CFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_1_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_1_RULE_SHIFT (4U)
-/*! AHB_SEC_CTRL_SECT_1_RULE - Address space: 0x400A_D000 - 0x400A_DFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_1_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_2_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_2_RULE_SHIFT (8U)
-/*! AHB_SEC_CTRL_SECT_2_RULE - Address space: 0x400A_E000 - 0x400A_EFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_2_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_2_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_2_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_3_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_3_RULE_SHIFT (12U)
-/*! AHB_SEC_CTRL_SECT_3_RULE - Address space: 0x400A_F000 - 0x400A_FFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_3_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_3_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_3_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_COUNT2 (1U)
-
-/*! @name SEC_CTRL_USB_HS_SLAVE_RULE - Security access rules for USB High speed RAM slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE_RAM_USB_HS_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE_RAM_USB_HS_RULE_SHIFT (0U)
-/*! RAM_USB_HS_RULE - Security access rules for the whole USB High Speed RAM : 0x4010_0000 - 0x4010_3FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE_RAM_USB_HS_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE_RAM_USB_HS_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE_RAM_USB_HS_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_USB_HS_MEM_RULE - Security access rules for RAM_USB_HS. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_0_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_0_RULE_SHIFT (0U)
-/*! SRAM_SECT_0_RULE - Address space: 0x4010_0000 - 0x4010_0FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_1_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_1_RULE_SHIFT (4U)
-/*! SRAM_SECT_1_RULE - Address space: 0x4010_1000 - 0x4010_1FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_1_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_2_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_2_RULE_SHIFT (8U)
-/*! SRAM_SECT_2_RULE - Address space: 0x4010_2000 - 0x4010_2FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_2_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_2_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_2_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_3_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_3_RULE_SHIFT (12U)
-/*! SRAM_SECT_3_RULE - Address space: 0x4010_3000 - 0x4010_3FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_3_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_3_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_3_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_COUNT2 (1U)
-
-/*! @name SEC_VIO_ADDR - most recent security violation address for AHB port n */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_VIO_ADDR_SEC_VIO_ADDR_MASK (0xFFFFFFFFU)
-#define AHB_SECURE_CTRL_SEC_VIO_ADDR_SEC_VIO_ADDR_SHIFT (0U)
-/*! SEC_VIO_ADDR - security violation address for AHB port
- */
-#define AHB_SECURE_CTRL_SEC_VIO_ADDR_SEC_VIO_ADDR(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_ADDR_SEC_VIO_ADDR_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_ADDR_SEC_VIO_ADDR_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_VIO_ADDR */
-#define AHB_SECURE_CTRL_SEC_VIO_ADDR_COUNT (12U)
-
-/*! @name SEC_VIO_MISC_INFO - most recent security violation miscellaneous information for AHB port n */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_WRITE_MASK (0x1U)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_WRITE_SHIFT (0U)
-/*! SEC_VIO_INFO_WRITE - security violation access read/write indicator.
- * 0b0..Read access.
- * 0b1..Write access.
- */
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_WRITE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_WRITE_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_WRITE_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_DATA_ACCESS_MASK (0x2U)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_DATA_ACCESS_SHIFT (1U)
-/*! SEC_VIO_INFO_DATA_ACCESS - security violation access data/code indicator.
- * 0b0..Code access.
- * 0b1..Data access.
- */
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_DATA_ACCESS(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_DATA_ACCESS_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_DATA_ACCESS_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SEC_LEVEL_MASK (0xF0U)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SEC_LEVEL_SHIFT (4U)
-/*! SEC_VIO_INFO_MASTER_SEC_LEVEL - bit [5:4]: master sec level and privilege level bit [7:6]: anti-pol value for master sec level and privilege level
- */
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SEC_LEVEL(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SEC_LEVEL_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SEC_LEVEL_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_MASK (0xF00U)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SHIFT (8U)
-/*! SEC_VIO_INFO_MASTER - security violation master number
- * 0b0000..CPU0 Code.
- * 0b0001..CPU0 System.
- * 0b0010..CPU1 Data.
- * 0b0011..CPU1 System.
- * 0b0100..USB-HS Device.
- * 0b0101..SDMA0.
- * 0b1000..SDIO.
- * 0b1001..PowerQuad.
- * 0b1010..HASH.
- * 0b1011..USB-FS Host.
- * 0b1100..SDMA1.
- */
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_VIO_MISC_INFO */
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_COUNT (12U)
-
-/*! @name SEC_VIO_INFO_VALID - security violation address/information registers valid flags */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID0_MASK (0x1U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID0_SHIFT (0U)
-/*! VIO_INFO_VALID0 - violation information valid flag for AHB port 0. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID0_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID0_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID1_MASK (0x2U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID1_SHIFT (1U)
-/*! VIO_INFO_VALID1 - violation information valid flag for AHB port 1. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID1_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID1_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID2_MASK (0x4U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID2_SHIFT (2U)
-/*! VIO_INFO_VALID2 - violation information valid flag for AHB port 2. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID2_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID2_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID3_MASK (0x8U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID3_SHIFT (3U)
-/*! VIO_INFO_VALID3 - violation information valid flag for AHB port 3. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID3_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID3_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID4_MASK (0x10U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID4_SHIFT (4U)
-/*! VIO_INFO_VALID4 - violation information valid flag for AHB port 4. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID4_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID4_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID5_MASK (0x20U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID5_SHIFT (5U)
-/*! VIO_INFO_VALID5 - violation information valid flag for AHB port 5. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID5_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID5_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID6_MASK (0x40U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID6_SHIFT (6U)
-/*! VIO_INFO_VALID6 - violation information valid flag for AHB port 6. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID6_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID6_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID7_MASK (0x80U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID7_SHIFT (7U)
-/*! VIO_INFO_VALID7 - violation information valid flag for AHB port 7. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID7_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID7_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID8_MASK (0x100U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID8_SHIFT (8U)
-/*! VIO_INFO_VALID8 - violation information valid flag for AHB port 8. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID8(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID8_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID8_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID9_MASK (0x200U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID9_SHIFT (9U)
-/*! VIO_INFO_VALID9 - violation information valid flag for AHB port 9. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID9(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID9_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID9_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID10_MASK (0x400U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID10_SHIFT (10U)
-/*! VIO_INFO_VALID10 - violation information valid flag for AHB port 10. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID10(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID10_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID10_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID11_MASK (0x800U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID11_SHIFT (11U)
-/*! VIO_INFO_VALID11 - violation information valid flag for AHB port 11. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID11(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID11_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID11_MASK)
-/*! @} */
-
-/*! @name SEC_GPIO_MASK0 - Secure GPIO mask for port 0 pins. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN0_SEC_MASK_MASK (0x1U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN0_SEC_MASK_SHIFT (0U)
-/*! PIO0_PIN0_SEC_MASK - Secure mask for pin P0_0
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN0_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN0_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN0_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN1_SEC_MASK_MASK (0x2U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN1_SEC_MASK_SHIFT (1U)
-/*! PIO0_PIN1_SEC_MASK - Secure mask for pin P0_1
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN1_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN1_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN1_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN2_SEC_MASK_MASK (0x4U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN2_SEC_MASK_SHIFT (2U)
-/*! PIO0_PIN2_SEC_MASK - Secure mask for pin P0_2
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN2_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN2_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN2_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN3_SEC_MASK_MASK (0x8U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN3_SEC_MASK_SHIFT (3U)
-/*! PIO0_PIN3_SEC_MASK - Secure mask for pin P0_3
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN3_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN3_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN3_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN4_SEC_MASK_MASK (0x10U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN4_SEC_MASK_SHIFT (4U)
-/*! PIO0_PIN4_SEC_MASK - Secure mask for pin P0_4
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN4_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN4_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN4_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN5_SEC_MASK_MASK (0x20U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN5_SEC_MASK_SHIFT (5U)
-/*! PIO0_PIN5_SEC_MASK - Secure mask for pin P0_5
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN5_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN5_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN5_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN6_SEC_MASK_MASK (0x40U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN6_SEC_MASK_SHIFT (6U)
-/*! PIO0_PIN6_SEC_MASK - Secure mask for pin P0_6
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN6_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN6_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN6_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN7_SEC_MASK_MASK (0x80U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN7_SEC_MASK_SHIFT (7U)
-/*! PIO0_PIN7_SEC_MASK - Secure mask for pin P0_7
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN7_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN7_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN7_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN8_SEC_MASK_MASK (0x100U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN8_SEC_MASK_SHIFT (8U)
-/*! PIO0_PIN8_SEC_MASK - Secure mask for pin P0_8
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN8_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN8_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN8_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN9_SEC_MASK_MASK (0x200U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN9_SEC_MASK_SHIFT (9U)
-/*! PIO0_PIN9_SEC_MASK - Secure mask for pin P0_9
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN9_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN9_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN9_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN10_SEC_MASK_MASK (0x400U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN10_SEC_MASK_SHIFT (10U)
-/*! PIO0_PIN10_SEC_MASK - Secure mask for pin P0_10
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN10_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN10_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN10_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN11_SEC_MASK_MASK (0x800U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN11_SEC_MASK_SHIFT (11U)
-/*! PIO0_PIN11_SEC_MASK - Secure mask for pin P0_11
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN11_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN11_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN11_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN12_SEC_MASK_MASK (0x1000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN12_SEC_MASK_SHIFT (12U)
-/*! PIO0_PIN12_SEC_MASK - Secure mask for pin P0_12
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN12_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN12_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN12_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN13_SEC_MASK_MASK (0x2000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN13_SEC_MASK_SHIFT (13U)
-/*! PIO0_PIN13_SEC_MASK - Secure mask for pin P0_13
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN13_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN13_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN13_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN14_SEC_MASK_MASK (0x4000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN14_SEC_MASK_SHIFT (14U)
-/*! PIO0_PIN14_SEC_MASK - Secure mask for pin P0_14
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN14_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN14_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN14_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN15_SEC_MASK_MASK (0x8000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN15_SEC_MASK_SHIFT (15U)
-/*! PIO0_PIN15_SEC_MASK - Secure mask for pin P0_15
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN15_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN15_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN15_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN16_SEC_MASK_MASK (0x10000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN16_SEC_MASK_SHIFT (16U)
-/*! PIO0_PIN16_SEC_MASK - Secure mask for pin P0_16
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN16_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN16_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN16_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN17_SEC_MASK_MASK (0x20000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN17_SEC_MASK_SHIFT (17U)
-/*! PIO0_PIN17_SEC_MASK - Secure mask for pin P0_17
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN17_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN17_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN17_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN18_SEC_MASK_MASK (0x40000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN18_SEC_MASK_SHIFT (18U)
-/*! PIO0_PIN18_SEC_MASK - Secure mask for pin P0_18
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN18_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN18_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN18_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN19_SEC_MASK_MASK (0x80000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN19_SEC_MASK_SHIFT (19U)
-/*! PIO0_PIN19_SEC_MASK - Secure mask for pin P0_19
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN19_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN19_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN19_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN20_SEC_MASK_MASK (0x100000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN20_SEC_MASK_SHIFT (20U)
-/*! PIO0_PIN20_SEC_MASK - Secure mask for pin P0_20
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN20_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN20_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN20_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN21_SEC_MASK_MASK (0x200000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN21_SEC_MASK_SHIFT (21U)
-/*! PIO0_PIN21_SEC_MASK - Secure mask for pin P0_21
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN21_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN21_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN21_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN22_SEC_MASK_MASK (0x400000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN22_SEC_MASK_SHIFT (22U)
-/*! PIO0_PIN22_SEC_MASK - Secure mask for pin P0_22
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN22_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN22_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN22_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN23_SEC_MASK_MASK (0x800000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN23_SEC_MASK_SHIFT (23U)
-/*! PIO0_PIN23_SEC_MASK - Secure mask for pin P0_23
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN23_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN23_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN23_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN24_SEC_MASK_MASK (0x1000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN24_SEC_MASK_SHIFT (24U)
-/*! PIO0_PIN24_SEC_MASK - Secure mask for pin P0_24
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN24_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN24_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN24_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN25_SEC_MASK_MASK (0x2000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN25_SEC_MASK_SHIFT (25U)
-/*! PIO0_PIN25_SEC_MASK - Secure mask for pin P0_25
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN25_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN25_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN25_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN26_SEC_MASK_MASK (0x4000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN26_SEC_MASK_SHIFT (26U)
-/*! PIO0_PIN26_SEC_MASK - Secure mask for pin P0_26
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN26_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN26_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN26_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN27_SEC_MASK_MASK (0x8000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN27_SEC_MASK_SHIFT (27U)
-/*! PIO0_PIN27_SEC_MASK - Secure mask for pin P0_27
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN27_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN27_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN27_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN28_SEC_MASK_MASK (0x10000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN28_SEC_MASK_SHIFT (28U)
-/*! PIO0_PIN28_SEC_MASK - Secure mask for pin P0_28
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN28_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN28_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN28_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN29_SEC_MASK_MASK (0x20000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN29_SEC_MASK_SHIFT (29U)
-/*! PIO0_PIN29_SEC_MASK - Secure mask for pin P0_29
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN29_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN29_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN29_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN30_SEC_MASK_MASK (0x40000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN30_SEC_MASK_SHIFT (30U)
-/*! PIO0_PIN30_SEC_MASK - Secure mask for pin P0_30
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN30_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN30_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN30_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN31_SEC_MASK_MASK (0x80000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN31_SEC_MASK_SHIFT (31U)
-/*! PIO0_PIN31_SEC_MASK - Secure mask for pin P0_31
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN31_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN31_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN31_SEC_MASK_MASK)
-/*! @} */
-
-/*! @name SEC_GPIO_MASK1 - Secure GPIO mask for port 1 pins. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN0_SEC_MASK_MASK (0x1U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN0_SEC_MASK_SHIFT (0U)
-/*! PIO1_PIN0_SEC_MASK - Secure mask for pin P1_0
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN0_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN0_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN0_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN1_SEC_MASK_MASK (0x2U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN1_SEC_MASK_SHIFT (1U)
-/*! PIO1_PIN1_SEC_MASK - Secure mask for pin P1_1
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN1_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN1_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN1_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN2_SEC_MASK_MASK (0x4U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN2_SEC_MASK_SHIFT (2U)
-/*! PIO1_PIN2_SEC_MASK - Secure mask for pin P1_2
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN2_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN2_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN2_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN3_SEC_MASK_MASK (0x8U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN3_SEC_MASK_SHIFT (3U)
-/*! PIO1_PIN3_SEC_MASK - Secure mask for pin P1_3
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN3_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN3_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN3_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN4_SEC_MASK_MASK (0x10U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN4_SEC_MASK_SHIFT (4U)
-/*! PIO1_PIN4_SEC_MASK - Secure mask for pin P1_4
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN4_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN4_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN4_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN5_SEC_MASK_MASK (0x20U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN5_SEC_MASK_SHIFT (5U)
-/*! PIO1_PIN5_SEC_MASK - Secure mask for pin P1_5
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN5_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN5_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN5_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN6_SEC_MASK_MASK (0x40U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN6_SEC_MASK_SHIFT (6U)
-/*! PIO1_PIN6_SEC_MASK - Secure mask for pin P1_6
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN6_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN6_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN6_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN7_SEC_MASK_MASK (0x80U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN7_SEC_MASK_SHIFT (7U)
-/*! PIO1_PIN7_SEC_MASK - Secure mask for pin P1_7
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN7_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN7_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN7_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN8_SEC_MASK_MASK (0x100U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN8_SEC_MASK_SHIFT (8U)
-/*! PIO1_PIN8_SEC_MASK - Secure mask for pin P1_8
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN8_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN8_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN8_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN9_SEC_MASK_MASK (0x200U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN9_SEC_MASK_SHIFT (9U)
-/*! PIO1_PIN9_SEC_MASK - Secure mask for pin P1_9
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN9_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN9_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN9_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN10_SEC_MASK_MASK (0x400U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN10_SEC_MASK_SHIFT (10U)
-/*! PIO1_PIN10_SEC_MASK - Secure mask for pin P1_10
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN10_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN10_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN10_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN11_SEC_MASK_MASK (0x800U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN11_SEC_MASK_SHIFT (11U)
-/*! PIO1_PIN11_SEC_MASK - Secure mask for pin P1_11
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN11_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN11_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN11_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN12_SEC_MASK_MASK (0x1000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN12_SEC_MASK_SHIFT (12U)
-/*! PIO1_PIN12_SEC_MASK - Secure mask for pin P1_12
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN12_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN12_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN12_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN13_SEC_MASK_MASK (0x2000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN13_SEC_MASK_SHIFT (13U)
-/*! PIO1_PIN13_SEC_MASK - Secure mask for pin P1_13
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN13_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN13_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN13_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN14_SEC_MASK_MASK (0x4000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN14_SEC_MASK_SHIFT (14U)
-/*! PIO1_PIN14_SEC_MASK - Secure mask for pin P1_14
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN14_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN14_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN14_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN15_SEC_MASK_MASK (0x8000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN15_SEC_MASK_SHIFT (15U)
-/*! PIO1_PIN15_SEC_MASK - Secure mask for pin P1_15
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN15_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN15_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN15_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN16_SEC_MASK_MASK (0x10000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN16_SEC_MASK_SHIFT (16U)
-/*! PIO1_PIN16_SEC_MASK - Secure mask for pin P1_16
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN16_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN16_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN16_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN17_SEC_MASK_MASK (0x20000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN17_SEC_MASK_SHIFT (17U)
-/*! PIO1_PIN17_SEC_MASK - Secure mask for pin P1_17
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN17_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN17_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN17_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN18_SEC_MASK_MASK (0x40000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN18_SEC_MASK_SHIFT (18U)
-/*! PIO1_PIN18_SEC_MASK - Secure mask for pin P1_18
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN18_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN18_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN18_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN19_SEC_MASK_MASK (0x80000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN19_SEC_MASK_SHIFT (19U)
-/*! PIO1_PIN19_SEC_MASK - Secure mask for pin P1_19
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN19_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN19_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN19_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN20_SEC_MASK_MASK (0x100000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN20_SEC_MASK_SHIFT (20U)
-/*! PIO1_PIN20_SEC_MASK - Secure mask for pin P1_20
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN20_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN20_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN20_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN21_SEC_MASK_MASK (0x200000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN21_SEC_MASK_SHIFT (21U)
-/*! PIO1_PIN21_SEC_MASK - Secure mask for pin P1_21
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN21_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN21_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN21_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN22_SEC_MASK_MASK (0x400000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN22_SEC_MASK_SHIFT (22U)
-/*! PIO1_PIN22_SEC_MASK - Secure mask for pin P1_22
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN22_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN22_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN22_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN23_SEC_MASK_MASK (0x800000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN23_SEC_MASK_SHIFT (23U)
-/*! PIO1_PIN23_SEC_MASK - Secure mask for pin P1_23
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN23_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN23_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN23_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN24_SEC_MASK_MASK (0x1000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN24_SEC_MASK_SHIFT (24U)
-/*! PIO1_PIN24_SEC_MASK - Secure mask for pin P1_24
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN24_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN24_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN24_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN25_SEC_MASK_MASK (0x2000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN25_SEC_MASK_SHIFT (25U)
-/*! PIO1_PIN25_SEC_MASK - Secure mask for pin P1_25
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN25_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN25_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN25_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN26_SEC_MASK_MASK (0x4000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN26_SEC_MASK_SHIFT (26U)
-/*! PIO1_PIN26_SEC_MASK - Secure mask for pin P1_26
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN26_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN26_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN26_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN27_SEC_MASK_MASK (0x8000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN27_SEC_MASK_SHIFT (27U)
-/*! PIO1_PIN27_SEC_MASK - Secure mask for pin P1_27
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN27_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN27_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN27_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN28_SEC_MASK_MASK (0x10000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN28_SEC_MASK_SHIFT (28U)
-/*! PIO1_PIN28_SEC_MASK - Secure mask for pin P1_28
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN28_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN28_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN28_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN29_SEC_MASK_MASK (0x20000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN29_SEC_MASK_SHIFT (29U)
-/*! PIO1_PIN29_SEC_MASK - Secure mask for pin P1_29
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN29_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN29_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN29_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN30_SEC_MASK_MASK (0x40000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN30_SEC_MASK_SHIFT (30U)
-/*! PIO1_PIN30_SEC_MASK - Secure mask for pin P1_30
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN30_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN30_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN30_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN31_SEC_MASK_MASK (0x80000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN31_SEC_MASK_SHIFT (31U)
-/*! PIO1_PIN31_SEC_MASK - Secure mask for pin P1_31
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN31_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN31_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN31_SEC_MASK_MASK)
-/*! @} */
-
-/*! @name SEC_CPU_INT_MASK0 - Secure Interrupt mask for CPU1 */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SYS_IRQ_MASK (0x1U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SYS_IRQ_SHIFT (0U)
-/*! SYS_IRQ - Watchdog Timer, Brown Out Detectors and Flash Controller interrupts
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SYS_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SYS_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SYS_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SDMA0_IRQ_MASK (0x2U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SDMA0_IRQ_SHIFT (1U)
-/*! SDMA0_IRQ - System DMA 0 (non-secure) interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SDMA0_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SDMA0_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SDMA0_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT0_IRQ_MASK (0x4U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT0_IRQ_SHIFT (2U)
-/*! GPIO_GLOBALINT0_IRQ - GPIO Group 0 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT0_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT0_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT0_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT1_IRQ_MASK (0x8U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT1_IRQ_SHIFT (3U)
-/*! GPIO_GLOBALINT1_IRQ - GPIO Group 1 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT1_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT1_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT1_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ0_MASK (0x10U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ0_SHIFT (4U)
-/*! GPIO_INT0_IRQ0 - Pin interrupt 0 or pattern match engine slice 0 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ0_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ0_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ1_MASK (0x20U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ1_SHIFT (5U)
-/*! GPIO_INT0_IRQ1 - Pin interrupt 1 or pattern match engine slice 1 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ1_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ1_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ2_MASK (0x40U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ2_SHIFT (6U)
-/*! GPIO_INT0_IRQ2 - Pin interrupt 2 or pattern match engine slice 2 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ2_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ2_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ3_MASK (0x80U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ3_SHIFT (7U)
-/*! GPIO_INT0_IRQ3 - Pin interrupt 3 or pattern match engine slice 3 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ3_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ3_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_UTICK_IRQ_MASK (0x100U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_UTICK_IRQ_SHIFT (8U)
-/*! UTICK_IRQ - Micro Tick Timer interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_UTICK_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_UTICK_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_UTICK_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MRT_IRQ_MASK (0x200U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MRT_IRQ_SHIFT (9U)
-/*! MRT_IRQ - Multi-Rate Timer interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MRT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MRT_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MRT_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER0_IRQ_MASK (0x400U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER0_IRQ_SHIFT (10U)
-/*! CTIMER0_IRQ - Standard counter/timer 0 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER0_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER0_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER0_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER1_IRQ_MASK (0x800U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER1_IRQ_SHIFT (11U)
-/*! CTIMER1_IRQ - Standard counter/timer 1 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER1_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER1_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER1_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SCT_IRQ_MASK (0x1000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SCT_IRQ_SHIFT (12U)
-/*! SCT_IRQ - SCTimer/PWM interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SCT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SCT_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SCT_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER3_IRQ_MASK (0x2000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER3_IRQ_SHIFT (13U)
-/*! CTIMER3_IRQ - Standard counter/timer 3 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER3_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER3_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER3_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM0_IRQ_MASK (0x4000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM0_IRQ_SHIFT (14U)
-/*! FLEXCOMM0_IRQ - Flexcomm 0 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM0_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM0_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM0_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM1_IRQ_MASK (0x8000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM1_IRQ_SHIFT (15U)
-/*! FLEXCOMM1_IRQ - Flexcomm 1 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM1_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM1_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM1_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM2_IRQ_MASK (0x10000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM2_IRQ_SHIFT (16U)
-/*! FLEXCOMM2_IRQ - Flexcomm 2 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM2_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM2_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM2_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM3_IRQ_MASK (0x20000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM3_IRQ_SHIFT (17U)
-/*! FLEXCOMM3_IRQ - Flexcomm 3 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM3_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM3_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM3_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM4_IRQ_MASK (0x40000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM4_IRQ_SHIFT (18U)
-/*! FLEXCOMM4_IRQ - Flexcomm 4 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM4_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM4_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM4_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM5_IRQ_MASK (0x80000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM5_IRQ_SHIFT (19U)
-/*! FLEXCOMM5_IRQ - Flexcomm 5 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM5_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM5_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM5_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM6_IRQ_MASK (0x100000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM6_IRQ_SHIFT (20U)
-/*! FLEXCOMM6_IRQ - Flexcomm 6 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM6_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM6_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM6_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM7_IRQ_MASK (0x200000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM7_IRQ_SHIFT (21U)
-/*! FLEXCOMM7_IRQ - Flexcomm 7 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM7_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM7_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM7_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ADC_IRQ_MASK (0x400000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ADC_IRQ_SHIFT (22U)
-/*! ADC_IRQ - General Purpose ADC interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ADC_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ADC_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ADC_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED0_MASK (0x800000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED0_SHIFT (23U)
-/*! RESERVED0 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED0_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED0_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ACMP_IRQ_MASK (0x1000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ACMP_IRQ_SHIFT (24U)
-/*! ACMP_IRQ - Analog Comparator interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ACMP_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ACMP_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ACMP_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED1_MASK (0x2000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED1_SHIFT (25U)
-/*! RESERVED1 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED1_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED1_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED2_MASK (0x4000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED2_SHIFT (26U)
-/*! RESERVED2 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED2_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED2_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_NEEDCLK_MASK (0x8000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_NEEDCLK_SHIFT (27U)
-/*! USB0_NEEDCLK - USB Full Speed Controller Clock request interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_NEEDCLK_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_NEEDCLK_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_IRQ_MASK (0x10000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_IRQ_SHIFT (28U)
-/*! USB0_IRQ - USB Full Speed Controller interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RTC_IRQ_MASK (0x20000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RTC_IRQ_SHIFT (29U)
-/*! RTC_IRQ - RTC_LITE0_ALARM_IRQ, RTC_LITE0_WAKEUP_IRQ
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RTC_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RTC_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RTC_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED3_MASK (0x40000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED3_SHIFT (30U)
-/*! RESERVED3 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED3_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED3_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MAILBOX_IRQ_MASK (0x80000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MAILBOX_IRQ_SHIFT (31U)
-/*! MAILBOX_IRQ - Mailbox interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MAILBOX_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MAILBOX_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MAILBOX_IRQ_MASK)
-/*! @} */
-
-/*! @name SEC_CPU_INT_MASK1 - Secure Interrupt mask for CPU1 */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ4_MASK (0x1U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ4_SHIFT (0U)
-/*! GPIO_INT0_IRQ4 - Pin interrupt 4 or pattern match engine slice 4 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ4_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ4_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ5_MASK (0x2U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ5_SHIFT (1U)
-/*! GPIO_INT0_IRQ5 - Pin interrupt 5 or pattern match engine slice 5 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ5_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ5_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ6_MASK (0x4U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ6_SHIFT (2U)
-/*! GPIO_INT0_IRQ6 - Pin interrupt 6 or pattern match engine slice 6 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ6_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ6_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ7_MASK (0x8U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ7_SHIFT (3U)
-/*! GPIO_INT0_IRQ7 - Pin interrupt 7 or pattern match engine slice 7 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ7_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ7_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER2_IRQ_MASK (0x10U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER2_IRQ_SHIFT (4U)
-/*! CTIMER2_IRQ - Standard counter/timer 2 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER2_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER2_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER2_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER4_IRQ_MASK (0x20U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER4_IRQ_SHIFT (5U)
-/*! CTIMER4_IRQ - Standard counter/timer 4 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER4_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER4_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER4_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_OS_EVENT_TIMER_IRQ_MASK (0x40U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_OS_EVENT_TIMER_IRQ_SHIFT (6U)
-/*! OS_EVENT_TIMER_IRQ - OS Event Timer and OS Event Timer Wakeup interrupts
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_OS_EVENT_TIMER_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_OS_EVENT_TIMER_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_OS_EVENT_TIMER_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED0_MASK (0x80U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED0_SHIFT (7U)
-/*! RESERVED0 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED0_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED0_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED1_MASK (0x100U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED1_SHIFT (8U)
-/*! RESERVED1 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED1_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED1_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED2_MASK (0x200U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED2_SHIFT (9U)
-/*! RESERVED2 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED2_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED2_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDIO_IRQ_MASK (0x400U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDIO_IRQ_SHIFT (10U)
-/*! SDIO_IRQ - SDIO Controller interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDIO_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDIO_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDIO_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED3_MASK (0x800U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED3_SHIFT (11U)
-/*! RESERVED3 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED3_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED3_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED4_MASK (0x1000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED4_SHIFT (12U)
-/*! RESERVED4 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED4_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED4_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED5_MASK (0x2000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED5_SHIFT (13U)
-/*! RESERVED5 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED5_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED5_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_PHY_IRQ_MASK (0x4000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_PHY_IRQ_SHIFT (14U)
-/*! USB1_PHY_IRQ - USB High Speed PHY Controller interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_PHY_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_PHY_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_PHY_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_IRQ_MASK (0x8000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_IRQ_SHIFT (15U)
-/*! USB1_IRQ - USB High Speed Controller interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_NEEDCLK_MASK (0x10000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_NEEDCLK_SHIFT (16U)
-/*! USB1_NEEDCLK - USB High Speed Controller Clock request interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_NEEDCLK_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_NEEDCLK_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_HYPERVISOR_CALL_IRQ_MASK (0x20000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_HYPERVISOR_CALL_IRQ_SHIFT (17U)
-/*! SEC_HYPERVISOR_CALL_IRQ - Secure fault Hyper Visor call interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_HYPERVISOR_CALL_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_HYPERVISOR_CALL_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_HYPERVISOR_CALL_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ0_MASK (0x40000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ0_SHIFT (18U)
-/*! SEC_GPIO_INT0_IRQ0 - Secure Pin interrupt 0 or pattern match engine slice 0 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ0_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ0_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ1_MASK (0x80000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ1_SHIFT (19U)
-/*! SEC_GPIO_INT0_IRQ1 - Secure Pin interrupt 1 or pattern match engine slice 1 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ1_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ1_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PLU_IRQ_MASK (0x100000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PLU_IRQ_SHIFT (20U)
-/*! PLU_IRQ - Programmable Look-Up Controller interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PLU_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PLU_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PLU_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_VIO_IRQ_MASK (0x200000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_VIO_IRQ_SHIFT (21U)
-/*! SEC_VIO_IRQ - Security Violation interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_VIO_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_VIO_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_VIO_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SHA_IRQ_MASK (0x400000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SHA_IRQ_SHIFT (22U)
-/*! SHA_IRQ - HASH-AES interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SHA_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SHA_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SHA_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CASPER_IRQ_MASK (0x800000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CASPER_IRQ_SHIFT (23U)
-/*! CASPER_IRQ - CASPER interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CASPER_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CASPER_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CASPER_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PUFKEY_IRQ_MASK (0x1000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PUFKEY_IRQ_SHIFT (24U)
-/*! PUFKEY_IRQ - PUF interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PUFKEY_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PUFKEY_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PUFKEY_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PQ_IRQ_MASK (0x2000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PQ_IRQ_SHIFT (25U)
-/*! PQ_IRQ - Power Quad interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PQ_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PQ_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PQ_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDMA1_IRQ_MASK (0x4000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDMA1_IRQ_SHIFT (26U)
-/*! SDMA1_IRQ - System DMA 1 (Secure) interrupt
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDMA1_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDMA1_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDMA1_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_LSPI_HS_IRQ_MASK (0x8000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_LSPI_HS_IRQ_SHIFT (27U)
-/*! LSPI_HS_IRQ - High Speed SPI interrupt
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_LSPI_HS_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_LSPI_HS_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_LSPI_HS_IRQ_MASK)
-/*! @} */
-
-/*! @name SEC_MASK_LOCK - Security General Purpose register access control. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK0_LOCK_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK0_LOCK_SHIFT (0U)
-/*! SEC_GPIO_MASK0_LOCK - SEC_GPIO_MASK0 register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK0_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK0_LOCK_SHIFT)) & AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK0_LOCK_MASK)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK1_LOCK_MASK (0xCU)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK1_LOCK_SHIFT (2U)
-/*! SEC_GPIO_MASK1_LOCK - SEC_GPIO_MASK1 register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK1_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK1_LOCK_SHIFT)) & AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK1_LOCK_MASK)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK0_LOCK_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK0_LOCK_SHIFT (8U)
-/*! SEC_CPU1_INT_MASK0_LOCK - SEC_CPU_INT_MASK0 register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK0_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK0_LOCK_SHIFT)) & AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK0_LOCK_MASK)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK1_LOCK_MASK (0xC00U)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK1_LOCK_SHIFT (10U)
-/*! SEC_CPU1_INT_MASK1_LOCK - SEC_CPU_INT_MASK1 register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK1_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK1_LOCK_SHIFT)) & AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK1_LOCK_MASK)
-/*! @} */
-
-/*! @name MASTER_SEC_LEVEL - master secure level register */
-/*! @{ */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1C_MASK (0x30U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1C_SHIFT (4U)
-/*! CPU1C - Micro-Cortex M33 (CPU1) Code bus.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1C(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1C_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1C_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1S_MASK (0xC0U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1S_SHIFT (6U)
-/*! CPU1S - Micro-Cortex M33 (CPU1) System bus.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1S(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1S_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1S_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSD_MASK (0x300U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSD_SHIFT (8U)
-/*! USBFSD - USB Full Speed Device.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSD(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSD_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSD_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA0_MASK (0xC00U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA0_SHIFT (10U)
-/*! SDMA0 - System DMA 0.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA0_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA0_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDIO_MASK (0x30000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDIO_SHIFT (16U)
-/*! SDIO - SDIO.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDIO(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDIO_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDIO_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_PQ_MASK (0xC0000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_PQ_SHIFT (18U)
-/*! PQ - Power Quad.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_PQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_PQ_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_PQ_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_HASH_MASK (0x300000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_HASH_SHIFT (20U)
-/*! HASH - Hash.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_HASH(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_HASH_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_HASH_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSH_MASK (0xC00000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSH_SHIFT (22U)
-/*! USBFSH - USB Full speed Host.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSH(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSH_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSH_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA1_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA1_SHIFT (24U)
-/*! SDMA1 - System DMA 1 security level.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA1_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA1_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_MASTER_SEC_LEVEL_LOCK_MASK (0xC0000000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_MASTER_SEC_LEVEL_LOCK_SHIFT (30U)
-/*! MASTER_SEC_LEVEL_LOCK - MASTER_SEC_LEVEL write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_MASTER_SEC_LEVEL_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_MASTER_SEC_LEVEL_LOCK_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_MASTER_SEC_LEVEL_LOCK_MASK)
-/*! @} */
-
-/*! @name MASTER_SEC_ANTI_POL_REG - master secure level anti-pole register */
-/*! @{ */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1C_MASK (0x30U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1C_SHIFT (4U)
-/*! CPU1C - Micro-Cortex M33 (CPU1) Code bus. Must be equal to NOT(MASTER_SEC_LEVEL.CPU1C)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1C(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1C_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1C_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1S_MASK (0xC0U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1S_SHIFT (6U)
-/*! CPU1S - Micro-Cortex M33 (CPU1) System bus. Must be equal to NOT(MASTER_SEC_LEVEL.CPU1S)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1S(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1S_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1S_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSD_MASK (0x300U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSD_SHIFT (8U)
-/*! USBFSD - USB Full Speed Device. Must be equal to NOT(MASTER_SEC_LEVEL.USBFSD)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSD(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSD_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSD_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA0_MASK (0xC00U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA0_SHIFT (10U)
-/*! SDMA0 - System DMA 0. Must be equal to NOT(MASTER_SEC_LEVEL.SDMA0)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA0_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA0_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDIO_MASK (0x30000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDIO_SHIFT (16U)
-/*! SDIO - SDIO. Must be equal to NOT(MASTER_SEC_LEVEL.SDIO)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDIO(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDIO_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDIO_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_PQ_MASK (0xC0000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_PQ_SHIFT (18U)
-/*! PQ - Power Quad. Must be equal to NOT(MASTER_SEC_LEVEL.PQ)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_PQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_PQ_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_PQ_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_HASH_MASK (0x300000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_HASH_SHIFT (20U)
-/*! HASH - Hash. Must be equal to NOT(MASTER_SEC_LEVEL.HASH)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_HASH(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_HASH_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_HASH_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSH_MASK (0xC00000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSH_SHIFT (22U)
-/*! USBFSH - USB Full speed Host. Must be equal to NOT(MASTER_SEC_LEVEL.USBFSH)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSH(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSH_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSH_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA1_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA1_SHIFT (24U)
-/*! SDMA1 - System DMA 1 security level. Must be equal to NOT(MASTER_SEC_LEVEL.SDMA1)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA1_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA1_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_MASTER_SEC_LEVEL_ANTIPOL_LOCK_MASK (0xC0000000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_MASTER_SEC_LEVEL_ANTIPOL_LOCK_SHIFT (30U)
-/*! MASTER_SEC_LEVEL_ANTIPOL_LOCK - MASTER_SEC_ANTI_POL_REG register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_MASTER_SEC_LEVEL_ANTIPOL_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_MASTER_SEC_LEVEL_ANTIPOL_LOCK_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_MASTER_SEC_LEVEL_ANTIPOL_LOCK_MASK)
-/*! @} */
-
-/*! @name CPU0_LOCK_REG - Miscalleneous control signals for in Cortex M33 (CPU0) */
-/*! @{ */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_VTOR_MASK (0x3U)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_VTOR_SHIFT (0U)
-/*! LOCK_NS_VTOR - Cortex M33 (CPU0) VTOR_NS register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_VTOR(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_VTOR_SHIFT)) & AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_VTOR_MASK)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_MPU_MASK (0xCU)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_MPU_SHIFT (2U)
-/*! LOCK_NS_MPU - Cortex M33 (CPU0) non-secure MPU register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_MPU(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_MPU_SHIFT)) & AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_MPU_MASK)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_VTAIRCR_MASK (0x30U)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_VTAIRCR_SHIFT (4U)
-/*! LOCK_S_VTAIRCR - Cortex M33 (CPU0) VTOR_S, AIRCR.PRIS, IRCR.BFHFNMINS registers write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_VTAIRCR(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_VTAIRCR_SHIFT)) & AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_VTAIRCR_MASK)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_MPU_MASK (0xC0U)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_MPU_SHIFT (6U)
-/*! LOCK_S_MPU - Cortex M33 (CPU0) Secure MPU registers write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_MPU(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_MPU_SHIFT)) & AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_MPU_MASK)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_SAU_MASK (0x300U)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_SAU_SHIFT (8U)
-/*! LOCK_SAU - Cortex M33 (CPU0) SAU registers write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_SAU(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_SAU_SHIFT)) & AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_SAU_MASK)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_CPU0_LOCK_REG_LOCK_MASK (0xC0000000U)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_CPU0_LOCK_REG_LOCK_SHIFT (30U)
-/*! CPU0_LOCK_REG_LOCK - CPU0_LOCK_REG write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_CPU0_LOCK_REG_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU0_LOCK_REG_CPU0_LOCK_REG_LOCK_SHIFT)) & AHB_SECURE_CTRL_CPU0_LOCK_REG_CPU0_LOCK_REG_LOCK_MASK)
-/*! @} */
-
-/*! @name CPU1_LOCK_REG - Miscalleneous control signals for in micro-Cortex M33 (CPU1) */
-/*! @{ */
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_VTOR_MASK (0x3U)
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_VTOR_SHIFT (0U)
-/*! LOCK_NS_VTOR - micro-Cortex M33 (CPU1) VTOR_NS register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_VTOR(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_VTOR_SHIFT)) & AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_VTOR_MASK)
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_MPU_MASK (0xCU)
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_MPU_SHIFT (2U)
-/*! LOCK_NS_MPU - micro-Cortex M33 (CPU1) non-secure MPU register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_MPU(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_MPU_SHIFT)) & AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_MPU_MASK)
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_CPU1_LOCK_REG_LOCK_MASK (0xC0000000U)
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_CPU1_LOCK_REG_LOCK_SHIFT (30U)
-/*! CPU1_LOCK_REG_LOCK - CPU1_LOCK_REG write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_CPU1_LOCK_REG_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU1_LOCK_REG_CPU1_LOCK_REG_LOCK_SHIFT)) & AHB_SECURE_CTRL_CPU1_LOCK_REG_CPU1_LOCK_REG_LOCK_MASK)
-/*! @} */
-
-/*! @name MISC_CTRL_DP_REG - secure control duplicate register */
-/*! @{ */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_WRITE_LOCK_MASK (0x3U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_WRITE_LOCK_SHIFT (0U)
-/*! WRITE_LOCK - Write lock.
- * 0b10..Secure control registers can be written.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_WRITE_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_WRITE_LOCK_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_WRITE_LOCK_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_SECURE_CHECKING_MASK (0xCU)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_SECURE_CHECKING_SHIFT (2U)
-/*! ENABLE_SECURE_CHECKING - Enable secure check for AHB matrix.
- * 0b10..Disable check.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_SECURE_CHECKING(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_SECURE_CHECKING_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_SECURE_CHECKING_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_S_PRIV_CHECK_MASK (0x30U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_S_PRIV_CHECK_SHIFT (4U)
-/*! ENABLE_S_PRIV_CHECK - Enable secure privilege check for AHB matrix.
- * 0b10..Disable check.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_S_PRIV_CHECK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_S_PRIV_CHECK_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_S_PRIV_CHECK_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_NS_PRIV_CHECK_MASK (0xC0U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_NS_PRIV_CHECK_SHIFT (6U)
-/*! ENABLE_NS_PRIV_CHECK - Enable non-secure privilege check for AHB matrix.
- * 0b10..Disable check.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_NS_PRIV_CHECK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_NS_PRIV_CHECK_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_NS_PRIV_CHECK_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_VIOLATION_ABORT_MASK (0x300U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_VIOLATION_ABORT_SHIFT (8U)
-/*! DISABLE_VIOLATION_ABORT - Disable secure violation abort.
- * 0b10..Enable abort fort secure checker.
- * 0b01..Disable abort fort secure checker.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_VIOLATION_ABORT(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_VIOLATION_ABORT_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_VIOLATION_ABORT_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_MASK (0xC00U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_SHIFT (10U)
-/*! DISABLE_SIMPLE_MASTER_STRICT_MODE - Disable simple master strict mode.
- * 0b10..Simple master in strict mode.
- * 0b01..Simple master in tier mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SMART_MASTER_STRICT_MODE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SMART_MASTER_STRICT_MODE_SHIFT (12U)
-/*! DISABLE_SMART_MASTER_STRICT_MODE - Disable smart master strict mode.
- * 0b10..Smart master in strict mode.
- * 0b01..Smart master in tier mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SMART_MASTER_STRICT_MODE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SMART_MASTER_STRICT_MODE_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SMART_MASTER_STRICT_MODE_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_IDAU_ALL_NS_MASK (0xC000U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_IDAU_ALL_NS_SHIFT (14U)
-/*! IDAU_ALL_NS - Disable IDAU.
- * 0b10..IDAU is enabled.
- * 0b01..IDAU is disable.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_IDAU_ALL_NS(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_IDAU_ALL_NS_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_IDAU_ALL_NS_MASK)
-/*! @} */
-
-/*! @name MISC_CTRL_REG - secure control register */
-/*! @{ */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_WRITE_LOCK_MASK (0x3U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_WRITE_LOCK_SHIFT (0U)
-/*! WRITE_LOCK - Write lock.
- * 0b10..Secure control registers can be written.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_WRITE_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_WRITE_LOCK_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_WRITE_LOCK_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_SECURE_CHECKING_MASK (0xCU)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_SECURE_CHECKING_SHIFT (2U)
-/*! ENABLE_SECURE_CHECKING - Enable secure check for AHB matrix.
- * 0b10..Disable check.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_SECURE_CHECKING(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_SECURE_CHECKING_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_SECURE_CHECKING_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_S_PRIV_CHECK_MASK (0x30U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_S_PRIV_CHECK_SHIFT (4U)
-/*! ENABLE_S_PRIV_CHECK - Enable secure privilege check for AHB matrix.
- * 0b10..Disable check.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_S_PRIV_CHECK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_S_PRIV_CHECK_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_S_PRIV_CHECK_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_NS_PRIV_CHECK_MASK (0xC0U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_NS_PRIV_CHECK_SHIFT (6U)
-/*! ENABLE_NS_PRIV_CHECK - Enable non-secure privilege check for AHB matrix.
- * 0b10..Disable check.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_NS_PRIV_CHECK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_NS_PRIV_CHECK_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_NS_PRIV_CHECK_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_VIOLATION_ABORT_MASK (0x300U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_VIOLATION_ABORT_SHIFT (8U)
-/*! DISABLE_VIOLATION_ABORT - Disable secure violation abort.
- * 0b10..Enable abort fort secure checker.
- * 0b01..Disable abort fort secure checker.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_VIOLATION_ABORT(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_VIOLATION_ABORT_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_VIOLATION_ABORT_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_MASK (0xC00U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_SHIFT (10U)
-/*! DISABLE_SIMPLE_MASTER_STRICT_MODE - Disable simple master strict mode.
- * 0b10..Simple master in strict mode.
- * 0b01..Simple master in tier mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SMART_MASTER_STRICT_MODE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SMART_MASTER_STRICT_MODE_SHIFT (12U)
-/*! DISABLE_SMART_MASTER_STRICT_MODE - Disable smart master strict mode.
- * 0b10..Smart master in strict mode.
- * 0b01..Smart master in tier mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SMART_MASTER_STRICT_MODE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SMART_MASTER_STRICT_MODE_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SMART_MASTER_STRICT_MODE_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_IDAU_ALL_NS_MASK (0xC000U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_IDAU_ALL_NS_SHIFT (14U)
-/*! IDAU_ALL_NS - Disable IDAU.
- * 0b10..IDAU is enabled.
- * 0b01..IDAU is disable.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_IDAU_ALL_NS(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_IDAU_ALL_NS_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_IDAU_ALL_NS_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group AHB_SECURE_CTRL_Register_Masks */
-
-
-/* AHB_SECURE_CTRL - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral AHB_SECURE_CTRL base address */
- #define AHB_SECURE_CTRL_BASE (0x500AC000u)
- /** Peripheral AHB_SECURE_CTRL base address */
- #define AHB_SECURE_CTRL_BASE_NS (0x400AC000u)
- /** Peripheral AHB_SECURE_CTRL base pointer */
- #define AHB_SECURE_CTRL ((AHB_SECURE_CTRL_Type *)AHB_SECURE_CTRL_BASE)
- /** Peripheral AHB_SECURE_CTRL base pointer */
- #define AHB_SECURE_CTRL_NS ((AHB_SECURE_CTRL_Type *)AHB_SECURE_CTRL_BASE_NS)
- /** Array initializer of AHB_SECURE_CTRL peripheral base addresses */
- #define AHB_SECURE_CTRL_BASE_ADDRS { AHB_SECURE_CTRL_BASE }
- /** Array initializer of AHB_SECURE_CTRL peripheral base pointers */
- #define AHB_SECURE_CTRL_BASE_PTRS { AHB_SECURE_CTRL }
- /** Array initializer of AHB_SECURE_CTRL peripheral base addresses */
- #define AHB_SECURE_CTRL_BASE_ADDRS_NS { AHB_SECURE_CTRL_BASE_NS }
- /** Array initializer of AHB_SECURE_CTRL peripheral base pointers */
- #define AHB_SECURE_CTRL_BASE_PTRS_NS { AHB_SECURE_CTRL_NS }
-#else
- /** Peripheral AHB_SECURE_CTRL base address */
- #define AHB_SECURE_CTRL_BASE (0x400AC000u)
- /** Peripheral AHB_SECURE_CTRL base pointer */
- #define AHB_SECURE_CTRL ((AHB_SECURE_CTRL_Type *)AHB_SECURE_CTRL_BASE)
- /** Array initializer of AHB_SECURE_CTRL peripheral base addresses */
- #define AHB_SECURE_CTRL_BASE_ADDRS { AHB_SECURE_CTRL_BASE }
- /** Array initializer of AHB_SECURE_CTRL peripheral base pointers */
- #define AHB_SECURE_CTRL_BASE_PTRS { AHB_SECURE_CTRL }
-#endif
-
-/*!
- * @}
- */ /* end of group AHB_SECURE_CTRL_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- ANACTRL Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup ANACTRL_Peripheral_Access_Layer ANACTRL Peripheral Access Layer
- * @{
- */
-
-/** ANACTRL - Register Layout Typedef */
-typedef struct {
- uint8_t RESERVED_0[4];
- __I uint32_t ANALOG_CTRL_STATUS; /**< Analog Macroblock Identity registers, Flash Status registers, offset: 0x4 */
- uint8_t RESERVED_1[4];
- __IO uint32_t FREQ_ME_CTRL; /**< Frequency Measure function control register, offset: 0xC */
- __IO uint32_t FRO192M_CTRL; /**< 192MHz Free Running OScillator (FRO) Control register, offset: 0x10 */
- __I uint32_t FRO192M_STATUS; /**< 192MHz Free Running OScillator (FRO) Status register, offset: 0x14 */
- uint8_t RESERVED_2[8];
- __IO uint32_t XO32M_CTRL; /**< High speed Crystal Oscillator Control register, offset: 0x20 */
- __I uint32_t XO32M_STATUS; /**< High speed Crystal Oscillator Status register, offset: 0x24 */
- uint8_t RESERVED_3[8];
- __IO uint32_t BOD_DCDC_INT_CTRL; /**< Brown Out Detectors (BoDs) & DCDC interrupts generation control register, offset: 0x30 */
- __I uint32_t BOD_DCDC_INT_STATUS; /**< BoDs & DCDC interrupts status register, offset: 0x34 */
- uint8_t RESERVED_4[8];
- __IO uint32_t RINGO0_CTRL; /**< First Ring Oscillator module control register., offset: 0x40 */
- __IO uint32_t RINGO1_CTRL; /**< Second Ring Oscillator module control register., offset: 0x44 */
- __IO uint32_t RINGO2_CTRL; /**< Third Ring Oscillator module control register., offset: 0x48 */
- uint8_t RESERVED_5[180];
- __IO uint32_t USBHS_PHY_CTRL; /**< USB High Speed Phy Control, offset: 0x100 */
-} ANACTRL_Type;
-
-/* ----------------------------------------------------------------------------
- -- ANACTRL Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup ANACTRL_Register_Masks ANACTRL Register Masks
- * @{
- */
-
-/*! @name ANALOG_CTRL_STATUS - Analog Macroblock Identity registers, Flash Status registers */
-/*! @{ */
-#define ANACTRL_ANALOG_CTRL_STATUS_FLASH_PWRDWN_MASK (0x1000U)
-#define ANACTRL_ANALOG_CTRL_STATUS_FLASH_PWRDWN_SHIFT (12U)
-/*! FLASH_PWRDWN - Flash Power Down status.
- * 0b0..Flash is not in power down mode.
- * 0b1..Flash is in power down mode.
- */
-#define ANACTRL_ANALOG_CTRL_STATUS_FLASH_PWRDWN(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_ANALOG_CTRL_STATUS_FLASH_PWRDWN_SHIFT)) & ANACTRL_ANALOG_CTRL_STATUS_FLASH_PWRDWN_MASK)
-#define ANACTRL_ANALOG_CTRL_STATUS_FLASH_INIT_ERROR_MASK (0x2000U)
-#define ANACTRL_ANALOG_CTRL_STATUS_FLASH_INIT_ERROR_SHIFT (13U)
-/*! FLASH_INIT_ERROR - Flash initialization error status.
- * 0b0..No error.
- * 0b1..At least one error occured during flash initialization..
- */
-#define ANACTRL_ANALOG_CTRL_STATUS_FLASH_INIT_ERROR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_ANALOG_CTRL_STATUS_FLASH_INIT_ERROR_SHIFT)) & ANACTRL_ANALOG_CTRL_STATUS_FLASH_INIT_ERROR_MASK)
-/*! @} */
-
-/*! @name FREQ_ME_CTRL - Frequency Measure function control register */
-/*! @{ */
-#define ANACTRL_FREQ_ME_CTRL_CAPVAL_SCALE_MASK (0x7FFFFFFFU)
-#define ANACTRL_FREQ_ME_CTRL_CAPVAL_SCALE_SHIFT (0U)
-/*! CAPVAL_SCALE - Frequency measure result /Frequency measur scale
- */
-#define ANACTRL_FREQ_ME_CTRL_CAPVAL_SCALE(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FREQ_ME_CTRL_CAPVAL_SCALE_SHIFT)) & ANACTRL_FREQ_ME_CTRL_CAPVAL_SCALE_MASK)
-#define ANACTRL_FREQ_ME_CTRL_PROG_MASK (0x80000000U)
-#define ANACTRL_FREQ_ME_CTRL_PROG_SHIFT (31U)
-/*! PROG - Set this bit to one to initiate a frequency measurement cycle. Hardware clears this bit
- * when the measurement cycle has completed and there is valid capture data in the CAPVAL field
- * (bits 30:0).
- */
-#define ANACTRL_FREQ_ME_CTRL_PROG(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FREQ_ME_CTRL_PROG_SHIFT)) & ANACTRL_FREQ_ME_CTRL_PROG_MASK)
-/*! @} */
-
-/*! @name FRO192M_CTRL - 192MHz Free Running OScillator (FRO) Control register */
-/*! @{ */
-#define ANACTRL_FRO192M_CTRL_ENA_12MHZCLK_MASK (0x4000U)
-#define ANACTRL_FRO192M_CTRL_ENA_12MHZCLK_SHIFT (14U)
-/*! ENA_12MHZCLK - 12 MHz clock control.
- * 0b0..12 MHz clock is disabled.
- * 0b1..12 MHz clock is enabled.
- */
-#define ANACTRL_FRO192M_CTRL_ENA_12MHZCLK(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_CTRL_ENA_12MHZCLK_SHIFT)) & ANACTRL_FRO192M_CTRL_ENA_12MHZCLK_MASK)
-#define ANACTRL_FRO192M_CTRL_ENA_48MHZCLK_MASK (0x8000U)
-#define ANACTRL_FRO192M_CTRL_ENA_48MHZCLK_SHIFT (15U)
-/*! ENA_48MHZCLK - 48 MHz clock control.
- * 0b0..Reserved.
- * 0b1..48 MHz clock is enabled.
- */
-#define ANACTRL_FRO192M_CTRL_ENA_48MHZCLK(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_CTRL_ENA_48MHZCLK_SHIFT)) & ANACTRL_FRO192M_CTRL_ENA_48MHZCLK_MASK)
-#define ANACTRL_FRO192M_CTRL_DAC_TRIM_MASK (0xFF0000U)
-#define ANACTRL_FRO192M_CTRL_DAC_TRIM_SHIFT (16U)
-/*! DAC_TRIM - Frequency trim.
- */
-#define ANACTRL_FRO192M_CTRL_DAC_TRIM(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_CTRL_DAC_TRIM_SHIFT)) & ANACTRL_FRO192M_CTRL_DAC_TRIM_MASK)
-#define ANACTRL_FRO192M_CTRL_USBCLKADJ_MASK (0x1000000U)
-#define ANACTRL_FRO192M_CTRL_USBCLKADJ_SHIFT (24U)
-/*! USBCLKADJ - If this bit is set and the USB peripheral is enabled into full speed device mode,
- * the USB block will provide FRO clock adjustments to lock it to the host clock using the SOF
- * packets.
- */
-#define ANACTRL_FRO192M_CTRL_USBCLKADJ(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_CTRL_USBCLKADJ_SHIFT)) & ANACTRL_FRO192M_CTRL_USBCLKADJ_MASK)
-#define ANACTRL_FRO192M_CTRL_USBMODCHG_MASK (0x2000000U)
-#define ANACTRL_FRO192M_CTRL_USBMODCHG_SHIFT (25U)
-/*! USBMODCHG - If it reads as 1 when reading the DAC_TRIM field and USBCLKADJ=1, it should be re-read until it is 0.
- */
-#define ANACTRL_FRO192M_CTRL_USBMODCHG(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_CTRL_USBMODCHG_SHIFT)) & ANACTRL_FRO192M_CTRL_USBMODCHG_MASK)
-#define ANACTRL_FRO192M_CTRL_ENA_96MHZCLK_MASK (0x40000000U)
-#define ANACTRL_FRO192M_CTRL_ENA_96MHZCLK_SHIFT (30U)
-/*! ENA_96MHZCLK - 96 MHz clock control.
- * 0b0..96 MHz clock is disabled.
- * 0b1..96 MHz clock is enabled.
- */
-#define ANACTRL_FRO192M_CTRL_ENA_96MHZCLK(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_CTRL_ENA_96MHZCLK_SHIFT)) & ANACTRL_FRO192M_CTRL_ENA_96MHZCLK_MASK)
-/*! @} */
-
-/*! @name FRO192M_STATUS - 192MHz Free Running OScillator (FRO) Status register */
-/*! @{ */
-#define ANACTRL_FRO192M_STATUS_CLK_VALID_MASK (0x1U)
-#define ANACTRL_FRO192M_STATUS_CLK_VALID_SHIFT (0U)
-/*! CLK_VALID - Output clock valid signal. Indicates that CCO clock has settled.
- * 0b0..No output clock present (None of 12 MHz, 48 MHz or 96 MHz clock is available).
- * 0b1..Clock is present (12 MHz, 48 MHz or 96 MHz can be output if they are enable respectively by
- * FRO192M_CTRL.ENA_12MHZCLK/ENA_48MHZCLK/ENA_96MHZCLK).
- */
-#define ANACTRL_FRO192M_STATUS_CLK_VALID(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_STATUS_CLK_VALID_SHIFT)) & ANACTRL_FRO192M_STATUS_CLK_VALID_MASK)
-#define ANACTRL_FRO192M_STATUS_ATB_VCTRL_MASK (0x2U)
-#define ANACTRL_FRO192M_STATUS_ATB_VCTRL_SHIFT (1U)
-/*! ATB_VCTRL - CCO threshold voltage detector output (signal vcco_ok). Once the CCO voltage crosses
- * the threshold voltage of a SLVT transistor, this output signal will go high. It is also
- * possible to observe the clk_valid signal.
- */
-#define ANACTRL_FRO192M_STATUS_ATB_VCTRL(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_STATUS_ATB_VCTRL_SHIFT)) & ANACTRL_FRO192M_STATUS_ATB_VCTRL_MASK)
-/*! @} */
-
-/*! @name XO32M_CTRL - High speed Crystal Oscillator Control register */
-/*! @{ */
-#define ANACTRL_XO32M_CTRL_ACBUF_PASS_ENABLE_MASK (0x400000U)
-#define ANACTRL_XO32M_CTRL_ACBUF_PASS_ENABLE_SHIFT (22U)
-/*! ACBUF_PASS_ENABLE - Bypass enable of XO AC buffer enable in pll and top level.
- * 0b0..XO AC buffer bypass is disabled.
- * 0b1..XO AC buffer bypass is enabled.
- */
-#define ANACTRL_XO32M_CTRL_ACBUF_PASS_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_XO32M_CTRL_ACBUF_PASS_ENABLE_SHIFT)) & ANACTRL_XO32M_CTRL_ACBUF_PASS_ENABLE_MASK)
-#define ANACTRL_XO32M_CTRL_ENABLE_PLL_USB_OUT_MASK (0x800000U)
-#define ANACTRL_XO32M_CTRL_ENABLE_PLL_USB_OUT_SHIFT (23U)
-/*! ENABLE_PLL_USB_OUT - Enable High speed Crystal oscillator output to USB HS PLL.
- * 0b0..High speed Crystal oscillator output to USB HS PLL is disabled.
- * 0b1..High speed Crystal oscillator output to USB HS PLL is enabled.
- */
-#define ANACTRL_XO32M_CTRL_ENABLE_PLL_USB_OUT(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_XO32M_CTRL_ENABLE_PLL_USB_OUT_SHIFT)) & ANACTRL_XO32M_CTRL_ENABLE_PLL_USB_OUT_MASK)
-#define ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT_MASK (0x1000000U)
-#define ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT_SHIFT (24U)
-/*! ENABLE_SYSTEM_CLK_OUT - Enable XO 32 MHz output to CPU system.
- * 0b0..High speed Crystal oscillator output to CPU system is disabled.
- * 0b1..High speed Crystal oscillator output to CPU system is enabled.
- */
-#define ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT_SHIFT)) & ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT_MASK)
-/*! @} */
-
-/*! @name XO32M_STATUS - High speed Crystal Oscillator Status register */
-/*! @{ */
-#define ANACTRL_XO32M_STATUS_XO_READY_MASK (0x1U)
-#define ANACTRL_XO32M_STATUS_XO_READY_SHIFT (0U)
-/*! XO_READY - Indicates XO out frequency statibilty.
- * 0b0..XO output frequency is not yet stable.
- * 0b1..XO output frequency is stable.
- */
-#define ANACTRL_XO32M_STATUS_XO_READY(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_XO32M_STATUS_XO_READY_SHIFT)) & ANACTRL_XO32M_STATUS_XO_READY_MASK)
-/*! @} */
-
-/*! @name BOD_DCDC_INT_CTRL - Brown Out Detectors (BoDs) & DCDC interrupts generation control register */
-/*! @{ */
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_ENABLE_MASK (0x1U)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_ENABLE_SHIFT (0U)
-/*! BODVBAT_INT_ENABLE - BOD VBAT interrupt control.
- * 0b0..BOD VBAT interrupt is disabled.
- * 0b1..BOD VBAT interrupt is enabled.
- */
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_ENABLE_SHIFT)) & ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_ENABLE_MASK)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_CLEAR_MASK (0x2U)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_CLEAR_SHIFT (1U)
-/*! BODVBAT_INT_CLEAR - BOD VBAT interrupt clear.1: Clear the interrupt. Self-cleared bit.
- */
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_CLEAR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_CLEAR_SHIFT)) & ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_CLEAR_MASK)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_ENABLE_MASK (0x4U)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_ENABLE_SHIFT (2U)
-/*! BODCORE_INT_ENABLE - BOD CORE interrupt control.
- * 0b0..BOD CORE interrupt is disabled.
- * 0b1..BOD CORE interrupt is enabled.
- */
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_ENABLE_SHIFT)) & ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_ENABLE_MASK)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_CLEAR_MASK (0x8U)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_CLEAR_SHIFT (3U)
-/*! BODCORE_INT_CLEAR - BOD CORE interrupt clear.1: Clear the interrupt. Self-cleared bit.
- */
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_CLEAR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_CLEAR_SHIFT)) & ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_CLEAR_MASK)
-#define ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_ENABLE_MASK (0x10U)
-#define ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_ENABLE_SHIFT (4U)
-/*! DCDC_INT_ENABLE - DCDC interrupt control.
- * 0b0..DCDC interrupt is disabled.
- * 0b1..DCDC interrupt is enabled.
- */
-#define ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_ENABLE_SHIFT)) & ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_ENABLE_MASK)
-#define ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_CLEAR_MASK (0x20U)
-#define ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_CLEAR_SHIFT (5U)
-/*! DCDC_INT_CLEAR - DCDC interrupt clear.1: Clear the interrupt. Self-cleared bit.
- */
-#define ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_CLEAR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_CLEAR_SHIFT)) & ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_CLEAR_MASK)
-/*! @} */
-
-/*! @name BOD_DCDC_INT_STATUS - BoDs & DCDC interrupts status register */
-/*! @{ */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_STATUS_MASK (0x1U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_STATUS_SHIFT (0U)
-/*! BODVBAT_STATUS - BOD VBAT Interrupt status before Interrupt Enable.
- * 0b0..No interrupt pending..
- * 0b1..Interrupt pending..
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_STATUS_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_STATUS_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_INT_STATUS_MASK (0x2U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_INT_STATUS_SHIFT (1U)
-/*! BODVBAT_INT_STATUS - BOD VBAT Interrupt status after Interrupt Enable.
- * 0b0..No interrupt pending..
- * 0b1..Interrupt pending..
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_INT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_INT_STATUS_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_INT_STATUS_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_VAL_MASK (0x4U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_VAL_SHIFT (2U)
-/*! BODVBAT_VAL - Current value of BOD VBAT power status output.
- * 0b0..VBAT voltage level is below the threshold.
- * 0b1..VBAT voltage level is above the threshold.
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_VAL(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_VAL_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_VAL_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_STATUS_MASK (0x8U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_STATUS_SHIFT (3U)
-/*! BODCORE_STATUS - BOD CORE Interrupt status before Interrupt Enable.
- * 0b0..No interrupt pending..
- * 0b1..Interrupt pending..
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_STATUS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_STATUS_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_STATUS_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_INT_STATUS_MASK (0x10U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_INT_STATUS_SHIFT (4U)
-/*! BODCORE_INT_STATUS - BOD CORE Interrupt status after Interrupt Enable.
- * 0b0..No interrupt pending..
- * 0b1..Interrupt pending..
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_INT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_INT_STATUS_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_INT_STATUS_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_VAL_MASK (0x20U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_VAL_SHIFT (5U)
-/*! BODCORE_VAL - Current value of BOD CORE power status output.
- * 0b0..CORE voltage level is below the threshold.
- * 0b1..CORE voltage level is above the threshold.
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_VAL(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_VAL_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_VAL_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_STATUS_MASK (0x40U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_STATUS_SHIFT (6U)
-/*! DCDC_STATUS - DCDC Interrupt status before Interrupt Enable.
- * 0b0..No interrupt pending..
- * 0b1..Interrupt pending..
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_STATUS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_DCDC_STATUS_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_DCDC_STATUS_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_INT_STATUS_MASK (0x80U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_INT_STATUS_SHIFT (7U)
-/*! DCDC_INT_STATUS - DCDC Interrupt status after Interrupt Enable.
- * 0b0..No interrupt pending..
- * 0b1..Interrupt pending..
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_INT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_DCDC_INT_STATUS_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_DCDC_INT_STATUS_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_VAL_MASK (0x100U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_VAL_SHIFT (8U)
-/*! DCDC_VAL - Current value of DCDC power status output.
- * 0b0..DCDC output Voltage is below the targeted regulation level.
- * 0b1..DCDC output Voltage is above the targeted regulation level.
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_VAL(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_DCDC_VAL_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_DCDC_VAL_MASK)
-/*! @} */
-
-/*! @name RINGO0_CTRL - First Ring Oscillator module control register. */
-/*! @{ */
-#define ANACTRL_RINGO0_CTRL_SL_MASK (0x1U)
-#define ANACTRL_RINGO0_CTRL_SL_SHIFT (0U)
-/*! SL - Select short or long ringo (for all ringos types).
- * 0b0..Select short ringo (few elements).
- * 0b1..Select long ringo (many elements).
- */
-#define ANACTRL_RINGO0_CTRL_SL(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_SL_SHIFT)) & ANACTRL_RINGO0_CTRL_SL_MASK)
-#define ANACTRL_RINGO0_CTRL_FS_MASK (0x2U)
-#define ANACTRL_RINGO0_CTRL_FS_SHIFT (1U)
-/*! FS - Ringo frequency output divider.
- * 0b0..High frequency output (frequency lower than 100 MHz).
- * 0b1..Low frequency output (frequency lower than 10 MHz).
- */
-#define ANACTRL_RINGO0_CTRL_FS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_FS_SHIFT)) & ANACTRL_RINGO0_CTRL_FS_MASK)
-#define ANACTRL_RINGO0_CTRL_SWN_SWP_MASK (0xCU)
-#define ANACTRL_RINGO0_CTRL_SWN_SWP_SHIFT (2U)
-/*! SWN_SWP - PN-Ringos (P-Transistor and N-Transistor processing) control.
- * 0b00..Normal mode.
- * 0b01..P-Monitor mode. Measure with weak P transistor.
- * 0b10..P-Monitor mode. Measure with weak N transistor.
- * 0b11..Don't use.
- */
-#define ANACTRL_RINGO0_CTRL_SWN_SWP(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_SWN_SWP_SHIFT)) & ANACTRL_RINGO0_CTRL_SWN_SWP_MASK)
-#define ANACTRL_RINGO0_CTRL_PD_MASK (0x10U)
-#define ANACTRL_RINGO0_CTRL_PD_SHIFT (4U)
-/*! PD - Ringo module Power control.
- * 0b0..The Ringo module is enabled.
- * 0b1..The Ringo module is disabled.
- */
-#define ANACTRL_RINGO0_CTRL_PD(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_PD_SHIFT)) & ANACTRL_RINGO0_CTRL_PD_MASK)
-#define ANACTRL_RINGO0_CTRL_E_ND0_MASK (0x20U)
-#define ANACTRL_RINGO0_CTRL_E_ND0_SHIFT (5U)
-/*! E_ND0 - First NAND2-based ringo control.
- * 0b0..First NAND2-based ringo is disabled.
- * 0b1..First NAND2-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_ND0(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_ND0_SHIFT)) & ANACTRL_RINGO0_CTRL_E_ND0_MASK)
-#define ANACTRL_RINGO0_CTRL_E_ND1_MASK (0x40U)
-#define ANACTRL_RINGO0_CTRL_E_ND1_SHIFT (6U)
-/*! E_ND1 - Second NAND2-based ringo control.
- * 0b0..Second NAND2-based ringo is disabled.
- * 0b1..Second NAND2-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_ND1(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_ND1_SHIFT)) & ANACTRL_RINGO0_CTRL_E_ND1_MASK)
-#define ANACTRL_RINGO0_CTRL_E_NR0_MASK (0x80U)
-#define ANACTRL_RINGO0_CTRL_E_NR0_SHIFT (7U)
-/*! E_NR0 - First NOR2-based ringo control.
- * 0b0..First NOR2-based ringo is disabled.
- * 0b1..First NOR2-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_NR0(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_NR0_SHIFT)) & ANACTRL_RINGO0_CTRL_E_NR0_MASK)
-#define ANACTRL_RINGO0_CTRL_E_NR1_MASK (0x100U)
-#define ANACTRL_RINGO0_CTRL_E_NR1_SHIFT (8U)
-/*! E_NR1 - Second NOR2-based ringo control.
- * 0b0..Second NORD2-based ringo is disabled.
- * 0b1..Second NORD2-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_NR1(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_NR1_SHIFT)) & ANACTRL_RINGO0_CTRL_E_NR1_MASK)
-#define ANACTRL_RINGO0_CTRL_E_IV0_MASK (0x200U)
-#define ANACTRL_RINGO0_CTRL_E_IV0_SHIFT (9U)
-/*! E_IV0 - First Inverter-based ringo control.
- * 0b0..First INV-based ringo is disabled.
- * 0b1..First INV-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_IV0(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_IV0_SHIFT)) & ANACTRL_RINGO0_CTRL_E_IV0_MASK)
-#define ANACTRL_RINGO0_CTRL_E_IV1_MASK (0x400U)
-#define ANACTRL_RINGO0_CTRL_E_IV1_SHIFT (10U)
-/*! E_IV1 - Second Inverter-based ringo control.
- * 0b0..Second INV-based ringo is disabled.
- * 0b1..Second INV-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_IV1(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_IV1_SHIFT)) & ANACTRL_RINGO0_CTRL_E_IV1_MASK)
-#define ANACTRL_RINGO0_CTRL_E_PN0_MASK (0x800U)
-#define ANACTRL_RINGO0_CTRL_E_PN0_SHIFT (11U)
-/*! E_PN0 - First PN (P-Transistor and N-Transistor processing) monitor control.
- * 0b0..First PN-based ringo is disabled.
- * 0b1..First PN-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_PN0(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_PN0_SHIFT)) & ANACTRL_RINGO0_CTRL_E_PN0_MASK)
-#define ANACTRL_RINGO0_CTRL_E_PN1_MASK (0x1000U)
-#define ANACTRL_RINGO0_CTRL_E_PN1_SHIFT (12U)
-/*! E_PN1 - Second PN (P-Transistor and N-Transistor processing) monitor control.
- * 0b0..Second PN-based ringo is disabled.
- * 0b1..Second PN-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_PN1(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_PN1_SHIFT)) & ANACTRL_RINGO0_CTRL_E_PN1_MASK)
-#define ANACTRL_RINGO0_CTRL_DIVISOR_MASK (0xF0000U)
-#define ANACTRL_RINGO0_CTRL_DIVISOR_SHIFT (16U)
-/*! DIVISOR - Ringo out Clock divider value. Frequency Output = Frequency input / (DIViSOR+1). (minimum = Frequency input / 16)
- */
-#define ANACTRL_RINGO0_CTRL_DIVISOR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_DIVISOR_SHIFT)) & ANACTRL_RINGO0_CTRL_DIVISOR_MASK)
-#define ANACTRL_RINGO0_CTRL_DIV_UPDATE_REQ_MASK (0x80000000U)
-#define ANACTRL_RINGO0_CTRL_DIV_UPDATE_REQ_SHIFT (31U)
-/*! DIV_UPDATE_REQ - Ringo clock out Divider status flag. Set when a change is made to the divider
- * value, cleared when the change is complete.
- */
-#define ANACTRL_RINGO0_CTRL_DIV_UPDATE_REQ(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_DIV_UPDATE_REQ_SHIFT)) & ANACTRL_RINGO0_CTRL_DIV_UPDATE_REQ_MASK)
-/*! @} */
-
-/*! @name RINGO1_CTRL - Second Ring Oscillator module control register. */
-/*! @{ */
-#define ANACTRL_RINGO1_CTRL_S_MASK (0x1U)
-#define ANACTRL_RINGO1_CTRL_S_SHIFT (0U)
-/*! S - Select short or long ringo (for all ringos types).
- * 0b0..Select short ringo (few elements).
- * 0b1..Select long ringo (many elements).
- */
-#define ANACTRL_RINGO1_CTRL_S(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_S_SHIFT)) & ANACTRL_RINGO1_CTRL_S_MASK)
-#define ANACTRL_RINGO1_CTRL_FS_MASK (0x2U)
-#define ANACTRL_RINGO1_CTRL_FS_SHIFT (1U)
-/*! FS - Ringo frequency output divider.
- * 0b0..High frequency output (frequency lower than 100 MHz).
- * 0b1..Low frequency output (frequency lower than 10 MHz).
- */
-#define ANACTRL_RINGO1_CTRL_FS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_FS_SHIFT)) & ANACTRL_RINGO1_CTRL_FS_MASK)
-#define ANACTRL_RINGO1_CTRL_PD_MASK (0x4U)
-#define ANACTRL_RINGO1_CTRL_PD_SHIFT (2U)
-/*! PD - Ringo module Power control.
- * 0b0..The Ringo module is enabled.
- * 0b1..The Ringo module is disabled.
- */
-#define ANACTRL_RINGO1_CTRL_PD(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_PD_SHIFT)) & ANACTRL_RINGO1_CTRL_PD_MASK)
-#define ANACTRL_RINGO1_CTRL_E_R24_MASK (0x8U)
-#define ANACTRL_RINGO1_CTRL_E_R24_SHIFT (3U)
-/*! E_R24 - .
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO1_CTRL_E_R24(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_E_R24_SHIFT)) & ANACTRL_RINGO1_CTRL_E_R24_MASK)
-#define ANACTRL_RINGO1_CTRL_E_R35_MASK (0x10U)
-#define ANACTRL_RINGO1_CTRL_E_R35_SHIFT (4U)
-/*! E_R35 - .
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO1_CTRL_E_R35(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_E_R35_SHIFT)) & ANACTRL_RINGO1_CTRL_E_R35_MASK)
-#define ANACTRL_RINGO1_CTRL_E_M2_MASK (0x20U)
-#define ANACTRL_RINGO1_CTRL_E_M2_SHIFT (5U)
-/*! E_M2 - Metal 2 (M2) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO1_CTRL_E_M2(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_E_M2_SHIFT)) & ANACTRL_RINGO1_CTRL_E_M2_MASK)
-#define ANACTRL_RINGO1_CTRL_E_M3_MASK (0x40U)
-#define ANACTRL_RINGO1_CTRL_E_M3_SHIFT (6U)
-/*! E_M3 - Metal 3 (M3) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO1_CTRL_E_M3(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_E_M3_SHIFT)) & ANACTRL_RINGO1_CTRL_E_M3_MASK)
-#define ANACTRL_RINGO1_CTRL_E_M4_MASK (0x80U)
-#define ANACTRL_RINGO1_CTRL_E_M4_SHIFT (7U)
-/*! E_M4 - Metal 4 (M4) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO1_CTRL_E_M4(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_E_M4_SHIFT)) & ANACTRL_RINGO1_CTRL_E_M4_MASK)
-#define ANACTRL_RINGO1_CTRL_E_M5_MASK (0x100U)
-#define ANACTRL_RINGO1_CTRL_E_M5_SHIFT (8U)
-/*! E_M5 - Metal 5 (M5) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO1_CTRL_E_M5(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_E_M5_SHIFT)) & ANACTRL_RINGO1_CTRL_E_M5_MASK)
-#define ANACTRL_RINGO1_CTRL_DIVISOR_MASK (0xF0000U)
-#define ANACTRL_RINGO1_CTRL_DIVISOR_SHIFT (16U)
-/*! DIVISOR - Ringo out Clock divider value. Frequency Output = Frequency input / (DIViSOR+1). (minimum = Frequency input / 16)
- */
-#define ANACTRL_RINGO1_CTRL_DIVISOR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_DIVISOR_SHIFT)) & ANACTRL_RINGO1_CTRL_DIVISOR_MASK)
-#define ANACTRL_RINGO1_CTRL_DIV_UPDATE_REQ_MASK (0x80000000U)
-#define ANACTRL_RINGO1_CTRL_DIV_UPDATE_REQ_SHIFT (31U)
-/*! DIV_UPDATE_REQ - Ringo clock out Divider status flag. Set when a change is made to the divider
- * value, cleared when the change is complete.
- */
-#define ANACTRL_RINGO1_CTRL_DIV_UPDATE_REQ(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_DIV_UPDATE_REQ_SHIFT)) & ANACTRL_RINGO1_CTRL_DIV_UPDATE_REQ_MASK)
-/*! @} */
-
-/*! @name RINGO2_CTRL - Third Ring Oscillator module control register. */
-/*! @{ */
-#define ANACTRL_RINGO2_CTRL_S_MASK (0x1U)
-#define ANACTRL_RINGO2_CTRL_S_SHIFT (0U)
-/*! S - Select short or long ringo (for all ringos types).
- * 0b0..Select short ringo (few elements).
- * 0b1..Select long ringo (many elements).
- */
-#define ANACTRL_RINGO2_CTRL_S(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_S_SHIFT)) & ANACTRL_RINGO2_CTRL_S_MASK)
-#define ANACTRL_RINGO2_CTRL_FS_MASK (0x2U)
-#define ANACTRL_RINGO2_CTRL_FS_SHIFT (1U)
-/*! FS - Ringo frequency output divider.
- * 0b0..High frequency output (frequency lower than 100 MHz).
- * 0b1..Low frequency output (frequency lower than 10 MHz).
- */
-#define ANACTRL_RINGO2_CTRL_FS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_FS_SHIFT)) & ANACTRL_RINGO2_CTRL_FS_MASK)
-#define ANACTRL_RINGO2_CTRL_PD_MASK (0x4U)
-#define ANACTRL_RINGO2_CTRL_PD_SHIFT (2U)
-/*! PD - Ringo module Power control.
- * 0b0..The Ringo module is enabled.
- * 0b1..The Ringo module is disabled.
- */
-#define ANACTRL_RINGO2_CTRL_PD(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_PD_SHIFT)) & ANACTRL_RINGO2_CTRL_PD_MASK)
-#define ANACTRL_RINGO2_CTRL_E_R24_MASK (0x8U)
-#define ANACTRL_RINGO2_CTRL_E_R24_SHIFT (3U)
-/*! E_R24 - .
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO2_CTRL_E_R24(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_E_R24_SHIFT)) & ANACTRL_RINGO2_CTRL_E_R24_MASK)
-#define ANACTRL_RINGO2_CTRL_E_R35_MASK (0x10U)
-#define ANACTRL_RINGO2_CTRL_E_R35_SHIFT (4U)
-/*! E_R35 - .
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO2_CTRL_E_R35(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_E_R35_SHIFT)) & ANACTRL_RINGO2_CTRL_E_R35_MASK)
-#define ANACTRL_RINGO2_CTRL_E_M2_MASK (0x20U)
-#define ANACTRL_RINGO2_CTRL_E_M2_SHIFT (5U)
-/*! E_M2 - Metal 2 (M2) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO2_CTRL_E_M2(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_E_M2_SHIFT)) & ANACTRL_RINGO2_CTRL_E_M2_MASK)
-#define ANACTRL_RINGO2_CTRL_E_M3_MASK (0x40U)
-#define ANACTRL_RINGO2_CTRL_E_M3_SHIFT (6U)
-/*! E_M3 - Metal 3 (M3) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO2_CTRL_E_M3(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_E_M3_SHIFT)) & ANACTRL_RINGO2_CTRL_E_M3_MASK)
-#define ANACTRL_RINGO2_CTRL_E_M4_MASK (0x80U)
-#define ANACTRL_RINGO2_CTRL_E_M4_SHIFT (7U)
-/*! E_M4 - Metal 4 (M4) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO2_CTRL_E_M4(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_E_M4_SHIFT)) & ANACTRL_RINGO2_CTRL_E_M4_MASK)
-#define ANACTRL_RINGO2_CTRL_E_M5_MASK (0x100U)
-#define ANACTRL_RINGO2_CTRL_E_M5_SHIFT (8U)
-/*! E_M5 - Metal 5 (M5) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO2_CTRL_E_M5(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_E_M5_SHIFT)) & ANACTRL_RINGO2_CTRL_E_M5_MASK)
-#define ANACTRL_RINGO2_CTRL_DIVISOR_MASK (0xF0000U)
-#define ANACTRL_RINGO2_CTRL_DIVISOR_SHIFT (16U)
-/*! DIVISOR - Ringo out Clock divider value. Frequency Output = Frequency input / (DIViSOR+1). (minimum = Frequency input / 16)
- */
-#define ANACTRL_RINGO2_CTRL_DIVISOR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_DIVISOR_SHIFT)) & ANACTRL_RINGO2_CTRL_DIVISOR_MASK)
-#define ANACTRL_RINGO2_CTRL_DIV_UPDATE_REQ_MASK (0x80000000U)
-#define ANACTRL_RINGO2_CTRL_DIV_UPDATE_REQ_SHIFT (31U)
-/*! DIV_UPDATE_REQ - Ringo clock out Divider status flag. Set when a change is made to the divider
- * value, cleared when the change is complete.
- */
-#define ANACTRL_RINGO2_CTRL_DIV_UPDATE_REQ(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_DIV_UPDATE_REQ_SHIFT)) & ANACTRL_RINGO2_CTRL_DIV_UPDATE_REQ_MASK)
-/*! @} */
-
-/*! @name USBHS_PHY_CTRL - USB High Speed Phy Control */
-/*! @{ */
-#define ANACTRL_USBHS_PHY_CTRL_usb_vbusvalid_ext_MASK (0x1U)
-#define ANACTRL_USBHS_PHY_CTRL_usb_vbusvalid_ext_SHIFT (0U)
-/*! usb_vbusvalid_ext - Override value for Vbus if using external detectors.
- */
-#define ANACTRL_USBHS_PHY_CTRL_usb_vbusvalid_ext(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_USBHS_PHY_CTRL_usb_vbusvalid_ext_SHIFT)) & ANACTRL_USBHS_PHY_CTRL_usb_vbusvalid_ext_MASK)
-#define ANACTRL_USBHS_PHY_CTRL_usb_id_ext_MASK (0x2U)
-#define ANACTRL_USBHS_PHY_CTRL_usb_id_ext_SHIFT (1U)
-/*! usb_id_ext - Override value for ID if using external detectors.
- */
-#define ANACTRL_USBHS_PHY_CTRL_usb_id_ext(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_USBHS_PHY_CTRL_usb_id_ext_SHIFT)) & ANACTRL_USBHS_PHY_CTRL_usb_id_ext_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group ANACTRL_Register_Masks */
-
-
-/* ANACTRL - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral ANACTRL base address */
- #define ANACTRL_BASE (0x50013000u)
- /** Peripheral ANACTRL base address */
- #define ANACTRL_BASE_NS (0x40013000u)
- /** Peripheral ANACTRL base pointer */
- #define ANACTRL ((ANACTRL_Type *)ANACTRL_BASE)
- /** Peripheral ANACTRL base pointer */
- #define ANACTRL_NS ((ANACTRL_Type *)ANACTRL_BASE_NS)
- /** Array initializer of ANACTRL peripheral base addresses */
- #define ANACTRL_BASE_ADDRS { ANACTRL_BASE }
- /** Array initializer of ANACTRL peripheral base pointers */
- #define ANACTRL_BASE_PTRS { ANACTRL }
- /** Array initializer of ANACTRL peripheral base addresses */
- #define ANACTRL_BASE_ADDRS_NS { ANACTRL_BASE_NS }
- /** Array initializer of ANACTRL peripheral base pointers */
- #define ANACTRL_BASE_PTRS_NS { ANACTRL_NS }
-#else
- /** Peripheral ANACTRL base address */
- #define ANACTRL_BASE (0x40013000u)
- /** Peripheral ANACTRL base pointer */
- #define ANACTRL ((ANACTRL_Type *)ANACTRL_BASE)
- /** Array initializer of ANACTRL peripheral base addresses */
- #define ANACTRL_BASE_ADDRS { ANACTRL_BASE }
- /** Array initializer of ANACTRL peripheral base pointers */
- #define ANACTRL_BASE_PTRS { ANACTRL }
-#endif
-
-/*!
- * @}
- */ /* end of group ANACTRL_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- CASPER Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup CASPER_Peripheral_Access_Layer CASPER Peripheral Access Layer
- * @{
- */
-
-/** CASPER - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL0; /**< Contains the offsets of AB and CD in the RAM., offset: 0x0 */
- __IO uint32_t CTRL1; /**< Contains the opcode mode, iteration count, and result offset (in RAM) and also launches the accelerator. Note: with CP version: CTRL0 and CRTL1 can be written in one go with MCRR., offset: 0x4 */
- __IO uint32_t LOADER; /**< Contains an optional loader to load into CTRL0/1 in steps to perform a set of operations., offset: 0x8 */
- __IO uint32_t STATUS; /**< Indicates operational status and would contain the carry bit if used., offset: 0xC */
- __IO uint32_t INTENSET; /**< Sets interrupts, offset: 0x10 */
- __IO uint32_t INTENCLR; /**< Clears interrupts, offset: 0x14 */
- __I uint32_t INTSTAT; /**< Interrupt status bits (mask of INTENSET and STATUS), offset: 0x18 */
- uint8_t RESERVED_0[4];
- __IO uint32_t AREG; /**< A register, offset: 0x20 */
- __IO uint32_t BREG; /**< B register, offset: 0x24 */
- __IO uint32_t CREG; /**< C register, offset: 0x28 */
- __IO uint32_t DREG; /**< D register, offset: 0x2C */
- __IO uint32_t RES0; /**< Result register 0, offset: 0x30 */
- __IO uint32_t RES1; /**< Result register 1, offset: 0x34 */
- __IO uint32_t RES2; /**< Result register 2, offset: 0x38 */
- __IO uint32_t RES3; /**< Result register 3, offset: 0x3C */
- uint8_t RESERVED_1[32];
- __IO uint32_t MASK; /**< Optional mask register, offset: 0x60 */
- __IO uint32_t REMASK; /**< Optional re-mask register, offset: 0x64 */
- uint8_t RESERVED_2[24];
- __IO uint32_t LOCK; /**< Security lock register, offset: 0x80 */
-} CASPER_Type;
-
-/* ----------------------------------------------------------------------------
- -- CASPER Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup CASPER_Register_Masks CASPER Register Masks
- * @{
- */
-
-/*! @name CTRL0 - Contains the offsets of AB and CD in the RAM. */
-/*! @{ */
-#define CASPER_CTRL0_ABBPAIR_MASK (0x1U)
-#define CASPER_CTRL0_ABBPAIR_SHIFT (0U)
-/*! ABBPAIR - Which bank-pair the offset ABOFF is within. This must be 0 if only 2-up
- * 0b0..Bank-pair 0 (1st)
- * 0b1..Bank-pair 1 (2nd)
- */
-#define CASPER_CTRL0_ABBPAIR(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL0_ABBPAIR_SHIFT)) & CASPER_CTRL0_ABBPAIR_MASK)
-#define CASPER_CTRL0_ABOFF_MASK (0x4U)
-#define CASPER_CTRL0_ABOFF_SHIFT (2U)
-/*! ABOFF - Word or DWord Offset of AB values, with B at [2]=0 and A at [2]=1 as far as the code
- * sees (normally will be an interleaved bank so only sequential to AHB). Word offset only allowed
- * if 32 bit operation. Ideally not in the same RAM as the CD values if 4-up
- */
-#define CASPER_CTRL0_ABOFF(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL0_ABOFF_SHIFT)) & CASPER_CTRL0_ABOFF_MASK)
-#define CASPER_CTRL0_CDBPAIR_MASK (0x10000U)
-#define CASPER_CTRL0_CDBPAIR_SHIFT (16U)
-/*! CDBPAIR - Which bank-pair the offset CDOFF is within. This must be 0 if only 2-up
- * 0b0..Bank-pair 0 (1st)
- * 0b1..Bank-pair 1 (2nd)
- */
-#define CASPER_CTRL0_CDBPAIR(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL0_CDBPAIR_SHIFT)) & CASPER_CTRL0_CDBPAIR_MASK)
-#define CASPER_CTRL0_CDOFF_MASK (0x1FFC0000U)
-#define CASPER_CTRL0_CDOFF_SHIFT (18U)
-/*! CDOFF - Word or DWord Offset of CD, with D at [2]=0 and C at [2]=1 as far as the code sees
- * (normally will be an interleaved bank so only sequential to AHB). Word offset only allowed if 32
- * bit operation. Ideally not in the same RAM as the AB values
- */
-#define CASPER_CTRL0_CDOFF(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL0_CDOFF_SHIFT)) & CASPER_CTRL0_CDOFF_MASK)
-/*! @} */
-
-/*! @name CTRL1 - Contains the opcode mode, iteration count, and result offset (in RAM) and also launches the accelerator. Note: with CP version: CTRL0 and CRTL1 can be written in one go with MCRR. */
-/*! @{ */
-#define CASPER_CTRL1_ITER_MASK (0xFFU)
-#define CASPER_CTRL1_ITER_SHIFT (0U)
-/*! ITER - Iteration counter. Is number_cycles - 1. write 0 means Does one cycle - does not iterate.
- */
-#define CASPER_CTRL1_ITER(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL1_ITER_SHIFT)) & CASPER_CTRL1_ITER_MASK)
-#define CASPER_CTRL1_MODE_MASK (0xFF00U)
-#define CASPER_CTRL1_MODE_SHIFT (8U)
-/*! MODE - Operation mode to perform. write 0 means Accelerator is inactive. write others means accelerator is active.
- */
-#define CASPER_CTRL1_MODE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL1_MODE_SHIFT)) & CASPER_CTRL1_MODE_MASK)
-#define CASPER_CTRL1_RESBPAIR_MASK (0x10000U)
-#define CASPER_CTRL1_RESBPAIR_SHIFT (16U)
-/*! RESBPAIR - Which bank-pair the offset RESOFF is within. This must be 0 if only 2-up. Ideally
- * this is not the same bank as ABBPAIR (when 4-up supported)
- * 0b0..Bank-pair 0 (1st)
- * 0b1..Bank-pair 1 (2nd)
- */
-#define CASPER_CTRL1_RESBPAIR(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL1_RESBPAIR_SHIFT)) & CASPER_CTRL1_RESBPAIR_MASK)
-#define CASPER_CTRL1_RESOFF_MASK (0x1FFC0000U)
-#define CASPER_CTRL1_RESOFF_SHIFT (18U)
-/*! RESOFF - Word or DWord Offset of result. Word offset only allowed if 32 bit operation. Ideally
- * not in the same RAM as the AB and CD values
- */
-#define CASPER_CTRL1_RESOFF(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL1_RESOFF_SHIFT)) & CASPER_CTRL1_RESOFF_MASK)
-#define CASPER_CTRL1_CSKIP_MASK (0xC0000000U)
-#define CASPER_CTRL1_CSKIP_SHIFT (30U)
-/*! CSKIP - Skip rules on Carry if needed. This operation will be skipped based on Carry value (from previous operation) if not 0:
- * 0b00..No Skip
- * 0b01..Skip if Carry is 1
- * 0b10..Skip if Carry is 0
- * 0b11..Set CTRLOFF to CDOFF and Skip
- */
-#define CASPER_CTRL1_CSKIP(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL1_CSKIP_SHIFT)) & CASPER_CTRL1_CSKIP_MASK)
-/*! @} */
-
-/*! @name LOADER - Contains an optional loader to load into CTRL0/1 in steps to perform a set of operations. */
-/*! @{ */
-#define CASPER_LOADER_COUNT_MASK (0xFFU)
-#define CASPER_LOADER_COUNT_SHIFT (0U)
-/*! COUNT - Number of control pairs to load 0 relative (so 1 means load 1). write 1 means Does one
- * op - does not iterate, write N means N control pairs to load
- */
-#define CASPER_LOADER_COUNT(x) (((uint32_t)(((uint32_t)(x)) << CASPER_LOADER_COUNT_SHIFT)) & CASPER_LOADER_COUNT_MASK)
-#define CASPER_LOADER_CTRLBPAIR_MASK (0x10000U)
-#define CASPER_LOADER_CTRLBPAIR_SHIFT (16U)
-/*! CTRLBPAIR - Which bank-pair the offset CTRLOFF is within. This must be 0 if only 2-up. Does not
- * matter which bank is used as this is loaded when not performing an operation.
- * 0b0..Bank-pair 0 (1st)
- * 0b1..Bank-pair 1 (2nd)
- */
-#define CASPER_LOADER_CTRLBPAIR(x) (((uint32_t)(((uint32_t)(x)) << CASPER_LOADER_CTRLBPAIR_SHIFT)) & CASPER_LOADER_CTRLBPAIR_MASK)
-#define CASPER_LOADER_CTRLOFF_MASK (0x1FFC0000U)
-#define CASPER_LOADER_CTRLOFF_SHIFT (18U)
-/*! CTRLOFF - DWord Offset of CTRL pair to load next.
- */
-#define CASPER_LOADER_CTRLOFF(x) (((uint32_t)(((uint32_t)(x)) << CASPER_LOADER_CTRLOFF_SHIFT)) & CASPER_LOADER_CTRLOFF_MASK)
-/*! @} */
-
-/*! @name STATUS - Indicates operational status and would contain the carry bit if used. */
-/*! @{ */
-#define CASPER_STATUS_DONE_MASK (0x1U)
-#define CASPER_STATUS_DONE_SHIFT (0U)
-/*! DONE - Indicates if the accelerator has finished an operation. Write 1 to clear, or write CTRL1 to clear.
- * 0b0..Busy or just cleared
- * 0b1..Completed last operation
- */
-#define CASPER_STATUS_DONE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_STATUS_DONE_SHIFT)) & CASPER_STATUS_DONE_MASK)
-#define CASPER_STATUS_CARRY_MASK (0x10U)
-#define CASPER_STATUS_CARRY_SHIFT (4U)
-/*! CARRY - Last carry value if operation produced a carry bit
- * 0b0..Carry was 0 or no carry
- * 0b1..Carry was 1
- */
-#define CASPER_STATUS_CARRY(x) (((uint32_t)(((uint32_t)(x)) << CASPER_STATUS_CARRY_SHIFT)) & CASPER_STATUS_CARRY_MASK)
-#define CASPER_STATUS_BUSY_MASK (0x20U)
-#define CASPER_STATUS_BUSY_SHIFT (5U)
-/*! BUSY - Indicates if the accelerator is busy performing an operation
- * 0b0..Not busy - is idle
- * 0b1..Is busy
- */
-#define CASPER_STATUS_BUSY(x) (((uint32_t)(((uint32_t)(x)) << CASPER_STATUS_BUSY_SHIFT)) & CASPER_STATUS_BUSY_MASK)
-/*! @} */
-
-/*! @name INTENSET - Sets interrupts */
-/*! @{ */
-#define CASPER_INTENSET_DONE_MASK (0x1U)
-#define CASPER_INTENSET_DONE_SHIFT (0U)
-/*! DONE - Set if the accelerator should interrupt when done.
- * 0b0..Do not interrupt when done
- * 0b1..Interrupt when done
- */
-#define CASPER_INTENSET_DONE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_INTENSET_DONE_SHIFT)) & CASPER_INTENSET_DONE_MASK)
-/*! @} */
-
-/*! @name INTENCLR - Clears interrupts */
-/*! @{ */
-#define CASPER_INTENCLR_DONE_MASK (0x1U)
-#define CASPER_INTENCLR_DONE_SHIFT (0U)
-/*! DONE - Written to clear an interrupt set with INTENSET.
- * 0b0..If written 0, ignored
- * 0b1..If written 1, do not Interrupt when done
- */
-#define CASPER_INTENCLR_DONE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_INTENCLR_DONE_SHIFT)) & CASPER_INTENCLR_DONE_MASK)
-/*! @} */
-
-/*! @name INTSTAT - Interrupt status bits (mask of INTENSET and STATUS) */
-/*! @{ */
-#define CASPER_INTSTAT_DONE_MASK (0x1U)
-#define CASPER_INTSTAT_DONE_SHIFT (0U)
-/*! DONE - If set, interrupt is caused by accelerator being done.
- * 0b0..Not caused by accelerator being done
- * 0b1..Caused by accelerator being done
- */
-#define CASPER_INTSTAT_DONE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_INTSTAT_DONE_SHIFT)) & CASPER_INTSTAT_DONE_MASK)
-/*! @} */
-
-/*! @name AREG - A register */
-/*! @{ */
-#define CASPER_AREG_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_AREG_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to be fed into Multiplier. Is not normally written or read by application,
- * but is available when accelerator not busy.
- */
-#define CASPER_AREG_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_AREG_REG_VALUE_SHIFT)) & CASPER_AREG_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name BREG - B register */
-/*! @{ */
-#define CASPER_BREG_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_BREG_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to be fed into Multiplier. Is not normally written or read by application,
- * but is available when accelerator not busy.
- */
-#define CASPER_BREG_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_BREG_REG_VALUE_SHIFT)) & CASPER_BREG_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name CREG - C register */
-/*! @{ */
-#define CASPER_CREG_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_CREG_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to be fed into Multiplier. Is not normally written or read by application,
- * but is available when accelerator not busy.
- */
-#define CASPER_CREG_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CREG_REG_VALUE_SHIFT)) & CASPER_CREG_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name DREG - D register */
-/*! @{ */
-#define CASPER_DREG_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_DREG_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to be fed into Multiplier. Is not normally written or read by application,
- * but is available when accelerator not busy.
- */
-#define CASPER_DREG_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_DREG_REG_VALUE_SHIFT)) & CASPER_DREG_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name RES0 - Result register 0 */
-/*! @{ */
-#define CASPER_RES0_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_RES0_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to hold working result (from multiplier, adder/xor, etc). Is not normally
- * written or read by application, but is available when accelerator not busy.
- */
-#define CASPER_RES0_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_RES0_REG_VALUE_SHIFT)) & CASPER_RES0_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name RES1 - Result register 1 */
-/*! @{ */
-#define CASPER_RES1_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_RES1_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to hold working result (from multiplier, adder/xor, etc). Is not normally
- * written or read by application, but is available when accelerator not busy.
- */
-#define CASPER_RES1_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_RES1_REG_VALUE_SHIFT)) & CASPER_RES1_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name RES2 - Result register 2 */
-/*! @{ */
-#define CASPER_RES2_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_RES2_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to hold working result (from multiplier, adder/xor, etc). Is not normally
- * written or read by application, but is available when accelerator not busy.
- */
-#define CASPER_RES2_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_RES2_REG_VALUE_SHIFT)) & CASPER_RES2_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name RES3 - Result register 3 */
-/*! @{ */
-#define CASPER_RES3_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_RES3_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to hold working result (from multiplier, adder/xor, etc). Is not normally
- * written or read by application, but is available when accelerator not busy.
- */
-#define CASPER_RES3_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_RES3_REG_VALUE_SHIFT)) & CASPER_RES3_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name MASK - Optional mask register */
-/*! @{ */
-#define CASPER_MASK_MASK_MASK (0xFFFFFFFFU)
-#define CASPER_MASK_MASK_SHIFT (0U)
-/*! MASK - Mask to apply as side channel countermeasure. 0: No mask to be used. N: Mask to XOR onto values
- */
-#define CASPER_MASK_MASK(x) (((uint32_t)(((uint32_t)(x)) << CASPER_MASK_MASK_SHIFT)) & CASPER_MASK_MASK_MASK)
-/*! @} */
-
-/*! @name REMASK - Optional re-mask register */
-/*! @{ */
-#define CASPER_REMASK_MASK_MASK (0xFFFFFFFFU)
-#define CASPER_REMASK_MASK_SHIFT (0U)
-/*! MASK - Mask to apply as side channel countermeasure. 0: No mask to be used. N: Mask to XOR onto values
- */
-#define CASPER_REMASK_MASK(x) (((uint32_t)(((uint32_t)(x)) << CASPER_REMASK_MASK_SHIFT)) & CASPER_REMASK_MASK_MASK)
-/*! @} */
-
-/*! @name LOCK - Security lock register */
-/*! @{ */
-#define CASPER_LOCK_LOCK_MASK (0x1U)
-#define CASPER_LOCK_LOCK_SHIFT (0U)
-/*! LOCK - Reads back with security level locked to, or 0. Writes as 0 to unlock, 1 to lock.
- * 0b0..unlock
- * 0b1..Lock to current security level
- */
-#define CASPER_LOCK_LOCK(x) (((uint32_t)(((uint32_t)(x)) << CASPER_LOCK_LOCK_SHIFT)) & CASPER_LOCK_LOCK_MASK)
-#define CASPER_LOCK_KEY_MASK (0x1FFF0U)
-#define CASPER_LOCK_KEY_SHIFT (4U)
-/*! KEY - Must be written as 0x73D to change the register.
- * 0b0011100111101..If set during write, will allow lock or unlock
- */
-#define CASPER_LOCK_KEY(x) (((uint32_t)(((uint32_t)(x)) << CASPER_LOCK_KEY_SHIFT)) & CASPER_LOCK_KEY_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group CASPER_Register_Masks */
-
-
-/* CASPER - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral CASPER base address */
- #define CASPER_BASE (0x500A5000u)
- /** Peripheral CASPER base address */
- #define CASPER_BASE_NS (0x400A5000u)
- /** Peripheral CASPER base pointer */
- #define CASPER ((CASPER_Type *)CASPER_BASE)
- /** Peripheral CASPER base pointer */
- #define CASPER_NS ((CASPER_Type *)CASPER_BASE_NS)
- /** Array initializer of CASPER peripheral base addresses */
- #define CASPER_BASE_ADDRS { CASPER_BASE }
- /** Array initializer of CASPER peripheral base pointers */
- #define CASPER_BASE_PTRS { CASPER }
- /** Array initializer of CASPER peripheral base addresses */
- #define CASPER_BASE_ADDRS_NS { CASPER_BASE_NS }
- /** Array initializer of CASPER peripheral base pointers */
- #define CASPER_BASE_PTRS_NS { CASPER_NS }
-#else
- /** Peripheral CASPER base address */
- #define CASPER_BASE (0x400A5000u)
- /** Peripheral CASPER base pointer */
- #define CASPER ((CASPER_Type *)CASPER_BASE)
- /** Array initializer of CASPER peripheral base addresses */
- #define CASPER_BASE_ADDRS { CASPER_BASE }
- /** Array initializer of CASPER peripheral base pointers */
- #define CASPER_BASE_PTRS { CASPER }
-#endif
-
-/*!
- * @}
- */ /* end of group CASPER_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- CRC Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup CRC_Peripheral_Access_Layer CRC Peripheral Access Layer
- * @{
- */
-
-/** CRC - Register Layout Typedef */
-typedef struct {
- __IO uint32_t MODE; /**< CRC mode register, offset: 0x0 */
- __IO uint32_t SEED; /**< CRC seed register, offset: 0x4 */
- union { /* offset: 0x8 */
- __I uint32_t SUM; /**< CRC checksum register, offset: 0x8 */
- __O uint32_t WR_DATA; /**< CRC data register, offset: 0x8 */
- };
-} CRC_Type;
-
-/* ----------------------------------------------------------------------------
- -- CRC Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup CRC_Register_Masks CRC Register Masks
- * @{
- */
-
-/*! @name MODE - CRC mode register */
-/*! @{ */
-#define CRC_MODE_CRC_POLY_MASK (0x3U)
-#define CRC_MODE_CRC_POLY_SHIFT (0U)
-/*! CRC_POLY - CRC polynomial: 1X = CRC-32 polynomial 01 = CRC-16 polynomial 00 = CRC-CCITT polynomial
- */
-#define CRC_MODE_CRC_POLY(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_CRC_POLY_SHIFT)) & CRC_MODE_CRC_POLY_MASK)
-#define CRC_MODE_BIT_RVS_WR_MASK (0x4U)
-#define CRC_MODE_BIT_RVS_WR_SHIFT (2U)
-/*! BIT_RVS_WR - Data bit order: 1 = Bit order reverse for CRC_WR_DATA (per byte) 0 = No bit order reverse for CRC_WR_DATA (per byte)
- */
-#define CRC_MODE_BIT_RVS_WR(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_BIT_RVS_WR_SHIFT)) & CRC_MODE_BIT_RVS_WR_MASK)
-#define CRC_MODE_CMPL_WR_MASK (0x8U)
-#define CRC_MODE_CMPL_WR_SHIFT (3U)
-/*! CMPL_WR - Data complement: 1 = 1's complement for CRC_WR_DATA 0 = No 1's complement for CRC_WR_DATA
- */
-#define CRC_MODE_CMPL_WR(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_CMPL_WR_SHIFT)) & CRC_MODE_CMPL_WR_MASK)
-#define CRC_MODE_BIT_RVS_SUM_MASK (0x10U)
-#define CRC_MODE_BIT_RVS_SUM_SHIFT (4U)
-/*! BIT_RVS_SUM - CRC sum bit order: 1 = Bit order reverse for CRC_SUM 0 = No bit order reverse for CRC_SUM
- */
-#define CRC_MODE_BIT_RVS_SUM(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_BIT_RVS_SUM_SHIFT)) & CRC_MODE_BIT_RVS_SUM_MASK)
-#define CRC_MODE_CMPL_SUM_MASK (0x20U)
-#define CRC_MODE_CMPL_SUM_SHIFT (5U)
-/*! CMPL_SUM - CRC sum complement: 1 = 1's complement for CRC_SUM 0 = No 1's complement for CRC_SUM
- */
-#define CRC_MODE_CMPL_SUM(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_CMPL_SUM_SHIFT)) & CRC_MODE_CMPL_SUM_MASK)
-/*! @} */
-
-/*! @name SEED - CRC seed register */
-/*! @{ */
-#define CRC_SEED_CRC_SEED_MASK (0xFFFFFFFFU)
-#define CRC_SEED_CRC_SEED_SHIFT (0U)
-/*! CRC_SEED - A write access to this register will load CRC seed value to CRC_SUM register with
- * selected bit order and 1's complement pre-processes. A write access to this register will
- * overrule the CRC calculation in progresses.
- */
-#define CRC_SEED_CRC_SEED(x) (((uint32_t)(((uint32_t)(x)) << CRC_SEED_CRC_SEED_SHIFT)) & CRC_SEED_CRC_SEED_MASK)
-/*! @} */
-
-/*! @name SUM - CRC checksum register */
-/*! @{ */
-#define CRC_SUM_CRC_SUM_MASK (0xFFFFFFFFU)
-#define CRC_SUM_CRC_SUM_SHIFT (0U)
-/*! CRC_SUM - The most recent CRC sum can be read through this register with selected bit order and 1's complement post-processes.
- */
-#define CRC_SUM_CRC_SUM(x) (((uint32_t)(((uint32_t)(x)) << CRC_SUM_CRC_SUM_SHIFT)) & CRC_SUM_CRC_SUM_MASK)
-/*! @} */
-
-/*! @name WR_DATA - CRC data register */
-/*! @{ */
-#define CRC_WR_DATA_CRC_WR_DATA_MASK (0xFFFFFFFFU)
-#define CRC_WR_DATA_CRC_WR_DATA_SHIFT (0U)
-/*! CRC_WR_DATA - Data written to this register will be taken to perform CRC calculation with
- * selected bit order and 1's complement pre-process. Any write size 8, 16 or 32-bit are allowed and
- * accept back-to-back transactions.
- */
-#define CRC_WR_DATA_CRC_WR_DATA(x) (((uint32_t)(((uint32_t)(x)) << CRC_WR_DATA_CRC_WR_DATA_SHIFT)) & CRC_WR_DATA_CRC_WR_DATA_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group CRC_Register_Masks */
-
-
-/* CRC - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral CRC_ENGINE base address */
- #define CRC_ENGINE_BASE (0x50095000u)
- /** Peripheral CRC_ENGINE base address */
- #define CRC_ENGINE_BASE_NS (0x40095000u)
- /** Peripheral CRC_ENGINE base pointer */
- #define CRC_ENGINE ((CRC_Type *)CRC_ENGINE_BASE)
- /** Peripheral CRC_ENGINE base pointer */
- #define CRC_ENGINE_NS ((CRC_Type *)CRC_ENGINE_BASE_NS)
- /** Array initializer of CRC peripheral base addresses */
- #define CRC_BASE_ADDRS { CRC_ENGINE_BASE }
- /** Array initializer of CRC peripheral base pointers */
- #define CRC_BASE_PTRS { CRC_ENGINE }
- /** Array initializer of CRC peripheral base addresses */
- #define CRC_BASE_ADDRS_NS { CRC_ENGINE_BASE_NS }
- /** Array initializer of CRC peripheral base pointers */
- #define CRC_BASE_PTRS_NS { CRC_ENGINE_NS }
-#else
- /** Peripheral CRC_ENGINE base address */
- #define CRC_ENGINE_BASE (0x40095000u)
- /** Peripheral CRC_ENGINE base pointer */
- #define CRC_ENGINE ((CRC_Type *)CRC_ENGINE_BASE)
- /** Array initializer of CRC peripheral base addresses */
- #define CRC_BASE_ADDRS { CRC_ENGINE_BASE }
- /** Array initializer of CRC peripheral base pointers */
- #define CRC_BASE_PTRS { CRC_ENGINE }
-#endif
-
-/*!
- * @}
- */ /* end of group CRC_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- CTIMER Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup CTIMER_Peripheral_Access_Layer CTIMER Peripheral Access Layer
- * @{
- */
-
-/** CTIMER - Register Layout Typedef */
-typedef struct {
- __IO uint32_t IR; /**< Interrupt Register. The IR can be written to clear interrupts. The IR can be read to identify which of eight possible interrupt sources are pending., offset: 0x0 */
- __IO uint32_t TCR; /**< Timer Control Register. The TCR is used to control the Timer Counter functions. The Timer Counter can be disabled or reset through the TCR., offset: 0x4 */
- __IO uint32_t TC; /**< Timer Counter, offset: 0x8 */
- __IO uint32_t PR; /**< Prescale Register, offset: 0xC */
- __IO uint32_t PC; /**< Prescale Counter, offset: 0x10 */
- __IO uint32_t MCR; /**< Match Control Register, offset: 0x14 */
- __IO uint32_t MR[4]; /**< Match Register . MR can be enabled through the MCR to reset the TC, stop both the TC and PC, and/or generate an interrupt every time MR matches the TC., array offset: 0x18, array step: 0x4 */
- __IO uint32_t CCR; /**< Capture Control Register. The CCR controls which edges of the capture inputs are used to load the Capture Registers and whether or not an interrupt is generated when a capture takes place., offset: 0x28 */
- __I uint32_t CR[4]; /**< Capture Register . CR is loaded with the value of TC when there is an event on the CAPn. input., array offset: 0x2C, array step: 0x4 */
- __IO uint32_t EMR; /**< External Match Register. The EMR controls the match function and the external match pins., offset: 0x3C */
- uint8_t RESERVED_0[48];
- __IO uint32_t CTCR; /**< Count Control Register. The CTCR selects between Timer and Counter mode, and in Counter mode selects the signal and edge(s) for counting., offset: 0x70 */
- __IO uint32_t PWMC; /**< PWM Control Register. This register enables PWM mode for the external match pins., offset: 0x74 */
- __IO uint32_t MSR[4]; /**< Match Shadow Register, array offset: 0x78, array step: 0x4 */
-} CTIMER_Type;
-
-/* ----------------------------------------------------------------------------
- -- CTIMER Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup CTIMER_Register_Masks CTIMER Register Masks
- * @{
- */
-
-/*! @name IR - Interrupt Register. The IR can be written to clear interrupts. The IR can be read to identify which of eight possible interrupt sources are pending. */
-/*! @{ */
-#define CTIMER_IR_MR0INT_MASK (0x1U)
-#define CTIMER_IR_MR0INT_SHIFT (0U)
-/*! MR0INT - Interrupt flag for match channel 0.
- */
-#define CTIMER_IR_MR0INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_MR0INT_SHIFT)) & CTIMER_IR_MR0INT_MASK)
-#define CTIMER_IR_MR1INT_MASK (0x2U)
-#define CTIMER_IR_MR1INT_SHIFT (1U)
-/*! MR1INT - Interrupt flag for match channel 1.
- */
-#define CTIMER_IR_MR1INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_MR1INT_SHIFT)) & CTIMER_IR_MR1INT_MASK)
-#define CTIMER_IR_MR2INT_MASK (0x4U)
-#define CTIMER_IR_MR2INT_SHIFT (2U)
-/*! MR2INT - Interrupt flag for match channel 2.
- */
-#define CTIMER_IR_MR2INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_MR2INT_SHIFT)) & CTIMER_IR_MR2INT_MASK)
-#define CTIMER_IR_MR3INT_MASK (0x8U)
-#define CTIMER_IR_MR3INT_SHIFT (3U)
-/*! MR3INT - Interrupt flag for match channel 3.
- */
-#define CTIMER_IR_MR3INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_MR3INT_SHIFT)) & CTIMER_IR_MR3INT_MASK)
-#define CTIMER_IR_CR0INT_MASK (0x10U)
-#define CTIMER_IR_CR0INT_SHIFT (4U)
-/*! CR0INT - Interrupt flag for capture channel 0 event.
- */
-#define CTIMER_IR_CR0INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_CR0INT_SHIFT)) & CTIMER_IR_CR0INT_MASK)
-#define CTIMER_IR_CR1INT_MASK (0x20U)
-#define CTIMER_IR_CR1INT_SHIFT (5U)
-/*! CR1INT - Interrupt flag for capture channel 1 event.
- */
-#define CTIMER_IR_CR1INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_CR1INT_SHIFT)) & CTIMER_IR_CR1INT_MASK)
-#define CTIMER_IR_CR2INT_MASK (0x40U)
-#define CTIMER_IR_CR2INT_SHIFT (6U)
-/*! CR2INT - Interrupt flag for capture channel 2 event.
- */
-#define CTIMER_IR_CR2INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_CR2INT_SHIFT)) & CTIMER_IR_CR2INT_MASK)
-#define CTIMER_IR_CR3INT_MASK (0x80U)
-#define CTIMER_IR_CR3INT_SHIFT (7U)
-/*! CR3INT - Interrupt flag for capture channel 3 event.
- */
-#define CTIMER_IR_CR3INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_CR3INT_SHIFT)) & CTIMER_IR_CR3INT_MASK)
-/*! @} */
-
-/*! @name TCR - Timer Control Register. The TCR is used to control the Timer Counter functions. The Timer Counter can be disabled or reset through the TCR. */
-/*! @{ */
-#define CTIMER_TCR_CEN_MASK (0x1U)
-#define CTIMER_TCR_CEN_SHIFT (0U)
-/*! CEN - Counter enable.
- * 0b0..Disabled.The counters are disabled.
- * 0b1..Enabled. The Timer Counter and Prescale Counter are enabled.
- */
-#define CTIMER_TCR_CEN(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_TCR_CEN_SHIFT)) & CTIMER_TCR_CEN_MASK)
-#define CTIMER_TCR_CRST_MASK (0x2U)
-#define CTIMER_TCR_CRST_SHIFT (1U)
-/*! CRST - Counter reset.
- * 0b0..Disabled. Do nothing.
- * 0b1..Enabled. The Timer Counter and the Prescale Counter are synchronously reset on the next positive edge of
- * the APB bus clock. The counters remain reset until TCR[1] is returned to zero.
- */
-#define CTIMER_TCR_CRST(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_TCR_CRST_SHIFT)) & CTIMER_TCR_CRST_MASK)
-/*! @} */
-
-/*! @name TC - Timer Counter */
-/*! @{ */
-#define CTIMER_TC_TCVAL_MASK (0xFFFFFFFFU)
-#define CTIMER_TC_TCVAL_SHIFT (0U)
-/*! TCVAL - Timer counter value.
- */
-#define CTIMER_TC_TCVAL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_TC_TCVAL_SHIFT)) & CTIMER_TC_TCVAL_MASK)
-/*! @} */
-
-/*! @name PR - Prescale Register */
-/*! @{ */
-#define CTIMER_PR_PRVAL_MASK (0xFFFFFFFFU)
-#define CTIMER_PR_PRVAL_SHIFT (0U)
-/*! PRVAL - Prescale counter value.
- */
-#define CTIMER_PR_PRVAL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PR_PRVAL_SHIFT)) & CTIMER_PR_PRVAL_MASK)
-/*! @} */
-
-/*! @name PC - Prescale Counter */
-/*! @{ */
-#define CTIMER_PC_PCVAL_MASK (0xFFFFFFFFU)
-#define CTIMER_PC_PCVAL_SHIFT (0U)
-/*! PCVAL - Prescale counter value.
- */
-#define CTIMER_PC_PCVAL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PC_PCVAL_SHIFT)) & CTIMER_PC_PCVAL_MASK)
-/*! @} */
-
-/*! @name MCR - Match Control Register */
-/*! @{ */
-#define CTIMER_MCR_MR0I_MASK (0x1U)
-#define CTIMER_MCR_MR0I_SHIFT (0U)
-/*! MR0I - Interrupt on MR0: an interrupt is generated when MR0 matches the value in the TC.
- */
-#define CTIMER_MCR_MR0I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR0I_SHIFT)) & CTIMER_MCR_MR0I_MASK)
-#define CTIMER_MCR_MR0R_MASK (0x2U)
-#define CTIMER_MCR_MR0R_SHIFT (1U)
-/*! MR0R - Reset on MR0: the TC will be reset if MR0 matches it.
- */
-#define CTIMER_MCR_MR0R(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR0R_SHIFT)) & CTIMER_MCR_MR0R_MASK)
-#define CTIMER_MCR_MR0S_MASK (0x4U)
-#define CTIMER_MCR_MR0S_SHIFT (2U)
-/*! MR0S - Stop on MR0: the TC and PC will be stopped and TCR[0] will be set to 0 if MR0 matches the TC.
- */
-#define CTIMER_MCR_MR0S(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR0S_SHIFT)) & CTIMER_MCR_MR0S_MASK)
-#define CTIMER_MCR_MR1I_MASK (0x8U)
-#define CTIMER_MCR_MR1I_SHIFT (3U)
-/*! MR1I - Interrupt on MR1: an interrupt is generated when MR1 matches the value in the TC.
- */
-#define CTIMER_MCR_MR1I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR1I_SHIFT)) & CTIMER_MCR_MR1I_MASK)
-#define CTIMER_MCR_MR1R_MASK (0x10U)
-#define CTIMER_MCR_MR1R_SHIFT (4U)
-/*! MR1R - Reset on MR1: the TC will be reset if MR1 matches it.
- */
-#define CTIMER_MCR_MR1R(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR1R_SHIFT)) & CTIMER_MCR_MR1R_MASK)
-#define CTIMER_MCR_MR1S_MASK (0x20U)
-#define CTIMER_MCR_MR1S_SHIFT (5U)
-/*! MR1S - Stop on MR1: the TC and PC will be stopped and TCR[0] will be set to 0 if MR1 matches the TC.
- */
-#define CTIMER_MCR_MR1S(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR1S_SHIFT)) & CTIMER_MCR_MR1S_MASK)
-#define CTIMER_MCR_MR2I_MASK (0x40U)
-#define CTIMER_MCR_MR2I_SHIFT (6U)
-/*! MR2I - Interrupt on MR2: an interrupt is generated when MR2 matches the value in the TC.
- */
-#define CTIMER_MCR_MR2I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR2I_SHIFT)) & CTIMER_MCR_MR2I_MASK)
-#define CTIMER_MCR_MR2R_MASK (0x80U)
-#define CTIMER_MCR_MR2R_SHIFT (7U)
-/*! MR2R - Reset on MR2: the TC will be reset if MR2 matches it.
- */
-#define CTIMER_MCR_MR2R(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR2R_SHIFT)) & CTIMER_MCR_MR2R_MASK)
-#define CTIMER_MCR_MR2S_MASK (0x100U)
-#define CTIMER_MCR_MR2S_SHIFT (8U)
-/*! MR2S - Stop on MR2: the TC and PC will be stopped and TCR[0] will be set to 0 if MR2 matches the TC.
- */
-#define CTIMER_MCR_MR2S(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR2S_SHIFT)) & CTIMER_MCR_MR2S_MASK)
-#define CTIMER_MCR_MR3I_MASK (0x200U)
-#define CTIMER_MCR_MR3I_SHIFT (9U)
-/*! MR3I - Interrupt on MR3: an interrupt is generated when MR3 matches the value in the TC.
- */
-#define CTIMER_MCR_MR3I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR3I_SHIFT)) & CTIMER_MCR_MR3I_MASK)
-#define CTIMER_MCR_MR3R_MASK (0x400U)
-#define CTIMER_MCR_MR3R_SHIFT (10U)
-/*! MR3R - Reset on MR3: the TC will be reset if MR3 matches it.
- */
-#define CTIMER_MCR_MR3R(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR3R_SHIFT)) & CTIMER_MCR_MR3R_MASK)
-#define CTIMER_MCR_MR3S_MASK (0x800U)
-#define CTIMER_MCR_MR3S_SHIFT (11U)
-/*! MR3S - Stop on MR3: the TC and PC will be stopped and TCR[0] will be set to 0 if MR3 matches the TC.
- */
-#define CTIMER_MCR_MR3S(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR3S_SHIFT)) & CTIMER_MCR_MR3S_MASK)
-#define CTIMER_MCR_MR0RL_MASK (0x1000000U)
-#define CTIMER_MCR_MR0RL_SHIFT (24U)
-/*! MR0RL - Reload MR0 with the contents of the Match 0 Shadow Register when the TC is reset to zero
- * (either via a match event or a write to bit 1 of the TCR).
- */
-#define CTIMER_MCR_MR0RL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR0RL_SHIFT)) & CTIMER_MCR_MR0RL_MASK)
-#define CTIMER_MCR_MR1RL_MASK (0x2000000U)
-#define CTIMER_MCR_MR1RL_SHIFT (25U)
-/*! MR1RL - Reload MR1 with the contents of the Match 1 Shadow Register when the TC is reset to zero
- * (either via a match event or a write to bit 1 of the TCR).
- */
-#define CTIMER_MCR_MR1RL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR1RL_SHIFT)) & CTIMER_MCR_MR1RL_MASK)
-#define CTIMER_MCR_MR2RL_MASK (0x4000000U)
-#define CTIMER_MCR_MR2RL_SHIFT (26U)
-/*! MR2RL - Reload MR2 with the contents of the Match 2 Shadow Register when the TC is reset to zero
- * (either via a match event or a write to bit 1 of the TCR).
- */
-#define CTIMER_MCR_MR2RL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR2RL_SHIFT)) & CTIMER_MCR_MR2RL_MASK)
-#define CTIMER_MCR_MR3RL_MASK (0x8000000U)
-#define CTIMER_MCR_MR3RL_SHIFT (27U)
-/*! MR3RL - Reload MR3 with the contents of the Match 3 Shadow Register when the TC is reset to zero
- * (either via a match event or a write to bit 1 of the TCR).
- */
-#define CTIMER_MCR_MR3RL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR3RL_SHIFT)) & CTIMER_MCR_MR3RL_MASK)
-/*! @} */
-
-/*! @name MR - Match Register . MR can be enabled through the MCR to reset the TC, stop both the TC and PC, and/or generate an interrupt every time MR matches the TC. */
-/*! @{ */
-#define CTIMER_MR_MATCH_MASK (0xFFFFFFFFU)
-#define CTIMER_MR_MATCH_SHIFT (0U)
-/*! MATCH - Timer counter match value.
- */
-#define CTIMER_MR_MATCH(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MR_MATCH_SHIFT)) & CTIMER_MR_MATCH_MASK)
-/*! @} */
-
-/* The count of CTIMER_MR */
-#define CTIMER_MR_COUNT (4U)
-
-/*! @name CCR - Capture Control Register. The CCR controls which edges of the capture inputs are used to load the Capture Registers and whether or not an interrupt is generated when a capture takes place. */
-/*! @{ */
-#define CTIMER_CCR_CAP0RE_MASK (0x1U)
-#define CTIMER_CCR_CAP0RE_SHIFT (0U)
-/*! CAP0RE - Rising edge of capture channel 0: a sequence of 0 then 1 causes CR0 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP0RE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP0RE_SHIFT)) & CTIMER_CCR_CAP0RE_MASK)
-#define CTIMER_CCR_CAP0FE_MASK (0x2U)
-#define CTIMER_CCR_CAP0FE_SHIFT (1U)
-/*! CAP0FE - Falling edge of capture channel 0: a sequence of 1 then 0 causes CR0 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP0FE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP0FE_SHIFT)) & CTIMER_CCR_CAP0FE_MASK)
-#define CTIMER_CCR_CAP0I_MASK (0x4U)
-#define CTIMER_CCR_CAP0I_SHIFT (2U)
-/*! CAP0I - Generate interrupt on channel 0 capture event: a CR0 load generates an interrupt.
- */
-#define CTIMER_CCR_CAP0I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP0I_SHIFT)) & CTIMER_CCR_CAP0I_MASK)
-#define CTIMER_CCR_CAP1RE_MASK (0x8U)
-#define CTIMER_CCR_CAP1RE_SHIFT (3U)
-/*! CAP1RE - Rising edge of capture channel 1: a sequence of 0 then 1 causes CR1 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP1RE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP1RE_SHIFT)) & CTIMER_CCR_CAP1RE_MASK)
-#define CTIMER_CCR_CAP1FE_MASK (0x10U)
-#define CTIMER_CCR_CAP1FE_SHIFT (4U)
-/*! CAP1FE - Falling edge of capture channel 1: a sequence of 1 then 0 causes CR1 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP1FE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP1FE_SHIFT)) & CTIMER_CCR_CAP1FE_MASK)
-#define CTIMER_CCR_CAP1I_MASK (0x20U)
-#define CTIMER_CCR_CAP1I_SHIFT (5U)
-/*! CAP1I - Generate interrupt on channel 1 capture event: a CR1 load generates an interrupt.
- */
-#define CTIMER_CCR_CAP1I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP1I_SHIFT)) & CTIMER_CCR_CAP1I_MASK)
-#define CTIMER_CCR_CAP2RE_MASK (0x40U)
-#define CTIMER_CCR_CAP2RE_SHIFT (6U)
-/*! CAP2RE - Rising edge of capture channel 2: a sequence of 0 then 1 causes CR2 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP2RE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP2RE_SHIFT)) & CTIMER_CCR_CAP2RE_MASK)
-#define CTIMER_CCR_CAP2FE_MASK (0x80U)
-#define CTIMER_CCR_CAP2FE_SHIFT (7U)
-/*! CAP2FE - Falling edge of capture channel 2: a sequence of 1 then 0 causes CR2 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP2FE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP2FE_SHIFT)) & CTIMER_CCR_CAP2FE_MASK)
-#define CTIMER_CCR_CAP2I_MASK (0x100U)
-#define CTIMER_CCR_CAP2I_SHIFT (8U)
-/*! CAP2I - Generate interrupt on channel 2 capture event: a CR2 load generates an interrupt.
- */
-#define CTIMER_CCR_CAP2I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP2I_SHIFT)) & CTIMER_CCR_CAP2I_MASK)
-#define CTIMER_CCR_CAP3RE_MASK (0x200U)
-#define CTIMER_CCR_CAP3RE_SHIFT (9U)
-/*! CAP3RE - Rising edge of capture channel 3: a sequence of 0 then 1 causes CR3 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP3RE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP3RE_SHIFT)) & CTIMER_CCR_CAP3RE_MASK)
-#define CTIMER_CCR_CAP3FE_MASK (0x400U)
-#define CTIMER_CCR_CAP3FE_SHIFT (10U)
-/*! CAP3FE - Falling edge of capture channel 3: a sequence of 1 then 0 causes CR3 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP3FE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP3FE_SHIFT)) & CTIMER_CCR_CAP3FE_MASK)
-#define CTIMER_CCR_CAP3I_MASK (0x800U)
-#define CTIMER_CCR_CAP3I_SHIFT (11U)
-/*! CAP3I - Generate interrupt on channel 3 capture event: a CR3 load generates an interrupt.
- */
-#define CTIMER_CCR_CAP3I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP3I_SHIFT)) & CTIMER_CCR_CAP3I_MASK)
-/*! @} */
-
-/*! @name CR - Capture Register . CR is loaded with the value of TC when there is an event on the CAPn. input. */
-/*! @{ */
-#define CTIMER_CR_CAP_MASK (0xFFFFFFFFU)
-#define CTIMER_CR_CAP_SHIFT (0U)
-/*! CAP - Timer counter capture value.
- */
-#define CTIMER_CR_CAP(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CR_CAP_SHIFT)) & CTIMER_CR_CAP_MASK)
-/*! @} */
-
-/* The count of CTIMER_CR */
-#define CTIMER_CR_COUNT (4U)
-
-/*! @name EMR - External Match Register. The EMR controls the match function and the external match pins. */
-/*! @{ */
-#define CTIMER_EMR_EM0_MASK (0x1U)
-#define CTIMER_EMR_EM0_SHIFT (0U)
-/*! EM0 - External Match 0. This bit reflects the state of output MAT0, whether or not this output
- * is connected to a pin. When a match occurs between the TC and MR0, this bit can either toggle,
- * go LOW, go HIGH, or do nothing, as selected by EMR[5:4]. This bit is driven to the MAT pins if
- * the match function is selected via IOCON. 0 = LOW. 1 = HIGH.
- */
-#define CTIMER_EMR_EM0(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EM0_SHIFT)) & CTIMER_EMR_EM0_MASK)
-#define CTIMER_EMR_EM1_MASK (0x2U)
-#define CTIMER_EMR_EM1_SHIFT (1U)
-/*! EM1 - External Match 1. This bit reflects the state of output MAT1, whether or not this output
- * is connected to a pin. When a match occurs between the TC and MR1, this bit can either toggle,
- * go LOW, go HIGH, or do nothing, as selected by EMR[7:6]. This bit is driven to the MAT pins if
- * the match function is selected via IOCON. 0 = LOW. 1 = HIGH.
- */
-#define CTIMER_EMR_EM1(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EM1_SHIFT)) & CTIMER_EMR_EM1_MASK)
-#define CTIMER_EMR_EM2_MASK (0x4U)
-#define CTIMER_EMR_EM2_SHIFT (2U)
-/*! EM2 - External Match 2. This bit reflects the state of output MAT2, whether or not this output
- * is connected to a pin. When a match occurs between the TC and MR2, this bit can either toggle,
- * go LOW, go HIGH, or do nothing, as selected by EMR[9:8]. This bit is driven to the MAT pins if
- * the match function is selected via IOCON. 0 = LOW. 1 = HIGH.
- */
-#define CTIMER_EMR_EM2(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EM2_SHIFT)) & CTIMER_EMR_EM2_MASK)
-#define CTIMER_EMR_EM3_MASK (0x8U)
-#define CTIMER_EMR_EM3_SHIFT (3U)
-/*! EM3 - External Match 3. This bit reflects the state of output MAT3, whether or not this output
- * is connected to a pin. When a match occurs between the TC and MR3, this bit can either toggle,
- * go LOW, go HIGH, or do nothing, as selected by MR[11:10]. This bit is driven to the MAT pins
- * if the match function is selected via IOCON. 0 = LOW. 1 = HIGH.
- */
-#define CTIMER_EMR_EM3(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EM3_SHIFT)) & CTIMER_EMR_EM3_MASK)
-#define CTIMER_EMR_EMC0_MASK (0x30U)
-#define CTIMER_EMR_EMC0_SHIFT (4U)
-/*! EMC0 - External Match Control 0. Determines the functionality of External Match 0.
- * 0b00..Do Nothing.
- * 0b01..Clear. Clear the corresponding External Match bit/output to 0 (MAT0 pin is LOW if pinned out).
- * 0b10..Set. Set the corresponding External Match bit/output to 1 (MAT0 pin is HIGH if pinned out).
- * 0b11..Toggle. Toggle the corresponding External Match bit/output.
- */
-#define CTIMER_EMR_EMC0(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EMC0_SHIFT)) & CTIMER_EMR_EMC0_MASK)
-#define CTIMER_EMR_EMC1_MASK (0xC0U)
-#define CTIMER_EMR_EMC1_SHIFT (6U)
-/*! EMC1 - External Match Control 1. Determines the functionality of External Match 1.
- * 0b00..Do Nothing.
- * 0b01..Clear. Clear the corresponding External Match bit/output to 0 (MAT1 pin is LOW if pinned out).
- * 0b10..Set. Set the corresponding External Match bit/output to 1 (MAT1 pin is HIGH if pinned out).
- * 0b11..Toggle. Toggle the corresponding External Match bit/output.
- */
-#define CTIMER_EMR_EMC1(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EMC1_SHIFT)) & CTIMER_EMR_EMC1_MASK)
-#define CTIMER_EMR_EMC2_MASK (0x300U)
-#define CTIMER_EMR_EMC2_SHIFT (8U)
-/*! EMC2 - External Match Control 2. Determines the functionality of External Match 2.
- * 0b00..Do Nothing.
- * 0b01..Clear. Clear the corresponding External Match bit/output to 0 (MAT2 pin is LOW if pinned out).
- * 0b10..Set. Set the corresponding External Match bit/output to 1 (MAT2 pin is HIGH if pinned out).
- * 0b11..Toggle. Toggle the corresponding External Match bit/output.
- */
-#define CTIMER_EMR_EMC2(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EMC2_SHIFT)) & CTIMER_EMR_EMC2_MASK)
-#define CTIMER_EMR_EMC3_MASK (0xC00U)
-#define CTIMER_EMR_EMC3_SHIFT (10U)
-/*! EMC3 - External Match Control 3. Determines the functionality of External Match 3.
- * 0b00..Do Nothing.
- * 0b01..Clear. Clear the corresponding External Match bit/output to 0 (MAT3 pin is LOW if pinned out).
- * 0b10..Set. Set the corresponding External Match bit/output to 1 (MAT3 pin is HIGH if pinned out).
- * 0b11..Toggle. Toggle the corresponding External Match bit/output.
- */
-#define CTIMER_EMR_EMC3(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EMC3_SHIFT)) & CTIMER_EMR_EMC3_MASK)
-/*! @} */
-
-/*! @name CTCR - Count Control Register. The CTCR selects between Timer and Counter mode, and in Counter mode selects the signal and edge(s) for counting. */
-/*! @{ */
-#define CTIMER_CTCR_CTMODE_MASK (0x3U)
-#define CTIMER_CTCR_CTMODE_SHIFT (0U)
-/*! CTMODE - Counter/Timer Mode This field selects which rising APB bus clock edges can increment
- * Timer's Prescale Counter (PC), or clear PC and increment Timer Counter (TC). Timer Mode: the TC
- * is incremented when the Prescale Counter matches the Prescale Register.
- * 0b00..Timer Mode. Incremented every rising APB bus clock edge.
- * 0b01..Counter Mode rising edge. TC is incremented on rising edges on the CAP input selected by bits 3:2.
- * 0b10..Counter Mode falling edge. TC is incremented on falling edges on the CAP input selected by bits 3:2.
- * 0b11..Counter Mode dual edge. TC is incremented on both edges on the CAP input selected by bits 3:2.
- */
-#define CTIMER_CTCR_CTMODE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CTCR_CTMODE_SHIFT)) & CTIMER_CTCR_CTMODE_MASK)
-#define CTIMER_CTCR_CINSEL_MASK (0xCU)
-#define CTIMER_CTCR_CINSEL_SHIFT (2U)
-/*! CINSEL - Count Input Select When bits 1:0 in this register are not 00, these bits select which
- * CAP pin is sampled for clocking. Note: If Counter mode is selected for a particular CAPn input
- * in the CTCR, the 3 bits for that input in the Capture Control Register (CCR) must be
- * programmed as 000. However, capture and/or interrupt can be selected for the other 3 CAPn inputs in the
- * same timer.
- * 0b00..Channel 0. CAPn.0 for CTIMERn
- * 0b01..Channel 1. CAPn.1 for CTIMERn
- * 0b10..Channel 2. CAPn.2 for CTIMERn
- * 0b11..Channel 3. CAPn.3 for CTIMERn
- */
-#define CTIMER_CTCR_CINSEL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CTCR_CINSEL_SHIFT)) & CTIMER_CTCR_CINSEL_MASK)
-#define CTIMER_CTCR_ENCC_MASK (0x10U)
-#define CTIMER_CTCR_ENCC_SHIFT (4U)
-/*! ENCC - Setting this bit to 1 enables clearing of the timer and the prescaler when the
- * capture-edge event specified in bits 7:5 occurs.
- */
-#define CTIMER_CTCR_ENCC(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CTCR_ENCC_SHIFT)) & CTIMER_CTCR_ENCC_MASK)
-#define CTIMER_CTCR_SELCC_MASK (0xE0U)
-#define CTIMER_CTCR_SELCC_SHIFT (5U)
-/*! SELCC - Edge select. When bit 4 is 1, these bits select which capture input edge will cause the
- * timer and prescaler to be cleared. These bits have no effect when bit 4 is low. Values 0x2 to
- * 0x3 and 0x6 to 0x7 are reserved.
- * 0b000..Channel 0 Rising Edge. Rising edge of the signal on capture channel 0 clears the timer (if bit 4 is set).
- * 0b001..Channel 0 Falling Edge. Falling edge of the signal on capture channel 0 clears the timer (if bit 4 is set).
- * 0b010..Channel 1 Rising Edge. Rising edge of the signal on capture channel 1 clears the timer (if bit 4 is set).
- * 0b011..Channel 1 Falling Edge. Falling edge of the signal on capture channel 1 clears the timer (if bit 4 is set).
- * 0b100..Channel 2 Rising Edge. Rising edge of the signal on capture channel 2 clears the timer (if bit 4 is set).
- * 0b101..Channel 2 Falling Edge. Falling edge of the signal on capture channel 2 clears the timer (if bit 4 is set).
- */
-#define CTIMER_CTCR_SELCC(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CTCR_SELCC_SHIFT)) & CTIMER_CTCR_SELCC_MASK)
-/*! @} */
-
-/*! @name PWMC - PWM Control Register. This register enables PWM mode for the external match pins. */
-/*! @{ */
-#define CTIMER_PWMC_PWMEN0_MASK (0x1U)
-#define CTIMER_PWMC_PWMEN0_SHIFT (0U)
-/*! PWMEN0 - PWM mode enable for channel0.
- * 0b0..Match. CTIMERn_MAT0 is controlled by EM0.
- * 0b1..PWM. PWM mode is enabled for CTIMERn_MAT0.
- */
-#define CTIMER_PWMC_PWMEN0(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PWMC_PWMEN0_SHIFT)) & CTIMER_PWMC_PWMEN0_MASK)
-#define CTIMER_PWMC_PWMEN1_MASK (0x2U)
-#define CTIMER_PWMC_PWMEN1_SHIFT (1U)
-/*! PWMEN1 - PWM mode enable for channel1.
- * 0b0..Match. CTIMERn_MAT01 is controlled by EM1.
- * 0b1..PWM. PWM mode is enabled for CTIMERn_MAT1.
- */
-#define CTIMER_PWMC_PWMEN1(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PWMC_PWMEN1_SHIFT)) & CTIMER_PWMC_PWMEN1_MASK)
-#define CTIMER_PWMC_PWMEN2_MASK (0x4U)
-#define CTIMER_PWMC_PWMEN2_SHIFT (2U)
-/*! PWMEN2 - PWM mode enable for channel2.
- * 0b0..Match. CTIMERn_MAT2 is controlled by EM2.
- * 0b1..PWM. PWM mode is enabled for CTIMERn_MAT2.
- */
-#define CTIMER_PWMC_PWMEN2(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PWMC_PWMEN2_SHIFT)) & CTIMER_PWMC_PWMEN2_MASK)
-#define CTIMER_PWMC_PWMEN3_MASK (0x8U)
-#define CTIMER_PWMC_PWMEN3_SHIFT (3U)
-/*! PWMEN3 - PWM mode enable for channel3. Note: It is recommended to use match channel 3 to set the PWM cycle.
- * 0b0..Match. CTIMERn_MAT3 is controlled by EM3.
- * 0b1..PWM. PWM mode is enabled for CT132Bn_MAT3.
- */
-#define CTIMER_PWMC_PWMEN3(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PWMC_PWMEN3_SHIFT)) & CTIMER_PWMC_PWMEN3_MASK)
-/*! @} */
-
-/*! @name MSR - Match Shadow Register */
-/*! @{ */
-#define CTIMER_MSR_SHADOW_MASK (0xFFFFFFFFU)
-#define CTIMER_MSR_SHADOW_SHIFT (0U)
-/*! SHADOW - Timer counter match shadow value.
- */
-#define CTIMER_MSR_SHADOW(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MSR_SHADOW_SHIFT)) & CTIMER_MSR_SHADOW_MASK)
-/*! @} */
-
-/* The count of CTIMER_MSR */
-#define CTIMER_MSR_COUNT (4U)
-
-
-/*!
- * @}
- */ /* end of group CTIMER_Register_Masks */
-
-
-/* CTIMER - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral CTIMER0 base address */
- #define CTIMER0_BASE (0x50008000u)
- /** Peripheral CTIMER0 base address */
- #define CTIMER0_BASE_NS (0x40008000u)
- /** Peripheral CTIMER0 base pointer */
- #define CTIMER0 ((CTIMER_Type *)CTIMER0_BASE)
- /** Peripheral CTIMER0 base pointer */
- #define CTIMER0_NS ((CTIMER_Type *)CTIMER0_BASE_NS)
- /** Peripheral CTIMER1 base address */
- #define CTIMER1_BASE (0x50009000u)
- /** Peripheral CTIMER1 base address */
- #define CTIMER1_BASE_NS (0x40009000u)
- /** Peripheral CTIMER1 base pointer */
- #define CTIMER1 ((CTIMER_Type *)CTIMER1_BASE)
- /** Peripheral CTIMER1 base pointer */
- #define CTIMER1_NS ((CTIMER_Type *)CTIMER1_BASE_NS)
- /** Peripheral CTIMER2 base address */
- #define CTIMER2_BASE (0x50028000u)
- /** Peripheral CTIMER2 base address */
- #define CTIMER2_BASE_NS (0x40028000u)
- /** Peripheral CTIMER2 base pointer */
- #define CTIMER2 ((CTIMER_Type *)CTIMER2_BASE)
- /** Peripheral CTIMER2 base pointer */
- #define CTIMER2_NS ((CTIMER_Type *)CTIMER2_BASE_NS)
- /** Peripheral CTIMER3 base address */
- #define CTIMER3_BASE (0x50029000u)
- /** Peripheral CTIMER3 base address */
- #define CTIMER3_BASE_NS (0x40029000u)
- /** Peripheral CTIMER3 base pointer */
- #define CTIMER3 ((CTIMER_Type *)CTIMER3_BASE)
- /** Peripheral CTIMER3 base pointer */
- #define CTIMER3_NS ((CTIMER_Type *)CTIMER3_BASE_NS)
- /** Peripheral CTIMER4 base address */
- #define CTIMER4_BASE (0x5002A000u)
- /** Peripheral CTIMER4 base address */
- #define CTIMER4_BASE_NS (0x4002A000u)
- /** Peripheral CTIMER4 base pointer */
- #define CTIMER4 ((CTIMER_Type *)CTIMER4_BASE)
- /** Peripheral CTIMER4 base pointer */
- #define CTIMER4_NS ((CTIMER_Type *)CTIMER4_BASE_NS)
- /** Array initializer of CTIMER peripheral base addresses */
- #define CTIMER_BASE_ADDRS { CTIMER0_BASE, CTIMER1_BASE, CTIMER2_BASE, CTIMER3_BASE, CTIMER4_BASE }
- /** Array initializer of CTIMER peripheral base pointers */
- #define CTIMER_BASE_PTRS { CTIMER0, CTIMER1, CTIMER2, CTIMER3, CTIMER4 }
- /** Array initializer of CTIMER peripheral base addresses */
- #define CTIMER_BASE_ADDRS_NS { CTIMER0_BASE_NS, CTIMER1_BASE_NS, CTIMER2_BASE_NS, CTIMER3_BASE_NS, CTIMER4_BASE_NS }
- /** Array initializer of CTIMER peripheral base pointers */
- #define CTIMER_BASE_PTRS_NS { CTIMER0_NS, CTIMER1_NS, CTIMER2_NS, CTIMER3_NS, CTIMER4_NS }
-#else
- /** Peripheral CTIMER0 base address */
- #define CTIMER0_BASE (0x40008000u)
- /** Peripheral CTIMER0 base pointer */
- #define CTIMER0 ((CTIMER_Type *)CTIMER0_BASE)
- /** Peripheral CTIMER1 base address */
- #define CTIMER1_BASE (0x40009000u)
- /** Peripheral CTIMER1 base pointer */
- #define CTIMER1 ((CTIMER_Type *)CTIMER1_BASE)
- /** Peripheral CTIMER2 base address */
- #define CTIMER2_BASE (0x40028000u)
- /** Peripheral CTIMER2 base pointer */
- #define CTIMER2 ((CTIMER_Type *)CTIMER2_BASE)
- /** Peripheral CTIMER3 base address */
- #define CTIMER3_BASE (0x40029000u)
- /** Peripheral CTIMER3 base pointer */
- #define CTIMER3 ((CTIMER_Type *)CTIMER3_BASE)
- /** Peripheral CTIMER4 base address */
- #define CTIMER4_BASE (0x4002A000u)
- /** Peripheral CTIMER4 base pointer */
- #define CTIMER4 ((CTIMER_Type *)CTIMER4_BASE)
- /** Array initializer of CTIMER peripheral base addresses */
- #define CTIMER_BASE_ADDRS { CTIMER0_BASE, CTIMER1_BASE, CTIMER2_BASE, CTIMER3_BASE, CTIMER4_BASE }
- /** Array initializer of CTIMER peripheral base pointers */
- #define CTIMER_BASE_PTRS { CTIMER0, CTIMER1, CTIMER2, CTIMER3, CTIMER4 }
-#endif
-/** Interrupt vectors for the CTIMER peripheral type */
-#define CTIMER_IRQS { CTIMER0_IRQn, CTIMER1_IRQn, CTIMER2_IRQn, CTIMER3_IRQn, CTIMER4_IRQn }
-
-/*!
- * @}
- */ /* end of group CTIMER_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- DBGMAILBOX Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup DBGMAILBOX_Peripheral_Access_Layer DBGMAILBOX Peripheral Access Layer
- * @{
- */
-
-/** DBGMAILBOX - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CSW; /**< CRC mode register, offset: 0x0 */
- __IO uint32_t REQUEST; /**< CRC seed register, offset: 0x4 */
- __IO uint32_t RETURN; /**< Return value from ROM., offset: 0x8 */
- uint8_t RESERVED_0[240];
- __I uint32_t ID; /**< Identification register, offset: 0xFC */
-} DBGMAILBOX_Type;
-
-/* ----------------------------------------------------------------------------
- -- DBGMAILBOX Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup DBGMAILBOX_Register_Masks DBGMAILBOX Register Masks
- * @{
- */
-
-/*! @name CSW - CRC mode register */
-/*! @{ */
-#define DBGMAILBOX_CSW_RESYNCH_REQ_MASK (0x1U)
-#define DBGMAILBOX_CSW_RESYNCH_REQ_SHIFT (0U)
-/*! RESYNCH_REQ - Debugger will set this bit to 1 to request a resynchronrisation
- */
-#define DBGMAILBOX_CSW_RESYNCH_REQ(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_CSW_RESYNCH_REQ_SHIFT)) & DBGMAILBOX_CSW_RESYNCH_REQ_MASK)
-#define DBGMAILBOX_CSW_REQ_PENDING_MASK (0x2U)
-#define DBGMAILBOX_CSW_REQ_PENDING_SHIFT (1U)
-/*! REQ_PENDING - Request is pending from debugger (i.e unread value in REQUEST)
- */
-#define DBGMAILBOX_CSW_REQ_PENDING(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_CSW_REQ_PENDING_SHIFT)) & DBGMAILBOX_CSW_REQ_PENDING_MASK)
-#define DBGMAILBOX_CSW_DBG_OR_ERR_MASK (0x4U)
-#define DBGMAILBOX_CSW_DBG_OR_ERR_SHIFT (2U)
-/*! DBG_OR_ERR - Debugger overrun error (previous REQUEST overwritten before being picked up by ROM)
- */
-#define DBGMAILBOX_CSW_DBG_OR_ERR(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_CSW_DBG_OR_ERR_SHIFT)) & DBGMAILBOX_CSW_DBG_OR_ERR_MASK)
-#define DBGMAILBOX_CSW_AHB_OR_ERR_MASK (0x8U)
-#define DBGMAILBOX_CSW_AHB_OR_ERR_SHIFT (3U)
-/*! AHB_OR_ERR - AHB overrun Error (Return value overwritten by ROM)
- */
-#define DBGMAILBOX_CSW_AHB_OR_ERR(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_CSW_AHB_OR_ERR_SHIFT)) & DBGMAILBOX_CSW_AHB_OR_ERR_MASK)
-#define DBGMAILBOX_CSW_SOFT_RESET_MASK (0x10U)
-#define DBGMAILBOX_CSW_SOFT_RESET_SHIFT (4U)
-/*! SOFT_RESET - Soft Reset for DM (write-only from AHB, not readable and selfclearing). A write to
- * this bit will cause a soft reset for DM.
- */
-#define DBGMAILBOX_CSW_SOFT_RESET(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_CSW_SOFT_RESET_SHIFT)) & DBGMAILBOX_CSW_SOFT_RESET_MASK)
-#define DBGMAILBOX_CSW_CHIP_RESET_REQ_MASK (0x20U)
-#define DBGMAILBOX_CSW_CHIP_RESET_REQ_SHIFT (5U)
-/*! CHIP_RESET_REQ - Write only bit. Once written will cause the chip to reset (note that the DM is
- * not reset by this reset as it is only resettable by a SOFT reset or a POR/BOD event)
- */
-#define DBGMAILBOX_CSW_CHIP_RESET_REQ(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_CSW_CHIP_RESET_REQ_SHIFT)) & DBGMAILBOX_CSW_CHIP_RESET_REQ_MASK)
-/*! @} */
-
-/*! @name REQUEST - CRC seed register */
-/*! @{ */
-#define DBGMAILBOX_REQUEST_REQ_MASK (0xFFFFFFFFU)
-#define DBGMAILBOX_REQUEST_REQ_SHIFT (0U)
-/*! REQ - Request Value
- */
-#define DBGMAILBOX_REQUEST_REQ(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_REQUEST_REQ_SHIFT)) & DBGMAILBOX_REQUEST_REQ_MASK)
-/*! @} */
-
-/*! @name RETURN - Return value from ROM. */
-/*! @{ */
-#define DBGMAILBOX_RETURN_RET_MASK (0xFFFFFFFFU)
-#define DBGMAILBOX_RETURN_RET_SHIFT (0U)
-/*! RET - The Return value from ROM.
- */
-#define DBGMAILBOX_RETURN_RET(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_RETURN_RET_SHIFT)) & DBGMAILBOX_RETURN_RET_MASK)
-/*! @} */
-
-/*! @name ID - Identification register */
-/*! @{ */
-#define DBGMAILBOX_ID_ID_MASK (0xFFFFFFFFU)
-#define DBGMAILBOX_ID_ID_SHIFT (0U)
-/*! ID - Identification value.
- */
-#define DBGMAILBOX_ID_ID(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_ID_ID_SHIFT)) & DBGMAILBOX_ID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group DBGMAILBOX_Register_Masks */
-
-
-/* DBGMAILBOX - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral DBGMAILBOX base address */
- #define DBGMAILBOX_BASE (0x5009C000u)
- /** Peripheral DBGMAILBOX base address */
- #define DBGMAILBOX_BASE_NS (0x4009C000u)
- /** Peripheral DBGMAILBOX base pointer */
- #define DBGMAILBOX ((DBGMAILBOX_Type *)DBGMAILBOX_BASE)
- /** Peripheral DBGMAILBOX base pointer */
- #define DBGMAILBOX_NS ((DBGMAILBOX_Type *)DBGMAILBOX_BASE_NS)
- /** Array initializer of DBGMAILBOX peripheral base addresses */
- #define DBGMAILBOX_BASE_ADDRS { DBGMAILBOX_BASE }
- /** Array initializer of DBGMAILBOX peripheral base pointers */
- #define DBGMAILBOX_BASE_PTRS { DBGMAILBOX }
- /** Array initializer of DBGMAILBOX peripheral base addresses */
- #define DBGMAILBOX_BASE_ADDRS_NS { DBGMAILBOX_BASE_NS }
- /** Array initializer of DBGMAILBOX peripheral base pointers */
- #define DBGMAILBOX_BASE_PTRS_NS { DBGMAILBOX_NS }
-#else
- /** Peripheral DBGMAILBOX base address */
- #define DBGMAILBOX_BASE (0x4009C000u)
- /** Peripheral DBGMAILBOX base pointer */
- #define DBGMAILBOX ((DBGMAILBOX_Type *)DBGMAILBOX_BASE)
- /** Array initializer of DBGMAILBOX peripheral base addresses */
- #define DBGMAILBOX_BASE_ADDRS { DBGMAILBOX_BASE }
- /** Array initializer of DBGMAILBOX peripheral base pointers */
- #define DBGMAILBOX_BASE_PTRS { DBGMAILBOX }
-#endif
-
-/*!
- * @}
- */ /* end of group DBGMAILBOX_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- DMA Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup DMA_Peripheral_Access_Layer DMA Peripheral Access Layer
- * @{
- */
-
-/** DMA - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< DMA control., offset: 0x0 */
- __I uint32_t INTSTAT; /**< Interrupt status., offset: 0x4 */
- __IO uint32_t SRAMBASE; /**< SRAM address of the channel configuration table., offset: 0x8 */
- uint8_t RESERVED_0[20];
- struct { /* offset: 0x20, array step: 0x5C */
- __IO uint32_t ENABLESET; /**< Channel Enable read and Set for all DMA channels., array offset: 0x20, array step: 0x5C */
- uint8_t RESERVED_0[4];
- __O uint32_t ENABLECLR; /**< Channel Enable Clear for all DMA channels., array offset: 0x28, array step: 0x5C */
- uint8_t RESERVED_1[4];
- __I uint32_t ACTIVE; /**< Channel Active status for all DMA channels., array offset: 0x30, array step: 0x5C */
- uint8_t RESERVED_2[4];
- __I uint32_t BUSY; /**< Channel Busy status for all DMA channels., array offset: 0x38, array step: 0x5C */
- uint8_t RESERVED_3[4];
- __IO uint32_t ERRINT; /**< Error Interrupt status for all DMA channels., array offset: 0x40, array step: 0x5C */
- uint8_t RESERVED_4[4];
- __IO uint32_t INTENSET; /**< Interrupt Enable read and Set for all DMA channels., array offset: 0x48, array step: 0x5C */
- uint8_t RESERVED_5[4];
- __O uint32_t INTENCLR; /**< Interrupt Enable Clear for all DMA channels., array offset: 0x50, array step: 0x5C */
- uint8_t RESERVED_6[4];
- __IO uint32_t INTA; /**< Interrupt A status for all DMA channels., array offset: 0x58, array step: 0x5C */
- uint8_t RESERVED_7[4];
- __IO uint32_t INTB; /**< Interrupt B status for all DMA channels., array offset: 0x60, array step: 0x5C */
- uint8_t RESERVED_8[4];
- __O uint32_t SETVALID; /**< Set ValidPending control bits for all DMA channels., array offset: 0x68, array step: 0x5C */
- uint8_t RESERVED_9[4];
- __O uint32_t SETTRIG; /**< Set Trigger control bits for all DMA channels., array offset: 0x70, array step: 0x5C */
- uint8_t RESERVED_10[4];
- __O uint32_t ABORT; /**< Channel Abort control for all DMA channels., array offset: 0x78, array step: 0x5C */
- } COMMON[1];
- uint8_t RESERVED_1[900];
- struct { /* offset: 0x400, array step: 0x10 */
- __IO uint32_t CFG; /**< Configuration register for DMA channel ., array offset: 0x400, array step: 0x10 */
- __I uint32_t CTLSTAT; /**< Control and status register for DMA channel ., array offset: 0x404, array step: 0x10 */
- __IO uint32_t XFERCFG; /**< Transfer configuration register for DMA channel ., array offset: 0x408, array step: 0x10 */
- uint8_t RESERVED_0[4];
- } CHANNEL[23];
-} DMA_Type;
-
-/* ----------------------------------------------------------------------------
- -- DMA Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup DMA_Register_Masks DMA Register Masks
- * @{
- */
-
-/*! @name CTRL - DMA control. */
-/*! @{ */
-#define DMA_CTRL_ENABLE_MASK (0x1U)
-#define DMA_CTRL_ENABLE_SHIFT (0U)
-/*! ENABLE - DMA controller master enable.
- * 0b0..Disabled. The DMA controller is disabled. This clears any triggers that were asserted at the point when
- * disabled, but does not prevent re-triggering when the DMA controller is re-enabled.
- * 0b1..Enabled. The DMA controller is enabled.
- */
-#define DMA_CTRL_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << DMA_CTRL_ENABLE_SHIFT)) & DMA_CTRL_ENABLE_MASK)
-/*! @} */
-
-/*! @name INTSTAT - Interrupt status. */
-/*! @{ */
-#define DMA_INTSTAT_ACTIVEINT_MASK (0x2U)
-#define DMA_INTSTAT_ACTIVEINT_SHIFT (1U)
-/*! ACTIVEINT - Summarizes whether any enabled interrupts (other than error interrupts) are pending.
- * 0b0..Not pending. No enabled interrupts are pending.
- * 0b1..Pending. At least one enabled interrupt is pending.
- */
-#define DMA_INTSTAT_ACTIVEINT(x) (((uint32_t)(((uint32_t)(x)) << DMA_INTSTAT_ACTIVEINT_SHIFT)) & DMA_INTSTAT_ACTIVEINT_MASK)
-#define DMA_INTSTAT_ACTIVEERRINT_MASK (0x4U)
-#define DMA_INTSTAT_ACTIVEERRINT_SHIFT (2U)
-/*! ACTIVEERRINT - Summarizes whether any error interrupts are pending.
- * 0b0..Not pending. No error interrupts are pending.
- * 0b1..Pending. At least one error interrupt is pending.
- */
-#define DMA_INTSTAT_ACTIVEERRINT(x) (((uint32_t)(((uint32_t)(x)) << DMA_INTSTAT_ACTIVEERRINT_SHIFT)) & DMA_INTSTAT_ACTIVEERRINT_MASK)
-/*! @} */
-
-/*! @name SRAMBASE - SRAM address of the channel configuration table. */
-/*! @{ */
-#define DMA_SRAMBASE_OFFSET_MASK (0xFFFFFE00U)
-#define DMA_SRAMBASE_OFFSET_SHIFT (9U)
-/*! OFFSET - Address bits 31:9 of the beginning of the DMA descriptor table. For 18 channels, the
- * table must begin on a 512 byte boundary.
- */
-#define DMA_SRAMBASE_OFFSET(x) (((uint32_t)(((uint32_t)(x)) << DMA_SRAMBASE_OFFSET_SHIFT)) & DMA_SRAMBASE_OFFSET_MASK)
-/*! @} */
-
-/*! @name COMMON_ENABLESET - Channel Enable read and Set for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_ENABLESET_ENA_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_ENABLESET_ENA_SHIFT (0U)
-/*! ENA - Enable for DMA channels. Bit n enables or disables DMA channel n. The number of bits =
- * number of DMA channels in this device. Other bits are reserved. 0 = disabled. 1 = enabled.
- */
-#define DMA_COMMON_ENABLESET_ENA(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ENABLESET_ENA_SHIFT)) & DMA_COMMON_ENABLESET_ENA_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_ENABLESET */
-#define DMA_COMMON_ENABLESET_COUNT (1U)
-
-/*! @name COMMON_ENABLECLR - Channel Enable Clear for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_ENABLECLR_CLR_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_ENABLECLR_CLR_SHIFT (0U)
-/*! CLR - Writing ones to this register clears the corresponding bits in ENABLESET0. Bit n clears
- * the channel enable bit n. The number of bits = number of DMA channels in this device. Other bits
- * are reserved.
- */
-#define DMA_COMMON_ENABLECLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ENABLECLR_CLR_SHIFT)) & DMA_COMMON_ENABLECLR_CLR_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_ENABLECLR */
-#define DMA_COMMON_ENABLECLR_COUNT (1U)
-
-/*! @name COMMON_ACTIVE - Channel Active status for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_ACTIVE_ACT_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_ACTIVE_ACT_SHIFT (0U)
-/*! ACT - Active flag for DMA channel n. Bit n corresponds to DMA channel n. The number of bits =
- * number of DMA channels in this device. Other bits are reserved. 0 = not active. 1 = active.
- */
-#define DMA_COMMON_ACTIVE_ACT(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ACTIVE_ACT_SHIFT)) & DMA_COMMON_ACTIVE_ACT_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_ACTIVE */
-#define DMA_COMMON_ACTIVE_COUNT (1U)
-
-/*! @name COMMON_BUSY - Channel Busy status for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_BUSY_BSY_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_BUSY_BSY_SHIFT (0U)
-/*! BSY - Busy flag for DMA channel n. Bit n corresponds to DMA channel n. The number of bits =
- * number of DMA channels in this device. Other bits are reserved. 0 = not busy. 1 = busy.
- */
-#define DMA_COMMON_BUSY_BSY(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_BUSY_BSY_SHIFT)) & DMA_COMMON_BUSY_BSY_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_BUSY */
-#define DMA_COMMON_BUSY_COUNT (1U)
-
-/*! @name COMMON_ERRINT - Error Interrupt status for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_ERRINT_ERR_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_ERRINT_ERR_SHIFT (0U)
-/*! ERR - Error Interrupt flag for DMA channel n. Bit n corresponds to DMA channel n. The number of
- * bits = number of DMA channels in this device. Other bits are reserved. 0 = error interrupt is
- * not active. 1 = error interrupt is active.
- */
-#define DMA_COMMON_ERRINT_ERR(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ERRINT_ERR_SHIFT)) & DMA_COMMON_ERRINT_ERR_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_ERRINT */
-#define DMA_COMMON_ERRINT_COUNT (1U)
-
-/*! @name COMMON_INTENSET - Interrupt Enable read and Set for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_INTENSET_INTEN_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_INTENSET_INTEN_SHIFT (0U)
-/*! INTEN - Interrupt Enable read and set for DMA channel n. Bit n corresponds to DMA channel n. The
- * number of bits = number of DMA channels in this device. Other bits are reserved. 0 =
- * interrupt for DMA channel is disabled. 1 = interrupt for DMA channel is enabled.
- */
-#define DMA_COMMON_INTENSET_INTEN(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_INTENSET_INTEN_SHIFT)) & DMA_COMMON_INTENSET_INTEN_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_INTENSET */
-#define DMA_COMMON_INTENSET_COUNT (1U)
-
-/*! @name COMMON_INTENCLR - Interrupt Enable Clear for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_INTENCLR_CLR_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_INTENCLR_CLR_SHIFT (0U)
-/*! CLR - Writing ones to this register clears corresponding bits in the INTENSET0. Bit n
- * corresponds to DMA channel n. The number of bits = number of DMA channels in this device. Other bits are
- * reserved.
- */
-#define DMA_COMMON_INTENCLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_INTENCLR_CLR_SHIFT)) & DMA_COMMON_INTENCLR_CLR_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_INTENCLR */
-#define DMA_COMMON_INTENCLR_COUNT (1U)
-
-/*! @name COMMON_INTA - Interrupt A status for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_INTA_IA_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_INTA_IA_SHIFT (0U)
-/*! IA - Interrupt A status for DMA channel n. Bit n corresponds to DMA channel n. The number of
- * bits = number of DMA channels in this device. Other bits are reserved. 0 = the DMA channel
- * interrupt A is not active. 1 = the DMA channel interrupt A is active.
- */
-#define DMA_COMMON_INTA_IA(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_INTA_IA_SHIFT)) & DMA_COMMON_INTA_IA_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_INTA */
-#define DMA_COMMON_INTA_COUNT (1U)
-
-/*! @name COMMON_INTB - Interrupt B status for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_INTB_IB_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_INTB_IB_SHIFT (0U)
-/*! IB - Interrupt B status for DMA channel n. Bit n corresponds to DMA channel n. The number of
- * bits = number of DMA channels in this device. Other bits are reserved. 0 = the DMA channel
- * interrupt B is not active. 1 = the DMA channel interrupt B is active.
- */
-#define DMA_COMMON_INTB_IB(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_INTB_IB_SHIFT)) & DMA_COMMON_INTB_IB_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_INTB */
-#define DMA_COMMON_INTB_COUNT (1U)
-
-/*! @name COMMON_SETVALID - Set ValidPending control bits for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_SETVALID_SV_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_SETVALID_SV_SHIFT (0U)
-/*! SV - SETVALID control for DMA channel n. Bit n corresponds to DMA channel n. The number of bits
- * = number of DMA channels in this device. Other bits are reserved. 0 = no effect. 1 = sets the
- * VALIDPENDING control bit for DMA channel n
- */
-#define DMA_COMMON_SETVALID_SV(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_SETVALID_SV_SHIFT)) & DMA_COMMON_SETVALID_SV_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_SETVALID */
-#define DMA_COMMON_SETVALID_COUNT (1U)
-
-/*! @name COMMON_SETTRIG - Set Trigger control bits for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_SETTRIG_TRIG_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_SETTRIG_TRIG_SHIFT (0U)
-/*! TRIG - Set Trigger control bit for DMA channel 0. Bit n corresponds to DMA channel n. The number
- * of bits = number of DMA channels in this device. Other bits are reserved. 0 = no effect. 1 =
- * sets the TRIG bit for DMA channel n.
- */
-#define DMA_COMMON_SETTRIG_TRIG(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_SETTRIG_TRIG_SHIFT)) & DMA_COMMON_SETTRIG_TRIG_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_SETTRIG */
-#define DMA_COMMON_SETTRIG_COUNT (1U)
-
-/*! @name COMMON_ABORT - Channel Abort control for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_ABORT_ABORTCTRL_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_ABORT_ABORTCTRL_SHIFT (0U)
-/*! ABORTCTRL - Abort control for DMA channel 0. Bit n corresponds to DMA channel n. 0 = no effect.
- * 1 = aborts DMA operations on channel n.
- */
-#define DMA_COMMON_ABORT_ABORTCTRL(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ABORT_ABORTCTRL_SHIFT)) & DMA_COMMON_ABORT_ABORTCTRL_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_ABORT */
-#define DMA_COMMON_ABORT_COUNT (1U)
-
-/*! @name CHANNEL_CFG - Configuration register for DMA channel . */
-/*! @{ */
-#define DMA_CHANNEL_CFG_PERIPHREQEN_MASK (0x1U)
-#define DMA_CHANNEL_CFG_PERIPHREQEN_SHIFT (0U)
-/*! PERIPHREQEN - Peripheral request Enable. If a DMA channel is used to perform a memory-to-memory
- * move, any peripheral DMA request associated with that channel can be disabled to prevent any
- * interaction between the peripheral and the DMA controller.
- * 0b0..Disabled. Peripheral DMA requests are disabled.
- * 0b1..Enabled. Peripheral DMA requests are enabled.
- */
-#define DMA_CHANNEL_CFG_PERIPHREQEN(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_PERIPHREQEN_SHIFT)) & DMA_CHANNEL_CFG_PERIPHREQEN_MASK)
-#define DMA_CHANNEL_CFG_HWTRIGEN_MASK (0x2U)
-#define DMA_CHANNEL_CFG_HWTRIGEN_SHIFT (1U)
-/*! HWTRIGEN - Hardware Triggering Enable for this channel.
- * 0b0..Disabled. Hardware triggering is not used.
- * 0b1..Enabled. Use hardware triggering.
- */
-#define DMA_CHANNEL_CFG_HWTRIGEN(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_HWTRIGEN_SHIFT)) & DMA_CHANNEL_CFG_HWTRIGEN_MASK)
-#define DMA_CHANNEL_CFG_TRIGPOL_MASK (0x10U)
-#define DMA_CHANNEL_CFG_TRIGPOL_SHIFT (4U)
-/*! TRIGPOL - Trigger Polarity. Selects the polarity of a hardware trigger for this channel.
- * 0b0..Active low - falling edge. Hardware trigger is active low or falling edge triggered, based on TRIGTYPE.
- * 0b1..Active high - rising edge. Hardware trigger is active high or rising edge triggered, based on TRIGTYPE.
- */
-#define DMA_CHANNEL_CFG_TRIGPOL(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_TRIGPOL_SHIFT)) & DMA_CHANNEL_CFG_TRIGPOL_MASK)
-#define DMA_CHANNEL_CFG_TRIGTYPE_MASK (0x20U)
-#define DMA_CHANNEL_CFG_TRIGTYPE_SHIFT (5U)
-/*! TRIGTYPE - Trigger Type. Selects hardware trigger as edge triggered or level triggered.
- * 0b0..Edge. Hardware trigger is edge triggered. Transfers will be initiated and completed, as specified for a single trigger.
- * 0b1..Level. Hardware trigger is level triggered. Note that when level triggering without burst (BURSTPOWER =
- * 0) is selected, only hardware triggers should be used on that channel. Transfers continue as long as the
- * trigger level is asserted. Once the trigger is de-asserted, the transfer will be paused until the trigger
- * is, again, asserted. However, the transfer will not be paused until any remaining transfers within the
- * current BURSTPOWER length are completed.
- */
-#define DMA_CHANNEL_CFG_TRIGTYPE(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_TRIGTYPE_SHIFT)) & DMA_CHANNEL_CFG_TRIGTYPE_MASK)
-#define DMA_CHANNEL_CFG_TRIGBURST_MASK (0x40U)
-#define DMA_CHANNEL_CFG_TRIGBURST_SHIFT (6U)
-/*! TRIGBURST - Trigger Burst. Selects whether hardware triggers cause a single or burst transfer.
- * 0b0..Single transfer. Hardware trigger causes a single transfer.
- * 0b1..Burst transfer. When the trigger for this channel is set to edge triggered, a hardware trigger causes a
- * burst transfer, as defined by BURSTPOWER. When the trigger for this channel is set to level triggered, a
- * hardware trigger causes transfers to continue as long as the trigger is asserted, unless the transfer is
- * complete.
- */
-#define DMA_CHANNEL_CFG_TRIGBURST(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_TRIGBURST_SHIFT)) & DMA_CHANNEL_CFG_TRIGBURST_MASK)
-#define DMA_CHANNEL_CFG_BURSTPOWER_MASK (0xF00U)
-#define DMA_CHANNEL_CFG_BURSTPOWER_SHIFT (8U)
-/*! BURSTPOWER - Burst Power is used in two ways. It always selects the address wrap size when
- * SRCBURSTWRAP and/or DSTBURSTWRAP modes are selected (see descriptions elsewhere in this register).
- * When the TRIGBURST field elsewhere in this register = 1, Burst Power selects how many
- * transfers are performed for each DMA trigger. This can be used, for example, with peripherals that
- * contain a FIFO that can initiate a DMA operation when the FIFO reaches a certain level. 0000:
- * Burst size = 1 (20). 0001: Burst size = 2 (21). 0010: Burst size = 4 (22). 1010: Burst size =
- * 1024 (210). This corresponds to the maximum supported transfer count. others: not supported. The
- * total transfer length as defined in the XFERCOUNT bits in the XFERCFG register must be an even
- * multiple of the burst size.
- */
-#define DMA_CHANNEL_CFG_BURSTPOWER(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_BURSTPOWER_SHIFT)) & DMA_CHANNEL_CFG_BURSTPOWER_MASK)
-#define DMA_CHANNEL_CFG_SRCBURSTWRAP_MASK (0x4000U)
-#define DMA_CHANNEL_CFG_SRCBURSTWRAP_SHIFT (14U)
-/*! SRCBURSTWRAP - Source Burst Wrap. When enabled, the source data address for the DMA is
- * 'wrapped', meaning that the source address range for each burst will be the same. As an example, this
- * could be used to read several sequential registers from a peripheral for each DMA burst,
- * reading the same registers again for each burst.
- * 0b0..Disabled. Source burst wrapping is not enabled for this DMA channel.
- * 0b1..Enabled. Source burst wrapping is enabled for this DMA channel.
- */
-#define DMA_CHANNEL_CFG_SRCBURSTWRAP(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_SRCBURSTWRAP_SHIFT)) & DMA_CHANNEL_CFG_SRCBURSTWRAP_MASK)
-#define DMA_CHANNEL_CFG_DSTBURSTWRAP_MASK (0x8000U)
-#define DMA_CHANNEL_CFG_DSTBURSTWRAP_SHIFT (15U)
-/*! DSTBURSTWRAP - Destination Burst Wrap. When enabled, the destination data address for the DMA is
- * 'wrapped', meaning that the destination address range for each burst will be the same. As an
- * example, this could be used to write several sequential registers to a peripheral for each DMA
- * burst, writing the same registers again for each burst.
- * 0b0..Disabled. Destination burst wrapping is not enabled for this DMA channel.
- * 0b1..Enabled. Destination burst wrapping is enabled for this DMA channel.
- */
-#define DMA_CHANNEL_CFG_DSTBURSTWRAP(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_DSTBURSTWRAP_SHIFT)) & DMA_CHANNEL_CFG_DSTBURSTWRAP_MASK)
-#define DMA_CHANNEL_CFG_CHPRIORITY_MASK (0x70000U)
-#define DMA_CHANNEL_CFG_CHPRIORITY_SHIFT (16U)
-/*! CHPRIORITY - Priority of this channel when multiple DMA requests are pending. Eight priority
- * levels are supported: 0x0 = highest priority. 0x7 = lowest priority.
- */
-#define DMA_CHANNEL_CFG_CHPRIORITY(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_CHPRIORITY_SHIFT)) & DMA_CHANNEL_CFG_CHPRIORITY_MASK)
-/*! @} */
-
-/* The count of DMA_CHANNEL_CFG */
-#define DMA_CHANNEL_CFG_COUNT (23U)
-
-/*! @name CHANNEL_CTLSTAT - Control and status register for DMA channel . */
-/*! @{ */
-#define DMA_CHANNEL_CTLSTAT_VALIDPENDING_MASK (0x1U)
-#define DMA_CHANNEL_CTLSTAT_VALIDPENDING_SHIFT (0U)
-/*! VALIDPENDING - Valid pending flag for this channel. This bit is set when a 1 is written to the
- * corresponding bit in the related SETVALID register when CFGVALID = 1 for the same channel.
- * 0b0..No effect. No effect on DMA operation.
- * 0b1..Valid pending.
- */
-#define DMA_CHANNEL_CTLSTAT_VALIDPENDING(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CTLSTAT_VALIDPENDING_SHIFT)) & DMA_CHANNEL_CTLSTAT_VALIDPENDING_MASK)
-#define DMA_CHANNEL_CTLSTAT_TRIG_MASK (0x4U)
-#define DMA_CHANNEL_CTLSTAT_TRIG_SHIFT (2U)
-/*! TRIG - Trigger flag. Indicates that the trigger for this channel is currently set. This bit is
- * cleared at the end of an entire transfer or upon reload when CLRTRIG = 1.
- * 0b0..Not triggered. The trigger for this DMA channel is not set. DMA operations will not be carried out.
- * 0b1..Triggered. The trigger for this DMA channel is set. DMA operations will be carried out.
- */
-#define DMA_CHANNEL_CTLSTAT_TRIG(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CTLSTAT_TRIG_SHIFT)) & DMA_CHANNEL_CTLSTAT_TRIG_MASK)
-/*! @} */
-
-/* The count of DMA_CHANNEL_CTLSTAT */
-#define DMA_CHANNEL_CTLSTAT_COUNT (23U)
-
-/*! @name CHANNEL_XFERCFG - Transfer configuration register for DMA channel . */
-/*! @{ */
-#define DMA_CHANNEL_XFERCFG_CFGVALID_MASK (0x1U)
-#define DMA_CHANNEL_XFERCFG_CFGVALID_SHIFT (0U)
-/*! CFGVALID - Configuration Valid flag. This bit indicates whether the current channel descriptor
- * is valid and can potentially be acted upon, if all other activation criteria are fulfilled.
- * 0b0..Not valid. The channel descriptor is not considered valid until validated by an associated SETVALID0 setting.
- * 0b1..Valid. The current channel descriptor is considered valid.
- */
-#define DMA_CHANNEL_XFERCFG_CFGVALID(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_CFGVALID_SHIFT)) & DMA_CHANNEL_XFERCFG_CFGVALID_MASK)
-#define DMA_CHANNEL_XFERCFG_RELOAD_MASK (0x2U)
-#define DMA_CHANNEL_XFERCFG_RELOAD_SHIFT (1U)
-/*! RELOAD - Indicates whether the channel's control structure will be reloaded when the current
- * descriptor is exhausted. Reloading allows ping-pong and linked transfers.
- * 0b0..Disabled. Do not reload the channels' control structure when the current descriptor is exhausted.
- * 0b1..Enabled. Reload the channels' control structure when the current descriptor is exhausted.
- */
-#define DMA_CHANNEL_XFERCFG_RELOAD(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_RELOAD_SHIFT)) & DMA_CHANNEL_XFERCFG_RELOAD_MASK)
-#define DMA_CHANNEL_XFERCFG_SWTRIG_MASK (0x4U)
-#define DMA_CHANNEL_XFERCFG_SWTRIG_SHIFT (2U)
-/*! SWTRIG - Software Trigger.
- * 0b0..Not set. When written by software, the trigger for this channel is not set. A new trigger, as defined by
- * the HWTRIGEN, TRIGPOL, and TRIGTYPE will be needed to start the channel.
- * 0b1..Set. When written by software, the trigger for this channel is set immediately. This feature should not
- * be used with level triggering when TRIGBURST = 0.
- */
-#define DMA_CHANNEL_XFERCFG_SWTRIG(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_SWTRIG_SHIFT)) & DMA_CHANNEL_XFERCFG_SWTRIG_MASK)
-#define DMA_CHANNEL_XFERCFG_CLRTRIG_MASK (0x8U)
-#define DMA_CHANNEL_XFERCFG_CLRTRIG_SHIFT (3U)
-/*! CLRTRIG - Clear Trigger.
- * 0b0..Not cleared. The trigger is not cleared when this descriptor is exhausted. If there is a reload, the next descriptor will be started.
- * 0b1..Cleared. The trigger is cleared when this descriptor is exhausted
- */
-#define DMA_CHANNEL_XFERCFG_CLRTRIG(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_CLRTRIG_SHIFT)) & DMA_CHANNEL_XFERCFG_CLRTRIG_MASK)
-#define DMA_CHANNEL_XFERCFG_SETINTA_MASK (0x10U)
-#define DMA_CHANNEL_XFERCFG_SETINTA_SHIFT (4U)
-/*! SETINTA - Set Interrupt flag A for this channel. There is no hardware distinction between
- * interrupt A and B. They can be used by software to assist with more complex descriptor usage. By
- * convention, interrupt A may be used when only one interrupt flag is needed.
- * 0b0..No effect.
- * 0b1..Set. The INTA flag for this channel will be set when the current descriptor is exhausted.
- */
-#define DMA_CHANNEL_XFERCFG_SETINTA(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_SETINTA_SHIFT)) & DMA_CHANNEL_XFERCFG_SETINTA_MASK)
-#define DMA_CHANNEL_XFERCFG_SETINTB_MASK (0x20U)
-#define DMA_CHANNEL_XFERCFG_SETINTB_SHIFT (5U)
-/*! SETINTB - Set Interrupt flag B for this channel. There is no hardware distinction between
- * interrupt A and B. They can be used by software to assist with more complex descriptor usage. By
- * convention, interrupt A may be used when only one interrupt flag is needed.
- * 0b0..No effect.
- * 0b1..Set. The INTB flag for this channel will be set when the current descriptor is exhausted.
- */
-#define DMA_CHANNEL_XFERCFG_SETINTB(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_SETINTB_SHIFT)) & DMA_CHANNEL_XFERCFG_SETINTB_MASK)
-#define DMA_CHANNEL_XFERCFG_WIDTH_MASK (0x300U)
-#define DMA_CHANNEL_XFERCFG_WIDTH_SHIFT (8U)
-/*! WIDTH - Transfer width used for this DMA channel.
- * 0b00..8-bit. 8-bit transfers are performed (8-bit source reads and destination writes).
- * 0b01..16-bit. 6-bit transfers are performed (16-bit source reads and destination writes).
- * 0b10..32-bit. 32-bit transfers are performed (32-bit source reads and destination writes).
- * 0b11..Reserved. Reserved setting, do not use.
- */
-#define DMA_CHANNEL_XFERCFG_WIDTH(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_WIDTH_SHIFT)) & DMA_CHANNEL_XFERCFG_WIDTH_MASK)
-#define DMA_CHANNEL_XFERCFG_SRCINC_MASK (0x3000U)
-#define DMA_CHANNEL_XFERCFG_SRCINC_SHIFT (12U)
-/*! SRCINC - Determines whether the source address is incremented for each DMA transfer.
- * 0b00..No increment. The source address is not incremented for each transfer. This is the usual case when the source is a peripheral device.
- * 0b01..1 x width. The source address is incremented by the amount specified by Width for each transfer. This is
- * the usual case when the source is memory.
- * 0b10..2 x width. The source address is incremented by 2 times the amount specified by Width for each transfer.
- * 0b11..4 x width. The source address is incremented by 4 times the amount specified by Width for each transfer.
- */
-#define DMA_CHANNEL_XFERCFG_SRCINC(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_SRCINC_SHIFT)) & DMA_CHANNEL_XFERCFG_SRCINC_MASK)
-#define DMA_CHANNEL_XFERCFG_DSTINC_MASK (0xC000U)
-#define DMA_CHANNEL_XFERCFG_DSTINC_SHIFT (14U)
-/*! DSTINC - Determines whether the destination address is incremented for each DMA transfer.
- * 0b00..No increment. The destination address is not incremented for each transfer. This is the usual case when
- * the destination is a peripheral device.
- * 0b01..1 x width. The destination address is incremented by the amount specified by Width for each transfer.
- * This is the usual case when the destination is memory.
- * 0b10..2 x width. The destination address is incremented by 2 times the amount specified by Width for each transfer.
- * 0b11..4 x width. The destination address is incremented by 4 times the amount specified by Width for each transfer.
- */
-#define DMA_CHANNEL_XFERCFG_DSTINC(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_DSTINC_SHIFT)) & DMA_CHANNEL_XFERCFG_DSTINC_MASK)
-#define DMA_CHANNEL_XFERCFG_XFERCOUNT_MASK (0x3FF0000U)
-#define DMA_CHANNEL_XFERCFG_XFERCOUNT_SHIFT (16U)
-/*! XFERCOUNT - Total number of transfers to be performed, minus 1 encoded. The number of bytes
- * transferred is: (XFERCOUNT + 1) x data width (as defined by the WIDTH field). The DMA controller
- * uses this bit field during transfer to count down. Hence, it cannot be used by software to read
- * back the size of the transfer, for instance, in an interrupt handler. 0x0 = a total of 1
- * transfer will be performed. 0x1 = a total of 2 transfers will be performed. 0x3FF = a total of
- * 1,024 transfers will be performed.
- */
-#define DMA_CHANNEL_XFERCFG_XFERCOUNT(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_XFERCOUNT_SHIFT)) & DMA_CHANNEL_XFERCFG_XFERCOUNT_MASK)
-/*! @} */
-
-/* The count of DMA_CHANNEL_XFERCFG */
-#define DMA_CHANNEL_XFERCFG_COUNT (23U)
-
-
-/*!
- * @}
- */ /* end of group DMA_Register_Masks */
-
-
-/* DMA - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral DMA0 base address */
- #define DMA0_BASE (0x50082000u)
- /** Peripheral DMA0 base address */
- #define DMA0_BASE_NS (0x40082000u)
- /** Peripheral DMA0 base pointer */
- #define DMA0 ((DMA_Type *)DMA0_BASE)
- /** Peripheral DMA0 base pointer */
- #define DMA0_NS ((DMA_Type *)DMA0_BASE_NS)
- /** Peripheral DMA1 base address */
- #define DMA1_BASE (0x500A7000u)
- /** Peripheral DMA1 base address */
- #define DMA1_BASE_NS (0x400A7000u)
- /** Peripheral DMA1 base pointer */
- #define DMA1 ((DMA_Type *)DMA1_BASE)
- /** Peripheral DMA1 base pointer */
- #define DMA1_NS ((DMA_Type *)DMA1_BASE_NS)
- /** Array initializer of DMA peripheral base addresses */
- #define DMA_BASE_ADDRS { DMA0_BASE, DMA1_BASE }
- /** Array initializer of DMA peripheral base pointers */
- #define DMA_BASE_PTRS { DMA0, DMA1 }
- /** Array initializer of DMA peripheral base addresses */
- #define DMA_BASE_ADDRS_NS { DMA0_BASE_NS, DMA1_BASE_NS }
- /** Array initializer of DMA peripheral base pointers */
- #define DMA_BASE_PTRS_NS { DMA0_NS, DMA1_NS }
-#else
- /** Peripheral DMA0 base address */
- #define DMA0_BASE (0x40082000u)
- /** Peripheral DMA0 base pointer */
- #define DMA0 ((DMA_Type *)DMA0_BASE)
- /** Peripheral DMA1 base address */
- #define DMA1_BASE (0x400A7000u)
- /** Peripheral DMA1 base pointer */
- #define DMA1 ((DMA_Type *)DMA1_BASE)
- /** Array initializer of DMA peripheral base addresses */
- #define DMA_BASE_ADDRS { DMA0_BASE, DMA1_BASE }
- /** Array initializer of DMA peripheral base pointers */
- #define DMA_BASE_PTRS { DMA0, DMA1 }
-#endif
-/** Interrupt vectors for the DMA peripheral type */
-#define DMA_IRQS { DMA0_IRQn, DMA1_IRQn }
-
-/*!
- * @}
- */ /* end of group DMA_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- FLASH Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_Peripheral_Access_Layer FLASH Peripheral Access Layer
- * @{
- */
-
-/** FLASH - Register Layout Typedef */
-typedef struct {
- __O uint32_t CMD; /**< command register, offset: 0x0 */
- __O uint32_t EVENT; /**< event register, offset: 0x4 */
- uint8_t RESERVED_0[8];
- __IO uint32_t STARTA; /**< start (or only) address for next flash command, offset: 0x10 */
- __IO uint32_t STOPA; /**< end address for next flash command, if command operates on address ranges, offset: 0x14 */
- uint8_t RESERVED_1[104];
- __IO uint32_t DATAW[4]; /**< data register, word 0-7; Memory data, or command parameter, or command result., array offset: 0x80, array step: 0x4 */
- uint8_t RESERVED_2[3912];
- __O uint32_t INT_CLR_ENABLE; /**< Clear interrupt enable bits, offset: 0xFD8 */
- __O uint32_t INT_SET_ENABLE; /**< Set interrupt enable bits, offset: 0xFDC */
- __I uint32_t INT_STATUS; /**< Interrupt status bits, offset: 0xFE0 */
- __I uint32_t INT_ENABLE; /**< Interrupt enable bits, offset: 0xFE4 */
- __O uint32_t INT_CLR_STATUS; /**< Clear interrupt status bits, offset: 0xFE8 */
- __O uint32_t INT_SET_STATUS; /**< Set interrupt status bits, offset: 0xFEC */
- uint8_t RESERVED_3[12];
- __I uint32_t MODULE_ID; /**< Controller+Memory module identification, offset: 0xFFC */
-} FLASH_Type;
-
-/* ----------------------------------------------------------------------------
- -- FLASH Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_Register_Masks FLASH Register Masks
- * @{
- */
-
-/*! @name CMD - command register */
-/*! @{ */
-#define FLASH_CMD_CMD_MASK (0xFFFFFFFFU)
-#define FLASH_CMD_CMD_SHIFT (0U)
-/*! CMD - command register.
- */
-#define FLASH_CMD_CMD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMD_CMD_SHIFT)) & FLASH_CMD_CMD_MASK)
-/*! @} */
-
-/*! @name EVENT - event register */
-/*! @{ */
-#define FLASH_EVENT_RST_MASK (0x1U)
-#define FLASH_EVENT_RST_SHIFT (0U)
-/*! RST - When bit is set, the controller and flash are reset.
- */
-#define FLASH_EVENT_RST(x) (((uint32_t)(((uint32_t)(x)) << FLASH_EVENT_RST_SHIFT)) & FLASH_EVENT_RST_MASK)
-#define FLASH_EVENT_WAKEUP_MASK (0x2U)
-#define FLASH_EVENT_WAKEUP_SHIFT (1U)
-/*! WAKEUP - When bit is set, the controller wakes up from whatever low power or powerdown mode was active.
- */
-#define FLASH_EVENT_WAKEUP(x) (((uint32_t)(((uint32_t)(x)) << FLASH_EVENT_WAKEUP_SHIFT)) & FLASH_EVENT_WAKEUP_MASK)
-#define FLASH_EVENT_ABORT_MASK (0x4U)
-#define FLASH_EVENT_ABORT_SHIFT (2U)
-/*! ABORT - When bit is set, a running program/erase command is aborted.
- */
-#define FLASH_EVENT_ABORT(x) (((uint32_t)(((uint32_t)(x)) << FLASH_EVENT_ABORT_SHIFT)) & FLASH_EVENT_ABORT_MASK)
-/*! @} */
-
-/*! @name STARTA - start (or only) address for next flash command */
-/*! @{ */
-#define FLASH_STARTA_STARTA_MASK (0x3FFFFU)
-#define FLASH_STARTA_STARTA_SHIFT (0U)
-/*! STARTA - Address / Start address for commands that take an address (range) as a parameter.
- */
-#define FLASH_STARTA_STARTA(x) (((uint32_t)(((uint32_t)(x)) << FLASH_STARTA_STARTA_SHIFT)) & FLASH_STARTA_STARTA_MASK)
-/*! @} */
-
-/*! @name STOPA - end address for next flash command, if command operates on address ranges */
-/*! @{ */
-#define FLASH_STOPA_STOPA_MASK (0x3FFFFU)
-#define FLASH_STOPA_STOPA_SHIFT (0U)
-/*! STOPA - Stop address for commands that take an address range as a parameter (the word specified
- * by STOPA is included in the address range).
- */
-#define FLASH_STOPA_STOPA(x) (((uint32_t)(((uint32_t)(x)) << FLASH_STOPA_STOPA_SHIFT)) & FLASH_STOPA_STOPA_MASK)
-/*! @} */
-
-/*! @name DATAW - data register, word 0-7; Memory data, or command parameter, or command result. */
-/*! @{ */
-#define FLASH_DATAW_DATAW_MASK (0xFFFFFFFFU)
-#define FLASH_DATAW_DATAW_SHIFT (0U)
-#define FLASH_DATAW_DATAW(x) (((uint32_t)(((uint32_t)(x)) << FLASH_DATAW_DATAW_SHIFT)) & FLASH_DATAW_DATAW_MASK)
-/*! @} */
-
-/* The count of FLASH_DATAW */
-#define FLASH_DATAW_COUNT (4U)
-
-/*! @name INT_CLR_ENABLE - Clear interrupt enable bits */
-/*! @{ */
-#define FLASH_INT_CLR_ENABLE_FAIL_MASK (0x1U)
-#define FLASH_INT_CLR_ENABLE_FAIL_SHIFT (0U)
-/*! FAIL - When a CLR_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is cleared.
- */
-#define FLASH_INT_CLR_ENABLE_FAIL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_ENABLE_FAIL_SHIFT)) & FLASH_INT_CLR_ENABLE_FAIL_MASK)
-#define FLASH_INT_CLR_ENABLE_ERR_MASK (0x2U)
-#define FLASH_INT_CLR_ENABLE_ERR_SHIFT (1U)
-/*! ERR - When a CLR_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is cleared.
- */
-#define FLASH_INT_CLR_ENABLE_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_ENABLE_ERR_SHIFT)) & FLASH_INT_CLR_ENABLE_ERR_MASK)
-#define FLASH_INT_CLR_ENABLE_DONE_MASK (0x4U)
-#define FLASH_INT_CLR_ENABLE_DONE_SHIFT (2U)
-/*! DONE - When a CLR_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is cleared.
- */
-#define FLASH_INT_CLR_ENABLE_DONE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_ENABLE_DONE_SHIFT)) & FLASH_INT_CLR_ENABLE_DONE_MASK)
-#define FLASH_INT_CLR_ENABLE_ECC_ERR_MASK (0x8U)
-#define FLASH_INT_CLR_ENABLE_ECC_ERR_SHIFT (3U)
-/*! ECC_ERR - When a CLR_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is cleared.
- */
-#define FLASH_INT_CLR_ENABLE_ECC_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_ENABLE_ECC_ERR_SHIFT)) & FLASH_INT_CLR_ENABLE_ECC_ERR_MASK)
-/*! @} */
-
-/*! @name INT_SET_ENABLE - Set interrupt enable bits */
-/*! @{ */
-#define FLASH_INT_SET_ENABLE_FAIL_MASK (0x1U)
-#define FLASH_INT_SET_ENABLE_FAIL_SHIFT (0U)
-/*! FAIL - When a SET_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is set.
- */
-#define FLASH_INT_SET_ENABLE_FAIL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_ENABLE_FAIL_SHIFT)) & FLASH_INT_SET_ENABLE_FAIL_MASK)
-#define FLASH_INT_SET_ENABLE_ERR_MASK (0x2U)
-#define FLASH_INT_SET_ENABLE_ERR_SHIFT (1U)
-/*! ERR - When a SET_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is set.
- */
-#define FLASH_INT_SET_ENABLE_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_ENABLE_ERR_SHIFT)) & FLASH_INT_SET_ENABLE_ERR_MASK)
-#define FLASH_INT_SET_ENABLE_DONE_MASK (0x4U)
-#define FLASH_INT_SET_ENABLE_DONE_SHIFT (2U)
-/*! DONE - When a SET_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is set.
- */
-#define FLASH_INT_SET_ENABLE_DONE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_ENABLE_DONE_SHIFT)) & FLASH_INT_SET_ENABLE_DONE_MASK)
-#define FLASH_INT_SET_ENABLE_ECC_ERR_MASK (0x8U)
-#define FLASH_INT_SET_ENABLE_ECC_ERR_SHIFT (3U)
-/*! ECC_ERR - When a SET_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is set.
- */
-#define FLASH_INT_SET_ENABLE_ECC_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_ENABLE_ECC_ERR_SHIFT)) & FLASH_INT_SET_ENABLE_ECC_ERR_MASK)
-/*! @} */
-
-/*! @name INT_STATUS - Interrupt status bits */
-/*! @{ */
-#define FLASH_INT_STATUS_FAIL_MASK (0x1U)
-#define FLASH_INT_STATUS_FAIL_SHIFT (0U)
-/*! FAIL - This status bit is set if execution of a (legal) command failed.
- */
-#define FLASH_INT_STATUS_FAIL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_STATUS_FAIL_SHIFT)) & FLASH_INT_STATUS_FAIL_MASK)
-#define FLASH_INT_STATUS_ERR_MASK (0x2U)
-#define FLASH_INT_STATUS_ERR_SHIFT (1U)
-/*! ERR - This status bit is set if execution of an illegal command is detected.
- */
-#define FLASH_INT_STATUS_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_STATUS_ERR_SHIFT)) & FLASH_INT_STATUS_ERR_MASK)
-#define FLASH_INT_STATUS_DONE_MASK (0x4U)
-#define FLASH_INT_STATUS_DONE_SHIFT (2U)
-/*! DONE - This status bit is set at the end of command execution.
- */
-#define FLASH_INT_STATUS_DONE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_STATUS_DONE_SHIFT)) & FLASH_INT_STATUS_DONE_MASK)
-#define FLASH_INT_STATUS_ECC_ERR_MASK (0x8U)
-#define FLASH_INT_STATUS_ECC_ERR_SHIFT (3U)
-/*! ECC_ERR - This status bit is set if, during a memory read operation (either a user-requested
- * read, or a speculative read, or reads performed by a controller command), a correctable or
- * uncorrectable error is detected by ECC decoding logic.
- */
-#define FLASH_INT_STATUS_ECC_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_STATUS_ECC_ERR_SHIFT)) & FLASH_INT_STATUS_ECC_ERR_MASK)
-/*! @} */
-
-/*! @name INT_ENABLE - Interrupt enable bits */
-/*! @{ */
-#define FLASH_INT_ENABLE_FAIL_MASK (0x1U)
-#define FLASH_INT_ENABLE_FAIL_SHIFT (0U)
-/*! FAIL - If an INT_ENABLE bit is set, an interrupt request will be generated if the corresponding INT_STATUS bit is high.
- */
-#define FLASH_INT_ENABLE_FAIL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_ENABLE_FAIL_SHIFT)) & FLASH_INT_ENABLE_FAIL_MASK)
-#define FLASH_INT_ENABLE_ERR_MASK (0x2U)
-#define FLASH_INT_ENABLE_ERR_SHIFT (1U)
-/*! ERR - If an INT_ENABLE bit is set, an interrupt request will be generated if the corresponding INT_STATUS bit is high.
- */
-#define FLASH_INT_ENABLE_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_ENABLE_ERR_SHIFT)) & FLASH_INT_ENABLE_ERR_MASK)
-#define FLASH_INT_ENABLE_DONE_MASK (0x4U)
-#define FLASH_INT_ENABLE_DONE_SHIFT (2U)
-/*! DONE - If an INT_ENABLE bit is set, an interrupt request will be generated if the corresponding INT_STATUS bit is high.
- */
-#define FLASH_INT_ENABLE_DONE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_ENABLE_DONE_SHIFT)) & FLASH_INT_ENABLE_DONE_MASK)
-#define FLASH_INT_ENABLE_ECC_ERR_MASK (0x8U)
-#define FLASH_INT_ENABLE_ECC_ERR_SHIFT (3U)
-/*! ECC_ERR - If an INT_ENABLE bit is set, an interrupt request will be generated if the corresponding INT_STATUS bit is high.
- */
-#define FLASH_INT_ENABLE_ECC_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_ENABLE_ECC_ERR_SHIFT)) & FLASH_INT_ENABLE_ECC_ERR_MASK)
-/*! @} */
-
-/*! @name INT_CLR_STATUS - Clear interrupt status bits */
-/*! @{ */
-#define FLASH_INT_CLR_STATUS_FAIL_MASK (0x1U)
-#define FLASH_INT_CLR_STATUS_FAIL_SHIFT (0U)
-/*! FAIL - When a CLR_STATUS bit is written to 1, the corresponding INT_STATUS bit is cleared.
- */
-#define FLASH_INT_CLR_STATUS_FAIL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_STATUS_FAIL_SHIFT)) & FLASH_INT_CLR_STATUS_FAIL_MASK)
-#define FLASH_INT_CLR_STATUS_ERR_MASK (0x2U)
-#define FLASH_INT_CLR_STATUS_ERR_SHIFT (1U)
-/*! ERR - When a CLR_STATUS bit is written to 1, the corresponding INT_STATUS bit is cleared.
- */
-#define FLASH_INT_CLR_STATUS_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_STATUS_ERR_SHIFT)) & FLASH_INT_CLR_STATUS_ERR_MASK)
-#define FLASH_INT_CLR_STATUS_DONE_MASK (0x4U)
-#define FLASH_INT_CLR_STATUS_DONE_SHIFT (2U)
-/*! DONE - When a CLR_STATUS bit is written to 1, the corresponding INT_STATUS bit is cleared.
- */
-#define FLASH_INT_CLR_STATUS_DONE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_STATUS_DONE_SHIFT)) & FLASH_INT_CLR_STATUS_DONE_MASK)
-#define FLASH_INT_CLR_STATUS_ECC_ERR_MASK (0x8U)
-#define FLASH_INT_CLR_STATUS_ECC_ERR_SHIFT (3U)
-/*! ECC_ERR - When a CLR_STATUS bit is written to 1, the corresponding INT_STATUS bit is cleared.
- */
-#define FLASH_INT_CLR_STATUS_ECC_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_STATUS_ECC_ERR_SHIFT)) & FLASH_INT_CLR_STATUS_ECC_ERR_MASK)
-/*! @} */
-
-/*! @name INT_SET_STATUS - Set interrupt status bits */
-/*! @{ */
-#define FLASH_INT_SET_STATUS_FAIL_MASK (0x1U)
-#define FLASH_INT_SET_STATUS_FAIL_SHIFT (0U)
-/*! FAIL - When a SET_STATUS bit is written to 1, the corresponding INT_STATUS bit is set.
- */
-#define FLASH_INT_SET_STATUS_FAIL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_STATUS_FAIL_SHIFT)) & FLASH_INT_SET_STATUS_FAIL_MASK)
-#define FLASH_INT_SET_STATUS_ERR_MASK (0x2U)
-#define FLASH_INT_SET_STATUS_ERR_SHIFT (1U)
-/*! ERR - When a SET_STATUS bit is written to 1, the corresponding INT_STATUS bit is set.
- */
-#define FLASH_INT_SET_STATUS_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_STATUS_ERR_SHIFT)) & FLASH_INT_SET_STATUS_ERR_MASK)
-#define FLASH_INT_SET_STATUS_DONE_MASK (0x4U)
-#define FLASH_INT_SET_STATUS_DONE_SHIFT (2U)
-/*! DONE - When a SET_STATUS bit is written to 1, the corresponding INT_STATUS bit is set.
- */
-#define FLASH_INT_SET_STATUS_DONE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_STATUS_DONE_SHIFT)) & FLASH_INT_SET_STATUS_DONE_MASK)
-#define FLASH_INT_SET_STATUS_ECC_ERR_MASK (0x8U)
-#define FLASH_INT_SET_STATUS_ECC_ERR_SHIFT (3U)
-/*! ECC_ERR - When a SET_STATUS bit is written to 1, the corresponding INT_STATUS bit is set.
- */
-#define FLASH_INT_SET_STATUS_ECC_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_STATUS_ECC_ERR_SHIFT)) & FLASH_INT_SET_STATUS_ECC_ERR_MASK)
-/*! @} */
-
-/*! @name MODULE_ID - Controller+Memory module identification */
-/*! @{ */
-#define FLASH_MODULE_ID_APERTURE_MASK (0xFFU)
-#define FLASH_MODULE_ID_APERTURE_SHIFT (0U)
-/*! APERTURE - Aperture i.
- */
-#define FLASH_MODULE_ID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_MODULE_ID_APERTURE_SHIFT)) & FLASH_MODULE_ID_APERTURE_MASK)
-#define FLASH_MODULE_ID_MINOR_REV_MASK (0xF00U)
-#define FLASH_MODULE_ID_MINOR_REV_SHIFT (8U)
-/*! MINOR_REV - Minor revision i.
- */
-#define FLASH_MODULE_ID_MINOR_REV(x) (((uint32_t)(((uint32_t)(x)) << FLASH_MODULE_ID_MINOR_REV_SHIFT)) & FLASH_MODULE_ID_MINOR_REV_MASK)
-#define FLASH_MODULE_ID_MAJOR_REV_MASK (0xF000U)
-#define FLASH_MODULE_ID_MAJOR_REV_SHIFT (12U)
-/*! MAJOR_REV - Major revision i.
- */
-#define FLASH_MODULE_ID_MAJOR_REV(x) (((uint32_t)(((uint32_t)(x)) << FLASH_MODULE_ID_MAJOR_REV_SHIFT)) & FLASH_MODULE_ID_MAJOR_REV_MASK)
-#define FLASH_MODULE_ID_ID_MASK (0xFFFF0000U)
-#define FLASH_MODULE_ID_ID_SHIFT (16U)
-/*! ID - Identifier.
- */
-#define FLASH_MODULE_ID_ID(x) (((uint32_t)(((uint32_t)(x)) << FLASH_MODULE_ID_ID_SHIFT)) & FLASH_MODULE_ID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group FLASH_Register_Masks */
-
-
-/* FLASH - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral FLASH base address */
- #define FLASH_BASE (0x50034000u)
- /** Peripheral FLASH base address */
- #define FLASH_BASE_NS (0x40034000u)
- /** Peripheral FLASH base pointer */
- #define FLASH ((FLASH_Type *)FLASH_BASE)
- /** Peripheral FLASH base pointer */
- #define FLASH_NS ((FLASH_Type *)FLASH_BASE_NS)
- /** Array initializer of FLASH peripheral base addresses */
- #define FLASH_BASE_ADDRS { FLASH_BASE }
- /** Array initializer of FLASH peripheral base pointers */
- #define FLASH_BASE_PTRS { FLASH }
- /** Array initializer of FLASH peripheral base addresses */
- #define FLASH_BASE_ADDRS_NS { FLASH_BASE_NS }
- /** Array initializer of FLASH peripheral base pointers */
- #define FLASH_BASE_PTRS_NS { FLASH_NS }
-#else
- /** Peripheral FLASH base address */
- #define FLASH_BASE (0x40034000u)
- /** Peripheral FLASH base pointer */
- #define FLASH ((FLASH_Type *)FLASH_BASE)
- /** Array initializer of FLASH peripheral base addresses */
- #define FLASH_BASE_ADDRS { FLASH_BASE }
- /** Array initializer of FLASH peripheral base pointers */
- #define FLASH_BASE_PTRS { FLASH }
-#endif
-
-/*!
- * @}
- */ /* end of group FLASH_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- FLASH_CFPA Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_CFPA_Peripheral_Access_Layer FLASH_CFPA Peripheral Access Layer
- * @{
- */
-
-/** FLASH_CFPA - Register Layout Typedef */
-typedef struct {
- __IO uint32_t HEADER; /**< ., offset: 0x0 */
- __IO uint32_t VERSION; /**< ., offset: 0x4 */
- __IO uint32_t S_FW_VERSION; /**< Secure firmware version (Monotonic counter), offset: 0x8 */
- __IO uint32_t NS_FW_VERSION; /**< Non-Secure firmware version (Monotonic counter), offset: 0xC */
- __IO uint32_t IMAGE_KEY_REVOKE; /**< Image key revocation ID (Monotonic counter), offset: 0x10 */
- uint8_t RESERVED_0[4];
- __IO uint32_t ROTKH_REVOKE; /**< ., offset: 0x18 */
- __IO uint32_t VENDOR_USAGE; /**< ., offset: 0x1C */
- __IO uint32_t DCFG_CC_SOCU_PIN; /**< With TZ-M, the part can be sold by level 1 customers (secure code developer) to level-2 customers who develops non-secure code only. - In this scenario, or easy of development, Level-I customer releases the part to always allow non-secure debug. - To allow level-2 customers to further seal the part DCFG_CC_SOCU_NS is used. - ROM will use this word to further restrict the debug access., offset: 0x20 */
- __IO uint32_t DCFG_CC_SOCU_DFLT; /**< With TZ-M, the part can be sold by level 1 customers (secure code developer) to level-2 customers who develops non-secure code only. - In this scenario, or easy of development, Level-I customer releases the part to always allow non-secure debug. - To allow level-2 customers to further seal the part DCFG_CC_SOCU_NS is used. - ROM will use this word to further restrict the debug access., offset: 0x24 */
- __IO uint32_t ENABLE_FA_MODE; /**< Enable FA mode. SET_FA_MODE Command should write 0xC33CA55A to this word to indicate boot ROM to enter FA mode., offset: 0x28 */
- __IO uint32_t CMPA_PROG_IN_PROGRESS; /**< CMPA Page programming on going. This field shall be set to 0x5CC55AA5 in the active CFPA page each time CMPA page programming is going on. It shall always be set to 0x00000000 in the CFPA scratch area., offset: 0x2C */
- union { /* offset: 0x30 */
- __IO uint32_t PRINCE_REGION0_IV_CODE[14]; /**< ., array offset: 0x30, array step: 0x4 */
- struct { /* offset: 0x30 */
- __IO uint32_t PRINCE_REGION0_IV_HEADER0; /**< ., offset: 0x30 */
- __IO uint32_t PRINCE_REGION0_IV_HEADER1; /**< ., offset: 0x34 */
- __IO uint32_t PRINCE_REGION0_IV_BODY[12]; /**< ., array offset: 0x38, array step: 0x4 */
- } PRINCE_REGION0_IV_CODE_CORE;
- };
- union { /* offset: 0x68 */
- __IO uint32_t PRINCE_REGION1_IV_CODE[14]; /**< ., array offset: 0x68, array step: 0x4 */
- struct { /* offset: 0x68 */
- __IO uint32_t PRINCE_REGION1_IV_HEADER0; /**< ., offset: 0x68 */
- __IO uint32_t PRINCE_REGION1_IV_HEADER1; /**< ., offset: 0x6C */
- __IO uint32_t PRINCE_REGION1_IV_BODY[12]; /**< ., array offset: 0x70, array step: 0x4 */
- } PRINCE_REGION1_IV_CODE_CORE;
- };
- union { /* offset: 0xA0 */
- __IO uint32_t PRINCE_REGION2_IV_CODE[14]; /**< ., array offset: 0xA0, array step: 0x4 */
- struct { /* offset: 0xA0 */
- __IO uint32_t PRINCE_REGION2_IV_HEADER0; /**< ., offset: 0xA0 */
- __IO uint32_t PRINCE_REGION2_IV_HEADER1; /**< ., offset: 0xA4 */
- __IO uint32_t PRINCE_REGION2_IV_BODY[12]; /**< ., array offset: 0xA8, array step: 0x4 */
- } PRINCE_REGION2_IV_CODE_CORE;
- };
- uint8_t RESERVED_1[40];
- __IO uint32_t CUSTOMER_DEFINED[56]; /**< Customer Defined (Programable through ROM API), array offset: 0x100, array step: 0x4 */
- __IO uint32_t SHA256_DIGEST[8]; /**< SHA256_DIGEST0 for DIGEST[31:0] SHA256_DIGEST1 for DIGEST[63:32] SHA256_DIGEST2 for DIGEST[95:64] SHA256_DIGEST3 for DIGEST[127:96] SHA256_DIGEST4 for DIGEST[159:128] SHA256_DIGEST5 for DIGEST[191:160] SHA256_DIGEST6 for DIGEST[223:192] SHA256_DIGEST7 for DIGEST[255:224], array offset: 0x1E0, array step: 0x4 */
-} FLASH_CFPA_Type;
-
-/* ----------------------------------------------------------------------------
- -- FLASH_CFPA Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_CFPA_Register_Masks FLASH_CFPA Register Masks
- * @{
- */
-
-/*! @name HEADER - . */
-/*! @{ */
-#define FLASH_CFPA_HEADER_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_HEADER_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_HEADER_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_HEADER_FIELD_SHIFT)) & FLASH_CFPA_HEADER_FIELD_MASK)
-/*! @} */
-
-/*! @name VERSION - . */
-/*! @{ */
-#define FLASH_CFPA_VERSION_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_VERSION_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_VERSION_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_VERSION_FIELD_SHIFT)) & FLASH_CFPA_VERSION_FIELD_MASK)
-/*! @} */
-
-/*! @name S_FW_VERSION - Secure firmware version (Monotonic counter) */
-/*! @{ */
-#define FLASH_CFPA_S_FW_VERSION_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_S_FW_VERSION_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_S_FW_VERSION_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_S_FW_VERSION_FIELD_SHIFT)) & FLASH_CFPA_S_FW_VERSION_FIELD_MASK)
-/*! @} */
-
-/*! @name NS_FW_VERSION - Non-Secure firmware version (Monotonic counter) */
-/*! @{ */
-#define FLASH_CFPA_NS_FW_VERSION_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_NS_FW_VERSION_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_NS_FW_VERSION_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_NS_FW_VERSION_FIELD_SHIFT)) & FLASH_CFPA_NS_FW_VERSION_FIELD_MASK)
-/*! @} */
-
-/*! @name IMAGE_KEY_REVOKE - Image key revocation ID (Monotonic counter) */
-/*! @{ */
-#define FLASH_CFPA_IMAGE_KEY_REVOKE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_IMAGE_KEY_REVOKE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_IMAGE_KEY_REVOKE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_IMAGE_KEY_REVOKE_FIELD_SHIFT)) & FLASH_CFPA_IMAGE_KEY_REVOKE_FIELD_MASK)
-/*! @} */
-
-/*! @name ROTKH_REVOKE - . */
-/*! @{ */
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK0_EN_MASK (0x3U)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK0_EN_SHIFT (0U)
-/*! RoTK0_EN - RoT Key 0 enable. 00 - Invalid 01 - Enabled 10, 11 - Key revoked
- */
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK0_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_ROTKH_REVOKE_RoTK0_EN_SHIFT)) & FLASH_CFPA_ROTKH_REVOKE_RoTK0_EN_MASK)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK1_EN_MASK (0xCU)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK1_EN_SHIFT (2U)
-/*! RoTK1_EN - RoT Key 1 enable. 00 - Invalid 01 - Enabled 10, 11 - Key revoked
- */
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK1_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_ROTKH_REVOKE_RoTK1_EN_SHIFT)) & FLASH_CFPA_ROTKH_REVOKE_RoTK1_EN_MASK)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK2_EN_MASK (0x30U)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK2_EN_SHIFT (4U)
-/*! RoTK2_EN - RoT Key 2 enable. 00 - Invalid 01 - Enabled 10, 11 - Key revoked
- */
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK2_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_ROTKH_REVOKE_RoTK2_EN_SHIFT)) & FLASH_CFPA_ROTKH_REVOKE_RoTK2_EN_MASK)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK3_EN_MASK (0xC0U)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK3_EN_SHIFT (6U)
-/*! RoTK3_EN - RoT Key 3 enable. 00 - Invalid 01 - Enabled 10, 11 - Key revoked
- */
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK3_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_ROTKH_REVOKE_RoTK3_EN_SHIFT)) & FLASH_CFPA_ROTKH_REVOKE_RoTK3_EN_MASK)
-/*! @} */
-
-/*! @name VENDOR_USAGE - . */
-/*! @{ */
-#define FLASH_CFPA_VENDOR_USAGE_DBG_VENDOR_USAGE_MASK (0xFFFFU)
-#define FLASH_CFPA_VENDOR_USAGE_DBG_VENDOR_USAGE_SHIFT (0U)
-/*! DBG_VENDOR_USAGE - DBG_VENDOR_USAGE.
- */
-#define FLASH_CFPA_VENDOR_USAGE_DBG_VENDOR_USAGE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_VENDOR_USAGE_DBG_VENDOR_USAGE_SHIFT)) & FLASH_CFPA_VENDOR_USAGE_DBG_VENDOR_USAGE_MASK)
-#define FLASH_CFPA_VENDOR_USAGE_INVERSE_VALUE_MASK (0xFFFF0000U)
-#define FLASH_CFPA_VENDOR_USAGE_INVERSE_VALUE_SHIFT (16U)
-/*! INVERSE_VALUE - inverse value of bits [15:0]
- */
-#define FLASH_CFPA_VENDOR_USAGE_INVERSE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_VENDOR_USAGE_INVERSE_VALUE_SHIFT)) & FLASH_CFPA_VENDOR_USAGE_INVERSE_VALUE_MASK)
-/*! @} */
-
-/*! @name DCFG_CC_SOCU_PIN - With TZ-M, the part can be sold by level 1 customers (secure code developer) to level-2 customers who develops non-secure code only. - In this scenario, or easy of development, Level-I customer releases the part to always allow non-secure debug. - To allow level-2 customers to further seal the part DCFG_CC_SOCU_NS is used. - ROM will use this word to further restrict the debug access. */
-/*! @{ */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_NIDEN_MASK (0x1U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_NIDEN_SHIFT (0U)
-/*! NIDEN - Non Secure non-invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_NIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_NIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_DBGEN_MASK (0x2U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_DBGEN_SHIFT (1U)
-/*! DBGEN - Non Secure debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_DBGEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_DBGEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_SPNIDEN_MASK (0x4U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_SPNIDEN_SHIFT (2U)
-/*! SPNIDEN - Secure non-invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_SPNIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_SPNIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_SPNIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_SPIDEN_MASK (0x8U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_SPIDEN_SHIFT (3U)
-/*! SPIDEN - Secure invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_SPIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_SPIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_SPIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_TAPEN_MASK (0x10U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_TAPEN_SHIFT (4U)
-/*! TAPEN - JTAG TAP enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_TAPEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_TAPEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_TAPEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_DBGEN_MASK (0x20U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_DBGEN_SHIFT (5U)
-/*! CPU1_DBGEN - CPU1 (Micro cortex M33) invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_DBGEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_DBGEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_ISP_CMD_EN_MASK (0x40U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_ISP_CMD_EN_SHIFT (6U)
-/*! ISP_CMD_EN - ISP Boot Command enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_ISP_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_ISP_CMD_EN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_ISP_CMD_EN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_FA_CMD_EN_MASK (0x80U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_FA_CMD_EN_SHIFT (7U)
-/*! FA_CMD_EN - FA Command enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_FA_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_FA_CMD_EN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_FA_CMD_EN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_ME_CMD_EN_MASK (0x100U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_ME_CMD_EN_SHIFT (8U)
-/*! ME_CMD_EN - Flash Mass Erase Command enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_ME_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_ME_CMD_EN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_ME_CMD_EN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_NIDEN_MASK (0x200U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_NIDEN_SHIFT (9U)
-/*! CPU1_NIDEN - CPU1 (Micro cortex M33) non-invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_NIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_NIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_UUID_CHECK_MASK (0x8000U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_UUID_CHECK_SHIFT (15U)
-/*! UUID_CHECK - Enforce UUID match during Debug authentication.
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_UUID_CHECK(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_UUID_CHECK_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_UUID_CHECK_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_INVERSE_VALUE_MASK (0xFFFF0000U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_INVERSE_VALUE_SHIFT (16U)
-/*! INVERSE_VALUE - inverse value of bits [15:0]
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_INVERSE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_INVERSE_VALUE_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_INVERSE_VALUE_MASK)
-/*! @} */
-
-/*! @name DCFG_CC_SOCU_DFLT - With TZ-M, the part can be sold by level 1 customers (secure code developer) to level-2 customers who develops non-secure code only. - In this scenario, or easy of development, Level-I customer releases the part to always allow non-secure debug. - To allow level-2 customers to further seal the part DCFG_CC_SOCU_NS is used. - ROM will use this word to further restrict the debug access. */
-/*! @{ */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_NIDEN_MASK (0x1U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_NIDEN_SHIFT (0U)
-/*! NIDEN - Non Secure non-invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_NIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_NIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_DBGEN_MASK (0x2U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_DBGEN_SHIFT (1U)
-/*! DBGEN - Non Secure debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_DBGEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_DBGEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPNIDEN_MASK (0x4U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPNIDEN_SHIFT (2U)
-/*! SPNIDEN - Secure non-invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPNIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPNIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPNIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPIDEN_MASK (0x8U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPIDEN_SHIFT (3U)
-/*! SPIDEN - Secure invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_TAPEN_MASK (0x10U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_TAPEN_SHIFT (4U)
-/*! TAPEN - JTAG TAP fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_TAPEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_TAPEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_TAPEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_DBGEN_MASK (0x20U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_DBGEN_SHIFT (5U)
-/*! CPU1_DBGEN - CPU1 (Micro cortex M33) invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_DBGEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_DBGEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_ISP_CMD_EN_MASK (0x40U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_ISP_CMD_EN_SHIFT (6U)
-/*! ISP_CMD_EN - ISP Boot Command fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_ISP_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_ISP_CMD_EN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_ISP_CMD_EN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_FA_CMD_EN_MASK (0x80U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_FA_CMD_EN_SHIFT (7U)
-/*! FA_CMD_EN - FA Command fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_FA_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_FA_CMD_EN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_FA_CMD_EN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_ME_CMD_EN_MASK (0x100U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_ME_CMD_EN_SHIFT (8U)
-/*! ME_CMD_EN - Flash Mass Erase Command fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_ME_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_ME_CMD_EN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_ME_CMD_EN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_NIDEN_MASK (0x200U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_NIDEN_SHIFT (9U)
-/*! CPU1_NIDEN - CPU1 (Micro cortex M33) non-invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_NIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_NIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_INVERSE_VALUE_MASK (0xFFFF0000U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_INVERSE_VALUE_SHIFT (16U)
-/*! INVERSE_VALUE - inverse value of bits [15:0]
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_INVERSE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_INVERSE_VALUE_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_INVERSE_VALUE_MASK)
-/*! @} */
-
-/*! @name ENABLE_FA_MODE - Enable FA mode. SET_FA_MODE Command should write 0xC33CA55A to this word to indicate boot ROM to enter FA mode. */
-/*! @{ */
-#define FLASH_CFPA_ENABLE_FA_MODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_ENABLE_FA_MODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_ENABLE_FA_MODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_ENABLE_FA_MODE_FIELD_SHIFT)) & FLASH_CFPA_ENABLE_FA_MODE_FIELD_MASK)
-/*! @} */
-
-/*! @name CMPA_PROG_IN_PROGRESS - CMPA Page programming on going. This field shall be set to 0x5CC55AA5 in the active CFPA page each time CMPA page programming is going on. It shall always be set to 0x00000000 in the CFPA scratch area. */
-/*! @{ */
-#define FLASH_CFPA_CMPA_PROG_IN_PROGRESS_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_CMPA_PROG_IN_PROGRESS_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_CMPA_PROG_IN_PROGRESS_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_CMPA_PROG_IN_PROGRESS_FIELD_SHIFT)) & FLASH_CFPA_CMPA_PROG_IN_PROGRESS_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION0_IV_CODE - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION0_IV_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION0_IV_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION0_IV_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION0_IV_CODE_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION0_IV_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_PRINCE_REGION0_IV_CODE */
-#define FLASH_CFPA_PRINCE_REGION0_IV_CODE_COUNT (14U)
-
-/*! @name PRINCE_REGION0_IV_HEADER0 - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION0_IV_HEADER0_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION0_IV_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION0_IV_HEADER1 - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_TYPE_SHIFT)) & FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_TYPE_MASK)
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_INDEX_SHIFT)) & FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_INDEX_MASK)
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_SIZE_SHIFT)) & FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION0_IV_BODY - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION0_IV_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION0_IV_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION0_IV_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION0_IV_BODY_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION0_IV_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_PRINCE_REGION0_IV_BODY */
-#define FLASH_CFPA_PRINCE_REGION0_IV_BODY_COUNT (12U)
-
-/*! @name PRINCE_REGION1_IV_CODE - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION1_IV_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION1_IV_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION1_IV_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION1_IV_CODE_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION1_IV_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_PRINCE_REGION1_IV_CODE */
-#define FLASH_CFPA_PRINCE_REGION1_IV_CODE_COUNT (14U)
-
-/*! @name PRINCE_REGION1_IV_HEADER0 - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION1_IV_HEADER0_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION1_IV_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION1_IV_HEADER1 - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_TYPE_SHIFT)) & FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_TYPE_MASK)
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_INDEX_SHIFT)) & FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_INDEX_MASK)
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_SIZE_SHIFT)) & FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION1_IV_BODY - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION1_IV_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION1_IV_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION1_IV_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION1_IV_BODY_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION1_IV_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_PRINCE_REGION1_IV_BODY */
-#define FLASH_CFPA_PRINCE_REGION1_IV_BODY_COUNT (12U)
-
-/*! @name PRINCE_REGION2_IV_CODE - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION2_IV_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION2_IV_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION2_IV_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION2_IV_CODE_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION2_IV_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_PRINCE_REGION2_IV_CODE */
-#define FLASH_CFPA_PRINCE_REGION2_IV_CODE_COUNT (14U)
-
-/*! @name PRINCE_REGION2_IV_HEADER0 - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION2_IV_HEADER0_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION2_IV_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION2_IV_HEADER1 - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_TYPE_SHIFT)) & FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_TYPE_MASK)
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_INDEX_SHIFT)) & FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_INDEX_MASK)
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_SIZE_SHIFT)) & FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION2_IV_BODY - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION2_IV_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION2_IV_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION2_IV_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION2_IV_BODY_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION2_IV_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_PRINCE_REGION2_IV_BODY */
-#define FLASH_CFPA_PRINCE_REGION2_IV_BODY_COUNT (12U)
-
-/*! @name CUSTOMER_DEFINED - Customer Defined (Programable through ROM API) */
-/*! @{ */
-#define FLASH_CFPA_CUSTOMER_DEFINED_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_CUSTOMER_DEFINED_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_CUSTOMER_DEFINED_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_CUSTOMER_DEFINED_FIELD_SHIFT)) & FLASH_CFPA_CUSTOMER_DEFINED_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_CUSTOMER_DEFINED */
-#define FLASH_CFPA_CUSTOMER_DEFINED_COUNT (56U)
-
-/*! @name SHA256_DIGEST - SHA256_DIGEST0 for DIGEST[31:0] SHA256_DIGEST1 for DIGEST[63:32] SHA256_DIGEST2 for DIGEST[95:64] SHA256_DIGEST3 for DIGEST[127:96] SHA256_DIGEST4 for DIGEST[159:128] SHA256_DIGEST5 for DIGEST[191:160] SHA256_DIGEST6 for DIGEST[223:192] SHA256_DIGEST7 for DIGEST[255:224] */
-/*! @{ */
-#define FLASH_CFPA_SHA256_DIGEST_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_SHA256_DIGEST_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_SHA256_DIGEST_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_SHA256_DIGEST_FIELD_SHIFT)) & FLASH_CFPA_SHA256_DIGEST_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_SHA256_DIGEST */
-#define FLASH_CFPA_SHA256_DIGEST_COUNT (8U)
-
-
-/*!
- * @}
- */ /* end of group FLASH_CFPA_Register_Masks */
-
-
-/* FLASH_CFPA - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral FLASH_CFPA0 base address */
- #define FLASH_CFPA0_BASE (0x1009E000u)
- /** Peripheral FLASH_CFPA0 base address */
- #define FLASH_CFPA0_BASE_NS (0x9E000u)
- /** Peripheral FLASH_CFPA0 base pointer */
- #define FLASH_CFPA0 ((FLASH_CFPA_Type *)FLASH_CFPA0_BASE)
- /** Peripheral FLASH_CFPA0 base pointer */
- #define FLASH_CFPA0_NS ((FLASH_CFPA_Type *)FLASH_CFPA0_BASE_NS)
- /** Peripheral FLASH_CFPA1 base address */
- #define FLASH_CFPA1_BASE (0x1009E200u)
- /** Peripheral FLASH_CFPA1 base address */
- #define FLASH_CFPA1_BASE_NS (0x9E200u)
- /** Peripheral FLASH_CFPA1 base pointer */
- #define FLASH_CFPA1 ((FLASH_CFPA_Type *)FLASH_CFPA1_BASE)
- /** Peripheral FLASH_CFPA1 base pointer */
- #define FLASH_CFPA1_NS ((FLASH_CFPA_Type *)FLASH_CFPA1_BASE_NS)
- /** Peripheral FLASH_CFPA_SCRATCH base address */
- #define FLASH_CFPA_SCRATCH_BASE (0x1009DE00u)
- /** Peripheral FLASH_CFPA_SCRATCH base address */
- #define FLASH_CFPA_SCRATCH_BASE_NS (0x9DE00u)
- /** Peripheral FLASH_CFPA_SCRATCH base pointer */
- #define FLASH_CFPA_SCRATCH ((FLASH_CFPA_Type *)FLASH_CFPA_SCRATCH_BASE)
- /** Peripheral FLASH_CFPA_SCRATCH base pointer */
- #define FLASH_CFPA_SCRATCH_NS ((FLASH_CFPA_Type *)FLASH_CFPA_SCRATCH_BASE_NS)
- /** Array initializer of FLASH_CFPA peripheral base addresses */
- #define FLASH_CFPA_BASE_ADDRS { FLASH_CFPA0_BASE, FLASH_CFPA1_BASE, FLASH_CFPA_SCRATCH_BASE }
- /** Array initializer of FLASH_CFPA peripheral base pointers */
- #define FLASH_CFPA_BASE_PTRS { FLASH_CFPA0, FLASH_CFPA1, FLASH_CFPA_SCRATCH }
- /** Array initializer of FLASH_CFPA peripheral base addresses */
- #define FLASH_CFPA_BASE_ADDRS_NS { FLASH_CFPA0_BASE_NS, FLASH_CFPA1_BASE_NS, FLASH_CFPA_SCRATCH_BASE_NS }
- /** Array initializer of FLASH_CFPA peripheral base pointers */
- #define FLASH_CFPA_BASE_PTRS_NS { FLASH_CFPA0_NS, FLASH_CFPA1_NS, FLASH_CFPA_SCRATCH_NS }
-#else
- /** Peripheral FLASH_CFPA0 base address */
- #define FLASH_CFPA0_BASE (0x9E000u)
- /** Peripheral FLASH_CFPA0 base pointer */
- #define FLASH_CFPA0 ((FLASH_CFPA_Type *)FLASH_CFPA0_BASE)
- /** Peripheral FLASH_CFPA1 base address */
- #define FLASH_CFPA1_BASE (0x9E200u)
- /** Peripheral FLASH_CFPA1 base pointer */
- #define FLASH_CFPA1 ((FLASH_CFPA_Type *)FLASH_CFPA1_BASE)
- /** Peripheral FLASH_CFPA_SCRATCH base address */
- #define FLASH_CFPA_SCRATCH_BASE (0x9DE00u)
- /** Peripheral FLASH_CFPA_SCRATCH base pointer */
- #define FLASH_CFPA_SCRATCH ((FLASH_CFPA_Type *)FLASH_CFPA_SCRATCH_BASE)
- /** Array initializer of FLASH_CFPA peripheral base addresses */
- #define FLASH_CFPA_BASE_ADDRS { FLASH_CFPA0_BASE, FLASH_CFPA1_BASE, FLASH_CFPA_SCRATCH_BASE }
- /** Array initializer of FLASH_CFPA peripheral base pointers */
- #define FLASH_CFPA_BASE_PTRS { FLASH_CFPA0, FLASH_CFPA1, FLASH_CFPA_SCRATCH }
-#endif
-
-/*!
- * @}
- */ /* end of group FLASH_CFPA_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- FLASH_CMPA Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_CMPA_Peripheral_Access_Layer FLASH_CMPA Peripheral Access Layer
- * @{
- */
-
-/** FLASH_CMPA - Register Layout Typedef */
-typedef struct {
- __IO uint32_t BOOT_CFG; /**< ., offset: 0x0 */
- __IO uint32_t SPI_FLASH_CFG; /**< ., offset: 0x4 */
- __IO uint32_t USB_ID; /**< ., offset: 0x8 */
- __IO uint32_t SDIO_CFG; /**< ., offset: 0xC */
- __IO uint32_t CC_SOCU_PIN; /**< ., offset: 0x10 */
- __IO uint32_t CC_SOCU_DFLT; /**< ., offset: 0x14 */
- __IO uint32_t VENDOR_USAGE; /**< ., offset: 0x18 */
- __IO uint32_t SECURE_BOOT_CFG; /**< ., offset: 0x1C */
- __IO uint32_t PRINCE_BASE_ADDR; /**< ., offset: 0x20 */
- __IO uint32_t PRINCE_SR_0; /**< Region 0, sub-region enable, offset: 0x24 */
- __IO uint32_t PRINCE_SR_1; /**< Region 1, sub-region enable, offset: 0x28 */
- __IO uint32_t PRINCE_SR_2; /**< Region 2, sub-region enable, offset: 0x2C */
- __IO uint32_t XTAL_32KHZ_CAPABANK_TRIM; /**< Xtal 32kHz capabank triming., offset: 0x30 */
- __IO uint32_t XTAL_16MHZ_CAPABANK_TRIM; /**< Xtal 16MHz capabank triming., offset: 0x34 */
- uint8_t RESERVED_0[24];
- __IO uint32_t ROTKH[8]; /**< ROTKH0 for Root of Trust Keys Table hash[255:224] ROTKH1 for Root of Trust Keys Table hash[223:192] ROTKH2 for Root of Trust Keys Table hash[191:160] ROTKH3 for Root of Trust Keys Table hash[159:128] ROTKH4 for Root of Trust Keys Table hash[127:96] ROTKH5 for Root of Trust Keys Table hash[95:64] ROTKH6 for Root of Trust Keys Table hash[63:32] ROTKH7 for Root of Trust Keys Table hash[31:0], array offset: 0x50, array step: 0x4 */
- uint8_t RESERVED_1[144];
- __IO uint32_t CUSTOMER_DEFINED[56]; /**< Customer Defined (Programable through ROM API), array offset: 0x100, array step: 0x4 */
- __IO uint32_t SHA256_DIGEST[8]; /**< SHA256_DIGEST0 for DIGEST[31:0] SHA256_DIGEST1 for DIGEST[63:32] SHA256_DIGEST2 for DIGEST[95:64] SHA256_DIGEST3 for DIGEST[127:96] SHA256_DIGEST4 for DIGEST[159:128] SHA256_DIGEST5 for DIGEST[191:160] SHA256_DIGEST6 for DIGEST[223:192] SHA256_DIGEST7 for DIGEST[255:224], array offset: 0x1E0, array step: 0x4 */
-} FLASH_CMPA_Type;
-
-/* ----------------------------------------------------------------------------
- -- FLASH_CMPA Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_CMPA_Register_Masks FLASH_CMPA Register Masks
- * @{
- */
-
-/*! @name BOOT_CFG - . */
-/*! @{ */
-#define FLASH_CMPA_BOOT_CFG_DEFAULT_ISP_MODE_MASK (0x70U)
-#define FLASH_CMPA_BOOT_CFG_DEFAULT_ISP_MODE_SHIFT (4U)
-/*! DEFAULT_ISP_MODE - Default ISP mode:
- * 0b000..Auto ISP
- * 0b001..USB_HID_MSC
- * 0b010..SPI Slave ISP
- * 0b011..I2C Slave ISP
- * 0b111..Disable ISP fall through
- */
-#define FLASH_CMPA_BOOT_CFG_DEFAULT_ISP_MODE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_BOOT_CFG_DEFAULT_ISP_MODE_SHIFT)) & FLASH_CMPA_BOOT_CFG_DEFAULT_ISP_MODE_MASK)
-#define FLASH_CMPA_BOOT_CFG_BOOT_SPEED_MASK (0x180U)
-#define FLASH_CMPA_BOOT_CFG_BOOT_SPEED_SHIFT (7U)
-/*! BOOT_SPEED - Core clock:
- * 0b00..Defined by NMPA.SYSTEM_SPEED_CODE
- * 0b01..96MHz FRO
- * 0b10..48MHz FRO
- */
-#define FLASH_CMPA_BOOT_CFG_BOOT_SPEED(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_BOOT_CFG_BOOT_SPEED_SHIFT)) & FLASH_CMPA_BOOT_CFG_BOOT_SPEED_MASK)
-#define FLASH_CMPA_BOOT_CFG_BOOT_FAILURE_PIN_MASK (0xFF000000U)
-#define FLASH_CMPA_BOOT_CFG_BOOT_FAILURE_PIN_SHIFT (24U)
-/*! BOOT_FAILURE_PIN - GPIO port and pin number to use for indicating failure reason. The toggle
- * rate of the pin is used to decode the error type. [2:0] - Defines GPIO port [7:3] - Defines GPIO
- * pin
- */
-#define FLASH_CMPA_BOOT_CFG_BOOT_FAILURE_PIN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_BOOT_CFG_BOOT_FAILURE_PIN_SHIFT)) & FLASH_CMPA_BOOT_CFG_BOOT_FAILURE_PIN_MASK)
-/*! @} */
-
-/*! @name SPI_FLASH_CFG - . */
-/*! @{ */
-#define FLASH_CMPA_SPI_FLASH_CFG_SPI_RECOVERY_BOOT_EN_MASK (0x1FU)
-#define FLASH_CMPA_SPI_FLASH_CFG_SPI_RECOVERY_BOOT_EN_SHIFT (0U)
-/*! SPI_RECOVERY_BOOT_EN - SPI flash recovery boot is enabled, if non-zero value is written to this field.
- */
-#define FLASH_CMPA_SPI_FLASH_CFG_SPI_RECOVERY_BOOT_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SPI_FLASH_CFG_SPI_RECOVERY_BOOT_EN_SHIFT)) & FLASH_CMPA_SPI_FLASH_CFG_SPI_RECOVERY_BOOT_EN_MASK)
-/*! @} */
-
-/*! @name USB_ID - . */
-/*! @{ */
-#define FLASH_CMPA_USB_ID_USB_VENDOR_ID_MASK (0xFFFFU)
-#define FLASH_CMPA_USB_ID_USB_VENDOR_ID_SHIFT (0U)
-/*! USB_VENDOR_ID - .
- */
-#define FLASH_CMPA_USB_ID_USB_VENDOR_ID(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_USB_ID_USB_VENDOR_ID_SHIFT)) & FLASH_CMPA_USB_ID_USB_VENDOR_ID_MASK)
-#define FLASH_CMPA_USB_ID_USB_PRODUCT_ID_MASK (0xFFFF0000U)
-#define FLASH_CMPA_USB_ID_USB_PRODUCT_ID_SHIFT (16U)
-/*! USB_PRODUCT_ID - .
- */
-#define FLASH_CMPA_USB_ID_USB_PRODUCT_ID(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_USB_ID_USB_PRODUCT_ID_SHIFT)) & FLASH_CMPA_USB_ID_USB_PRODUCT_ID_MASK)
-/*! @} */
-
-/*! @name SDIO_CFG - . */
-/*! @{ */
-#define FLASH_CMPA_SDIO_CFG_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_SDIO_CFG_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_SDIO_CFG_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SDIO_CFG_FIELD_SHIFT)) & FLASH_CMPA_SDIO_CFG_FIELD_MASK)
-/*! @} */
-
-/*! @name CC_SOCU_PIN - . */
-/*! @{ */
-#define FLASH_CMPA_CC_SOCU_PIN_NIDEN_MASK (0x1U)
-#define FLASH_CMPA_CC_SOCU_PIN_NIDEN_SHIFT (0U)
-/*! NIDEN - Non Secure non-invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_NIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_NIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_DBGEN_MASK (0x2U)
-#define FLASH_CMPA_CC_SOCU_PIN_DBGEN_SHIFT (1U)
-/*! DBGEN - Non Secure debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_DBGEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_DBGEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_SPNIDEN_MASK (0x4U)
-#define FLASH_CMPA_CC_SOCU_PIN_SPNIDEN_SHIFT (2U)
-/*! SPNIDEN - Secure non-invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_SPNIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_SPNIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_SPNIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_SPIDEN_MASK (0x8U)
-#define FLASH_CMPA_CC_SOCU_PIN_SPIDEN_SHIFT (3U)
-/*! SPIDEN - Secure invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_SPIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_SPIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_SPIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_TAPEN_MASK (0x10U)
-#define FLASH_CMPA_CC_SOCU_PIN_TAPEN_SHIFT (4U)
-/*! TAPEN - JTAG TAP enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_TAPEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_TAPEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_TAPEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_CPU1_DBGEN_MASK (0x20U)
-#define FLASH_CMPA_CC_SOCU_PIN_CPU1_DBGEN_SHIFT (5U)
-/*! CPU1_DBGEN - CPU1 (Micro cortex M33) invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_CPU1_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_CPU1_DBGEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_CPU1_DBGEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_ISP_CMD_EN_MASK (0x40U)
-#define FLASH_CMPA_CC_SOCU_PIN_ISP_CMD_EN_SHIFT (6U)
-/*! ISP_CMD_EN - ISP Boot Command enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_ISP_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_ISP_CMD_EN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_ISP_CMD_EN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_FA_CMD_EN_MASK (0x80U)
-#define FLASH_CMPA_CC_SOCU_PIN_FA_CMD_EN_SHIFT (7U)
-/*! FA_CMD_EN - FA Command enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_FA_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_FA_CMD_EN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_FA_CMD_EN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_ME_CMD_EN_MASK (0x100U)
-#define FLASH_CMPA_CC_SOCU_PIN_ME_CMD_EN_SHIFT (8U)
-/*! ME_CMD_EN - Flash Mass Erase Command enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_ME_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_ME_CMD_EN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_ME_CMD_EN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_CPU1_NIDEN_MASK (0x200U)
-#define FLASH_CMPA_CC_SOCU_PIN_CPU1_NIDEN_SHIFT (9U)
-/*! CPU1_NIDEN - CPU1 (Micro cortex M33) non-invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_CPU1_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_CPU1_NIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_CPU1_NIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_UUID_CHECK_MASK (0x8000U)
-#define FLASH_CMPA_CC_SOCU_PIN_UUID_CHECK_SHIFT (15U)
-/*! UUID_CHECK - Enforce UUID match during Debug authentication.
- */
-#define FLASH_CMPA_CC_SOCU_PIN_UUID_CHECK(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_UUID_CHECK_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_UUID_CHECK_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_INVERSE_VALUE_MASK (0xFFFF0000U)
-#define FLASH_CMPA_CC_SOCU_PIN_INVERSE_VALUE_SHIFT (16U)
-/*! INVERSE_VALUE - inverse value of bits [15:0]
- */
-#define FLASH_CMPA_CC_SOCU_PIN_INVERSE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_INVERSE_VALUE_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_INVERSE_VALUE_MASK)
-/*! @} */
-
-/*! @name CC_SOCU_DFLT - . */
-/*! @{ */
-#define FLASH_CMPA_CC_SOCU_DFLT_NIDEN_MASK (0x1U)
-#define FLASH_CMPA_CC_SOCU_DFLT_NIDEN_SHIFT (0U)
-/*! NIDEN - Non Secure non-invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_NIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_NIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_DBGEN_MASK (0x2U)
-#define FLASH_CMPA_CC_SOCU_DFLT_DBGEN_SHIFT (1U)
-/*! DBGEN - Non Secure debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_DBGEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_DBGEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_SPNIDEN_MASK (0x4U)
-#define FLASH_CMPA_CC_SOCU_DFLT_SPNIDEN_SHIFT (2U)
-/*! SPNIDEN - Secure non-invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_SPNIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_SPNIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_SPNIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_SPIDEN_MASK (0x8U)
-#define FLASH_CMPA_CC_SOCU_DFLT_SPIDEN_SHIFT (3U)
-/*! SPIDEN - Secure invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_SPIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_SPIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_SPIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_TAPEN_MASK (0x10U)
-#define FLASH_CMPA_CC_SOCU_DFLT_TAPEN_SHIFT (4U)
-/*! TAPEN - JTAG TAP fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_TAPEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_TAPEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_TAPEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_CPU1_DBGEN_MASK (0x20U)
-#define FLASH_CMPA_CC_SOCU_DFLT_CPU1_DBGEN_SHIFT (5U)
-/*! CPU1_DBGEN - CPU1 (Micro cortex M33) invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_CPU1_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_CPU1_DBGEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_CPU1_DBGEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_ISP_CMD_EN_MASK (0x40U)
-#define FLASH_CMPA_CC_SOCU_DFLT_ISP_CMD_EN_SHIFT (6U)
-/*! ISP_CMD_EN - ISP Boot Command fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_ISP_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_ISP_CMD_EN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_ISP_CMD_EN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_FA_CMD_EN_MASK (0x80U)
-#define FLASH_CMPA_CC_SOCU_DFLT_FA_CMD_EN_SHIFT (7U)
-/*! FA_CMD_EN - FA Command fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_FA_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_FA_CMD_EN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_FA_CMD_EN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_ME_CMD_EN_MASK (0x100U)
-#define FLASH_CMPA_CC_SOCU_DFLT_ME_CMD_EN_SHIFT (8U)
-/*! ME_CMD_EN - Flash Mass Erase Command fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_ME_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_ME_CMD_EN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_ME_CMD_EN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_CPU1_NIDEN_MASK (0x200U)
-#define FLASH_CMPA_CC_SOCU_DFLT_CPU1_NIDEN_SHIFT (9U)
-/*! CPU1_NIDEN - CPU1 (Micro cortex M33) non-invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_CPU1_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_CPU1_NIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_CPU1_NIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_INVERSE_VALUE_MASK (0xFFFF0000U)
-#define FLASH_CMPA_CC_SOCU_DFLT_INVERSE_VALUE_SHIFT (16U)
-/*! INVERSE_VALUE - inverse value of bits [15:0]
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_INVERSE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_INVERSE_VALUE_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_INVERSE_VALUE_MASK)
-/*! @} */
-
-/*! @name VENDOR_USAGE - . */
-/*! @{ */
-#define FLASH_CMPA_VENDOR_USAGE_VENDOR_USAGE_MASK (0xFFFF0000U)
-#define FLASH_CMPA_VENDOR_USAGE_VENDOR_USAGE_SHIFT (16U)
-/*! VENDOR_USAGE - Upper 16 bits of vendor usage field defined in DAP. Lower 16-bits come from customer field area.
- */
-#define FLASH_CMPA_VENDOR_USAGE_VENDOR_USAGE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_VENDOR_USAGE_VENDOR_USAGE_SHIFT)) & FLASH_CMPA_VENDOR_USAGE_VENDOR_USAGE_MASK)
-/*! @} */
-
-/*! @name SECURE_BOOT_CFG - . */
-/*! @{ */
-#define FLASH_CMPA_SECURE_BOOT_CFG_RSA4K_MASK (0x3U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_RSA4K_SHIFT (0U)
-/*! RSA4K - Use RSA4096 keys only. 00- RSA2048 keys 01, 10, 11 - RSA4096 keys
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_RSA4K(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_RSA4K_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_RSA4K_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_ENC_NXP_CFG_MASK (0xCU)
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_ENC_NXP_CFG_SHIFT (2U)
-/*! DICE_ENC_NXP_CFG - Include NXP area in DICE computation. 00 - not included 01, 10, 11 - included
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_ENC_NXP_CFG(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_DICE_ENC_NXP_CFG_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_DICE_ENC_NXP_CFG_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_CUST_CFG_MASK (0x30U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_CUST_CFG_SHIFT (4U)
-/*! DICE_CUST_CFG - Include Customer factory area (including keys) in DICE computation. 00 - not included 01, 10, 11 - included
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_CUST_CFG(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_DICE_CUST_CFG_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_DICE_CUST_CFG_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_SKIP_DICE_MASK (0xC0U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_SKIP_DICE_SHIFT (6U)
-/*! SKIP_DICE - Skip DICE computation. 00 - Enable DICE 01,10,11 - Disable DICE
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_SKIP_DICE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_SKIP_DICE_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_SKIP_DICE_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_TZM_IMAGE_TYPE_MASK (0x300U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_TZM_IMAGE_TYPE_SHIFT (8U)
-/*! TZM_IMAGE_TYPE - TrustZone-M mode. 00 - TZM mode in image header. 01 - Disable TZ-M. Boots to
- * NonSecure. 10 - TZ-M enable boots to secure mode. 11 - Preset TZM checker from image header.
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_TZM_IMAGE_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_TZM_IMAGE_TYPE_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_TZM_IMAGE_TYPE_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_SET_KEY_MASK (0xC00U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_SET_KEY_SHIFT (10U)
-/*! BLOCK_SET_KEY - Block PUF key code generation. 00 - Enable Key code generation 01, 10, 11 - Disable key code generation
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_SET_KEY(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_SET_KEY_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_SET_KEY_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_ENROLL_MASK (0x3000U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_ENROLL_SHIFT (12U)
-/*! BLOCK_ENROLL - Block PUF enrollement. 00 - Enable enrollment mode 01, 10, 11 - Disable further enrollmnet
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_ENROLL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_ENROLL_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_ENROLL_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_INC_SEC_EPOCH_MASK (0xC000U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_INC_SEC_EPOCH_SHIFT (14U)
-/*! DICE_INC_SEC_EPOCH - Include security EPOCH in DICE
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_INC_SEC_EPOCH(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_DICE_INC_SEC_EPOCH_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_DICE_INC_SEC_EPOCH_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_SEC_BOOT_EN_MASK (0xC0000000U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_SEC_BOOT_EN_SHIFT (30U)
-/*! SEC_BOOT_EN - Secure boot enable. 00 - Plain image (internal flash with or without CRC) 01, 10,
- * 11 - Boot signed images. (internal flash, RSA signed)
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_SEC_BOOT_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_SEC_BOOT_EN_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_SEC_BOOT_EN_MASK)
-/*! @} */
-
-/*! @name PRINCE_BASE_ADDR - . */
-/*! @{ */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR0_PRG_MASK (0xFU)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR0_PRG_SHIFT (0U)
-/*! ADDR0_PRG - Programmable portion of the base address of region 0.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR0_PRG(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_ADDR0_PRG_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_ADDR0_PRG_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR1_PRG_MASK (0xF0U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR1_PRG_SHIFT (4U)
-/*! ADDR1_PRG - Programmable portion of the base address of region 1.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR1_PRG(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_ADDR1_PRG_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_ADDR1_PRG_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR2_PRG_MASK (0xF00U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR2_PRG_SHIFT (8U)
-/*! ADDR2_PRG - Programmable portion of the base address of region 2.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR2_PRG(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_ADDR2_PRG_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_ADDR2_PRG_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG0_MASK (0x30000U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG0_SHIFT (16U)
-/*! LOCK_REG0 - Lock PRINCE region0 settings. 00 - Region is not locked. 01, 10, 11 - Region is locked.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG0(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG0_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG0_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG1_MASK (0xC0000U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG1_SHIFT (18U)
-/*! LOCK_REG1 - Lock PRINCE region1 settings. 00 - Region is not locked. 01, 10, 11 - Region is locked.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG1(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG1_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG1_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG2_MASK (0x300000U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG2_SHIFT (20U)
-/*! LOCK_REG2 - Lock PRINCE region2 settings. 00 - Region is not locked. 01, 10, 11 - Region is locked.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG2(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG2_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG2_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG0_ERASE_CHECK_EN_MASK (0x3000000U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG0_ERASE_CHECK_EN_SHIFT (24U)
-/*! REG0_ERASE_CHECK_EN - For PRINCE region0 enable checking whether all encrypted pages are erased
- * together. 00 - Check is disabled. 01, 10, 11 - Check is enabled.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG0_ERASE_CHECK_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_REG0_ERASE_CHECK_EN_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_REG0_ERASE_CHECK_EN_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG1_ERASE_CHECK_EN_MASK (0xC000000U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG1_ERASE_CHECK_EN_SHIFT (26U)
-/*! REG1_ERASE_CHECK_EN - For PRINCE region1 enable checking whether all encrypted pages are erased
- * together. 00 - Check is disabled. 01, 10, 11 - Check is enabled.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG1_ERASE_CHECK_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_REG1_ERASE_CHECK_EN_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_REG1_ERASE_CHECK_EN_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG2_ERASE_CHECK_EN_MASK (0x30000000U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG2_ERASE_CHECK_EN_SHIFT (28U)
-/*! REG2_ERASE_CHECK_EN - For PRINCE region2 enable checking whether all encrypted pages are erased
- * together. 00 - Check is disabled. 01, 10, 11 - Check is enabled.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG2_ERASE_CHECK_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_REG2_ERASE_CHECK_EN_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_REG2_ERASE_CHECK_EN_MASK)
-/*! @} */
-
-/*! @name PRINCE_SR_0 - Region 0, sub-region enable */
-/*! @{ */
-#define FLASH_CMPA_PRINCE_SR_0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_PRINCE_SR_0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_PRINCE_SR_0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_SR_0_FIELD_SHIFT)) & FLASH_CMPA_PRINCE_SR_0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_SR_1 - Region 1, sub-region enable */
-/*! @{ */
-#define FLASH_CMPA_PRINCE_SR_1_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_PRINCE_SR_1_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_PRINCE_SR_1_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_SR_1_FIELD_SHIFT)) & FLASH_CMPA_PRINCE_SR_1_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_SR_2 - Region 2, sub-region enable */
-/*! @{ */
-#define FLASH_CMPA_PRINCE_SR_2_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_PRINCE_SR_2_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_PRINCE_SR_2_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_SR_2_FIELD_SHIFT)) & FLASH_CMPA_PRINCE_SR_2_FIELD_MASK)
-/*! @} */
-
-/*! @name XTAL_32KHZ_CAPABANK_TRIM - Xtal 32kHz capabank triming. */
-/*! @{ */
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_TRIM_VALID_MASK (0x1U)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_TRIM_VALID_SHIFT (0U)
-/*! TRIM_VALID - 0 : Capa Bank trimmings not valid. Default trimmings value are used. 1 : Capa Bank trimmings valid.
- */
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_TRIM_VALID(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_TRIM_VALID_SHIFT)) & FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_TRIM_VALID_MASK)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_MASK (0x7FEU)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_SHIFT (1U)
-/*! XTAL_LOAD_CAP_IEC_PF_X100 - Load capacitance, pF x 100. For example, 6pF becomes 600.
- */
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_SHIFT)) & FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_MASK)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_MASK (0x1FF800U)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_SHIFT (11U)
-/*! PCB_XIN_PARA_CAP_PF_X100 - PCB XIN parasitic capacitance, pF x 100. For example, 6pF becomes 600.
- */
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_SHIFT)) & FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_MASK)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_MASK (0x7FE00000U)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_SHIFT (21U)
-/*! PCB_XOUT_PARA_CAP_PF_X100 - PCB XOUT parasitic capacitance, pF x 100. For example, 6pF becomes 600.
- */
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_SHIFT)) & FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_MASK)
-/*! @} */
-
-/*! @name XTAL_16MHZ_CAPABANK_TRIM - Xtal 16MHz capabank triming. */
-/*! @{ */
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_TRIM_VALID_MASK (0x1U)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_TRIM_VALID_SHIFT (0U)
-/*! TRIM_VALID - 0 : Capa Bank trimmings not valid. Default trimmings value are used. 1 : Capa Bank trimmings valid.
- */
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_TRIM_VALID(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_TRIM_VALID_SHIFT)) & FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_TRIM_VALID_MASK)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_MASK (0x7FEU)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_SHIFT (1U)
-/*! XTAL_LOAD_CAP_IEC_PF_X100 - Load capacitance, pF x 100. For example, 6pF becomes 600.
- */
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_SHIFT)) & FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_MASK)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_MASK (0x1FF800U)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_SHIFT (11U)
-/*! PCB_XIN_PARA_CAP_PF_X100 - PCB XIN parasitic capacitance, pF x 100. For example, 6pF becomes 600.
- */
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_SHIFT)) & FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_MASK)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_MASK (0x7FE00000U)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_SHIFT (21U)
-/*! PCB_XOUT_PARA_CAP_PF_X100 - PCB XOUT parasitic capacitance, pF x 100. For example, 6pF becomes 600.
- */
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_SHIFT)) & FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_MASK)
-/*! @} */
-
-/*! @name ROTKH - ROTKH0 for Root of Trust Keys Table hash[255:224] ROTKH1 for Root of Trust Keys Table hash[223:192] ROTKH2 for Root of Trust Keys Table hash[191:160] ROTKH3 for Root of Trust Keys Table hash[159:128] ROTKH4 for Root of Trust Keys Table hash[127:96] ROTKH5 for Root of Trust Keys Table hash[95:64] ROTKH6 for Root of Trust Keys Table hash[63:32] ROTKH7 for Root of Trust Keys Table hash[31:0] */
-/*! @{ */
-#define FLASH_CMPA_ROTKH_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_ROTKH_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_ROTKH_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_ROTKH_FIELD_SHIFT)) & FLASH_CMPA_ROTKH_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CMPA_ROTKH */
-#define FLASH_CMPA_ROTKH_COUNT (8U)
-
-/*! @name CUSTOMER_DEFINED - Customer Defined (Programable through ROM API) */
-/*! @{ */
-#define FLASH_CMPA_CUSTOMER_DEFINED_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_CUSTOMER_DEFINED_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_CUSTOMER_DEFINED_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CUSTOMER_DEFINED_FIELD_SHIFT)) & FLASH_CMPA_CUSTOMER_DEFINED_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CMPA_CUSTOMER_DEFINED */
-#define FLASH_CMPA_CUSTOMER_DEFINED_COUNT (56U)
-
-/*! @name SHA256_DIGEST - SHA256_DIGEST0 for DIGEST[31:0] SHA256_DIGEST1 for DIGEST[63:32] SHA256_DIGEST2 for DIGEST[95:64] SHA256_DIGEST3 for DIGEST[127:96] SHA256_DIGEST4 for DIGEST[159:128] SHA256_DIGEST5 for DIGEST[191:160] SHA256_DIGEST6 for DIGEST[223:192] SHA256_DIGEST7 for DIGEST[255:224] */
-/*! @{ */
-#define FLASH_CMPA_SHA256_DIGEST_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_SHA256_DIGEST_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_SHA256_DIGEST_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SHA256_DIGEST_FIELD_SHIFT)) & FLASH_CMPA_SHA256_DIGEST_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CMPA_SHA256_DIGEST */
-#define FLASH_CMPA_SHA256_DIGEST_COUNT (8U)
-
-
-/*!
- * @}
- */ /* end of group FLASH_CMPA_Register_Masks */
-
-
-/* FLASH_CMPA - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral FLASH_CMPA base address */
- #define FLASH_CMPA_BASE (0x1009E400u)
- /** Peripheral FLASH_CMPA base address */
- #define FLASH_CMPA_BASE_NS (0x9E400u)
- /** Peripheral FLASH_CMPA base pointer */
- #define FLASH_CMPA ((FLASH_CMPA_Type *)FLASH_CMPA_BASE)
- /** Peripheral FLASH_CMPA base pointer */
- #define FLASH_CMPA_NS ((FLASH_CMPA_Type *)FLASH_CMPA_BASE_NS)
- /** Array initializer of FLASH_CMPA peripheral base addresses */
- #define FLASH_CMPA_BASE_ADDRS { FLASH_CMPA_BASE }
- /** Array initializer of FLASH_CMPA peripheral base pointers */
- #define FLASH_CMPA_BASE_PTRS { FLASH_CMPA }
- /** Array initializer of FLASH_CMPA peripheral base addresses */
- #define FLASH_CMPA_BASE_ADDRS_NS { FLASH_CMPA_BASE_NS }
- /** Array initializer of FLASH_CMPA peripheral base pointers */
- #define FLASH_CMPA_BASE_PTRS_NS { FLASH_CMPA_NS }
-#else
- /** Peripheral FLASH_CMPA base address */
- #define FLASH_CMPA_BASE (0x9E400u)
- /** Peripheral FLASH_CMPA base pointer */
- #define FLASH_CMPA ((FLASH_CMPA_Type *)FLASH_CMPA_BASE)
- /** Array initializer of FLASH_CMPA peripheral base addresses */
- #define FLASH_CMPA_BASE_ADDRS { FLASH_CMPA_BASE }
- /** Array initializer of FLASH_CMPA peripheral base pointers */
- #define FLASH_CMPA_BASE_PTRS { FLASH_CMPA }
-#endif
-
-/*!
- * @}
- */ /* end of group FLASH_CMPA_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- FLASH_KEY_STORE Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_KEY_STORE_Peripheral_Access_Layer FLASH_KEY_STORE Peripheral Access Layer
- * @{
- */
-
-/** FLASH_KEY_STORE - Register Layout Typedef */
-typedef struct {
- struct { /* offset: 0x0 */
- __IO uint32_t HEADER; /**< Valid Key Sore Header : 0x95959595, offset: 0x0 */
- __IO uint32_t PUF_DISCHARGE_TIME_IN_MS; /**< puf discharge time in ms., offset: 0x4 */
- } KEY_STORE_HEADER;
- __IO uint32_t ACTIVATION_CODE[298]; /**< ., array offset: 0x8, array step: 0x4 */
- union { /* offset: 0x4B0 */
- __IO uint32_t SBKEY_KEY_CODE[14]; /**< ., array offset: 0x4B0, array step: 0x4 */
- struct { /* offset: 0x4B0 */
- __IO uint32_t SBKEY_HEADER0; /**< ., offset: 0x4B0 */
- __IO uint32_t SBKEY_HEADER1; /**< ., offset: 0x4B4 */
- __IO uint32_t SBKEY_BODY[12]; /**< ., array offset: 0x4B8, array step: 0x4 */
- } SBKEY_KEY_CODE_CORE;
- };
- union { /* offset: 0x4E8 */
- __IO uint32_t USER_KEK_KEY_CODE[14]; /**< ., array offset: 0x4E8, array step: 0x4 */
- struct { /* offset: 0x4E8 */
- __IO uint32_t USER_KEK_HEADER0; /**< ., offset: 0x4E8 */
- __IO uint32_t USER_KEK_HEADER1; /**< ., offset: 0x4EC */
- __IO uint32_t USER_KEK_BODY[12]; /**< ., array offset: 0x4F0, array step: 0x4 */
- } USER_KEK_KEY_CODE_CORE;
- };
- union { /* offset: 0x520 */
- __IO uint32_t UDS_KEY_CODE[14]; /**< ., array offset: 0x520, array step: 0x4 */
- struct { /* offset: 0x520 */
- __IO uint32_t UDS_HEADER0; /**< ., offset: 0x520 */
- __IO uint32_t UDS_HEADER1; /**< ., offset: 0x524 */
- __IO uint32_t UDS_BODY[12]; /**< ., array offset: 0x528, array step: 0x4 */
- } UDS_KEY_CODE_CORE;
- };
- union { /* offset: 0x558 */
- __IO uint32_t PRINCE_REGION0_KEY_CODE[14]; /**< ., array offset: 0x558, array step: 0x4 */
- struct { /* offset: 0x558 */
- __IO uint32_t PRINCE_REGION0_HEADER0; /**< ., offset: 0x558 */
- __IO uint32_t PRINCE_REGION0_HEADER1; /**< ., offset: 0x55C */
- __IO uint32_t PRINCE_REGION0_BODY[12]; /**< ., array offset: 0x560, array step: 0x4 */
- } PRINCE_REGION0_KEY_CODE_CORE;
- };
- union { /* offset: 0x590 */
- __IO uint32_t PRINCE_REGION1_KEY_CODE[14]; /**< ., array offset: 0x590, array step: 0x4 */
- struct { /* offset: 0x590 */
- __IO uint32_t PRINCE_REGION1_HEADER0; /**< ., offset: 0x590 */
- __IO uint32_t PRINCE_REGION1_HEADER1; /**< ., offset: 0x594 */
- __IO uint32_t PRINCE_REGION1_BODY[12]; /**< ., array offset: 0x598, array step: 0x4 */
- } PRINCE_REGION1_KEY_CODE_CORE;
- };
- union { /* offset: 0x5C8 */
- __IO uint32_t PRINCE_REGION2_KEY_CODE[14]; /**< ., array offset: 0x5C8, array step: 0x4 */
- struct { /* offset: 0x5C8 */
- __IO uint32_t PRINCE_REGION2_HEADER0; /**< ., offset: 0x5C8 */
- __IO uint32_t PRINCE_REGION2_HEADER1; /**< ., offset: 0x5CC */
- __IO uint32_t PRINCE_REGION2_BODY[12]; /**< ., array offset: 0x5D0, array step: 0x4 */
- } PRINCE_REGION2_KEY_CODE_CORE;
- };
-} FLASH_KEY_STORE_Type;
-
-/* ----------------------------------------------------------------------------
- -- FLASH_KEY_STORE Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_KEY_STORE_Register_Masks FLASH_KEY_STORE Register Masks
- * @{
- */
-
-/*! @name HEADER - Valid Key Sore Header : 0x95959595 */
-/*! @{ */
-#define FLASH_KEY_STORE_HEADER_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_HEADER_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_HEADER_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_HEADER_FIELD_SHIFT)) & FLASH_KEY_STORE_HEADER_FIELD_MASK)
-/*! @} */
-
-/*! @name PUF_DISCHARGE_TIME_IN_MS - puf discharge time in ms. */
-/*! @{ */
-#define FLASH_KEY_STORE_PUF_DISCHARGE_TIME_IN_MS_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PUF_DISCHARGE_TIME_IN_MS_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PUF_DISCHARGE_TIME_IN_MS_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PUF_DISCHARGE_TIME_IN_MS_FIELD_SHIFT)) & FLASH_KEY_STORE_PUF_DISCHARGE_TIME_IN_MS_FIELD_MASK)
-/*! @} */
-
-/*! @name ACTIVATION_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_ACTIVATION_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_ACTIVATION_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_ACTIVATION_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_ACTIVATION_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_ACTIVATION_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_ACTIVATION_CODE */
-#define FLASH_KEY_STORE_ACTIVATION_CODE_COUNT (298U)
-
-/*! @name SBKEY_KEY_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_SBKEY_KEY_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_SBKEY_KEY_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_SBKEY_KEY_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_SBKEY_KEY_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_SBKEY_KEY_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_SBKEY_KEY_CODE */
-#define FLASH_KEY_STORE_SBKEY_KEY_CODE_COUNT (14U)
-
-/*! @name SBKEY_HEADER0 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_SBKEY_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_SBKEY_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_SBKEY_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_SBKEY_HEADER0_FIELD_SHIFT)) & FLASH_KEY_STORE_SBKEY_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name SBKEY_HEADER1 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_SBKEY_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_KEY_STORE_SBKEY_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_KEY_STORE_SBKEY_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_SBKEY_HEADER1_TYPE_SHIFT)) & FLASH_KEY_STORE_SBKEY_HEADER1_TYPE_MASK)
-#define FLASH_KEY_STORE_SBKEY_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_KEY_STORE_SBKEY_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_KEY_STORE_SBKEY_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_SBKEY_HEADER1_INDEX_SHIFT)) & FLASH_KEY_STORE_SBKEY_HEADER1_INDEX_MASK)
-#define FLASH_KEY_STORE_SBKEY_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_KEY_STORE_SBKEY_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_KEY_STORE_SBKEY_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_SBKEY_HEADER1_SIZE_SHIFT)) & FLASH_KEY_STORE_SBKEY_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name SBKEY_BODY - . */
-/*! @{ */
-#define FLASH_KEY_STORE_SBKEY_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_SBKEY_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_SBKEY_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_SBKEY_BODY_FIELD_SHIFT)) & FLASH_KEY_STORE_SBKEY_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_SBKEY_BODY */
-#define FLASH_KEY_STORE_SBKEY_BODY_COUNT (12U)
-
-/*! @name USER_KEK_KEY_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_USER_KEK_KEY_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_USER_KEK_KEY_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_USER_KEK_KEY_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_USER_KEK_KEY_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_USER_KEK_KEY_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_USER_KEK_KEY_CODE */
-#define FLASH_KEY_STORE_USER_KEK_KEY_CODE_COUNT (14U)
-
-/*! @name USER_KEK_HEADER0 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_USER_KEK_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_USER_KEK_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_USER_KEK_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_USER_KEK_HEADER0_FIELD_SHIFT)) & FLASH_KEY_STORE_USER_KEK_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name USER_KEK_HEADER1 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_USER_KEK_HEADER1_TYPE_SHIFT)) & FLASH_KEY_STORE_USER_KEK_HEADER1_TYPE_MASK)
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_USER_KEK_HEADER1_INDEX_SHIFT)) & FLASH_KEY_STORE_USER_KEK_HEADER1_INDEX_MASK)
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_USER_KEK_HEADER1_SIZE_SHIFT)) & FLASH_KEY_STORE_USER_KEK_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name USER_KEK_BODY - . */
-/*! @{ */
-#define FLASH_KEY_STORE_USER_KEK_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_USER_KEK_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_USER_KEK_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_USER_KEK_BODY_FIELD_SHIFT)) & FLASH_KEY_STORE_USER_KEK_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_USER_KEK_BODY */
-#define FLASH_KEY_STORE_USER_KEK_BODY_COUNT (12U)
-
-/*! @name UDS_KEY_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_UDS_KEY_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_UDS_KEY_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_UDS_KEY_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_UDS_KEY_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_UDS_KEY_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_UDS_KEY_CODE */
-#define FLASH_KEY_STORE_UDS_KEY_CODE_COUNT (14U)
-
-/*! @name UDS_HEADER0 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_UDS_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_UDS_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_UDS_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_UDS_HEADER0_FIELD_SHIFT)) & FLASH_KEY_STORE_UDS_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name UDS_HEADER1 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_UDS_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_KEY_STORE_UDS_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_KEY_STORE_UDS_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_UDS_HEADER1_TYPE_SHIFT)) & FLASH_KEY_STORE_UDS_HEADER1_TYPE_MASK)
-#define FLASH_KEY_STORE_UDS_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_KEY_STORE_UDS_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_KEY_STORE_UDS_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_UDS_HEADER1_INDEX_SHIFT)) & FLASH_KEY_STORE_UDS_HEADER1_INDEX_MASK)
-#define FLASH_KEY_STORE_UDS_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_KEY_STORE_UDS_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_KEY_STORE_UDS_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_UDS_HEADER1_SIZE_SHIFT)) & FLASH_KEY_STORE_UDS_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name UDS_BODY - . */
-/*! @{ */
-#define FLASH_KEY_STORE_UDS_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_UDS_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_UDS_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_UDS_BODY_FIELD_SHIFT)) & FLASH_KEY_STORE_UDS_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_UDS_BODY */
-#define FLASH_KEY_STORE_UDS_BODY_COUNT (12U)
-
-/*! @name PRINCE_REGION0_KEY_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE */
-#define FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE_COUNT (14U)
-
-/*! @name PRINCE_REGION0_HEADER0 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION0_HEADER0_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION0_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION0_HEADER1 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_TYPE_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_TYPE_MASK)
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_INDEX_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_INDEX_MASK)
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_SIZE_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION0_BODY - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION0_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION0_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION0_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION0_BODY_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION0_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_PRINCE_REGION0_BODY */
-#define FLASH_KEY_STORE_PRINCE_REGION0_BODY_COUNT (12U)
-
-/*! @name PRINCE_REGION1_KEY_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE */
-#define FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE_COUNT (14U)
-
-/*! @name PRINCE_REGION1_HEADER0 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION1_HEADER0_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION1_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION1_HEADER1 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_TYPE_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_TYPE_MASK)
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_INDEX_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_INDEX_MASK)
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_SIZE_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION1_BODY - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION1_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION1_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION1_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION1_BODY_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION1_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_PRINCE_REGION1_BODY */
-#define FLASH_KEY_STORE_PRINCE_REGION1_BODY_COUNT (12U)
-
-/*! @name PRINCE_REGION2_KEY_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE */
-#define FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE_COUNT (14U)
-
-/*! @name PRINCE_REGION2_HEADER0 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION2_HEADER0_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION2_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION2_HEADER1 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_TYPE_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_TYPE_MASK)
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_INDEX_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_INDEX_MASK)
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_SIZE_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION2_BODY - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION2_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION2_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION2_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION2_BODY_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION2_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_PRINCE_REGION2_BODY */
-#define FLASH_KEY_STORE_PRINCE_REGION2_BODY_COUNT (12U)
-
-
-/*!
- * @}
- */ /* end of group FLASH_KEY_STORE_Register_Masks */
-
-
-/* FLASH_KEY_STORE - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral FLASH_KEY_STORE base address */
- #define FLASH_KEY_STORE_BASE (0x1009E600u)
- /** Peripheral FLASH_KEY_STORE base address */
- #define FLASH_KEY_STORE_BASE_NS (0x9E600u)
- /** Peripheral FLASH_KEY_STORE base pointer */
- #define FLASH_KEY_STORE ((FLASH_KEY_STORE_Type *)FLASH_KEY_STORE_BASE)
- /** Peripheral FLASH_KEY_STORE base pointer */
- #define FLASH_KEY_STORE_NS ((FLASH_KEY_STORE_Type *)FLASH_KEY_STORE_BASE_NS)
- /** Array initializer of FLASH_KEY_STORE peripheral base addresses */
- #define FLASH_KEY_STORE_BASE_ADDRS { FLASH_KEY_STORE_BASE }
- /** Array initializer of FLASH_KEY_STORE peripheral base pointers */
- #define FLASH_KEY_STORE_BASE_PTRS { FLASH_KEY_STORE }
- /** Array initializer of FLASH_KEY_STORE peripheral base addresses */
- #define FLASH_KEY_STORE_BASE_ADDRS_NS { FLASH_KEY_STORE_BASE_NS }
- /** Array initializer of FLASH_KEY_STORE peripheral base pointers */
- #define FLASH_KEY_STORE_BASE_PTRS_NS { FLASH_KEY_STORE_NS }
-#else
- /** Peripheral FLASH_KEY_STORE base address */
- #define FLASH_KEY_STORE_BASE (0x9E600u)
- /** Peripheral FLASH_KEY_STORE base pointer */
- #define FLASH_KEY_STORE ((FLASH_KEY_STORE_Type *)FLASH_KEY_STORE_BASE)
- /** Array initializer of FLASH_KEY_STORE peripheral base addresses */
- #define FLASH_KEY_STORE_BASE_ADDRS { FLASH_KEY_STORE_BASE }
- /** Array initializer of FLASH_KEY_STORE peripheral base pointers */
- #define FLASH_KEY_STORE_BASE_PTRS { FLASH_KEY_STORE }
-#endif
-
-/*!
- * @}
- */ /* end of group FLASH_KEY_STORE_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- FLEXCOMM Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLEXCOMM_Peripheral_Access_Layer FLEXCOMM Peripheral Access Layer
- * @{
- */
-
-/** FLEXCOMM - Register Layout Typedef */
-typedef struct {
- uint8_t RESERVED_0[4088];
- __IO uint32_t PSELID; /**< Peripheral Select and Flexcomm ID register., offset: 0xFF8 */
- __I uint32_t PID; /**< Peripheral identification register., offset: 0xFFC */
-} FLEXCOMM_Type;
-
-/* ----------------------------------------------------------------------------
- -- FLEXCOMM Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLEXCOMM_Register_Masks FLEXCOMM Register Masks
- * @{
- */
-
-/*! @name PSELID - Peripheral Select and Flexcomm ID register. */
-/*! @{ */
-#define FLEXCOMM_PSELID_PERSEL_MASK (0x7U)
-#define FLEXCOMM_PSELID_PERSEL_SHIFT (0U)
-/*! PERSEL - Peripheral Select. This field is writable by software.
- * 0b000..No peripheral selected.
- * 0b001..USART function selected.
- * 0b010..SPI function selected.
- * 0b011..I2C function selected.
- * 0b100..I2S transmit function selected.
- * 0b101..I2S receive function selected.
- * 0b110..Reserved
- * 0b111..Reserved
- */
-#define FLEXCOMM_PSELID_PERSEL(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_PERSEL_SHIFT)) & FLEXCOMM_PSELID_PERSEL_MASK)
-#define FLEXCOMM_PSELID_LOCK_MASK (0x8U)
-#define FLEXCOMM_PSELID_LOCK_SHIFT (3U)
-/*! LOCK - Lock the peripheral select. This field is writable by software.
- * 0b0..Peripheral select can be changed by software.
- * 0b1..Peripheral select is locked and cannot be changed until this Flexcomm or the entire device is reset.
- */
-#define FLEXCOMM_PSELID_LOCK(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_LOCK_SHIFT)) & FLEXCOMM_PSELID_LOCK_MASK)
-#define FLEXCOMM_PSELID_USARTPRESENT_MASK (0x10U)
-#define FLEXCOMM_PSELID_USARTPRESENT_SHIFT (4U)
-/*! USARTPRESENT - USART present indicator. This field is Read-only.
- * 0b0..This Flexcomm does not include the USART function.
- * 0b1..This Flexcomm includes the USART function.
- */
-#define FLEXCOMM_PSELID_USARTPRESENT(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_USARTPRESENT_SHIFT)) & FLEXCOMM_PSELID_USARTPRESENT_MASK)
-#define FLEXCOMM_PSELID_SPIPRESENT_MASK (0x20U)
-#define FLEXCOMM_PSELID_SPIPRESENT_SHIFT (5U)
-/*! SPIPRESENT - SPI present indicator. This field is Read-only.
- * 0b0..This Flexcomm does not include the SPI function.
- * 0b1..This Flexcomm includes the SPI function.
- */
-#define FLEXCOMM_PSELID_SPIPRESENT(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_SPIPRESENT_SHIFT)) & FLEXCOMM_PSELID_SPIPRESENT_MASK)
-#define FLEXCOMM_PSELID_I2CPRESENT_MASK (0x40U)
-#define FLEXCOMM_PSELID_I2CPRESENT_SHIFT (6U)
-/*! I2CPRESENT - I2C present indicator. This field is Read-only.
- * 0b0..This Flexcomm does not include the I2C function.
- * 0b1..This Flexcomm includes the I2C function.
- */
-#define FLEXCOMM_PSELID_I2CPRESENT(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_I2CPRESENT_SHIFT)) & FLEXCOMM_PSELID_I2CPRESENT_MASK)
-#define FLEXCOMM_PSELID_I2SPRESENT_MASK (0x80U)
-#define FLEXCOMM_PSELID_I2SPRESENT_SHIFT (7U)
-/*! I2SPRESENT - I 2S present indicator. This field is Read-only.
- * 0b0..This Flexcomm does not include the I2S function.
- * 0b1..This Flexcomm includes the I2S function.
- */
-#define FLEXCOMM_PSELID_I2SPRESENT(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_I2SPRESENT_SHIFT)) & FLEXCOMM_PSELID_I2SPRESENT_MASK)
-#define FLEXCOMM_PSELID_ID_MASK (0xFFFFF000U)
-#define FLEXCOMM_PSELID_ID_SHIFT (12U)
-/*! ID - Flexcomm ID.
- */
-#define FLEXCOMM_PSELID_ID(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_ID_SHIFT)) & FLEXCOMM_PSELID_ID_MASK)
-/*! @} */
-
-/*! @name PID - Peripheral identification register. */
-/*! @{ */
-#define FLEXCOMM_PID_APERTURE_MASK (0xFFU)
-#define FLEXCOMM_PID_APERTURE_SHIFT (0U)
-/*! APERTURE - size aperture for the register port on the bus (APB or AHB).
- */
-#define FLEXCOMM_PID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PID_APERTURE_SHIFT)) & FLEXCOMM_PID_APERTURE_MASK)
-#define FLEXCOMM_PID_MINOR_REV_MASK (0xF00U)
-#define FLEXCOMM_PID_MINOR_REV_SHIFT (8U)
-/*! MINOR_REV - Minor revision of module implementation.
- */
-#define FLEXCOMM_PID_MINOR_REV(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PID_MINOR_REV_SHIFT)) & FLEXCOMM_PID_MINOR_REV_MASK)
-#define FLEXCOMM_PID_MAJOR_REV_MASK (0xF000U)
-#define FLEXCOMM_PID_MAJOR_REV_SHIFT (12U)
-/*! MAJOR_REV - Major revision of module implementation.
- */
-#define FLEXCOMM_PID_MAJOR_REV(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PID_MAJOR_REV_SHIFT)) & FLEXCOMM_PID_MAJOR_REV_MASK)
-#define FLEXCOMM_PID_ID_MASK (0xFFFF0000U)
-#define FLEXCOMM_PID_ID_SHIFT (16U)
-/*! ID - Module identifier for the selected function.
- */
-#define FLEXCOMM_PID_ID(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PID_ID_SHIFT)) & FLEXCOMM_PID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group FLEXCOMM_Register_Masks */
-
-
-/* FLEXCOMM - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral FLEXCOMM0 base address */
- #define FLEXCOMM0_BASE (0x50086000u)
- /** Peripheral FLEXCOMM0 base address */
- #define FLEXCOMM0_BASE_NS (0x40086000u)
- /** Peripheral FLEXCOMM0 base pointer */
- #define FLEXCOMM0 ((FLEXCOMM_Type *)FLEXCOMM0_BASE)
- /** Peripheral FLEXCOMM0 base pointer */
- #define FLEXCOMM0_NS ((FLEXCOMM_Type *)FLEXCOMM0_BASE_NS)
- /** Peripheral FLEXCOMM1 base address */
- #define FLEXCOMM1_BASE (0x50087000u)
- /** Peripheral FLEXCOMM1 base address */
- #define FLEXCOMM1_BASE_NS (0x40087000u)
- /** Peripheral FLEXCOMM1 base pointer */
- #define FLEXCOMM1 ((FLEXCOMM_Type *)FLEXCOMM1_BASE)
- /** Peripheral FLEXCOMM1 base pointer */
- #define FLEXCOMM1_NS ((FLEXCOMM_Type *)FLEXCOMM1_BASE_NS)
- /** Peripheral FLEXCOMM2 base address */
- #define FLEXCOMM2_BASE (0x50088000u)
- /** Peripheral FLEXCOMM2 base address */
- #define FLEXCOMM2_BASE_NS (0x40088000u)
- /** Peripheral FLEXCOMM2 base pointer */
- #define FLEXCOMM2 ((FLEXCOMM_Type *)FLEXCOMM2_BASE)
- /** Peripheral FLEXCOMM2 base pointer */
- #define FLEXCOMM2_NS ((FLEXCOMM_Type *)FLEXCOMM2_BASE_NS)
- /** Peripheral FLEXCOMM3 base address */
- #define FLEXCOMM3_BASE (0x50089000u)
- /** Peripheral FLEXCOMM3 base address */
- #define FLEXCOMM3_BASE_NS (0x40089000u)
- /** Peripheral FLEXCOMM3 base pointer */
- #define FLEXCOMM3 ((FLEXCOMM_Type *)FLEXCOMM3_BASE)
- /** Peripheral FLEXCOMM3 base pointer */
- #define FLEXCOMM3_NS ((FLEXCOMM_Type *)FLEXCOMM3_BASE_NS)
- /** Peripheral FLEXCOMM4 base address */
- #define FLEXCOMM4_BASE (0x5008A000u)
- /** Peripheral FLEXCOMM4 base address */
- #define FLEXCOMM4_BASE_NS (0x4008A000u)
- /** Peripheral FLEXCOMM4 base pointer */
- #define FLEXCOMM4 ((FLEXCOMM_Type *)FLEXCOMM4_BASE)
- /** Peripheral FLEXCOMM4 base pointer */
- #define FLEXCOMM4_NS ((FLEXCOMM_Type *)FLEXCOMM4_BASE_NS)
- /** Peripheral FLEXCOMM5 base address */
- #define FLEXCOMM5_BASE (0x50096000u)
- /** Peripheral FLEXCOMM5 base address */
- #define FLEXCOMM5_BASE_NS (0x40096000u)
- /** Peripheral FLEXCOMM5 base pointer */
- #define FLEXCOMM5 ((FLEXCOMM_Type *)FLEXCOMM5_BASE)
- /** Peripheral FLEXCOMM5 base pointer */
- #define FLEXCOMM5_NS ((FLEXCOMM_Type *)FLEXCOMM5_BASE_NS)
- /** Peripheral FLEXCOMM6 base address */
- #define FLEXCOMM6_BASE (0x50097000u)
- /** Peripheral FLEXCOMM6 base address */
- #define FLEXCOMM6_BASE_NS (0x40097000u)
- /** Peripheral FLEXCOMM6 base pointer */
- #define FLEXCOMM6 ((FLEXCOMM_Type *)FLEXCOMM6_BASE)
- /** Peripheral FLEXCOMM6 base pointer */
- #define FLEXCOMM6_NS ((FLEXCOMM_Type *)FLEXCOMM6_BASE_NS)
- /** Peripheral FLEXCOMM7 base address */
- #define FLEXCOMM7_BASE (0x50098000u)
- /** Peripheral FLEXCOMM7 base address */
- #define FLEXCOMM7_BASE_NS (0x40098000u)
- /** Peripheral FLEXCOMM7 base pointer */
- #define FLEXCOMM7 ((FLEXCOMM_Type *)FLEXCOMM7_BASE)
- /** Peripheral FLEXCOMM7 base pointer */
- #define FLEXCOMM7_NS ((FLEXCOMM_Type *)FLEXCOMM7_BASE_NS)
- /** Peripheral FLEXCOMM8 base address */
- #define FLEXCOMM8_BASE (0x5009F000u)
- /** Peripheral FLEXCOMM8 base address */
- #define FLEXCOMM8_BASE_NS (0x4009F000u)
- /** Peripheral FLEXCOMM8 base pointer */
- #define FLEXCOMM8 ((FLEXCOMM_Type *)FLEXCOMM8_BASE)
- /** Peripheral FLEXCOMM8 base pointer */
- #define FLEXCOMM8_NS ((FLEXCOMM_Type *)FLEXCOMM8_BASE_NS)
- /** Array initializer of FLEXCOMM peripheral base addresses */
- #define FLEXCOMM_BASE_ADDRS { FLEXCOMM0_BASE, FLEXCOMM1_BASE, FLEXCOMM2_BASE, FLEXCOMM3_BASE, FLEXCOMM4_BASE, FLEXCOMM5_BASE, FLEXCOMM6_BASE, FLEXCOMM7_BASE, FLEXCOMM8_BASE }
- /** Array initializer of FLEXCOMM peripheral base pointers */
- #define FLEXCOMM_BASE_PTRS { FLEXCOMM0, FLEXCOMM1, FLEXCOMM2, FLEXCOMM3, FLEXCOMM4, FLEXCOMM5, FLEXCOMM6, FLEXCOMM7, FLEXCOMM8 }
- /** Array initializer of FLEXCOMM peripheral base addresses */
- #define FLEXCOMM_BASE_ADDRS_NS { FLEXCOMM0_BASE_NS, FLEXCOMM1_BASE_NS, FLEXCOMM2_BASE_NS, FLEXCOMM3_BASE_NS, FLEXCOMM4_BASE_NS, FLEXCOMM5_BASE_NS, FLEXCOMM6_BASE_NS, FLEXCOMM7_BASE_NS, FLEXCOMM8_BASE_NS }
- /** Array initializer of FLEXCOMM peripheral base pointers */
- #define FLEXCOMM_BASE_PTRS_NS { FLEXCOMM0_NS, FLEXCOMM1_NS, FLEXCOMM2_NS, FLEXCOMM3_NS, FLEXCOMM4_NS, FLEXCOMM5_NS, FLEXCOMM6_NS, FLEXCOMM7_NS, FLEXCOMM8_NS }
-#else
- /** Peripheral FLEXCOMM0 base address */
- #define FLEXCOMM0_BASE (0x40086000u)
- /** Peripheral FLEXCOMM0 base pointer */
- #define FLEXCOMM0 ((FLEXCOMM_Type *)FLEXCOMM0_BASE)
- /** Peripheral FLEXCOMM1 base address */
- #define FLEXCOMM1_BASE (0x40087000u)
- /** Peripheral FLEXCOMM1 base pointer */
- #define FLEXCOMM1 ((FLEXCOMM_Type *)FLEXCOMM1_BASE)
- /** Peripheral FLEXCOMM2 base address */
- #define FLEXCOMM2_BASE (0x40088000u)
- /** Peripheral FLEXCOMM2 base pointer */
- #define FLEXCOMM2 ((FLEXCOMM_Type *)FLEXCOMM2_BASE)
- /** Peripheral FLEXCOMM3 base address */
- #define FLEXCOMM3_BASE (0x40089000u)
- /** Peripheral FLEXCOMM3 base pointer */
- #define FLEXCOMM3 ((FLEXCOMM_Type *)FLEXCOMM3_BASE)
- /** Peripheral FLEXCOMM4 base address */
- #define FLEXCOMM4_BASE (0x4008A000u)
- /** Peripheral FLEXCOMM4 base pointer */
- #define FLEXCOMM4 ((FLEXCOMM_Type *)FLEXCOMM4_BASE)
- /** Peripheral FLEXCOMM5 base address */
- #define FLEXCOMM5_BASE (0x40096000u)
- /** Peripheral FLEXCOMM5 base pointer */
- #define FLEXCOMM5 ((FLEXCOMM_Type *)FLEXCOMM5_BASE)
- /** Peripheral FLEXCOMM6 base address */
- #define FLEXCOMM6_BASE (0x40097000u)
- /** Peripheral FLEXCOMM6 base pointer */
- #define FLEXCOMM6 ((FLEXCOMM_Type *)FLEXCOMM6_BASE)
- /** Peripheral FLEXCOMM7 base address */
- #define FLEXCOMM7_BASE (0x40098000u)
- /** Peripheral FLEXCOMM7 base pointer */
- #define FLEXCOMM7 ((FLEXCOMM_Type *)FLEXCOMM7_BASE)
- /** Peripheral FLEXCOMM8 base address */
- #define FLEXCOMM8_BASE (0x4009F000u)
- /** Peripheral FLEXCOMM8 base pointer */
- #define FLEXCOMM8 ((FLEXCOMM_Type *)FLEXCOMM8_BASE)
- /** Array initializer of FLEXCOMM peripheral base addresses */
- #define FLEXCOMM_BASE_ADDRS { FLEXCOMM0_BASE, FLEXCOMM1_BASE, FLEXCOMM2_BASE, FLEXCOMM3_BASE, FLEXCOMM4_BASE, FLEXCOMM5_BASE, FLEXCOMM6_BASE, FLEXCOMM7_BASE, FLEXCOMM8_BASE }
- /** Array initializer of FLEXCOMM peripheral base pointers */
- #define FLEXCOMM_BASE_PTRS { FLEXCOMM0, FLEXCOMM1, FLEXCOMM2, FLEXCOMM3, FLEXCOMM4, FLEXCOMM5, FLEXCOMM6, FLEXCOMM7, FLEXCOMM8 }
-#endif
-/** Interrupt vectors for the FLEXCOMM peripheral type */
-#define FLEXCOMM_IRQS { FLEXCOMM0_IRQn, FLEXCOMM1_IRQn, FLEXCOMM2_IRQn, FLEXCOMM3_IRQn, FLEXCOMM4_IRQn, FLEXCOMM5_IRQn, FLEXCOMM6_IRQn, FLEXCOMM7_IRQn, FLEXCOMM8_IRQn }
-
-/*!
- * @}
- */ /* end of group FLEXCOMM_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- GINT Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup GINT_Peripheral_Access_Layer GINT Peripheral Access Layer
- * @{
- */
-
-/** GINT - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< GPIO grouped interrupt control register, offset: 0x0 */
- uint8_t RESERVED_0[28];
- __IO uint32_t PORT_POL[2]; /**< GPIO grouped interrupt port 0 polarity register, array offset: 0x20, array step: 0x4 */
- uint8_t RESERVED_1[24];
- __IO uint32_t PORT_ENA[2]; /**< GPIO grouped interrupt port 0 enable register, array offset: 0x40, array step: 0x4 */
-} GINT_Type;
-
-/* ----------------------------------------------------------------------------
- -- GINT Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup GINT_Register_Masks GINT Register Masks
- * @{
- */
-
-/*! @name CTRL - GPIO grouped interrupt control register */
-/*! @{ */
-#define GINT_CTRL_INT_MASK (0x1U)
-#define GINT_CTRL_INT_SHIFT (0U)
-/*! INT - Group interrupt status. This bit is cleared by writing a one to it. Writing zero has no effect.
- * 0b0..No request. No interrupt request is pending.
- * 0b1..Request active. Interrupt request is active.
- */
-#define GINT_CTRL_INT(x) (((uint32_t)(((uint32_t)(x)) << GINT_CTRL_INT_SHIFT)) & GINT_CTRL_INT_MASK)
-#define GINT_CTRL_COMB_MASK (0x2U)
-#define GINT_CTRL_COMB_SHIFT (1U)
-/*! COMB - Combine enabled inputs for group interrupt
- * 0b0..Or. OR functionality: A grouped interrupt is generated when any one of the enabled inputs is active (based on its programmed polarity).
- * 0b1..And. AND functionality: An interrupt is generated when all enabled bits are active (based on their programmed polarity).
- */
-#define GINT_CTRL_COMB(x) (((uint32_t)(((uint32_t)(x)) << GINT_CTRL_COMB_SHIFT)) & GINT_CTRL_COMB_MASK)
-#define GINT_CTRL_TRIG_MASK (0x4U)
-#define GINT_CTRL_TRIG_SHIFT (2U)
-/*! TRIG - Group interrupt trigger
- * 0b0..Edge-triggered.
- * 0b1..Level-triggered.
- */
-#define GINT_CTRL_TRIG(x) (((uint32_t)(((uint32_t)(x)) << GINT_CTRL_TRIG_SHIFT)) & GINT_CTRL_TRIG_MASK)
-/*! @} */
-
-/*! @name PORT_POL - GPIO grouped interrupt port 0 polarity register */
-/*! @{ */
-#define GINT_PORT_POL_POL_MASK (0xFFFFFFFFU)
-#define GINT_PORT_POL_POL_SHIFT (0U)
-/*! POL - Configure pin polarity of port m pins for group interrupt. Bit n corresponds to pin PIOm_n
- * of port m. 0 = the pin is active LOW. If the level on this pin is LOW, the pin contributes to
- * the group interrupt. 1 = the pin is active HIGH. If the level on this pin is HIGH, the pin
- * contributes to the group interrupt.
- */
-#define GINT_PORT_POL_POL(x) (((uint32_t)(((uint32_t)(x)) << GINT_PORT_POL_POL_SHIFT)) & GINT_PORT_POL_POL_MASK)
-/*! @} */
-
-/* The count of GINT_PORT_POL */
-#define GINT_PORT_POL_COUNT (2U)
-
-/*! @name PORT_ENA - GPIO grouped interrupt port 0 enable register */
-/*! @{ */
-#define GINT_PORT_ENA_ENA_MASK (0xFFFFFFFFU)
-#define GINT_PORT_ENA_ENA_SHIFT (0U)
-/*! ENA - Enable port 0 pin for group interrupt. Bit n corresponds to pin Pm_n of port m. 0 = the
- * port 0 pin is disabled and does not contribute to the grouped interrupt. 1 = the port 0 pin is
- * enabled and contributes to the grouped interrupt.
- */
-#define GINT_PORT_ENA_ENA(x) (((uint32_t)(((uint32_t)(x)) << GINT_PORT_ENA_ENA_SHIFT)) & GINT_PORT_ENA_ENA_MASK)
-/*! @} */
-
-/* The count of GINT_PORT_ENA */
-#define GINT_PORT_ENA_COUNT (2U)
-
-
-/*!
- * @}
- */ /* end of group GINT_Register_Masks */
-
-
-/* GINT - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral GINT0 base address */
- #define GINT0_BASE (0x50002000u)
- /** Peripheral GINT0 base address */
- #define GINT0_BASE_NS (0x40002000u)
- /** Peripheral GINT0 base pointer */
- #define GINT0 ((GINT_Type *)GINT0_BASE)
- /** Peripheral GINT0 base pointer */
- #define GINT0_NS ((GINT_Type *)GINT0_BASE_NS)
- /** Peripheral GINT1 base address */
- #define GINT1_BASE (0x50003000u)
- /** Peripheral GINT1 base address */
- #define GINT1_BASE_NS (0x40003000u)
- /** Peripheral GINT1 base pointer */
- #define GINT1 ((GINT_Type *)GINT1_BASE)
- /** Peripheral GINT1 base pointer */
- #define GINT1_NS ((GINT_Type *)GINT1_BASE_NS)
- /** Array initializer of GINT peripheral base addresses */
- #define GINT_BASE_ADDRS { GINT0_BASE, GINT1_BASE }
- /** Array initializer of GINT peripheral base pointers */
- #define GINT_BASE_PTRS { GINT0, GINT1 }
- /** Array initializer of GINT peripheral base addresses */
- #define GINT_BASE_ADDRS_NS { GINT0_BASE_NS, GINT1_BASE_NS }
- /** Array initializer of GINT peripheral base pointers */
- #define GINT_BASE_PTRS_NS { GINT0_NS, GINT1_NS }
-#else
- /** Peripheral GINT0 base address */
- #define GINT0_BASE (0x40002000u)
- /** Peripheral GINT0 base pointer */
- #define GINT0 ((GINT_Type *)GINT0_BASE)
- /** Peripheral GINT1 base address */
- #define GINT1_BASE (0x40003000u)
- /** Peripheral GINT1 base pointer */
- #define GINT1 ((GINT_Type *)GINT1_BASE)
- /** Array initializer of GINT peripheral base addresses */
- #define GINT_BASE_ADDRS { GINT0_BASE, GINT1_BASE }
- /** Array initializer of GINT peripheral base pointers */
- #define GINT_BASE_PTRS { GINT0, GINT1 }
-#endif
-/** Interrupt vectors for the GINT peripheral type */
-#define GINT_IRQS { GINT0_IRQn, GINT1_IRQn }
-
-/*!
- * @}
- */ /* end of group GINT_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- GPIO Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup GPIO_Peripheral_Access_Layer GPIO Peripheral Access Layer
- * @{
- */
-
-/** GPIO - Register Layout Typedef */
-typedef struct {
- __IO uint8_t B[2][32]; /**< Byte pin registers for all port GPIO pins, array offset: 0x0, array step: index*0x20, index2*0x1 */
- uint8_t RESERVED_0[4032];
- __IO uint32_t W[2][32]; /**< Word pin registers for all port GPIO pins, array offset: 0x1000, array step: index*0x80, index2*0x4 */
- uint8_t RESERVED_1[3840];
- __IO uint32_t DIR[2]; /**< Direction registers for all port GPIO pins, array offset: 0x2000, array step: 0x4 */
- uint8_t RESERVED_2[120];
- __IO uint32_t MASK[2]; /**< Mask register for all port GPIO pins, array offset: 0x2080, array step: 0x4 */
- uint8_t RESERVED_3[120];
- __IO uint32_t PIN[2]; /**< Port pin register for all port GPIO pins, array offset: 0x2100, array step: 0x4 */
- uint8_t RESERVED_4[120];
- __IO uint32_t MPIN[2]; /**< Masked port register for all port GPIO pins, array offset: 0x2180, array step: 0x4 */
- uint8_t RESERVED_5[120];
- __IO uint32_t SET[2]; /**< Write: Set register for port. Read: output bits for port, array offset: 0x2200, array step: 0x4 */
- uint8_t RESERVED_6[120];
- __O uint32_t CLR[2]; /**< Clear port for all port GPIO pins, array offset: 0x2280, array step: 0x4 */
- uint8_t RESERVED_7[120];
- __O uint32_t NOT[2]; /**< Toggle port for all port GPIO pins, array offset: 0x2300, array step: 0x4 */
- uint8_t RESERVED_8[120];
- __O uint32_t DIRSET[2]; /**< Set pin direction bits for port, array offset: 0x2380, array step: 0x4 */
- uint8_t RESERVED_9[120];
- __O uint32_t DIRCLR[2]; /**< Clear pin direction bits for port, array offset: 0x2400, array step: 0x4 */
- uint8_t RESERVED_10[120];
- __O uint32_t DIRNOT[2]; /**< Toggle pin direction bits for port, array offset: 0x2480, array step: 0x4 */
-} GPIO_Type;
-
-/* ----------------------------------------------------------------------------
- -- GPIO Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup GPIO_Register_Masks GPIO Register Masks
- * @{
- */
-
-/*! @name B - Byte pin registers for all port GPIO pins */
-/*! @{ */
-#define GPIO_B_PBYTE_MASK (0x1U)
-#define GPIO_B_PBYTE_SHIFT (0U)
-/*! PBYTE - Read: state of the pin PIOm_n, regardless of direction, masking, or alternate function,
- * except that pins configured as analog I/O always read as 0. One register for each port pin.
- * Supported pins depends on the specific device and package. Write: loads the pin's output bit.
- * One register for each port pin. Supported pins depends on the specific device and package.
- */
-#define GPIO_B_PBYTE(x) (((uint8_t)(((uint8_t)(x)) << GPIO_B_PBYTE_SHIFT)) & GPIO_B_PBYTE_MASK)
-/*! @} */
-
-/* The count of GPIO_B */
-#define GPIO_B_COUNT (2U)
-
-/* The count of GPIO_B */
-#define GPIO_B_COUNT2 (32U)
-
-/*! @name W - Word pin registers for all port GPIO pins */
-/*! @{ */
-#define GPIO_W_PWORD_MASK (0xFFFFFFFFU)
-#define GPIO_W_PWORD_SHIFT (0U)
-/*! PWORD - Read 0: pin PIOm_n is LOW. Write 0: clear output bit. Read 0xFFFF FFFF: pin PIOm_n is
- * HIGH. Write any value 0x0000 0001 to 0xFFFF FFFF: set output bit. Only 0 or 0xFFFF FFFF can be
- * read. Writing any value other than 0 will set the output bit. One register for each port pin.
- * Supported pins depends on the specific device and package.
- */
-#define GPIO_W_PWORD(x) (((uint32_t)(((uint32_t)(x)) << GPIO_W_PWORD_SHIFT)) & GPIO_W_PWORD_MASK)
-/*! @} */
-
-/* The count of GPIO_W */
-#define GPIO_W_COUNT (2U)
-
-/* The count of GPIO_W */
-#define GPIO_W_COUNT2 (32U)
-
-/*! @name DIR - Direction registers for all port GPIO pins */
-/*! @{ */
-#define GPIO_DIR_DIRP_MASK (0xFFFFFFFFU)
-#define GPIO_DIR_DIRP_SHIFT (0U)
-/*! DIRP - Selects pin direction for pin PIOm_n (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported
- * pins depends on the specific device and package. 0 = input. 1 = output.
- */
-#define GPIO_DIR_DIRP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_DIR_DIRP_SHIFT)) & GPIO_DIR_DIRP_MASK)
-/*! @} */
-
-/* The count of GPIO_DIR */
-#define GPIO_DIR_COUNT (2U)
-
-/*! @name MASK - Mask register for all port GPIO pins */
-/*! @{ */
-#define GPIO_MASK_MASKP_MASK (0xFFFFFFFFU)
-#define GPIO_MASK_MASKP_SHIFT (0U)
-/*! MASKP - Controls which bits corresponding to PIOm_n are active in the MPORT register (bit 0 =
- * PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on the specific device and package.0 =
- * Read MPORT: pin state; write MPORT: load output bit. 1 = Read MPORT: 0; write MPORT: output bit
- * not affected.
- */
-#define GPIO_MASK_MASKP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_MASK_MASKP_SHIFT)) & GPIO_MASK_MASKP_MASK)
-/*! @} */
-
-/* The count of GPIO_MASK */
-#define GPIO_MASK_COUNT (2U)
-
-/*! @name PIN - Port pin register for all port GPIO pins */
-/*! @{ */
-#define GPIO_PIN_PORT_MASK (0xFFFFFFFFU)
-#define GPIO_PIN_PORT_SHIFT (0U)
-/*! PORT - Reads pin states or loads output bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported
- * pins depends on the specific device and package. 0 = Read: pin is low; write: clear output bit.
- * 1 = Read: pin is high; write: set output bit.
- */
-#define GPIO_PIN_PORT(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PIN_PORT_SHIFT)) & GPIO_PIN_PORT_MASK)
-/*! @} */
-
-/* The count of GPIO_PIN */
-#define GPIO_PIN_COUNT (2U)
-
-/*! @name MPIN - Masked port register for all port GPIO pins */
-/*! @{ */
-#define GPIO_MPIN_MPORTP_MASK (0xFFFFFFFFU)
-#define GPIO_MPIN_MPORTP_SHIFT (0U)
-/*! MPORTP - Masked port register (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on
- * the specific device and package. 0 = Read: pin is LOW and/or the corresponding bit in the MASK
- * register is 1; write: clear output bit if the corresponding bit in the MASK register is 0. 1
- * = Read: pin is HIGH and the corresponding bit in the MASK register is 0; write: set output bit
- * if the corresponding bit in the MASK register is 0.
- */
-#define GPIO_MPIN_MPORTP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_MPIN_MPORTP_SHIFT)) & GPIO_MPIN_MPORTP_MASK)
-/*! @} */
-
-/* The count of GPIO_MPIN */
-#define GPIO_MPIN_COUNT (2U)
-
-/*! @name SET - Write: Set register for port. Read: output bits for port */
-/*! @{ */
-#define GPIO_SET_SETP_MASK (0xFFFFFFFFU)
-#define GPIO_SET_SETP_SHIFT (0U)
-/*! SETP - Read or set output bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on
- * the specific device and package. 0 = Read: output bit: write: no operation. 1 = Read: output
- * bit; write: set output bit.
- */
-#define GPIO_SET_SETP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_SET_SETP_SHIFT)) & GPIO_SET_SETP_MASK)
-/*! @} */
-
-/* The count of GPIO_SET */
-#define GPIO_SET_COUNT (2U)
-
-/*! @name CLR - Clear port for all port GPIO pins */
-/*! @{ */
-#define GPIO_CLR_CLRP_MASK (0xFFFFFFFFU)
-#define GPIO_CLR_CLRP_SHIFT (0U)
-/*! CLRP - Clear output bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on the
- * specific device and package. 0 = No operation. 1 = Clear output bit.
- */
-#define GPIO_CLR_CLRP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_CLR_CLRP_SHIFT)) & GPIO_CLR_CLRP_MASK)
-/*! @} */
-
-/* The count of GPIO_CLR */
-#define GPIO_CLR_COUNT (2U)
-
-/*! @name NOT - Toggle port for all port GPIO pins */
-/*! @{ */
-#define GPIO_NOT_NOTP_MASK (0xFFFFFFFFU)
-#define GPIO_NOT_NOTP_SHIFT (0U)
-/*! NOTP - Toggle output bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on the
- * specific device and package. 0 = no operation. 1 = Toggle output bit.
- */
-#define GPIO_NOT_NOTP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_NOT_NOTP_SHIFT)) & GPIO_NOT_NOTP_MASK)
-/*! @} */
-
-/* The count of GPIO_NOT */
-#define GPIO_NOT_COUNT (2U)
-
-/*! @name DIRSET - Set pin direction bits for port */
-/*! @{ */
-#define GPIO_DIRSET_DIRSETP_MASK (0xFFFFFFFFU)
-#define GPIO_DIRSET_DIRSETP_SHIFT (0U)
-/*! DIRSETP - Set direction bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on
- * the specific device and package. 0 = No operation. 1 = Set direction bit.
- */
-#define GPIO_DIRSET_DIRSETP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_DIRSET_DIRSETP_SHIFT)) & GPIO_DIRSET_DIRSETP_MASK)
-/*! @} */
-
-/* The count of GPIO_DIRSET */
-#define GPIO_DIRSET_COUNT (2U)
-
-/*! @name DIRCLR - Clear pin direction bits for port */
-/*! @{ */
-#define GPIO_DIRCLR_DIRCLRP_MASK (0xFFFFFFFFU)
-#define GPIO_DIRCLR_DIRCLRP_SHIFT (0U)
-/*! DIRCLRP - Clear direction bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on
- * the specific device and package. 0 = No operation. 1 = Clear direction bit.
- */
-#define GPIO_DIRCLR_DIRCLRP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_DIRCLR_DIRCLRP_SHIFT)) & GPIO_DIRCLR_DIRCLRP_MASK)
-/*! @} */
-
-/* The count of GPIO_DIRCLR */
-#define GPIO_DIRCLR_COUNT (2U)
-
-/*! @name DIRNOT - Toggle pin direction bits for port */
-/*! @{ */
-#define GPIO_DIRNOT_DIRNOTP_MASK (0xFFFFFFFFU)
-#define GPIO_DIRNOT_DIRNOTP_SHIFT (0U)
-/*! DIRNOTP - Toggle direction bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends
- * on the specific device and package. 0 = no operation. 1 = Toggle direction bit.
- */
-#define GPIO_DIRNOT_DIRNOTP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_DIRNOT_DIRNOTP_SHIFT)) & GPIO_DIRNOT_DIRNOTP_MASK)
-/*! @} */
-
-/* The count of GPIO_DIRNOT */
-#define GPIO_DIRNOT_COUNT (2U)
-
-
-/*!
- * @}
- */ /* end of group GPIO_Register_Masks */
-
-
-/* GPIO - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral GPIO base address */
- #define GPIO_BASE (0x5008C000u)
- /** Peripheral GPIO base address */
- #define GPIO_BASE_NS (0x4008C000u)
- /** Peripheral GPIO base pointer */
- #define GPIO ((GPIO_Type *)GPIO_BASE)
- /** Peripheral GPIO base pointer */
- #define GPIO_NS ((GPIO_Type *)GPIO_BASE_NS)
- /** Peripheral SECGPIO base address */
- #define SECGPIO_BASE (0x500A8000u)
- /** Peripheral SECGPIO base address */
- #define SECGPIO_BASE_NS (0x400A8000u)
- /** Peripheral SECGPIO base pointer */
- #define SECGPIO ((GPIO_Type *)SECGPIO_BASE)
- /** Peripheral SECGPIO base pointer */
- #define SECGPIO_NS ((GPIO_Type *)SECGPIO_BASE_NS)
- /** Array initializer of GPIO peripheral base addresses */
- #define GPIO_BASE_ADDRS { GPIO_BASE, SECGPIO_BASE }
- /** Array initializer of GPIO peripheral base pointers */
- #define GPIO_BASE_PTRS { GPIO, SECGPIO }
- /** Array initializer of GPIO peripheral base addresses */
- #define GPIO_BASE_ADDRS_NS { GPIO_BASE_NS, SECGPIO_BASE_NS }
- /** Array initializer of GPIO peripheral base pointers */
- #define GPIO_BASE_PTRS_NS { GPIO_NS, SECGPIO_NS }
-#else
- /** Peripheral GPIO base address */
- #define GPIO_BASE (0x4008C000u)
- /** Peripheral GPIO base pointer */
- #define GPIO ((GPIO_Type *)GPIO_BASE)
- /** Peripheral SECGPIO base address */
- #define SECGPIO_BASE (0x400A8000u)
- /** Peripheral SECGPIO base pointer */
- #define SECGPIO ((GPIO_Type *)SECGPIO_BASE)
- /** Array initializer of GPIO peripheral base addresses */
- #define GPIO_BASE_ADDRS { GPIO_BASE, SECGPIO_BASE }
- /** Array initializer of GPIO peripheral base pointers */
- #define GPIO_BASE_PTRS { GPIO, SECGPIO }
-#endif
-
-/*!
- * @}
- */ /* end of group GPIO_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- HASHCRYPT Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup HASHCRYPT_Peripheral_Access_Layer HASHCRYPT Peripheral Access Layer
- * @{
- */
-
-/** HASHCRYPT - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< Control register to enable and operate Hash and Crypto, offset: 0x0 */
- __IO uint32_t STATUS; /**< Indicates status of Hash peripheral., offset: 0x4 */
- __IO uint32_t INTENSET; /**< Write 1 to enable interrupts; reads back with which are set., offset: 0x8 */
- __IO uint32_t INTENCLR; /**< Write 1 to clear interrupts., offset: 0xC */
- __IO uint32_t MEMCTRL; /**< Setup Master to access memory (if available), offset: 0x10 */
- __IO uint32_t MEMADDR; /**< Address to start memory access from (if available)., offset: 0x14 */
- uint8_t RESERVED_0[8];
- __O uint32_t INDATA; /**< Input of 16 words at a time to load up buffer., offset: 0x20 */
- __O uint32_t ALIAS[7]; /**< , array offset: 0x24, array step: 0x4 */
- __I uint32_t DIGEST0[8]; /**< , array offset: 0x40, array step: 0x4 */
- uint8_t RESERVED_1[32];
- __IO uint32_t CRYPTCFG; /**< Crypto settings for AES and Salsa and ChaCha, offset: 0x80 */
- __I uint32_t CONFIG; /**< Returns the configuration of this block in this chip - indicates what services are available., offset: 0x84 */
- uint8_t RESERVED_2[4];
- __IO uint32_t LOCK; /**< Lock register allows locking to the current security level or unlocking by the lock holding level., offset: 0x8C */
- __O uint32_t MASK[4]; /**< , array offset: 0x90, array step: 0x4 */
-} HASHCRYPT_Type;
-
-/* ----------------------------------------------------------------------------
- -- HASHCRYPT Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup HASHCRYPT_Register_Masks HASHCRYPT Register Masks
- * @{
- */
-
-/*! @name CTRL - Control register to enable and operate Hash and Crypto */
-/*! @{ */
-#define HASHCRYPT_CTRL_MODE_MASK (0x7U)
-#define HASHCRYPT_CTRL_MODE_SHIFT (0U)
-/*! Mode - The operational mode to use, or 0 if none. Note that the CONFIG register will indicate if
- * specific modes beyond SHA1 and SHA2-256 are available.
- * 0b000..Disabled
- * 0b001..SHA1 is enabled
- * 0b010..SHA2-256 is enabled
- * 0b100..AES if available (see also CRYPTCFG register for more controls)
- * 0b101..ICB-AES if available (see also CRYPTCFG register for more controls)
- */
-#define HASHCRYPT_CTRL_MODE(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CTRL_MODE_SHIFT)) & HASHCRYPT_CTRL_MODE_MASK)
-#define HASHCRYPT_CTRL_NEW_HASH_MASK (0x10U)
-#define HASHCRYPT_CTRL_NEW_HASH_SHIFT (4U)
-/*! New_Hash - Written with 1 when starting a new Hash/Crypto. It self clears. Note that the WAITING
- * Status bit will clear for a cycle during the initialization from New=1.
- * 0b1..Starts a new Hash/Crypto and initializes the Digest/Result.
- */
-#define HASHCRYPT_CTRL_NEW_HASH(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CTRL_NEW_HASH_SHIFT)) & HASHCRYPT_CTRL_NEW_HASH_MASK)
-#define HASHCRYPT_CTRL_DMA_I_MASK (0x100U)
-#define HASHCRYPT_CTRL_DMA_I_SHIFT (8U)
-/*! DMA_I - Written with 1 to use DMA to fill INDATA. If Hash, will request from DMA for 16 words
- * and then will process the Hash. If Cryptographic, it will load as many words as needed,
- * including key if not already loaded. It will then request again. Normal model is that the DMA
- * interrupts the processor when its length expires. Note that if the processor will write the key and
- * optionally IV, it should not enable this until it has done so. Otherwise, the DMA will be
- * expected to load those for the 1st block (when needed).
- * 0b0..DMA is not used. Processor writes the necessary words when WAITING is set (interrupts), unless AHB Master is used.
- * 0b1..DMA will push in the data.
- */
-#define HASHCRYPT_CTRL_DMA_I(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CTRL_DMA_I_SHIFT)) & HASHCRYPT_CTRL_DMA_I_MASK)
-#define HASHCRYPT_CTRL_DMA_O_MASK (0x200U)
-#define HASHCRYPT_CTRL_DMA_O_SHIFT (9U)
-/*! DMA_O - Written to 1 to use DMA to drain the digest/output. If both DMA_I and DMA_O are set, the
- * DMA has to know to switch direction and the locations. This can be used for crypto uses.
- * 0b0..DMA is not used. Processor reads the digest/output in response to DIGEST interrupt.
- */
-#define HASHCRYPT_CTRL_DMA_O(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CTRL_DMA_O_SHIFT)) & HASHCRYPT_CTRL_DMA_O_MASK)
-#define HASHCRYPT_CTRL_HASHSWPB_MASK (0x1000U)
-#define HASHCRYPT_CTRL_HASHSWPB_SHIFT (12U)
-/*! HASHSWPB - If 1, will swap bytes in the word for SHA hashing. The default is byte order (so LSB
- * is 1st byte) but this allows swapping to MSB is 1st such as is shown in SHS spec. For
- * cryptographic swapping, see the CRYPTCFG register.
- */
-#define HASHCRYPT_CTRL_HASHSWPB(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CTRL_HASHSWPB_SHIFT)) & HASHCRYPT_CTRL_HASHSWPB_MASK)
-/*! @} */
-
-/*! @name STATUS - Indicates status of Hash peripheral. */
-/*! @{ */
-#define HASHCRYPT_STATUS_WAITING_MASK (0x1U)
-#define HASHCRYPT_STATUS_WAITING_SHIFT (0U)
-/*! WAITING - If 1, the block is waiting for more data to process.
- * 0b0..Not waiting for data - may be disabled or may be busy. Note that for cryptographic uses, this is not set
- * if IsLast is set nor will it set until at least 1 word is read of the output.
- * 0b1..Waiting for data to be written in (16 words)
- */
-#define HASHCRYPT_STATUS_WAITING(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_STATUS_WAITING_SHIFT)) & HASHCRYPT_STATUS_WAITING_MASK)
-#define HASHCRYPT_STATUS_DIGEST_MASK (0x2U)
-#define HASHCRYPT_STATUS_DIGEST_SHIFT (1U)
-/*! DIGEST - For Hash, if 1 then a DIGEST is ready and waiting and there is no active next block
- * already started. For Cryptographic uses, this will be set for each block processed, indicating
- * OUTDATA (and OUTDATA2 if larger output) contains the next value to read out. This is cleared
- * when any data is written, when New is written, for Cryptographic uses when the last word is read
- * out, or when the block is disabled.
- * 0b0..No Digest is ready
- * 0b1..Digest is ready. Application may read it or may write more data
- */
-#define HASHCRYPT_STATUS_DIGEST(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_STATUS_DIGEST_SHIFT)) & HASHCRYPT_STATUS_DIGEST_MASK)
-#define HASHCRYPT_STATUS_ERROR_MASK (0x4U)
-#define HASHCRYPT_STATUS_ERROR_SHIFT (2U)
-/*! ERROR - If 1, an error occurred. For normal uses, this is due to an attempted overrun: INDATA
- * was written when it was not appropriate. For Master cases, this is an AHB bus error; the COUNT
- * field will indicate which block it was on.
- * 0b0..No error.
- * 0b1..An error occurred since last cleared (written 1 to clear).
- */
-#define HASHCRYPT_STATUS_ERROR(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_STATUS_ERROR_SHIFT)) & HASHCRYPT_STATUS_ERROR_MASK)
-#define HASHCRYPT_STATUS_NEEDKEY_MASK (0x10U)
-#define HASHCRYPT_STATUS_NEEDKEY_SHIFT (4U)
-/*! NEEDKEY - Indicates the block wants the key to be written in (set along with WAITING)
- * 0b0..No Key is needed and writes will not be treated as Key
- * 0b1..Key is needed and INDATA/ALIAS will be accepted as Key. Will also set WAITING.
- */
-#define HASHCRYPT_STATUS_NEEDKEY(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_STATUS_NEEDKEY_SHIFT)) & HASHCRYPT_STATUS_NEEDKEY_MASK)
-#define HASHCRYPT_STATUS_NEEDIV_MASK (0x20U)
-#define HASHCRYPT_STATUS_NEEDIV_SHIFT (5U)
-/*! NEEDIV - Indicates the block wants an IV/NONE to be written in (set along with WAITING)
- * 0b0..No IV/Nonce is needed, either because written already or because not needed.
- * 0b1..IV/Nonce is needed and INDATA/ALIAS will be accepted as IV/Nonce. Will also set WAITING.
- */
-#define HASHCRYPT_STATUS_NEEDIV(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_STATUS_NEEDIV_SHIFT)) & HASHCRYPT_STATUS_NEEDIV_MASK)
-#define HASHCRYPT_STATUS_ICBIDX_MASK (0x3F0000U)
-#define HASHCRYPT_STATUS_ICBIDX_SHIFT (16U)
-/*! ICBIDX - If ICB-AES is selected, then reads as the ICB index count based on ICBSTRM (from
- * CRYPTCFG). That is, if 3 bits of ICBSTRM, then this will count from 0 to 7 and then back to 0. On 0,
- * it has to compute the full ICB, quicker when not 0.
- */
-#define HASHCRYPT_STATUS_ICBIDX(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_STATUS_ICBIDX_SHIFT)) & HASHCRYPT_STATUS_ICBIDX_MASK)
-/*! @} */
-
-/*! @name INTENSET - Write 1 to enable interrupts; reads back with which are set. */
-/*! @{ */
-#define HASHCRYPT_INTENSET_WAITING_MASK (0x1U)
-#define HASHCRYPT_INTENSET_WAITING_SHIFT (0U)
-/*! WAITING - Indicates if should interrupt when waiting for data input.
- * 0b0..Will not interrupt when waiting.
- * 0b1..Will interrupt when waiting
- */
-#define HASHCRYPT_INTENSET_WAITING(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INTENSET_WAITING_SHIFT)) & HASHCRYPT_INTENSET_WAITING_MASK)
-#define HASHCRYPT_INTENSET_DIGEST_MASK (0x2U)
-#define HASHCRYPT_INTENSET_DIGEST_SHIFT (1U)
-/*! DIGEST - Indicates if should interrupt when Digest (or Outdata) is ready (completed a hash/crypto or completed a full sequence).
- * 0b0..Will not interrupt when Digest is ready
- * 0b1..Will interrupt when Digest is ready. Interrupt cleared by writing more data, starting a new Hash, or disabling (done).
- */
-#define HASHCRYPT_INTENSET_DIGEST(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INTENSET_DIGEST_SHIFT)) & HASHCRYPT_INTENSET_DIGEST_MASK)
-#define HASHCRYPT_INTENSET_ERROR_MASK (0x4U)
-#define HASHCRYPT_INTENSET_ERROR_SHIFT (2U)
-/*! ERROR - Indicates if should interrupt on an ERROR (as defined in Status)
- * 0b0..Will not interrupt on Error.
- * 0b1..Will interrupt on Error (until cleared).
- */
-#define HASHCRYPT_INTENSET_ERROR(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INTENSET_ERROR_SHIFT)) & HASHCRYPT_INTENSET_ERROR_MASK)
-/*! @} */
-
-/*! @name INTENCLR - Write 1 to clear interrupts. */
-/*! @{ */
-#define HASHCRYPT_INTENCLR_WAITING_MASK (0x1U)
-#define HASHCRYPT_INTENCLR_WAITING_SHIFT (0U)
-/*! WAITING - Write 1 to clear mask.
- */
-#define HASHCRYPT_INTENCLR_WAITING(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INTENCLR_WAITING_SHIFT)) & HASHCRYPT_INTENCLR_WAITING_MASK)
-#define HASHCRYPT_INTENCLR_DIGEST_MASK (0x2U)
-#define HASHCRYPT_INTENCLR_DIGEST_SHIFT (1U)
-/*! DIGEST - Write 1 to clear mask.
- */
-#define HASHCRYPT_INTENCLR_DIGEST(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INTENCLR_DIGEST_SHIFT)) & HASHCRYPT_INTENCLR_DIGEST_MASK)
-#define HASHCRYPT_INTENCLR_ERROR_MASK (0x4U)
-#define HASHCRYPT_INTENCLR_ERROR_SHIFT (2U)
-/*! ERROR - Write 1 to clear mask.
- */
-#define HASHCRYPT_INTENCLR_ERROR(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INTENCLR_ERROR_SHIFT)) & HASHCRYPT_INTENCLR_ERROR_MASK)
-/*! @} */
-
-/*! @name MEMCTRL - Setup Master to access memory (if available) */
-/*! @{ */
-#define HASHCRYPT_MEMCTRL_MASTER_MASK (0x1U)
-#define HASHCRYPT_MEMCTRL_MASTER_SHIFT (0U)
-/*! MASTER - Enables mastering.
- * 0b0..Mastering is not used and the normal DMA or Interrupt based model is used with INDATA.
- * 0b1..Mastering is enabled and DMA and INDATA should not be used.
- */
-#define HASHCRYPT_MEMCTRL_MASTER(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_MEMCTRL_MASTER_SHIFT)) & HASHCRYPT_MEMCTRL_MASTER_MASK)
-#define HASHCRYPT_MEMCTRL_COUNT_MASK (0x7FF0000U)
-#define HASHCRYPT_MEMCTRL_COUNT_SHIFT (16U)
-/*! COUNT - Number of 512-bit (128-bit if AES, except 1st block which may include key and IV) blocks
- * to copy starting at MEMADDR. This register will decrement after each block is copied, ending
- * in 0. For Hash, the DIGEST interrupt will occur when it reaches 0. Fro AES, the DIGEST/OUTDATA
- * interrupt will occur on ever block. If a bus error occurs, it will stop with this field set
- * to the block that failed. 0:Done - nothing to process. 1 to 2K: Number of 512-bit (or 128bit)
- * blocks to hash.
- */
-#define HASHCRYPT_MEMCTRL_COUNT(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_MEMCTRL_COUNT_SHIFT)) & HASHCRYPT_MEMCTRL_COUNT_MASK)
-/*! @} */
-
-/*! @name MEMADDR - Address to start memory access from (if available). */
-/*! @{ */
-#define HASHCRYPT_MEMADDR_BASE_MASK (0xFFFFFFFFU)
-#define HASHCRYPT_MEMADDR_BASE_SHIFT (0U)
-/*! BASE - Address base to start copying from, word aligned (so bits 1:0 must be 0). This field will
- * advance as it processes the words. If it fails with a bus error, the register will contain
- * the failing word. N:Address in Flash or RAM space; RAM only as mapped in this part. May also be
- * able to address SPIFI.
- */
-#define HASHCRYPT_MEMADDR_BASE(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_MEMADDR_BASE_SHIFT)) & HASHCRYPT_MEMADDR_BASE_MASK)
-/*! @} */
-
-/*! @name INDATA - Input of 16 words at a time to load up buffer. */
-/*! @{ */
-#define HASHCRYPT_INDATA_DATA_MASK (0xFFFFFFFFU)
-#define HASHCRYPT_INDATA_DATA_SHIFT (0U)
-/*! DATA - Write next word in little-endian form. The hash requires big endian word data, but this
- * block swaps the bytes automatically. That is, SHA assumes the data coming in is treated as
- * bytes (e.g. "abcd") and since the ARM core will treat "abcd" as a word as 0x64636261, the block
- * will swap the word to restore into big endian.
- */
-#define HASHCRYPT_INDATA_DATA(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INDATA_DATA_SHIFT)) & HASHCRYPT_INDATA_DATA_MASK)
-/*! @} */
-
-/*! @name ALIAS - */
-/*! @{ */
-#define HASHCRYPT_ALIAS_DATA_MASK (0xFFFFFFFFU)
-#define HASHCRYPT_ALIAS_DATA_SHIFT (0U)
-/*! DATA - Write next word in little-endian form. The hash requires big endian word data, but this
- * block swaps the bytes automatically. That is, SHA assumes the data coming in is treated as
- * bytes (e.g. "abcd") and since the ARM core will treat "abcd" as a word as 0x64636261, the block
- * will swap the word to restore into big endian.
- */
-#define HASHCRYPT_ALIAS_DATA(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_ALIAS_DATA_SHIFT)) & HASHCRYPT_ALIAS_DATA_MASK)
-/*! @} */
-
-/* The count of HASHCRYPT_ALIAS */
-#define HASHCRYPT_ALIAS_COUNT (7U)
-
-/*! @name DIGEST0 - */
-/*! @{ */
-#define HASHCRYPT_DIGEST0_DIGEST_MASK (0xFFFFFFFFU)
-#define HASHCRYPT_DIGEST0_DIGEST_SHIFT (0U)
-/*! DIGEST - One word of the Digest or output. Note that only 1st 4 are populated for AES and 1st 5 are populated for SHA1.
- */
-#define HASHCRYPT_DIGEST0_DIGEST(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_DIGEST0_DIGEST_SHIFT)) & HASHCRYPT_DIGEST0_DIGEST_MASK)
-/*! @} */
-
-/* The count of HASHCRYPT_DIGEST0 */
-#define HASHCRYPT_DIGEST0_COUNT (8U)
-
-/*! @name CRYPTCFG - Crypto settings for AES and Salsa and ChaCha */
-/*! @{ */
-#define HASHCRYPT_CRYPTCFG_MSW1ST_OUT_MASK (0x1U)
-#define HASHCRYPT_CRYPTCFG_MSW1ST_OUT_SHIFT (0U)
-/*! MSW1ST_OUT - If 1, OUTDATA0 will be read Most significant word 1st for AES. Else it will be read
- * in normal little endian - Least significant word 1st. Note: only if allowed by configuration.
- */
-#define HASHCRYPT_CRYPTCFG_MSW1ST_OUT(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_MSW1ST_OUT_SHIFT)) & HASHCRYPT_CRYPTCFG_MSW1ST_OUT_MASK)
-#define HASHCRYPT_CRYPTCFG_SWAPKEY_MASK (0x2U)
-#define HASHCRYPT_CRYPTCFG_SWAPKEY_SHIFT (1U)
-/*! SWAPKEY - If 1, will Swap the key input (bytes in each word).
- */
-#define HASHCRYPT_CRYPTCFG_SWAPKEY(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_SWAPKEY_SHIFT)) & HASHCRYPT_CRYPTCFG_SWAPKEY_MASK)
-#define HASHCRYPT_CRYPTCFG_SWAPDAT_MASK (0x4U)
-#define HASHCRYPT_CRYPTCFG_SWAPDAT_SHIFT (2U)
-/*! SWAPDAT - If 1, will SWAP the data and IV inputs (bytes in each word).
- */
-#define HASHCRYPT_CRYPTCFG_SWAPDAT(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_SWAPDAT_SHIFT)) & HASHCRYPT_CRYPTCFG_SWAPDAT_MASK)
-#define HASHCRYPT_CRYPTCFG_MSW1ST_MASK (0x8U)
-#define HASHCRYPT_CRYPTCFG_MSW1ST_SHIFT (3U)
-/*! MSW1ST - If 1, load of key, IV, and data is MSW 1st for AES. Else, the words are little endian.
- * Note: only if allowed by configuration.
- */
-#define HASHCRYPT_CRYPTCFG_MSW1ST(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_MSW1ST_SHIFT)) & HASHCRYPT_CRYPTCFG_MSW1ST_MASK)
-#define HASHCRYPT_CRYPTCFG_AESMODE_MASK (0x30U)
-#define HASHCRYPT_CRYPTCFG_AESMODE_SHIFT (4U)
-/*! AESMODE - AES Cipher mode to use if plain AES
- * 0b00..ECB - used as is
- * 0b01..CBC mode (see details on IV/nonce)
- * 0b10..CTR mode (see details on IV/nonce). See also AESCTRPOS.
- * 0b11..reserved
- */
-#define HASHCRYPT_CRYPTCFG_AESMODE(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_AESMODE_SHIFT)) & HASHCRYPT_CRYPTCFG_AESMODE_MASK)
-#define HASHCRYPT_CRYPTCFG_AESDECRYPT_MASK (0x40U)
-#define HASHCRYPT_CRYPTCFG_AESDECRYPT_SHIFT (6U)
-/*! AESDECRYPT - AES ECB direction. Only encryption used if CTR mode or manual modes such as CFB
- * 0b0..Encrypt
- * 0b1..Decrypt
- */
-#define HASHCRYPT_CRYPTCFG_AESDECRYPT(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_AESDECRYPT_SHIFT)) & HASHCRYPT_CRYPTCFG_AESDECRYPT_MASK)
-#define HASHCRYPT_CRYPTCFG_AESSECRET_MASK (0x80U)
-#define HASHCRYPT_CRYPTCFG_AESSECRET_SHIFT (7U)
-/*! AESSECRET - Selects the Hidden Secret key vs. User key, if provided. If security levels are
- * used, only the highest level is permitted to select this.
- * 0b0..User key provided in normal way
- * 0b1..Secret key provided in hidden way by HW
- */
-#define HASHCRYPT_CRYPTCFG_AESSECRET(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_AESSECRET_SHIFT)) & HASHCRYPT_CRYPTCFG_AESSECRET_MASK)
-#define HASHCRYPT_CRYPTCFG_AESKEYSZ_MASK (0x300U)
-#define HASHCRYPT_CRYPTCFG_AESKEYSZ_SHIFT (8U)
-/*! AESKEYSZ - Sets the AES key size
- * 0b00..128 bit key
- * 0b01..192 bit key
- * 0b10..256 bit key
- * 0b11..reserved
- */
-#define HASHCRYPT_CRYPTCFG_AESKEYSZ(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_AESKEYSZ_SHIFT)) & HASHCRYPT_CRYPTCFG_AESKEYSZ_MASK)
-#define HASHCRYPT_CRYPTCFG_AESCTRPOS_MASK (0x1C00U)
-#define HASHCRYPT_CRYPTCFG_AESCTRPOS_SHIFT (10U)
-/*! AESCTRPOS - Halfword position of 16b counter in IV if AESMODE is CTR (position is fixed for
- * Salsa and ChaCha). Only supports 16b counter, so application must control any additional bytes if
- * using more. The 16-bit counter is read from the IV and incremented by 1 each time. Any other
- * use CTR should use ECB directly and do its own XOR and so on.
- */
-#define HASHCRYPT_CRYPTCFG_AESCTRPOS(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_AESCTRPOS_SHIFT)) & HASHCRYPT_CRYPTCFG_AESCTRPOS_MASK)
-#define HASHCRYPT_CRYPTCFG_STREAMLAST_MASK (0x10000U)
-#define HASHCRYPT_CRYPTCFG_STREAMLAST_SHIFT (16U)
-/*! STREAMLAST - Is 1 if last stream block. If not 1, then the engine will compute the next "hash".
- */
-#define HASHCRYPT_CRYPTCFG_STREAMLAST(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_STREAMLAST_SHIFT)) & HASHCRYPT_CRYPTCFG_STREAMLAST_MASK)
-#define HASHCRYPT_CRYPTCFG_ICBSZ_MASK (0x300000U)
-#define HASHCRYPT_CRYPTCFG_ICBSZ_SHIFT (20U)
-/*! ICBSZ - This sets the ICB size between 32 and 128 bits, using the following rules. Note that the
- * counter is assumed to occupy the low order bits of the IV.
- * 0b00..32 bits of the IV/ctr are used (from 127:96)
- * 0b01..64 bits of the IV/ctr are used (from 127:64)
- * 0b10..96 bits of the IV/ctr are used (from 127:32)
- * 0b11..All 128 bits of the IV/ctr are used
- */
-#define HASHCRYPT_CRYPTCFG_ICBSZ(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_ICBSZ_SHIFT)) & HASHCRYPT_CRYPTCFG_ICBSZ_MASK)
-#define HASHCRYPT_CRYPTCFG_ICBSTRM_MASK (0xC00000U)
-#define HASHCRYPT_CRYPTCFG_ICBSTRM_SHIFT (22U)
-/*! ICBSTRM - The size of the ICB-AES stream that can be pushed before needing to compute a new
- * IV/ctr (counter start). This optimizes the performance of the stream of blocks after the 1st.
- * 0b00..8 blocks
- * 0b01..16 blocks
- * 0b10..32 blocks
- * 0b11..64 blocks
- */
-#define HASHCRYPT_CRYPTCFG_ICBSTRM(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_ICBSTRM_SHIFT)) & HASHCRYPT_CRYPTCFG_ICBSTRM_MASK)
-/*! @} */
-
-/*! @name CONFIG - Returns the configuration of this block in this chip - indicates what services are available. */
-/*! @{ */
-#define HASHCRYPT_CONFIG_DUAL_MASK (0x1U)
-#define HASHCRYPT_CONFIG_DUAL_SHIFT (0U)
-/*! DUAL - 1 if 2 x 512 bit buffers, 0 if only 1 x 512 bit
- */
-#define HASHCRYPT_CONFIG_DUAL(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_DUAL_SHIFT)) & HASHCRYPT_CONFIG_DUAL_MASK)
-#define HASHCRYPT_CONFIG_DMA_MASK (0x2U)
-#define HASHCRYPT_CONFIG_DMA_SHIFT (1U)
-/*! DMA - 1 if DMA is connected
- */
-#define HASHCRYPT_CONFIG_DMA(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_DMA_SHIFT)) & HASHCRYPT_CONFIG_DMA_MASK)
-#define HASHCRYPT_CONFIG_AHB_MASK (0x8U)
-#define HASHCRYPT_CONFIG_AHB_SHIFT (3U)
-/*! AHB - 1 if AHB Master is enabled
- */
-#define HASHCRYPT_CONFIG_AHB(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_AHB_SHIFT)) & HASHCRYPT_CONFIG_AHB_MASK)
-#define HASHCRYPT_CONFIG_AES_MASK (0x40U)
-#define HASHCRYPT_CONFIG_AES_SHIFT (6U)
-/*! AES - 1 if AES 128 included
- */
-#define HASHCRYPT_CONFIG_AES(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_AES_SHIFT)) & HASHCRYPT_CONFIG_AES_MASK)
-#define HASHCRYPT_CONFIG_AESKEY_MASK (0x80U)
-#define HASHCRYPT_CONFIG_AESKEY_SHIFT (7U)
-/*! AESKEY - 1 if AES 192 and 256 also included
- */
-#define HASHCRYPT_CONFIG_AESKEY(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_AESKEY_SHIFT)) & HASHCRYPT_CONFIG_AESKEY_MASK)
-#define HASHCRYPT_CONFIG_SECRET_MASK (0x100U)
-#define HASHCRYPT_CONFIG_SECRET_SHIFT (8U)
-/*! SECRET - 1 if AES Secret key available
- */
-#define HASHCRYPT_CONFIG_SECRET(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_SECRET_SHIFT)) & HASHCRYPT_CONFIG_SECRET_MASK)
-#define HASHCRYPT_CONFIG_ICB_MASK (0x800U)
-#define HASHCRYPT_CONFIG_ICB_SHIFT (11U)
-/*! ICB - 1 if ICB over AES included
- */
-#define HASHCRYPT_CONFIG_ICB(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_ICB_SHIFT)) & HASHCRYPT_CONFIG_ICB_MASK)
-/*! @} */
-
-/*! @name LOCK - Lock register allows locking to the current security level or unlocking by the lock holding level. */
-/*! @{ */
-#define HASHCRYPT_LOCK_SECLOCK_MASK (0x3U)
-#define HASHCRYPT_LOCK_SECLOCK_SHIFT (0U)
-/*! SECLOCK - Write 1 to secure-lock this block (if running in a security state). Write 0 to unlock.
- * If locked already, may only write if at same or higher security level as lock. Reads as: 0 if
- * unlocked, else 1, 2, 3 to indicate security level it is locked at. NOTE: this and ID are the
- * only readable registers if locked and current state is lower than lock level.
- * 0b00..Unlocks, so block is open to all. But, AHB Master will only issue non-secure requests.
- * 0b01..Locks to the current security level. AHB Master will issue requests at this level.
- */
-#define HASHCRYPT_LOCK_SECLOCK(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_LOCK_SECLOCK_SHIFT)) & HASHCRYPT_LOCK_SECLOCK_MASK)
-#define HASHCRYPT_LOCK_PATTERN_MASK (0xFFF0U)
-#define HASHCRYPT_LOCK_PATTERN_SHIFT (4U)
-/*! PATTERN - Must write 0xA75 to change lock state. A75:Pattern needed to change bits 1:0
- */
-#define HASHCRYPT_LOCK_PATTERN(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_LOCK_PATTERN_SHIFT)) & HASHCRYPT_LOCK_PATTERN_MASK)
-/*! @} */
-
-/*! @name MASK - */
-/*! @{ */
-#define HASHCRYPT_MASK_MASK_MASK (0xFFFFFFFFU)
-#define HASHCRYPT_MASK_MASK_SHIFT (0U)
-/*! MASK - A random word.
- */
-#define HASHCRYPT_MASK_MASK(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_MASK_MASK_SHIFT)) & HASHCRYPT_MASK_MASK_MASK)
-/*! @} */
-
-/* The count of HASHCRYPT_MASK */
-#define HASHCRYPT_MASK_COUNT (4U)
-
-
-/*!
- * @}
- */ /* end of group HASHCRYPT_Register_Masks */
-
-
-/* HASHCRYPT - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral HASHCRYPT base address */
- #define HASHCRYPT_BASE (0x500A4000u)
- /** Peripheral HASHCRYPT base address */
- #define HASHCRYPT_BASE_NS (0x400A4000u)
- /** Peripheral HASHCRYPT base pointer */
- #define HASHCRYPT ((HASHCRYPT_Type *)HASHCRYPT_BASE)
- /** Peripheral HASHCRYPT base pointer */
- #define HASHCRYPT_NS ((HASHCRYPT_Type *)HASHCRYPT_BASE_NS)
- /** Array initializer of HASHCRYPT peripheral base addresses */
- #define HASHCRYPT_BASE_ADDRS { HASHCRYPT_BASE }
- /** Array initializer of HASHCRYPT peripheral base pointers */
- #define HASHCRYPT_BASE_PTRS { HASHCRYPT }
- /** Array initializer of HASHCRYPT peripheral base addresses */
- #define HASHCRYPT_BASE_ADDRS_NS { HASHCRYPT_BASE_NS }
- /** Array initializer of HASHCRYPT peripheral base pointers */
- #define HASHCRYPT_BASE_PTRS_NS { HASHCRYPT_NS }
-#else
- /** Peripheral HASHCRYPT base address */
- #define HASHCRYPT_BASE (0x400A4000u)
- /** Peripheral HASHCRYPT base pointer */
- #define HASHCRYPT ((HASHCRYPT_Type *)HASHCRYPT_BASE)
- /** Array initializer of HASHCRYPT peripheral base addresses */
- #define HASHCRYPT_BASE_ADDRS { HASHCRYPT_BASE }
- /** Array initializer of HASHCRYPT peripheral base pointers */
- #define HASHCRYPT_BASE_PTRS { HASHCRYPT }
-#endif
-
-/*!
- * @}
- */ /* end of group HASHCRYPT_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- I2C Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup I2C_Peripheral_Access_Layer I2C Peripheral Access Layer
- * @{
- */
-
-/** I2C - Register Layout Typedef */
-typedef struct {
- uint8_t RESERVED_0[2048];
- __IO uint32_t CFG; /**< Configuration for shared functions., offset: 0x800 */
- __IO uint32_t STAT; /**< Status register for Master, Slave, and Monitor functions., offset: 0x804 */
- __IO uint32_t INTENSET; /**< Interrupt Enable Set and read register., offset: 0x808 */
- __O uint32_t INTENCLR; /**< Interrupt Enable Clear register., offset: 0x80C */
- __IO uint32_t TIMEOUT; /**< Time-out value register., offset: 0x810 */
- __IO uint32_t CLKDIV; /**< Clock pre-divider for the entire I2C interface. This determines what time increments are used for the MSTTIME register, and controls some timing of the Slave function., offset: 0x814 */
- __I uint32_t INTSTAT; /**< Interrupt Status register for Master, Slave, and Monitor functions., offset: 0x818 */
- uint8_t RESERVED_1[4];
- __IO uint32_t MSTCTL; /**< Master control register., offset: 0x820 */
- __IO uint32_t MSTTIME; /**< Master timing configuration., offset: 0x824 */
- __IO uint32_t MSTDAT; /**< Combined Master receiver and transmitter data register., offset: 0x828 */
- uint8_t RESERVED_2[20];
- __IO uint32_t SLVCTL; /**< Slave control register., offset: 0x840 */
- __IO uint32_t SLVDAT; /**< Combined Slave receiver and transmitter data register., offset: 0x844 */
- __IO uint32_t SLVADR[4]; /**< Slave address register., array offset: 0x848, array step: 0x4 */
- __IO uint32_t SLVQUAL0; /**< Slave Qualification for address 0., offset: 0x858 */
- uint8_t RESERVED_3[36];
- __I uint32_t MONRXDAT; /**< Monitor receiver data register., offset: 0x880 */
- uint8_t RESERVED_4[1912];
- __I uint32_t ID; /**< Peripheral identification register., offset: 0xFFC */
-} I2C_Type;
-
-/* ----------------------------------------------------------------------------
- -- I2C Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup I2C_Register_Masks I2C Register Masks
- * @{
- */
-
-/*! @name CFG - Configuration for shared functions. */
-/*! @{ */
-#define I2C_CFG_MSTEN_MASK (0x1U)
-#define I2C_CFG_MSTEN_SHIFT (0U)
-/*! MSTEN - Master Enable. When disabled, configurations settings for the Master function are not
- * changed, but the Master function is internally reset.
- * 0b0..Disabled. The I2C Master function is disabled.
- * 0b1..Enabled. The I2C Master function is enabled.
- */
-#define I2C_CFG_MSTEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_CFG_MSTEN_SHIFT)) & I2C_CFG_MSTEN_MASK)
-#define I2C_CFG_SLVEN_MASK (0x2U)
-#define I2C_CFG_SLVEN_SHIFT (1U)
-/*! SLVEN - Slave Enable. When disabled, configurations settings for the Slave function are not
- * changed, but the Slave function is internally reset.
- * 0b0..Disabled. The I2C slave function is disabled.
- * 0b1..Enabled. The I2C slave function is enabled.
- */
-#define I2C_CFG_SLVEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_CFG_SLVEN_SHIFT)) & I2C_CFG_SLVEN_MASK)
-#define I2C_CFG_MONEN_MASK (0x4U)
-#define I2C_CFG_MONEN_SHIFT (2U)
-/*! MONEN - Monitor Enable. When disabled, configurations settings for the Monitor function are not
- * changed, but the Monitor function is internally reset.
- * 0b0..Disabled. The I2C Monitor function is disabled.
- * 0b1..Enabled. The I2C Monitor function is enabled.
- */
-#define I2C_CFG_MONEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_CFG_MONEN_SHIFT)) & I2C_CFG_MONEN_MASK)
-#define I2C_CFG_TIMEOUTEN_MASK (0x8U)
-#define I2C_CFG_TIMEOUTEN_SHIFT (3U)
-/*! TIMEOUTEN - I2C bus Time-out Enable. When disabled, the time-out function is internally reset.
- * 0b0..Disabled. Time-out function is disabled.
- * 0b1..Enabled. Time-out function is enabled. Both types of time-out flags will be generated and will cause
- * interrupts if they are enabled. Typically, only one time-out will be used in a system.
- */
-#define I2C_CFG_TIMEOUTEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_CFG_TIMEOUTEN_SHIFT)) & I2C_CFG_TIMEOUTEN_MASK)
-#define I2C_CFG_MONCLKSTR_MASK (0x10U)
-#define I2C_CFG_MONCLKSTR_SHIFT (4U)
-/*! MONCLKSTR - Monitor function Clock Stretching.
- * 0b0..Disabled. The Monitor function will not perform clock stretching. Software or DMA may not always be able
- * to read data provided by the Monitor function before it is overwritten. This mode may be used when
- * non-invasive monitoring is critical.
- * 0b1..Enabled. The Monitor function will perform clock stretching in order to ensure that software or DMA can
- * read all incoming data supplied by the Monitor function.
- */
-#define I2C_CFG_MONCLKSTR(x) (((uint32_t)(((uint32_t)(x)) << I2C_CFG_MONCLKSTR_SHIFT)) & I2C_CFG_MONCLKSTR_MASK)
-#define I2C_CFG_HSCAPABLE_MASK (0x20U)
-#define I2C_CFG_HSCAPABLE_SHIFT (5U)
-/*! HSCAPABLE - High-speed mode Capable enable. Since High Speed mode alters the way I2C pins drive
- * and filter, as well as the timing for certain I2C signalling, enabling High-speed mode applies
- * to all functions: Master, Slave, and Monitor.
- * 0b0..Fast-mode plus. The I 2C interface will support Standard-mode, Fast-mode, and Fast-mode Plus, to the
- * extent that the pin electronics support these modes. Any changes that need to be made to the pin controls,
- * such as changing the drive strength or filtering, must be made by software via the IOCON register associated
- * with each I2C pin,
- * 0b1..High-speed. In addition to Standard-mode, Fast-mode, and Fast-mode Plus, the I 2C interface will support
- * High-speed mode to the extent that the pin electronics support these modes. See Section 25.7.2.2 for more
- * information.
- */
-#define I2C_CFG_HSCAPABLE(x) (((uint32_t)(((uint32_t)(x)) << I2C_CFG_HSCAPABLE_SHIFT)) & I2C_CFG_HSCAPABLE_MASK)
-/*! @} */
-
-/*! @name STAT - Status register for Master, Slave, and Monitor functions. */
-/*! @{ */
-#define I2C_STAT_MSTPENDING_MASK (0x1U)
-#define I2C_STAT_MSTPENDING_SHIFT (0U)
-/*! MSTPENDING - Master Pending. Indicates that the Master is waiting to continue communication on
- * the I2C-bus (pending) or is idle. When the master is pending, the MSTSTATE bits indicate what
- * type of software service if any the master expects. This flag will cause an interrupt when set
- * if, enabled via the INTENSET register. The MSTPENDING flag is not set when the DMA is handling
- * an event (if the MSTDMA bit in the MSTCTL register is set). If the master is in the idle
- * state, and no communication is needed, mask this interrupt.
- * 0b0..In progress. Communication is in progress and the Master function is busy and cannot currently accept a command.
- * 0b1..Pending. The Master function needs software service or is in the idle state. If the master is not in the
- * idle state, it is waiting to receive or transmit data or the NACK bit.
- */
-#define I2C_STAT_MSTPENDING(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MSTPENDING_SHIFT)) & I2C_STAT_MSTPENDING_MASK)
-#define I2C_STAT_MSTSTATE_MASK (0xEU)
-#define I2C_STAT_MSTSTATE_SHIFT (1U)
-/*! MSTSTATE - Master State code. The master state code reflects the master state when the
- * MSTPENDING bit is set, that is the master is pending or in the idle state. Each value of this field
- * indicates a specific required service for the Master function. All other values are reserved. See
- * Table 400 for details of state values and appropriate responses.
- * 0b000..Idle. The Master function is available to be used for a new transaction.
- * 0b001..Receive ready. Received data available (Master Receiver mode). Address plus Read was previously sent and Acknowledged by slave.
- * 0b010..Transmit ready. Data can be transmitted (Master Transmitter mode). Address plus Write was previously sent and Acknowledged by slave.
- * 0b011..NACK Address. Slave NACKed address.
- * 0b100..NACK Data. Slave NACKed transmitted data.
- */
-#define I2C_STAT_MSTSTATE(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MSTSTATE_SHIFT)) & I2C_STAT_MSTSTATE_MASK)
-#define I2C_STAT_MSTARBLOSS_MASK (0x10U)
-#define I2C_STAT_MSTARBLOSS_SHIFT (4U)
-/*! MSTARBLOSS - Master Arbitration Loss flag. This flag can be cleared by software writing a 1 to
- * this bit. It is also cleared automatically a 1 is written to MSTCONTINUE.
- * 0b0..No Arbitration Loss has occurred.
- * 0b1..Arbitration loss. The Master function has experienced an Arbitration Loss. At this point, the Master
- * function has already stopped driving the bus and gone to an idle state. Software can respond by doing nothing,
- * or by sending a Start in order to attempt to gain control of the bus when it next becomes idle.
- */
-#define I2C_STAT_MSTARBLOSS(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MSTARBLOSS_SHIFT)) & I2C_STAT_MSTARBLOSS_MASK)
-#define I2C_STAT_MSTSTSTPERR_MASK (0x40U)
-#define I2C_STAT_MSTSTSTPERR_SHIFT (6U)
-/*! MSTSTSTPERR - Master Start/Stop Error flag. This flag can be cleared by software writing a 1 to
- * this bit. It is also cleared automatically a 1 is written to MSTCONTINUE.
- * 0b0..No Start/Stop Error has occurred.
- * 0b1..The Master function has experienced a Start/Stop Error. A Start or Stop was detected at a time when it is
- * not allowed by the I2C specification. The Master interface has stopped driving the bus and gone to an
- * idle state, no action is required. A request for a Start could be made, or software could attempt to insure
- * that the bus has not stalled.
- */
-#define I2C_STAT_MSTSTSTPERR(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MSTSTSTPERR_SHIFT)) & I2C_STAT_MSTSTSTPERR_MASK)
-#define I2C_STAT_SLVPENDING_MASK (0x100U)
-#define I2C_STAT_SLVPENDING_SHIFT (8U)
-/*! SLVPENDING - Slave Pending. Indicates that the Slave function is waiting to continue
- * communication on the I2C-bus and needs software service. This flag will cause an interrupt when set if
- * enabled via INTENSET. The SLVPENDING flag is not set when the DMA is handling an event (if the
- * SLVDMA bit in the SLVCTL register is set). The SLVPENDING flag is read-only and is
- * automatically cleared when a 1 is written to the SLVCONTINUE bit in the SLVCTL register. The point in time
- * when SlvPending is set depends on whether the I2C interface is in HSCAPABLE mode. See Section
- * 25.7.2.2.2. When the I2C interface is configured to be HSCAPABLE, HS master codes are
- * detected automatically. Due to the requirements of the HS I2C specification, slave addresses must
- * also be detected automatically, since the address must be acknowledged before the clock can be
- * stretched.
- * 0b0..In progress. The Slave function does not currently need service.
- * 0b1..Pending. The Slave function needs service. Information on what is needed can be found in the adjacent SLVSTATE field.
- */
-#define I2C_STAT_SLVPENDING(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SLVPENDING_SHIFT)) & I2C_STAT_SLVPENDING_MASK)
-#define I2C_STAT_SLVSTATE_MASK (0x600U)
-#define I2C_STAT_SLVSTATE_SHIFT (9U)
-/*! SLVSTATE - Slave State code. Each value of this field indicates a specific required service for
- * the Slave function. All other values are reserved. See Table 401 for state values and actions.
- * note that the occurrence of some states and how they are handled are affected by DMA mode and
- * Automatic Operation modes.
- * 0b00..Slave address. Address plus R/W received. At least one of the four slave addresses has been matched by hardware.
- * 0b01..Slave receive. Received data is available (Slave Receiver mode).
- * 0b10..Slave transmit. Data can be transmitted (Slave Transmitter mode).
- */
-#define I2C_STAT_SLVSTATE(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SLVSTATE_SHIFT)) & I2C_STAT_SLVSTATE_MASK)
-#define I2C_STAT_SLVNOTSTR_MASK (0x800U)
-#define I2C_STAT_SLVNOTSTR_SHIFT (11U)
-/*! SLVNOTSTR - Slave Not Stretching. Indicates when the slave function is stretching the I2C clock.
- * This is needed in order to gracefully invoke Deep Sleep or Power-down modes during slave
- * operation. This read-only flag reflects the slave function status in real time.
- * 0b0..Stretching. The slave function is currently stretching the I2C bus clock. Deep-Sleep or Power-down mode cannot be entered at this time.
- * 0b1..Not stretching. The slave function is not currently stretching the I 2C bus clock. Deep-sleep or
- * Power-down mode could be entered at this time.
- */
-#define I2C_STAT_SLVNOTSTR(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SLVNOTSTR_SHIFT)) & I2C_STAT_SLVNOTSTR_MASK)
-#define I2C_STAT_SLVIDX_MASK (0x3000U)
-#define I2C_STAT_SLVIDX_SHIFT (12U)
-/*! SLVIDX - Slave address match Index. This field is valid when the I2C slave function has been
- * selected by receiving an address that matches one of the slave addresses defined by any enabled
- * slave address registers, and provides an identification of the address that was matched. It is
- * possible that more than one address could be matched, but only one match can be reported here.
- * 0b00..Address 0. Slave address 0 was matched.
- * 0b01..Address 1. Slave address 1 was matched.
- * 0b10..Address 2. Slave address 2 was matched.
- * 0b11..Address 3. Slave address 3 was matched.
- */
-#define I2C_STAT_SLVIDX(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SLVIDX_SHIFT)) & I2C_STAT_SLVIDX_MASK)
-#define I2C_STAT_SLVSEL_MASK (0x4000U)
-#define I2C_STAT_SLVSEL_SHIFT (14U)
-/*! SLVSEL - Slave selected flag. SLVSEL is set after an address match when software tells the Slave
- * function to acknowledge the address, or when the address has been automatically acknowledged.
- * It is cleared when another address cycle presents an address that does not match an enabled
- * address on the Slave function, when slave software decides to NACK a matched address, when
- * there is a Stop detected on the bus, when the master NACKs slave data, and in some combinations of
- * Automatic Operation. SLVSEL is not cleared if software NACKs data.
- * 0b0..Not selected. The Slave function is not currently selected.
- * 0b1..Selected. The Slave function is currently selected.
- */
-#define I2C_STAT_SLVSEL(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SLVSEL_SHIFT)) & I2C_STAT_SLVSEL_MASK)
-#define I2C_STAT_SLVDESEL_MASK (0x8000U)
-#define I2C_STAT_SLVDESEL_SHIFT (15U)
-/*! SLVDESEL - Slave Deselected flag. This flag will cause an interrupt when set if enabled via
- * INTENSET. This flag can be cleared by writing a 1 to this bit.
- * 0b0..Not deselected. The Slave function has not become deselected. This does not mean that it is currently
- * selected. That information can be found in the SLVSEL flag.
- * 0b1..Deselected. The Slave function has become deselected. This is specifically caused by the SLVSEL flag
- * changing from 1 to 0. See the description of SLVSEL for details on when that event occurs.
- */
-#define I2C_STAT_SLVDESEL(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SLVDESEL_SHIFT)) & I2C_STAT_SLVDESEL_MASK)
-#define I2C_STAT_MONRDY_MASK (0x10000U)
-#define I2C_STAT_MONRDY_SHIFT (16U)
-/*! MONRDY - Monitor Ready. This flag is cleared when the MONRXDAT register is read.
- * 0b0..No data. The Monitor function does not currently have data available.
- * 0b1..Data waiting. The Monitor function has data waiting to be read.
- */
-#define I2C_STAT_MONRDY(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MONRDY_SHIFT)) & I2C_STAT_MONRDY_MASK)
-#define I2C_STAT_MONOV_MASK (0x20000U)
-#define I2C_STAT_MONOV_SHIFT (17U)
-/*! MONOV - Monitor Overflow flag.
- * 0b0..No overrun. Monitor data has not overrun.
- * 0b1..Overrun. A Monitor data overrun has occurred. This can only happen when Monitor clock stretching not
- * enabled via the MONCLKSTR bit in the CFG register. Writing 1 to this bit clears the flag.
- */
-#define I2C_STAT_MONOV(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MONOV_SHIFT)) & I2C_STAT_MONOV_MASK)
-#define I2C_STAT_MONACTIVE_MASK (0x40000U)
-#define I2C_STAT_MONACTIVE_SHIFT (18U)
-/*! MONACTIVE - Monitor Active flag. Indicates when the Monitor function considers the I 2C bus to
- * be active. Active is defined here as when some Master is on the bus: a bus Start has occurred
- * more recently than a bus Stop.
- * 0b0..Inactive. The Monitor function considers the I2C bus to be inactive.
- * 0b1..Active. The Monitor function considers the I2C bus to be active.
- */
-#define I2C_STAT_MONACTIVE(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MONACTIVE_SHIFT)) & I2C_STAT_MONACTIVE_MASK)
-#define I2C_STAT_MONIDLE_MASK (0x80000U)
-#define I2C_STAT_MONIDLE_SHIFT (19U)
-/*! MONIDLE - Monitor Idle flag. This flag is set when the Monitor function sees the I2C bus change
- * from active to inactive. This can be used by software to decide when to process data
- * accumulated by the Monitor function. This flag will cause an interrupt when set if enabled via the
- * INTENSET register. The flag can be cleared by writing a 1 to this bit.
- * 0b0..Not idle. The I2C bus is not idle, or this flag has been cleared by software.
- * 0b1..Idle. The I2C bus has gone idle at least once since the last time this flag was cleared by software.
- */
-#define I2C_STAT_MONIDLE(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MONIDLE_SHIFT)) & I2C_STAT_MONIDLE_MASK)
-#define I2C_STAT_EVENTTIMEOUT_MASK (0x1000000U)
-#define I2C_STAT_EVENTTIMEOUT_SHIFT (24U)
-/*! EVENTTIMEOUT - Event Time-out Interrupt flag. Indicates when the time between events has been
- * longer than the time specified by the TIMEOUT register. Events include Start, Stop, and clock
- * edges. The flag is cleared by writing a 1 to this bit. No time-out is created when the I2C-bus
- * is idle.
- * 0b0..No time-out. I2C bus events have not caused a time-out.
- * 0b1..Event time-out. The time between I2C bus events has been longer than the time specified by the TIMEOUT register.
- */
-#define I2C_STAT_EVENTTIMEOUT(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_EVENTTIMEOUT_SHIFT)) & I2C_STAT_EVENTTIMEOUT_MASK)
-#define I2C_STAT_SCLTIMEOUT_MASK (0x2000000U)
-#define I2C_STAT_SCLTIMEOUT_SHIFT (25U)
-/*! SCLTIMEOUT - SCL Time-out Interrupt flag. Indicates when SCL has remained low longer than the
- * time specific by the TIMEOUT register. The flag is cleared by writing a 1 to this bit.
- * 0b0..No time-out. SCL low time has not caused a time-out.
- * 0b1..Time-out. SCL low time has caused a time-out.
- */
-#define I2C_STAT_SCLTIMEOUT(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SCLTIMEOUT_SHIFT)) & I2C_STAT_SCLTIMEOUT_MASK)
-/*! @} */
-
-/*! @name INTENSET - Interrupt Enable Set and read register. */
-/*! @{ */
-#define I2C_INTENSET_MSTPENDINGEN_MASK (0x1U)
-#define I2C_INTENSET_MSTPENDINGEN_SHIFT (0U)
-/*! MSTPENDINGEN - Master Pending interrupt Enable.
- * 0b0..Disabled. The MstPending interrupt is disabled.
- * 0b1..Enabled. The MstPending interrupt is enabled.
- */
-#define I2C_INTENSET_MSTPENDINGEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_MSTPENDINGEN_SHIFT)) & I2C_INTENSET_MSTPENDINGEN_MASK)
-#define I2C_INTENSET_MSTARBLOSSEN_MASK (0x10U)
-#define I2C_INTENSET_MSTARBLOSSEN_SHIFT (4U)
-/*! MSTARBLOSSEN - Master Arbitration Loss interrupt Enable.
- * 0b0..Disabled. The MstArbLoss interrupt is disabled.
- * 0b1..Enabled. The MstArbLoss interrupt is enabled.
- */
-#define I2C_INTENSET_MSTARBLOSSEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_MSTARBLOSSEN_SHIFT)) & I2C_INTENSET_MSTARBLOSSEN_MASK)
-#define I2C_INTENSET_MSTSTSTPERREN_MASK (0x40U)
-#define I2C_INTENSET_MSTSTSTPERREN_SHIFT (6U)
-/*! MSTSTSTPERREN - Master Start/Stop Error interrupt Enable.
- * 0b0..Disabled. The MstStStpErr interrupt is disabled.
- * 0b1..Enabled. The MstStStpErr interrupt is enabled.
- */
-#define I2C_INTENSET_MSTSTSTPERREN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_MSTSTSTPERREN_SHIFT)) & I2C_INTENSET_MSTSTSTPERREN_MASK)
-#define I2C_INTENSET_SLVPENDINGEN_MASK (0x100U)
-#define I2C_INTENSET_SLVPENDINGEN_SHIFT (8U)
-/*! SLVPENDINGEN - Slave Pending interrupt Enable.
- * 0b0..Disabled. The SlvPending interrupt is disabled.
- * 0b1..Enabled. The SlvPending interrupt is enabled.
- */
-#define I2C_INTENSET_SLVPENDINGEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_SLVPENDINGEN_SHIFT)) & I2C_INTENSET_SLVPENDINGEN_MASK)
-#define I2C_INTENSET_SLVNOTSTREN_MASK (0x800U)
-#define I2C_INTENSET_SLVNOTSTREN_SHIFT (11U)
-/*! SLVNOTSTREN - Slave Not Stretching interrupt Enable.
- * 0b0..Disabled. The SlvNotStr interrupt is disabled.
- * 0b1..Enabled. The SlvNotStr interrupt is enabled.
- */
-#define I2C_INTENSET_SLVNOTSTREN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_SLVNOTSTREN_SHIFT)) & I2C_INTENSET_SLVNOTSTREN_MASK)
-#define I2C_INTENSET_SLVDESELEN_MASK (0x8000U)
-#define I2C_INTENSET_SLVDESELEN_SHIFT (15U)
-/*! SLVDESELEN - Slave Deselect interrupt Enable.
- * 0b0..Disabled. The SlvDeSel interrupt is disabled.
- * 0b1..Enabled. The SlvDeSel interrupt is enabled.
- */
-#define I2C_INTENSET_SLVDESELEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_SLVDESELEN_SHIFT)) & I2C_INTENSET_SLVDESELEN_MASK)
-#define I2C_INTENSET_MONRDYEN_MASK (0x10000U)
-#define I2C_INTENSET_MONRDYEN_SHIFT (16U)
-/*! MONRDYEN - Monitor data Ready interrupt Enable.
- * 0b0..Disabled. The MonRdy interrupt is disabled.
- * 0b1..Enabled. The MonRdy interrupt is enabled.
- */
-#define I2C_INTENSET_MONRDYEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_MONRDYEN_SHIFT)) & I2C_INTENSET_MONRDYEN_MASK)
-#define I2C_INTENSET_MONOVEN_MASK (0x20000U)
-#define I2C_INTENSET_MONOVEN_SHIFT (17U)
-/*! MONOVEN - Monitor Overrun interrupt Enable.
- * 0b0..Disabled. The MonOv interrupt is disabled.
- * 0b1..Enabled. The MonOv interrupt is enabled.
- */
-#define I2C_INTENSET_MONOVEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_MONOVEN_SHIFT)) & I2C_INTENSET_MONOVEN_MASK)
-#define I2C_INTENSET_MONIDLEEN_MASK (0x80000U)
-#define I2C_INTENSET_MONIDLEEN_SHIFT (19U)
-/*! MONIDLEEN - Monitor Idle interrupt Enable.
- * 0b0..Disabled. The MonIdle interrupt is disabled.
- * 0b1..Enabled. The MonIdle interrupt is enabled.
- */
-#define I2C_INTENSET_MONIDLEEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_MONIDLEEN_SHIFT)) & I2C_INTENSET_MONIDLEEN_MASK)
-#define I2C_INTENSET_EVENTTIMEOUTEN_MASK (0x1000000U)
-#define I2C_INTENSET_EVENTTIMEOUTEN_SHIFT (24U)
-/*! EVENTTIMEOUTEN - Event time-out interrupt Enable.
- * 0b0..Disabled. The Event time-out interrupt is disabled.
- * 0b1..Enabled. The Event time-out interrupt is enabled.
- */
-#define I2C_INTENSET_EVENTTIMEOUTEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_EVENTTIMEOUTEN_SHIFT)) & I2C_INTENSET_EVENTTIMEOUTEN_MASK)
-#define I2C_INTENSET_SCLTIMEOUTEN_MASK (0x2000000U)
-#define I2C_INTENSET_SCLTIMEOUTEN_SHIFT (25U)
-/*! SCLTIMEOUTEN - SCL time-out interrupt Enable.
- * 0b0..Disabled. The SCL time-out interrupt is disabled.
- * 0b1..Enabled. The SCL time-out interrupt is enabled.
- */
-#define I2C_INTENSET_SCLTIMEOUTEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_SCLTIMEOUTEN_SHIFT)) & I2C_INTENSET_SCLTIMEOUTEN_MASK)
-/*! @} */
-
-/*! @name INTENCLR - Interrupt Enable Clear register. */
-/*! @{ */
-#define I2C_INTENCLR_MSTPENDINGCLR_MASK (0x1U)
-#define I2C_INTENCLR_MSTPENDINGCLR_SHIFT (0U)
-/*! MSTPENDINGCLR - Master Pending interrupt clear. Writing 1 to this bit clears the corresponding
- * bit in the INTENSET register if implemented.
- */
-#define I2C_INTENCLR_MSTPENDINGCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_MSTPENDINGCLR_SHIFT)) & I2C_INTENCLR_MSTPENDINGCLR_MASK)
-#define I2C_INTENCLR_MSTARBLOSSCLR_MASK (0x10U)
-#define I2C_INTENCLR_MSTARBLOSSCLR_SHIFT (4U)
-/*! MSTARBLOSSCLR - Master Arbitration Loss interrupt clear.
- */
-#define I2C_INTENCLR_MSTARBLOSSCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_MSTARBLOSSCLR_SHIFT)) & I2C_INTENCLR_MSTARBLOSSCLR_MASK)
-#define I2C_INTENCLR_MSTSTSTPERRCLR_MASK (0x40U)
-#define I2C_INTENCLR_MSTSTSTPERRCLR_SHIFT (6U)
-/*! MSTSTSTPERRCLR - Master Start/Stop Error interrupt clear.
- */
-#define I2C_INTENCLR_MSTSTSTPERRCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_MSTSTSTPERRCLR_SHIFT)) & I2C_INTENCLR_MSTSTSTPERRCLR_MASK)
-#define I2C_INTENCLR_SLVPENDINGCLR_MASK (0x100U)
-#define I2C_INTENCLR_SLVPENDINGCLR_SHIFT (8U)
-/*! SLVPENDINGCLR - Slave Pending interrupt clear.
- */
-#define I2C_INTENCLR_SLVPENDINGCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_SLVPENDINGCLR_SHIFT)) & I2C_INTENCLR_SLVPENDINGCLR_MASK)
-#define I2C_INTENCLR_SLVNOTSTRCLR_MASK (0x800U)
-#define I2C_INTENCLR_SLVNOTSTRCLR_SHIFT (11U)
-/*! SLVNOTSTRCLR - Slave Not Stretching interrupt clear.
- */
-#define I2C_INTENCLR_SLVNOTSTRCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_SLVNOTSTRCLR_SHIFT)) & I2C_INTENCLR_SLVNOTSTRCLR_MASK)
-#define I2C_INTENCLR_SLVDESELCLR_MASK (0x8000U)
-#define I2C_INTENCLR_SLVDESELCLR_SHIFT (15U)
-/*! SLVDESELCLR - Slave Deselect interrupt clear.
- */
-#define I2C_INTENCLR_SLVDESELCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_SLVDESELCLR_SHIFT)) & I2C_INTENCLR_SLVDESELCLR_MASK)
-#define I2C_INTENCLR_MONRDYCLR_MASK (0x10000U)
-#define I2C_INTENCLR_MONRDYCLR_SHIFT (16U)
-/*! MONRDYCLR - Monitor data Ready interrupt clear.
- */
-#define I2C_INTENCLR_MONRDYCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_MONRDYCLR_SHIFT)) & I2C_INTENCLR_MONRDYCLR_MASK)
-#define I2C_INTENCLR_MONOVCLR_MASK (0x20000U)
-#define I2C_INTENCLR_MONOVCLR_SHIFT (17U)
-/*! MONOVCLR - Monitor Overrun interrupt clear.
- */
-#define I2C_INTENCLR_MONOVCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_MONOVCLR_SHIFT)) & I2C_INTENCLR_MONOVCLR_MASK)
-#define I2C_INTENCLR_MONIDLECLR_MASK (0x80000U)
-#define I2C_INTENCLR_MONIDLECLR_SHIFT (19U)
-/*! MONIDLECLR - Monitor Idle interrupt clear.
- */
-#define I2C_INTENCLR_MONIDLECLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_MONIDLECLR_SHIFT)) & I2C_INTENCLR_MONIDLECLR_MASK)
-#define I2C_INTENCLR_EVENTTIMEOUTCLR_MASK (0x1000000U)
-#define I2C_INTENCLR_EVENTTIMEOUTCLR_SHIFT (24U)
-/*! EVENTTIMEOUTCLR - Event time-out interrupt clear.
- */
-#define I2C_INTENCLR_EVENTTIMEOUTCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_EVENTTIMEOUTCLR_SHIFT)) & I2C_INTENCLR_EVENTTIMEOUTCLR_MASK)
-#define I2C_INTENCLR_SCLTIMEOUTCLR_MASK (0x2000000U)
-#define I2C_INTENCLR_SCLTIMEOUTCLR_SHIFT (25U)
-/*! SCLTIMEOUTCLR - SCL time-out interrupt clear.
- */
-#define I2C_INTENCLR_SCLTIMEOUTCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_SCLTIMEOUTCLR_SHIFT)) & I2C_INTENCLR_SCLTIMEOUTCLR_MASK)
-/*! @} */
-
-/*! @name TIMEOUT - Time-out value register. */
-/*! @{ */
-#define I2C_TIMEOUT_TOMIN_MASK (0xFU)
-#define I2C_TIMEOUT_TOMIN_SHIFT (0U)
-/*! TOMIN - Time-out time value, bottom four bits. These are hard-wired to 0xF. This gives a minimum
- * time-out of 16 I2C function clocks and also a time-out resolution of 16 I2C function clocks.
- */
-#define I2C_TIMEOUT_TOMIN(x) (((uint32_t)(((uint32_t)(x)) << I2C_TIMEOUT_TOMIN_SHIFT)) & I2C_TIMEOUT_TOMIN_MASK)
-#define I2C_TIMEOUT_TO_MASK (0xFFF0U)
-#define I2C_TIMEOUT_TO_SHIFT (4U)
-/*! TO - Time-out time value. Specifies the time-out interval value in increments of 16 I 2C
- * function clocks, as defined by the CLKDIV register. To change this value while I2C is in operation,
- * disable all time-outs, write a new value to TIMEOUT, then re-enable time-outs. 0x000 = A
- * time-out will occur after 16 counts of the I2C function clock. 0x001 = A time-out will occur after
- * 32 counts of the I2C function clock. 0xFFF = A time-out will occur after 65,536 counts of the
- * I2C function clock.
- */
-#define I2C_TIMEOUT_TO(x) (((uint32_t)(((uint32_t)(x)) << I2C_TIMEOUT_TO_SHIFT)) & I2C_TIMEOUT_TO_MASK)
-/*! @} */
-
-/*! @name CLKDIV - Clock pre-divider for the entire I2C interface. This determines what time increments are used for the MSTTIME register, and controls some timing of the Slave function. */
-/*! @{ */
-#define I2C_CLKDIV_DIVVAL_MASK (0xFFFFU)
-#define I2C_CLKDIV_DIVVAL_SHIFT (0U)
-/*! DIVVAL - This field controls how the Flexcomm clock (FCLK) is used by the I2C functions that
- * need an internal clock in order to operate. 0x0000 = FCLK is used directly by the I2C. 0x0001 =
- * FCLK is divided by 2 before use. 0x0002 = FCLK is divided by 3 before use. 0xFFFF = FCLK is
- * divided by 65,536 before use.
- */
-#define I2C_CLKDIV_DIVVAL(x) (((uint32_t)(((uint32_t)(x)) << I2C_CLKDIV_DIVVAL_SHIFT)) & I2C_CLKDIV_DIVVAL_MASK)
-/*! @} */
-
-/*! @name INTSTAT - Interrupt Status register for Master, Slave, and Monitor functions. */
-/*! @{ */
-#define I2C_INTSTAT_MSTPENDING_MASK (0x1U)
-#define I2C_INTSTAT_MSTPENDING_SHIFT (0U)
-/*! MSTPENDING - Master Pending.
- */
-#define I2C_INTSTAT_MSTPENDING(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_MSTPENDING_SHIFT)) & I2C_INTSTAT_MSTPENDING_MASK)
-#define I2C_INTSTAT_MSTARBLOSS_MASK (0x10U)
-#define I2C_INTSTAT_MSTARBLOSS_SHIFT (4U)
-/*! MSTARBLOSS - Master Arbitration Loss flag.
- */
-#define I2C_INTSTAT_MSTARBLOSS(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_MSTARBLOSS_SHIFT)) & I2C_INTSTAT_MSTARBLOSS_MASK)
-#define I2C_INTSTAT_MSTSTSTPERR_MASK (0x40U)
-#define I2C_INTSTAT_MSTSTSTPERR_SHIFT (6U)
-/*! MSTSTSTPERR - Master Start/Stop Error flag.
- */
-#define I2C_INTSTAT_MSTSTSTPERR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_MSTSTSTPERR_SHIFT)) & I2C_INTSTAT_MSTSTSTPERR_MASK)
-#define I2C_INTSTAT_SLVPENDING_MASK (0x100U)
-#define I2C_INTSTAT_SLVPENDING_SHIFT (8U)
-/*! SLVPENDING - Slave Pending.
- */
-#define I2C_INTSTAT_SLVPENDING(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_SLVPENDING_SHIFT)) & I2C_INTSTAT_SLVPENDING_MASK)
-#define I2C_INTSTAT_SLVNOTSTR_MASK (0x800U)
-#define I2C_INTSTAT_SLVNOTSTR_SHIFT (11U)
-/*! SLVNOTSTR - Slave Not Stretching status.
- */
-#define I2C_INTSTAT_SLVNOTSTR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_SLVNOTSTR_SHIFT)) & I2C_INTSTAT_SLVNOTSTR_MASK)
-#define I2C_INTSTAT_SLVDESEL_MASK (0x8000U)
-#define I2C_INTSTAT_SLVDESEL_SHIFT (15U)
-/*! SLVDESEL - Slave Deselected flag.
- */
-#define I2C_INTSTAT_SLVDESEL(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_SLVDESEL_SHIFT)) & I2C_INTSTAT_SLVDESEL_MASK)
-#define I2C_INTSTAT_MONRDY_MASK (0x10000U)
-#define I2C_INTSTAT_MONRDY_SHIFT (16U)
-/*! MONRDY - Monitor Ready.
- */
-#define I2C_INTSTAT_MONRDY(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_MONRDY_SHIFT)) & I2C_INTSTAT_MONRDY_MASK)
-#define I2C_INTSTAT_MONOV_MASK (0x20000U)
-#define I2C_INTSTAT_MONOV_SHIFT (17U)
-/*! MONOV - Monitor Overflow flag.
- */
-#define I2C_INTSTAT_MONOV(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_MONOV_SHIFT)) & I2C_INTSTAT_MONOV_MASK)
-#define I2C_INTSTAT_MONIDLE_MASK (0x80000U)
-#define I2C_INTSTAT_MONIDLE_SHIFT (19U)
-/*! MONIDLE - Monitor Idle flag.
- */
-#define I2C_INTSTAT_MONIDLE(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_MONIDLE_SHIFT)) & I2C_INTSTAT_MONIDLE_MASK)
-#define I2C_INTSTAT_EVENTTIMEOUT_MASK (0x1000000U)
-#define I2C_INTSTAT_EVENTTIMEOUT_SHIFT (24U)
-/*! EVENTTIMEOUT - Event time-out Interrupt flag.
- */
-#define I2C_INTSTAT_EVENTTIMEOUT(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_EVENTTIMEOUT_SHIFT)) & I2C_INTSTAT_EVENTTIMEOUT_MASK)
-#define I2C_INTSTAT_SCLTIMEOUT_MASK (0x2000000U)
-#define I2C_INTSTAT_SCLTIMEOUT_SHIFT (25U)
-/*! SCLTIMEOUT - SCL time-out Interrupt flag.
- */
-#define I2C_INTSTAT_SCLTIMEOUT(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_SCLTIMEOUT_SHIFT)) & I2C_INTSTAT_SCLTIMEOUT_MASK)
-/*! @} */
-
-/*! @name MSTCTL - Master control register. */
-/*! @{ */
-#define I2C_MSTCTL_MSTCONTINUE_MASK (0x1U)
-#define I2C_MSTCTL_MSTCONTINUE_SHIFT (0U)
-/*! MSTCONTINUE - Master Continue. This bit is write-only.
- * 0b0..No effect.
- * 0b1..Continue. Informs the Master function to continue to the next operation. This must done after writing
- * transmit data, reading received data, or any other housekeeping related to the next bus operation.
- */
-#define I2C_MSTCTL_MSTCONTINUE(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTCTL_MSTCONTINUE_SHIFT)) & I2C_MSTCTL_MSTCONTINUE_MASK)
-#define I2C_MSTCTL_MSTSTART_MASK (0x2U)
-#define I2C_MSTCTL_MSTSTART_SHIFT (1U)
-/*! MSTSTART - Master Start control. This bit is write-only.
- * 0b0..No effect.
- * 0b1..Start. A Start will be generated on the I2C bus at the next allowed time.
- */
-#define I2C_MSTCTL_MSTSTART(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTCTL_MSTSTART_SHIFT)) & I2C_MSTCTL_MSTSTART_MASK)
-#define I2C_MSTCTL_MSTSTOP_MASK (0x4U)
-#define I2C_MSTCTL_MSTSTOP_SHIFT (2U)
-/*! MSTSTOP - Master Stop control. This bit is write-only.
- * 0b0..No effect.
- * 0b1..Stop. A Stop will be generated on the I2C bus at the next allowed time, preceded by a NACK to the slave
- * if the master is receiving data from the slave (Master Receiver mode).
- */
-#define I2C_MSTCTL_MSTSTOP(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTCTL_MSTSTOP_SHIFT)) & I2C_MSTCTL_MSTSTOP_MASK)
-#define I2C_MSTCTL_MSTDMA_MASK (0x8U)
-#define I2C_MSTCTL_MSTDMA_SHIFT (3U)
-/*! MSTDMA - Master DMA enable. Data operations of the I2C can be performed with DMA. Protocol type
- * operations such as Start, address, Stop, and address match must always be done with software,
- * typically via an interrupt. Address acknowledgement must also be done by software except when
- * the I2C is configured to be HSCAPABLE (and address acknowledgement is handled entirely by
- * hardware) or when Automatic Operation is enabled. When a DMA data transfer is complete, MSTDMA
- * must be cleared prior to beginning the next operation, typically a Start or Stop.This bit is
- * read/write.
- * 0b0..Disable. No DMA requests are generated for master operation.
- * 0b1..Enable. A DMA request is generated for I2C master data operations. When this I2C master is generating
- * Acknowledge bits in Master Receiver mode, the acknowledge is generated automatically.
- */
-#define I2C_MSTCTL_MSTDMA(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTCTL_MSTDMA_SHIFT)) & I2C_MSTCTL_MSTDMA_MASK)
-/*! @} */
-
-/*! @name MSTTIME - Master timing configuration. */
-/*! @{ */
-#define I2C_MSTTIME_MSTSCLLOW_MASK (0x7U)
-#define I2C_MSTTIME_MSTSCLLOW_SHIFT (0U)
-/*! MSTSCLLOW - Master SCL Low time. Specifies the minimum low time that will be asserted by this
- * master on SCL. Other devices on the bus (masters or slaves) could lengthen this time. This
- * corresponds to the parameter t LOW in the I2C bus specification. I2C bus specification parameters
- * tBUF and tSU;STA have the same values and are also controlled by MSTSCLLOW.
- * 0b000..2 clocks. Minimum SCL low time is 2 clocks of the I2C clock pre-divider.
- * 0b001..3 clocks. Minimum SCL low time is 3 clocks of the I2C clock pre-divider.
- * 0b010..4 clocks. Minimum SCL low time is 4 clocks of the I2C clock pre-divider.
- * 0b011..5 clocks. Minimum SCL low time is 5 clocks of the I2C clock pre-divider.
- * 0b100..6 clocks. Minimum SCL low time is 6 clocks of the I2C clock pre-divider.
- * 0b101..7 clocks. Minimum SCL low time is 7 clocks of the I2C clock pre-divider.
- * 0b110..8 clocks. Minimum SCL low time is 8 clocks of the I2C clock pre-divider.
- * 0b111..9 clocks. Minimum SCL low time is 9 clocks of the I2C clock pre-divider.
- */
-#define I2C_MSTTIME_MSTSCLLOW(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTTIME_MSTSCLLOW_SHIFT)) & I2C_MSTTIME_MSTSCLLOW_MASK)
-#define I2C_MSTTIME_MSTSCLHIGH_MASK (0x70U)
-#define I2C_MSTTIME_MSTSCLHIGH_SHIFT (4U)
-/*! MSTSCLHIGH - Master SCL High time. Specifies the minimum high time that will be asserted by this
- * master on SCL. Other masters in a multi-master system could shorten this time. This
- * corresponds to the parameter tHIGH in the I2C bus specification. I2C bus specification parameters
- * tSU;STO and tHD;STA have the same values and are also controlled by MSTSCLHIGH.
- * 0b000..2 clocks. Minimum SCL high time is 2 clock of the I2C clock pre-divider.
- * 0b001..3 clocks. Minimum SCL high time is 3 clocks of the I2C clock pre-divider .
- * 0b010..4 clocks. Minimum SCL high time is 4 clock of the I2C clock pre-divider.
- * 0b011..5 clocks. Minimum SCL high time is 5 clock of the I2C clock pre-divider.
- * 0b100..6 clocks. Minimum SCL high time is 6 clock of the I2C clock pre-divider.
- * 0b101..7 clocks. Minimum SCL high time is 7 clock of the I2C clock pre-divider.
- * 0b110..8 clocks. Minimum SCL high time is 8 clock of the I2C clock pre-divider.
- * 0b111..9 clocks. Minimum SCL high time is 9 clocks of the I2C clock pre-divider.
- */
-#define I2C_MSTTIME_MSTSCLHIGH(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTTIME_MSTSCLHIGH_SHIFT)) & I2C_MSTTIME_MSTSCLHIGH_MASK)
-/*! @} */
-
-/*! @name MSTDAT - Combined Master receiver and transmitter data register. */
-/*! @{ */
-#define I2C_MSTDAT_DATA_MASK (0xFFU)
-#define I2C_MSTDAT_DATA_SHIFT (0U)
-/*! DATA - Master function data register. Read: read the most recently received data for the Master
- * function. Write: transmit data using the Master function.
- */
-#define I2C_MSTDAT_DATA(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTDAT_DATA_SHIFT)) & I2C_MSTDAT_DATA_MASK)
-/*! @} */
-
-/*! @name SLVCTL - Slave control register. */
-/*! @{ */
-#define I2C_SLVCTL_SLVCONTINUE_MASK (0x1U)
-#define I2C_SLVCTL_SLVCONTINUE_SHIFT (0U)
-/*! SLVCONTINUE - Slave Continue.
- * 0b0..No effect.
- * 0b1..Continue. Informs the Slave function to continue to the next operation, by clearing the SLVPENDING flag
- * in the STAT register. This must be done after writing transmit data, reading received data, or any other
- * housekeeping related to the next bus operation. Automatic Operation has different requirements. SLVCONTINUE
- * should not be set unless SLVPENDING = 1.
- */
-#define I2C_SLVCTL_SLVCONTINUE(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVCTL_SLVCONTINUE_SHIFT)) & I2C_SLVCTL_SLVCONTINUE_MASK)
-#define I2C_SLVCTL_SLVNACK_MASK (0x2U)
-#define I2C_SLVCTL_SLVNACK_SHIFT (1U)
-/*! SLVNACK - Slave NACK.
- * 0b0..No effect.
- * 0b1..NACK. Causes the Slave function to NACK the master when the slave is receiving data from the master (Slave Receiver mode).
- */
-#define I2C_SLVCTL_SLVNACK(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVCTL_SLVNACK_SHIFT)) & I2C_SLVCTL_SLVNACK_MASK)
-#define I2C_SLVCTL_SLVDMA_MASK (0x8U)
-#define I2C_SLVCTL_SLVDMA_SHIFT (3U)
-/*! SLVDMA - Slave DMA enable.
- * 0b0..Disabled. No DMA requests are issued for Slave mode operation.
- * 0b1..Enabled. DMA requests are issued for I2C slave data transmission and reception.
- */
-#define I2C_SLVCTL_SLVDMA(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVCTL_SLVDMA_SHIFT)) & I2C_SLVCTL_SLVDMA_MASK)
-#define I2C_SLVCTL_AUTOACK_MASK (0x100U)
-#define I2C_SLVCTL_AUTOACK_SHIFT (8U)
-/*! AUTOACK - Automatic Acknowledge.When this bit is set, it will cause an I2C header which matches
- * SLVADR0 and the direction set by AUTOMATCHREAD to be ACKed immediately; this is used with DMA
- * to allow processing of the data without intervention. If this bit is clear and a header
- * matches SLVADR0, the behavior is controlled by AUTONACK in the SLVADR0 register: allowing NACK or
- * interrupt.
- * 0b0..Normal, non-automatic operation. If AUTONACK = 0, an SlvPending interrupt is generated when a matching
- * address is received. If AUTONACK = 1, received addresses are NACKed (ignored).
- * 0b1..A header with matching SLVADR0 and matching direction as set by AUTOMATCHREAD will be ACKed immediately,
- * allowing the master to move on to the data bytes. If the address matches SLVADR0, but the direction does
- * not match AUTOMATCHREAD, the behavior will depend on the AUTONACK bit in the SLVADR0 register: if AUTONACK
- * is set, then it will be Nacked; else if AUTONACK is clear, then a SlvPending interrupt is generated.
- */
-#define I2C_SLVCTL_AUTOACK(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVCTL_AUTOACK_SHIFT)) & I2C_SLVCTL_AUTOACK_MASK)
-#define I2C_SLVCTL_AUTOMATCHREAD_MASK (0x200U)
-#define I2C_SLVCTL_AUTOMATCHREAD_SHIFT (9U)
-/*! AUTOMATCHREAD - When AUTOACK is set, this bit controls whether it matches a read or write
- * request on the next header with an address matching SLVADR0. Since DMA needs to be configured to
- * match the transfer direction, the direction needs to be specified. This bit allows a direction to
- * be chosen for the next operation.
- * 0b0..The expected next operation in Automatic Mode is an I2C write.
- * 0b1..The expected next operation in Automatic Mode is an I2C read.
- */
-#define I2C_SLVCTL_AUTOMATCHREAD(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVCTL_AUTOMATCHREAD_SHIFT)) & I2C_SLVCTL_AUTOMATCHREAD_MASK)
-/*! @} */
-
-/*! @name SLVDAT - Combined Slave receiver and transmitter data register. */
-/*! @{ */
-#define I2C_SLVDAT_DATA_MASK (0xFFU)
-#define I2C_SLVDAT_DATA_SHIFT (0U)
-/*! DATA - Slave function data register. Read: read the most recently received data for the Slave
- * function. Write: transmit data using the Slave function.
- */
-#define I2C_SLVDAT_DATA(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVDAT_DATA_SHIFT)) & I2C_SLVDAT_DATA_MASK)
-/*! @} */
-
-/*! @name SLVADR - Slave address register. */
-/*! @{ */
-#define I2C_SLVADR_SADISABLE_MASK (0x1U)
-#define I2C_SLVADR_SADISABLE_SHIFT (0U)
-/*! SADISABLE - Slave Address n Disable.
- * 0b0..Enabled. Slave Address n is enabled.
- * 0b1..Ignored Slave Address n is ignored.
- */
-#define I2C_SLVADR_SADISABLE(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVADR_SADISABLE_SHIFT)) & I2C_SLVADR_SADISABLE_MASK)
-#define I2C_SLVADR_SLVADR_MASK (0xFEU)
-#define I2C_SLVADR_SLVADR_SHIFT (1U)
-/*! SLVADR - Slave Address. Seven bit slave address that is compared to received addresses if enabled.
- */
-#define I2C_SLVADR_SLVADR(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVADR_SLVADR_SHIFT)) & I2C_SLVADR_SLVADR_MASK)
-#define I2C_SLVADR_AUTONACK_MASK (0x8000U)
-#define I2C_SLVADR_AUTONACK_SHIFT (15U)
-/*! AUTONACK - Automatic NACK operation. Used in conjunction with AUTOACK and AUTOMATCHREAD, allows
- * software to ignore I2C traffic while handling previous I2C data or other operations.
- * 0b0..Normal operation, matching I2C addresses are not ignored.
- * 0b1..Automatic-only mode. All incoming addresses are ignored (NACKed), unless AUTOACK is set, it matches
- * SLVADRn, and AUTOMATCHREAD matches the direction.
- */
-#define I2C_SLVADR_AUTONACK(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVADR_AUTONACK_SHIFT)) & I2C_SLVADR_AUTONACK_MASK)
-/*! @} */
-
-/* The count of I2C_SLVADR */
-#define I2C_SLVADR_COUNT (4U)
-
-/*! @name SLVQUAL0 - Slave Qualification for address 0. */
-/*! @{ */
-#define I2C_SLVQUAL0_QUALMODE0_MASK (0x1U)
-#define I2C_SLVQUAL0_QUALMODE0_SHIFT (0U)
-/*! QUALMODE0 - Qualify mode for slave address 0.
- * 0b0..Mask. The SLVQUAL0 field is used as a logical mask for matching address 0.
- * 0b1..Extend. The SLVQUAL0 field is used to extend address 0 matching in a range of addresses.
- */
-#define I2C_SLVQUAL0_QUALMODE0(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVQUAL0_QUALMODE0_SHIFT)) & I2C_SLVQUAL0_QUALMODE0_MASK)
-#define I2C_SLVQUAL0_SLVQUAL0_MASK (0xFEU)
-#define I2C_SLVQUAL0_SLVQUAL0_SHIFT (1U)
-/*! SLVQUAL0 - Slave address Qualifier for address 0. A value of 0 causes the address in SLVADR0 to
- * be used as-is, assuming that it is enabled. If QUALMODE0 = 0, any bit in this field which is
- * set to 1 will cause an automatic match of the corresponding bit of the received address when it
- * is compared to the SLVADR0 register. If QUALMODE0 = 1, an address range is matched for
- * address 0. This range extends from the value defined by SLVADR0 to the address defined by SLVQUAL0
- * (address matches when SLVADR0[7:1] <= received address <= SLVQUAL0[7:1]).
- */
-#define I2C_SLVQUAL0_SLVQUAL0(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVQUAL0_SLVQUAL0_SHIFT)) & I2C_SLVQUAL0_SLVQUAL0_MASK)
-/*! @} */
-
-/*! @name MONRXDAT - Monitor receiver data register. */
-/*! @{ */
-#define I2C_MONRXDAT_MONRXDAT_MASK (0xFFU)
-#define I2C_MONRXDAT_MONRXDAT_SHIFT (0U)
-/*! MONRXDAT - Monitor function Receiver Data. This reflects every data byte that passes on the I2C pins.
- */
-#define I2C_MONRXDAT_MONRXDAT(x) (((uint32_t)(((uint32_t)(x)) << I2C_MONRXDAT_MONRXDAT_SHIFT)) & I2C_MONRXDAT_MONRXDAT_MASK)
-#define I2C_MONRXDAT_MONSTART_MASK (0x100U)
-#define I2C_MONRXDAT_MONSTART_SHIFT (8U)
-/*! MONSTART - Monitor Received Start.
- * 0b0..No start detected. The Monitor function has not detected a Start event on the I2C bus.
- * 0b1..Start detected. The Monitor function has detected a Start event on the I2C bus.
- */
-#define I2C_MONRXDAT_MONSTART(x) (((uint32_t)(((uint32_t)(x)) << I2C_MONRXDAT_MONSTART_SHIFT)) & I2C_MONRXDAT_MONSTART_MASK)
-#define I2C_MONRXDAT_MONRESTART_MASK (0x200U)
-#define I2C_MONRXDAT_MONRESTART_SHIFT (9U)
-/*! MONRESTART - Monitor Received Repeated Start.
- * 0b0..No repeated start detected. The Monitor function has not detected a Repeated Start event on the I2C bus.
- * 0b1..Repeated start detected. The Monitor function has detected a Repeated Start event on the I2C bus.
- */
-#define I2C_MONRXDAT_MONRESTART(x) (((uint32_t)(((uint32_t)(x)) << I2C_MONRXDAT_MONRESTART_SHIFT)) & I2C_MONRXDAT_MONRESTART_MASK)
-#define I2C_MONRXDAT_MONNACK_MASK (0x400U)
-#define I2C_MONRXDAT_MONNACK_SHIFT (10U)
-/*! MONNACK - Monitor Received NACK.
- * 0b0..Acknowledged. The data currently being provided by the Monitor function was acknowledged by at least one master or slave receiver.
- * 0b1..Not acknowledged. The data currently being provided by the Monitor function was not acknowledged by any receiver.
- */
-#define I2C_MONRXDAT_MONNACK(x) (((uint32_t)(((uint32_t)(x)) << I2C_MONRXDAT_MONNACK_SHIFT)) & I2C_MONRXDAT_MONNACK_MASK)
-/*! @} */
-
-/*! @name ID - Peripheral identification register. */
-/*! @{ */
-#define I2C_ID_APERTURE_MASK (0xFFU)
-#define I2C_ID_APERTURE_SHIFT (0U)
-/*! APERTURE - Aperture: encoded as (aperture size/4K) -1, so 0x00 means a 4K aperture.
- */
-#define I2C_ID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << I2C_ID_APERTURE_SHIFT)) & I2C_ID_APERTURE_MASK)
-#define I2C_ID_MINOR_REV_MASK (0xF00U)
-#define I2C_ID_MINOR_REV_SHIFT (8U)
-/*! MINOR_REV - Minor revision of module implementation.
- */
-#define I2C_ID_MINOR_REV(x) (((uint32_t)(((uint32_t)(x)) << I2C_ID_MINOR_REV_SHIFT)) & I2C_ID_MINOR_REV_MASK)
-#define I2C_ID_MAJOR_REV_MASK (0xF000U)
-#define I2C_ID_MAJOR_REV_SHIFT (12U)
-/*! MAJOR_REV - Major revision of module implementation.
- */
-#define I2C_ID_MAJOR_REV(x) (((uint32_t)(((uint32_t)(x)) << I2C_ID_MAJOR_REV_SHIFT)) & I2C_ID_MAJOR_REV_MASK)
-#define I2C_ID_ID_MASK (0xFFFF0000U)
-#define I2C_ID_ID_SHIFT (16U)
-/*! ID - Module identifier for the selected function.
- */
-#define I2C_ID_ID(x) (((uint32_t)(((uint32_t)(x)) << I2C_ID_ID_SHIFT)) & I2C_ID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group I2C_Register_Masks */
-
-
-/* I2C - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral I2C0 base address */
- #define I2C0_BASE (0x50086000u)
- /** Peripheral I2C0 base address */
- #define I2C0_BASE_NS (0x40086000u)
- /** Peripheral I2C0 base pointer */
- #define I2C0 ((I2C_Type *)I2C0_BASE)
- /** Peripheral I2C0 base pointer */
- #define I2C0_NS ((I2C_Type *)I2C0_BASE_NS)
- /** Peripheral I2C1 base address */
- #define I2C1_BASE (0x50087000u)
- /** Peripheral I2C1 base address */
- #define I2C1_BASE_NS (0x40087000u)
- /** Peripheral I2C1 base pointer */
- #define I2C1 ((I2C_Type *)I2C1_BASE)
- /** Peripheral I2C1 base pointer */
- #define I2C1_NS ((I2C_Type *)I2C1_BASE_NS)
- /** Peripheral I2C2 base address */
- #define I2C2_BASE (0x50088000u)
- /** Peripheral I2C2 base address */
- #define I2C2_BASE_NS (0x40088000u)
- /** Peripheral I2C2 base pointer */
- #define I2C2 ((I2C_Type *)I2C2_BASE)
- /** Peripheral I2C2 base pointer */
- #define I2C2_NS ((I2C_Type *)I2C2_BASE_NS)
- /** Peripheral I2C3 base address */
- #define I2C3_BASE (0x50089000u)
- /** Peripheral I2C3 base address */
- #define I2C3_BASE_NS (0x40089000u)
- /** Peripheral I2C3 base pointer */
- #define I2C3 ((I2C_Type *)I2C3_BASE)
- /** Peripheral I2C3 base pointer */
- #define I2C3_NS ((I2C_Type *)I2C3_BASE_NS)
- /** Peripheral I2C4 base address */
- #define I2C4_BASE (0x5008A000u)
- /** Peripheral I2C4 base address */
- #define I2C4_BASE_NS (0x4008A000u)
- /** Peripheral I2C4 base pointer */
- #define I2C4 ((I2C_Type *)I2C4_BASE)
- /** Peripheral I2C4 base pointer */
- #define I2C4_NS ((I2C_Type *)I2C4_BASE_NS)
- /** Peripheral I2C5 base address */
- #define I2C5_BASE (0x50096000u)
- /** Peripheral I2C5 base address */
- #define I2C5_BASE_NS (0x40096000u)
- /** Peripheral I2C5 base pointer */
- #define I2C5 ((I2C_Type *)I2C5_BASE)
- /** Peripheral I2C5 base pointer */
- #define I2C5_NS ((I2C_Type *)I2C5_BASE_NS)
- /** Peripheral I2C6 base address */
- #define I2C6_BASE (0x50097000u)
- /** Peripheral I2C6 base address */
- #define I2C6_BASE_NS (0x40097000u)
- /** Peripheral I2C6 base pointer */
- #define I2C6 ((I2C_Type *)I2C6_BASE)
- /** Peripheral I2C6 base pointer */
- #define I2C6_NS ((I2C_Type *)I2C6_BASE_NS)
- /** Peripheral I2C7 base address */
- #define I2C7_BASE (0x50098000u)
- /** Peripheral I2C7 base address */
- #define I2C7_BASE_NS (0x40098000u)
- /** Peripheral I2C7 base pointer */
- #define I2C7 ((I2C_Type *)I2C7_BASE)
- /** Peripheral I2C7 base pointer */
- #define I2C7_NS ((I2C_Type *)I2C7_BASE_NS)
- /** Array initializer of I2C peripheral base addresses */
- #define I2C_BASE_ADDRS { I2C0_BASE, I2C1_BASE, I2C2_BASE, I2C3_BASE, I2C4_BASE, I2C5_BASE, I2C6_BASE, I2C7_BASE }
- /** Array initializer of I2C peripheral base pointers */
- #define I2C_BASE_PTRS { I2C0, I2C1, I2C2, I2C3, I2C4, I2C5, I2C6, I2C7 }
- /** Array initializer of I2C peripheral base addresses */
- #define I2C_BASE_ADDRS_NS { I2C0_BASE_NS, I2C1_BASE_NS, I2C2_BASE_NS, I2C3_BASE_NS, I2C4_BASE_NS, I2C5_BASE_NS, I2C6_BASE_NS, I2C7_BASE_NS }
- /** Array initializer of I2C peripheral base pointers */
- #define I2C_BASE_PTRS_NS { I2C0_NS, I2C1_NS, I2C2_NS, I2C3_NS, I2C4_NS, I2C5_NS, I2C6_NS, I2C7_NS }
-#else
- /** Peripheral I2C0 base address */
- #define I2C0_BASE (0x40086000u)
- /** Peripheral I2C0 base pointer */
- #define I2C0 ((I2C_Type *)I2C0_BASE)
- /** Peripheral I2C1 base address */
- #define I2C1_BASE (0x40087000u)
- /** Peripheral I2C1 base pointer */
- #define I2C1 ((I2C_Type *)I2C1_BASE)
- /** Peripheral I2C2 base address */
- #define I2C2_BASE (0x40088000u)
- /** Peripheral I2C2 base pointer */
- #define I2C2 ((I2C_Type *)I2C2_BASE)
- /** Peripheral I2C3 base address */
- #define I2C3_BASE (0x40089000u)
- /** Peripheral I2C3 base pointer */
- #define I2C3 ((I2C_Type *)I2C3_BASE)
- /** Peripheral I2C4 base address */
- #define I2C4_BASE (0x4008A000u)
- /** Peripheral I2C4 base pointer */
- #define I2C4 ((I2C_Type *)I2C4_BASE)
- /** Peripheral I2C5 base address */
- #define I2C5_BASE (0x40096000u)
- /** Peripheral I2C5 base pointer */
- #define I2C5 ((I2C_Type *)I2C5_BASE)
- /** Peripheral I2C6 base address */
- #define I2C6_BASE (0x40097000u)
- /** Peripheral I2C6 base pointer */
- #define I2C6 ((I2C_Type *)I2C6_BASE)
- /** Peripheral I2C7 base address */
- #define I2C7_BASE (0x40098000u)
- /** Peripheral I2C7 base pointer */
- #define I2C7 ((I2C_Type *)I2C7_BASE)
- /** Array initializer of I2C peripheral base addresses */
- #define I2C_BASE_ADDRS { I2C0_BASE, I2C1_BASE, I2C2_BASE, I2C3_BASE, I2C4_BASE, I2C5_BASE, I2C6_BASE, I2C7_BASE }
- /** Array initializer of I2C peripheral base pointers */
- #define I2C_BASE_PTRS { I2C0, I2C1, I2C2, I2C3, I2C4, I2C5, I2C6, I2C7 }
-#endif
-/** Interrupt vectors for the I2C peripheral type */
-#define I2C_IRQS { FLEXCOMM0_IRQn, FLEXCOMM1_IRQn, FLEXCOMM2_IRQn, FLEXCOMM3_IRQn, FLEXCOMM4_IRQn, FLEXCOMM5_IRQn, FLEXCOMM6_IRQn, FLEXCOMM7_IRQn }
-
-/*!
- * @}
- */ /* end of group I2C_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- I2S Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup I2S_Peripheral_Access_Layer I2S Peripheral Access Layer
- * @{
- */
-
-/** I2S - Register Layout Typedef */
-typedef struct {
- uint8_t RESERVED_0[3072];
- __IO uint32_t CFG1; /**< Configuration register 1 for the primary channel pair., offset: 0xC00 */
- __IO uint32_t CFG2; /**< Configuration register 2 for the primary channel pair., offset: 0xC04 */
- __IO uint32_t STAT; /**< Status register for the primary channel pair., offset: 0xC08 */
- uint8_t RESERVED_1[16];
- __IO uint32_t DIV; /**< Clock divider, used by all channel pairs., offset: 0xC1C */
- uint8_t RESERVED_2[480];
- __IO uint32_t FIFOCFG; /**< FIFO configuration and enable register., offset: 0xE00 */
- __IO uint32_t FIFOSTAT; /**< FIFO status register., offset: 0xE04 */
- __IO uint32_t FIFOTRIG; /**< FIFO trigger settings for interrupt and DMA request., offset: 0xE08 */
- uint8_t RESERVED_3[4];
- __IO uint32_t FIFOINTENSET; /**< FIFO interrupt enable set (enable) and read register., offset: 0xE10 */
- __IO uint32_t FIFOINTENCLR; /**< FIFO interrupt enable clear (disable) and read register., offset: 0xE14 */
- __I uint32_t FIFOINTSTAT; /**< FIFO interrupt status register., offset: 0xE18 */
- uint8_t RESERVED_4[4];
- __O uint32_t FIFOWR; /**< FIFO write data., offset: 0xE20 */
- __O uint32_t FIFOWR48H; /**< FIFO write data for upper data bits. May only be used if the I2S is configured for 2x 24-bit data and not using DMA., offset: 0xE24 */
- uint8_t RESERVED_5[8];
- __I uint32_t FIFORD; /**< FIFO read data., offset: 0xE30 */
- __I uint32_t FIFORD48H; /**< FIFO read data for upper data bits. May only be used if the I2S is configured for 2x 24-bit data and not using DMA., offset: 0xE34 */
- uint8_t RESERVED_6[8];
- __I uint32_t FIFORDNOPOP; /**< FIFO data read with no FIFO pop., offset: 0xE40 */
- __I uint32_t FIFORD48HNOPOP; /**< FIFO data read for upper data bits with no FIFO pop. May only be used if the I2S is configured for 2x 24-bit data and not using DMA., offset: 0xE44 */
- uint8_t RESERVED_7[436];
- __I uint32_t ID; /**< I2S Module identification, offset: 0xFFC */
-} I2S_Type;
-
-/* ----------------------------------------------------------------------------
- -- I2S Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup I2S_Register_Masks I2S Register Masks
- * @{
- */
-
-/*! @name CFG1 - Configuration register 1 for the primary channel pair. */
-/*! @{ */
-#define I2S_CFG1_MAINENABLE_MASK (0x1U)
-#define I2S_CFG1_MAINENABLE_SHIFT (0U)
-/*! MAINENABLE - Main enable for I 2S function in this Flexcomm
- * 0b0..All I 2S channel pairs in this Flexcomm are disabled and the internal state machines, counters, and flags
- * are reset. No other channel pairs can be enabled.
- * 0b1..This I 2S channel pair is enabled. Other channel pairs in this Flexcomm may be enabled in their individual PAIRENABLE bits.
- */
-#define I2S_CFG1_MAINENABLE(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_MAINENABLE_SHIFT)) & I2S_CFG1_MAINENABLE_MASK)
-#define I2S_CFG1_DATAPAUSE_MASK (0x2U)
-#define I2S_CFG1_DATAPAUSE_SHIFT (1U)
-/*! DATAPAUSE - Data flow Pause. Allows pausing data flow between the I2S serializer/deserializer
- * and the FIFO. This could be done in order to change streams, or while restarting after a data
- * underflow or overflow. When paused, FIFO operations can be done without corrupting data that is
- * in the process of being sent or received. Once a data pause has been requested, the interface
- * may need to complete sending data that was in progress before interrupting the flow of data.
- * Software must check that the pause is actually in effect before taking action. This is done by
- * monitoring the DATAPAUSED flag in the STAT register. When DATAPAUSE is cleared, data transfer
- * will resume at the beginning of the next frame.
- * 0b0..Normal operation, or resuming normal operation at the next frame if the I2S has already been paused.
- * 0b1..A pause in the data flow is being requested. It is in effect when DATAPAUSED in STAT = 1.
- */
-#define I2S_CFG1_DATAPAUSE(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_DATAPAUSE_SHIFT)) & I2S_CFG1_DATAPAUSE_MASK)
-#define I2S_CFG1_PAIRCOUNT_MASK (0xCU)
-#define I2S_CFG1_PAIRCOUNT_SHIFT (2U)
-/*! PAIRCOUNT - Provides the number of I2S channel pairs in this Flexcomm This is a read-only field
- * whose value may be different in other Flexcomms. 00 = there is 1 I2S channel pair in this
- * Flexcomm. 01 = there are 2 I2S channel pairs in this Flexcomm. 10 = there are 3 I2S channel pairs
- * in this Flexcomm. 11 = there are 4 I2S channel pairs in this Flexcomm.
- * 0b00..1 I2S channel pairs in this flexcomm
- * 0b01..2 I2S channel pairs in this flexcomm
- * 0b10..3 I2S channel pairs in this flexcomm
- * 0b11..4 I2S channel pairs in this flexcomm
- */
-#define I2S_CFG1_PAIRCOUNT(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_PAIRCOUNT_SHIFT)) & I2S_CFG1_PAIRCOUNT_MASK)
-#define I2S_CFG1_MSTSLVCFG_MASK (0x30U)
-#define I2S_CFG1_MSTSLVCFG_SHIFT (4U)
-/*! MSTSLVCFG - Master / slave configuration selection, determining how SCK and WS are used by all channel pairs in this Flexcomm.
- * 0b00..Normal slave mode, the default mode. SCK and WS are received from a master and used to transmit or receive data.
- * 0b01..WS synchronized master. WS is received from another master and used to synchronize the generation of
- * SCK, when divided from the Flexcomm function clock.
- * 0b10..Master using an existing SCK. SCK is received and used directly to generate WS, as well as transmitting or receiving data.
- * 0b11..Normal master mode. SCK and WS are generated so they can be sent to one or more slave devices.
- */
-#define I2S_CFG1_MSTSLVCFG(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_MSTSLVCFG_SHIFT)) & I2S_CFG1_MSTSLVCFG_MASK)
-#define I2S_CFG1_MODE_MASK (0xC0U)
-#define I2S_CFG1_MODE_SHIFT (6U)
-/*! MODE - Selects the basic I2S operating mode. Other configurations modify this to obtain all
- * supported cases. See Formats and modes for examples.
- * 0b00..I2S mode a.k.a. 'classic' mode. WS has a 50% duty cycle, with (for each enabled channel pair) one piece
- * of left channel data occurring during the first phase, and one pieces of right channel data occurring
- * during the second phase. In this mode, the data region begins one clock after the leading WS edge for the
- * frame. For a 50% WS duty cycle, FRAMELEN must define an even number of I2S clocks for the frame. If
- * FRAMELEN defines an odd number of clocks per frame, the extra clock will occur on the right.
- * 0b01..DSP mode where WS has a 50% duty cycle. See remark for mode 0.
- * 0b10..DSP mode where WS has a one clock long pulse at the beginning of each data frame.
- * 0b11..DSP mode where WS has a one data slot long pulse at the beginning of each data frame.
- */
-#define I2S_CFG1_MODE(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_MODE_SHIFT)) & I2S_CFG1_MODE_MASK)
-#define I2S_CFG1_RIGHTLOW_MASK (0x100U)
-#define I2S_CFG1_RIGHTLOW_SHIFT (8U)
-/*! RIGHTLOW - Right channel data is in the Low portion of FIFO data. Essentially, this swaps left
- * and right channel data as it is transferred to or from the FIFO. This bit is not used if the
- * data width is greater than 24 bits or if PDMDATA = 1. Note that if the ONECHANNEL field (bit 10
- * of this register) = 1, the one channel to be used is the nominally the left channel. POSITION
- * can still place that data in the frame where right channel data is normally located. if all
- * enabled channel pairs have ONECHANNEL = 1, then RIGHTLOW = 1 is not allowed.
- * 0b0..The right channel is taken from the high part of the FIFO data. For example, when data is 16 bits, FIFO
- * bits 31:16 are used for the right channel.
- * 0b1..The right channel is taken from the low part of the FIFO data. For example, when data is 16 bits, FIFO
- * bits 15:0 are used for the right channel.
- */
-#define I2S_CFG1_RIGHTLOW(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_RIGHTLOW_SHIFT)) & I2S_CFG1_RIGHTLOW_MASK)
-#define I2S_CFG1_LEFTJUST_MASK (0x200U)
-#define I2S_CFG1_LEFTJUST_SHIFT (9U)
-/*! LEFTJUST - Left Justify data.
- * 0b0..Data is transferred between the FIFO and the I2S serializer/deserializer right justified, i.e. starting
- * from bit 0 and continuing to the position defined by DATALEN. This would correspond to right justified data
- * in the stream on the data bus.
- * 0b1..Data is transferred between the FIFO and the I2S serializer/deserializer left justified, i.e. starting
- * from the MSB of the FIFO entry and continuing for the number of bits defined by DATALEN. This would
- * correspond to left justified data in the stream on the data bus.
- */
-#define I2S_CFG1_LEFTJUST(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_LEFTJUST_SHIFT)) & I2S_CFG1_LEFTJUST_MASK)
-#define I2S_CFG1_ONECHANNEL_MASK (0x400U)
-#define I2S_CFG1_ONECHANNEL_SHIFT (10U)
-/*! ONECHANNEL - Single channel mode. Applies to both transmit and receive. This configuration bit
- * applies only to the first I2S channel pair. Other channel pairs may select this mode
- * independently in their separate CFG1 registers.
- * 0b0..I2S data for this channel pair is treated as left and right channels.
- * 0b1..I2S data for this channel pair is treated as a single channel, functionally the left channel for this
- * pair. In mode 0 only, the right side of the frame begins at POSITION = 0x100. This is because mode 0 makes a
- * clear distinction between the left and right sides of the frame. When ONECHANNEL = 1, the single channel
- * of data may be placed on the right by setting POSITION to 0x100 + the data position within the right side
- * (e.g. 0x108 would place data starting at the 8th clock after the middle of the frame). In other modes, data
- * for the single channel of data is placed at the clock defined by POSITION.
- */
-#define I2S_CFG1_ONECHANNEL(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_ONECHANNEL_SHIFT)) & I2S_CFG1_ONECHANNEL_MASK)
-#define I2S_CFG1_SCK_POL_MASK (0x1000U)
-#define I2S_CFG1_SCK_POL_SHIFT (12U)
-/*! SCK_POL - SCK polarity.
- * 0b0..Data is launched on SCK falling edges and sampled on SCK rising edges (standard for I2S).
- * 0b1..Data is launched on SCK rising edges and sampled on SCK falling edges.
- */
-#define I2S_CFG1_SCK_POL(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_SCK_POL_SHIFT)) & I2S_CFG1_SCK_POL_MASK)
-#define I2S_CFG1_WS_POL_MASK (0x2000U)
-#define I2S_CFG1_WS_POL_SHIFT (13U)
-/*! WS_POL - WS polarity.
- * 0b0..Data frames begin at a falling edge of WS (standard for classic I2S).
- * 0b1..WS is inverted, resulting in a data frame beginning at a rising edge of WS (standard for most 'non-classic' variations of I2S).
- */
-#define I2S_CFG1_WS_POL(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_WS_POL_SHIFT)) & I2S_CFG1_WS_POL_MASK)
-#define I2S_CFG1_DATALEN_MASK (0x1F0000U)
-#define I2S_CFG1_DATALEN_SHIFT (16U)
-/*! DATALEN - Data Length, minus 1 encoded, defines the number of data bits to be transmitted or
- * received for all I2S channel pairs in this Flexcomm. Note that data is only driven to or received
- * from SDA for the number of bits defined by DATALEN. DATALEN is also used in these ways by the
- * I2S: Determines the size of data transfers between the FIFO and the I2S
- * serializer/deserializer. See FIFO buffer configurations and usage In mode 1, 2, and 3, determines the location of
- * right data following left data in the frame. In mode 3 (where WS has a one data slot long pulse
- * at the beginning of each data frame) determines the duration of the WS pulse. Values: 0x00 to
- * 0x02 = not supported 0x03 = data is 4 bits in length 0x04 = data is 5 bits in length 0x1F =
- * data is 32 bits in length
- */
-#define I2S_CFG1_DATALEN(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_DATALEN_SHIFT)) & I2S_CFG1_DATALEN_MASK)
-/*! @} */
-
-/*! @name CFG2 - Configuration register 2 for the primary channel pair. */
-/*! @{ */
-#define I2S_CFG2_FRAMELEN_MASK (0x1FFU)
-#define I2S_CFG2_FRAMELEN_SHIFT (0U)
-/*! FRAMELEN - Frame Length, minus 1 encoded, defines the number of clocks and data bits in the
- * frames that this channel pair participates in. See Frame format. 0x000 to 0x002 = not supported
- * 0x003 = frame is 4 bits in total length 0x004 = frame is 5 bits in total length 0x1FF = frame is
- * 512 bits in total length if FRAMELEN is an defines an odd length frame (e.g. 33 clocks) in
- * mode 0 or 1, the extra clock appears in the right half. When MODE = 3, FRAMELEN must be larger
- * than DATALEN in order for the WS pulse to be generated correctly.
- */
-#define I2S_CFG2_FRAMELEN(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG2_FRAMELEN_SHIFT)) & I2S_CFG2_FRAMELEN_MASK)
-#define I2S_CFG2_POSITION_MASK (0x1FF0000U)
-#define I2S_CFG2_POSITION_SHIFT (16U)
-/*! POSITION - Data Position. Defines the location within the frame of the data for this channel
- * pair. POSITION + DATALEN must be less than FRAMELEN. See Frame format. When MODE = 0, POSITION
- * defines the location of data in both the left phase and right phase, starting one clock after
- * the WS edge. In other modes, POSITION defines the location of data within the entire frame.
- * ONECHANNEL = 1 while MODE = 0 is a special case, see the description of ONECHANNEL. The
- * combination of DATALEN and the POSITION fields of all channel pairs must be made such that the channels
- * do not overlap within the frame. 0x000 = data begins at bit position 0 (the first bit
- * position) within the frame or WS phase. 0x001 = data begins at bit position 1 within the frame or WS
- * phase. 0x002 = data begins at bit position 2 within the frame or WS phase.
- */
-#define I2S_CFG2_POSITION(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG2_POSITION_SHIFT)) & I2S_CFG2_POSITION_MASK)
-/*! @} */
-
-/*! @name STAT - Status register for the primary channel pair. */
-/*! @{ */
-#define I2S_STAT_BUSY_MASK (0x1U)
-#define I2S_STAT_BUSY_SHIFT (0U)
-/*! BUSY - Busy status for the primary channel pair. Other BUSY flags may be found in the STAT register for each channel pair.
- * 0b0..The transmitter/receiver for channel pair is currently idle.
- * 0b1..The transmitter/receiver for channel pair is currently processing data.
- */
-#define I2S_STAT_BUSY(x) (((uint32_t)(((uint32_t)(x)) << I2S_STAT_BUSY_SHIFT)) & I2S_STAT_BUSY_MASK)
-#define I2S_STAT_SLVFRMERR_MASK (0x2U)
-#define I2S_STAT_SLVFRMERR_SHIFT (1U)
-/*! SLVFRMERR - Slave Frame Error flag. This applies when at least one channel pair is operating as
- * a slave. An error indicates that the incoming WS signal did not transition as expected due to
- * a mismatch between FRAMELEN and the actual incoming I2S stream.
- * 0b0..No error has been recorded.
- * 0b1..An error has been recorded for some channel pair that is operating in slave mode. ERROR is cleared by writing a 1 to this bit position.
- */
-#define I2S_STAT_SLVFRMERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_STAT_SLVFRMERR_SHIFT)) & I2S_STAT_SLVFRMERR_MASK)
-#define I2S_STAT_LR_MASK (0x4U)
-#define I2S_STAT_LR_SHIFT (2U)
-/*! LR - Left/Right indication. This flag is considered to be a debugging aid and is not expected to
- * be used by an I2S driver. Valid when one channel pair is busy. Indicates left or right data
- * being processed for the currently busy channel pair.
- * 0b0..Left channel.
- * 0b1..Right channel.
- */
-#define I2S_STAT_LR(x) (((uint32_t)(((uint32_t)(x)) << I2S_STAT_LR_SHIFT)) & I2S_STAT_LR_MASK)
-#define I2S_STAT_DATAPAUSED_MASK (0x8U)
-#define I2S_STAT_DATAPAUSED_SHIFT (3U)
-/*! DATAPAUSED - Data Paused status flag. Applies to all I2S channels
- * 0b0..Data is not currently paused. A data pause may have been requested but is not yet in force, waiting for
- * an allowed pause point. Refer to the description of the DATAPAUSE control bit in the CFG1 register.
- * 0b1..A data pause has been requested and is now in force.
- */
-#define I2S_STAT_DATAPAUSED(x) (((uint32_t)(((uint32_t)(x)) << I2S_STAT_DATAPAUSED_SHIFT)) & I2S_STAT_DATAPAUSED_MASK)
-/*! @} */
-
-/*! @name DIV - Clock divider, used by all channel pairs. */
-/*! @{ */
-#define I2S_DIV_DIV_MASK (0xFFFU)
-#define I2S_DIV_DIV_SHIFT (0U)
-/*! DIV - This field controls how this I2S block uses the Flexcomm function clock. 0x000 = The
- * Flexcomm function clock is used directly. 0x001 = The Flexcomm function clock is divided by 2.
- * 0x002 = The Flexcomm function clock is divided by 3. 0xFFF = The Flexcomm function clock is
- * divided by 4,096.
- */
-#define I2S_DIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << I2S_DIV_DIV_SHIFT)) & I2S_DIV_DIV_MASK)
-/*! @} */
-
-/*! @name FIFOCFG - FIFO configuration and enable register. */
-/*! @{ */
-#define I2S_FIFOCFG_ENABLETX_MASK (0x1U)
-#define I2S_FIFOCFG_ENABLETX_SHIFT (0U)
-/*! ENABLETX - Enable the transmit FIFO.
- * 0b0..The transmit FIFO is not enabled.
- * 0b1..The transmit FIFO is enabled.
- */
-#define I2S_FIFOCFG_ENABLETX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_ENABLETX_SHIFT)) & I2S_FIFOCFG_ENABLETX_MASK)
-#define I2S_FIFOCFG_ENABLERX_MASK (0x2U)
-#define I2S_FIFOCFG_ENABLERX_SHIFT (1U)
-/*! ENABLERX - Enable the receive FIFO.
- * 0b0..The receive FIFO is not enabled.
- * 0b1..The receive FIFO is enabled.
- */
-#define I2S_FIFOCFG_ENABLERX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_ENABLERX_SHIFT)) & I2S_FIFOCFG_ENABLERX_MASK)
-#define I2S_FIFOCFG_TXI2SE0_MASK (0x4U)
-#define I2S_FIFOCFG_TXI2SE0_SHIFT (2U)
-/*! TXI2SE0 - Transmit I2S empty 0. Determines the value sent by the I2S in transmit mode if the TX
- * FIFO becomes empty. This value is sent repeatedly until the I2S is paused, the error is
- * cleared, new data is provided, and the I2S is un-paused.
- * 0b0..If the TX FIFO becomes empty, the last value is sent. This setting may be used when the data length is 24
- * bits or less, or when MONO = 1 for this channel pair.
- * 0b1..If the TX FIFO becomes empty, 0 is sent. Use if the data length is greater than 24 bits or if zero fill is preferred.
- */
-#define I2S_FIFOCFG_TXI2SE0(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_TXI2SE0_SHIFT)) & I2S_FIFOCFG_TXI2SE0_MASK)
-#define I2S_FIFOCFG_PACK48_MASK (0x8U)
-#define I2S_FIFOCFG_PACK48_SHIFT (3U)
-/*! PACK48 - Packing format for 48-bit data. This relates to how data is entered into or taken from the FIFO by software or DMA.
- * 0b0..48-bit I2S FIFO entries are handled as all 24-bit values.
- * 0b1..48-bit I2S FIFO entries are handled as alternating 32-bit and 16-bit values.
- */
-#define I2S_FIFOCFG_PACK48(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_PACK48_SHIFT)) & I2S_FIFOCFG_PACK48_MASK)
-#define I2S_FIFOCFG_SIZE_MASK (0x30U)
-#define I2S_FIFOCFG_SIZE_SHIFT (4U)
-/*! SIZE - FIFO size configuration. This is a read-only field. 0x0 = FIFO is configured as 16
- * entries of 8 bits. 0x1, 0x2, 0x3 = not applicable to USART.
- */
-#define I2S_FIFOCFG_SIZE(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_SIZE_SHIFT)) & I2S_FIFOCFG_SIZE_MASK)
-#define I2S_FIFOCFG_DMATX_MASK (0x1000U)
-#define I2S_FIFOCFG_DMATX_SHIFT (12U)
-/*! DMATX - DMA configuration for transmit.
- * 0b0..DMA is not used for the transmit function.
- * 0b1..Trigger DMA for the transmit function if the FIFO is not full. Generally, data interrupts would be disabled if DMA is enabled.
- */
-#define I2S_FIFOCFG_DMATX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_DMATX_SHIFT)) & I2S_FIFOCFG_DMATX_MASK)
-#define I2S_FIFOCFG_DMARX_MASK (0x2000U)
-#define I2S_FIFOCFG_DMARX_SHIFT (13U)
-/*! DMARX - DMA configuration for receive.
- * 0b0..DMA is not used for the receive function.
- * 0b1..Trigger DMA for the receive function if the FIFO is not empty. Generally, data interrupts would be disabled if DMA is enabled.
- */
-#define I2S_FIFOCFG_DMARX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_DMARX_SHIFT)) & I2S_FIFOCFG_DMARX_MASK)
-#define I2S_FIFOCFG_WAKETX_MASK (0x4000U)
-#define I2S_FIFOCFG_WAKETX_SHIFT (14U)
-/*! WAKETX - Wake-up for transmit FIFO level. This allows the device to be woken from reduced power
- * modes (up to power-down, as long as the peripheral function works in that power mode) without
- * enabling the TXLVL interrupt. Only DMA wakes up, processes data, and goes back to sleep. The
- * CPU will remain stopped until woken by another cause, such as DMA completion. See Hardware
- * Wake-up control register.
- * 0b0..Only enabled interrupts will wake up the device form reduced power modes.
- * 0b1..A device wake-up for DMA will occur if the transmit FIFO level reaches the value specified by TXLVL in
- * FIFOTRIG, even when the TXLVL interrupt is not enabled.
- */
-#define I2S_FIFOCFG_WAKETX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_WAKETX_SHIFT)) & I2S_FIFOCFG_WAKETX_MASK)
-#define I2S_FIFOCFG_WAKERX_MASK (0x8000U)
-#define I2S_FIFOCFG_WAKERX_SHIFT (15U)
-/*! WAKERX - Wake-up for receive FIFO level. This allows the device to be woken from reduced power
- * modes (up to power-down, as long as the peripheral function works in that power mode) without
- * enabling the TXLVL interrupt. Only DMA wakes up, processes data, and goes back to sleep. The
- * CPU will remain stopped until woken by another cause, such as DMA completion. See Hardware
- * Wake-up control register.
- * 0b0..Only enabled interrupts will wake up the device form reduced power modes.
- * 0b1..A device wake-up for DMA will occur if the receive FIFO level reaches the value specified by RXLVL in
- * FIFOTRIG, even when the RXLVL interrupt is not enabled.
- */
-#define I2S_FIFOCFG_WAKERX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_WAKERX_SHIFT)) & I2S_FIFOCFG_WAKERX_MASK)
-#define I2S_FIFOCFG_EMPTYTX_MASK (0x10000U)
-#define I2S_FIFOCFG_EMPTYTX_SHIFT (16U)
-/*! EMPTYTX - Empty command for the transmit FIFO. When a 1 is written to this bit, the TX FIFO is emptied.
- */
-#define I2S_FIFOCFG_EMPTYTX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_EMPTYTX_SHIFT)) & I2S_FIFOCFG_EMPTYTX_MASK)
-#define I2S_FIFOCFG_EMPTYRX_MASK (0x20000U)
-#define I2S_FIFOCFG_EMPTYRX_SHIFT (17U)
-/*! EMPTYRX - Empty command for the receive FIFO. When a 1 is written to this bit, the RX FIFO is emptied.
- */
-#define I2S_FIFOCFG_EMPTYRX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_EMPTYRX_SHIFT)) & I2S_FIFOCFG_EMPTYRX_MASK)
-/*! @} */
-
-/*! @name FIFOSTAT - FIFO status register. */
-/*! @{ */
-#define I2S_FIFOSTAT_TXERR_MASK (0x1U)
-#define I2S_FIFOSTAT_TXERR_SHIFT (0U)
-/*! TXERR - TX FIFO error. Will be set if a transmit FIFO error occurs. This could be an overflow
- * caused by pushing data into a full FIFO, or by an underflow if the FIFO is empty when data is
- * needed. Cleared by writing a 1 to this bit.
- */
-#define I2S_FIFOSTAT_TXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_TXERR_SHIFT)) & I2S_FIFOSTAT_TXERR_MASK)
-#define I2S_FIFOSTAT_RXERR_MASK (0x2U)
-#define I2S_FIFOSTAT_RXERR_SHIFT (1U)
-/*! RXERR - RX FIFO error. Will be set if a receive FIFO overflow occurs, caused by software or DMA
- * not emptying the FIFO fast enough. Cleared by writing a 1 to this bit.
- */
-#define I2S_FIFOSTAT_RXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_RXERR_SHIFT)) & I2S_FIFOSTAT_RXERR_MASK)
-#define I2S_FIFOSTAT_PERINT_MASK (0x8U)
-#define I2S_FIFOSTAT_PERINT_SHIFT (3U)
-/*! PERINT - Peripheral interrupt. When 1, this indicates that the peripheral function has asserted
- * an interrupt. The details can be found by reading the peripheral's STAT register.
- */
-#define I2S_FIFOSTAT_PERINT(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_PERINT_SHIFT)) & I2S_FIFOSTAT_PERINT_MASK)
-#define I2S_FIFOSTAT_TXEMPTY_MASK (0x10U)
-#define I2S_FIFOSTAT_TXEMPTY_SHIFT (4U)
-/*! TXEMPTY - Transmit FIFO empty. When 1, the transmit FIFO is empty. The peripheral may still be processing the last piece of data.
- */
-#define I2S_FIFOSTAT_TXEMPTY(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_TXEMPTY_SHIFT)) & I2S_FIFOSTAT_TXEMPTY_MASK)
-#define I2S_FIFOSTAT_TXNOTFULL_MASK (0x20U)
-#define I2S_FIFOSTAT_TXNOTFULL_SHIFT (5U)
-/*! TXNOTFULL - Transmit FIFO not full. When 1, the transmit FIFO is not full, so more data can be
- * written. When 0, the transmit FIFO is full and another write would cause it to overflow.
- */
-#define I2S_FIFOSTAT_TXNOTFULL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_TXNOTFULL_SHIFT)) & I2S_FIFOSTAT_TXNOTFULL_MASK)
-#define I2S_FIFOSTAT_RXNOTEMPTY_MASK (0x40U)
-#define I2S_FIFOSTAT_RXNOTEMPTY_SHIFT (6U)
-/*! RXNOTEMPTY - Receive FIFO not empty. When 1, the receive FIFO is not empty, so data can be read. When 0, the receive FIFO is empty.
- */
-#define I2S_FIFOSTAT_RXNOTEMPTY(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_RXNOTEMPTY_SHIFT)) & I2S_FIFOSTAT_RXNOTEMPTY_MASK)
-#define I2S_FIFOSTAT_RXFULL_MASK (0x80U)
-#define I2S_FIFOSTAT_RXFULL_SHIFT (7U)
-/*! RXFULL - Receive FIFO full. When 1, the receive FIFO is full. Data needs to be read out to
- * prevent the peripheral from causing an overflow.
- */
-#define I2S_FIFOSTAT_RXFULL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_RXFULL_SHIFT)) & I2S_FIFOSTAT_RXFULL_MASK)
-#define I2S_FIFOSTAT_TXLVL_MASK (0x1F00U)
-#define I2S_FIFOSTAT_TXLVL_SHIFT (8U)
-/*! TXLVL - Transmit FIFO current level. A 0 means the TX FIFO is currently empty, and the TXEMPTY
- * and TXNOTFULL flags will be 1. Other values tell how much data is actually in the TX FIFO at
- * the point where the read occurs. If the TX FIFO is full, the TXEMPTY and TXNOTFULL flags will be
- * 0.
- */
-#define I2S_FIFOSTAT_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_TXLVL_SHIFT)) & I2S_FIFOSTAT_TXLVL_MASK)
-#define I2S_FIFOSTAT_RXLVL_MASK (0x1F0000U)
-#define I2S_FIFOSTAT_RXLVL_SHIFT (16U)
-/*! RXLVL - Receive FIFO current level. A 0 means the RX FIFO is currently empty, and the RXFULL and
- * RXNOTEMPTY flags will be 0. Other values tell how much data is actually in the RX FIFO at the
- * point where the read occurs. If the RX FIFO is full, the RXFULL and RXNOTEMPTY flags will be
- * 1.
- */
-#define I2S_FIFOSTAT_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_RXLVL_SHIFT)) & I2S_FIFOSTAT_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOTRIG - FIFO trigger settings for interrupt and DMA request. */
-/*! @{ */
-#define I2S_FIFOTRIG_TXLVLENA_MASK (0x1U)
-#define I2S_FIFOTRIG_TXLVLENA_SHIFT (0U)
-/*! TXLVLENA - Transmit FIFO level trigger enable. This trigger will become an interrupt if enabled
- * in FIFOINTENSET, or a DMA trigger if DMATX in FIFOCFG is set.
- * 0b0..Transmit FIFO level does not generate a FIFO level trigger.
- * 0b1..An trigger will be generated if the transmit FIFO level reaches the value specified by the TXLVL field in this register.
- */
-#define I2S_FIFOTRIG_TXLVLENA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOTRIG_TXLVLENA_SHIFT)) & I2S_FIFOTRIG_TXLVLENA_MASK)
-#define I2S_FIFOTRIG_RXLVLENA_MASK (0x2U)
-#define I2S_FIFOTRIG_RXLVLENA_SHIFT (1U)
-/*! RXLVLENA - Receive FIFO level trigger enable. This trigger will become an interrupt if enabled
- * in FIFOINTENSET, or a DMA trigger if DMARX in FIFOCFG is set.
- * 0b0..Receive FIFO level does not generate a FIFO level trigger.
- * 0b1..An trigger will be generated if the receive FIFO level reaches the value specified by the RXLVL field in this register.
- */
-#define I2S_FIFOTRIG_RXLVLENA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOTRIG_RXLVLENA_SHIFT)) & I2S_FIFOTRIG_RXLVLENA_MASK)
-#define I2S_FIFOTRIG_TXLVL_MASK (0xF00U)
-#define I2S_FIFOTRIG_TXLVL_SHIFT (8U)
-/*! TXLVL - Transmit FIFO level trigger point. This field is used only when TXLVLENA = 1. If enabled
- * to do so, the FIFO level can wake up the device just enough to perform DMA, then return to
- * the reduced power mode. See Hardware Wake-up control register. 0 = trigger when the TX FIFO
- * becomes empty. 1 = trigger when the TX FIFO level decreases to one entry. 15 = trigger when the TX
- * FIFO level decreases to 15 entries (is no longer full).
- */
-#define I2S_FIFOTRIG_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOTRIG_TXLVL_SHIFT)) & I2S_FIFOTRIG_TXLVL_MASK)
-#define I2S_FIFOTRIG_RXLVL_MASK (0xF0000U)
-#define I2S_FIFOTRIG_RXLVL_SHIFT (16U)
-/*! RXLVL - Receive FIFO level trigger point. The RX FIFO level is checked when a new piece of data
- * is received. This field is used only when RXLVLENA = 1. If enabled to do so, the FIFO level
- * can wake up the device just enough to perform DMA, then return to the reduced power mode. See
- * Hardware Wake-up control register. 0 = trigger when the RX FIFO has received one entry (is no
- * longer empty). 1 = trigger when the RX FIFO has received two entries. 15 = trigger when the RX
- * FIFO has received 16 entries (has become full).
- */
-#define I2S_FIFOTRIG_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOTRIG_RXLVL_SHIFT)) & I2S_FIFOTRIG_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTENSET - FIFO interrupt enable set (enable) and read register. */
-/*! @{ */
-#define I2S_FIFOINTENSET_TXERR_MASK (0x1U)
-#define I2S_FIFOINTENSET_TXERR_SHIFT (0U)
-/*! TXERR - Determines whether an interrupt occurs when a transmit error occurs, based on the TXERR flag in the FIFOSTAT register.
- * 0b0..No interrupt will be generated for a transmit error.
- * 0b1..An interrupt will be generated when a transmit error occurs.
- */
-#define I2S_FIFOINTENSET_TXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENSET_TXERR_SHIFT)) & I2S_FIFOINTENSET_TXERR_MASK)
-#define I2S_FIFOINTENSET_RXERR_MASK (0x2U)
-#define I2S_FIFOINTENSET_RXERR_SHIFT (1U)
-/*! RXERR - Determines whether an interrupt occurs when a receive error occurs, based on the RXERR flag in the FIFOSTAT register.
- * 0b0..No interrupt will be generated for a receive error.
- * 0b1..An interrupt will be generated when a receive error occurs.
- */
-#define I2S_FIFOINTENSET_RXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENSET_RXERR_SHIFT)) & I2S_FIFOINTENSET_RXERR_MASK)
-#define I2S_FIFOINTENSET_TXLVL_MASK (0x4U)
-#define I2S_FIFOINTENSET_TXLVL_SHIFT (2U)
-/*! TXLVL - Determines whether an interrupt occurs when a the transmit FIFO reaches the level
- * specified by the TXLVL field in the FIFOTRIG register.
- * 0b0..No interrupt will be generated based on the TX FIFO level.
- * 0b1..If TXLVLENA in the FIFOTRIG register = 1, an interrupt will be generated when the TX FIFO level decreases
- * to the level specified by TXLVL in the FIFOTRIG register.
- */
-#define I2S_FIFOINTENSET_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENSET_TXLVL_SHIFT)) & I2S_FIFOINTENSET_TXLVL_MASK)
-#define I2S_FIFOINTENSET_RXLVL_MASK (0x8U)
-#define I2S_FIFOINTENSET_RXLVL_SHIFT (3U)
-/*! RXLVL - Determines whether an interrupt occurs when a the receive FIFO reaches the level
- * specified by the TXLVL field in the FIFOTRIG register.
- * 0b0..No interrupt will be generated based on the RX FIFO level.
- * 0b1..If RXLVLENA in the FIFOTRIG register = 1, an interrupt will be generated when the when the RX FIFO level
- * increases to the level specified by RXLVL in the FIFOTRIG register.
- */
-#define I2S_FIFOINTENSET_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENSET_RXLVL_SHIFT)) & I2S_FIFOINTENSET_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTENCLR - FIFO interrupt enable clear (disable) and read register. */
-/*! @{ */
-#define I2S_FIFOINTENCLR_TXERR_MASK (0x1U)
-#define I2S_FIFOINTENCLR_TXERR_SHIFT (0U)
-/*! TXERR - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define I2S_FIFOINTENCLR_TXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENCLR_TXERR_SHIFT)) & I2S_FIFOINTENCLR_TXERR_MASK)
-#define I2S_FIFOINTENCLR_RXERR_MASK (0x2U)
-#define I2S_FIFOINTENCLR_RXERR_SHIFT (1U)
-/*! RXERR - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define I2S_FIFOINTENCLR_RXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENCLR_RXERR_SHIFT)) & I2S_FIFOINTENCLR_RXERR_MASK)
-#define I2S_FIFOINTENCLR_TXLVL_MASK (0x4U)
-#define I2S_FIFOINTENCLR_TXLVL_SHIFT (2U)
-/*! TXLVL - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define I2S_FIFOINTENCLR_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENCLR_TXLVL_SHIFT)) & I2S_FIFOINTENCLR_TXLVL_MASK)
-#define I2S_FIFOINTENCLR_RXLVL_MASK (0x8U)
-#define I2S_FIFOINTENCLR_RXLVL_SHIFT (3U)
-/*! RXLVL - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define I2S_FIFOINTENCLR_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENCLR_RXLVL_SHIFT)) & I2S_FIFOINTENCLR_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTSTAT - FIFO interrupt status register. */
-/*! @{ */
-#define I2S_FIFOINTSTAT_TXERR_MASK (0x1U)
-#define I2S_FIFOINTSTAT_TXERR_SHIFT (0U)
-/*! TXERR - TX FIFO error.
- */
-#define I2S_FIFOINTSTAT_TXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTSTAT_TXERR_SHIFT)) & I2S_FIFOINTSTAT_TXERR_MASK)
-#define I2S_FIFOINTSTAT_RXERR_MASK (0x2U)
-#define I2S_FIFOINTSTAT_RXERR_SHIFT (1U)
-/*! RXERR - RX FIFO error.
- */
-#define I2S_FIFOINTSTAT_RXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTSTAT_RXERR_SHIFT)) & I2S_FIFOINTSTAT_RXERR_MASK)
-#define I2S_FIFOINTSTAT_TXLVL_MASK (0x4U)
-#define I2S_FIFOINTSTAT_TXLVL_SHIFT (2U)
-/*! TXLVL - Transmit FIFO level interrupt.
- */
-#define I2S_FIFOINTSTAT_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTSTAT_TXLVL_SHIFT)) & I2S_FIFOINTSTAT_TXLVL_MASK)
-#define I2S_FIFOINTSTAT_RXLVL_MASK (0x8U)
-#define I2S_FIFOINTSTAT_RXLVL_SHIFT (3U)
-/*! RXLVL - Receive FIFO level interrupt.
- */
-#define I2S_FIFOINTSTAT_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTSTAT_RXLVL_SHIFT)) & I2S_FIFOINTSTAT_RXLVL_MASK)
-#define I2S_FIFOINTSTAT_PERINT_MASK (0x10U)
-#define I2S_FIFOINTSTAT_PERINT_SHIFT (4U)
-/*! PERINT - Peripheral interrupt.
- */
-#define I2S_FIFOINTSTAT_PERINT(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTSTAT_PERINT_SHIFT)) & I2S_FIFOINTSTAT_PERINT_MASK)
-/*! @} */
-
-/*! @name FIFOWR - FIFO write data. */
-/*! @{ */
-#define I2S_FIFOWR_TXDATA_MASK (0xFFFFFFFFU)
-#define I2S_FIFOWR_TXDATA_SHIFT (0U)
-/*! TXDATA - Transmit data to the FIFO. The number of bits used depends on configuration details.
- */
-#define I2S_FIFOWR_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOWR_TXDATA_SHIFT)) & I2S_FIFOWR_TXDATA_MASK)
-/*! @} */
-
-/*! @name FIFOWR48H - FIFO write data for upper data bits. May only be used if the I2S is configured for 2x 24-bit data and not using DMA. */
-/*! @{ */
-#define I2S_FIFOWR48H_TXDATA_MASK (0xFFFFFFU)
-#define I2S_FIFOWR48H_TXDATA_SHIFT (0U)
-/*! TXDATA - Transmit data to the FIFO. Whether this register is used and the number of bits used depends on configuration details.
- */
-#define I2S_FIFOWR48H_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOWR48H_TXDATA_SHIFT)) & I2S_FIFOWR48H_TXDATA_MASK)
-/*! @} */
-
-/*! @name FIFORD - FIFO read data. */
-/*! @{ */
-#define I2S_FIFORD_RXDATA_MASK (0xFFFFFFFFU)
-#define I2S_FIFORD_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO. The number of bits used depends on configuration details.
- */
-#define I2S_FIFORD_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFORD_RXDATA_SHIFT)) & I2S_FIFORD_RXDATA_MASK)
-/*! @} */
-
-/*! @name FIFORD48H - FIFO read data for upper data bits. May only be used if the I2S is configured for 2x 24-bit data and not using DMA. */
-/*! @{ */
-#define I2S_FIFORD48H_RXDATA_MASK (0xFFFFFFU)
-#define I2S_FIFORD48H_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO. Whether this register is used and the number of bits used depends on configuration details.
- */
-#define I2S_FIFORD48H_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFORD48H_RXDATA_SHIFT)) & I2S_FIFORD48H_RXDATA_MASK)
-/*! @} */
-
-/*! @name FIFORDNOPOP - FIFO data read with no FIFO pop. */
-/*! @{ */
-#define I2S_FIFORDNOPOP_RXDATA_MASK (0xFFFFFFFFU)
-#define I2S_FIFORDNOPOP_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO.
- */
-#define I2S_FIFORDNOPOP_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFORDNOPOP_RXDATA_SHIFT)) & I2S_FIFORDNOPOP_RXDATA_MASK)
-/*! @} */
-
-/*! @name FIFORD48HNOPOP - FIFO data read for upper data bits with no FIFO pop. May only be used if the I2S is configured for 2x 24-bit data and not using DMA. */
-/*! @{ */
-#define I2S_FIFORD48HNOPOP_RXDATA_MASK (0xFFFFFFU)
-#define I2S_FIFORD48HNOPOP_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO. Whether this register is used and the number of bits used depends on configuration details.
- */
-#define I2S_FIFORD48HNOPOP_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFORD48HNOPOP_RXDATA_SHIFT)) & I2S_FIFORD48HNOPOP_RXDATA_MASK)
-/*! @} */
-
-/*! @name ID - I2S Module identification */
-/*! @{ */
-#define I2S_ID_APERTURE_MASK (0xFFU)
-#define I2S_ID_APERTURE_SHIFT (0U)
-/*! APERTURE - Aperture: encoded as (aperture size/4K) -1, so 0x00 means a 4K aperture.
- */
-#define I2S_ID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << I2S_ID_APERTURE_SHIFT)) & I2S_ID_APERTURE_MASK)
-#define I2S_ID_MINOR_REV_MASK (0xF00U)
-#define I2S_ID_MINOR_REV_SHIFT (8U)
-/*! MINOR_REV - Minor revision of module implementation, starting at 0.
- */
-#define I2S_ID_MINOR_REV(x) (((uint32_t)(((uint32_t)(x)) << I2S_ID_MINOR_REV_SHIFT)) & I2S_ID_MINOR_REV_MASK)
-#define I2S_ID_MAJOR_REV_MASK (0xF000U)
-#define I2S_ID_MAJOR_REV_SHIFT (12U)
-/*! MAJOR_REV - Major revision of module implementation, starting at 0.
- */
-#define I2S_ID_MAJOR_REV(x) (((uint32_t)(((uint32_t)(x)) << I2S_ID_MAJOR_REV_SHIFT)) & I2S_ID_MAJOR_REV_MASK)
-#define I2S_ID_ID_MASK (0xFFFF0000U)
-#define I2S_ID_ID_SHIFT (16U)
-/*! ID - Unique module identifier for this IP block.
- */
-#define I2S_ID_ID(x) (((uint32_t)(((uint32_t)(x)) << I2S_ID_ID_SHIFT)) & I2S_ID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group I2S_Register_Masks */
-
-
-/* I2S - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral I2S0 base address */
- #define I2S0_BASE (0x50086000u)
- /** Peripheral I2S0 base address */
- #define I2S0_BASE_NS (0x40086000u)
- /** Peripheral I2S0 base pointer */
- #define I2S0 ((I2S_Type *)I2S0_BASE)
- /** Peripheral I2S0 base pointer */
- #define I2S0_NS ((I2S_Type *)I2S0_BASE_NS)
- /** Peripheral I2S1 base address */
- #define I2S1_BASE (0x50087000u)
- /** Peripheral I2S1 base address */
- #define I2S1_BASE_NS (0x40087000u)
- /** Peripheral I2S1 base pointer */
- #define I2S1 ((I2S_Type *)I2S1_BASE)
- /** Peripheral I2S1 base pointer */
- #define I2S1_NS ((I2S_Type *)I2S1_BASE_NS)
- /** Peripheral I2S2 base address */
- #define I2S2_BASE (0x50088000u)
- /** Peripheral I2S2 base address */
- #define I2S2_BASE_NS (0x40088000u)
- /** Peripheral I2S2 base pointer */
- #define I2S2 ((I2S_Type *)I2S2_BASE)
- /** Peripheral I2S2 base pointer */
- #define I2S2_NS ((I2S_Type *)I2S2_BASE_NS)
- /** Peripheral I2S3 base address */
- #define I2S3_BASE (0x50089000u)
- /** Peripheral I2S3 base address */
- #define I2S3_BASE_NS (0x40089000u)
- /** Peripheral I2S3 base pointer */
- #define I2S3 ((I2S_Type *)I2S3_BASE)
- /** Peripheral I2S3 base pointer */
- #define I2S3_NS ((I2S_Type *)I2S3_BASE_NS)
- /** Peripheral I2S4 base address */
- #define I2S4_BASE (0x5008A000u)
- /** Peripheral I2S4 base address */
- #define I2S4_BASE_NS (0x4008A000u)
- /** Peripheral I2S4 base pointer */
- #define I2S4 ((I2S_Type *)I2S4_BASE)
- /** Peripheral I2S4 base pointer */
- #define I2S4_NS ((I2S_Type *)I2S4_BASE_NS)
- /** Peripheral I2S5 base address */
- #define I2S5_BASE (0x50096000u)
- /** Peripheral I2S5 base address */
- #define I2S5_BASE_NS (0x40096000u)
- /** Peripheral I2S5 base pointer */
- #define I2S5 ((I2S_Type *)I2S5_BASE)
- /** Peripheral I2S5 base pointer */
- #define I2S5_NS ((I2S_Type *)I2S5_BASE_NS)
- /** Peripheral I2S6 base address */
- #define I2S6_BASE (0x50097000u)
- /** Peripheral I2S6 base address */
- #define I2S6_BASE_NS (0x40097000u)
- /** Peripheral I2S6 base pointer */
- #define I2S6 ((I2S_Type *)I2S6_BASE)
- /** Peripheral I2S6 base pointer */
- #define I2S6_NS ((I2S_Type *)I2S6_BASE_NS)
- /** Peripheral I2S7 base address */
- #define I2S7_BASE (0x50098000u)
- /** Peripheral I2S7 base address */
- #define I2S7_BASE_NS (0x40098000u)
- /** Peripheral I2S7 base pointer */
- #define I2S7 ((I2S_Type *)I2S7_BASE)
- /** Peripheral I2S7 base pointer */
- #define I2S7_NS ((I2S_Type *)I2S7_BASE_NS)
- /** Array initializer of I2S peripheral base addresses */
- #define I2S_BASE_ADDRS { I2S0_BASE, I2S1_BASE, I2S2_BASE, I2S3_BASE, I2S4_BASE, I2S5_BASE, I2S6_BASE, I2S7_BASE }
- /** Array initializer of I2S peripheral base pointers */
- #define I2S_BASE_PTRS { I2S0, I2S1, I2S2, I2S3, I2S4, I2S5, I2S6, I2S7 }
- /** Array initializer of I2S peripheral base addresses */
- #define I2S_BASE_ADDRS_NS { I2S0_BASE_NS, I2S1_BASE_NS, I2S2_BASE_NS, I2S3_BASE_NS, I2S4_BASE_NS, I2S5_BASE_NS, I2S6_BASE_NS, I2S7_BASE_NS }
- /** Array initializer of I2S peripheral base pointers */
- #define I2S_BASE_PTRS_NS { I2S0_NS, I2S1_NS, I2S2_NS, I2S3_NS, I2S4_NS, I2S5_NS, I2S6_NS, I2S7_NS }
-#else
- /** Peripheral I2S0 base address */
- #define I2S0_BASE (0x40086000u)
- /** Peripheral I2S0 base pointer */
- #define I2S0 ((I2S_Type *)I2S0_BASE)
- /** Peripheral I2S1 base address */
- #define I2S1_BASE (0x40087000u)
- /** Peripheral I2S1 base pointer */
- #define I2S1 ((I2S_Type *)I2S1_BASE)
- /** Peripheral I2S2 base address */
- #define I2S2_BASE (0x40088000u)
- /** Peripheral I2S2 base pointer */
- #define I2S2 ((I2S_Type *)I2S2_BASE)
- /** Peripheral I2S3 base address */
- #define I2S3_BASE (0x40089000u)
- /** Peripheral I2S3 base pointer */
- #define I2S3 ((I2S_Type *)I2S3_BASE)
- /** Peripheral I2S4 base address */
- #define I2S4_BASE (0x4008A000u)
- /** Peripheral I2S4 base pointer */
- #define I2S4 ((I2S_Type *)I2S4_BASE)
- /** Peripheral I2S5 base address */
- #define I2S5_BASE (0x40096000u)
- /** Peripheral I2S5 base pointer */
- #define I2S5 ((I2S_Type *)I2S5_BASE)
- /** Peripheral I2S6 base address */
- #define I2S6_BASE (0x40097000u)
- /** Peripheral I2S6 base pointer */
- #define I2S6 ((I2S_Type *)I2S6_BASE)
- /** Peripheral I2S7 base address */
- #define I2S7_BASE (0x40098000u)
- /** Peripheral I2S7 base pointer */
- #define I2S7 ((I2S_Type *)I2S7_BASE)
- /** Array initializer of I2S peripheral base addresses */
- #define I2S_BASE_ADDRS { I2S0_BASE, I2S1_BASE, I2S2_BASE, I2S3_BASE, I2S4_BASE, I2S5_BASE, I2S6_BASE, I2S7_BASE }
- /** Array initializer of I2S peripheral base pointers */
- #define I2S_BASE_PTRS { I2S0, I2S1, I2S2, I2S3, I2S4, I2S5, I2S6, I2S7 }
-#endif
-/** Interrupt vectors for the I2S peripheral type */
-#define I2S_IRQS { FLEXCOMM0_IRQn, FLEXCOMM1_IRQn, FLEXCOMM2_IRQn, FLEXCOMM3_IRQn, FLEXCOMM4_IRQn, FLEXCOMM5_IRQn, FLEXCOMM6_IRQn, FLEXCOMM7_IRQn }
-
-/*!
- * @}
- */ /* end of group I2S_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- INPUTMUX Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup INPUTMUX_Peripheral_Access_Layer INPUTMUX Peripheral Access Layer
- * @{
- */
-
-/** INPUTMUX - Register Layout Typedef */
-typedef struct {
- __IO uint32_t SCT0_INMUX[7]; /**< Input mux register for SCT0 input, array offset: 0x0, array step: 0x4 */
- uint8_t RESERVED_0[4];
- __IO uint32_t TIMER0CAPTSEL[4]; /**< Capture select registers for TIMER0 inputs, array offset: 0x20, array step: 0x4 */
- uint8_t RESERVED_1[16];
- __IO uint32_t TIMER1CAPTSEL[4]; /**< Capture select registers for TIMER1 inputs, array offset: 0x40, array step: 0x4 */
- uint8_t RESERVED_2[16];
- __IO uint32_t TIMER2CAPTSEL[4]; /**< Capture select registers for TIMER2 inputs, array offset: 0x60, array step: 0x4 */
- uint8_t RESERVED_3[80];
- __IO uint32_t PINTSEL[8]; /**< Pin interrupt select register, array offset: 0xC0, array step: 0x4 */
- __IO uint32_t DMA0_ITRIG_INMUX[23]; /**< Trigger select register for DMA0 channel, array offset: 0xE0, array step: 0x4 */
- uint8_t RESERVED_4[36];
- __IO uint32_t DMA0_OTRIG_INMUX[4]; /**< DMA0 output trigger selection to become DMA0 trigger, array offset: 0x160, array step: 0x4 */
- uint8_t RESERVED_5[16];
- __IO uint32_t FREQMEAS_REF; /**< Selection for frequency measurement reference clock, offset: 0x180 */
- __IO uint32_t FREQMEAS_TARGET; /**< Selection for frequency measurement target clock, offset: 0x184 */
- uint8_t RESERVED_6[24];
- __IO uint32_t TIMER3CAPTSEL[4]; /**< Capture select registers for TIMER3 inputs, array offset: 0x1A0, array step: 0x4 */
- uint8_t RESERVED_7[16];
- __IO uint32_t TIMER4CAPTSEL[4]; /**< Capture select registers for TIMER4 inputs, array offset: 0x1C0, array step: 0x4 */
- uint8_t RESERVED_8[16];
- __IO uint32_t PINTSECSEL[2]; /**< Pin interrupt secure select register, array offset: 0x1E0, array step: 0x4 */
- uint8_t RESERVED_9[24];
- __IO uint32_t DMA1_ITRIG_INMUX[10]; /**< Trigger select register for DMA1 channel, array offset: 0x200, array step: 0x4 */
- uint8_t RESERVED_10[24];
- __IO uint32_t DMA1_OTRIG_INMUX[4]; /**< DMA1 output trigger selection to become DMA1 trigger, array offset: 0x240, array step: 0x4 */
- uint8_t RESERVED_11[1264];
- __IO uint32_t DMA0_REQ_ENA; /**< Enable DMA0 requests, offset: 0x740 */
- uint8_t RESERVED_12[4];
- __O uint32_t DMA0_REQ_ENA_SET; /**< Set one or several bits in DMA0_REQ_ENA register, offset: 0x748 */
- uint8_t RESERVED_13[4];
- __O uint32_t DMA0_REQ_ENA_CLR; /**< Clear one or several bits in DMA0_REQ_ENA register, offset: 0x750 */
- uint8_t RESERVED_14[12];
- __IO uint32_t DMA1_REQ_ENA; /**< Enable DMA1 requests, offset: 0x760 */
- uint8_t RESERVED_15[4];
- __O uint32_t DMA1_REQ_ENA_SET; /**< Set one or several bits in DMA1_REQ_ENA register, offset: 0x768 */
- uint8_t RESERVED_16[4];
- __O uint32_t DMA1_REQ_ENA_CLR; /**< Clear one or several bits in DMA1_REQ_ENA register, offset: 0x770 */
- uint8_t RESERVED_17[12];
- __IO uint32_t DMA0_ITRIG_ENA; /**< Enable DMA0 triggers, offset: 0x780 */
- uint8_t RESERVED_18[4];
- __O uint32_t DMA0_ITRIG_ENA_SET; /**< Set one or several bits in DMA0_ITRIG_ENA register, offset: 0x788 */
- uint8_t RESERVED_19[4];
- __O uint32_t DMA0_ITRIG_ENA_CLR; /**< Clear one or several bits in DMA0_ITRIG_ENA register, offset: 0x790 */
- uint8_t RESERVED_20[12];
- __IO uint32_t DMA1_ITRIG_ENA; /**< Enable DMA1 triggers, offset: 0x7A0 */
- uint8_t RESERVED_21[4];
- __O uint32_t DMA1_ITRIG_ENA_SET; /**< Set one or several bits in DMA1_ITRIG_ENA register, offset: 0x7A8 */
- uint8_t RESERVED_22[4];
- __O uint32_t DMA1_ITRIG_ENA_CLR; /**< Clear one or several bits in DMA1_ITRIG_ENA register, offset: 0x7B0 */
-} INPUTMUX_Type;
-
-/* ----------------------------------------------------------------------------
- -- INPUTMUX Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup INPUTMUX_Register_Masks INPUTMUX Register Masks
- * @{
- */
-
-/*! @name SCT0_INMUX - Input mux register for SCT0 input */
-/*! @{ */
-#define INPUTMUX_SCT0_INMUX_INP_N_MASK (0x1FU)
-#define INPUTMUX_SCT0_INMUX_INP_N_SHIFT (0U)
-/*! INP_N - Input number to SCT0 inputs 0 to 6..
- * 0b00000..SCT_GPI0 function selected from IOCON register
- * 0b00001..SCT_GPI1 function selected from IOCON register
- * 0b00010..SCT_GPI2 function selected from IOCON register
- * 0b00011..SCT_GPI3 function selected from IOCON register
- * 0b00100..SCT_GPI4 function selected from IOCON register
- * 0b00101..SCT_GPI5 function selected from IOCON register
- * 0b00110..SCT_GPI6 function selected from IOCON register
- * 0b00111..SCT_GPI7 function selected from IOCON register
- * 0b01000..T0_OUT0 ctimer 0 match[0] output
- * 0b01001..T1_OUT0 ctimer 1 match[0] output
- * 0b01010..T2_OUT0 ctimer 2 match[0] output
- * 0b01011..T3_OUT0 ctimer 3 match[0] output
- * 0b01100..T4_OUT0 ctimer 4 match[0] output
- * 0b01101..ADC_IRQ interrupt request from ADC
- * 0b01110..GPIOINT_BMATCH
- * 0b01111..USB0_FRAME_TOGGLE
- * 0b10000..USB1_FRAME_TOGGLE
- * 0b10001..COMP_OUTPUT output from analog comparator
- * 0b10010..I2S_SHARED_SCK[0] output from I2S pin sharing
- * 0b10011..I2S_SHARED_SCK[1] output from I2S pin sharing
- * 0b10100..I2S_SHARED_WS[0] output from I2S pin sharing
- * 0b10101..I2S_SHARED_WS[1] output from I2S pin sharing
- * 0b10110..ARM_TXEV interrupt event from cpu0 or cpu1
- * 0b10111..DEBUG_HALTED from cpu0 or cpu1
- * 0b11000-0b11111..None
- */
-#define INPUTMUX_SCT0_INMUX_INP_N(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_SCT0_INMUX_INP_N_SHIFT)) & INPUTMUX_SCT0_INMUX_INP_N_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_SCT0_INMUX */
-#define INPUTMUX_SCT0_INMUX_COUNT (7U)
-
-/*! @name TIMER0CAPTSEL - Capture select registers for TIMER0 inputs */
-/*! @{ */
-#define INPUTMUX_TIMER0CAPTSEL_CAPTSEL_MASK (0x1FU)
-#define INPUTMUX_TIMER0CAPTSEL_CAPTSEL_SHIFT (0U)
-/*! CAPTSEL - Input number to TIMER0 capture inputs 0 to 4
- * 0b00000..CT_INP0 function selected from IOCON register
- * 0b00001..CT_INP1 function selected from IOCON register
- * 0b00010..CT_INP2 function selected from IOCON register
- * 0b00011..CT_INP3 function selected from IOCON register
- * 0b00100..CT_INP4 function selected from IOCON register
- * 0b00101..CT_INP5 function selected from IOCON register
- * 0b00110..CT_INP6 function selected from IOCON register
- * 0b00111..CT_INP7 function selected from IOCON register
- * 0b01000..CT_INP8 function selected from IOCON register
- * 0b01001..CT_INP9 function selected from IOCON register
- * 0b01010..CT_INP10 function selected from IOCON register
- * 0b01011..CT_INP11 function selected from IOCON register
- * 0b01100..CT_INP12 function selected from IOCON register
- * 0b01101..CT_INP13 function selected from IOCON register
- * 0b01110..CT_INP14 function selected from IOCON register
- * 0b01111..CT_INP15 function selected from IOCON register
- * 0b10000..CT_INP16 function selected from IOCON register
- * 0b10001..None
- * 0b10010..None
- * 0b10011..None
- * 0b10100..USB0_FRAME_TOGGLE
- * 0b10101..USB1_FRAME_TOGGLE
- * 0b10110..COMP_OUTPUT output from analog comparator
- * 0b10111..I2S_SHARED_WS[0] output from I2S pin sharing
- * 0b11000..I2S_SHARED_WS[1] output from I2S pin sharing
- * 0b11001-0b11111..None
- */
-#define INPUTMUX_TIMER0CAPTSEL_CAPTSEL(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_TIMER0CAPTSEL_CAPTSEL_SHIFT)) & INPUTMUX_TIMER0CAPTSEL_CAPTSEL_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_TIMER0CAPTSEL */
-#define INPUTMUX_TIMER0CAPTSEL_COUNT (4U)
-
-/*! @name TIMER1CAPTSEL - Capture select registers for TIMER1 inputs */
-/*! @{ */
-#define INPUTMUX_TIMER1CAPTSEL_CAPTSEL_MASK (0x1FU)
-#define INPUTMUX_TIMER1CAPTSEL_CAPTSEL_SHIFT (0U)
-/*! CAPTSEL - Input number to TIMER1 capture inputs 0 to 4
- * 0b00000..CT_INP0 function selected from IOCON register
- * 0b00001..CT_INP1 function selected from IOCON register
- * 0b00010..CT_INP2 function selected from IOCON register
- * 0b00011..CT_INP3 function selected from IOCON register
- * 0b00100..CT_INP4 function selected from IOCON register
- * 0b00101..CT_INP5 function selected from IOCON register
- * 0b00110..CT_INP6 function selected from IOCON register
- * 0b00111..CT_INP7 function selected from IOCON register
- * 0b01000..CT_INP8 function selected from IOCON register
- * 0b01001..CT_INP9 function selected from IOCON register
- * 0b01010..CT_INP10 function selected from IOCON register
- * 0b01011..CT_INP11 function selected from IOCON register
- * 0b01100..CT_INP12 function selected from IOCON register
- * 0b01101..CT_INP13 function selected from IOCON register
- * 0b01110..CT_INP14 function selected from IOCON register
- * 0b01111..CT_INP15 function selected from IOCON register
- * 0b10000..CT_INP16 function selected from IOCON register
- * 0b10001..None
- * 0b10010..None
- * 0b10011..None
- * 0b10100..USB0_FRAME_TOGGLE
- * 0b10101..USB1_FRAME_TOGGLE
- * 0b10110..COMP_OUTPUT output from analog comparator
- * 0b10111..I2S_SHARED_WS[0] output from I2S pin sharing
- * 0b11000..I2S_SHARED_WS[1] output from I2S pin sharing
- * 0b11001-0b11111..None
- */
-#define INPUTMUX_TIMER1CAPTSEL_CAPTSEL(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_TIMER1CAPTSEL_CAPTSEL_SHIFT)) & INPUTMUX_TIMER1CAPTSEL_CAPTSEL_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_TIMER1CAPTSEL */
-#define INPUTMUX_TIMER1CAPTSEL_COUNT (4U)
-
-/*! @name TIMER2CAPTSEL - Capture select registers for TIMER2 inputs */
-/*! @{ */
-#define INPUTMUX_TIMER2CAPTSEL_CAPTSEL_MASK (0x1FU)
-#define INPUTMUX_TIMER2CAPTSEL_CAPTSEL_SHIFT (0U)
-/*! CAPTSEL - Input number to TIMER2 capture inputs 0 to 4
- * 0b00000..CT_INP0 function selected from IOCON register
- * 0b00001..CT_INP1 function selected from IOCON register
- * 0b00010..CT_INP2 function selected from IOCON register
- * 0b00011..CT_INP3 function selected from IOCON register
- * 0b00100..CT_INP4 function selected from IOCON register
- * 0b00101..CT_INP5 function selected from IOCON register
- * 0b00110..CT_INP6 function selected from IOCON register
- * 0b00111..CT_INP7 function selected from IOCON register
- * 0b01000..CT_INP8 function selected from IOCON register
- * 0b01001..CT_INP9 function selected from IOCON register
- * 0b01010..CT_INP10 function selected from IOCON register
- * 0b01011..CT_INP11 function selected from IOCON register
- * 0b01100..CT_INP12 function selected from IOCON register
- * 0b01101..CT_INP13 function selected from IOCON register
- * 0b01110..CT_INP14 function selected from IOCON register
- * 0b01111..CT_INP15 function selected from IOCON register
- * 0b10000..CT_INP16 function selected from IOCON register
- * 0b10001..None
- * 0b10010..None
- * 0b10011..None
- * 0b10100..USB0_FRAME_TOGGLE
- * 0b10101..USB1_FRAME_TOGGLE
- * 0b10110..COMP_OUTPUT output from analog comparator
- * 0b10111..I2S_SHARED_WS[0] output from I2S pin sharing
- * 0b11000..I2S_SHARED_WS[1] output from I2S pin sharing
- * 0b11001-0b11111..None
- */
-#define INPUTMUX_TIMER2CAPTSEL_CAPTSEL(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_TIMER2CAPTSEL_CAPTSEL_SHIFT)) & INPUTMUX_TIMER2CAPTSEL_CAPTSEL_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_TIMER2CAPTSEL */
-#define INPUTMUX_TIMER2CAPTSEL_COUNT (4U)
-
-/*! @name PINTSEL - Pin interrupt select register */
-/*! @{ */
-#define INPUTMUX_PINTSEL_INTPIN_MASK (0x7FU)
-#define INPUTMUX_PINTSEL_INTPIN_SHIFT (0U)
-/*! INTPIN - Pin number select for pin interrupt or pattern match engine input. For PIOx_y: INTPIN =
- * (x * 32) + y. PIO0_0 to PIO1_31 correspond to numbers 0 to 63.
- */
-#define INPUTMUX_PINTSEL_INTPIN(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_PINTSEL_INTPIN_SHIFT)) & INPUTMUX_PINTSEL_INTPIN_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_PINTSEL */
-#define INPUTMUX_PINTSEL_COUNT (8U)
-
-/*! @name DMA0_ITRIG_INMUX - Trigger select register for DMA0 channel */
-/*! @{ */
-#define INPUTMUX_DMA0_ITRIG_INMUX_INP_MASK (0x1FU)
-#define INPUTMUX_DMA0_ITRIG_INMUX_INP_SHIFT (0U)
-/*! INP - Trigger input number (decimal value) for DMA channel n (n = 0 to 22).
- * 0b00000..Pin interrupt 0
- * 0b00001..Pin interrupt 1
- * 0b00010..Pin interrupt 2
- * 0b00011..Pin interrupt 3
- * 0b00100..Timer CTIMER0 Match 0
- * 0b00101..Timer CTIMER0 Match 1
- * 0b00110..Timer CTIMER1 Match 0
- * 0b00111..Timer CTIMER1 Match 1
- * 0b01000..Timer CTIMER2 Match 0
- * 0b01001..Timer CTIMER2 Match 1
- * 0b01010..Timer CTIMER3 Match 0
- * 0b01011..Timer CTIMER3 Match 1
- * 0b01100..Timer CTIMER4 Match 0
- * 0b01101..Timer CTIMER4 Match 1
- * 0b01110..COMP_OUTPUT
- * 0b01111..DMA0 output trigger mux 0
- * 0b10000..DMA0 output trigger mux 1
- * 0b10001..DMA0 output trigger mux 1
- * 0b10010..DMA0 output trigger mux 3
- * 0b10011..SCT0 DMA request 0
- * 0b10100..SCT0 DMA request 1
- * 0b10101..HASH DMA RX trigger
- * 0b10110-0b11111..None
- */
-#define INPUTMUX_DMA0_ITRIG_INMUX_INP(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_ITRIG_INMUX_INP_SHIFT)) & INPUTMUX_DMA0_ITRIG_INMUX_INP_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_DMA0_ITRIG_INMUX */
-#define INPUTMUX_DMA0_ITRIG_INMUX_COUNT (23U)
-
-/*! @name DMA0_OTRIG_INMUX - DMA0 output trigger selection to become DMA0 trigger */
-/*! @{ */
-#define INPUTMUX_DMA0_OTRIG_INMUX_INP_MASK (0x1FU)
-#define INPUTMUX_DMA0_OTRIG_INMUX_INP_SHIFT (0U)
-/*! INP - DMA trigger output number (decimal value) for DMA channel n (n = 0 to 22).
- */
-#define INPUTMUX_DMA0_OTRIG_INMUX_INP(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_OTRIG_INMUX_INP_SHIFT)) & INPUTMUX_DMA0_OTRIG_INMUX_INP_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_DMA0_OTRIG_INMUX */
-#define INPUTMUX_DMA0_OTRIG_INMUX_COUNT (4U)
-
-/*! @name FREQMEAS_REF - Selection for frequency measurement reference clock */
-/*! @{ */
-#define INPUTMUX_FREQMEAS_REF_CLKIN_MASK (0x1FU)
-#define INPUTMUX_FREQMEAS_REF_CLKIN_SHIFT (0U)
-/*! CLKIN - Clock source number (decimal value) for frequency measure function target clock: 0 =
- * CLK_IN 1 = FRO 12 MHz oscillator 2 = Watchdog oscillator 3 = 32 kHz RTC oscillator 4 = Main clock
- * (see Section 4.5.23) 5 = PIO0_4 6 = PIO0_20 7 = PIO0_24 8 = PIO1_4
- */
-#define INPUTMUX_FREQMEAS_REF_CLKIN(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_FREQMEAS_REF_CLKIN_SHIFT)) & INPUTMUX_FREQMEAS_REF_CLKIN_MASK)
-/*! @} */
-
-/*! @name FREQMEAS_TARGET - Selection for frequency measurement target clock */
-/*! @{ */
-#define INPUTMUX_FREQMEAS_TARGET_CLKIN_MASK (0x1FU)
-#define INPUTMUX_FREQMEAS_TARGET_CLKIN_SHIFT (0U)
-/*! CLKIN - Clock source number (decimal value) for frequency measure function target clock: 0 =
- * CLK_IN 1 = FRO 12 MHz oscillator 2 = Watchdog oscillator 3 = 32 kHz RTC oscillator 4 = Main clock
- * (see Section 4.5.23) 5 = PIO0_4 6 = PIO0_20 7 = PIO0_24 8 = PIO1_4
- */
-#define INPUTMUX_FREQMEAS_TARGET_CLKIN(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_FREQMEAS_TARGET_CLKIN_SHIFT)) & INPUTMUX_FREQMEAS_TARGET_CLKIN_MASK)
-/*! @} */
-
-/*! @name TIMER3CAPTSEL - Capture select registers for TIMER3 inputs */
-/*! @{ */
-#define INPUTMUX_TIMER3CAPTSEL_CAPTSEL_MASK (0x1FU)
-#define INPUTMUX_TIMER3CAPTSEL_CAPTSEL_SHIFT (0U)
-/*! CAPTSEL - Input number to TIMER3 capture inputs 0 to 4
- * 0b00000..CT_INP0 function selected from IOCON register
- * 0b00001..CT_INP1 function selected from IOCON register
- * 0b00010..CT_INP2 function selected from IOCON register
- * 0b00011..CT_INP3 function selected from IOCON register
- * 0b00100..CT_INP4 function selected from IOCON register
- * 0b00101..CT_INP5 function selected from IOCON register
- * 0b00110..CT_INP6 function selected from IOCON register
- * 0b00111..CT_INP7 function selected from IOCON register
- * 0b01000..CT_INP8 function selected from IOCON register
- * 0b01001..CT_INP9 function selected from IOCON register
- * 0b01010..CT_INP10 function selected from IOCON register
- * 0b01011..CT_INP11 function selected from IOCON register
- * 0b01100..CT_INP12 function selected from IOCON register
- * 0b01101..CT_INP13 function selected from IOCON register
- * 0b01110..CT_INP14 function selected from IOCON register
- * 0b01111..CT_INP15 function selected from IOCON register
- * 0b10000..CT_INP16 function selected from IOCON register
- * 0b10001..CT_INP17 function selected from IOCON register
- * 0b10010..CT_INP18 function selected from IOCON register
- * 0b10011..CT_INP19 function selected from IOCON register
- * 0b10100..USB0_FRAME_TOGGLE
- * 0b10101..USB1_FRAME_TOGGLE
- * 0b10110..COMP_OUTPUT output from analog comparator
- * 0b10111..I2S_SHARED_WS[0] output from I2S pin sharing
- * 0b11000..I2S_SHARED_WS[1] output from I2S pin sharing
- * 0b11001-0b11111..None
- */
-#define INPUTMUX_TIMER3CAPTSEL_CAPTSEL(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_TIMER3CAPTSEL_CAPTSEL_SHIFT)) & INPUTMUX_TIMER3CAPTSEL_CAPTSEL_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_TIMER3CAPTSEL */
-#define INPUTMUX_TIMER3CAPTSEL_COUNT (4U)
-
-/*! @name TIMER4CAPTSEL - Capture select registers for TIMER4 inputs */
-/*! @{ */
-#define INPUTMUX_TIMER4CAPTSEL_CAPTSEL_MASK (0x1FU)
-#define INPUTMUX_TIMER4CAPTSEL_CAPTSEL_SHIFT (0U)
-/*! CAPTSEL - Input number to TIMER4 capture inputs 0 to 4
- * 0b00000..CT_INP0 function selected from IOCON register
- * 0b00001..CT_INP1 function selected from IOCON register
- * 0b00010..CT_INP2 function selected from IOCON register
- * 0b00011..CT_INP3 function selected from IOCON register
- * 0b00100..CT_INP4 function selected from IOCON register
- * 0b00101..CT_INP5 function selected from IOCON register
- * 0b00110..CT_INP6 function selected from IOCON register
- * 0b00111..CT_INP7 function selected from IOCON register
- * 0b01000..CT_INP8 function selected from IOCON register
- * 0b01001..CT_INP9 function selected from IOCON register
- * 0b01010..CT_INP10 function selected from IOCON register
- * 0b01011..CT_INP11 function selected from IOCON register
- * 0b01100..CT_INP12 function selected from IOCON register
- * 0b01101..CT_INP13 function selected from IOCON register
- * 0b01110..CT_INP14 function selected from IOCON register
- * 0b01111..CT_INP15 function selected from IOCON register
- * 0b10000..CT_INP16 function selected from IOCON register
- * 0b10001..CT_INP17 function selected from IOCON register
- * 0b10010..CT_INP18 function selected from IOCON register
- * 0b10011..CT_INP19 function selected from IOCON register
- * 0b10100..USB0_FRAME_TOGGLE
- * 0b10101..USB1_FRAME_TOGGLE
- * 0b10110..COMP_OUTPUT output from analog comparator
- * 0b10111..I2S_SHARED_WS[0] output from I2S pin sharing
- * 0b11000..I2S_SHARED_WS[1] output from I2S pin sharing
- * 0b11001-0b11111..None
- */
-#define INPUTMUX_TIMER4CAPTSEL_CAPTSEL(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_TIMER4CAPTSEL_CAPTSEL_SHIFT)) & INPUTMUX_TIMER4CAPTSEL_CAPTSEL_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_TIMER4CAPTSEL */
-#define INPUTMUX_TIMER4CAPTSEL_COUNT (4U)
-
-/*! @name PINTSECSEL - Pin interrupt secure select register */
-/*! @{ */
-#define INPUTMUX_PINTSECSEL_INTPIN_MASK (0x3FU)
-#define INPUTMUX_PINTSECSEL_INTPIN_SHIFT (0U)
-/*! INTPIN - Pin number select for pin interrupt secure or pattern match engine input. For PIO0_x:
- * INTPIN = x. PIO0_0 to PIO0_31 correspond to numbers 0 to 31.
- */
-#define INPUTMUX_PINTSECSEL_INTPIN(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_PINTSECSEL_INTPIN_SHIFT)) & INPUTMUX_PINTSECSEL_INTPIN_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_PINTSECSEL */
-#define INPUTMUX_PINTSECSEL_COUNT (2U)
-
-/*! @name DMA1_ITRIG_INMUX - Trigger select register for DMA1 channel */
-/*! @{ */
-#define INPUTMUX_DMA1_ITRIG_INMUX_INP_MASK (0xFU)
-#define INPUTMUX_DMA1_ITRIG_INMUX_INP_SHIFT (0U)
-/*! INP - Trigger input number (decimal value) for DMA channel n (n = 0 to 9).
- * 0b0000..Pin interrupt 0
- * 0b0001..Pin interrupt 1
- * 0b0010..Pin interrupt 2
- * 0b0011..Pin interrupt 3
- * 0b0100..Timer CTIMER0 Match 0
- * 0b0101..Timer CTIMER0 Match 1
- * 0b0110..Timer CTIMER2 Match 0
- * 0b0111..Timer CTIMER4 Match 0
- * 0b1000..DMA1 output trigger mux 0
- * 0b1001..DMA1 output trigger mux 1
- * 0b1010..DMA1 output trigger mux 2
- * 0b1011..DMA1 output trigger mux 3
- * 0b1100..SCT0 DMA request 0
- * 0b1101..SCT0 DMA request 1
- * 0b1110..HASH DMA RX trigger
- * 0b1111..None
- */
-#define INPUTMUX_DMA1_ITRIG_INMUX_INP(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_ITRIG_INMUX_INP_SHIFT)) & INPUTMUX_DMA1_ITRIG_INMUX_INP_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_DMA1_ITRIG_INMUX */
-#define INPUTMUX_DMA1_ITRIG_INMUX_COUNT (10U)
-
-/*! @name DMA1_OTRIG_INMUX - DMA1 output trigger selection to become DMA1 trigger */
-/*! @{ */
-#define INPUTMUX_DMA1_OTRIG_INMUX_INP_MASK (0xFU)
-#define INPUTMUX_DMA1_OTRIG_INMUX_INP_SHIFT (0U)
-/*! INP - DMA trigger output number (decimal value) for DMA channel n (n = 0 to 9).
- */
-#define INPUTMUX_DMA1_OTRIG_INMUX_INP(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_OTRIG_INMUX_INP_SHIFT)) & INPUTMUX_DMA1_OTRIG_INMUX_INP_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_DMA1_OTRIG_INMUX */
-#define INPUTMUX_DMA1_OTRIG_INMUX_COUNT (4U)
-
-/*! @name DMA0_REQ_ENA - Enable DMA0 requests */
-/*! @{ */
-#define INPUTMUX_DMA0_REQ_ENA_REQ_ENA_MASK (0x7FFFFFU)
-#define INPUTMUX_DMA0_REQ_ENA_REQ_ENA_SHIFT (0U)
-/*! REQ_ENA - Controls the 23 request inputs of DMA0. If bit i is '1' the DMA request input #i is enabled.
- */
-#define INPUTMUX_DMA0_REQ_ENA_REQ_ENA(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_REQ_ENA_REQ_ENA_SHIFT)) & INPUTMUX_DMA0_REQ_ENA_REQ_ENA_MASK)
-/*! @} */
-
-/*! @name DMA0_REQ_ENA_SET - Set one or several bits in DMA0_REQ_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA0_REQ_ENA_SET_SET_MASK (0x7FFFFFU)
-#define INPUTMUX_DMA0_REQ_ENA_SET_SET_SHIFT (0U)
-/*! SET - Write : If bit #i = 1, bit #i in DMA0_REQ_ENA register is set to 1; if bit #i = 0 , no change in DMA0_REQ_ENA register
- */
-#define INPUTMUX_DMA0_REQ_ENA_SET_SET(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_REQ_ENA_SET_SET_SHIFT)) & INPUTMUX_DMA0_REQ_ENA_SET_SET_MASK)
-/*! @} */
-
-/*! @name DMA0_REQ_ENA_CLR - Clear one or several bits in DMA0_REQ_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA0_REQ_ENA_CLR_CLR_MASK (0x7FFFFFU)
-#define INPUTMUX_DMA0_REQ_ENA_CLR_CLR_SHIFT (0U)
-/*! CLR - Write : If bit #i = 1, bit #i in DMA0_REQ_ENA register is reset to 0; if bit #i = 0 , no change in DMA0_REQ_ENA register
- */
-#define INPUTMUX_DMA0_REQ_ENA_CLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_REQ_ENA_CLR_CLR_SHIFT)) & INPUTMUX_DMA0_REQ_ENA_CLR_CLR_MASK)
-/*! @} */
-
-/*! @name DMA1_REQ_ENA - Enable DMA1 requests */
-/*! @{ */
-#define INPUTMUX_DMA1_REQ_ENA_REQ_ENA_MASK (0x3FFU)
-#define INPUTMUX_DMA1_REQ_ENA_REQ_ENA_SHIFT (0U)
-/*! REQ_ENA - Controls the 10 request inputs of DMA1. If bit i is '1' the DMA request input #i is enabled.
- */
-#define INPUTMUX_DMA1_REQ_ENA_REQ_ENA(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_REQ_ENA_REQ_ENA_SHIFT)) & INPUTMUX_DMA1_REQ_ENA_REQ_ENA_MASK)
-/*! @} */
-
-/*! @name DMA1_REQ_ENA_SET - Set one or several bits in DMA1_REQ_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA1_REQ_ENA_SET_SET_MASK (0x3FFU)
-#define INPUTMUX_DMA1_REQ_ENA_SET_SET_SHIFT (0U)
-/*! SET - Write : If bit #i = 1, bit #i in DMA1_REQ_ENA register is set to 1; if bit #i = 0 , no change in DMA1_REQ_ENA register
- */
-#define INPUTMUX_DMA1_REQ_ENA_SET_SET(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_REQ_ENA_SET_SET_SHIFT)) & INPUTMUX_DMA1_REQ_ENA_SET_SET_MASK)
-/*! @} */
-
-/*! @name DMA1_REQ_ENA_CLR - Clear one or several bits in DMA1_REQ_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA1_REQ_ENA_CLR_CLR_MASK (0x3FFU)
-#define INPUTMUX_DMA1_REQ_ENA_CLR_CLR_SHIFT (0U)
-/*! CLR - Write : If bit #i = 1, bit #i in DMA1_REQ_ENA register is reset to 0; if bit #i = 0 , no change in DMA1_REQ_ENA register
- */
-#define INPUTMUX_DMA1_REQ_ENA_CLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_REQ_ENA_CLR_CLR_SHIFT)) & INPUTMUX_DMA1_REQ_ENA_CLR_CLR_MASK)
-/*! @} */
-
-/*! @name DMA0_ITRIG_ENA - Enable DMA0 triggers */
-/*! @{ */
-#define INPUTMUX_DMA0_ITRIG_ENA_ITRIG_ENA_MASK (0x3FFFFFU)
-#define INPUTMUX_DMA0_ITRIG_ENA_ITRIG_ENA_SHIFT (0U)
-/*! ITRIG_ENA - Controls the 22 trigger inputs of DMA0. If bit i is '1' the DMA trigger input #i is enabled.
- */
-#define INPUTMUX_DMA0_ITRIG_ENA_ITRIG_ENA(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_ITRIG_ENA_ITRIG_ENA_SHIFT)) & INPUTMUX_DMA0_ITRIG_ENA_ITRIG_ENA_MASK)
-/*! @} */
-
-/*! @name DMA0_ITRIG_ENA_SET - Set one or several bits in DMA0_ITRIG_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA0_ITRIG_ENA_SET_SET_MASK (0x3FFFFFU)
-#define INPUTMUX_DMA0_ITRIG_ENA_SET_SET_SHIFT (0U)
-/*! SET - Write : If bit #i = 1, bit #i in DMA0_ITRIG_ENA register is set to 1; if bit #i = 0 , no
- * change in DMA0_ITRIG_ENA register
- */
-#define INPUTMUX_DMA0_ITRIG_ENA_SET_SET(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_ITRIG_ENA_SET_SET_SHIFT)) & INPUTMUX_DMA0_ITRIG_ENA_SET_SET_MASK)
-/*! @} */
-
-/*! @name DMA0_ITRIG_ENA_CLR - Clear one or several bits in DMA0_ITRIG_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA0_ITRIG_ENA_CLR_CLR_MASK (0x3FFFFFU)
-#define INPUTMUX_DMA0_ITRIG_ENA_CLR_CLR_SHIFT (0U)
-/*! CLR - Write : If bit #i = 1, bit #i in DMA0_ITRIG_ENA register is reset to 0; if bit #i = 0 , no
- * change in DMA0_ITRIG_ENA register
- */
-#define INPUTMUX_DMA0_ITRIG_ENA_CLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_ITRIG_ENA_CLR_CLR_SHIFT)) & INPUTMUX_DMA0_ITRIG_ENA_CLR_CLR_MASK)
-/*! @} */
-
-/*! @name DMA1_ITRIG_ENA - Enable DMA1 triggers */
-/*! @{ */
-#define INPUTMUX_DMA1_ITRIG_ENA_ITRIG_ENA_MASK (0x7FFFU)
-#define INPUTMUX_DMA1_ITRIG_ENA_ITRIG_ENA_SHIFT (0U)
-/*! ITRIG_ENA - Controls the 15 trigger inputs of DMA1. If bit i is '1' the DMA trigger input #i is enabled.
- */
-#define INPUTMUX_DMA1_ITRIG_ENA_ITRIG_ENA(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_ITRIG_ENA_ITRIG_ENA_SHIFT)) & INPUTMUX_DMA1_ITRIG_ENA_ITRIG_ENA_MASK)
-/*! @} */
-
-/*! @name DMA1_ITRIG_ENA_SET - Set one or several bits in DMA1_ITRIG_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA1_ITRIG_ENA_SET_SET_MASK (0x7FFFU)
-#define INPUTMUX_DMA1_ITRIG_ENA_SET_SET_SHIFT (0U)
-/*! SET - Write : If bit #i = 1, bit #i in DMA1_ITRIG_ENA register is set to 1; if bit #i = 0 , no
- * change in DMA1_ITRIG_ENA register
- */
-#define INPUTMUX_DMA1_ITRIG_ENA_SET_SET(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_ITRIG_ENA_SET_SET_SHIFT)) & INPUTMUX_DMA1_ITRIG_ENA_SET_SET_MASK)
-/*! @} */
-
-/*! @name DMA1_ITRIG_ENA_CLR - Clear one or several bits in DMA1_ITRIG_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA1_ITRIG_ENA_CLR_CLR_MASK (0x7FFFU)
-#define INPUTMUX_DMA1_ITRIG_ENA_CLR_CLR_SHIFT (0U)
-/*! CLR - Write : If bit #i = 1, bit #i in DMA1_ITRIG_ENA register is reset to 0; if bit #i = 0 , no
- * change in DMA1_ITRIG_ENA register
- */
-#define INPUTMUX_DMA1_ITRIG_ENA_CLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_ITRIG_ENA_CLR_CLR_SHIFT)) & INPUTMUX_DMA1_ITRIG_ENA_CLR_CLR_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group INPUTMUX_Register_Masks */
-
-
-/* INPUTMUX - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral INPUTMUX base address */
- #define INPUTMUX_BASE (0x50006000u)
- /** Peripheral INPUTMUX base address */
- #define INPUTMUX_BASE_NS (0x40006000u)
- /** Peripheral INPUTMUX base pointer */
- #define INPUTMUX ((INPUTMUX_Type *)INPUTMUX_BASE)
- /** Peripheral INPUTMUX base pointer */
- #define INPUTMUX_NS ((INPUTMUX_Type *)INPUTMUX_BASE_NS)
- /** Array initializer of INPUTMUX peripheral base addresses */
- #define INPUTMUX_BASE_ADDRS { INPUTMUX_BASE }
- /** Array initializer of INPUTMUX peripheral base pointers */
- #define INPUTMUX_BASE_PTRS { INPUTMUX }
- /** Array initializer of INPUTMUX peripheral base addresses */
- #define INPUTMUX_BASE_ADDRS_NS { INPUTMUX_BASE_NS }
- /** Array initializer of INPUTMUX peripheral base pointers */
- #define INPUTMUX_BASE_PTRS_NS { INPUTMUX_NS }
-#else
- /** Peripheral INPUTMUX base address */
- #define INPUTMUX_BASE (0x40006000u)
- /** Peripheral INPUTMUX base pointer */
- #define INPUTMUX ((INPUTMUX_Type *)INPUTMUX_BASE)
- /** Array initializer of INPUTMUX peripheral base addresses */
- #define INPUTMUX_BASE_ADDRS { INPUTMUX_BASE }
- /** Array initializer of INPUTMUX peripheral base pointers */
- #define INPUTMUX_BASE_PTRS { INPUTMUX }
-#endif
-
-/*!
- * @}
- */ /* end of group INPUTMUX_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- IOCON Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup IOCON_Peripheral_Access_Layer IOCON Peripheral Access Layer
- * @{
- */
-
-/** IOCON - Register Layout Typedef */
-typedef struct {
- __IO uint32_t PIO[2][32]; /**< Digital I/O control for port 0 pins PIO0_0..Digital I/O control for port 1 pins PIO1_31, array offset: 0x0, array step: index*0x80, index2*0x4 */
-} IOCON_Type;
-
-/* ----------------------------------------------------------------------------
- -- IOCON Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup IOCON_Register_Masks IOCON Register Masks
- * @{
- */
-
-/*! @name PIO - Digital I/O control for port 0 pins PIO0_0..Digital I/O control for port 1 pins PIO1_31 */
-/*! @{ */
-#define IOCON_PIO_FUNC_MASK (0xFU)
-#define IOCON_PIO_FUNC_SHIFT (0U)
-/*! FUNC - Selects pin function.
- * 0b0000..Alternative connection 0.
- * 0b0001..Alternative connection 1.
- * 0b0010..Alternative connection 2.
- * 0b0011..Alternative connection 3.
- * 0b0100..Alternative connection 4.
- * 0b0101..Alternative connection 5.
- * 0b0110..Alternative connection 6.
- * 0b0111..Alternative connection 7.
- */
-#define IOCON_PIO_FUNC(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_FUNC_SHIFT)) & IOCON_PIO_FUNC_MASK)
-#define IOCON_PIO_MODE_MASK (0x30U)
-#define IOCON_PIO_MODE_SHIFT (4U)
-/*! MODE - Selects function mode (on-chip pull-up/pull-down resistor control).
- * 0b00..Inactive. Inactive (no pull-down/pull-up resistor enabled).
- * 0b01..Pull-down. Pull-down resistor enabled.
- * 0b10..Pull-up. Pull-up resistor enabled.
- * 0b11..Repeater. Repeater mode.
- */
-#define IOCON_PIO_MODE(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_MODE_SHIFT)) & IOCON_PIO_MODE_MASK)
-#define IOCON_PIO_SLEW_MASK (0x40U)
-#define IOCON_PIO_SLEW_SHIFT (6U)
-/*! SLEW - Driver slew rate.
- * 0b0..Standard-mode, output slew rate is slower. More outputs can be switched simultaneously.
- * 0b1..Fast-mode, output slew rate is faster. Refer to the appropriate specific device data sheet for details.
- */
-#define IOCON_PIO_SLEW(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_SLEW_SHIFT)) & IOCON_PIO_SLEW_MASK)
-#define IOCON_PIO_INVERT_MASK (0x80U)
-#define IOCON_PIO_INVERT_SHIFT (7U)
-/*! INVERT - Input polarity.
- * 0b0..Disabled. Input function is not inverted.
- * 0b1..Enabled. Input is function inverted.
- */
-#define IOCON_PIO_INVERT(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_INVERT_SHIFT)) & IOCON_PIO_INVERT_MASK)
-#define IOCON_PIO_DIGIMODE_MASK (0x100U)
-#define IOCON_PIO_DIGIMODE_SHIFT (8U)
-/*! DIGIMODE - Select Digital mode.
- * 0b0..Disable digital mode. Digital input set to 0.
- * 0b1..Enable Digital mode. Digital input is enabled.
- */
-#define IOCON_PIO_DIGIMODE(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_DIGIMODE_SHIFT)) & IOCON_PIO_DIGIMODE_MASK)
-#define IOCON_PIO_OD_MASK (0x200U)
-#define IOCON_PIO_OD_SHIFT (9U)
-/*! OD - Controls open-drain mode in standard GPIO mode (EGP = 1). This bit has no effect in I2C mode (EGP=0).
- * 0b0..Normal. Normal push-pull output
- * 0b1..Open-drain. Simulated open-drain output (high drive disabled).
- */
-#define IOCON_PIO_OD(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_OD_SHIFT)) & IOCON_PIO_OD_MASK)
-#define IOCON_PIO_ASW_MASK (0x400U)
-#define IOCON_PIO_ASW_SHIFT (10U)
-/*! ASW - Analog switch input control.
- * 0b0..For pins PIO0_9, PIO0_11, PIO0_12, PIO0_15, PIO0_18, PIO0_31, PIO1_0 and PIO1_9, analog switch is closed
- * (enabled). For the other pins, analog switch is open (disabled).
- * 0b1..For all pins except PIO0_9, PIO0_11, PIO0_12, PIO0_15, PIO0_18, PIO0_31, PIO1_0 and PIO1_9 analog switch is closed (enabled)
- */
-#define IOCON_PIO_ASW(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_ASW_SHIFT)) & IOCON_PIO_ASW_MASK)
-#define IOCON_PIO_SSEL_MASK (0x800U)
-#define IOCON_PIO_SSEL_SHIFT (11U)
-/*! SSEL - Supply Selection bit.
- * 0b0..3V3 Signaling in I2C Mode.
- * 0b1..1V8 Signaling in I2C Mode.
- */
-#define IOCON_PIO_SSEL(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_SSEL_SHIFT)) & IOCON_PIO_SSEL_MASK)
-#define IOCON_PIO_FILTEROFF_MASK (0x1000U)
-#define IOCON_PIO_FILTEROFF_SHIFT (12U)
-/*! FILTEROFF - Controls input glitch filter.
- * 0b0..Filter enabled.
- * 0b1..Filter disabled.
- */
-#define IOCON_PIO_FILTEROFF(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_FILTEROFF_SHIFT)) & IOCON_PIO_FILTEROFF_MASK)
-#define IOCON_PIO_ECS_MASK (0x2000U)
-#define IOCON_PIO_ECS_SHIFT (13U)
-/*! ECS - Pull-up current source enable in I2C mode.
- * 0b1..Enabled. Pull resistor is conencted.
- * 0b0..Disabled. IO is in open drain cell.
- */
-#define IOCON_PIO_ECS(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_ECS_SHIFT)) & IOCON_PIO_ECS_MASK)
-#define IOCON_PIO_EGP_MASK (0x4000U)
-#define IOCON_PIO_EGP_SHIFT (14U)
-/*! EGP - Switch between GPIO mode and I2C mode.
- * 0b0..I2C mode.
- * 0b1..GPIO mode.
- */
-#define IOCON_PIO_EGP(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_EGP_SHIFT)) & IOCON_PIO_EGP_MASK)
-#define IOCON_PIO_I2CFILTER_MASK (0x8000U)
-#define IOCON_PIO_I2CFILTER_SHIFT (15U)
-/*! I2CFILTER - Configures I2C features for standard mode, fast mode, and Fast Mode Plus operation and High-Speed mode operation.
- * 0b0..I2C 50 ns glitch filter enabled. Typically used for Standard-mode, Fast-mode and Fast-mode Plus I2C.
- * 0b1..I2C 10 ns glitch filter enabled. Typically used for High-speed mode I2C.
- */
-#define IOCON_PIO_I2CFILTER(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_I2CFILTER_SHIFT)) & IOCON_PIO_I2CFILTER_MASK)
-/*! @} */
-
-/* The count of IOCON_PIO */
-#define IOCON_PIO_COUNT (2U)
-
-/* The count of IOCON_PIO */
-#define IOCON_PIO_COUNT2 (32U)
-
-
-/*!
- * @}
- */ /* end of group IOCON_Register_Masks */
-
-
-/* IOCON - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral IOCON base address */
- #define IOCON_BASE (0x50001000u)
- /** Peripheral IOCON base address */
- #define IOCON_BASE_NS (0x40001000u)
- /** Peripheral IOCON base pointer */
- #define IOCON ((IOCON_Type *)IOCON_BASE)
- /** Peripheral IOCON base pointer */
- #define IOCON_NS ((IOCON_Type *)IOCON_BASE_NS)
- /** Array initializer of IOCON peripheral base addresses */
- #define IOCON_BASE_ADDRS { IOCON_BASE }
- /** Array initializer of IOCON peripheral base pointers */
- #define IOCON_BASE_PTRS { IOCON }
- /** Array initializer of IOCON peripheral base addresses */
- #define IOCON_BASE_ADDRS_NS { IOCON_BASE_NS }
- /** Array initializer of IOCON peripheral base pointers */
- #define IOCON_BASE_PTRS_NS { IOCON_NS }
-#else
- /** Peripheral IOCON base address */
- #define IOCON_BASE (0x40001000u)
- /** Peripheral IOCON base pointer */
- #define IOCON ((IOCON_Type *)IOCON_BASE)
- /** Array initializer of IOCON peripheral base addresses */
- #define IOCON_BASE_ADDRS { IOCON_BASE }
- /** Array initializer of IOCON peripheral base pointers */
- #define IOCON_BASE_PTRS { IOCON }
-#endif
-
-/*!
- * @}
- */ /* end of group IOCON_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- MAILBOX Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup MAILBOX_Peripheral_Access_Layer MAILBOX Peripheral Access Layer
- * @{
- */
-
-/** MAILBOX - Register Layout Typedef */
-typedef struct {
- struct { /* offset: 0x0, array step: 0x10 */
- __IO uint32_t IRQ; /**< Interrupt request register for the Cortex-M0+ CPU., array offset: 0x0, array step: 0x10 */
- __O uint32_t IRQSET; /**< Set bits in IRQ0, array offset: 0x4, array step: 0x10 */
- __O uint32_t IRQCLR; /**< Clear bits in IRQ0, array offset: 0x8, array step: 0x10 */
- uint8_t RESERVED_0[4];
- } MBOXIRQ[2];
- uint8_t RESERVED_0[216];
- __IO uint32_t MUTEX; /**< Mutual exclusion register[1], offset: 0xF8 */
-} MAILBOX_Type;
-
-/* ----------------------------------------------------------------------------
- -- MAILBOX Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup MAILBOX_Register_Masks MAILBOX Register Masks
- * @{
- */
-
-/*! @name MBOXIRQ_IRQ - Interrupt request register for the Cortex-M0+ CPU. */
-/*! @{ */
-#define MAILBOX_MBOXIRQ_IRQ_INTREQ_MASK (0xFFFFFFFFU)
-#define MAILBOX_MBOXIRQ_IRQ_INTREQ_SHIFT (0U)
-/*! INTREQ - If any bit is set, an interrupt request is sent to the Cortex-M0+ interrupt controller.
- */
-#define MAILBOX_MBOXIRQ_IRQ_INTREQ(x) (((uint32_t)(((uint32_t)(x)) << MAILBOX_MBOXIRQ_IRQ_INTREQ_SHIFT)) & MAILBOX_MBOXIRQ_IRQ_INTREQ_MASK)
-/*! @} */
-
-/* The count of MAILBOX_MBOXIRQ_IRQ */
-#define MAILBOX_MBOXIRQ_IRQ_COUNT (2U)
-
-/*! @name MBOXIRQ_IRQSET - Set bits in IRQ0 */
-/*! @{ */
-#define MAILBOX_MBOXIRQ_IRQSET_INTREQSET_MASK (0xFFFFFFFFU)
-#define MAILBOX_MBOXIRQ_IRQSET_INTREQSET_SHIFT (0U)
-/*! INTREQSET - Writing 1 sets the corresponding bit in the IRQ0 register.
- */
-#define MAILBOX_MBOXIRQ_IRQSET_INTREQSET(x) (((uint32_t)(((uint32_t)(x)) << MAILBOX_MBOXIRQ_IRQSET_INTREQSET_SHIFT)) & MAILBOX_MBOXIRQ_IRQSET_INTREQSET_MASK)
-/*! @} */
-
-/* The count of MAILBOX_MBOXIRQ_IRQSET */
-#define MAILBOX_MBOXIRQ_IRQSET_COUNT (2U)
-
-/*! @name MBOXIRQ_IRQCLR - Clear bits in IRQ0 */
-/*! @{ */
-#define MAILBOX_MBOXIRQ_IRQCLR_INTREQCLR_MASK (0xFFFFFFFFU)
-#define MAILBOX_MBOXIRQ_IRQCLR_INTREQCLR_SHIFT (0U)
-/*! INTREQCLR - Writing 1 clears the corresponding bit in the IRQ0 register.
- */
-#define MAILBOX_MBOXIRQ_IRQCLR_INTREQCLR(x) (((uint32_t)(((uint32_t)(x)) << MAILBOX_MBOXIRQ_IRQCLR_INTREQCLR_SHIFT)) & MAILBOX_MBOXIRQ_IRQCLR_INTREQCLR_MASK)
-/*! @} */
-
-/* The count of MAILBOX_MBOXIRQ_IRQCLR */
-#define MAILBOX_MBOXIRQ_IRQCLR_COUNT (2U)
-
-/*! @name MUTEX - Mutual exclusion register[1] */
-/*! @{ */
-#define MAILBOX_MUTEX_EX_MASK (0x1U)
-#define MAILBOX_MUTEX_EX_SHIFT (0U)
-/*! EX - Cleared when read, set when written. See usage description above.
- */
-#define MAILBOX_MUTEX_EX(x) (((uint32_t)(((uint32_t)(x)) << MAILBOX_MUTEX_EX_SHIFT)) & MAILBOX_MUTEX_EX_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group MAILBOX_Register_Masks */
-
-
-/* MAILBOX - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral MAILBOX base address */
- #define MAILBOX_BASE (0x5008B000u)
- /** Peripheral MAILBOX base address */
- #define MAILBOX_BASE_NS (0x4008B000u)
- /** Peripheral MAILBOX base pointer */
- #define MAILBOX ((MAILBOX_Type *)MAILBOX_BASE)
- /** Peripheral MAILBOX base pointer */
- #define MAILBOX_NS ((MAILBOX_Type *)MAILBOX_BASE_NS)
- /** Array initializer of MAILBOX peripheral base addresses */
- #define MAILBOX_BASE_ADDRS { MAILBOX_BASE }
- /** Array initializer of MAILBOX peripheral base pointers */
- #define MAILBOX_BASE_PTRS { MAILBOX }
- /** Array initializer of MAILBOX peripheral base addresses */
- #define MAILBOX_BASE_ADDRS_NS { MAILBOX_BASE_NS }
- /** Array initializer of MAILBOX peripheral base pointers */
- #define MAILBOX_BASE_PTRS_NS { MAILBOX_NS }
-#else
- /** Peripheral MAILBOX base address */
- #define MAILBOX_BASE (0x4008B000u)
- /** Peripheral MAILBOX base pointer */
- #define MAILBOX ((MAILBOX_Type *)MAILBOX_BASE)
- /** Array initializer of MAILBOX peripheral base addresses */
- #define MAILBOX_BASE_ADDRS { MAILBOX_BASE }
- /** Array initializer of MAILBOX peripheral base pointers */
- #define MAILBOX_BASE_PTRS { MAILBOX }
-#endif
-/** Interrupt vectors for the MAILBOX peripheral type */
-#define MAILBOX_IRQS { MAILBOX_IRQn }
-
-/*!
- * @}
- */ /* end of group MAILBOX_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- MRT Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup MRT_Peripheral_Access_Layer MRT Peripheral Access Layer
- * @{
- */
-
-/** MRT - Register Layout Typedef */
-typedef struct {
- struct { /* offset: 0x0, array step: 0x10 */
- __IO uint32_t INTVAL; /**< MRT Time interval value register. This value is loaded into the TIMER register., array offset: 0x0, array step: 0x10 */
- __I uint32_t TIMER; /**< MRT Timer register. This register reads the value of the down-counter., array offset: 0x4, array step: 0x10 */
- __IO uint32_t CTRL; /**< MRT Control register. This register controls the MRT modes., array offset: 0x8, array step: 0x10 */
- __IO uint32_t STAT; /**< MRT Status register., array offset: 0xC, array step: 0x10 */
- } CHANNEL[4];
- uint8_t RESERVED_0[176];
- __IO uint32_t MODCFG; /**< Module Configuration register. This register provides information about this particular MRT instance, and allows choosing an overall mode for the idle channel feature., offset: 0xF0 */
- __I uint32_t IDLE_CH; /**< Idle channel register. This register returns the number of the first idle channel., offset: 0xF4 */
- __IO uint32_t IRQ_FLAG; /**< Global interrupt flag register, offset: 0xF8 */
-} MRT_Type;
-
-/* ----------------------------------------------------------------------------
- -- MRT Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup MRT_Register_Masks MRT Register Masks
- * @{
- */
-
-/*! @name CHANNEL_INTVAL - MRT Time interval value register. This value is loaded into the TIMER register. */
-/*! @{ */
-#define MRT_CHANNEL_INTVAL_IVALUE_MASK (0xFFFFFFU)
-#define MRT_CHANNEL_INTVAL_IVALUE_SHIFT (0U)
-/*! IVALUE - Time interval load value. This value is loaded into the TIMERn register and the MRT
- * channel n starts counting down from IVALUE -1. If the timer is idle, writing a non-zero value to
- * this bit field starts the timer immediately. If the timer is running, writing a zero to this
- * bit field does the following: If LOAD = 1, the timer stops immediately. If LOAD = 0, the timer
- * stops at the end of the time interval.
- */
-#define MRT_CHANNEL_INTVAL_IVALUE(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_INTVAL_IVALUE_SHIFT)) & MRT_CHANNEL_INTVAL_IVALUE_MASK)
-#define MRT_CHANNEL_INTVAL_LOAD_MASK (0x80000000U)
-#define MRT_CHANNEL_INTVAL_LOAD_SHIFT (31U)
-/*! LOAD - Determines how the timer interval value IVALUE -1 is loaded into the TIMERn register.
- * This bit is write-only. Reading this bit always returns 0.
- * 0b0..No force load. The load from the INTVALn register to the TIMERn register is processed at the end of the
- * time interval if the repeat mode is selected.
- * 0b1..Force load. The INTVALn interval value IVALUE -1 is immediately loaded into the TIMERn register while TIMERn is running.
- */
-#define MRT_CHANNEL_INTVAL_LOAD(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_INTVAL_LOAD_SHIFT)) & MRT_CHANNEL_INTVAL_LOAD_MASK)
-/*! @} */
-
-/* The count of MRT_CHANNEL_INTVAL */
-#define MRT_CHANNEL_INTVAL_COUNT (4U)
-
-/*! @name CHANNEL_TIMER - MRT Timer register. This register reads the value of the down-counter. */
-/*! @{ */
-#define MRT_CHANNEL_TIMER_VALUE_MASK (0xFFFFFFU)
-#define MRT_CHANNEL_TIMER_VALUE_SHIFT (0U)
-/*! VALUE - Holds the current timer value of the down-counter. The initial value of the TIMERn
- * register is loaded as IVALUE - 1 from the INTVALn register either at the end of the time interval
- * or immediately in the following cases: INTVALn register is updated in the idle state. INTVALn
- * register is updated with LOAD = 1. When the timer is in idle state, reading this bit fields
- * returns -1 (0x00FF FFFF).
- */
-#define MRT_CHANNEL_TIMER_VALUE(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_TIMER_VALUE_SHIFT)) & MRT_CHANNEL_TIMER_VALUE_MASK)
-/*! @} */
-
-/* The count of MRT_CHANNEL_TIMER */
-#define MRT_CHANNEL_TIMER_COUNT (4U)
-
-/*! @name CHANNEL_CTRL - MRT Control register. This register controls the MRT modes. */
-/*! @{ */
-#define MRT_CHANNEL_CTRL_INTEN_MASK (0x1U)
-#define MRT_CHANNEL_CTRL_INTEN_SHIFT (0U)
-/*! INTEN - Enable the TIMERn interrupt.
- * 0b0..Disabled. TIMERn interrupt is disabled.
- * 0b1..Enabled. TIMERn interrupt is enabled.
- */
-#define MRT_CHANNEL_CTRL_INTEN(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_CTRL_INTEN_SHIFT)) & MRT_CHANNEL_CTRL_INTEN_MASK)
-#define MRT_CHANNEL_CTRL_MODE_MASK (0x6U)
-#define MRT_CHANNEL_CTRL_MODE_SHIFT (1U)
-/*! MODE - Selects timer mode.
- * 0b00..Repeat interrupt mode.
- * 0b01..One-shot interrupt mode.
- * 0b10..One-shot stall mode.
- * 0b11..Reserved.
- */
-#define MRT_CHANNEL_CTRL_MODE(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_CTRL_MODE_SHIFT)) & MRT_CHANNEL_CTRL_MODE_MASK)
-/*! @} */
-
-/* The count of MRT_CHANNEL_CTRL */
-#define MRT_CHANNEL_CTRL_COUNT (4U)
-
-/*! @name CHANNEL_STAT - MRT Status register. */
-/*! @{ */
-#define MRT_CHANNEL_STAT_INTFLAG_MASK (0x1U)
-#define MRT_CHANNEL_STAT_INTFLAG_SHIFT (0U)
-/*! INTFLAG - Monitors the interrupt flag.
- * 0b0..No pending interrupt. Writing a zero is equivalent to no operation.
- * 0b1..Pending interrupt. The interrupt is pending because TIMERn has reached the end of the time interval. If
- * the INTEN bit in the CONTROLn is also set to 1, the interrupt for timer channel n and the global interrupt
- * are raised. Writing a 1 to this bit clears the interrupt request.
- */
-#define MRT_CHANNEL_STAT_INTFLAG(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_STAT_INTFLAG_SHIFT)) & MRT_CHANNEL_STAT_INTFLAG_MASK)
-#define MRT_CHANNEL_STAT_RUN_MASK (0x2U)
-#define MRT_CHANNEL_STAT_RUN_SHIFT (1U)
-/*! RUN - Indicates the state of TIMERn. This bit is read-only.
- * 0b0..Idle state. TIMERn is stopped.
- * 0b1..Running. TIMERn is running.
- */
-#define MRT_CHANNEL_STAT_RUN(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_STAT_RUN_SHIFT)) & MRT_CHANNEL_STAT_RUN_MASK)
-#define MRT_CHANNEL_STAT_INUSE_MASK (0x4U)
-#define MRT_CHANNEL_STAT_INUSE_SHIFT (2U)
-/*! INUSE - Channel In Use flag. Operating details depend on the MULTITASK bit in the MODCFG
- * register, and affects the use of IDLE_CH. See Idle channel register for details of the two operating
- * modes.
- * 0b0..This channel is not in use.
- * 0b1..This channel is in use.
- */
-#define MRT_CHANNEL_STAT_INUSE(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_STAT_INUSE_SHIFT)) & MRT_CHANNEL_STAT_INUSE_MASK)
-/*! @} */
-
-/* The count of MRT_CHANNEL_STAT */
-#define MRT_CHANNEL_STAT_COUNT (4U)
-
-/*! @name MODCFG - Module Configuration register. This register provides information about this particular MRT instance, and allows choosing an overall mode for the idle channel feature. */
-/*! @{ */
-#define MRT_MODCFG_NOC_MASK (0xFU)
-#define MRT_MODCFG_NOC_SHIFT (0U)
-/*! NOC - Identifies the number of channels in this MRT.(4 channels on this device.)
- */
-#define MRT_MODCFG_NOC(x) (((uint32_t)(((uint32_t)(x)) << MRT_MODCFG_NOC_SHIFT)) & MRT_MODCFG_NOC_MASK)
-#define MRT_MODCFG_NOB_MASK (0x1F0U)
-#define MRT_MODCFG_NOB_SHIFT (4U)
-/*! NOB - Identifies the number of timer bits in this MRT. (24 bits wide on this device.)
- */
-#define MRT_MODCFG_NOB(x) (((uint32_t)(((uint32_t)(x)) << MRT_MODCFG_NOB_SHIFT)) & MRT_MODCFG_NOB_MASK)
-#define MRT_MODCFG_MULTITASK_MASK (0x80000000U)
-#define MRT_MODCFG_MULTITASK_SHIFT (31U)
-/*! MULTITASK - Selects the operating mode for the INUSE flags and the IDLE_CH register.
- * 0b0..Hardware status mode. In this mode, the INUSE(n) flags for all channels are reset.
- * 0b1..Multi-task mode.
- */
-#define MRT_MODCFG_MULTITASK(x) (((uint32_t)(((uint32_t)(x)) << MRT_MODCFG_MULTITASK_SHIFT)) & MRT_MODCFG_MULTITASK_MASK)
-/*! @} */
-
-/*! @name IDLE_CH - Idle channel register. This register returns the number of the first idle channel. */
-/*! @{ */
-#define MRT_IDLE_CH_CHAN_MASK (0xF0U)
-#define MRT_IDLE_CH_CHAN_SHIFT (4U)
-/*! CHAN - Idle channel. Reading the CHAN bits, returns the lowest idle timer channel. The number is
- * positioned such that it can be used as an offset from the MRT base address in order to access
- * the registers for the allocated channel. If all timer channels are running, CHAN = 0xF. See
- * text above for more details.
- */
-#define MRT_IDLE_CH_CHAN(x) (((uint32_t)(((uint32_t)(x)) << MRT_IDLE_CH_CHAN_SHIFT)) & MRT_IDLE_CH_CHAN_MASK)
-/*! @} */
-
-/*! @name IRQ_FLAG - Global interrupt flag register */
-/*! @{ */
-#define MRT_IRQ_FLAG_GFLAG0_MASK (0x1U)
-#define MRT_IRQ_FLAG_GFLAG0_SHIFT (0U)
-/*! GFLAG0 - Monitors the interrupt flag of TIMER0.
- * 0b0..No pending interrupt. Writing a zero is equivalent to no operation.
- * 0b1..Pending interrupt. The interrupt is pending because TIMER0 has reached the end of the time interval. If
- * the INTEN bit in the CONTROL0 register is also set to 1, the interrupt for timer channel 0 and the global
- * interrupt are raised. Writing a 1 to this bit clears the interrupt request.
- */
-#define MRT_IRQ_FLAG_GFLAG0(x) (((uint32_t)(((uint32_t)(x)) << MRT_IRQ_FLAG_GFLAG0_SHIFT)) & MRT_IRQ_FLAG_GFLAG0_MASK)
-#define MRT_IRQ_FLAG_GFLAG1_MASK (0x2U)
-#define MRT_IRQ_FLAG_GFLAG1_SHIFT (1U)
-/*! GFLAG1 - Monitors the interrupt flag of TIMER1. See description of channel 0.
- */
-#define MRT_IRQ_FLAG_GFLAG1(x) (((uint32_t)(((uint32_t)(x)) << MRT_IRQ_FLAG_GFLAG1_SHIFT)) & MRT_IRQ_FLAG_GFLAG1_MASK)
-#define MRT_IRQ_FLAG_GFLAG2_MASK (0x4U)
-#define MRT_IRQ_FLAG_GFLAG2_SHIFT (2U)
-/*! GFLAG2 - Monitors the interrupt flag of TIMER2. See description of channel 0.
- */
-#define MRT_IRQ_FLAG_GFLAG2(x) (((uint32_t)(((uint32_t)(x)) << MRT_IRQ_FLAG_GFLAG2_SHIFT)) & MRT_IRQ_FLAG_GFLAG2_MASK)
-#define MRT_IRQ_FLAG_GFLAG3_MASK (0x8U)
-#define MRT_IRQ_FLAG_GFLAG3_SHIFT (3U)
-/*! GFLAG3 - Monitors the interrupt flag of TIMER3. See description of channel 0.
- */
-#define MRT_IRQ_FLAG_GFLAG3(x) (((uint32_t)(((uint32_t)(x)) << MRT_IRQ_FLAG_GFLAG3_SHIFT)) & MRT_IRQ_FLAG_GFLAG3_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group MRT_Register_Masks */
-
-
-/* MRT - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral MRT0 base address */
- #define MRT0_BASE (0x5000D000u)
- /** Peripheral MRT0 base address */
- #define MRT0_BASE_NS (0x4000D000u)
- /** Peripheral MRT0 base pointer */
- #define MRT0 ((MRT_Type *)MRT0_BASE)
- /** Peripheral MRT0 base pointer */
- #define MRT0_NS ((MRT_Type *)MRT0_BASE_NS)
- /** Array initializer of MRT peripheral base addresses */
- #define MRT_BASE_ADDRS { MRT0_BASE }
- /** Array initializer of MRT peripheral base pointers */
- #define MRT_BASE_PTRS { MRT0 }
- /** Array initializer of MRT peripheral base addresses */
- #define MRT_BASE_ADDRS_NS { MRT0_BASE_NS }
- /** Array initializer of MRT peripheral base pointers */
- #define MRT_BASE_PTRS_NS { MRT0_NS }
-#else
- /** Peripheral MRT0 base address */
- #define MRT0_BASE (0x4000D000u)
- /** Peripheral MRT0 base pointer */
- #define MRT0 ((MRT_Type *)MRT0_BASE)
- /** Array initializer of MRT peripheral base addresses */
- #define MRT_BASE_ADDRS { MRT0_BASE }
- /** Array initializer of MRT peripheral base pointers */
- #define MRT_BASE_PTRS { MRT0 }
-#endif
-/** Interrupt vectors for the MRT peripheral type */
-#define MRT_IRQS { MRT0_IRQn }
-
-/*!
- * @}
- */ /* end of group MRT_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- OSTIMER Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup OSTIMER_Peripheral_Access_Layer OSTIMER Peripheral Access Layer
- * @{
- */
-
-/** OSTIMER - Register Layout Typedef */
-typedef struct {
- __I uint32_t EVTIMERL; /**< EVTIMER Low Register, offset: 0x0 */
- __I uint32_t EVTIMERH; /**< EVTIMER High Register, offset: 0x4 */
- __I uint32_t CAPTURE_L; /**< Capture Low Register, offset: 0x8 */
- __I uint32_t CAPTURE_H; /**< Capture High Register, offset: 0xC */
- __IO uint32_t MATCH_L; /**< Match Low Register, offset: 0x10 */
- __IO uint32_t MATCH_H; /**< Match High Register, offset: 0x14 */
- uint8_t RESERVED_0[4];
- __IO uint32_t OSEVENT_CTRL; /**< OS_EVENT TIMER Control Register, offset: 0x1C */
-} OSTIMER_Type;
-
-/* ----------------------------------------------------------------------------
- -- OSTIMER Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup OSTIMER_Register_Masks OSTIMER Register Masks
- * @{
- */
-
-/*! @name EVTIMERL - EVTIMER Low Register */
-/*! @{ */
-#define OSTIMER_EVTIMERL_EVTIMER_COUNT_VALUE_MASK (0xFFFFFFFFU)
-#define OSTIMER_EVTIMERL_EVTIMER_COUNT_VALUE_SHIFT (0U)
-/*! EVTIMER_COUNT_VALUE - A read reflects the current value of the lower 32 bits of the 42-bits
- * EVTIMER. Note: There is only one EVTIMER, readable from all domains.
- */
-#define OSTIMER_EVTIMERL_EVTIMER_COUNT_VALUE(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_EVTIMERL_EVTIMER_COUNT_VALUE_SHIFT)) & OSTIMER_EVTIMERL_EVTIMER_COUNT_VALUE_MASK)
-/*! @} */
-
-/*! @name EVTIMERH - EVTIMER High Register */
-/*! @{ */
-#define OSTIMER_EVTIMERH_EVTIMER_COUNT_VALUE_MASK (0x3FFU)
-#define OSTIMER_EVTIMERH_EVTIMER_COUNT_VALUE_SHIFT (0U)
-/*! EVTIMER_COUNT_VALUE - A read reflects the current value of the upper 10 bits of the 42-bits
- * EVTIMER. Note there is only one EVTIMER, readable from all domains.
- */
-#define OSTIMER_EVTIMERH_EVTIMER_COUNT_VALUE(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_EVTIMERH_EVTIMER_COUNT_VALUE_SHIFT)) & OSTIMER_EVTIMERH_EVTIMER_COUNT_VALUE_MASK)
-/*! @} */
-
-/*! @name CAPTURE_L - Capture Low Register */
-/*! @{ */
-#define OSTIMER_CAPTURE_L_CAPTURE_VALUE_MASK (0xFFFFFFFFU)
-#define OSTIMER_CAPTURE_L_CAPTURE_VALUE_SHIFT (0U)
-/*! CAPTURE_VALUE - A read reflects the value of the lower 32 bits of the central 42-bits EVTIMER at
- * the time the last capture signal was generated by the CPU (using CMSIS C function "__SEV();").
- */
-#define OSTIMER_CAPTURE_L_CAPTURE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_CAPTURE_L_CAPTURE_VALUE_SHIFT)) & OSTIMER_CAPTURE_L_CAPTURE_VALUE_MASK)
-/*! @} */
-
-/*! @name CAPTURE_H - Capture High Register */
-/*! @{ */
-#define OSTIMER_CAPTURE_H_CAPTURE_VALUE_MASK (0x3FFU)
-#define OSTIMER_CAPTURE_H_CAPTURE_VALUE_SHIFT (0U)
-/*! CAPTURE_VALUE - A read reflects the value of the upper 10 bits of the central 42-bits EVTIMER at
- * the time the last capture signal was generated by the CPU (using CMSIS C function "__SEV();").
- */
-#define OSTIMER_CAPTURE_H_CAPTURE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_CAPTURE_H_CAPTURE_VALUE_SHIFT)) & OSTIMER_CAPTURE_H_CAPTURE_VALUE_MASK)
-/*! @} */
-
-/*! @name MATCH_L - Match Low Register */
-/*! @{ */
-#define OSTIMER_MATCH_L_MATCH_VALUE_MASK (0xFFFFFFFFU)
-#define OSTIMER_MATCH_L_MATCH_VALUE_SHIFT (0U)
-/*! MATCH_VALUE - The value written to the MATCH (L/H) register pair is compared against the central
- * EVTIMER. When a match occurs, an interrupt request is generated if enabled.
- */
-#define OSTIMER_MATCH_L_MATCH_VALUE(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_MATCH_L_MATCH_VALUE_SHIFT)) & OSTIMER_MATCH_L_MATCH_VALUE_MASK)
-/*! @} */
-
-/*! @name MATCH_H - Match High Register */
-/*! @{ */
-#define OSTIMER_MATCH_H_MATCH_VALUE_MASK (0x3FFU)
-#define OSTIMER_MATCH_H_MATCH_VALUE_SHIFT (0U)
-/*! MATCH_VALUE - The value written (upper 10 bits) to the MATCH (L/H) register pair is compared
- * against the central EVTIMER. When a match occurs, an interrupt request is generated if enabled.
- */
-#define OSTIMER_MATCH_H_MATCH_VALUE(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_MATCH_H_MATCH_VALUE_SHIFT)) & OSTIMER_MATCH_H_MATCH_VALUE_MASK)
-/*! @} */
-
-/*! @name OSEVENT_CTRL - OS_EVENT TIMER Control Register */
-/*! @{ */
-#define OSTIMER_OSEVENT_CTRL_OSTIMER_INTRFLAG_MASK (0x1U)
-#define OSTIMER_OSEVENT_CTRL_OSTIMER_INTRFLAG_SHIFT (0U)
-/*! OSTIMER_INTRFLAG - This bit is set when a match occurs between the central 42-bits EVTIMER and
- * the value programmed in the match-register pair. This bit is cleared by writing a '1'. Writes
- * to clear this bit are asynchronous. It should be done before a new match value is written into
- * the MATCH_L/H registers.
- */
-#define OSTIMER_OSEVENT_CTRL_OSTIMER_INTRFLAG(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_OSEVENT_CTRL_OSTIMER_INTRFLAG_SHIFT)) & OSTIMER_OSEVENT_CTRL_OSTIMER_INTRFLAG_MASK)
-#define OSTIMER_OSEVENT_CTRL_OSTIMER_INTENA_MASK (0x2U)
-#define OSTIMER_OSEVENT_CTRL_OSTIMER_INTENA_SHIFT (1U)
-/*! OSTIMER_INTENA - When this bit is '1' an interrupt/wakeup request to the domain processor will
- * be asserted when the OSTIMER_INTR flag is set. When this bit is '0', interrupt/wakeup requests
- * due to the OSTIMER_INTR flag are blocked.
- */
-#define OSTIMER_OSEVENT_CTRL_OSTIMER_INTENA(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_OSEVENT_CTRL_OSTIMER_INTENA_SHIFT)) & OSTIMER_OSEVENT_CTRL_OSTIMER_INTENA_MASK)
-#define OSTIMER_OSEVENT_CTRL_MATCH_WR_RDY_MASK (0x4U)
-#define OSTIMER_OSEVENT_CTRL_MATCH_WR_RDY_SHIFT (2U)
-/*! MATCH_WR_RDY - This bit will be low when it is safe to write to reload the Match Registers. In
- * typical applications it should not be necessary to test this bit. [1]
- */
-#define OSTIMER_OSEVENT_CTRL_MATCH_WR_RDY(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_OSEVENT_CTRL_MATCH_WR_RDY_SHIFT)) & OSTIMER_OSEVENT_CTRL_MATCH_WR_RDY_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group OSTIMER_Register_Masks */
-
-
-/* OSTIMER - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral OSTIMER base address */
- #define OSTIMER_BASE (0x5002D000u)
- /** Peripheral OSTIMER base address */
- #define OSTIMER_BASE_NS (0x4002D000u)
- /** Peripheral OSTIMER base pointer */
- #define OSTIMER ((OSTIMER_Type *)OSTIMER_BASE)
- /** Peripheral OSTIMER base pointer */
- #define OSTIMER_NS ((OSTIMER_Type *)OSTIMER_BASE_NS)
- /** Array initializer of OSTIMER peripheral base addresses */
- #define OSTIMER_BASE_ADDRS { OSTIMER_BASE }
- /** Array initializer of OSTIMER peripheral base pointers */
- #define OSTIMER_BASE_PTRS { OSTIMER }
- /** Array initializer of OSTIMER peripheral base addresses */
- #define OSTIMER_BASE_ADDRS_NS { OSTIMER_BASE_NS }
- /** Array initializer of OSTIMER peripheral base pointers */
- #define OSTIMER_BASE_PTRS_NS { OSTIMER_NS }
-#else
- /** Peripheral OSTIMER base address */
- #define OSTIMER_BASE (0x4002D000u)
- /** Peripheral OSTIMER base pointer */
- #define OSTIMER ((OSTIMER_Type *)OSTIMER_BASE)
- /** Array initializer of OSTIMER peripheral base addresses */
- #define OSTIMER_BASE_ADDRS { OSTIMER_BASE }
- /** Array initializer of OSTIMER peripheral base pointers */
- #define OSTIMER_BASE_PTRS { OSTIMER }
-#endif
-/** Interrupt vectors for the OSTIMER peripheral type */
-#define OSTIMER_IRQS { OS_EVENT_IRQn }
-
-/*!
- * @}
- */ /* end of group OSTIMER_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- PINT Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PINT_Peripheral_Access_Layer PINT Peripheral Access Layer
- * @{
- */
-
-/** PINT - Register Layout Typedef */
-typedef struct {
- __IO uint32_t ISEL; /**< Pin Interrupt Mode register, offset: 0x0 */
- __IO uint32_t IENR; /**< Pin interrupt level or rising edge interrupt enable register, offset: 0x4 */
- __O uint32_t SIENR; /**< Pin interrupt level or rising edge interrupt set register, offset: 0x8 */
- __O uint32_t CIENR; /**< Pin interrupt level (rising edge interrupt) clear register, offset: 0xC */
- __IO uint32_t IENF; /**< Pin interrupt active level or falling edge interrupt enable register, offset: 0x10 */
- __O uint32_t SIENF; /**< Pin interrupt active level or falling edge interrupt set register, offset: 0x14 */
- __O uint32_t CIENF; /**< Pin interrupt active level or falling edge interrupt clear register, offset: 0x18 */
- __IO uint32_t RISE; /**< Pin interrupt rising edge register, offset: 0x1C */
- __IO uint32_t FALL; /**< Pin interrupt falling edge register, offset: 0x20 */
- __IO uint32_t IST; /**< Pin interrupt status register, offset: 0x24 */
- __IO uint32_t PMCTRL; /**< Pattern match interrupt control register, offset: 0x28 */
- __IO uint32_t PMSRC; /**< Pattern match interrupt bit-slice source register, offset: 0x2C */
- __IO uint32_t PMCFG; /**< Pattern match interrupt bit slice configuration register, offset: 0x30 */
-} PINT_Type;
-
-/* ----------------------------------------------------------------------------
- -- PINT Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PINT_Register_Masks PINT Register Masks
- * @{
- */
-
-/*! @name ISEL - Pin Interrupt Mode register */
-/*! @{ */
-#define PINT_ISEL_PMODE_MASK (0xFFU)
-#define PINT_ISEL_PMODE_SHIFT (0U)
-/*! PMODE - Selects the interrupt mode for each pin interrupt. Bit n configures the pin interrupt
- * selected in PINTSELn. 0 = Edge sensitive 1 = Level sensitive
- */
-#define PINT_ISEL_PMODE(x) (((uint32_t)(((uint32_t)(x)) << PINT_ISEL_PMODE_SHIFT)) & PINT_ISEL_PMODE_MASK)
-/*! @} */
-
-/*! @name IENR - Pin interrupt level or rising edge interrupt enable register */
-/*! @{ */
-#define PINT_IENR_ENRL_MASK (0xFFU)
-#define PINT_IENR_ENRL_SHIFT (0U)
-/*! ENRL - Enables the rising edge or level interrupt for each pin interrupt. Bit n configures the
- * pin interrupt selected in PINTSELn. 0 = Disable rising edge or level interrupt. 1 = Enable
- * rising edge or level interrupt.
- */
-#define PINT_IENR_ENRL(x) (((uint32_t)(((uint32_t)(x)) << PINT_IENR_ENRL_SHIFT)) & PINT_IENR_ENRL_MASK)
-/*! @} */
-
-/*! @name SIENR - Pin interrupt level or rising edge interrupt set register */
-/*! @{ */
-#define PINT_SIENR_SETENRL_MASK (0xFFU)
-#define PINT_SIENR_SETENRL_SHIFT (0U)
-/*! SETENRL - Ones written to this address set bits in the IENR, thus enabling interrupts. Bit n
- * sets bit n in the IENR register. 0 = No operation. 1 = Enable rising edge or level interrupt.
- */
-#define PINT_SIENR_SETENRL(x) (((uint32_t)(((uint32_t)(x)) << PINT_SIENR_SETENRL_SHIFT)) & PINT_SIENR_SETENRL_MASK)
-/*! @} */
-
-/*! @name CIENR - Pin interrupt level (rising edge interrupt) clear register */
-/*! @{ */
-#define PINT_CIENR_CENRL_MASK (0xFFU)
-#define PINT_CIENR_CENRL_SHIFT (0U)
-/*! CENRL - Ones written to this address clear bits in the IENR, thus disabling the interrupts. Bit
- * n clears bit n in the IENR register. 0 = No operation. 1 = Disable rising edge or level
- * interrupt.
- */
-#define PINT_CIENR_CENRL(x) (((uint32_t)(((uint32_t)(x)) << PINT_CIENR_CENRL_SHIFT)) & PINT_CIENR_CENRL_MASK)
-/*! @} */
-
-/*! @name IENF - Pin interrupt active level or falling edge interrupt enable register */
-/*! @{ */
-#define PINT_IENF_ENAF_MASK (0xFFU)
-#define PINT_IENF_ENAF_SHIFT (0U)
-/*! ENAF - Enables the falling edge or configures the active level interrupt for each pin interrupt.
- * Bit n configures the pin interrupt selected in PINTSELn. 0 = Disable falling edge interrupt
- * or set active interrupt level LOW. 1 = Enable falling edge interrupt enabled or set active
- * interrupt level HIGH.
- */
-#define PINT_IENF_ENAF(x) (((uint32_t)(((uint32_t)(x)) << PINT_IENF_ENAF_SHIFT)) & PINT_IENF_ENAF_MASK)
-/*! @} */
-
-/*! @name SIENF - Pin interrupt active level or falling edge interrupt set register */
-/*! @{ */
-#define PINT_SIENF_SETENAF_MASK (0xFFU)
-#define PINT_SIENF_SETENAF_SHIFT (0U)
-/*! SETENAF - Ones written to this address set bits in the IENF, thus enabling interrupts. Bit n
- * sets bit n in the IENF register. 0 = No operation. 1 = Select HIGH-active interrupt or enable
- * falling edge interrupt.
- */
-#define PINT_SIENF_SETENAF(x) (((uint32_t)(((uint32_t)(x)) << PINT_SIENF_SETENAF_SHIFT)) & PINT_SIENF_SETENAF_MASK)
-/*! @} */
-
-/*! @name CIENF - Pin interrupt active level or falling edge interrupt clear register */
-/*! @{ */
-#define PINT_CIENF_CENAF_MASK (0xFFU)
-#define PINT_CIENF_CENAF_SHIFT (0U)
-/*! CENAF - Ones written to this address clears bits in the IENF, thus disabling interrupts. Bit n
- * clears bit n in the IENF register. 0 = No operation. 1 = LOW-active interrupt selected or
- * falling edge interrupt disabled.
- */
-#define PINT_CIENF_CENAF(x) (((uint32_t)(((uint32_t)(x)) << PINT_CIENF_CENAF_SHIFT)) & PINT_CIENF_CENAF_MASK)
-/*! @} */
-
-/*! @name RISE - Pin interrupt rising edge register */
-/*! @{ */
-#define PINT_RISE_RDET_MASK (0xFFU)
-#define PINT_RISE_RDET_SHIFT (0U)
-/*! RDET - Rising edge detect. Bit n detects the rising edge of the pin selected in PINTSELn. Read
- * 0: No rising edge has been detected on this pin since Reset or the last time a one was written
- * to this bit. Write 0: no operation. Read 1: a rising edge has been detected since Reset or the
- * last time a one was written to this bit. Write 1: clear rising edge detection for this pin.
- */
-#define PINT_RISE_RDET(x) (((uint32_t)(((uint32_t)(x)) << PINT_RISE_RDET_SHIFT)) & PINT_RISE_RDET_MASK)
-/*! @} */
-
-/*! @name FALL - Pin interrupt falling edge register */
-/*! @{ */
-#define PINT_FALL_FDET_MASK (0xFFU)
-#define PINT_FALL_FDET_SHIFT (0U)
-/*! FDET - Falling edge detect. Bit n detects the falling edge of the pin selected in PINTSELn. Read
- * 0: No falling edge has been detected on this pin since Reset or the last time a one was
- * written to this bit. Write 0: no operation. Read 1: a falling edge has been detected since Reset or
- * the last time a one was written to this bit. Write 1: clear falling edge detection for this
- * pin.
- */
-#define PINT_FALL_FDET(x) (((uint32_t)(((uint32_t)(x)) << PINT_FALL_FDET_SHIFT)) & PINT_FALL_FDET_MASK)
-/*! @} */
-
-/*! @name IST - Pin interrupt status register */
-/*! @{ */
-#define PINT_IST_PSTAT_MASK (0xFFU)
-#define PINT_IST_PSTAT_SHIFT (0U)
-/*! PSTAT - Pin interrupt status. Bit n returns the status, clears the edge interrupt, or inverts
- * the active level of the pin selected in PINTSELn. Read 0: interrupt is not being requested for
- * this interrupt pin. Write 0: no operation. Read 1: interrupt is being requested for this
- * interrupt pin. Write 1 (edge-sensitive): clear rising- and falling-edge detection for this pin.
- * Write 1 (level-sensitive): switch the active level for this pin (in the IENF register).
- */
-#define PINT_IST_PSTAT(x) (((uint32_t)(((uint32_t)(x)) << PINT_IST_PSTAT_SHIFT)) & PINT_IST_PSTAT_MASK)
-/*! @} */
-
-/*! @name PMCTRL - Pattern match interrupt control register */
-/*! @{ */
-#define PINT_PMCTRL_SEL_PMATCH_MASK (0x1U)
-#define PINT_PMCTRL_SEL_PMATCH_SHIFT (0U)
-/*! SEL_PMATCH - Specifies whether the 8 pin interrupts are controlled by the pin interrupt function or by the pattern match function.
- * 0b0..Pin interrupt. Interrupts are driven in response to the standard pin interrupt function.
- * 0b1..Pattern match. Interrupts are driven in response to pattern matches.
- */
-#define PINT_PMCTRL_SEL_PMATCH(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCTRL_SEL_PMATCH_SHIFT)) & PINT_PMCTRL_SEL_PMATCH_MASK)
-#define PINT_PMCTRL_ENA_RXEV_MASK (0x2U)
-#define PINT_PMCTRL_ENA_RXEV_SHIFT (1U)
-/*! ENA_RXEV - Enables the RXEV output to the CPU and/or to a GPIO output when the specified boolean expression evaluates to true.
- * 0b0..Disabled. RXEV output to the CPU is disabled.
- * 0b1..Enabled. RXEV output to the CPU is enabled.
- */
-#define PINT_PMCTRL_ENA_RXEV(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCTRL_ENA_RXEV_SHIFT)) & PINT_PMCTRL_ENA_RXEV_MASK)
-#define PINT_PMCTRL_PMAT_MASK (0xFF000000U)
-#define PINT_PMCTRL_PMAT_SHIFT (24U)
-/*! PMAT - This field displays the current state of pattern matches. A 1 in any bit of this field
- * indicates that the corresponding product term is matched by the current state of the appropriate
- * inputs.
- */
-#define PINT_PMCTRL_PMAT(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCTRL_PMAT_SHIFT)) & PINT_PMCTRL_PMAT_MASK)
-/*! @} */
-
-/*! @name PMSRC - Pattern match interrupt bit-slice source register */
-/*! @{ */
-#define PINT_PMSRC_SRC0_MASK (0x700U)
-#define PINT_PMSRC_SRC0_SHIFT (8U)
-/*! SRC0 - Selects the input source for bit slice 0
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 0.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 0.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 0.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 0.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 0.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 0.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 0.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 0.
- */
-#define PINT_PMSRC_SRC0(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC0_SHIFT)) & PINT_PMSRC_SRC0_MASK)
-#define PINT_PMSRC_SRC1_MASK (0x3800U)
-#define PINT_PMSRC_SRC1_SHIFT (11U)
-/*! SRC1 - Selects the input source for bit slice 1
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 1.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 1.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 1.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 1.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 1.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 1.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 1.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 1.
- */
-#define PINT_PMSRC_SRC1(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC1_SHIFT)) & PINT_PMSRC_SRC1_MASK)
-#define PINT_PMSRC_SRC2_MASK (0x1C000U)
-#define PINT_PMSRC_SRC2_SHIFT (14U)
-/*! SRC2 - Selects the input source for bit slice 2
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 2.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 2.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 2.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 2.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 2.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 2.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 2.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 2.
- */
-#define PINT_PMSRC_SRC2(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC2_SHIFT)) & PINT_PMSRC_SRC2_MASK)
-#define PINT_PMSRC_SRC3_MASK (0xE0000U)
-#define PINT_PMSRC_SRC3_SHIFT (17U)
-/*! SRC3 - Selects the input source for bit slice 3
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 3.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 3.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 3.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 3.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 3.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 3.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 3.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 3.
- */
-#define PINT_PMSRC_SRC3(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC3_SHIFT)) & PINT_PMSRC_SRC3_MASK)
-#define PINT_PMSRC_SRC4_MASK (0x700000U)
-#define PINT_PMSRC_SRC4_SHIFT (20U)
-/*! SRC4 - Selects the input source for bit slice 4
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 4.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 4.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 4.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 4.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 4.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 4.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 4.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 4.
- */
-#define PINT_PMSRC_SRC4(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC4_SHIFT)) & PINT_PMSRC_SRC4_MASK)
-#define PINT_PMSRC_SRC5_MASK (0x3800000U)
-#define PINT_PMSRC_SRC5_SHIFT (23U)
-/*! SRC5 - Selects the input source for bit slice 5
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 5.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 5.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 5.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 5.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 5.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 5.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 5.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 5.
- */
-#define PINT_PMSRC_SRC5(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC5_SHIFT)) & PINT_PMSRC_SRC5_MASK)
-#define PINT_PMSRC_SRC6_MASK (0x1C000000U)
-#define PINT_PMSRC_SRC6_SHIFT (26U)
-/*! SRC6 - Selects the input source for bit slice 6
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 6.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 6.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 6.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 6.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 6.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 6.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 6.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 6.
- */
-#define PINT_PMSRC_SRC6(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC6_SHIFT)) & PINT_PMSRC_SRC6_MASK)
-#define PINT_PMSRC_SRC7_MASK (0xE0000000U)
-#define PINT_PMSRC_SRC7_SHIFT (29U)
-/*! SRC7 - Selects the input source for bit slice 7
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 7.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 7.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 7.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 7.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 7.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 7.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 7.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 7.
- */
-#define PINT_PMSRC_SRC7(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC7_SHIFT)) & PINT_PMSRC_SRC7_MASK)
-/*! @} */
-
-/*! @name PMCFG - Pattern match interrupt bit slice configuration register */
-/*! @{ */
-#define PINT_PMCFG_PROD_ENDPTS0_MASK (0x1U)
-#define PINT_PMCFG_PROD_ENDPTS0_SHIFT (0U)
-/*! PROD_ENDPTS0 - Determines whether slice 0 is an endpoint.
- * 0b0..No effect. Slice 0 is not an endpoint.
- * 0b1..endpoint. Slice 0 is the endpoint of a product term (minterm). Pin interrupt 0 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS0(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS0_SHIFT)) & PINT_PMCFG_PROD_ENDPTS0_MASK)
-#define PINT_PMCFG_PROD_ENDPTS1_MASK (0x2U)
-#define PINT_PMCFG_PROD_ENDPTS1_SHIFT (1U)
-/*! PROD_ENDPTS1 - Determines whether slice 1 is an endpoint.
- * 0b0..No effect. Slice 1 is not an endpoint.
- * 0b1..endpoint. Slice 1 is the endpoint of a product term (minterm). Pin interrupt 1 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS1(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS1_SHIFT)) & PINT_PMCFG_PROD_ENDPTS1_MASK)
-#define PINT_PMCFG_PROD_ENDPTS2_MASK (0x4U)
-#define PINT_PMCFG_PROD_ENDPTS2_SHIFT (2U)
-/*! PROD_ENDPTS2 - Determines whether slice 2 is an endpoint.
- * 0b0..No effect. Slice 2 is not an endpoint.
- * 0b1..endpoint. Slice 2 is the endpoint of a product term (minterm). Pin interrupt 2 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS2(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS2_SHIFT)) & PINT_PMCFG_PROD_ENDPTS2_MASK)
-#define PINT_PMCFG_PROD_ENDPTS3_MASK (0x8U)
-#define PINT_PMCFG_PROD_ENDPTS3_SHIFT (3U)
-/*! PROD_ENDPTS3 - Determines whether slice 3 is an endpoint.
- * 0b0..No effect. Slice 3 is not an endpoint.
- * 0b1..endpoint. Slice 3 is the endpoint of a product term (minterm). Pin interrupt 3 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS3(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS3_SHIFT)) & PINT_PMCFG_PROD_ENDPTS3_MASK)
-#define PINT_PMCFG_PROD_ENDPTS4_MASK (0x10U)
-#define PINT_PMCFG_PROD_ENDPTS4_SHIFT (4U)
-/*! PROD_ENDPTS4 - Determines whether slice 4 is an endpoint.
- * 0b0..No effect. Slice 4 is not an endpoint.
- * 0b1..endpoint. Slice 4 is the endpoint of a product term (minterm). Pin interrupt 4 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS4(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS4_SHIFT)) & PINT_PMCFG_PROD_ENDPTS4_MASK)
-#define PINT_PMCFG_PROD_ENDPTS5_MASK (0x20U)
-#define PINT_PMCFG_PROD_ENDPTS5_SHIFT (5U)
-/*! PROD_ENDPTS5 - Determines whether slice 5 is an endpoint.
- * 0b0..No effect. Slice 5 is not an endpoint.
- * 0b1..endpoint. Slice 5 is the endpoint of a product term (minterm). Pin interrupt 5 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS5(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS5_SHIFT)) & PINT_PMCFG_PROD_ENDPTS5_MASK)
-#define PINT_PMCFG_PROD_ENDPTS6_MASK (0x40U)
-#define PINT_PMCFG_PROD_ENDPTS6_SHIFT (6U)
-/*! PROD_ENDPTS6 - Determines whether slice 6 is an endpoint.
- * 0b0..No effect. Slice 6 is not an endpoint.
- * 0b1..endpoint. Slice 6 is the endpoint of a product term (minterm). Pin interrupt 6 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS6(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS6_SHIFT)) & PINT_PMCFG_PROD_ENDPTS6_MASK)
-#define PINT_PMCFG_CFG0_MASK (0x700U)
-#define PINT_PMCFG_CFG0_SHIFT (8U)
-/*! CFG0 - Specifies the match contribution condition for bit slice 0.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG0(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG0_SHIFT)) & PINT_PMCFG_CFG0_MASK)
-#define PINT_PMCFG_CFG1_MASK (0x3800U)
-#define PINT_PMCFG_CFG1_SHIFT (11U)
-/*! CFG1 - Specifies the match contribution condition for bit slice 1.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG1(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG1_SHIFT)) & PINT_PMCFG_CFG1_MASK)
-#define PINT_PMCFG_CFG2_MASK (0x1C000U)
-#define PINT_PMCFG_CFG2_SHIFT (14U)
-/*! CFG2 - Specifies the match contribution condition for bit slice 2.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG2(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG2_SHIFT)) & PINT_PMCFG_CFG2_MASK)
-#define PINT_PMCFG_CFG3_MASK (0xE0000U)
-#define PINT_PMCFG_CFG3_SHIFT (17U)
-/*! CFG3 - Specifies the match contribution condition for bit slice 3.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG3(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG3_SHIFT)) & PINT_PMCFG_CFG3_MASK)
-#define PINT_PMCFG_CFG4_MASK (0x700000U)
-#define PINT_PMCFG_CFG4_SHIFT (20U)
-/*! CFG4 - Specifies the match contribution condition for bit slice 4.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG4(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG4_SHIFT)) & PINT_PMCFG_CFG4_MASK)
-#define PINT_PMCFG_CFG5_MASK (0x3800000U)
-#define PINT_PMCFG_CFG5_SHIFT (23U)
-/*! CFG5 - Specifies the match contribution condition for bit slice 5.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG5(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG5_SHIFT)) & PINT_PMCFG_CFG5_MASK)
-#define PINT_PMCFG_CFG6_MASK (0x1C000000U)
-#define PINT_PMCFG_CFG6_SHIFT (26U)
-/*! CFG6 - Specifies the match contribution condition for bit slice 6.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG6(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG6_SHIFT)) & PINT_PMCFG_CFG6_MASK)
-#define PINT_PMCFG_CFG7_MASK (0xE0000000U)
-#define PINT_PMCFG_CFG7_SHIFT (29U)
-/*! CFG7 - Specifies the match contribution condition for bit slice 7.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG7(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG7_SHIFT)) & PINT_PMCFG_CFG7_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group PINT_Register_Masks */
-
-
-/* PINT - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral PINT base address */
- #define PINT_BASE (0x50004000u)
- /** Peripheral PINT base address */
- #define PINT_BASE_NS (0x40004000u)
- /** Peripheral PINT base pointer */
- #define PINT ((PINT_Type *)PINT_BASE)
- /** Peripheral PINT base pointer */
- #define PINT_NS ((PINT_Type *)PINT_BASE_NS)
- /** Peripheral SECPINT base address */
- #define SECPINT_BASE (0x50005000u)
- /** Peripheral SECPINT base address */
- #define SECPINT_BASE_NS (0x40005000u)
- /** Peripheral SECPINT base pointer */
- #define SECPINT ((PINT_Type *)SECPINT_BASE)
- /** Peripheral SECPINT base pointer */
- #define SECPINT_NS ((PINT_Type *)SECPINT_BASE_NS)
- /** Array initializer of PINT peripheral base addresses */
- #define PINT_BASE_ADDRS { PINT_BASE, SECPINT_BASE }
- /** Array initializer of PINT peripheral base pointers */
- #define PINT_BASE_PTRS { PINT, SECPINT }
- /** Array initializer of PINT peripheral base addresses */
- #define PINT_BASE_ADDRS_NS { PINT_BASE_NS, SECPINT_BASE_NS }
- /** Array initializer of PINT peripheral base pointers */
- #define PINT_BASE_PTRS_NS { PINT_NS, SECPINT_NS }
-#else
- /** Peripheral PINT base address */
- #define PINT_BASE (0x40004000u)
- /** Peripheral PINT base pointer */
- #define PINT ((PINT_Type *)PINT_BASE)
- /** Peripheral SECPINT base address */
- #define SECPINT_BASE (0x40005000u)
- /** Peripheral SECPINT base pointer */
- #define SECPINT ((PINT_Type *)SECPINT_BASE)
- /** Array initializer of PINT peripheral base addresses */
- #define PINT_BASE_ADDRS { PINT_BASE, SECPINT_BASE }
- /** Array initializer of PINT peripheral base pointers */
- #define PINT_BASE_PTRS { PINT, SECPINT }
-#endif
-/** Interrupt vectors for the PINT peripheral type */
-#define PINT_IRQS { PIN_INT0_IRQn, PIN_INT1_IRQn, PIN_INT2_IRQn, PIN_INT3_IRQn, PIN_INT4_IRQn, PIN_INT5_IRQn, PIN_INT6_IRQn, PIN_INT7_IRQn, SEC_GPIO_INT0_IRQ0_IRQn, SEC_GPIO_INT0_IRQ1_IRQn }
-
-/*!
- * @}
- */ /* end of group PINT_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- PLU Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PLU_Peripheral_Access_Layer PLU Peripheral Access Layer
- * @{
- */
-
-/** PLU - Register Layout Typedef */
-typedef struct {
- struct { /* offset: 0x0, array step: 0x20 */
- __IO uint32_t INP_MUX[5]; /**< LUTn input x MUX, array offset: 0x0, array step: index*0x20, index2*0x4 */
- uint8_t RESERVED_0[12];
- } LUT[26];
- uint8_t RESERVED_0[1216];
- __IO uint32_t LUT_TRUTH[26]; /**< Specifies the Truth Table contents for LUT0..Specifies the Truth Table contents for LUT25, array offset: 0x800, array step: 0x4 */
- uint8_t RESERVED_1[152];
- __I uint32_t OUTPUTS; /**< Provides the current state of the 8 designated PLU Outputs., offset: 0x900 */
- __IO uint32_t WAKEINT_CTRL; /**< Wakeup interrupt control for PLU, offset: 0x904 */
- uint8_t RESERVED_2[760];
- __IO uint32_t OUTPUT_MUX[8]; /**< Selects the source to be connected to PLU Output 0..Selects the source to be connected to PLU Output 7, array offset: 0xC00, array step: 0x4 */
-} PLU_Type;
-
-/* ----------------------------------------------------------------------------
- -- PLU Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PLU_Register_Masks PLU Register Masks
- * @{
- */
-
-/*! @name LUT_INP_MUX - LUTn input x MUX */
-/*! @{ */
-#define PLU_LUT_INP_MUX_LUTn_INPx_MASK (0x3FU)
-#define PLU_LUT_INP_MUX_LUTn_INPx_SHIFT (0U)
-/*! LUTn_INPx - Selects the input source to be connected to LUT25 input4. For each LUT, the slot
- * associated with the output from LUTn itself is tied low.
- * 0b000000..The PLU primary inputs 0.
- * 0b000001..The PLU primary inputs 1.
- * 0b000010..The PLU primary inputs 2.
- * 0b000011..The PLU primary inputs 3.
- * 0b000100..The PLU primary inputs 4.
- * 0b000101..The PLU primary inputs 5.
- * 0b000110..The output of LUT0.
- * 0b000111..The output of LUT1.
- * 0b001000..The output of LUT2.
- * 0b001001..The output of LUT3.
- * 0b001010..The output of LUT4.
- * 0b001011..The output of LUT5.
- * 0b001100..The output of LUT6.
- * 0b001101..The output of LUT7.
- * 0b001110..The output of LUT8.
- * 0b001111..The output of LUT9.
- * 0b010000..The output of LUT10.
- * 0b010001..The output of LUT11.
- * 0b010010..The output of LUT12.
- * 0b010011..The output of LUT13.
- * 0b010100..The output of LUT14.
- * 0b010101..The output of LUT15.
- * 0b010110..The output of LUT16.
- * 0b010111..The output of LUT17.
- * 0b011000..The output of LUT18.
- * 0b011001..The output of LUT19.
- * 0b011010..The output of LUT20.
- * 0b011011..The output of LUT21.
- * 0b011100..The output of LUT22.
- * 0b011101..The output of LUT23.
- * 0b011110..The output of LUT24.
- * 0b011111..The output of LUT25.
- * 0b100000..state(0).
- * 0b100001..state(1).
- * 0b100010..state(2).
- * 0b100011..state(3).
- */
-#define PLU_LUT_INP_MUX_LUTn_INPx(x) (((uint32_t)(((uint32_t)(x)) << PLU_LUT_INP_MUX_LUTn_INPx_SHIFT)) & PLU_LUT_INP_MUX_LUTn_INPx_MASK)
-/*! @} */
-
-/* The count of PLU_LUT_INP_MUX */
-#define PLU_LUT_INP_MUX_COUNT (26U)
-
-/* The count of PLU_LUT_INP_MUX */
-#define PLU_LUT_INP_MUX_COUNT2 (5U)
-
-/*! @name LUT_TRUTH - Specifies the Truth Table contents for LUT0..Specifies the Truth Table contents for LUT25 */
-/*! @{ */
-#define PLU_LUT_TRUTH_LUTn_TRUTH_MASK (0xFFFFFFFFU)
-#define PLU_LUT_TRUTH_LUTn_TRUTH_SHIFT (0U)
-/*! LUTn_TRUTH - Specifies the Truth Table contents for LUT25..
- */
-#define PLU_LUT_TRUTH_LUTn_TRUTH(x) (((uint32_t)(((uint32_t)(x)) << PLU_LUT_TRUTH_LUTn_TRUTH_SHIFT)) & PLU_LUT_TRUTH_LUTn_TRUTH_MASK)
-/*! @} */
-
-/* The count of PLU_LUT_TRUTH */
-#define PLU_LUT_TRUTH_COUNT (26U)
-
-/*! @name OUTPUTS - Provides the current state of the 8 designated PLU Outputs. */
-/*! @{ */
-#define PLU_OUTPUTS_OUTPUT_STATE_MASK (0xFFU)
-#define PLU_OUTPUTS_OUTPUT_STATE_SHIFT (0U)
-/*! OUTPUT_STATE - Provides the current state of the 8 designated PLU Outputs..
- */
-#define PLU_OUTPUTS_OUTPUT_STATE(x) (((uint32_t)(((uint32_t)(x)) << PLU_OUTPUTS_OUTPUT_STATE_SHIFT)) & PLU_OUTPUTS_OUTPUT_STATE_MASK)
-/*! @} */
-
-/*! @name WAKEINT_CTRL - Wakeup interrupt control for PLU */
-/*! @{ */
-#define PLU_WAKEINT_CTRL_MASK_MASK (0xFFU)
-#define PLU_WAKEINT_CTRL_MASK_SHIFT (0U)
-/*! MASK - Interrupt mask (which of the 8 PLU Outputs contribute to interrupt)
- */
-#define PLU_WAKEINT_CTRL_MASK(x) (((uint32_t)(((uint32_t)(x)) << PLU_WAKEINT_CTRL_MASK_SHIFT)) & PLU_WAKEINT_CTRL_MASK_MASK)
-#define PLU_WAKEINT_CTRL_FILTER_MODE_MASK (0x300U)
-#define PLU_WAKEINT_CTRL_FILTER_MODE_SHIFT (8U)
-/*! FILTER_MODE - control input of the PLU, add filtering for glitch.
- * 0b00..Bypass mode.
- * 0b01..Filter 1 clock period.
- * 0b10..Filter 2 clock period.
- * 0b11..Filter 3 clock period.
- */
-#define PLU_WAKEINT_CTRL_FILTER_MODE(x) (((uint32_t)(((uint32_t)(x)) << PLU_WAKEINT_CTRL_FILTER_MODE_SHIFT)) & PLU_WAKEINT_CTRL_FILTER_MODE_MASK)
-#define PLU_WAKEINT_CTRL_FILTER_CLKSEL_MASK (0xC00U)
-#define PLU_WAKEINT_CTRL_FILTER_CLKSEL_SHIFT (10U)
-/*! FILTER_CLKSEL - hclk is divided by 2**filter_clksel.
- * 0b00..Selects the 1 MHz low-power oscillator as the filter clock.
- * 0b01..Selects the 12 Mhz FRO as the filter clock.
- * 0b10..Selects a third filter clock source, if provided.
- * 0b11..Reserved.
- */
-#define PLU_WAKEINT_CTRL_FILTER_CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << PLU_WAKEINT_CTRL_FILTER_CLKSEL_SHIFT)) & PLU_WAKEINT_CTRL_FILTER_CLKSEL_MASK)
-#define PLU_WAKEINT_CTRL_LATCH_ENABLE_MASK (0x1000U)
-#define PLU_WAKEINT_CTRL_LATCH_ENABLE_SHIFT (12U)
-/*! LATCH_ENABLE - latch the interrupt , then can be cleared with next bit INTR_CLEAR
- */
-#define PLU_WAKEINT_CTRL_LATCH_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << PLU_WAKEINT_CTRL_LATCH_ENABLE_SHIFT)) & PLU_WAKEINT_CTRL_LATCH_ENABLE_MASK)
-#define PLU_WAKEINT_CTRL_INTR_CLEAR_MASK (0x2000U)
-#define PLU_WAKEINT_CTRL_INTR_CLEAR_SHIFT (13U)
-/*! INTR_CLEAR - Write to clear wakeint_latched
- */
-#define PLU_WAKEINT_CTRL_INTR_CLEAR(x) (((uint32_t)(((uint32_t)(x)) << PLU_WAKEINT_CTRL_INTR_CLEAR_SHIFT)) & PLU_WAKEINT_CTRL_INTR_CLEAR_MASK)
-/*! @} */
-
-/*! @name OUTPUT_MUX - Selects the source to be connected to PLU Output 0..Selects the source to be connected to PLU Output 7 */
-/*! @{ */
-#define PLU_OUTPUT_MUX_OUTPUTn_MASK (0x1FU)
-#define PLU_OUTPUT_MUX_OUTPUTn_SHIFT (0U)
-/*! OUTPUTn - Selects the source to be connected to PLU Output 7.
- * 0b00000..The PLU output 0.
- * 0b00001..The PLU output 1.
- * 0b00010..The PLU output 2.
- * 0b00011..The PLU output 3.
- * 0b00100..The PLU output 4.
- * 0b00101..The PLU output 5.
- * 0b00110..The PLU output 6.
- * 0b00111..The PLU output 7.
- * 0b01000..The PLU output 8.
- * 0b01001..The PLU output 9.
- * 0b01010..The PLU output 10.
- * 0b01011..The PLU output 11.
- * 0b01100..The PLU output 12.
- * 0b01101..The PLU output 13.
- * 0b01110..The PLU output 14.
- * 0b01111..The PLU output 15.
- * 0b10000..The PLU output 16.
- * 0b10001..The PLU output 17.
- * 0b10010..The PLU output 18.
- * 0b10011..The PLU output 19.
- * 0b10100..The PLU output 20.
- * 0b10101..The PLU output 21.
- * 0b10110..The PLU output 22.
- * 0b10111..The PLU output 23.
- * 0b11000..The PLU output 24.
- * 0b11001..The PLU output 25.
- * 0b11010..state(0).
- * 0b11011..state(1).
- * 0b11100..state(2).
- * 0b11101..state(3).
- */
-#define PLU_OUTPUT_MUX_OUTPUTn(x) (((uint32_t)(((uint32_t)(x)) << PLU_OUTPUT_MUX_OUTPUTn_SHIFT)) & PLU_OUTPUT_MUX_OUTPUTn_MASK)
-/*! @} */
-
-/* The count of PLU_OUTPUT_MUX */
-#define PLU_OUTPUT_MUX_COUNT (8U)
-
-
-/*!
- * @}
- */ /* end of group PLU_Register_Masks */
-
-
-/* PLU - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral PLU base address */
- #define PLU_BASE (0x5003D000u)
- /** Peripheral PLU base address */
- #define PLU_BASE_NS (0x4003D000u)
- /** Peripheral PLU base pointer */
- #define PLU ((PLU_Type *)PLU_BASE)
- /** Peripheral PLU base pointer */
- #define PLU_NS ((PLU_Type *)PLU_BASE_NS)
- /** Array initializer of PLU peripheral base addresses */
- #define PLU_BASE_ADDRS { PLU_BASE }
- /** Array initializer of PLU peripheral base pointers */
- #define PLU_BASE_PTRS { PLU }
- /** Array initializer of PLU peripheral base addresses */
- #define PLU_BASE_ADDRS_NS { PLU_BASE_NS }
- /** Array initializer of PLU peripheral base pointers */
- #define PLU_BASE_PTRS_NS { PLU_NS }
-#else
- /** Peripheral PLU base address */
- #define PLU_BASE (0x4003D000u)
- /** Peripheral PLU base pointer */
- #define PLU ((PLU_Type *)PLU_BASE)
- /** Array initializer of PLU peripheral base addresses */
- #define PLU_BASE_ADDRS { PLU_BASE }
- /** Array initializer of PLU peripheral base pointers */
- #define PLU_BASE_PTRS { PLU }
-#endif
-
-/*!
- * @}
- */ /* end of group PLU_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- PMC Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PMC_Peripheral_Access_Layer PMC Peripheral Access Layer
- * @{
- */
-
-/** PMC - Register Layout Typedef */
-typedef struct {
- uint8_t RESERVED_0[8];
- __IO uint32_t RESETCTRL; /**< Reset Control [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset], offset: 0x8 */
- uint8_t RESERVED_1[36];
- __IO uint32_t BODVBAT; /**< VBAT Brown Out Dectector (BoD) control register [Reset by: PoR, Pin Reset, Software Reset], offset: 0x30 */
- uint8_t RESERVED_2[28];
- __IO uint32_t COMP; /**< Analog Comparator control register [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset], offset: 0x50 */
- uint8_t RESERVED_3[20];
- __IO uint32_t WAKEIOCAUSE; /**< Allows to identify the Wake-up I/O source from Deep Power Down mode, offset: 0x68 */
- uint8_t RESERVED_4[8];
- __IO uint32_t STATUSCLK; /**< FRO and XTAL status register [Reset by: PoR, Brown Out Detectors Reset], offset: 0x74 */
- uint8_t RESERVED_5[12];
- __IO uint32_t AOREG1; /**< General purpose always on domain data storage [Reset by: PoR, Brown Out Detectors Reset], offset: 0x84 */
- uint8_t RESERVED_6[16];
- __IO uint32_t RTCOSC32K; /**< RTC 1 KHZ and 1 Hz clocks source control register [Reset by: PoR, Brown Out Detectors Reset], offset: 0x98 */
- __IO uint32_t OSTIMERr; /**< OS Timer control register [Reset by: PoR, Brown Out Detectors Reset], offset: 0x9C */
- uint8_t RESERVED_7[24];
- __IO uint32_t PDRUNCFG0; /**< Controls the power to various analog blocks [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset], offset: 0xB8 */
- uint8_t RESERVED_8[4];
- __O uint32_t PDRUNCFGSET0; /**< Controls the power to various analog blocks [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset], offset: 0xC0 */
- uint8_t RESERVED_9[4];
- __O uint32_t PDRUNCFGCLR0; /**< Controls the power to various analog blocks [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset], offset: 0xC8 */
-} PMC_Type;
-
-/* ----------------------------------------------------------------------------
- -- PMC Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PMC_Register_Masks PMC Register Masks
- * @{
- */
-
-/*! @name RESETCTRL - Reset Control [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset] */
-/*! @{ */
-#define PMC_RESETCTRL_DPDWAKEUPRESETENABLE_MASK (0x1U)
-#define PMC_RESETCTRL_DPDWAKEUPRESETENABLE_SHIFT (0U)
-/*! DPDWAKEUPRESETENABLE - Wake-up from DEEP POWER DOWN reset event (either from wake up I/O or RTC or OS Event Timer).
- * 0b0..Reset event from DEEP POWER DOWN mode is disable.
- * 0b1..Reset event from DEEP POWER DOWN mode is enable.
- */
-#define PMC_RESETCTRL_DPDWAKEUPRESETENABLE(x) (((uint32_t)(((uint32_t)(x)) << PMC_RESETCTRL_DPDWAKEUPRESETENABLE_SHIFT)) & PMC_RESETCTRL_DPDWAKEUPRESETENABLE_MASK)
-#define PMC_RESETCTRL_BODVBATRESETENABLE_MASK (0x2U)
-#define PMC_RESETCTRL_BODVBATRESETENABLE_SHIFT (1U)
-/*! BODVBATRESETENABLE - BOD VBAT reset enable.
- * 0b0..BOD VBAT reset is disable.
- * 0b1..BOD VBAT reset is enable.
- */
-#define PMC_RESETCTRL_BODVBATRESETENABLE(x) (((uint32_t)(((uint32_t)(x)) << PMC_RESETCTRL_BODVBATRESETENABLE_SHIFT)) & PMC_RESETCTRL_BODVBATRESETENABLE_MASK)
-#define PMC_RESETCTRL_SWRRESETENABLE_MASK (0x8U)
-#define PMC_RESETCTRL_SWRRESETENABLE_SHIFT (3U)
-/*! SWRRESETENABLE - Software reset enable.
- * 0b0..Software reset is disable.
- * 0b1..Software reset is enable.
- */
-#define PMC_RESETCTRL_SWRRESETENABLE(x) (((uint32_t)(((uint32_t)(x)) << PMC_RESETCTRL_SWRRESETENABLE_SHIFT)) & PMC_RESETCTRL_SWRRESETENABLE_MASK)
-/*! @} */
-
-/*! @name BODVBAT - VBAT Brown Out Dectector (BoD) control register [Reset by: PoR, Pin Reset, Software Reset] */
-/*! @{ */
-#define PMC_BODVBAT_TRIGLVL_MASK (0x1FU)
-#define PMC_BODVBAT_TRIGLVL_SHIFT (0U)
-/*! TRIGLVL - BoD trigger level.
- * 0b00000..1.00 V.
- * 0b00001..1.10 V.
- * 0b00010..1.20 V.
- * 0b00011..1.30 V.
- * 0b00100..1.40 V.
- * 0b00101..1.50 V.
- * 0b00110..1.60 V.
- * 0b00111..1.65 V.
- * 0b01000..1.70 V.
- * 0b01001..1.75 V.
- * 0b01010..1.80 V.
- * 0b01011..1.90 V.
- * 0b01100..2.00 V.
- * 0b01101..2.10 V.
- * 0b01110..2.20 V.
- * 0b01111..2.30 V.
- * 0b10000..2.40 V.
- * 0b10001..2.50 V.
- * 0b10010..2.60 V.
- * 0b10011..2.70 V.
- * 0b10100..2.806 V.
- * 0b10101..2.90 V.
- * 0b10110..3.00 V.
- * 0b10111..3.10 V.
- * 0b11000..3.20 V.
- * 0b11001..3.30 V.
- * 0b11010..3.30 V.
- * 0b11011..3.30 V.
- * 0b11100..3.30 V.
- * 0b11101..3.30 V.
- * 0b11110..3.30 V.
- * 0b11111..3.30 V.
- */
-#define PMC_BODVBAT_TRIGLVL(x) (((uint32_t)(((uint32_t)(x)) << PMC_BODVBAT_TRIGLVL_SHIFT)) & PMC_BODVBAT_TRIGLVL_MASK)
-#define PMC_BODVBAT_HYST_MASK (0x60U)
-#define PMC_BODVBAT_HYST_SHIFT (5U)
-/*! HYST - BoD Hysteresis control.
- * 0b00..25 mV.
- * 0b01..50 mV.
- * 0b10..75 mV.
- * 0b11..100 mV.
- */
-#define PMC_BODVBAT_HYST(x) (((uint32_t)(((uint32_t)(x)) << PMC_BODVBAT_HYST_SHIFT)) & PMC_BODVBAT_HYST_MASK)
-/*! @} */
-
-/*! @name COMP - Analog Comparator control register [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset] */
-/*! @{ */
-#define PMC_COMP_HYST_MASK (0x2U)
-#define PMC_COMP_HYST_SHIFT (1U)
-/*! HYST - Hysteris when hyst = '1'.
- * 0b0..Hysteresis is disable.
- * 0b1..Hysteresis is enable.
- */
-#define PMC_COMP_HYST(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_HYST_SHIFT)) & PMC_COMP_HYST_MASK)
-#define PMC_COMP_VREFINPUT_MASK (0x4U)
-#define PMC_COMP_VREFINPUT_SHIFT (2U)
-/*! VREFINPUT - Dedicated control bit to select between internal VREF and VDDA (for the resistive ladder).
- * 0b0..Select internal VREF.
- * 0b1..Select VDDA.
- */
-#define PMC_COMP_VREFINPUT(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_VREFINPUT_SHIFT)) & PMC_COMP_VREFINPUT_MASK)
-#define PMC_COMP_LOWPOWER_MASK (0x8U)
-#define PMC_COMP_LOWPOWER_SHIFT (3U)
-/*! LOWPOWER - Low power mode.
- * 0b0..High speed mode.
- * 0b1..Low power mode (Low speed).
- */
-#define PMC_COMP_LOWPOWER(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_LOWPOWER_SHIFT)) & PMC_COMP_LOWPOWER_MASK)
-#define PMC_COMP_PMUX_MASK (0x70U)
-#define PMC_COMP_PMUX_SHIFT (4U)
-/*! PMUX - Control word for P multiplexer:.
- * 0b000..VREF (See fiedl VREFINPUT).
- * 0b001..Pin P0_0.
- * 0b010..Pin P0_9.
- * 0b011..Pin P0_18.
- * 0b100..Pin P1_14.
- * 0b101..Pin P2_23.
- */
-#define PMC_COMP_PMUX(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_PMUX_SHIFT)) & PMC_COMP_PMUX_MASK)
-#define PMC_COMP_NMUX_MASK (0x380U)
-#define PMC_COMP_NMUX_SHIFT (7U)
-/*! NMUX - Control word for N multiplexer:.
- * 0b000..VREF (See field VREFINPUT).
- * 0b001..Pin P0_0.
- * 0b010..Pin P0_9.
- * 0b011..Pin P0_18.
- * 0b100..Pin P1_14.
- * 0b101..Pin P2_23.
- */
-#define PMC_COMP_NMUX(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_NMUX_SHIFT)) & PMC_COMP_NMUX_MASK)
-#define PMC_COMP_VREF_MASK (0x7C00U)
-#define PMC_COMP_VREF_SHIFT (10U)
-/*! VREF - Control reference voltage step, per steps of (VREFINPUT/31).
- */
-#define PMC_COMP_VREF(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_VREF_SHIFT)) & PMC_COMP_VREF_MASK)
-#define PMC_COMP_FILTERCGF_SAMPLEMODE_MASK (0x30000U)
-#define PMC_COMP_FILTERCGF_SAMPLEMODE_SHIFT (16U)
-/*! FILTERCGF_SAMPLEMODE - Filter Sample mode.
- */
-#define PMC_COMP_FILTERCGF_SAMPLEMODE(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_FILTERCGF_SAMPLEMODE_SHIFT)) & PMC_COMP_FILTERCGF_SAMPLEMODE_MASK)
-#define PMC_COMP_FILTERCGF_CLKDIV_MASK (0x1C0000U)
-#define PMC_COMP_FILTERCGF_CLKDIV_SHIFT (18U)
-/*! FILTERCGF_CLKDIV - Filter Clock div .
- */
-#define PMC_COMP_FILTERCGF_CLKDIV(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_FILTERCGF_CLKDIV_SHIFT)) & PMC_COMP_FILTERCGF_CLKDIV_MASK)
-/*! @} */
-
-/*! @name WAKEIOCAUSE - Allows to identify the Wake-up I/O source from Deep Power Down mode */
-/*! @{ */
-#define PMC_WAKEIOCAUSE_WAKEUP0_MASK (0x1U)
-#define PMC_WAKEIOCAUSE_WAKEUP0_SHIFT (0U)
-/*! WAKEUP0 - Allows to identify Wake up I/O 0 as the wake-up source from Deep Power Down mode.
- * 0b0..Last wake up from Deep Power down mode was NOT triggred by wake up I/O 0.
- * 0b1..Last wake up from Deep Power down mode was triggred by wake up I/O 0.
- */
-#define PMC_WAKEIOCAUSE_WAKEUP0(x) (((uint32_t)(((uint32_t)(x)) << PMC_WAKEIOCAUSE_WAKEUP0_SHIFT)) & PMC_WAKEIOCAUSE_WAKEUP0_MASK)
-#define PMC_WAKEIOCAUSE_WAKEUP1_MASK (0x2U)
-#define PMC_WAKEIOCAUSE_WAKEUP1_SHIFT (1U)
-/*! WAKEUP1 - Allows to identify Wake up I/O 1 as the wake-up source from Deep Power Down mode.
- * 0b0..Last wake up from Deep Power down mode was NOT triggred by wake up I/O 1.
- * 0b1..Last wake up from Deep Power down mode was triggred by wake up I/O 1.
- */
-#define PMC_WAKEIOCAUSE_WAKEUP1(x) (((uint32_t)(((uint32_t)(x)) << PMC_WAKEIOCAUSE_WAKEUP1_SHIFT)) & PMC_WAKEIOCAUSE_WAKEUP1_MASK)
-#define PMC_WAKEIOCAUSE_WAKEUP2_MASK (0x4U)
-#define PMC_WAKEIOCAUSE_WAKEUP2_SHIFT (2U)
-/*! WAKEUP2 - Allows to identify Wake up I/O 2 as the wake-up source from Deep Power Down mode.
- * 0b0..Last wake up from Deep Power down mode was NOT triggred by wake up I/O 2.
- * 0b1..Last wake up from Deep Power down mode was triggred by wake up I/O 2.
- */
-#define PMC_WAKEIOCAUSE_WAKEUP2(x) (((uint32_t)(((uint32_t)(x)) << PMC_WAKEIOCAUSE_WAKEUP2_SHIFT)) & PMC_WAKEIOCAUSE_WAKEUP2_MASK)
-#define PMC_WAKEIOCAUSE_WAKEUP3_MASK (0x8U)
-#define PMC_WAKEIOCAUSE_WAKEUP3_SHIFT (3U)
-/*! WAKEUP3 - Allows to identify Wake up I/O 3 as the wake-up source from Deep Power Down mode.
- * 0b0..Last wake up from Deep Power down mode was NOT triggred by wake up I/O 3.
- * 0b1..Last wake up from Deep Power down mode was triggred by wake up I/O 3.
- */
-#define PMC_WAKEIOCAUSE_WAKEUP3(x) (((uint32_t)(((uint32_t)(x)) << PMC_WAKEIOCAUSE_WAKEUP3_SHIFT)) & PMC_WAKEIOCAUSE_WAKEUP3_MASK)
-/*! @} */
-
-/*! @name STATUSCLK - FRO and XTAL status register [Reset by: PoR, Brown Out Detectors Reset] */
-/*! @{ */
-#define PMC_STATUSCLK_XTAL32KOK_MASK (0x1U)
-#define PMC_STATUSCLK_XTAL32KOK_SHIFT (0U)
-/*! XTAL32KOK - XTAL oscillator 32 K OK signal.
- */
-#define PMC_STATUSCLK_XTAL32KOK(x) (((uint32_t)(((uint32_t)(x)) << PMC_STATUSCLK_XTAL32KOK_SHIFT)) & PMC_STATUSCLK_XTAL32KOK_MASK)
-#define PMC_STATUSCLK_XTAL32KOSCFAILURE_MASK (0x4U)
-#define PMC_STATUSCLK_XTAL32KOSCFAILURE_SHIFT (2U)
-/*! XTAL32KOSCFAILURE - XTAL32 KHZ oscillator oscillation failure detection indicator.
- * 0b0..No oscillation failure has been detetced since the last time this bit has been cleared..
- * 0b1..At least one oscillation failure has been detetced since the last time this bit has been cleared..
- */
-#define PMC_STATUSCLK_XTAL32KOSCFAILURE(x) (((uint32_t)(((uint32_t)(x)) << PMC_STATUSCLK_XTAL32KOSCFAILURE_SHIFT)) & PMC_STATUSCLK_XTAL32KOSCFAILURE_MASK)
-/*! @} */
-
-/*! @name AOREG1 - General purpose always on domain data storage [Reset by: PoR, Brown Out Detectors Reset] */
-/*! @{ */
-#define PMC_AOREG1_POR_MASK (0x10U)
-#define PMC_AOREG1_POR_SHIFT (4U)
-/*! POR - The last chip reset was caused by a Power On Reset.
- */
-#define PMC_AOREG1_POR(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_POR_SHIFT)) & PMC_AOREG1_POR_MASK)
-#define PMC_AOREG1_PADRESET_MASK (0x20U)
-#define PMC_AOREG1_PADRESET_SHIFT (5U)
-/*! PADRESET - The last chip reset was caused by a Pin Reset.
- */
-#define PMC_AOREG1_PADRESET(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_PADRESET_SHIFT)) & PMC_AOREG1_PADRESET_MASK)
-#define PMC_AOREG1_BODRESET_MASK (0x40U)
-#define PMC_AOREG1_BODRESET_SHIFT (6U)
-/*! BODRESET - The last chip reset was caused by a Brown Out Detector (BoD), either VBAT BoD or Core Logic BoD.
- */
-#define PMC_AOREG1_BODRESET(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_BODRESET_SHIFT)) & PMC_AOREG1_BODRESET_MASK)
-#define PMC_AOREG1_SYSTEMRESET_MASK (0x80U)
-#define PMC_AOREG1_SYSTEMRESET_SHIFT (7U)
-/*! SYSTEMRESET - The last chip reset was caused by a System Reset requested by the ARM CPU.
- */
-#define PMC_AOREG1_SYSTEMRESET(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_SYSTEMRESET_SHIFT)) & PMC_AOREG1_SYSTEMRESET_MASK)
-#define PMC_AOREG1_WDTRESET_MASK (0x100U)
-#define PMC_AOREG1_WDTRESET_SHIFT (8U)
-/*! WDTRESET - The last chip reset was caused by the Watchdog Timer.
- */
-#define PMC_AOREG1_WDTRESET(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_WDTRESET_SHIFT)) & PMC_AOREG1_WDTRESET_MASK)
-#define PMC_AOREG1_SWRRESET_MASK (0x200U)
-#define PMC_AOREG1_SWRRESET_SHIFT (9U)
-/*! SWRRESET - The last chip reset was caused by a Software event.
- */
-#define PMC_AOREG1_SWRRESET(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_SWRRESET_SHIFT)) & PMC_AOREG1_SWRRESET_MASK)
-#define PMC_AOREG1_DPDRESET_WAKEUPIO_MASK (0x400U)
-#define PMC_AOREG1_DPDRESET_WAKEUPIO_SHIFT (10U)
-/*! DPDRESET_WAKEUPIO - The last chip reset was caused by a Wake-up I/O reset event during a Deep Power-Down mode.
- */
-#define PMC_AOREG1_DPDRESET_WAKEUPIO(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_DPDRESET_WAKEUPIO_SHIFT)) & PMC_AOREG1_DPDRESET_WAKEUPIO_MASK)
-#define PMC_AOREG1_DPDRESET_RTC_MASK (0x800U)
-#define PMC_AOREG1_DPDRESET_RTC_SHIFT (11U)
-/*! DPDRESET_RTC - The last chip reset was caused by an RTC (either RTC Alarm or RTC wake up) reset event during a Deep Power-Down mode.
- */
-#define PMC_AOREG1_DPDRESET_RTC(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_DPDRESET_RTC_SHIFT)) & PMC_AOREG1_DPDRESET_RTC_MASK)
-#define PMC_AOREG1_DPDRESET_OSTIMER_MASK (0x1000U)
-#define PMC_AOREG1_DPDRESET_OSTIMER_SHIFT (12U)
-/*! DPDRESET_OSTIMER - The last chip reset was caused by an OS Event Timer reset event during a Deep Power-Down mode.
- */
-#define PMC_AOREG1_DPDRESET_OSTIMER(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_DPDRESET_OSTIMER_SHIFT)) & PMC_AOREG1_DPDRESET_OSTIMER_MASK)
-#define PMC_AOREG1_BOOTERRORCOUNTER_MASK (0xF0000U)
-#define PMC_AOREG1_BOOTERRORCOUNTER_SHIFT (16U)
-/*! BOOTERRORCOUNTER - ROM Boot Fatal Error Counter.
- */
-#define PMC_AOREG1_BOOTERRORCOUNTER(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_BOOTERRORCOUNTER_SHIFT)) & PMC_AOREG1_BOOTERRORCOUNTER_MASK)
-/*! @} */
-
-/*! @name RTCOSC32K - RTC 1 KHZ and 1 Hz clocks source control register [Reset by: PoR, Brown Out Detectors Reset] */
-/*! @{ */
-#define PMC_RTCOSC32K_SEL_MASK (0x1U)
-#define PMC_RTCOSC32K_SEL_SHIFT (0U)
-/*! SEL - Select the 32K oscillator to be used in Deep Power Down Mode for the RTC (either XTAL32KHz or FRO32KHz) .
- * 0b0..FRO 32 KHz.
- * 0b1..XTAL 32KHz.
- */
-#define PMC_RTCOSC32K_SEL(x) (((uint32_t)(((uint32_t)(x)) << PMC_RTCOSC32K_SEL_SHIFT)) & PMC_RTCOSC32K_SEL_MASK)
-#define PMC_RTCOSC32K_CLK1KHZDIV_MASK (0xEU)
-#define PMC_RTCOSC32K_CLK1KHZDIV_SHIFT (1U)
-/*! CLK1KHZDIV - Actual division ratio is : 28 + CLK1KHZDIV.
- */
-#define PMC_RTCOSC32K_CLK1KHZDIV(x) (((uint32_t)(((uint32_t)(x)) << PMC_RTCOSC32K_CLK1KHZDIV_SHIFT)) & PMC_RTCOSC32K_CLK1KHZDIV_MASK)
-#define PMC_RTCOSC32K_CLK1KHZDIVUPDATEREQ_MASK (0x8000U)
-#define PMC_RTCOSC32K_CLK1KHZDIVUPDATEREQ_SHIFT (15U)
-/*! CLK1KHZDIVUPDATEREQ - RTC 1KHz clock Divider status flag.
- */
-#define PMC_RTCOSC32K_CLK1KHZDIVUPDATEREQ(x) (((uint32_t)(((uint32_t)(x)) << PMC_RTCOSC32K_CLK1KHZDIVUPDATEREQ_SHIFT)) & PMC_RTCOSC32K_CLK1KHZDIVUPDATEREQ_MASK)
-#define PMC_RTCOSC32K_CLK1HZDIV_MASK (0x7FF0000U)
-#define PMC_RTCOSC32K_CLK1HZDIV_SHIFT (16U)
-/*! CLK1HZDIV - Actual division ratio is : 31744 + CLK1HZDIV.
- */
-#define PMC_RTCOSC32K_CLK1HZDIV(x) (((uint32_t)(((uint32_t)(x)) << PMC_RTCOSC32K_CLK1HZDIV_SHIFT)) & PMC_RTCOSC32K_CLK1HZDIV_MASK)
-#define PMC_RTCOSC32K_CLK1HZDIVHALT_MASK (0x40000000U)
-#define PMC_RTCOSC32K_CLK1HZDIVHALT_SHIFT (30U)
-/*! CLK1HZDIVHALT - Halts the divider counter.
- */
-#define PMC_RTCOSC32K_CLK1HZDIVHALT(x) (((uint32_t)(((uint32_t)(x)) << PMC_RTCOSC32K_CLK1HZDIVHALT_SHIFT)) & PMC_RTCOSC32K_CLK1HZDIVHALT_MASK)
-#define PMC_RTCOSC32K_CLK1HZDIVUPDATEREQ_MASK (0x80000000U)
-#define PMC_RTCOSC32K_CLK1HZDIVUPDATEREQ_SHIFT (31U)
-/*! CLK1HZDIVUPDATEREQ - RTC 1Hz Divider status flag.
- */
-#define PMC_RTCOSC32K_CLK1HZDIVUPDATEREQ(x) (((uint32_t)(((uint32_t)(x)) << PMC_RTCOSC32K_CLK1HZDIVUPDATEREQ_SHIFT)) & PMC_RTCOSC32K_CLK1HZDIVUPDATEREQ_MASK)
-/*! @} */
-
-/*! @name OSTIMER - OS Timer control register [Reset by: PoR, Brown Out Detectors Reset] */
-/*! @{ */
-#define PMC_OSTIMER_SOFTRESET_MASK (0x1U)
-#define PMC_OSTIMER_SOFTRESET_SHIFT (0U)
-/*! SOFTRESET - Active high reset.
- */
-#define PMC_OSTIMER_SOFTRESET(x) (((uint32_t)(((uint32_t)(x)) << PMC_OSTIMER_SOFTRESET_SHIFT)) & PMC_OSTIMER_SOFTRESET_MASK)
-#define PMC_OSTIMER_CLOCKENABLE_MASK (0x2U)
-#define PMC_OSTIMER_CLOCKENABLE_SHIFT (1U)
-/*! CLOCKENABLE - Enable OSTIMER 32 KHz clock.
- */
-#define PMC_OSTIMER_CLOCKENABLE(x) (((uint32_t)(((uint32_t)(x)) << PMC_OSTIMER_CLOCKENABLE_SHIFT)) & PMC_OSTIMER_CLOCKENABLE_MASK)
-#define PMC_OSTIMER_DPDWAKEUPENABLE_MASK (0x4U)
-#define PMC_OSTIMER_DPDWAKEUPENABLE_SHIFT (2U)
-/*! DPDWAKEUPENABLE - Wake up enable in Deep Power Down mode (To be used in Enable Deep Power Down mode).
- */
-#define PMC_OSTIMER_DPDWAKEUPENABLE(x) (((uint32_t)(((uint32_t)(x)) << PMC_OSTIMER_DPDWAKEUPENABLE_SHIFT)) & PMC_OSTIMER_DPDWAKEUPENABLE_MASK)
-#define PMC_OSTIMER_OSC32KPD_MASK (0x8U)
-#define PMC_OSTIMER_OSC32KPD_SHIFT (3U)
-/*! OSC32KPD - Oscilator 32KHz (either FRO32KHz or XTAL32KHz according to RTCOSC32K.
- */
-#define PMC_OSTIMER_OSC32KPD(x) (((uint32_t)(((uint32_t)(x)) << PMC_OSTIMER_OSC32KPD_SHIFT)) & PMC_OSTIMER_OSC32KPD_MASK)
-/*! @} */
-
-/*! @name PDRUNCFG0 - Controls the power to various analog blocks [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset] */
-/*! @{ */
-#define PMC_PDRUNCFG0_PDEN_BODVBAT_MASK (0x8U)
-#define PMC_PDRUNCFG0_PDEN_BODVBAT_SHIFT (3U)
-/*! PDEN_BODVBAT - Controls power to VBAT Brown Out Detector (BOD).
- * 0b0..BOD VBAT is powered.
- * 0b1..BOD VBAT is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_BODVBAT(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_BODVBAT_SHIFT)) & PMC_PDRUNCFG0_PDEN_BODVBAT_MASK)
-#define PMC_PDRUNCFG0_PDEN_FRO32K_MASK (0x40U)
-#define PMC_PDRUNCFG0_PDEN_FRO32K_SHIFT (6U)
-/*! PDEN_FRO32K - Controls power to the Free Running Oscillator (FRO) 32 KHz.
- * 0b0..FRO32KHz is powered.
- * 0b1..FRO32KHz is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_FRO32K(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_FRO32K_SHIFT)) & PMC_PDRUNCFG0_PDEN_FRO32K_MASK)
-#define PMC_PDRUNCFG0_PDEN_XTAL32K_MASK (0x80U)
-#define PMC_PDRUNCFG0_PDEN_XTAL32K_SHIFT (7U)
-/*! PDEN_XTAL32K - Controls power to crystal 32 KHz.
- * 0b0..Crystal 32KHz is powered.
- * 0b1..Crystal 32KHz is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_XTAL32K(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_XTAL32K_SHIFT)) & PMC_PDRUNCFG0_PDEN_XTAL32K_MASK)
-#define PMC_PDRUNCFG0_PDEN_XTAL32M_MASK (0x100U)
-#define PMC_PDRUNCFG0_PDEN_XTAL32M_SHIFT (8U)
-/*! PDEN_XTAL32M - Controls power to crystal 32 MHz.
- * 0b0..Crystal 32MHz is powered.
- * 0b1..Crystal 32MHz is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_XTAL32M(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_XTAL32M_SHIFT)) & PMC_PDRUNCFG0_PDEN_XTAL32M_MASK)
-#define PMC_PDRUNCFG0_PDEN_PLL0_MASK (0x200U)
-#define PMC_PDRUNCFG0_PDEN_PLL0_SHIFT (9U)
-/*! PDEN_PLL0 - Controls power to System PLL (also refered as PLL0).
- * 0b0..PLL0 is powered.
- * 0b1..PLL0 is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_PLL0(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_PLL0_SHIFT)) & PMC_PDRUNCFG0_PDEN_PLL0_MASK)
-#define PMC_PDRUNCFG0_PDEN_PLL1_MASK (0x400U)
-#define PMC_PDRUNCFG0_PDEN_PLL1_SHIFT (10U)
-/*! PDEN_PLL1 - Controls power to USB PLL (also refered as PLL1).
- * 0b0..PLL1 is powered.
- * 0b1..PLL1 is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_PLL1(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_PLL1_SHIFT)) & PMC_PDRUNCFG0_PDEN_PLL1_MASK)
-#define PMC_PDRUNCFG0_PDEN_USBFSPHY_MASK (0x800U)
-#define PMC_PDRUNCFG0_PDEN_USBFSPHY_SHIFT (11U)
-/*! PDEN_USBFSPHY - Controls power to USB Full Speed phy.
- * 0b0..USB Full Speed phy is powered.
- * 0b1..USB Full Speed phy is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_USBFSPHY(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_USBFSPHY_SHIFT)) & PMC_PDRUNCFG0_PDEN_USBFSPHY_MASK)
-#define PMC_PDRUNCFG0_PDEN_USBHSPHY_MASK (0x1000U)
-#define PMC_PDRUNCFG0_PDEN_USBHSPHY_SHIFT (12U)
-/*! PDEN_USBHSPHY - Controls power to USB High Speed Phy.
- * 0b0..USB HS phy is powered.
- * 0b1..USB HS phy is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_USBHSPHY(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_USBHSPHY_SHIFT)) & PMC_PDRUNCFG0_PDEN_USBHSPHY_MASK)
-#define PMC_PDRUNCFG0_PDEN_COMP_MASK (0x2000U)
-#define PMC_PDRUNCFG0_PDEN_COMP_SHIFT (13U)
-/*! PDEN_COMP - Controls power to Analog Comparator.
- * 0b0..Analog Comparator is powered.
- * 0b1..Analog Comparator is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_COMP(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_COMP_SHIFT)) & PMC_PDRUNCFG0_PDEN_COMP_MASK)
-#define PMC_PDRUNCFG0_PDEN_LDOUSBHS_MASK (0x40000U)
-#define PMC_PDRUNCFG0_PDEN_LDOUSBHS_SHIFT (18U)
-/*! PDEN_LDOUSBHS - Controls power to USB high speed LDO.
- * 0b0..USB high speed LDO is powered.
- * 0b1..USB high speed LDO is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_LDOUSBHS(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_LDOUSBHS_SHIFT)) & PMC_PDRUNCFG0_PDEN_LDOUSBHS_MASK)
-#define PMC_PDRUNCFG0_PDEN_AUXBIAS_MASK (0x80000U)
-#define PMC_PDRUNCFG0_PDEN_AUXBIAS_SHIFT (19U)
-/*! PDEN_AUXBIAS - Controls power to auxiliary biasing (AUXBIAS)
- * 0b0..auxiliary biasing is powered.
- * 0b1..auxiliary biasing is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_AUXBIAS(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_AUXBIAS_SHIFT)) & PMC_PDRUNCFG0_PDEN_AUXBIAS_MASK)
-#define PMC_PDRUNCFG0_PDEN_LDOXO32M_MASK (0x100000U)
-#define PMC_PDRUNCFG0_PDEN_LDOXO32M_SHIFT (20U)
-/*! PDEN_LDOXO32M - Controls power to crystal 32 MHz LDO.
- * 0b0..crystal 32 MHz LDO is powered.
- * 0b1..crystal 32 MHz LDO is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_LDOXO32M(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_LDOXO32M_SHIFT)) & PMC_PDRUNCFG0_PDEN_LDOXO32M_MASK)
-#define PMC_PDRUNCFG0_PDEN_RNG_MASK (0x400000U)
-#define PMC_PDRUNCFG0_PDEN_RNG_SHIFT (22U)
-/*! PDEN_RNG - Controls power to all True Random Number Genetaor (TRNG) clock sources.
- * 0b0..TRNG clocks are powered.
- * 0b1..TRNG clocks are powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_RNG(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_RNG_SHIFT)) & PMC_PDRUNCFG0_PDEN_RNG_MASK)
-#define PMC_PDRUNCFG0_PDEN_PLL0_SSCG_MASK (0x800000U)
-#define PMC_PDRUNCFG0_PDEN_PLL0_SSCG_SHIFT (23U)
-/*! PDEN_PLL0_SSCG - Controls power to System PLL (PLL0) Spread Spectrum module.
- * 0b0..PLL0 Sread spectrum module is powered.
- * 0b1..PLL0 Sread spectrum module is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_PLL0_SSCG(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_PLL0_SSCG_SHIFT)) & PMC_PDRUNCFG0_PDEN_PLL0_SSCG_MASK)
-/*! @} */
-
-/*! @name PDRUNCFGSET0 - Controls the power to various analog blocks [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset] */
-/*! @{ */
-#define PMC_PDRUNCFGSET0_PDRUNCFGSET0_MASK (0xFFFFFFFFU)
-#define PMC_PDRUNCFGSET0_PDRUNCFGSET0_SHIFT (0U)
-/*! PDRUNCFGSET0 - Writing ones to this register sets the corresponding bit or bits in the PDRUNCFG0 register, if they are implemented.
- */
-#define PMC_PDRUNCFGSET0_PDRUNCFGSET0(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFGSET0_PDRUNCFGSET0_SHIFT)) & PMC_PDRUNCFGSET0_PDRUNCFGSET0_MASK)
-/*! @} */
-
-/*! @name PDRUNCFGCLR0 - Controls the power to various analog blocks [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset] */
-/*! @{ */
-#define PMC_PDRUNCFGCLR0_PDRUNCFGCLR0_MASK (0xFFFFFFFFU)
-#define PMC_PDRUNCFGCLR0_PDRUNCFGCLR0_SHIFT (0U)
-/*! PDRUNCFGCLR0 - Writing ones to this register clears the corresponding bit or bits in the PDRUNCFG0 register, if they are implemented.
- */
-#define PMC_PDRUNCFGCLR0_PDRUNCFGCLR0(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFGCLR0_PDRUNCFGCLR0_SHIFT)) & PMC_PDRUNCFGCLR0_PDRUNCFGCLR0_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group PMC_Register_Masks */
-
-
-/* PMC - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral PMC base address */
- #define PMC_BASE (0x50020000u)
- /** Peripheral PMC base address */
- #define PMC_BASE_NS (0x40020000u)
- /** Peripheral PMC base pointer */
- #define PMC ((PMC_Type *)PMC_BASE)
- /** Peripheral PMC base pointer */
- #define PMC_NS ((PMC_Type *)PMC_BASE_NS)
- /** Array initializer of PMC peripheral base addresses */
- #define PMC_BASE_ADDRS { PMC_BASE }
- /** Array initializer of PMC peripheral base pointers */
- #define PMC_BASE_PTRS { PMC }
- /** Array initializer of PMC peripheral base addresses */
- #define PMC_BASE_ADDRS_NS { PMC_BASE_NS }
- /** Array initializer of PMC peripheral base pointers */
- #define PMC_BASE_PTRS_NS { PMC_NS }
-#else
- /** Peripheral PMC base address */
- #define PMC_BASE (0x40020000u)
- /** Peripheral PMC base pointer */
- #define PMC ((PMC_Type *)PMC_BASE)
- /** Array initializer of PMC peripheral base addresses */
- #define PMC_BASE_ADDRS { PMC_BASE }
- /** Array initializer of PMC peripheral base pointers */
- #define PMC_BASE_PTRS { PMC }
-#endif
-
-/*!
- * @}
- */ /* end of group PMC_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- POWERQUAD Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup POWERQUAD_Peripheral_Access_Layer POWERQUAD Peripheral Access Layer
- * @{
- */
-
-/** POWERQUAD - Register Layout Typedef */
-typedef struct {
- __IO uint32_t OUTBASE; /**< Base address register for output region, offset: 0x0 */
- __IO uint32_t OUTFORMAT; /**< Output format, offset: 0x4 */
- __IO uint32_t TMPBASE; /**< Base address register for temp region, offset: 0x8 */
- __IO uint32_t TMPFORMAT; /**< Temp format, offset: 0xC */
- __IO uint32_t INABASE; /**< Base address register for input A region, offset: 0x10 */
- __IO uint32_t INAFORMAT; /**< Input A format, offset: 0x14 */
- __IO uint32_t INBBASE; /**< Base address register for input B region, offset: 0x18 */
- __IO uint32_t INBFORMAT; /**< Input B format, offset: 0x1C */
- uint8_t RESERVED_0[224];
- __IO uint32_t CONTROL; /**< PowerQuad Control register, offset: 0x100 */
- __IO uint32_t LENGTH; /**< Length register, offset: 0x104 */
- __IO uint32_t CPPRE; /**< Pre-scale register, offset: 0x108 */
- __IO uint32_t MISC; /**< Misc register, offset: 0x10C */
- __IO uint32_t CURSORY; /**< Cursory register, offset: 0x110 */
- uint8_t RESERVED_1[108];
- __IO uint32_t CORDIC_X; /**< Cordic input X register, offset: 0x180 */
- __IO uint32_t CORDIC_Y; /**< Cordic input Y register, offset: 0x184 */
- __IO uint32_t CORDIC_Z; /**< Cordic input Z register, offset: 0x188 */
- __IO uint32_t ERRSTAT; /**< Read/Write register where error statuses are captured (sticky), offset: 0x18C */
- __IO uint32_t INTREN; /**< INTERRUPT enable register, offset: 0x190 */
- __IO uint32_t EVENTEN; /**< Event Enable register, offset: 0x194 */
- __IO uint32_t INTRSTAT; /**< INTERRUPT STATUS register, offset: 0x198 */
- uint8_t RESERVED_2[100];
- __IO uint32_t GPREG[16]; /**< General purpose register bank N., array offset: 0x200, array step: 0x4 */
- __IO uint32_t COMPREG[8]; /**< Compute register bank, array offset: 0x240, array step: 0x4 */
-} POWERQUAD_Type;
-
-/* ----------------------------------------------------------------------------
- -- POWERQUAD Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup POWERQUAD_Register_Masks POWERQUAD Register Masks
- * @{
- */
-
-/*! @name OUTBASE - Base address register for output region */
-/*! @{ */
-#define POWERQUAD_OUTBASE_OUTBASE_MASK (0xFFFFFFFFU)
-#define POWERQUAD_OUTBASE_OUTBASE_SHIFT (0U)
-/*! outbase - Base address register for the output region
- */
-#define POWERQUAD_OUTBASE_OUTBASE(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_OUTBASE_OUTBASE_SHIFT)) & POWERQUAD_OUTBASE_OUTBASE_MASK)
-/*! @} */
-
-/*! @name OUTFORMAT - Output format */
-/*! @{ */
-#define POWERQUAD_OUTFORMAT_OUT_FORMATINT_MASK (0x3U)
-#define POWERQUAD_OUTFORMAT_OUT_FORMATINT_SHIFT (0U)
-/*! out_formatint - Output Internal format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_OUTFORMAT_OUT_FORMATINT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_OUTFORMAT_OUT_FORMATINT_SHIFT)) & POWERQUAD_OUTFORMAT_OUT_FORMATINT_MASK)
-#define POWERQUAD_OUTFORMAT_OUT_FORMATEXT_MASK (0x30U)
-#define POWERQUAD_OUTFORMAT_OUT_FORMATEXT_SHIFT (4U)
-/*! out_formatext - Output External format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_OUTFORMAT_OUT_FORMATEXT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_OUTFORMAT_OUT_FORMATEXT_SHIFT)) & POWERQUAD_OUTFORMAT_OUT_FORMATEXT_MASK)
-#define POWERQUAD_OUTFORMAT_OUT_SCALER_MASK (0xFF00U)
-#define POWERQUAD_OUTFORMAT_OUT_SCALER_SHIFT (8U)
-/*! out_scaler - Output Scaler value (for scaled 'q31' formats)
- */
-#define POWERQUAD_OUTFORMAT_OUT_SCALER(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_OUTFORMAT_OUT_SCALER_SHIFT)) & POWERQUAD_OUTFORMAT_OUT_SCALER_MASK)
-/*! @} */
-
-/*! @name TMPBASE - Base address register for temp region */
-/*! @{ */
-#define POWERQUAD_TMPBASE_TMPBASE_MASK (0xFFFFFFFFU)
-#define POWERQUAD_TMPBASE_TMPBASE_SHIFT (0U)
-/*! tmpbase - Base address register for the temporary region
- */
-#define POWERQUAD_TMPBASE_TMPBASE(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_TMPBASE_TMPBASE_SHIFT)) & POWERQUAD_TMPBASE_TMPBASE_MASK)
-/*! @} */
-
-/*! @name TMPFORMAT - Temp format */
-/*! @{ */
-#define POWERQUAD_TMPFORMAT_TMP_FORMATINT_MASK (0x3U)
-#define POWERQUAD_TMPFORMAT_TMP_FORMATINT_SHIFT (0U)
-/*! tmp_formatint - Temp Internal format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_TMPFORMAT_TMP_FORMATINT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_TMPFORMAT_TMP_FORMATINT_SHIFT)) & POWERQUAD_TMPFORMAT_TMP_FORMATINT_MASK)
-#define POWERQUAD_TMPFORMAT_TMP_FORMATEXT_MASK (0x30U)
-#define POWERQUAD_TMPFORMAT_TMP_FORMATEXT_SHIFT (4U)
-/*! tmp_formatext - Temp External format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_TMPFORMAT_TMP_FORMATEXT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_TMPFORMAT_TMP_FORMATEXT_SHIFT)) & POWERQUAD_TMPFORMAT_TMP_FORMATEXT_MASK)
-#define POWERQUAD_TMPFORMAT_TMP_SCALER_MASK (0xFF00U)
-#define POWERQUAD_TMPFORMAT_TMP_SCALER_SHIFT (8U)
-/*! tmp_scaler - Temp Scaler value (for scaled 'q31' formats)
- */
-#define POWERQUAD_TMPFORMAT_TMP_SCALER(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_TMPFORMAT_TMP_SCALER_SHIFT)) & POWERQUAD_TMPFORMAT_TMP_SCALER_MASK)
-/*! @} */
-
-/*! @name INABASE - Base address register for input A region */
-/*! @{ */
-#define POWERQUAD_INABASE_INABASE_MASK (0xFFFFFFFFU)
-#define POWERQUAD_INABASE_INABASE_SHIFT (0U)
-/*! inabase - Base address register for the input A region
- */
-#define POWERQUAD_INABASE_INABASE(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INABASE_INABASE_SHIFT)) & POWERQUAD_INABASE_INABASE_MASK)
-/*! @} */
-
-/*! @name INAFORMAT - Input A format */
-/*! @{ */
-#define POWERQUAD_INAFORMAT_INA_FORMATINT_MASK (0x3U)
-#define POWERQUAD_INAFORMAT_INA_FORMATINT_SHIFT (0U)
-/*! ina_formatint - Input A Internal format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_INAFORMAT_INA_FORMATINT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INAFORMAT_INA_FORMATINT_SHIFT)) & POWERQUAD_INAFORMAT_INA_FORMATINT_MASK)
-#define POWERQUAD_INAFORMAT_INA_FORMATEXT_MASK (0x30U)
-#define POWERQUAD_INAFORMAT_INA_FORMATEXT_SHIFT (4U)
-/*! ina_formatext - Input A External format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_INAFORMAT_INA_FORMATEXT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INAFORMAT_INA_FORMATEXT_SHIFT)) & POWERQUAD_INAFORMAT_INA_FORMATEXT_MASK)
-#define POWERQUAD_INAFORMAT_INA_SCALER_MASK (0xFF00U)
-#define POWERQUAD_INAFORMAT_INA_SCALER_SHIFT (8U)
-/*! ina_scaler - Input A Scaler value (for scaled 'q31' formats)
- */
-#define POWERQUAD_INAFORMAT_INA_SCALER(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INAFORMAT_INA_SCALER_SHIFT)) & POWERQUAD_INAFORMAT_INA_SCALER_MASK)
-/*! @} */
-
-/*! @name INBBASE - Base address register for input B region */
-/*! @{ */
-#define POWERQUAD_INBBASE_INBBASE_MASK (0xFFFFFFFFU)
-#define POWERQUAD_INBBASE_INBBASE_SHIFT (0U)
-/*! inbbase - Base address register for the input B region
- */
-#define POWERQUAD_INBBASE_INBBASE(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INBBASE_INBBASE_SHIFT)) & POWERQUAD_INBBASE_INBBASE_MASK)
-/*! @} */
-
-/*! @name INBFORMAT - Input B format */
-/*! @{ */
-#define POWERQUAD_INBFORMAT_INB_FORMATINT_MASK (0x3U)
-#define POWERQUAD_INBFORMAT_INB_FORMATINT_SHIFT (0U)
-/*! inb_formatint - Input B Internal format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_INBFORMAT_INB_FORMATINT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INBFORMAT_INB_FORMATINT_SHIFT)) & POWERQUAD_INBFORMAT_INB_FORMATINT_MASK)
-#define POWERQUAD_INBFORMAT_INB_FORMATEXT_MASK (0x30U)
-#define POWERQUAD_INBFORMAT_INB_FORMATEXT_SHIFT (4U)
-/*! inb_formatext - Input B External format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_INBFORMAT_INB_FORMATEXT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INBFORMAT_INB_FORMATEXT_SHIFT)) & POWERQUAD_INBFORMAT_INB_FORMATEXT_MASK)
-#define POWERQUAD_INBFORMAT_INB_SCALER_MASK (0xFF00U)
-#define POWERQUAD_INBFORMAT_INB_SCALER_SHIFT (8U)
-/*! inb_scaler - Input B Scaler value (for scaled 'q31' formats)
- */
-#define POWERQUAD_INBFORMAT_INB_SCALER(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INBFORMAT_INB_SCALER_SHIFT)) & POWERQUAD_INBFORMAT_INB_SCALER_MASK)
-/*! @} */
-
-/*! @name CONTROL - PowerQuad Control register */
-/*! @{ */
-#define POWERQUAD_CONTROL_DECODE_OPCODE_MASK (0xFU)
-#define POWERQUAD_CONTROL_DECODE_OPCODE_SHIFT (0U)
-/*! decode_opcode - opcode specific to decode_machine
- */
-#define POWERQUAD_CONTROL_DECODE_OPCODE(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CONTROL_DECODE_OPCODE_SHIFT)) & POWERQUAD_CONTROL_DECODE_OPCODE_MASK)
-#define POWERQUAD_CONTROL_DECODE_MACHINE_MASK (0xF0U)
-#define POWERQUAD_CONTROL_DECODE_MACHINE_SHIFT (4U)
-/*! decode_machine - 0 : Coprocessor , 1 : matrix , 2 : fft , 3 : fir , 4 : stat , 5 : cordic , 6 -15 : NA
- */
-#define POWERQUAD_CONTROL_DECODE_MACHINE(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CONTROL_DECODE_MACHINE_SHIFT)) & POWERQUAD_CONTROL_DECODE_MACHINE_MASK)
-#define POWERQUAD_CONTROL_INST_BUSY_MASK (0x80000000U)
-#define POWERQUAD_CONTROL_INST_BUSY_SHIFT (31U)
-/*! inst_busy - Instruction busy signal when high indicates processing is on
- */
-#define POWERQUAD_CONTROL_INST_BUSY(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CONTROL_INST_BUSY_SHIFT)) & POWERQUAD_CONTROL_INST_BUSY_MASK)
-/*! @} */
-
-/*! @name LENGTH - Length register */
-/*! @{ */
-#define POWERQUAD_LENGTH_INST_LENGTH_MASK (0xFFFFFFFFU)
-#define POWERQUAD_LENGTH_INST_LENGTH_SHIFT (0U)
-/*! inst_length - Length register. When FIR : fir_xlength = inst_length[15:0] , fir_tlength =
- * inst_len[31:16]. When MTX : rows_a = inst_length[4:0] , cols_a = inst_length[12:8] , cols_b =
- * inst_length[20:16]
- */
-#define POWERQUAD_LENGTH_INST_LENGTH(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_LENGTH_INST_LENGTH_SHIFT)) & POWERQUAD_LENGTH_INST_LENGTH_MASK)
-/*! @} */
-
-/*! @name CPPRE - Pre-scale register */
-/*! @{ */
-#define POWERQUAD_CPPRE_CPPRE_IN_MASK (0xFFU)
-#define POWERQUAD_CPPRE_CPPRE_IN_SHIFT (0U)
-/*! cppre_in - co-processor scaling of input
- */
-#define POWERQUAD_CPPRE_CPPRE_IN(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CPPRE_CPPRE_IN_SHIFT)) & POWERQUAD_CPPRE_CPPRE_IN_MASK)
-#define POWERQUAD_CPPRE_CPPRE_OUT_MASK (0xFF00U)
-#define POWERQUAD_CPPRE_CPPRE_OUT_SHIFT (8U)
-/*! cppre_out - co-processor fixed point output
- */
-#define POWERQUAD_CPPRE_CPPRE_OUT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CPPRE_CPPRE_OUT_SHIFT)) & POWERQUAD_CPPRE_CPPRE_OUT_MASK)
-#define POWERQUAD_CPPRE_CPPRE_SAT_MASK (0x10000U)
-#define POWERQUAD_CPPRE_CPPRE_SAT_SHIFT (16U)
-/*! cppre_sat - 1 : forces sub-32 bit saturation
- */
-#define POWERQUAD_CPPRE_CPPRE_SAT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CPPRE_CPPRE_SAT_SHIFT)) & POWERQUAD_CPPRE_CPPRE_SAT_MASK)
-#define POWERQUAD_CPPRE_CPPRE_SAT8_MASK (0x20000U)
-#define POWERQUAD_CPPRE_CPPRE_SAT8_SHIFT (17U)
-/*! cppre_sat8 - 0 = 8bits, 1 = 16bits
- */
-#define POWERQUAD_CPPRE_CPPRE_SAT8(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CPPRE_CPPRE_SAT8_SHIFT)) & POWERQUAD_CPPRE_CPPRE_SAT8_MASK)
-/*! @} */
-
-/*! @name MISC - Misc register */
-/*! @{ */
-#define POWERQUAD_MISC_INST_MISC_MASK (0xFFFFFFFFU)
-#define POWERQUAD_MISC_INST_MISC_SHIFT (0U)
-/*! inst_misc - Misc register. For Matrix : Used for scale factor
- */
-#define POWERQUAD_MISC_INST_MISC(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_MISC_INST_MISC_SHIFT)) & POWERQUAD_MISC_INST_MISC_MASK)
-/*! @} */
-
-/*! @name CURSORY - Cursory register */
-/*! @{ */
-#define POWERQUAD_CURSORY_CURSORY_MASK (0x1U)
-#define POWERQUAD_CURSORY_CURSORY_SHIFT (0U)
-/*! cursory - 1 : Enable cursory mode
- */
-#define POWERQUAD_CURSORY_CURSORY(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CURSORY_CURSORY_SHIFT)) & POWERQUAD_CURSORY_CURSORY_MASK)
-/*! @} */
-
-/*! @name CORDIC_X - Cordic input X register */
-/*! @{ */
-#define POWERQUAD_CORDIC_X_CORDIC_X_MASK (0xFFFFFFFFU)
-#define POWERQUAD_CORDIC_X_CORDIC_X_SHIFT (0U)
-/*! cordic_x - Cordic input x
- */
-#define POWERQUAD_CORDIC_X_CORDIC_X(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CORDIC_X_CORDIC_X_SHIFT)) & POWERQUAD_CORDIC_X_CORDIC_X_MASK)
-/*! @} */
-
-/*! @name CORDIC_Y - Cordic input Y register */
-/*! @{ */
-#define POWERQUAD_CORDIC_Y_CORDIC_Y_MASK (0xFFFFFFFFU)
-#define POWERQUAD_CORDIC_Y_CORDIC_Y_SHIFT (0U)
-/*! cordic_y - Cordic input y
- */
-#define POWERQUAD_CORDIC_Y_CORDIC_Y(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CORDIC_Y_CORDIC_Y_SHIFT)) & POWERQUAD_CORDIC_Y_CORDIC_Y_MASK)
-/*! @} */
-
-/*! @name CORDIC_Z - Cordic input Z register */
-/*! @{ */
-#define POWERQUAD_CORDIC_Z_CORDIC_Z_MASK (0xFFFFFFFFU)
-#define POWERQUAD_CORDIC_Z_CORDIC_Z_SHIFT (0U)
-/*! cordic_z - Cordic input z
- */
-#define POWERQUAD_CORDIC_Z_CORDIC_Z(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CORDIC_Z_CORDIC_Z_SHIFT)) & POWERQUAD_CORDIC_Z_CORDIC_Z_MASK)
-/*! @} */
-
-/*! @name ERRSTAT - Read/Write register where error statuses are captured (sticky) */
-/*! @{ */
-#define POWERQUAD_ERRSTAT_OVERFLOW_MASK (0x1U)
-#define POWERQUAD_ERRSTAT_OVERFLOW_SHIFT (0U)
-/*! OVERFLOW - overflow
- */
-#define POWERQUAD_ERRSTAT_OVERFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_ERRSTAT_OVERFLOW_SHIFT)) & POWERQUAD_ERRSTAT_OVERFLOW_MASK)
-#define POWERQUAD_ERRSTAT_NAN_MASK (0x2U)
-#define POWERQUAD_ERRSTAT_NAN_SHIFT (1U)
-/*! NAN - nan
- */
-#define POWERQUAD_ERRSTAT_NAN(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_ERRSTAT_NAN_SHIFT)) & POWERQUAD_ERRSTAT_NAN_MASK)
-#define POWERQUAD_ERRSTAT_FIXEDOVERFLOW_MASK (0x4U)
-#define POWERQUAD_ERRSTAT_FIXEDOVERFLOW_SHIFT (2U)
-/*! FIXEDOVERFLOW - fixed_pt_overflow
- */
-#define POWERQUAD_ERRSTAT_FIXEDOVERFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_ERRSTAT_FIXEDOVERFLOW_SHIFT)) & POWERQUAD_ERRSTAT_FIXEDOVERFLOW_MASK)
-#define POWERQUAD_ERRSTAT_UNDERFLOW_MASK (0x8U)
-#define POWERQUAD_ERRSTAT_UNDERFLOW_SHIFT (3U)
-/*! UNDERFLOW - underflow
- */
-#define POWERQUAD_ERRSTAT_UNDERFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_ERRSTAT_UNDERFLOW_SHIFT)) & POWERQUAD_ERRSTAT_UNDERFLOW_MASK)
-#define POWERQUAD_ERRSTAT_BUSERROR_MASK (0x10U)
-#define POWERQUAD_ERRSTAT_BUSERROR_SHIFT (4U)
-/*! BUSERROR - bus_error
- */
-#define POWERQUAD_ERRSTAT_BUSERROR(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_ERRSTAT_BUSERROR_SHIFT)) & POWERQUAD_ERRSTAT_BUSERROR_MASK)
-/*! @} */
-
-/*! @name INTREN - INTERRUPT enable register */
-/*! @{ */
-#define POWERQUAD_INTREN_INTR_OFLOW_MASK (0x1U)
-#define POWERQUAD_INTREN_INTR_OFLOW_SHIFT (0U)
-/*! intr_oflow - 1 : Enable interrupt on Floating point overflow
- */
-#define POWERQUAD_INTREN_INTR_OFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTREN_INTR_OFLOW_SHIFT)) & POWERQUAD_INTREN_INTR_OFLOW_MASK)
-#define POWERQUAD_INTREN_INTR_NAN_MASK (0x2U)
-#define POWERQUAD_INTREN_INTR_NAN_SHIFT (1U)
-/*! intr_nan - 1 : Enable interrupt on Floating point NaN
- */
-#define POWERQUAD_INTREN_INTR_NAN(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTREN_INTR_NAN_SHIFT)) & POWERQUAD_INTREN_INTR_NAN_MASK)
-#define POWERQUAD_INTREN_INTR_FIXED_MASK (0x4U)
-#define POWERQUAD_INTREN_INTR_FIXED_SHIFT (2U)
-/*! intr_fixed - 1: Enable interrupt on Fixed point Overflow
- */
-#define POWERQUAD_INTREN_INTR_FIXED(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTREN_INTR_FIXED_SHIFT)) & POWERQUAD_INTREN_INTR_FIXED_MASK)
-#define POWERQUAD_INTREN_INTR_UFLOW_MASK (0x8U)
-#define POWERQUAD_INTREN_INTR_UFLOW_SHIFT (3U)
-/*! intr_uflow - 1 : Enable interrupt on Subnormal truncation
- */
-#define POWERQUAD_INTREN_INTR_UFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTREN_INTR_UFLOW_SHIFT)) & POWERQUAD_INTREN_INTR_UFLOW_MASK)
-#define POWERQUAD_INTREN_INTR_BERR_MASK (0x10U)
-#define POWERQUAD_INTREN_INTR_BERR_SHIFT (4U)
-/*! intr_berr - 1: Enable interrupt on AHBM Buss Error
- */
-#define POWERQUAD_INTREN_INTR_BERR(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTREN_INTR_BERR_SHIFT)) & POWERQUAD_INTREN_INTR_BERR_MASK)
-#define POWERQUAD_INTREN_INTR_COMP_MASK (0x80U)
-#define POWERQUAD_INTREN_INTR_COMP_SHIFT (7U)
-/*! intr_comp - 1: Enable interrupt on instruction completion
- */
-#define POWERQUAD_INTREN_INTR_COMP(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTREN_INTR_COMP_SHIFT)) & POWERQUAD_INTREN_INTR_COMP_MASK)
-/*! @} */
-
-/*! @name EVENTEN - Event Enable register */
-/*! @{ */
-#define POWERQUAD_EVENTEN_EVENT_OFLOW_MASK (0x1U)
-#define POWERQUAD_EVENTEN_EVENT_OFLOW_SHIFT (0U)
-/*! event_oflow - 1 : Enable event trigger on Floating point overflow
- */
-#define POWERQUAD_EVENTEN_EVENT_OFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_EVENTEN_EVENT_OFLOW_SHIFT)) & POWERQUAD_EVENTEN_EVENT_OFLOW_MASK)
-#define POWERQUAD_EVENTEN_EVENT_NAN_MASK (0x2U)
-#define POWERQUAD_EVENTEN_EVENT_NAN_SHIFT (1U)
-/*! event_nan - 1 : Enable event trigger on Floating point NaN
- */
-#define POWERQUAD_EVENTEN_EVENT_NAN(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_EVENTEN_EVENT_NAN_SHIFT)) & POWERQUAD_EVENTEN_EVENT_NAN_MASK)
-#define POWERQUAD_EVENTEN_EVENT_FIXED_MASK (0x4U)
-#define POWERQUAD_EVENTEN_EVENT_FIXED_SHIFT (2U)
-/*! event_fixed - 1: Enable event trigger on Fixed point Overflow
- */
-#define POWERQUAD_EVENTEN_EVENT_FIXED(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_EVENTEN_EVENT_FIXED_SHIFT)) & POWERQUAD_EVENTEN_EVENT_FIXED_MASK)
-#define POWERQUAD_EVENTEN_EVENT_UFLOW_MASK (0x8U)
-#define POWERQUAD_EVENTEN_EVENT_UFLOW_SHIFT (3U)
-/*! event_uflow - 1 : Enable event trigger on Subnormal truncation
- */
-#define POWERQUAD_EVENTEN_EVENT_UFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_EVENTEN_EVENT_UFLOW_SHIFT)) & POWERQUAD_EVENTEN_EVENT_UFLOW_MASK)
-#define POWERQUAD_EVENTEN_EVENT_BERR_MASK (0x10U)
-#define POWERQUAD_EVENTEN_EVENT_BERR_SHIFT (4U)
-/*! event_berr - 1: Enable event trigger on AHBM Buss Error
- */
-#define POWERQUAD_EVENTEN_EVENT_BERR(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_EVENTEN_EVENT_BERR_SHIFT)) & POWERQUAD_EVENTEN_EVENT_BERR_MASK)
-#define POWERQUAD_EVENTEN_EVENT_COMP_MASK (0x80U)
-#define POWERQUAD_EVENTEN_EVENT_COMP_SHIFT (7U)
-/*! event_comp - 1: Enable event trigger on instruction completion
- */
-#define POWERQUAD_EVENTEN_EVENT_COMP(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_EVENTEN_EVENT_COMP_SHIFT)) & POWERQUAD_EVENTEN_EVENT_COMP_MASK)
-/*! @} */
-
-/*! @name INTRSTAT - INTERRUPT STATUS register */
-/*! @{ */
-#define POWERQUAD_INTRSTAT_INTR_STAT_MASK (0x1U)
-#define POWERQUAD_INTRSTAT_INTR_STAT_SHIFT (0U)
-/*! intr_stat - Intr status ( 1 bit to indicate interrupt captured, 0 means no new interrupt), write any value will clear this bit
- */
-#define POWERQUAD_INTRSTAT_INTR_STAT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTRSTAT_INTR_STAT_SHIFT)) & POWERQUAD_INTRSTAT_INTR_STAT_MASK)
-/*! @} */
-
-/*! @name GPREG - General purpose register bank N. */
-/*! @{ */
-#define POWERQUAD_GPREG_GPREG_MASK (0xFFFFFFFFU)
-#define POWERQUAD_GPREG_GPREG_SHIFT (0U)
-/*! gpreg - General purpose register bank
- */
-#define POWERQUAD_GPREG_GPREG(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_GPREG_GPREG_SHIFT)) & POWERQUAD_GPREG_GPREG_MASK)
-/*! @} */
-
-/* The count of POWERQUAD_GPREG */
-#define POWERQUAD_GPREG_COUNT (16U)
-
-/*! @name COMPREGS_COMPREG - Compute register bank */
-/*! @{ */
-#define POWERQUAD_COMPREGS_COMPREG_COMPREG_MASK (0xFFFFFFFFU)
-#define POWERQUAD_COMPREGS_COMPREG_COMPREG_SHIFT (0U)
-/*! compreg - Compute register bank
- */
-#define POWERQUAD_COMPREGS_COMPREG_COMPREG(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_COMPREGS_COMPREG_COMPREG_SHIFT)) & POWERQUAD_COMPREGS_COMPREG_COMPREG_MASK)
-/*! @} */
-
-/* The count of POWERQUAD_COMPREGS_COMPREG */
-#define POWERQUAD_COMPREGS_COMPREG_COUNT (8U)
-
-
-/*!
- * @}
- */ /* end of group POWERQUAD_Register_Masks */
-
-
-/* POWERQUAD - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral POWERQUAD base address */
- #define POWERQUAD_BASE (0x500A6000u)
- /** Peripheral POWERQUAD base address */
- #define POWERQUAD_BASE_NS (0x400A6000u)
- /** Peripheral POWERQUAD base pointer */
- #define POWERQUAD ((POWERQUAD_Type *)POWERQUAD_BASE)
- /** Peripheral POWERQUAD base pointer */
- #define POWERQUAD_NS ((POWERQUAD_Type *)POWERQUAD_BASE_NS)
- /** Array initializer of POWERQUAD peripheral base addresses */
- #define POWERQUAD_BASE_ADDRS { POWERQUAD_BASE }
- /** Array initializer of POWERQUAD peripheral base pointers */
- #define POWERQUAD_BASE_PTRS { POWERQUAD }
- /** Array initializer of POWERQUAD peripheral base addresses */
- #define POWERQUAD_BASE_ADDRS_NS { POWERQUAD_BASE_NS }
- /** Array initializer of POWERQUAD peripheral base pointers */
- #define POWERQUAD_BASE_PTRS_NS { POWERQUAD_NS }
-#else
- /** Peripheral POWERQUAD base address */
- #define POWERQUAD_BASE (0x400A6000u)
- /** Peripheral POWERQUAD base pointer */
- #define POWERQUAD ((POWERQUAD_Type *)POWERQUAD_BASE)
- /** Array initializer of POWERQUAD peripheral base addresses */
- #define POWERQUAD_BASE_ADDRS { POWERQUAD_BASE }
- /** Array initializer of POWERQUAD peripheral base pointers */
- #define POWERQUAD_BASE_PTRS { POWERQUAD }
-#endif
-
-/*!
- * @}
- */ /* end of group POWERQUAD_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- PRINCE Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PRINCE_Peripheral_Access_Layer PRINCE Peripheral Access Layer
- * @{
- */
-
-/** PRINCE - Register Layout Typedef */
-typedef struct {
- __IO uint32_t ENC_ENABLE; /**< Encryption Enable register, offset: 0x0 */
- __O uint32_t MASK_LSB; /**< Data Mask register, 32 Least Significant Bits, offset: 0x4 */
- __O uint32_t MASK_MSB; /**< Data Mask register, 32 Most Significant Bits, offset: 0x8 */
- __IO uint32_t LOCK; /**< Lock register, offset: 0xC */
- __O uint32_t IV_LSB0; /**< Initial Vector register for region 0, Least Significant Bits, offset: 0x10 */
- __O uint32_t IV_MSB0; /**< Initial Vector register for region 0, Most Significant Bits, offset: 0x14 */
- __IO uint32_t BASE_ADDR0; /**< Base Address for region 0 register, offset: 0x18 */
- __IO uint32_t SR_ENABLE0; /**< Sub-Region Enable register for region 0, offset: 0x1C */
- __O uint32_t IV_LSB1; /**< Initial Vector register for region 1, Least Significant Bits, offset: 0x20 */
- __O uint32_t IV_MSB1; /**< Initial Vector register for region 1, Most Significant Bits, offset: 0x24 */
- __IO uint32_t BASE_ADDR1; /**< Base Address for region 1 register, offset: 0x28 */
- __IO uint32_t SR_ENABLE1; /**< Sub-Region Enable register for region 1, offset: 0x2C */
- __O uint32_t IV_LSB2; /**< Initial Vector register for region 2, Least Significant Bits, offset: 0x30 */
- __O uint32_t IV_MSB2; /**< Initial Vector register for region 2, Most Significant Bits, offset: 0x34 */
- __IO uint32_t BASE_ADDR2; /**< Base Address for region 2 register, offset: 0x38 */
- __IO uint32_t SR_ENABLE2; /**< Sub-Region Enable register for region 2, offset: 0x3C */
-} PRINCE_Type;
-
-/* ----------------------------------------------------------------------------
- -- PRINCE Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PRINCE_Register_Masks PRINCE Register Masks
- * @{
- */
-
-/*! @name ENC_ENABLE - Encryption Enable register */
-/*! @{ */
-#define PRINCE_ENC_ENABLE_EN_MASK (0x1U)
-#define PRINCE_ENC_ENABLE_EN_SHIFT (0U)
-/*! EN - Encryption Enable.
- * 0b0..Encryption of writes to the flash controller DATAW* registers is disabled.
- * 0b1..Encryption of writes to the flash controller DATAW* registers is enabled.
- */
-#define PRINCE_ENC_ENABLE_EN(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_ENC_ENABLE_EN_SHIFT)) & PRINCE_ENC_ENABLE_EN_MASK)
-/*! @} */
-
-/*! @name MASK_LSB - Data Mask register, 32 Least Significant Bits */
-/*! @{ */
-#define PRINCE_MASK_LSB_MASKVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_MASK_LSB_MASKVAL_SHIFT (0U)
-/*! MASKVAL - Value of the 32 Least Significant Bits of the 64-bit data mask.
- */
-#define PRINCE_MASK_LSB_MASKVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_MASK_LSB_MASKVAL_SHIFT)) & PRINCE_MASK_LSB_MASKVAL_MASK)
-/*! @} */
-
-/*! @name MASK_MSB - Data Mask register, 32 Most Significant Bits */
-/*! @{ */
-#define PRINCE_MASK_MSB_MASKVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_MASK_MSB_MASKVAL_SHIFT (0U)
-/*! MASKVAL - Value of the 32 Most Significant Bits of the 64-bit data mask.
- */
-#define PRINCE_MASK_MSB_MASKVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_MASK_MSB_MASKVAL_SHIFT)) & PRINCE_MASK_MSB_MASKVAL_MASK)
-/*! @} */
-
-/*! @name LOCK - Lock register */
-/*! @{ */
-#define PRINCE_LOCK_LOCKREG0_MASK (0x1U)
-#define PRINCE_LOCK_LOCKREG0_SHIFT (0U)
-/*! LOCKREG0 - Lock Region 0 registers.
- * 0b0..Disabled. IV_LSB0, IV_MSB0, BASE_ADDR0, and SR_ENABLE0 are writable..
- * 0b1..Enabled. IV_LSB0, IV_MSB0, BASE_ADDR0, and SR_ENABLE0 are not writable..
- */
-#define PRINCE_LOCK_LOCKREG0(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_LOCK_LOCKREG0_SHIFT)) & PRINCE_LOCK_LOCKREG0_MASK)
-#define PRINCE_LOCK_LOCKREG1_MASK (0x2U)
-#define PRINCE_LOCK_LOCKREG1_SHIFT (1U)
-/*! LOCKREG1 - Lock Region 1 registers.
- * 0b0..Disabled. IV_LSB1, IV_MSB1, BASE_ADDR1, and SR_ENABLE1 are writable..
- * 0b1..Enabled. IV_LSB1, IV_MSB1, BASE_ADDR1, and SR_ENABLE1 are not writable..
- */
-#define PRINCE_LOCK_LOCKREG1(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_LOCK_LOCKREG1_SHIFT)) & PRINCE_LOCK_LOCKREG1_MASK)
-#define PRINCE_LOCK_LOCKREG2_MASK (0x4U)
-#define PRINCE_LOCK_LOCKREG2_SHIFT (2U)
-/*! LOCKREG2 - Lock Region 2 registers.
- * 0b0..Disabled. IV_LSB2, IV_MSB2, BASE_ADDR2, and SR_ENABLE2 are writable..
- * 0b1..Enabled. IV_LSB2, IV_MSB2, BASE_ADDR2, and SR_ENABLE2 are not writable..
- */
-#define PRINCE_LOCK_LOCKREG2(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_LOCK_LOCKREG2_SHIFT)) & PRINCE_LOCK_LOCKREG2_MASK)
-#define PRINCE_LOCK_LOCKMASK_MASK (0x100U)
-#define PRINCE_LOCK_LOCKMASK_SHIFT (8U)
-/*! LOCKMASK - Lock the Mask registers.
- * 0b0..Disabled. MASK_LSB, and MASK_MSB are writable..
- * 0b1..Enabled. MASK_LSB, and MASK_MSB are not writable..
- */
-#define PRINCE_LOCK_LOCKMASK(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_LOCK_LOCKMASK_SHIFT)) & PRINCE_LOCK_LOCKMASK_MASK)
-/*! @} */
-
-/*! @name IV_LSB0 - Initial Vector register for region 0, Least Significant Bits */
-/*! @{ */
-#define PRINCE_IV_LSB0_IVVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_IV_LSB0_IVVAL_SHIFT (0U)
-/*! IVVAL - Initial Vector value for the 32 Least Significant Bits of the 64-bit Initial Vector.
- */
-#define PRINCE_IV_LSB0_IVVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_IV_LSB0_IVVAL_SHIFT)) & PRINCE_IV_LSB0_IVVAL_MASK)
-/*! @} */
-
-/*! @name IV_MSB0 - Initial Vector register for region 0, Most Significant Bits */
-/*! @{ */
-#define PRINCE_IV_MSB0_IVVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_IV_MSB0_IVVAL_SHIFT (0U)
-/*! IVVAL - Initial Vector value for the 32 Most Significant Bits of the 64-bit Initial Vector.
- */
-#define PRINCE_IV_MSB0_IVVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_IV_MSB0_IVVAL_SHIFT)) & PRINCE_IV_MSB0_IVVAL_MASK)
-/*! @} */
-
-/*! @name BASE_ADDR0 - Base Address for region 0 register */
-/*! @{ */
-#define PRINCE_BASE_ADDR0_ADDR_FIXED_MASK (0x3FFFFU)
-#define PRINCE_BASE_ADDR0_ADDR_FIXED_SHIFT (0U)
-/*! ADDR_FIXED - Fixed portion of the base address of region 0.
- */
-#define PRINCE_BASE_ADDR0_ADDR_FIXED(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_BASE_ADDR0_ADDR_FIXED_SHIFT)) & PRINCE_BASE_ADDR0_ADDR_FIXED_MASK)
-#define PRINCE_BASE_ADDR0_ADDR_PRG_MASK (0xC0000U)
-#define PRINCE_BASE_ADDR0_ADDR_PRG_SHIFT (18U)
-/*! ADDR_PRG - Programmable portion of the base address of region 0.
- */
-#define PRINCE_BASE_ADDR0_ADDR_PRG(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_BASE_ADDR0_ADDR_PRG_SHIFT)) & PRINCE_BASE_ADDR0_ADDR_PRG_MASK)
-/*! @} */
-
-/*! @name SR_ENABLE0 - Sub-Region Enable register for region 0 */
-/*! @{ */
-#define PRINCE_SR_ENABLE0_EN_MASK (0xFFFFFFFFU)
-#define PRINCE_SR_ENABLE0_EN_SHIFT (0U)
-/*! EN - Each bit in this field enables an 8KB subregion for encryption at offset 8KB*bitnum of region 0.
- */
-#define PRINCE_SR_ENABLE0_EN(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_SR_ENABLE0_EN_SHIFT)) & PRINCE_SR_ENABLE0_EN_MASK)
-/*! @} */
-
-/*! @name IV_LSB1 - Initial Vector register for region 1, Least Significant Bits */
-/*! @{ */
-#define PRINCE_IV_LSB1_IVVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_IV_LSB1_IVVAL_SHIFT (0U)
-/*! IVVAL - Initial Vector value for the 32 Least Significant Bits of the 64-bit Initial Vector.
- */
-#define PRINCE_IV_LSB1_IVVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_IV_LSB1_IVVAL_SHIFT)) & PRINCE_IV_LSB1_IVVAL_MASK)
-/*! @} */
-
-/*! @name IV_MSB1 - Initial Vector register for region 1, Most Significant Bits */
-/*! @{ */
-#define PRINCE_IV_MSB1_IVVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_IV_MSB1_IVVAL_SHIFT (0U)
-/*! IVVAL - Initial Vector value for the 32 Most Significant Bits of the 64-bit Initial Vector.
- */
-#define PRINCE_IV_MSB1_IVVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_IV_MSB1_IVVAL_SHIFT)) & PRINCE_IV_MSB1_IVVAL_MASK)
-/*! @} */
-
-/*! @name BASE_ADDR1 - Base Address for region 1 register */
-/*! @{ */
-#define PRINCE_BASE_ADDR1_ADDR_FIXED_MASK (0x3FFFFU)
-#define PRINCE_BASE_ADDR1_ADDR_FIXED_SHIFT (0U)
-/*! ADDR_FIXED - Fixed portion of the base address of region 1.
- */
-#define PRINCE_BASE_ADDR1_ADDR_FIXED(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_BASE_ADDR1_ADDR_FIXED_SHIFT)) & PRINCE_BASE_ADDR1_ADDR_FIXED_MASK)
-#define PRINCE_BASE_ADDR1_ADDR_PRG_MASK (0xC0000U)
-#define PRINCE_BASE_ADDR1_ADDR_PRG_SHIFT (18U)
-/*! ADDR_PRG - Programmable portion of the base address of region 1.
- */
-#define PRINCE_BASE_ADDR1_ADDR_PRG(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_BASE_ADDR1_ADDR_PRG_SHIFT)) & PRINCE_BASE_ADDR1_ADDR_PRG_MASK)
-/*! @} */
-
-/*! @name SR_ENABLE1 - Sub-Region Enable register for region 1 */
-/*! @{ */
-#define PRINCE_SR_ENABLE1_EN_MASK (0xFFFFFFFFU)
-#define PRINCE_SR_ENABLE1_EN_SHIFT (0U)
-/*! EN - Each bit in this field enables an 8KB subregion for encryption at offset 8KB*bitnum of region 1.
- */
-#define PRINCE_SR_ENABLE1_EN(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_SR_ENABLE1_EN_SHIFT)) & PRINCE_SR_ENABLE1_EN_MASK)
-/*! @} */
-
-/*! @name IV_LSB2 - Initial Vector register for region 2, Least Significant Bits */
-/*! @{ */
-#define PRINCE_IV_LSB2_IVVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_IV_LSB2_IVVAL_SHIFT (0U)
-/*! IVVAL - Initial Vector value for the 32 Least Significant Bits of the 64-bit Initial Vector.
- */
-#define PRINCE_IV_LSB2_IVVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_IV_LSB2_IVVAL_SHIFT)) & PRINCE_IV_LSB2_IVVAL_MASK)
-/*! @} */
-
-/*! @name IV_MSB2 - Initial Vector register for region 2, Most Significant Bits */
-/*! @{ */
-#define PRINCE_IV_MSB2_IVVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_IV_MSB2_IVVAL_SHIFT (0U)
-/*! IVVAL - Initial Vector value for the 32 Most Significant Bits of the 64-bit Initial Vector.
- */
-#define PRINCE_IV_MSB2_IVVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_IV_MSB2_IVVAL_SHIFT)) & PRINCE_IV_MSB2_IVVAL_MASK)
-/*! @} */
-
-/*! @name BASE_ADDR2 - Base Address for region 2 register */
-/*! @{ */
-#define PRINCE_BASE_ADDR2_ADDR_FIXED_MASK (0x3FFFFU)
-#define PRINCE_BASE_ADDR2_ADDR_FIXED_SHIFT (0U)
-/*! ADDR_FIXED - Fixed portion of the base address of region 2.
- */
-#define PRINCE_BASE_ADDR2_ADDR_FIXED(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_BASE_ADDR2_ADDR_FIXED_SHIFT)) & PRINCE_BASE_ADDR2_ADDR_FIXED_MASK)
-#define PRINCE_BASE_ADDR2_ADDR_PRG_MASK (0xC0000U)
-#define PRINCE_BASE_ADDR2_ADDR_PRG_SHIFT (18U)
-/*! ADDR_PRG - Programmable portion of the base address of region 2.
- */
-#define PRINCE_BASE_ADDR2_ADDR_PRG(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_BASE_ADDR2_ADDR_PRG_SHIFT)) & PRINCE_BASE_ADDR2_ADDR_PRG_MASK)
-/*! @} */
-
-/*! @name SR_ENABLE2 - Sub-Region Enable register for region 2 */
-/*! @{ */
-#define PRINCE_SR_ENABLE2_EN_MASK (0xFFFFFFFFU)
-#define PRINCE_SR_ENABLE2_EN_SHIFT (0U)
-/*! EN - Each bit in this field enables an 8KB subregion for encryption at offset 8KB*bitnum of region 2.
- */
-#define PRINCE_SR_ENABLE2_EN(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_SR_ENABLE2_EN_SHIFT)) & PRINCE_SR_ENABLE2_EN_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group PRINCE_Register_Masks */
-
-
-/* PRINCE - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral PRINCE base address */
- #define PRINCE_BASE (0x50035000u)
- /** Peripheral PRINCE base address */
- #define PRINCE_BASE_NS (0x40035000u)
- /** Peripheral PRINCE base pointer */
- #define PRINCE ((PRINCE_Type *)PRINCE_BASE)
- /** Peripheral PRINCE base pointer */
- #define PRINCE_NS ((PRINCE_Type *)PRINCE_BASE_NS)
- /** Array initializer of PRINCE peripheral base addresses */
- #define PRINCE_BASE_ADDRS { PRINCE_BASE }
- /** Array initializer of PRINCE peripheral base pointers */
- #define PRINCE_BASE_PTRS { PRINCE }
- /** Array initializer of PRINCE peripheral base addresses */
- #define PRINCE_BASE_ADDRS_NS { PRINCE_BASE_NS }
- /** Array initializer of PRINCE peripheral base pointers */
- #define PRINCE_BASE_PTRS_NS { PRINCE_NS }
-#else
- /** Peripheral PRINCE base address */
- #define PRINCE_BASE (0x40035000u)
- /** Peripheral PRINCE base pointer */
- #define PRINCE ((PRINCE_Type *)PRINCE_BASE)
- /** Array initializer of PRINCE peripheral base addresses */
- #define PRINCE_BASE_ADDRS { PRINCE_BASE }
- /** Array initializer of PRINCE peripheral base pointers */
- #define PRINCE_BASE_PTRS { PRINCE }
-#endif
-
-/*!
- * @}
- */ /* end of group PRINCE_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- PUF Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PUF_Peripheral_Access_Layer PUF Peripheral Access Layer
- * @{
- */
-
-/** PUF - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< PUF Control register, offset: 0x0 */
- __IO uint32_t KEYINDEX; /**< PUF Key Index register, offset: 0x4 */
- __IO uint32_t KEYSIZE; /**< PUF Key Size register, offset: 0x8 */
- uint8_t RESERVED_0[20];
- __I uint32_t STAT; /**< PUF Status register, offset: 0x20 */
- uint8_t RESERVED_1[4];
- __I uint32_t ALLOW; /**< PUF Allow register, offset: 0x28 */
- uint8_t RESERVED_2[20];
- __O uint32_t KEYINPUT; /**< PUF Key Input register, offset: 0x40 */
- __O uint32_t CODEINPUT; /**< PUF Code Input register, offset: 0x44 */
- __I uint32_t CODEOUTPUT; /**< PUF Code Output register, offset: 0x48 */
- uint8_t RESERVED_3[20];
- __I uint32_t KEYOUTINDEX; /**< PUF Key Output Index register, offset: 0x60 */
- __I uint32_t KEYOUTPUT; /**< PUF Key Output register, offset: 0x64 */
- uint8_t RESERVED_4[116];
- __IO uint32_t IFSTAT; /**< PUF Interface Status and clear register, offset: 0xDC */
- uint8_t RESERVED_5[28];
- __I uint32_t VERSION; /**< PUF version register., offset: 0xFC */
- __IO uint32_t INTEN; /**< PUF Interrupt Enable, offset: 0x100 */
- __IO uint32_t INTSTAT; /**< PUF interrupt status, offset: 0x104 */
- __IO uint32_t PWRCTRL; /**< PUF RAM Power Control, offset: 0x108 */
- __IO uint32_t CFG; /**< PUF config register for block bits, offset: 0x10C */
- uint8_t RESERVED_6[240];
- __IO uint32_t KEYLOCK; /**< Only reset in case of full IC reset, offset: 0x200 */
- __IO uint32_t KEYENABLE; /**< , offset: 0x204 */
- __O uint32_t KEYRESET; /**< Reinitialize Keys shift registers counters, offset: 0x208 */
- __IO uint32_t IDXBLK_L; /**< , offset: 0x20C */
- __IO uint32_t IDXBLK_H_DP; /**< , offset: 0x210 */
- __O uint32_t KEYMASK[4]; /**< Only reset in case of full IC reset, array offset: 0x214, array step: 0x4 */
- uint8_t RESERVED_7[48];
- __IO uint32_t IDXBLK_H; /**< , offset: 0x254 */
- __IO uint32_t IDXBLK_L_DP; /**< , offset: 0x258 */
- __I uint32_t SHIFT_STATUS; /**< , offset: 0x25C */
-} PUF_Type;
-
-/* ----------------------------------------------------------------------------
- -- PUF Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PUF_Register_Masks PUF Register Masks
- * @{
- */
-
-/*! @name CTRL - PUF Control register */
-/*! @{ */
-#define PUF_CTRL_ZEROIZE_MASK (0x1U)
-#define PUF_CTRL_ZEROIZE_SHIFT (0U)
-/*! zeroize - Begin Zeroize operation for PUF and go to Error state
- */
-#define PUF_CTRL_ZEROIZE(x) (((uint32_t)(((uint32_t)(x)) << PUF_CTRL_ZEROIZE_SHIFT)) & PUF_CTRL_ZEROIZE_MASK)
-#define PUF_CTRL_ENROLL_MASK (0x2U)
-#define PUF_CTRL_ENROLL_SHIFT (1U)
-/*! enroll - Begin Enroll operation
- */
-#define PUF_CTRL_ENROLL(x) (((uint32_t)(((uint32_t)(x)) << PUF_CTRL_ENROLL_SHIFT)) & PUF_CTRL_ENROLL_MASK)
-#define PUF_CTRL_START_MASK (0x4U)
-#define PUF_CTRL_START_SHIFT (2U)
-/*! start - Begin Start operation
- */
-#define PUF_CTRL_START(x) (((uint32_t)(((uint32_t)(x)) << PUF_CTRL_START_SHIFT)) & PUF_CTRL_START_MASK)
-#define PUF_CTRL_GENERATEKEY_MASK (0x8U)
-#define PUF_CTRL_GENERATEKEY_SHIFT (3U)
-/*! GENERATEKEY - Begin Set Intrinsic Key operation
- */
-#define PUF_CTRL_GENERATEKEY(x) (((uint32_t)(((uint32_t)(x)) << PUF_CTRL_GENERATEKEY_SHIFT)) & PUF_CTRL_GENERATEKEY_MASK)
-#define PUF_CTRL_SETKEY_MASK (0x10U)
-#define PUF_CTRL_SETKEY_SHIFT (4U)
-/*! SETKEY - Begin Set User Key operation
- */
-#define PUF_CTRL_SETKEY(x) (((uint32_t)(((uint32_t)(x)) << PUF_CTRL_SETKEY_SHIFT)) & PUF_CTRL_SETKEY_MASK)
-#define PUF_CTRL_GETKEY_MASK (0x40U)
-#define PUF_CTRL_GETKEY_SHIFT (6U)
-/*! GETKEY - Begin Get Key operation
- */
-#define PUF_CTRL_GETKEY(x) (((uint32_t)(((uint32_t)(x)) << PUF_CTRL_GETKEY_SHIFT)) & PUF_CTRL_GETKEY_MASK)
-/*! @} */
-
-/*! @name KEYINDEX - PUF Key Index register */
-/*! @{ */
-#define PUF_KEYINDEX_KEYIDX_MASK (0xFU)
-#define PUF_KEYINDEX_KEYIDX_SHIFT (0U)
-/*! KEYIDX - Key index for Set Key operations
- */
-#define PUF_KEYINDEX_KEYIDX(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYINDEX_KEYIDX_SHIFT)) & PUF_KEYINDEX_KEYIDX_MASK)
-/*! @} */
-
-/*! @name KEYSIZE - PUF Key Size register */
-/*! @{ */
-#define PUF_KEYSIZE_KEYSIZE_MASK (0x3FU)
-#define PUF_KEYSIZE_KEYSIZE_SHIFT (0U)
-/*! KEYSIZE - Key size for Set Key operations
- */
-#define PUF_KEYSIZE_KEYSIZE(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYSIZE_KEYSIZE_SHIFT)) & PUF_KEYSIZE_KEYSIZE_MASK)
-/*! @} */
-
-/*! @name STAT - PUF Status register */
-/*! @{ */
-#define PUF_STAT_BUSY_MASK (0x1U)
-#define PUF_STAT_BUSY_SHIFT (0U)
-/*! busy - Indicates that operation is in progress
- */
-#define PUF_STAT_BUSY(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_BUSY_SHIFT)) & PUF_STAT_BUSY_MASK)
-#define PUF_STAT_SUCCESS_MASK (0x2U)
-#define PUF_STAT_SUCCESS_SHIFT (1U)
-/*! SUCCESS - Last operation was successful
- */
-#define PUF_STAT_SUCCESS(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_SUCCESS_SHIFT)) & PUF_STAT_SUCCESS_MASK)
-#define PUF_STAT_ERROR_MASK (0x4U)
-#define PUF_STAT_ERROR_SHIFT (2U)
-/*! error - PUF is in the Error state and no operations can be performed
- */
-#define PUF_STAT_ERROR(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_ERROR_SHIFT)) & PUF_STAT_ERROR_MASK)
-#define PUF_STAT_KEYINREQ_MASK (0x10U)
-#define PUF_STAT_KEYINREQ_SHIFT (4U)
-/*! KEYINREQ - Request for next part of key
- */
-#define PUF_STAT_KEYINREQ(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_KEYINREQ_SHIFT)) & PUF_STAT_KEYINREQ_MASK)
-#define PUF_STAT_KEYOUTAVAIL_MASK (0x20U)
-#define PUF_STAT_KEYOUTAVAIL_SHIFT (5U)
-/*! KEYOUTAVAIL - Next part of key is available
- */
-#define PUF_STAT_KEYOUTAVAIL(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_KEYOUTAVAIL_SHIFT)) & PUF_STAT_KEYOUTAVAIL_MASK)
-#define PUF_STAT_CODEINREQ_MASK (0x40U)
-#define PUF_STAT_CODEINREQ_SHIFT (6U)
-/*! CODEINREQ - Request for next part of AC/KC
- */
-#define PUF_STAT_CODEINREQ(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_CODEINREQ_SHIFT)) & PUF_STAT_CODEINREQ_MASK)
-#define PUF_STAT_CODEOUTAVAIL_MASK (0x80U)
-#define PUF_STAT_CODEOUTAVAIL_SHIFT (7U)
-/*! CODEOUTAVAIL - Next part of AC/KC is available
- */
-#define PUF_STAT_CODEOUTAVAIL(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_CODEOUTAVAIL_SHIFT)) & PUF_STAT_CODEOUTAVAIL_MASK)
-/*! @} */
-
-/*! @name ALLOW - PUF Allow register */
-/*! @{ */
-#define PUF_ALLOW_ALLOWENROLL_MASK (0x1U)
-#define PUF_ALLOW_ALLOWENROLL_SHIFT (0U)
-/*! ALLOWENROLL - Enroll operation is allowed
- */
-#define PUF_ALLOW_ALLOWENROLL(x) (((uint32_t)(((uint32_t)(x)) << PUF_ALLOW_ALLOWENROLL_SHIFT)) & PUF_ALLOW_ALLOWENROLL_MASK)
-#define PUF_ALLOW_ALLOWSTART_MASK (0x2U)
-#define PUF_ALLOW_ALLOWSTART_SHIFT (1U)
-/*! ALLOWSTART - Start operation is allowed
- */
-#define PUF_ALLOW_ALLOWSTART(x) (((uint32_t)(((uint32_t)(x)) << PUF_ALLOW_ALLOWSTART_SHIFT)) & PUF_ALLOW_ALLOWSTART_MASK)
-#define PUF_ALLOW_ALLOWSETKEY_MASK (0x4U)
-#define PUF_ALLOW_ALLOWSETKEY_SHIFT (2U)
-/*! ALLOWSETKEY - Set Key operations are allowed
- */
-#define PUF_ALLOW_ALLOWSETKEY(x) (((uint32_t)(((uint32_t)(x)) << PUF_ALLOW_ALLOWSETKEY_SHIFT)) & PUF_ALLOW_ALLOWSETKEY_MASK)
-#define PUF_ALLOW_ALLOWGETKEY_MASK (0x8U)
-#define PUF_ALLOW_ALLOWGETKEY_SHIFT (3U)
-/*! ALLOWGETKEY - Get Key operation is allowed
- */
-#define PUF_ALLOW_ALLOWGETKEY(x) (((uint32_t)(((uint32_t)(x)) << PUF_ALLOW_ALLOWGETKEY_SHIFT)) & PUF_ALLOW_ALLOWGETKEY_MASK)
-/*! @} */
-
-/*! @name KEYINPUT - PUF Key Input register */
-/*! @{ */
-#define PUF_KEYINPUT_KEYIN_MASK (0xFFFFFFFFU)
-#define PUF_KEYINPUT_KEYIN_SHIFT (0U)
-/*! KEYIN - Key input data
- */
-#define PUF_KEYINPUT_KEYIN(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYINPUT_KEYIN_SHIFT)) & PUF_KEYINPUT_KEYIN_MASK)
-/*! @} */
-
-/*! @name CODEINPUT - PUF Code Input register */
-/*! @{ */
-#define PUF_CODEINPUT_CODEIN_MASK (0xFFFFFFFFU)
-#define PUF_CODEINPUT_CODEIN_SHIFT (0U)
-/*! CODEIN - AC/KC input data
- */
-#define PUF_CODEINPUT_CODEIN(x) (((uint32_t)(((uint32_t)(x)) << PUF_CODEINPUT_CODEIN_SHIFT)) & PUF_CODEINPUT_CODEIN_MASK)
-/*! @} */
-
-/*! @name CODEOUTPUT - PUF Code Output register */
-/*! @{ */
-#define PUF_CODEOUTPUT_CODEOUT_MASK (0xFFFFFFFFU)
-#define PUF_CODEOUTPUT_CODEOUT_SHIFT (0U)
-/*! CODEOUT - AC/KC output data
- */
-#define PUF_CODEOUTPUT_CODEOUT(x) (((uint32_t)(((uint32_t)(x)) << PUF_CODEOUTPUT_CODEOUT_SHIFT)) & PUF_CODEOUTPUT_CODEOUT_MASK)
-/*! @} */
-
-/*! @name KEYOUTINDEX - PUF Key Output Index register */
-/*! @{ */
-#define PUF_KEYOUTINDEX_KEYOUTIDX_MASK (0xFU)
-#define PUF_KEYOUTINDEX_KEYOUTIDX_SHIFT (0U)
-/*! KEYOUTIDX - Key index for the key that is currently output via the Key Output register
- */
-#define PUF_KEYOUTINDEX_KEYOUTIDX(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYOUTINDEX_KEYOUTIDX_SHIFT)) & PUF_KEYOUTINDEX_KEYOUTIDX_MASK)
-/*! @} */
-
-/*! @name KEYOUTPUT - PUF Key Output register */
-/*! @{ */
-#define PUF_KEYOUTPUT_KEYOUT_MASK (0xFFFFFFFFU)
-#define PUF_KEYOUTPUT_KEYOUT_SHIFT (0U)
-/*! KEYOUT - Key output data
- */
-#define PUF_KEYOUTPUT_KEYOUT(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYOUTPUT_KEYOUT_SHIFT)) & PUF_KEYOUTPUT_KEYOUT_MASK)
-/*! @} */
-
-/*! @name IFSTAT - PUF Interface Status and clear register */
-/*! @{ */
-#define PUF_IFSTAT_ERROR_MASK (0x1U)
-#define PUF_IFSTAT_ERROR_SHIFT (0U)
-/*! ERROR - Indicates that an APB error has occurred,Writing logic1 clears the if_error bit
- */
-#define PUF_IFSTAT_ERROR(x) (((uint32_t)(((uint32_t)(x)) << PUF_IFSTAT_ERROR_SHIFT)) & PUF_IFSTAT_ERROR_MASK)
-/*! @} */
-
-/*! @name VERSION - PUF version register. */
-/*! @{ */
-#define PUF_VERSION_VERSION_MASK (0xFFFFFFFFU)
-#define PUF_VERSION_VERSION_SHIFT (0U)
-/*! VERSION - Version of the PUF module.
- */
-#define PUF_VERSION_VERSION(x) (((uint32_t)(((uint32_t)(x)) << PUF_VERSION_VERSION_SHIFT)) & PUF_VERSION_VERSION_MASK)
-/*! @} */
-
-/*! @name INTEN - PUF Interrupt Enable */
-/*! @{ */
-#define PUF_INTEN_READYEN_MASK (0x1U)
-#define PUF_INTEN_READYEN_SHIFT (0U)
-/*! READYEN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_READYEN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_READYEN_SHIFT)) & PUF_INTEN_READYEN_MASK)
-#define PUF_INTEN_SUCCESEN_MASK (0x2U)
-#define PUF_INTEN_SUCCESEN_SHIFT (1U)
-/*! SUCCESEN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_SUCCESEN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_SUCCESEN_SHIFT)) & PUF_INTEN_SUCCESEN_MASK)
-#define PUF_INTEN_ERROREN_MASK (0x4U)
-#define PUF_INTEN_ERROREN_SHIFT (2U)
-/*! ERROREN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_ERROREN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_ERROREN_SHIFT)) & PUF_INTEN_ERROREN_MASK)
-#define PUF_INTEN_KEYINREQEN_MASK (0x10U)
-#define PUF_INTEN_KEYINREQEN_SHIFT (4U)
-/*! KEYINREQEN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_KEYINREQEN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_KEYINREQEN_SHIFT)) & PUF_INTEN_KEYINREQEN_MASK)
-#define PUF_INTEN_KEYOUTAVAILEN_MASK (0x20U)
-#define PUF_INTEN_KEYOUTAVAILEN_SHIFT (5U)
-/*! KEYOUTAVAILEN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_KEYOUTAVAILEN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_KEYOUTAVAILEN_SHIFT)) & PUF_INTEN_KEYOUTAVAILEN_MASK)
-#define PUF_INTEN_CODEINREQEN_MASK (0x40U)
-#define PUF_INTEN_CODEINREQEN_SHIFT (6U)
-/*! CODEINREQEN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_CODEINREQEN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_CODEINREQEN_SHIFT)) & PUF_INTEN_CODEINREQEN_MASK)
-#define PUF_INTEN_CODEOUTAVAILEN_MASK (0x80U)
-#define PUF_INTEN_CODEOUTAVAILEN_SHIFT (7U)
-/*! CODEOUTAVAILEN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_CODEOUTAVAILEN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_CODEOUTAVAILEN_SHIFT)) & PUF_INTEN_CODEOUTAVAILEN_MASK)
-/*! @} */
-
-/*! @name INTSTAT - PUF interrupt status */
-/*! @{ */
-#define PUF_INTSTAT_READY_MASK (0x1U)
-#define PUF_INTSTAT_READY_SHIFT (0U)
-/*! READY - Triggers on falling edge of busy, write 1 to clear
- */
-#define PUF_INTSTAT_READY(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_READY_SHIFT)) & PUF_INTSTAT_READY_MASK)
-#define PUF_INTSTAT_SUCCESS_MASK (0x2U)
-#define PUF_INTSTAT_SUCCESS_SHIFT (1U)
-/*! SUCCESS - Level sensitive interrupt, cleared when interrupt source clears
- */
-#define PUF_INTSTAT_SUCCESS(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_SUCCESS_SHIFT)) & PUF_INTSTAT_SUCCESS_MASK)
-#define PUF_INTSTAT_ERROR_MASK (0x4U)
-#define PUF_INTSTAT_ERROR_SHIFT (2U)
-/*! ERROR - Level sensitive interrupt, cleared when interrupt source clears
- */
-#define PUF_INTSTAT_ERROR(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_ERROR_SHIFT)) & PUF_INTSTAT_ERROR_MASK)
-#define PUF_INTSTAT_KEYINREQ_MASK (0x10U)
-#define PUF_INTSTAT_KEYINREQ_SHIFT (4U)
-/*! KEYINREQ - Level sensitive interrupt, cleared when interrupt source clears
- */
-#define PUF_INTSTAT_KEYINREQ(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_KEYINREQ_SHIFT)) & PUF_INTSTAT_KEYINREQ_MASK)
-#define PUF_INTSTAT_KEYOUTAVAIL_MASK (0x20U)
-#define PUF_INTSTAT_KEYOUTAVAIL_SHIFT (5U)
-/*! KEYOUTAVAIL - Level sensitive interrupt, cleared when interrupt source clears
- */
-#define PUF_INTSTAT_KEYOUTAVAIL(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_KEYOUTAVAIL_SHIFT)) & PUF_INTSTAT_KEYOUTAVAIL_MASK)
-#define PUF_INTSTAT_CODEINREQ_MASK (0x40U)
-#define PUF_INTSTAT_CODEINREQ_SHIFT (6U)
-/*! CODEINREQ - Level sensitive interrupt, cleared when interrupt source clears
- */
-#define PUF_INTSTAT_CODEINREQ(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_CODEINREQ_SHIFT)) & PUF_INTSTAT_CODEINREQ_MASK)
-#define PUF_INTSTAT_CODEOUTAVAIL_MASK (0x80U)
-#define PUF_INTSTAT_CODEOUTAVAIL_SHIFT (7U)
-/*! CODEOUTAVAIL - Level sensitive interrupt, cleared when interrupt source clears
- */
-#define PUF_INTSTAT_CODEOUTAVAIL(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_CODEOUTAVAIL_SHIFT)) & PUF_INTSTAT_CODEOUTAVAIL_MASK)
-/*! @} */
-
-/*! @name PWRCTRL - PUF RAM Power Control */
-/*! @{ */
-#define PUF_PWRCTRL_RAMON_MASK (0x1U)
-#define PUF_PWRCTRL_RAMON_SHIFT (0U)
-/*! RAMON - Power on the PUF RAM.
- */
-#define PUF_PWRCTRL_RAMON(x) (((uint32_t)(((uint32_t)(x)) << PUF_PWRCTRL_RAMON_SHIFT)) & PUF_PWRCTRL_RAMON_MASK)
-#define PUF_PWRCTRL_RAMSTAT_MASK (0x2U)
-#define PUF_PWRCTRL_RAMSTAT_SHIFT (1U)
-/*! RAMSTAT - PUF RAM status.
- */
-#define PUF_PWRCTRL_RAMSTAT(x) (((uint32_t)(((uint32_t)(x)) << PUF_PWRCTRL_RAMSTAT_SHIFT)) & PUF_PWRCTRL_RAMSTAT_MASK)
-/*! @} */
-
-/*! @name CFG - PUF config register for block bits */
-/*! @{ */
-#define PUF_CFG_BLOCKENROLL_SETKEY_MASK (0x1U)
-#define PUF_CFG_BLOCKENROLL_SETKEY_SHIFT (0U)
-/*! BLOCKENROLL_SETKEY - Block enroll operation. Write 1 to set, cleared on reset.
- */
-#define PUF_CFG_BLOCKENROLL_SETKEY(x) (((uint32_t)(((uint32_t)(x)) << PUF_CFG_BLOCKENROLL_SETKEY_SHIFT)) & PUF_CFG_BLOCKENROLL_SETKEY_MASK)
-#define PUF_CFG_BLOCKKEYOUTPUT_MASK (0x2U)
-#define PUF_CFG_BLOCKKEYOUTPUT_SHIFT (1U)
-/*! BLOCKKEYOUTPUT - Block set key operation. Write 1 to set, cleared on reset.
- */
-#define PUF_CFG_BLOCKKEYOUTPUT(x) (((uint32_t)(((uint32_t)(x)) << PUF_CFG_BLOCKKEYOUTPUT_SHIFT)) & PUF_CFG_BLOCKKEYOUTPUT_MASK)
-/*! @} */
-
-/*! @name KEYLOCK - Only reset in case of full IC reset */
-/*! @{ */
-#define PUF_KEYLOCK_KEY0_MASK (0x3U)
-#define PUF_KEYLOCK_KEY0_SHIFT (0U)
-/*! KEY0 - "10:Write access to KEY0MASK, KEYENABLE.KEY0 and KEYRESET.KEY0 is allowed. 00, 01,
- * 11:Write access to KEY0MASK, KEYENABLE.KEY0 and KEYRESET.KEY0 is NOT allowed. Important Note : Once
- * this field is written with a value different from '10', its value can no longer be modified
- * until un Power On Reset occurs."
- */
-#define PUF_KEYLOCK_KEY0(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYLOCK_KEY0_SHIFT)) & PUF_KEYLOCK_KEY0_MASK)
-#define PUF_KEYLOCK_KEY1_MASK (0xCU)
-#define PUF_KEYLOCK_KEY1_SHIFT (2U)
-/*! KEY1 - "10:Write access to KEY1MASK, KEYENABLE.KEY1 and KEYRESET.KEY1 is allowed. 00, 01,
- * 11:Write access to KEY1MASK, KEYENABLE.KEY1 and KEYRESET.KEY1 is NOT allowed. Important Note : Once
- * this field is written with a value different from '10', its value can no longer be modified
- * until un Power On Reset occurs."
- */
-#define PUF_KEYLOCK_KEY1(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYLOCK_KEY1_SHIFT)) & PUF_KEYLOCK_KEY1_MASK)
-#define PUF_KEYLOCK_KEY2_MASK (0x30U)
-#define PUF_KEYLOCK_KEY2_SHIFT (4U)
-/*! KEY2 - "10:Write access to KEY2MASK, KEYENABLE.KEY2 and KEYRESET.KEY2 is allowed. 00, 01,
- * 11:Write access to KEY2MASK, KEYENABLE.KEY2 and KEYRESET.KEY2 is NOT allowed. Important Note : Once
- * this field is written with a value different from '10', its value can no longer be modified
- * until un Power On Reset occurs."
- */
-#define PUF_KEYLOCK_KEY2(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYLOCK_KEY2_SHIFT)) & PUF_KEYLOCK_KEY2_MASK)
-#define PUF_KEYLOCK_KEY3_MASK (0xC0U)
-#define PUF_KEYLOCK_KEY3_SHIFT (6U)
-/*! KEY3 - "10:Write access to KEY3MASK, KEYENABLE.KEY3 and KEYRESET.KEY3 is allowed. 00, 01,
- * 11:Write access to KEY3MASK, KEYENABLE.KEY3 and KEYRESET.KEY3 is NOT allowed. Important Note : Once
- * this field is written with a value different from '10', its value can no longer be modified
- * until un Power On Reset occurs."
- */
-#define PUF_KEYLOCK_KEY3(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYLOCK_KEY3_SHIFT)) & PUF_KEYLOCK_KEY3_MASK)
-/*! @} */
-
-/*! @name KEYENABLE - */
-/*! @{ */
-#define PUF_KEYENABLE_KEY0_MASK (0x3U)
-#define PUF_KEYENABLE_KEY0_SHIFT (0U)
-/*! KEY0 - "10: Data coming out from PUF Index 0 interface are shifted in KEY0 register. 00, 01, 11
- * : Data coming out from PUF Index 0 interface are NOT shifted in KEY0 register."
- */
-#define PUF_KEYENABLE_KEY0(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYENABLE_KEY0_SHIFT)) & PUF_KEYENABLE_KEY0_MASK)
-#define PUF_KEYENABLE_KEY1_MASK (0xCU)
-#define PUF_KEYENABLE_KEY1_SHIFT (2U)
-/*! KEY1 - "10: Data coming out from PUF Index 0 interface are shifted in KEY1 register. 00, 01, 11
- * : Data coming out from PUF Index 0 interface are NOT shifted in KEY1 register."
- */
-#define PUF_KEYENABLE_KEY1(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYENABLE_KEY1_SHIFT)) & PUF_KEYENABLE_KEY1_MASK)
-#define PUF_KEYENABLE_KEY2_MASK (0x30U)
-#define PUF_KEYENABLE_KEY2_SHIFT (4U)
-/*! KEY2 - "10: Data coming out from PUF Index 0 interface are shifted in KEY2 register. 00, 01, 11
- * : Data coming out from PUF Index 0 interface are NOT shifted in KEY2 register."
- */
-#define PUF_KEYENABLE_KEY2(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYENABLE_KEY2_SHIFT)) & PUF_KEYENABLE_KEY2_MASK)
-#define PUF_KEYENABLE_KEY3_MASK (0xC0U)
-#define PUF_KEYENABLE_KEY3_SHIFT (6U)
-/*! KEY3 - "10: Data coming out from PUF Index 0 interface are shifted in KEY3 register. 00, 01, 11
- * : Data coming out from PUF Index 0 interface are NOT shifted in KEY3 register."
- */
-#define PUF_KEYENABLE_KEY3(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYENABLE_KEY3_SHIFT)) & PUF_KEYENABLE_KEY3_MASK)
-/*! @} */
-
-/*! @name KEYRESET - Reinitialize Keys shift registers counters */
-/*! @{ */
-#define PUF_KEYRESET_KEY0_MASK (0x3U)
-#define PUF_KEYRESET_KEY0_SHIFT (0U)
-/*! KEY0 - 10: Reset KEY0 shift register. Self clearing. Must be done before loading any new key.
- */
-#define PUF_KEYRESET_KEY0(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYRESET_KEY0_SHIFT)) & PUF_KEYRESET_KEY0_MASK)
-#define PUF_KEYRESET_KEY1_MASK (0xCU)
-#define PUF_KEYRESET_KEY1_SHIFT (2U)
-/*! KEY1 - 10: Reset KEY1 shift register. Self clearing. Must be done before loading any new key.
- */
-#define PUF_KEYRESET_KEY1(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYRESET_KEY1_SHIFT)) & PUF_KEYRESET_KEY1_MASK)
-#define PUF_KEYRESET_KEY2_MASK (0x30U)
-#define PUF_KEYRESET_KEY2_SHIFT (4U)
-/*! KEY2 - 10: Reset KEY2 shift register. Self clearing. Must be done before loading any new key.
- */
-#define PUF_KEYRESET_KEY2(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYRESET_KEY2_SHIFT)) & PUF_KEYRESET_KEY2_MASK)
-#define PUF_KEYRESET_KEY3_MASK (0xC0U)
-#define PUF_KEYRESET_KEY3_SHIFT (6U)
-/*! KEY3 - 10: Reset KEY3 shift register. Self clearing. Must be done before loading any new key.
- */
-#define PUF_KEYRESET_KEY3(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYRESET_KEY3_SHIFT)) & PUF_KEYRESET_KEY3_MASK)
-/*! @} */
-
-/*! @name IDXBLK_L - */
-/*! @{ */
-#define PUF_IDXBLK_L_IDX1_MASK (0xCU)
-#define PUF_IDXBLK_L_IDX1_SHIFT (2U)
-/*! IDX1 - Use to block PUF index 1
- */
-#define PUF_IDXBLK_L_IDX1(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX1_SHIFT)) & PUF_IDXBLK_L_IDX1_MASK)
-#define PUF_IDXBLK_L_IDX2_MASK (0x30U)
-#define PUF_IDXBLK_L_IDX2_SHIFT (4U)
-/*! IDX2 - Use to block PUF index 2
- */
-#define PUF_IDXBLK_L_IDX2(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX2_SHIFT)) & PUF_IDXBLK_L_IDX2_MASK)
-#define PUF_IDXBLK_L_IDX3_MASK (0xC0U)
-#define PUF_IDXBLK_L_IDX3_SHIFT (6U)
-/*! IDX3 - Use to block PUF index 3
- */
-#define PUF_IDXBLK_L_IDX3(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX3_SHIFT)) & PUF_IDXBLK_L_IDX3_MASK)
-#define PUF_IDXBLK_L_IDX4_MASK (0x300U)
-#define PUF_IDXBLK_L_IDX4_SHIFT (8U)
-/*! IDX4 - Use to block PUF index 4
- */
-#define PUF_IDXBLK_L_IDX4(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX4_SHIFT)) & PUF_IDXBLK_L_IDX4_MASK)
-#define PUF_IDXBLK_L_IDX5_MASK (0xC00U)
-#define PUF_IDXBLK_L_IDX5_SHIFT (10U)
-/*! IDX5 - Use to block PUF index 5
- */
-#define PUF_IDXBLK_L_IDX5(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX5_SHIFT)) & PUF_IDXBLK_L_IDX5_MASK)
-#define PUF_IDXBLK_L_IDX6_MASK (0x3000U)
-#define PUF_IDXBLK_L_IDX6_SHIFT (12U)
-/*! IDX6 - Use to block PUF index 6
- */
-#define PUF_IDXBLK_L_IDX6(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX6_SHIFT)) & PUF_IDXBLK_L_IDX6_MASK)
-#define PUF_IDXBLK_L_IDX7_MASK (0xC000U)
-#define PUF_IDXBLK_L_IDX7_SHIFT (14U)
-/*! IDX7 - Use to block PUF index 7
- */
-#define PUF_IDXBLK_L_IDX7(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX7_SHIFT)) & PUF_IDXBLK_L_IDX7_MASK)
-#define PUF_IDXBLK_L_LOCK_IDX_MASK (0xC0000000U)
-#define PUF_IDXBLK_L_LOCK_IDX_SHIFT (30U)
-/*! LOCK_IDX - Lock 0 to 7 PUF key indexes
- */
-#define PUF_IDXBLK_L_LOCK_IDX(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_LOCK_IDX_SHIFT)) & PUF_IDXBLK_L_LOCK_IDX_MASK)
-/*! @} */
-
-/*! @name IDXBLK_H_DP - */
-/*! @{ */
-#define PUF_IDXBLK_H_DP_IDX8_MASK (0x3U)
-#define PUF_IDXBLK_H_DP_IDX8_SHIFT (0U)
-/*! IDX8 - Use to block PUF index 8
- */
-#define PUF_IDXBLK_H_DP_IDX8(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX8_SHIFT)) & PUF_IDXBLK_H_DP_IDX8_MASK)
-#define PUF_IDXBLK_H_DP_IDX9_MASK (0xCU)
-#define PUF_IDXBLK_H_DP_IDX9_SHIFT (2U)
-/*! IDX9 - Use to block PUF index 9
- */
-#define PUF_IDXBLK_H_DP_IDX9(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX9_SHIFT)) & PUF_IDXBLK_H_DP_IDX9_MASK)
-#define PUF_IDXBLK_H_DP_IDX10_MASK (0x30U)
-#define PUF_IDXBLK_H_DP_IDX10_SHIFT (4U)
-/*! IDX10 - Use to block PUF index 10
- */
-#define PUF_IDXBLK_H_DP_IDX10(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX10_SHIFT)) & PUF_IDXBLK_H_DP_IDX10_MASK)
-#define PUF_IDXBLK_H_DP_IDX11_MASK (0xC0U)
-#define PUF_IDXBLK_H_DP_IDX11_SHIFT (6U)
-/*! IDX11 - Use to block PUF index 11
- */
-#define PUF_IDXBLK_H_DP_IDX11(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX11_SHIFT)) & PUF_IDXBLK_H_DP_IDX11_MASK)
-#define PUF_IDXBLK_H_DP_IDX12_MASK (0x300U)
-#define PUF_IDXBLK_H_DP_IDX12_SHIFT (8U)
-/*! IDX12 - Use to block PUF index 12
- */
-#define PUF_IDXBLK_H_DP_IDX12(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX12_SHIFT)) & PUF_IDXBLK_H_DP_IDX12_MASK)
-#define PUF_IDXBLK_H_DP_IDX13_MASK (0xC00U)
-#define PUF_IDXBLK_H_DP_IDX13_SHIFT (10U)
-/*! IDX13 - Use to block PUF index 13
- */
-#define PUF_IDXBLK_H_DP_IDX13(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX13_SHIFT)) & PUF_IDXBLK_H_DP_IDX13_MASK)
-#define PUF_IDXBLK_H_DP_IDX14_MASK (0x3000U)
-#define PUF_IDXBLK_H_DP_IDX14_SHIFT (12U)
-/*! IDX14 - Use to block PUF index 14
- */
-#define PUF_IDXBLK_H_DP_IDX14(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX14_SHIFT)) & PUF_IDXBLK_H_DP_IDX14_MASK)
-#define PUF_IDXBLK_H_DP_IDX15_MASK (0xC000U)
-#define PUF_IDXBLK_H_DP_IDX15_SHIFT (14U)
-/*! IDX15 - Use to block PUF index 15
- */
-#define PUF_IDXBLK_H_DP_IDX15(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX15_SHIFT)) & PUF_IDXBLK_H_DP_IDX15_MASK)
-/*! @} */
-
-/*! @name KEYMASK - Only reset in case of full IC reset */
-/*! @{ */
-#define PUF_KEYMASK_KEYMASK_MASK (0xFFFFFFFFU)
-#define PUF_KEYMASK_KEYMASK_SHIFT (0U)
-#define PUF_KEYMASK_KEYMASK(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYMASK_KEYMASK_SHIFT)) & PUF_KEYMASK_KEYMASK_MASK)
-/*! @} */
-
-/* The count of PUF_KEYMASK */
-#define PUF_KEYMASK_COUNT (4U)
-
-/*! @name IDXBLK_H - */
-/*! @{ */
-#define PUF_IDXBLK_H_IDX8_MASK (0x3U)
-#define PUF_IDXBLK_H_IDX8_SHIFT (0U)
-/*! IDX8 - Use to block PUF index 8
- */
-#define PUF_IDXBLK_H_IDX8(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX8_SHIFT)) & PUF_IDXBLK_H_IDX8_MASK)
-#define PUF_IDXBLK_H_IDX9_MASK (0xCU)
-#define PUF_IDXBLK_H_IDX9_SHIFT (2U)
-/*! IDX9 - Use to block PUF index 9
- */
-#define PUF_IDXBLK_H_IDX9(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX9_SHIFT)) & PUF_IDXBLK_H_IDX9_MASK)
-#define PUF_IDXBLK_H_IDX10_MASK (0x30U)
-#define PUF_IDXBLK_H_IDX10_SHIFT (4U)
-/*! IDX10 - Use to block PUF index 10
- */
-#define PUF_IDXBLK_H_IDX10(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX10_SHIFT)) & PUF_IDXBLK_H_IDX10_MASK)
-#define PUF_IDXBLK_H_IDX11_MASK (0xC0U)
-#define PUF_IDXBLK_H_IDX11_SHIFT (6U)
-/*! IDX11 - Use to block PUF index 11
- */
-#define PUF_IDXBLK_H_IDX11(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX11_SHIFT)) & PUF_IDXBLK_H_IDX11_MASK)
-#define PUF_IDXBLK_H_IDX12_MASK (0x300U)
-#define PUF_IDXBLK_H_IDX12_SHIFT (8U)
-/*! IDX12 - Use to block PUF index 12
- */
-#define PUF_IDXBLK_H_IDX12(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX12_SHIFT)) & PUF_IDXBLK_H_IDX12_MASK)
-#define PUF_IDXBLK_H_IDX13_MASK (0xC00U)
-#define PUF_IDXBLK_H_IDX13_SHIFT (10U)
-/*! IDX13 - Use to block PUF index 13
- */
-#define PUF_IDXBLK_H_IDX13(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX13_SHIFT)) & PUF_IDXBLK_H_IDX13_MASK)
-#define PUF_IDXBLK_H_IDX14_MASK (0x3000U)
-#define PUF_IDXBLK_H_IDX14_SHIFT (12U)
-/*! IDX14 - Use to block PUF index 14
- */
-#define PUF_IDXBLK_H_IDX14(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX14_SHIFT)) & PUF_IDXBLK_H_IDX14_MASK)
-#define PUF_IDXBLK_H_IDX15_MASK (0xC000U)
-#define PUF_IDXBLK_H_IDX15_SHIFT (14U)
-/*! IDX15 - Use to block PUF index 15
- */
-#define PUF_IDXBLK_H_IDX15(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX15_SHIFT)) & PUF_IDXBLK_H_IDX15_MASK)
-#define PUF_IDXBLK_H_LOCK_IDX_MASK (0xC0000000U)
-#define PUF_IDXBLK_H_LOCK_IDX_SHIFT (30U)
-/*! LOCK_IDX - Lock 8 to 15 PUF key indexes
- */
-#define PUF_IDXBLK_H_LOCK_IDX(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_LOCK_IDX_SHIFT)) & PUF_IDXBLK_H_LOCK_IDX_MASK)
-/*! @} */
-
-/*! @name IDXBLK_L_DP - */
-/*! @{ */
-#define PUF_IDXBLK_L_DP_IDX1_MASK (0xCU)
-#define PUF_IDXBLK_L_DP_IDX1_SHIFT (2U)
-/*! IDX1 - Use to block PUF index 1
- */
-#define PUF_IDXBLK_L_DP_IDX1(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX1_SHIFT)) & PUF_IDXBLK_L_DP_IDX1_MASK)
-#define PUF_IDXBLK_L_DP_IDX2_MASK (0x30U)
-#define PUF_IDXBLK_L_DP_IDX2_SHIFT (4U)
-/*! IDX2 - Use to block PUF index 2
- */
-#define PUF_IDXBLK_L_DP_IDX2(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX2_SHIFT)) & PUF_IDXBLK_L_DP_IDX2_MASK)
-#define PUF_IDXBLK_L_DP_IDX3_MASK (0xC0U)
-#define PUF_IDXBLK_L_DP_IDX3_SHIFT (6U)
-/*! IDX3 - Use to block PUF index 3
- */
-#define PUF_IDXBLK_L_DP_IDX3(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX3_SHIFT)) & PUF_IDXBLK_L_DP_IDX3_MASK)
-#define PUF_IDXBLK_L_DP_IDX4_MASK (0x300U)
-#define PUF_IDXBLK_L_DP_IDX4_SHIFT (8U)
-/*! IDX4 - Use to block PUF index 4
- */
-#define PUF_IDXBLK_L_DP_IDX4(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX4_SHIFT)) & PUF_IDXBLK_L_DP_IDX4_MASK)
-#define PUF_IDXBLK_L_DP_IDX5_MASK (0xC00U)
-#define PUF_IDXBLK_L_DP_IDX5_SHIFT (10U)
-/*! IDX5 - Use to block PUF index 5
- */
-#define PUF_IDXBLK_L_DP_IDX5(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX5_SHIFT)) & PUF_IDXBLK_L_DP_IDX5_MASK)
-#define PUF_IDXBLK_L_DP_IDX6_MASK (0x3000U)
-#define PUF_IDXBLK_L_DP_IDX6_SHIFT (12U)
-/*! IDX6 - Use to block PUF index 6
- */
-#define PUF_IDXBLK_L_DP_IDX6(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX6_SHIFT)) & PUF_IDXBLK_L_DP_IDX6_MASK)
-#define PUF_IDXBLK_L_DP_IDX7_MASK (0xC000U)
-#define PUF_IDXBLK_L_DP_IDX7_SHIFT (14U)
-/*! IDX7 - Use to block PUF index 7
- */
-#define PUF_IDXBLK_L_DP_IDX7(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX7_SHIFT)) & PUF_IDXBLK_L_DP_IDX7_MASK)
-/*! @} */
-
-/*! @name SHIFT_STATUS - */
-/*! @{ */
-#define PUF_SHIFT_STATUS_KEY0_MASK (0xFU)
-#define PUF_SHIFT_STATUS_KEY0_SHIFT (0U)
-/*! KEY0 - Index counter from key 0 shift register
- */
-#define PUF_SHIFT_STATUS_KEY0(x) (((uint32_t)(((uint32_t)(x)) << PUF_SHIFT_STATUS_KEY0_SHIFT)) & PUF_SHIFT_STATUS_KEY0_MASK)
-#define PUF_SHIFT_STATUS_KEY1_MASK (0xF0U)
-#define PUF_SHIFT_STATUS_KEY1_SHIFT (4U)
-/*! KEY1 - Index counter from key 1 shift register
- */
-#define PUF_SHIFT_STATUS_KEY1(x) (((uint32_t)(((uint32_t)(x)) << PUF_SHIFT_STATUS_KEY1_SHIFT)) & PUF_SHIFT_STATUS_KEY1_MASK)
-#define PUF_SHIFT_STATUS_KEY2_MASK (0xF00U)
-#define PUF_SHIFT_STATUS_KEY2_SHIFT (8U)
-/*! KEY2 - Index counter from key 2 shift register
- */
-#define PUF_SHIFT_STATUS_KEY2(x) (((uint32_t)(((uint32_t)(x)) << PUF_SHIFT_STATUS_KEY2_SHIFT)) & PUF_SHIFT_STATUS_KEY2_MASK)
-#define PUF_SHIFT_STATUS_KEY3_MASK (0xF000U)
-#define PUF_SHIFT_STATUS_KEY3_SHIFT (12U)
-/*! KEY3 - Index counter from key 3 shift register
- */
-#define PUF_SHIFT_STATUS_KEY3(x) (((uint32_t)(((uint32_t)(x)) << PUF_SHIFT_STATUS_KEY3_SHIFT)) & PUF_SHIFT_STATUS_KEY3_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group PUF_Register_Masks */
-
-
-/* PUF - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral PUF base address */
- #define PUF_BASE (0x5003B000u)
- /** Peripheral PUF base address */
- #define PUF_BASE_NS (0x4003B000u)
- /** Peripheral PUF base pointer */
- #define PUF ((PUF_Type *)PUF_BASE)
- /** Peripheral PUF base pointer */
- #define PUF_NS ((PUF_Type *)PUF_BASE_NS)
- /** Array initializer of PUF peripheral base addresses */
- #define PUF_BASE_ADDRS { PUF_BASE }
- /** Array initializer of PUF peripheral base pointers */
- #define PUF_BASE_PTRS { PUF }
- /** Array initializer of PUF peripheral base addresses */
- #define PUF_BASE_ADDRS_NS { PUF_BASE_NS }
- /** Array initializer of PUF peripheral base pointers */
- #define PUF_BASE_PTRS_NS { PUF_NS }
-#else
- /** Peripheral PUF base address */
- #define PUF_BASE (0x4003B000u)
- /** Peripheral PUF base pointer */
- #define PUF ((PUF_Type *)PUF_BASE)
- /** Array initializer of PUF peripheral base addresses */
- #define PUF_BASE_ADDRS { PUF_BASE }
- /** Array initializer of PUF peripheral base pointers */
- #define PUF_BASE_PTRS { PUF }
-#endif
-/** Interrupt vectors for the PUF peripheral type */
-#define PUF_IRQS { PUF_IRQn }
-
-/*!
- * @}
- */ /* end of group PUF_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- RNG Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup RNG_Peripheral_Access_Layer RNG Peripheral Access Layer
- * @{
- */
-
-/** RNG - Register Layout Typedef */
-typedef struct {
- __I uint32_t RANDOM_NUMBER; /**< This register contains a random 32 bit number which is computed on demand, at each time it is read, offset: 0x0 */
- uint8_t RESERVED_0[4];
- __I uint32_t COUNTER_VAL; /**< , offset: 0x8 */
- __IO uint32_t COUNTER_CFG; /**< , offset: 0xC */
- __IO uint32_t ONLINE_TEST_CFG; /**< , offset: 0x10 */
- __I uint32_t ONLINE_TEST_VAL; /**< , offset: 0x14 */
- uint8_t RESERVED_1[4068];
- __I uint32_t MODULEID; /**< IP identifier, offset: 0xFFC */
-} RNG_Type;
-
-/* ----------------------------------------------------------------------------
- -- RNG Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup RNG_Register_Masks RNG Register Masks
- * @{
- */
-
-/*! @name RANDOM_NUMBER - This register contains a random 32 bit number which is computed on demand, at each time it is read */
-/*! @{ */
-#define RNG_RANDOM_NUMBER_RANDOM_NUMBER_MASK (0xFFFFFFFFU)
-#define RNG_RANDOM_NUMBER_RANDOM_NUMBER_SHIFT (0U)
-/*! RANDOM_NUMBER - This register contains a random 32 bit number which is computed on demand, at each time it is read.
- */
-#define RNG_RANDOM_NUMBER_RANDOM_NUMBER(x) (((uint32_t)(((uint32_t)(x)) << RNG_RANDOM_NUMBER_RANDOM_NUMBER_SHIFT)) & RNG_RANDOM_NUMBER_RANDOM_NUMBER_MASK)
-/*! @} */
-
-/*! @name COUNTER_VAL - */
-/*! @{ */
-#define RNG_COUNTER_VAL_CLK_RATIO_MASK (0xFFU)
-#define RNG_COUNTER_VAL_CLK_RATIO_SHIFT (0U)
-/*! CLK_RATIO - Gives the ratio between the internal clocks frequencies and the register clock
- * frequency for evaluation and certification purposes.
- */
-#define RNG_COUNTER_VAL_CLK_RATIO(x) (((uint32_t)(((uint32_t)(x)) << RNG_COUNTER_VAL_CLK_RATIO_SHIFT)) & RNG_COUNTER_VAL_CLK_RATIO_MASK)
-#define RNG_COUNTER_VAL_REFRESH_CNT_MASK (0x1F00U)
-#define RNG_COUNTER_VAL_REFRESH_CNT_SHIFT (8U)
-/*! REFRESH_CNT - Incremented (till max possible value) each time COUNTER was updated since last reading to any *_NUMBER.
- */
-#define RNG_COUNTER_VAL_REFRESH_CNT(x) (((uint32_t)(((uint32_t)(x)) << RNG_COUNTER_VAL_REFRESH_CNT_SHIFT)) & RNG_COUNTER_VAL_REFRESH_CNT_MASK)
-/*! @} */
-
-/*! @name COUNTER_CFG - */
-/*! @{ */
-#define RNG_COUNTER_CFG_MODE_MASK (0x3U)
-#define RNG_COUNTER_CFG_MODE_SHIFT (0U)
-/*! MODE - 00: disabled 01: update once.
- */
-#define RNG_COUNTER_CFG_MODE(x) (((uint32_t)(((uint32_t)(x)) << RNG_COUNTER_CFG_MODE_SHIFT)) & RNG_COUNTER_CFG_MODE_MASK)
-#define RNG_COUNTER_CFG_CLOCK_SEL_MASK (0x1CU)
-#define RNG_COUNTER_CFG_CLOCK_SEL_SHIFT (2U)
-/*! CLOCK_SEL - Selects the internal clock on which to compute statistics.
- */
-#define RNG_COUNTER_CFG_CLOCK_SEL(x) (((uint32_t)(((uint32_t)(x)) << RNG_COUNTER_CFG_CLOCK_SEL_SHIFT)) & RNG_COUNTER_CFG_CLOCK_SEL_MASK)
-#define RNG_COUNTER_CFG_SHIFT4X_MASK (0xE0U)
-#define RNG_COUNTER_CFG_SHIFT4X_SHIFT (5U)
-/*! SHIFT4X - To be used to add precision to clock_ratio and determine 'entropy refill'.
- */
-#define RNG_COUNTER_CFG_SHIFT4X(x) (((uint32_t)(((uint32_t)(x)) << RNG_COUNTER_CFG_SHIFT4X_SHIFT)) & RNG_COUNTER_CFG_SHIFT4X_MASK)
-/*! @} */
-
-/*! @name ONLINE_TEST_CFG - */
-/*! @{ */
-#define RNG_ONLINE_TEST_CFG_ACTIVATE_MASK (0x1U)
-#define RNG_ONLINE_TEST_CFG_ACTIVATE_SHIFT (0U)
-/*! ACTIVATE - 0: disabled 1: activated Update rythm for VAL depends on COUNTER_CFG if data_sel is set to COUNTER.
- */
-#define RNG_ONLINE_TEST_CFG_ACTIVATE(x) (((uint32_t)(((uint32_t)(x)) << RNG_ONLINE_TEST_CFG_ACTIVATE_SHIFT)) & RNG_ONLINE_TEST_CFG_ACTIVATE_MASK)
-#define RNG_ONLINE_TEST_CFG_DATA_SEL_MASK (0x6U)
-#define RNG_ONLINE_TEST_CFG_DATA_SEL_SHIFT (1U)
-/*! DATA_SEL - Selects source on which to apply online test: 00: LSB of COUNTER: raw data from one
- * or all sources of entropy 01: MSB of COUNTER: raw data from one or all sources of entropy 10:
- * RANDOM_NUMBER 11: ENCRYPTED_NUMBER 'activate' should be set to 'disabled' before changing this
- * field.
- */
-#define RNG_ONLINE_TEST_CFG_DATA_SEL(x) (((uint32_t)(((uint32_t)(x)) << RNG_ONLINE_TEST_CFG_DATA_SEL_SHIFT)) & RNG_ONLINE_TEST_CFG_DATA_SEL_MASK)
-/*! @} */
-
-/*! @name ONLINE_TEST_VAL - */
-/*! @{ */
-#define RNG_ONLINE_TEST_VAL_LIVE_CHI_SQUARED_MASK (0xFU)
-#define RNG_ONLINE_TEST_VAL_LIVE_CHI_SQUARED_SHIFT (0U)
-/*! LIVE_CHI_SQUARED - This value is updated as described in field 'activate'.
- */
-#define RNG_ONLINE_TEST_VAL_LIVE_CHI_SQUARED(x) (((uint32_t)(((uint32_t)(x)) << RNG_ONLINE_TEST_VAL_LIVE_CHI_SQUARED_SHIFT)) & RNG_ONLINE_TEST_VAL_LIVE_CHI_SQUARED_MASK)
-#define RNG_ONLINE_TEST_VAL_MIN_CHI_SQUARED_MASK (0xF0U)
-#define RNG_ONLINE_TEST_VAL_MIN_CHI_SQUARED_SHIFT (4U)
-/*! MIN_CHI_SQUARED - This field is reset when 'activate'==0.
- */
-#define RNG_ONLINE_TEST_VAL_MIN_CHI_SQUARED(x) (((uint32_t)(((uint32_t)(x)) << RNG_ONLINE_TEST_VAL_MIN_CHI_SQUARED_SHIFT)) & RNG_ONLINE_TEST_VAL_MIN_CHI_SQUARED_MASK)
-#define RNG_ONLINE_TEST_VAL_MAX_CHI_SQUARED_MASK (0xF00U)
-#define RNG_ONLINE_TEST_VAL_MAX_CHI_SQUARED_SHIFT (8U)
-/*! MAX_CHI_SQUARED - This field is reset when 'activate'==0.
- */
-#define RNG_ONLINE_TEST_VAL_MAX_CHI_SQUARED(x) (((uint32_t)(((uint32_t)(x)) << RNG_ONLINE_TEST_VAL_MAX_CHI_SQUARED_SHIFT)) & RNG_ONLINE_TEST_VAL_MAX_CHI_SQUARED_MASK)
-/*! @} */
-
-/*! @name MODULEID - IP identifier */
-/*! @{ */
-#define RNG_MODULEID_APERTURE_MASK (0xFFU)
-#define RNG_MODULEID_APERTURE_SHIFT (0U)
-/*! APERTURE - Aperture i.
- */
-#define RNG_MODULEID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << RNG_MODULEID_APERTURE_SHIFT)) & RNG_MODULEID_APERTURE_MASK)
-#define RNG_MODULEID_MIN_REV_MASK (0xF00U)
-#define RNG_MODULEID_MIN_REV_SHIFT (8U)
-/*! MIN_REV - Minor revision i.
- */
-#define RNG_MODULEID_MIN_REV(x) (((uint32_t)(((uint32_t)(x)) << RNG_MODULEID_MIN_REV_SHIFT)) & RNG_MODULEID_MIN_REV_MASK)
-#define RNG_MODULEID_MAJ_REV_MASK (0xF000U)
-#define RNG_MODULEID_MAJ_REV_SHIFT (12U)
-/*! MAJ_REV - Major revision i.
- */
-#define RNG_MODULEID_MAJ_REV(x) (((uint32_t)(((uint32_t)(x)) << RNG_MODULEID_MAJ_REV_SHIFT)) & RNG_MODULEID_MAJ_REV_MASK)
-#define RNG_MODULEID_ID_MASK (0xFFFF0000U)
-#define RNG_MODULEID_ID_SHIFT (16U)
-/*! ID - Identifier.
- */
-#define RNG_MODULEID_ID(x) (((uint32_t)(((uint32_t)(x)) << RNG_MODULEID_ID_SHIFT)) & RNG_MODULEID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group RNG_Register_Masks */
-
-
-/* RNG - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral RNG base address */
- #define RNG_BASE (0x5003A000u)
- /** Peripheral RNG base address */
- #define RNG_BASE_NS (0x4003A000u)
- /** Peripheral RNG base pointer */
- #define RNG ((RNG_Type *)RNG_BASE)
- /** Peripheral RNG base pointer */
- #define RNG_NS ((RNG_Type *)RNG_BASE_NS)
- /** Array initializer of RNG peripheral base addresses */
- #define RNG_BASE_ADDRS { RNG_BASE }
- /** Array initializer of RNG peripheral base pointers */
- #define RNG_BASE_PTRS { RNG }
- /** Array initializer of RNG peripheral base addresses */
- #define RNG_BASE_ADDRS_NS { RNG_BASE_NS }
- /** Array initializer of RNG peripheral base pointers */
- #define RNG_BASE_PTRS_NS { RNG_NS }
-#else
- /** Peripheral RNG base address */
- #define RNG_BASE (0x4003A000u)
- /** Peripheral RNG base pointer */
- #define RNG ((RNG_Type *)RNG_BASE)
- /** Array initializer of RNG peripheral base addresses */
- #define RNG_BASE_ADDRS { RNG_BASE }
- /** Array initializer of RNG peripheral base pointers */
- #define RNG_BASE_PTRS { RNG }
-#endif
-
-/*!
- * @}
- */ /* end of group RNG_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- RTC Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup RTC_Peripheral_Access_Layer RTC Peripheral Access Layer
- * @{
- */
-
-/** RTC - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< RTC control register, offset: 0x0 */
- __IO uint32_t MATCH; /**< RTC match register, offset: 0x4 */
- __IO uint32_t COUNT; /**< RTC counter register, offset: 0x8 */
- __IO uint32_t WAKE; /**< High-resolution/wake-up timer control register, offset: 0xC */
- __I uint32_t SUBSEC; /**< Sub-second counter register, offset: 0x10 */
- uint8_t RESERVED_0[44];
- __IO uint32_t GPREG[8]; /**< General Purpose register, array offset: 0x40, array step: 0x4 */
-} RTC_Type;
-
-/* ----------------------------------------------------------------------------
- -- RTC Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup RTC_Register_Masks RTC Register Masks
- * @{
- */
-
-/*! @name CTRL - RTC control register */
-/*! @{ */
-#define RTC_CTRL_SWRESET_MASK (0x1U)
-#define RTC_CTRL_SWRESET_SHIFT (0U)
-/*! SWRESET - Software reset control
- * 0b0..Not in reset. The RTC is not held in reset. This bit must be cleared prior to configuring or initiating any operation of the RTC.
- * 0b1..In reset. The RTC is held in reset. All register bits within the RTC will be forced to their reset value
- * except the OFD bit. This bit must be cleared before writing to any register in the RTC - including writes
- * to set any of the other bits within this register. Do not attempt to write to any bits of this register at
- * the same time that the reset bit is being cleared.
- */
-#define RTC_CTRL_SWRESET(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_SWRESET_SHIFT)) & RTC_CTRL_SWRESET_MASK)
-#define RTC_CTRL_ALARM1HZ_MASK (0x4U)
-#define RTC_CTRL_ALARM1HZ_SHIFT (2U)
-/*! ALARM1HZ - RTC 1 Hz timer alarm flag status.
- * 0b0..No match. No match has occurred on the 1 Hz RTC timer. Writing a 0 has no effect.
- * 0b1..Match. A match condition has occurred on the 1 Hz RTC timer. This flag generates an RTC alarm interrupt
- * request RTC_ALARM which can also wake up the part from any low power mode. Writing a 1 clears this bit.
- */
-#define RTC_CTRL_ALARM1HZ(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_ALARM1HZ_SHIFT)) & RTC_CTRL_ALARM1HZ_MASK)
-#define RTC_CTRL_WAKE1KHZ_MASK (0x8U)
-#define RTC_CTRL_WAKE1KHZ_SHIFT (3U)
-/*! WAKE1KHZ - RTC 1 kHz timer wake-up flag status.
- * 0b0..Run. The RTC 1 kHz timer is running. Writing a 0 has no effect.
- * 0b1..Time-out. The 1 kHz high-resolution/wake-up timer has timed out. This flag generates an RTC wake-up
- * interrupt request RTC-WAKE which can also wake up the part from any low power mode. Writing a 1 clears this bit.
- */
-#define RTC_CTRL_WAKE1KHZ(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_WAKE1KHZ_SHIFT)) & RTC_CTRL_WAKE1KHZ_MASK)
-#define RTC_CTRL_ALARMDPD_EN_MASK (0x10U)
-#define RTC_CTRL_ALARMDPD_EN_SHIFT (4U)
-/*! ALARMDPD_EN - RTC 1 Hz timer alarm enable for Deep power-down.
- * 0b0..Disable. A match on the 1 Hz RTC timer will not bring the part out of Deep power-down mode.
- * 0b1..Enable. A match on the 1 Hz RTC timer bring the part out of Deep power-down mode.
- */
-#define RTC_CTRL_ALARMDPD_EN(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_ALARMDPD_EN_SHIFT)) & RTC_CTRL_ALARMDPD_EN_MASK)
-#define RTC_CTRL_WAKEDPD_EN_MASK (0x20U)
-#define RTC_CTRL_WAKEDPD_EN_SHIFT (5U)
-/*! WAKEDPD_EN - RTC 1 kHz timer wake-up enable for Deep power-down.
- * 0b0..Disable. A match on the 1 kHz RTC timer will not bring the part out of Deep power-down mode.
- * 0b1..Enable. A match on the 1 kHz RTC timer bring the part out of Deep power-down mode.
- */
-#define RTC_CTRL_WAKEDPD_EN(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_WAKEDPD_EN_SHIFT)) & RTC_CTRL_WAKEDPD_EN_MASK)
-#define RTC_CTRL_RTC1KHZ_EN_MASK (0x40U)
-#define RTC_CTRL_RTC1KHZ_EN_SHIFT (6U)
-/*! RTC1KHZ_EN - RTC 1 kHz clock enable. This bit can be set to 0 to conserve power if the 1 kHz
- * timer is not used. This bit has no effect when the RTC is disabled (bit 7 of this register is 0).
- * 0b0..Disable. A match on the 1 kHz RTC timer will not bring the part out of Deep power-down mode.
- * 0b1..Enable. The 1 kHz RTC timer is enabled.
- */
-#define RTC_CTRL_RTC1KHZ_EN(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_RTC1KHZ_EN_SHIFT)) & RTC_CTRL_RTC1KHZ_EN_MASK)
-#define RTC_CTRL_RTC_EN_MASK (0x80U)
-#define RTC_CTRL_RTC_EN_SHIFT (7U)
-/*! RTC_EN - RTC enable.
- * 0b0..Disable. The RTC 1 Hz and 1 kHz clocks are shut down and the RTC operation is disabled. This bit should
- * be 0 when writing to load a value in the RTC counter register.
- * 0b1..Enable. The 1 Hz RTC clock is running and RTC operation is enabled. This bit must be set to initiate
- * operation of the RTC. The first clock to the RTC counter occurs 1 s after this bit is set. To also enable the
- * high-resolution, 1 kHz clock, set bit 6 in this register.
- */
-#define RTC_CTRL_RTC_EN(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_RTC_EN_SHIFT)) & RTC_CTRL_RTC_EN_MASK)
-#define RTC_CTRL_RTC_OSC_PD_MASK (0x100U)
-#define RTC_CTRL_RTC_OSC_PD_SHIFT (8U)
-/*! RTC_OSC_PD - RTC oscillator power-down control.
- * 0b0..See RTC_OSC_BYPASS
- * 0b1..RTC oscillator is powered-down.
- */
-#define RTC_CTRL_RTC_OSC_PD(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_RTC_OSC_PD_SHIFT)) & RTC_CTRL_RTC_OSC_PD_MASK)
-#define RTC_CTRL_RTC_OSC_BYPASS_MASK (0x200U)
-#define RTC_CTRL_RTC_OSC_BYPASS_SHIFT (9U)
-/*! RTC_OSC_BYPASS - RTC oscillator bypass control.
- * 0b0..The RTC Oscillator operates normally as a crystal oscillator with the crystal connected between the RTC_XTALIN and RTC_XTALOUT pins.
- * 0b1..The RTC Oscillator is in bypass mode. In this mode a clock can be directly input into the RTC_XTALIN pin.
- */
-#define RTC_CTRL_RTC_OSC_BYPASS(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_RTC_OSC_BYPASS_SHIFT)) & RTC_CTRL_RTC_OSC_BYPASS_MASK)
-#define RTC_CTRL_RTC_SUBSEC_ENA_MASK (0x400U)
-#define RTC_CTRL_RTC_SUBSEC_ENA_SHIFT (10U)
-/*! RTC_SUBSEC_ENA - RTC Sub-second counter control.
- * 0b0..The sub-second counter (if implemented) is disabled. This bit is cleared by a system-level POR or BOD
- * reset as well as a by the RTC_ENA bit (bit 7 in this register). On modules not equipped with a sub-second
- * counter, this bit will always read-back as a '0'.
- * 0b1..The 32 KHz sub-second counter is enabled (if implemented). Counting commences on the start of the first
- * one-second interval after this bit is set. Note: This bit can only be set after the RTC_ENA bit (bit 7) is
- * set by a previous write operation. Note: The RTC sub-second counter must be re-enabled whenever the chip
- * exits deep power-down mode.
- */
-#define RTC_CTRL_RTC_SUBSEC_ENA(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_RTC_SUBSEC_ENA_SHIFT)) & RTC_CTRL_RTC_SUBSEC_ENA_MASK)
-/*! @} */
-
-/*! @name MATCH - RTC match register */
-/*! @{ */
-#define RTC_MATCH_MATVAL_MASK (0xFFFFFFFFU)
-#define RTC_MATCH_MATVAL_SHIFT (0U)
-/*! MATVAL - Contains the match value against which the 1 Hz RTC timer will be compared to set the
- * alarm flag RTC_ALARM and generate an alarm interrupt/wake-up if enabled.
- */
-#define RTC_MATCH_MATVAL(x) (((uint32_t)(((uint32_t)(x)) << RTC_MATCH_MATVAL_SHIFT)) & RTC_MATCH_MATVAL_MASK)
-/*! @} */
-
-/*! @name COUNT - RTC counter register */
-/*! @{ */
-#define RTC_COUNT_VAL_MASK (0xFFFFFFFFU)
-#define RTC_COUNT_VAL_SHIFT (0U)
-/*! VAL - A read reflects the current value of the main, 1 Hz RTC timer. A write loads a new initial
- * value into the timer. The RTC counter will count up continuously at a 1 Hz rate once the RTC
- * Software Reset is removed (by clearing bit 0 of the CTRL register). Only write to this
- * register when the RTC_EN bit in the RTC CTRL Register is 0. The counter increments one second after
- * the RTC_EN bit is set.
- */
-#define RTC_COUNT_VAL(x) (((uint32_t)(((uint32_t)(x)) << RTC_COUNT_VAL_SHIFT)) & RTC_COUNT_VAL_MASK)
-/*! @} */
-
-/*! @name WAKE - High-resolution/wake-up timer control register */
-/*! @{ */
-#define RTC_WAKE_VAL_MASK (0xFFFFU)
-#define RTC_WAKE_VAL_SHIFT (0U)
-/*! VAL - A read reflects the current value of the high-resolution/wake-up timer. A write pre-loads
- * a start count value into the wake-up timer and initializes a count-down sequence. Do not write
- * to this register while counting is in progress.
- */
-#define RTC_WAKE_VAL(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAKE_VAL_SHIFT)) & RTC_WAKE_VAL_MASK)
-/*! @} */
-
-/*! @name SUBSEC - Sub-second counter register */
-/*! @{ */
-#define RTC_SUBSEC_SUBSEC_MASK (0x7FFFU)
-#define RTC_SUBSEC_SUBSEC_SHIFT (0U)
-/*! SUBSEC - A read reflects the current value of the 32KHz sub-second counter. This counter is
- * cleared whenever the SUBSEC_ENA bit in the RTC_CONTROL register is low. Up-counting at a 32KHz
- * rate commences at the start of the next one-second interval after the SUBSEC_ENA bit is set. This
- * counter must be re-enabled after exiting deep power-down mode or after the main RTC module is
- * disabled and re-enabled. On modules not equipped with a sub-second counter, this register
- * will read-back as all zeroes.
- */
-#define RTC_SUBSEC_SUBSEC(x) (((uint32_t)(((uint32_t)(x)) << RTC_SUBSEC_SUBSEC_SHIFT)) & RTC_SUBSEC_SUBSEC_MASK)
-/*! @} */
-
-/*! @name GPREG - General Purpose register */
-/*! @{ */
-#define RTC_GPREG_GPDATA_MASK (0xFFFFFFFFU)
-#define RTC_GPREG_GPDATA_SHIFT (0U)
-/*! GPDATA - Data retained during Deep power-down mode or loss of main power as long as VBAT is supplied.
- */
-#define RTC_GPREG_GPDATA(x) (((uint32_t)(((uint32_t)(x)) << RTC_GPREG_GPDATA_SHIFT)) & RTC_GPREG_GPDATA_MASK)
-/*! @} */
-
-/* The count of RTC_GPREG */
-#define RTC_GPREG_COUNT (8U)
-
-
-/*!
- * @}
- */ /* end of group RTC_Register_Masks */
-
-
-/* RTC - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral RTC base address */
- #define RTC_BASE (0x5002C000u)
- /** Peripheral RTC base address */
- #define RTC_BASE_NS (0x4002C000u)
- /** Peripheral RTC base pointer */
- #define RTC ((RTC_Type *)RTC_BASE)
- /** Peripheral RTC base pointer */
- #define RTC_NS ((RTC_Type *)RTC_BASE_NS)
- /** Array initializer of RTC peripheral base addresses */
- #define RTC_BASE_ADDRS { RTC_BASE }
- /** Array initializer of RTC peripheral base pointers */
- #define RTC_BASE_PTRS { RTC }
- /** Array initializer of RTC peripheral base addresses */
- #define RTC_BASE_ADDRS_NS { RTC_BASE_NS }
- /** Array initializer of RTC peripheral base pointers */
- #define RTC_BASE_PTRS_NS { RTC_NS }
-#else
- /** Peripheral RTC base address */
- #define RTC_BASE (0x4002C000u)
- /** Peripheral RTC base pointer */
- #define RTC ((RTC_Type *)RTC_BASE)
- /** Array initializer of RTC peripheral base addresses */
- #define RTC_BASE_ADDRS { RTC_BASE }
- /** Array initializer of RTC peripheral base pointers */
- #define RTC_BASE_PTRS { RTC }
-#endif
-/** Interrupt vectors for the RTC peripheral type */
-#define RTC_IRQS { RTC_IRQn }
-
-/*!
- * @}
- */ /* end of group RTC_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- SCT Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SCT_Peripheral_Access_Layer SCT Peripheral Access Layer
- * @{
- */
-
-/** SCT - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CONFIG; /**< SCT configuration register, offset: 0x0 */
- union { /* offset: 0x4 */
- struct { /* offset: 0x4 */
- __IO uint16_t CTRLL; /**< SCT_CTRLL register, offset: 0x4 */
- __IO uint16_t CTRLH; /**< SCT_CTRLH register, offset: 0x6 */
- } CTRL_ACCESS16BIT;
- __IO uint32_t CTRL; /**< SCT control register, offset: 0x4 */
- };
- union { /* offset: 0x8 */
- struct { /* offset: 0x8 */
- __IO uint16_t LIMITL; /**< SCT_LIMITL register, offset: 0x8 */
- __IO uint16_t LIMITH; /**< SCT_LIMITH register, offset: 0xA */
- } LIMIT_ACCESS16BIT;
- __IO uint32_t LIMIT; /**< SCT limit event select register, offset: 0x8 */
- };
- union { /* offset: 0xC */
- struct { /* offset: 0xC */
- __IO uint16_t HALTL; /**< SCT_HALTL register, offset: 0xC */
- __IO uint16_t HALTH; /**< SCT_HALTH register, offset: 0xE */
- } HALT_ACCESS16BIT;
- __IO uint32_t HALT; /**< SCT halt event select register, offset: 0xC */
- };
- union { /* offset: 0x10 */
- struct { /* offset: 0x10 */
- __IO uint16_t STOPL; /**< SCT_STOPL register, offset: 0x10 */
- __IO uint16_t STOPH; /**< SCT_STOPH register, offset: 0x12 */
- } STOP_ACCESS16BIT;
- __IO uint32_t STOP; /**< SCT stop event select register, offset: 0x10 */
- };
- union { /* offset: 0x14 */
- struct { /* offset: 0x14 */
- __IO uint16_t STARTL; /**< SCT_STARTL register, offset: 0x14 */
- __IO uint16_t STARTH; /**< SCT_STARTH register, offset: 0x16 */
- } START_ACCESS16BIT;
- __IO uint32_t START; /**< SCT start event select register, offset: 0x14 */
- };
- uint8_t RESERVED_0[40];
- union { /* offset: 0x40 */
- struct { /* offset: 0x40 */
- __IO uint16_t COUNTL; /**< SCT_COUNTL register, offset: 0x40 */
- __IO uint16_t COUNTH; /**< SCT_COUNTH register, offset: 0x42 */
- } COUNT_ACCESS16BIT;
- __IO uint32_t COUNT; /**< SCT counter register, offset: 0x40 */
- };
- union { /* offset: 0x44 */
- struct { /* offset: 0x44 */
- __IO uint16_t STATEL; /**< SCT_STATEL register, offset: 0x44 */
- __IO uint16_t STATEH; /**< SCT_STATEH register, offset: 0x46 */
- } STATE_ACCESS16BIT;
- __IO uint32_t STATE; /**< SCT state register, offset: 0x44 */
- };
- __I uint32_t INPUT; /**< SCT input register, offset: 0x48 */
- union { /* offset: 0x4C */
- struct { /* offset: 0x4C */
- __IO uint16_t REGMODEL; /**< SCT_REGMODEL register, offset: 0x4C */
- __IO uint16_t REGMODEH; /**< SCT_REGMODEH register, offset: 0x4E */
- } REGMODE_ACCESS16BIT;
- __IO uint32_t REGMODE; /**< SCT match/capture mode register, offset: 0x4C */
- };
- __IO uint32_t OUTPUT; /**< SCT output register, offset: 0x50 */
- __IO uint32_t OUTPUTDIRCTRL; /**< SCT output counter direction control register, offset: 0x54 */
- __IO uint32_t RES; /**< SCT conflict resolution register, offset: 0x58 */
- __IO uint32_t DMAREQ0; /**< SCT DMA request 0 register, offset: 0x5C */
- __IO uint32_t DMAREQ1; /**< SCT DMA request 1 register, offset: 0x60 */
- uint8_t RESERVED_1[140];
- __IO uint32_t EVEN; /**< SCT event interrupt enable register, offset: 0xF0 */
- __IO uint32_t EVFLAG; /**< SCT event flag register, offset: 0xF4 */
- __IO uint32_t CONEN; /**< SCT conflict interrupt enable register, offset: 0xF8 */
- __IO uint32_t CONFLAG; /**< SCT conflict flag register, offset: 0xFC */
- union { /* offset: 0x100 */
- union { /* offset: 0x100, array step: 0x4 */
- struct { /* offset: 0x100, array step: 0x4 */
- __IO uint16_t CAPL; /**< SCT_CAPL register, array offset: 0x100, array step: 0x4 */
- __IO uint16_t CAPH; /**< SCT_CAPH register, array offset: 0x102, array step: 0x4 */
- } CAP_ACCESS16BIT[16];
- __IO uint32_t CAP[16]; /**< SCT capture register of capture channel, array offset: 0x100, array step: 0x4 */
- };
- union { /* offset: 0x100, array step: 0x4 */
- struct { /* offset: 0x100, array step: 0x4 */
- __IO uint16_t MATCHL; /**< SCT_MATCHL register, array offset: 0x100, array step: 0x4 */
- __IO uint16_t MATCHH; /**< SCT_MATCHH register, array offset: 0x102, array step: 0x4 */
- } MATCH_ACCESS16BIT[16];
- __IO uint32_t MATCH[16]; /**< SCT match value register of match channels, array offset: 0x100, array step: 0x4 */
- };
- };
- uint8_t RESERVED_2[192];
- union { /* offset: 0x200 */
- union { /* offset: 0x200, array step: 0x4 */
- struct { /* offset: 0x200, array step: 0x4 */
- __IO uint16_t CAPCTRLL; /**< SCT_CAPCTRLL register, array offset: 0x200, array step: 0x4 */
- __IO uint16_t CAPCTRLH; /**< SCT_CAPCTRLH register, array offset: 0x202, array step: 0x4 */
- } CAPCTRL_ACCESS16BIT[16];
- __IO uint32_t CAPCTRL[16]; /**< SCT capture control register, array offset: 0x200, array step: 0x4 */
- };
- union { /* offset: 0x200, array step: 0x4 */
- struct { /* offset: 0x200, array step: 0x4 */
- __IO uint16_t MATCHRELL; /**< SCT_MATCHRELL register, array offset: 0x200, array step: 0x4 */
- __IO uint16_t MATCHRELH; /**< SCT_MATCHRELH register, array offset: 0x202, array step: 0x4 */
- } MATCHREL_ACCESS16BIT[16];
- __IO uint32_t MATCHREL[16]; /**< SCT match reload value register, array offset: 0x200, array step: 0x4 */
- };
- };
- uint8_t RESERVED_3[192];
- struct { /* offset: 0x300, array step: 0x8 */
- __IO uint32_t STATE; /**< SCT event state register 0, array offset: 0x300, array step: 0x8 */
- __IO uint32_t CTRL; /**< SCT event control register 0, array offset: 0x304, array step: 0x8 */
- } EV[16];
- uint8_t RESERVED_4[384];
- struct { /* offset: 0x500, array step: 0x8 */
- __IO uint32_t SET; /**< SCT output 0 set register, array offset: 0x500, array step: 0x8 */
- __IO uint32_t CLR; /**< SCT output 0 clear register, array offset: 0x504, array step: 0x8 */
- } OUT[10];
-} SCT_Type;
-
-/* ----------------------------------------------------------------------------
- -- SCT Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SCT_Register_Masks SCT Register Masks
- * @{
- */
-
-/*! @name CONFIG - SCT configuration register */
-/*! @{ */
-#define SCT_CONFIG_UNIFY_MASK (0x1U)
-#define SCT_CONFIG_UNIFY_SHIFT (0U)
-/*! UNIFY - SCT operation
- * 0b0..The SCT operates as two 16-bit counters named COUNTER_L and COUNTER_H.
- * 0b1..The SCT operates as a unified 32-bit counter.
- */
-#define SCT_CONFIG_UNIFY(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_UNIFY_SHIFT)) & SCT_CONFIG_UNIFY_MASK)
-#define SCT_CONFIG_CLKMODE_MASK (0x6U)
-#define SCT_CONFIG_CLKMODE_SHIFT (1U)
-/*! CLKMODE - SCT clock mode
- * 0b00..System Clock Mode. The system clock clocks the entire SCT module including the counter(s) and counter prescalers.
- * 0b01..Sampled System Clock Mode. The system clock clocks the SCT module, but the counter and prescalers are
- * only enabled to count when the designated edge is detected on the input selected by the CKSEL field. The
- * minimum pulse width on the selected clock-gate input is 1 bus clock period. This mode is the
- * high-performance, sampled-clock mode.
- * 0b10..SCT Input Clock Mode. The input/edge selected by the CKSEL field clocks the SCT module, including the
- * counters and prescalers, after first being synchronized to the system clock. The minimum pulse width on the
- * clock input is 1 bus clock period. This mode is the low-power, sampled-clock mode.
- * 0b11..Asynchronous Mode. The entire SCT module is clocked directly by the input/edge selected by the CKSEL
- * field. In this mode, the SCT outputs are switched synchronously to the SCT input clock - not the system
- * clock. The input clock rate must be at least half the system clock rate and can be the same or faster than
- * the system clock.
- */
-#define SCT_CONFIG_CLKMODE(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_CLKMODE_SHIFT)) & SCT_CONFIG_CLKMODE_MASK)
-#define SCT_CONFIG_CKSEL_MASK (0x78U)
-#define SCT_CONFIG_CKSEL_SHIFT (3U)
-/*! CKSEL - SCT clock select. The specific functionality of the designated input/edge is dependent
- * on the CLKMODE bit selection in this register.
- * 0b0000..Rising edges on input 0.
- * 0b0001..Falling edges on input 0.
- * 0b0010..Rising edges on input 1.
- * 0b0011..Falling edges on input 1.
- * 0b0100..Rising edges on input 2.
- * 0b0101..Falling edges on input 2.
- * 0b0110..Rising edges on input 3.
- * 0b0111..Falling edges on input 3.
- * 0b1000..Rising edges on input 4.
- * 0b1001..Falling edges on input 4.
- * 0b1010..Rising edges on input 5.
- * 0b1011..Falling edges on input 5.
- * 0b1100..Rising edges on input 6.
- * 0b1101..Falling edges on input 6.
- * 0b1110..Rising edges on input 7.
- * 0b1111..Falling edges on input 7.
- */
-#define SCT_CONFIG_CKSEL(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_CKSEL_SHIFT)) & SCT_CONFIG_CKSEL_MASK)
-#define SCT_CONFIG_NORELOAD_L_MASK (0x80U)
-#define SCT_CONFIG_NORELOAD_L_SHIFT (7U)
-/*! NORELOAD_L - A 1 in this bit prevents the lower match registers from being reloaded from their
- * respective reload registers. Setting this bit eliminates the need to write to the reload
- * registers MATCHREL if the match values are fixed. Software can write to set or clear this bit at any
- * time. This bit applies to both the higher and lower registers when the UNIFY bit is set.
- */
-#define SCT_CONFIG_NORELOAD_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_NORELOAD_L_SHIFT)) & SCT_CONFIG_NORELOAD_L_MASK)
-#define SCT_CONFIG_NORELOAD_H_MASK (0x100U)
-#define SCT_CONFIG_NORELOAD_H_SHIFT (8U)
-/*! NORELOAD_H - A 1 in this bit prevents the higher match registers from being reloaded from their
- * respective reload registers. Setting this bit eliminates the need to write to the reload
- * registers MATCHREL if the match values are fixed. Software can write to set or clear this bit at
- * any time. This bit is not used when the UNIFY bit is set.
- */
-#define SCT_CONFIG_NORELOAD_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_NORELOAD_H_SHIFT)) & SCT_CONFIG_NORELOAD_H_MASK)
-#define SCT_CONFIG_INSYNC_MASK (0x1E00U)
-#define SCT_CONFIG_INSYNC_SHIFT (9U)
-/*! INSYNC - Synchronization for input N (bit 9 = input 0, bit 10 = input 1,, bit 12 = input 3); all
- * other bits are reserved. A 1 in one of these bits subjects the corresponding input to
- * synchronization to the SCT clock, before it is used to create an event. If an input is known to
- * already be synchronous to the SCT clock, this bit may be set to 0 for faster input response. (Note:
- * The SCT clock is the system clock for CKMODEs 0-2. It is the selected, asynchronous SCT input
- * clock for CKMODE3). Note that the INSYNC field only affects inputs used for event generation.
- * It does not apply to the clock input specified in the CKSEL field.
- */
-#define SCT_CONFIG_INSYNC(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_INSYNC_SHIFT)) & SCT_CONFIG_INSYNC_MASK)
-#define SCT_CONFIG_AUTOLIMIT_L_MASK (0x20000U)
-#define SCT_CONFIG_AUTOLIMIT_L_SHIFT (17U)
-/*! AUTOLIMIT_L - A one in this bit causes a match on match register 0 to be treated as a de-facto
- * LIMIT condition without the need to define an associated event. As with any LIMIT event, this
- * automatic limit causes the counter to be cleared to zero in unidirectional mode or to change
- * the direction of count in bi-directional mode. Software can write to set or clear this bit at
- * any time. This bit applies to both the higher and lower registers when the UNIFY bit is set.
- */
-#define SCT_CONFIG_AUTOLIMIT_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_AUTOLIMIT_L_SHIFT)) & SCT_CONFIG_AUTOLIMIT_L_MASK)
-#define SCT_CONFIG_AUTOLIMIT_H_MASK (0x40000U)
-#define SCT_CONFIG_AUTOLIMIT_H_SHIFT (18U)
-/*! AUTOLIMIT_H - A one in this bit will cause a match on match register 0 to be treated as a
- * de-facto LIMIT condition without the need to define an associated event. As with any LIMIT event,
- * this automatic limit causes the counter to be cleared to zero in unidirectional mode or to
- * change the direction of count in bi-directional mode. Software can write to set or clear this bit
- * at any time. This bit is not used when the UNIFY bit is set.
- */
-#define SCT_CONFIG_AUTOLIMIT_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_AUTOLIMIT_H_SHIFT)) & SCT_CONFIG_AUTOLIMIT_H_MASK)
-/*! @} */
-
-/*! @name CTRLL - SCT_CTRLL register */
-/*! @{ */
-#define SCT_CTRLL_DOWN_L_MASK (0x1U)
-#define SCT_CTRLL_DOWN_L_SHIFT (0U)
-/*! DOWN_L - This bit is 1 when the L or unified counter is counting down. Hardware sets this bit
- * when the counter is counting up, counter limit occurs, and BIDIR = 1.Hardware clears this bit
- * when the counter is counting down and a limit condition occurs or when the counter reaches 0.
- */
-#define SCT_CTRLL_DOWN_L(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLL_DOWN_L_SHIFT)) & SCT_CTRLL_DOWN_L_MASK)
-#define SCT_CTRLL_STOP_L_MASK (0x2U)
-#define SCT_CTRLL_STOP_L_SHIFT (1U)
-/*! STOP_L - When this bit is 1 and HALT is 0, the L or unified counter does not run, but I/O events
- * related to the counter can occur. If a designated start event occurs, this bit is cleared and
- * counting resumes.
- */
-#define SCT_CTRLL_STOP_L(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLL_STOP_L_SHIFT)) & SCT_CTRLL_STOP_L_MASK)
-#define SCT_CTRLL_HALT_L_MASK (0x4U)
-#define SCT_CTRLL_HALT_L_SHIFT (2U)
-/*! HALT_L - When this bit is 1, the L or unified counter does not run and no events can occur. A
- * reset sets this bit. When the HALT_L bit is one, the STOP_L bit is cleared. It is possible to
- * remove the halt condition while keeping the SCT in the stop condition (not running) with a
- * single write to this register to simultaneously clear the HALT bit and set the STOP bit. Once set,
- * only software can clear this bit to restore counter operation. This bit is set on reset.
- */
-#define SCT_CTRLL_HALT_L(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLL_HALT_L_SHIFT)) & SCT_CTRLL_HALT_L_MASK)
-#define SCT_CTRLL_CLRCTR_L_MASK (0x8U)
-#define SCT_CTRLL_CLRCTR_L_SHIFT (3U)
-/*! CLRCTR_L - Writing a 1 to this bit clears the L or unified counter. This bit always reads as 0.
- */
-#define SCT_CTRLL_CLRCTR_L(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLL_CLRCTR_L_SHIFT)) & SCT_CTRLL_CLRCTR_L_MASK)
-#define SCT_CTRLL_BIDIR_L_MASK (0x10U)
-#define SCT_CTRLL_BIDIR_L_SHIFT (4U)
-/*! BIDIR_L - L or unified counter direction select
- * 0b0..Up. The counter counts up to a limit condition, then is cleared to zero.
- * 0b1..Up-down. The counter counts up to a limit, then counts down to a limit condition or to 0.
- */
-#define SCT_CTRLL_BIDIR_L(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLL_BIDIR_L_SHIFT)) & SCT_CTRLL_BIDIR_L_MASK)
-#define SCT_CTRLL_PRE_L_MASK (0x1FE0U)
-#define SCT_CTRLL_PRE_L_SHIFT (5U)
-/*! PRE_L - Specifies the factor by which the SCT clock is prescaled to produce the L or unified
- * counter clock. The counter clock is clocked at the rate of the SCT clock divided by PRE_L+1.
- * Clear the counter (by writing a 1 to the CLRCTR bit) whenever changing the PRE value.
- */
-#define SCT_CTRLL_PRE_L(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLL_PRE_L_SHIFT)) & SCT_CTRLL_PRE_L_MASK)
-/*! @} */
-
-/*! @name CTRLH - SCT_CTRLH register */
-/*! @{ */
-#define SCT_CTRLH_DOWN_H_MASK (0x1U)
-#define SCT_CTRLH_DOWN_H_SHIFT (0U)
-/*! DOWN_H - This bit is 1 when the H counter is counting down. Hardware sets this bit when the
- * counter is counting, a counter limit condition occurs, and BIDIR is 1. Hardware clears this bit
- * when the counter is counting down and a limit condition occurs or when the counter reaches 0.
- */
-#define SCT_CTRLH_DOWN_H(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLH_DOWN_H_SHIFT)) & SCT_CTRLH_DOWN_H_MASK)
-#define SCT_CTRLH_STOP_H_MASK (0x2U)
-#define SCT_CTRLH_STOP_H_SHIFT (1U)
-/*! STOP_H - When this bit is 1 and HALT is 0, the H counter does not, run but I/O events related to
- * the counter can occur. If such an event matches the mask in the Start register, this bit is
- * cleared and counting resumes.
- */
-#define SCT_CTRLH_STOP_H(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLH_STOP_H_SHIFT)) & SCT_CTRLH_STOP_H_MASK)
-#define SCT_CTRLH_HALT_H_MASK (0x4U)
-#define SCT_CTRLH_HALT_H_SHIFT (2U)
-/*! HALT_H - When this bit is 1, the H counter does not run and no events can occur. A reset sets
- * this bit. When the HALT_H bit is one, the STOP_H bit is cleared. It is possible to remove the
- * halt condition while keeping the SCT in the stop condition (not running) with a single write to
- * this register to simultaneously clear the HALT bit and set the STOP bit. Once set, this bit
- * can only be cleared by software to restore counter operation. This bit is set on reset.
- */
-#define SCT_CTRLH_HALT_H(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLH_HALT_H_SHIFT)) & SCT_CTRLH_HALT_H_MASK)
-#define SCT_CTRLH_CLRCTR_H_MASK (0x8U)
-#define SCT_CTRLH_CLRCTR_H_SHIFT (3U)
-/*! CLRCTR_H - Writing a 1 to this bit clears the H counter. This bit always reads as 0.
- */
-#define SCT_CTRLH_CLRCTR_H(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLH_CLRCTR_H_SHIFT)) & SCT_CTRLH_CLRCTR_H_MASK)
-#define SCT_CTRLH_BIDIR_H_MASK (0x10U)
-#define SCT_CTRLH_BIDIR_H_SHIFT (4U)
-/*! BIDIR_H - Direction select
- * 0b0..The H counter counts up to its limit condition, then is cleared to zero.
- * 0b1..The H counter counts up to its limit, then counts down to a limit condition or to 0.
- */
-#define SCT_CTRLH_BIDIR_H(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLH_BIDIR_H_SHIFT)) & SCT_CTRLH_BIDIR_H_MASK)
-#define SCT_CTRLH_PRE_H_MASK (0x1FE0U)
-#define SCT_CTRLH_PRE_H_SHIFT (5U)
-/*! PRE_H - Specifies the factor by which the SCT clock is prescaled to produce the H counter clock.
- * The counter clock is clocked at the rate of the SCT clock divided by PRELH+1. Clear the
- * counter (by writing a 1 to the CLRCTR bit) whenever changing the PRE value.
- */
-#define SCT_CTRLH_PRE_H(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLH_PRE_H_SHIFT)) & SCT_CTRLH_PRE_H_MASK)
-/*! @} */
-
-/*! @name CTRL - SCT control register */
-/*! @{ */
-#define SCT_CTRL_DOWN_L_MASK (0x1U)
-#define SCT_CTRL_DOWN_L_SHIFT (0U)
-/*! DOWN_L - This bit is 1 when the L or unified counter is counting down. Hardware sets this bit
- * when the counter is counting up, counter limit occurs, and BIDIR = 1.Hardware clears this bit
- * when the counter is counting down and a limit condition occurs or when the counter reaches 0.
- */
-#define SCT_CTRL_DOWN_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_DOWN_L_SHIFT)) & SCT_CTRL_DOWN_L_MASK)
-#define SCT_CTRL_STOP_L_MASK (0x2U)
-#define SCT_CTRL_STOP_L_SHIFT (1U)
-/*! STOP_L - When this bit is 1 and HALT is 0, the L or unified counter does not run, but I/O events
- * related to the counter can occur. If a designated start event occurs, this bit is cleared and
- * counting resumes.
- */
-#define SCT_CTRL_STOP_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_STOP_L_SHIFT)) & SCT_CTRL_STOP_L_MASK)
-#define SCT_CTRL_HALT_L_MASK (0x4U)
-#define SCT_CTRL_HALT_L_SHIFT (2U)
-/*! HALT_L - When this bit is 1, the L or unified counter does not run and no events can occur. A
- * reset sets this bit. When the HALT_L bit is one, the STOP_L bit is cleared. It is possible to
- * remove the halt condition while keeping the SCT in the stop condition (not running) with a
- * single write to this register to simultaneously clear the HALT bit and set the STOP bit. Once set,
- * only software can clear this bit to restore counter operation. This bit is set on reset.
- */
-#define SCT_CTRL_HALT_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_HALT_L_SHIFT)) & SCT_CTRL_HALT_L_MASK)
-#define SCT_CTRL_CLRCTR_L_MASK (0x8U)
-#define SCT_CTRL_CLRCTR_L_SHIFT (3U)
-/*! CLRCTR_L - Writing a 1 to this bit clears the L or unified counter. This bit always reads as 0.
- */
-#define SCT_CTRL_CLRCTR_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_CLRCTR_L_SHIFT)) & SCT_CTRL_CLRCTR_L_MASK)
-#define SCT_CTRL_BIDIR_L_MASK (0x10U)
-#define SCT_CTRL_BIDIR_L_SHIFT (4U)
-/*! BIDIR_L - L or unified counter direction select
- * 0b0..Up. The counter counts up to a limit condition, then is cleared to zero.
- * 0b1..Up-down. The counter counts up to a limit, then counts down to a limit condition or to 0.
- */
-#define SCT_CTRL_BIDIR_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_BIDIR_L_SHIFT)) & SCT_CTRL_BIDIR_L_MASK)
-#define SCT_CTRL_PRE_L_MASK (0x1FE0U)
-#define SCT_CTRL_PRE_L_SHIFT (5U)
-/*! PRE_L - Specifies the factor by which the SCT clock is prescaled to produce the L or unified
- * counter clock. The counter clock is clocked at the rate of the SCT clock divided by PRE_L+1.
- * Clear the counter (by writing a 1 to the CLRCTR bit) whenever changing the PRE value.
- */
-#define SCT_CTRL_PRE_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_PRE_L_SHIFT)) & SCT_CTRL_PRE_L_MASK)
-#define SCT_CTRL_DOWN_H_MASK (0x10000U)
-#define SCT_CTRL_DOWN_H_SHIFT (16U)
-/*! DOWN_H - This bit is 1 when the H counter is counting down. Hardware sets this bit when the
- * counter is counting, a counter limit condition occurs, and BIDIR is 1. Hardware clears this bit
- * when the counter is counting down and a limit condition occurs or when the counter reaches 0.
- */
-#define SCT_CTRL_DOWN_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_DOWN_H_SHIFT)) & SCT_CTRL_DOWN_H_MASK)
-#define SCT_CTRL_STOP_H_MASK (0x20000U)
-#define SCT_CTRL_STOP_H_SHIFT (17U)
-/*! STOP_H - When this bit is 1 and HALT is 0, the H counter does not, run but I/O events related to
- * the counter can occur. If such an event matches the mask in the Start register, this bit is
- * cleared and counting resumes.
- */
-#define SCT_CTRL_STOP_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_STOP_H_SHIFT)) & SCT_CTRL_STOP_H_MASK)
-#define SCT_CTRL_HALT_H_MASK (0x40000U)
-#define SCT_CTRL_HALT_H_SHIFT (18U)
-/*! HALT_H - When this bit is 1, the H counter does not run and no events can occur. A reset sets
- * this bit. When the HALT_H bit is one, the STOP_H bit is cleared. It is possible to remove the
- * halt condition while keeping the SCT in the stop condition (not running) with a single write to
- * this register to simultaneously clear the HALT bit and set the STOP bit. Once set, this bit
- * can only be cleared by software to restore counter operation. This bit is set on reset.
- */
-#define SCT_CTRL_HALT_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_HALT_H_SHIFT)) & SCT_CTRL_HALT_H_MASK)
-#define SCT_CTRL_CLRCTR_H_MASK (0x80000U)
-#define SCT_CTRL_CLRCTR_H_SHIFT (19U)
-/*! CLRCTR_H - Writing a 1 to this bit clears the H counter. This bit always reads as 0.
- */
-#define SCT_CTRL_CLRCTR_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_CLRCTR_H_SHIFT)) & SCT_CTRL_CLRCTR_H_MASK)
-#define SCT_CTRL_BIDIR_H_MASK (0x100000U)
-#define SCT_CTRL_BIDIR_H_SHIFT (20U)
-/*! BIDIR_H - Direction select
- * 0b0..The H counter counts up to its limit condition, then is cleared to zero.
- * 0b1..The H counter counts up to its limit, then counts down to a limit condition or to 0.
- */
-#define SCT_CTRL_BIDIR_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_BIDIR_H_SHIFT)) & SCT_CTRL_BIDIR_H_MASK)
-#define SCT_CTRL_PRE_H_MASK (0x1FE00000U)
-#define SCT_CTRL_PRE_H_SHIFT (21U)
-/*! PRE_H - Specifies the factor by which the SCT clock is prescaled to produce the H counter clock.
- * The counter clock is clocked at the rate of the SCT clock divided by PRELH+1. Clear the
- * counter (by writing a 1 to the CLRCTR bit) whenever changing the PRE value.
- */
-#define SCT_CTRL_PRE_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_PRE_H_SHIFT)) & SCT_CTRL_PRE_H_MASK)
-/*! @} */
-
-/*! @name LIMITL - SCT_LIMITL register */
-/*! @{ */
-#define SCT_LIMITL_LIMITL_MASK (0xFFFFU)
-#define SCT_LIMITL_LIMITL_SHIFT (0U)
-#define SCT_LIMITL_LIMITL(x) (((uint16_t)(((uint16_t)(x)) << SCT_LIMITL_LIMITL_SHIFT)) & SCT_LIMITL_LIMITL_MASK)
-/*! @} */
-
-/*! @name LIMITH - SCT_LIMITH register */
-/*! @{ */
-#define SCT_LIMITH_LIMITH_MASK (0xFFFFU)
-#define SCT_LIMITH_LIMITH_SHIFT (0U)
-#define SCT_LIMITH_LIMITH(x) (((uint16_t)(((uint16_t)(x)) << SCT_LIMITH_LIMITH_SHIFT)) & SCT_LIMITH_LIMITH_MASK)
-/*! @} */
-
-/*! @name LIMIT - SCT limit event select register */
-/*! @{ */
-#define SCT_LIMIT_LIMMSK_L_MASK (0xFFFFU)
-#define SCT_LIMIT_LIMMSK_L_SHIFT (0U)
-/*! LIMMSK_L - If bit n is one, event n is used as a counter limit for the L or unified counter
- * (event 0 = bit 0, event 1 = bit 1, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_LIMIT_LIMMSK_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_LIMIT_LIMMSK_L_SHIFT)) & SCT_LIMIT_LIMMSK_L_MASK)
-#define SCT_LIMIT_LIMMSK_H_MASK (0xFFFF0000U)
-#define SCT_LIMIT_LIMMSK_H_SHIFT (16U)
-/*! LIMMSK_H - If bit n is one, event n is used as a counter limit for the H counter (event 0 = bit
- * 16, event 1 = bit 17, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_LIMIT_LIMMSK_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_LIMIT_LIMMSK_H_SHIFT)) & SCT_LIMIT_LIMMSK_H_MASK)
-/*! @} */
-
-/*! @name HALTL - SCT_HALTL register */
-/*! @{ */
-#define SCT_HALTL_HALTL_MASK (0xFFFFU)
-#define SCT_HALTL_HALTL_SHIFT (0U)
-#define SCT_HALTL_HALTL(x) (((uint16_t)(((uint16_t)(x)) << SCT_HALTL_HALTL_SHIFT)) & SCT_HALTL_HALTL_MASK)
-/*! @} */
-
-/*! @name HALTH - SCT_HALTH register */
-/*! @{ */
-#define SCT_HALTH_HALTH_MASK (0xFFFFU)
-#define SCT_HALTH_HALTH_SHIFT (0U)
-#define SCT_HALTH_HALTH(x) (((uint16_t)(((uint16_t)(x)) << SCT_HALTH_HALTH_SHIFT)) & SCT_HALTH_HALTH_MASK)
-/*! @} */
-
-/*! @name HALT - SCT halt event select register */
-/*! @{ */
-#define SCT_HALT_HALTMSK_L_MASK (0xFFFFU)
-#define SCT_HALT_HALTMSK_L_SHIFT (0U)
-/*! HALTMSK_L - If bit n is one, event n sets the HALT_L bit in the CTRL register (event 0 = bit 0,
- * event 1 = bit 1, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_HALT_HALTMSK_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_HALT_HALTMSK_L_SHIFT)) & SCT_HALT_HALTMSK_L_MASK)
-#define SCT_HALT_HALTMSK_H_MASK (0xFFFF0000U)
-#define SCT_HALT_HALTMSK_H_SHIFT (16U)
-/*! HALTMSK_H - If bit n is one, event n sets the HALT_H bit in the CTRL register (event 0 = bit 16,
- * event 1 = bit 17, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_HALT_HALTMSK_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_HALT_HALTMSK_H_SHIFT)) & SCT_HALT_HALTMSK_H_MASK)
-/*! @} */
-
-/*! @name STOPL - SCT_STOPL register */
-/*! @{ */
-#define SCT_STOPL_STOPL_MASK (0xFFFFU)
-#define SCT_STOPL_STOPL_SHIFT (0U)
-#define SCT_STOPL_STOPL(x) (((uint16_t)(((uint16_t)(x)) << SCT_STOPL_STOPL_SHIFT)) & SCT_STOPL_STOPL_MASK)
-/*! @} */
-
-/*! @name STOPH - SCT_STOPH register */
-/*! @{ */
-#define SCT_STOPH_STOPH_MASK (0xFFFFU)
-#define SCT_STOPH_STOPH_SHIFT (0U)
-#define SCT_STOPH_STOPH(x) (((uint16_t)(((uint16_t)(x)) << SCT_STOPH_STOPH_SHIFT)) & SCT_STOPH_STOPH_MASK)
-/*! @} */
-
-/*! @name STOP - SCT stop event select register */
-/*! @{ */
-#define SCT_STOP_STOPMSK_L_MASK (0xFFFFU)
-#define SCT_STOP_STOPMSK_L_SHIFT (0U)
-/*! STOPMSK_L - If bit n is one, event n sets the STOP_L bit in the CTRL register (event 0 = bit 0,
- * event 1 = bit 1, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_STOP_STOPMSK_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_STOP_STOPMSK_L_SHIFT)) & SCT_STOP_STOPMSK_L_MASK)
-#define SCT_STOP_STOPMSK_H_MASK (0xFFFF0000U)
-#define SCT_STOP_STOPMSK_H_SHIFT (16U)
-/*! STOPMSK_H - If bit n is one, event n sets the STOP_H bit in the CTRL register (event 0 = bit 16,
- * event 1 = bit 17, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_STOP_STOPMSK_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_STOP_STOPMSK_H_SHIFT)) & SCT_STOP_STOPMSK_H_MASK)
-/*! @} */
-
-/*! @name STARTL - SCT_STARTL register */
-/*! @{ */
-#define SCT_STARTL_STARTL_MASK (0xFFFFU)
-#define SCT_STARTL_STARTL_SHIFT (0U)
-#define SCT_STARTL_STARTL(x) (((uint16_t)(((uint16_t)(x)) << SCT_STARTL_STARTL_SHIFT)) & SCT_STARTL_STARTL_MASK)
-/*! @} */
-
-/*! @name STARTH - SCT_STARTH register */
-/*! @{ */
-#define SCT_STARTH_STARTH_MASK (0xFFFFU)
-#define SCT_STARTH_STARTH_SHIFT (0U)
-#define SCT_STARTH_STARTH(x) (((uint16_t)(((uint16_t)(x)) << SCT_STARTH_STARTH_SHIFT)) & SCT_STARTH_STARTH_MASK)
-/*! @} */
-
-/*! @name START - SCT start event select register */
-/*! @{ */
-#define SCT_START_STARTMSK_L_MASK (0xFFFFU)
-#define SCT_START_STARTMSK_L_SHIFT (0U)
-/*! STARTMSK_L - If bit n is one, event n clears the STOP_L bit in the CTRL register (event 0 = bit
- * 0, event 1 = bit 1, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_START_STARTMSK_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_START_STARTMSK_L_SHIFT)) & SCT_START_STARTMSK_L_MASK)
-#define SCT_START_STARTMSK_H_MASK (0xFFFF0000U)
-#define SCT_START_STARTMSK_H_SHIFT (16U)
-/*! STARTMSK_H - If bit n is one, event n clears the STOP_H bit in the CTRL register (event 0 = bit
- * 16, event 1 = bit 17, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_START_STARTMSK_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_START_STARTMSK_H_SHIFT)) & SCT_START_STARTMSK_H_MASK)
-/*! @} */
-
-/*! @name COUNTL - SCT_COUNTL register */
-/*! @{ */
-#define SCT_COUNTL_COUNTL_MASK (0xFFFFU)
-#define SCT_COUNTL_COUNTL_SHIFT (0U)
-#define SCT_COUNTL_COUNTL(x) (((uint16_t)(((uint16_t)(x)) << SCT_COUNTL_COUNTL_SHIFT)) & SCT_COUNTL_COUNTL_MASK)
-/*! @} */
-
-/*! @name COUNTH - SCT_COUNTH register */
-/*! @{ */
-#define SCT_COUNTH_COUNTH_MASK (0xFFFFU)
-#define SCT_COUNTH_COUNTH_SHIFT (0U)
-#define SCT_COUNTH_COUNTH(x) (((uint16_t)(((uint16_t)(x)) << SCT_COUNTH_COUNTH_SHIFT)) & SCT_COUNTH_COUNTH_MASK)
-/*! @} */
-
-/*! @name COUNT - SCT counter register */
-/*! @{ */
-#define SCT_COUNT_CTR_L_MASK (0xFFFFU)
-#define SCT_COUNT_CTR_L_SHIFT (0U)
-/*! CTR_L - When UNIFY = 0, read or write the 16-bit L counter value. When UNIFY = 1, read or write
- * the lower 16 bits of the 32-bit unified counter.
- */
-#define SCT_COUNT_CTR_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_COUNT_CTR_L_SHIFT)) & SCT_COUNT_CTR_L_MASK)
-#define SCT_COUNT_CTR_H_MASK (0xFFFF0000U)
-#define SCT_COUNT_CTR_H_SHIFT (16U)
-/*! CTR_H - When UNIFY = 0, read or write the 16-bit H counter value. When UNIFY = 1, read or write
- * the upper 16 bits of the 32-bit unified counter.
- */
-#define SCT_COUNT_CTR_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_COUNT_CTR_H_SHIFT)) & SCT_COUNT_CTR_H_MASK)
-/*! @} */
-
-/*! @name STATEL - SCT_STATEL register */
-/*! @{ */
-#define SCT_STATEL_STATEL_MASK (0xFFFFU)
-#define SCT_STATEL_STATEL_SHIFT (0U)
-#define SCT_STATEL_STATEL(x) (((uint16_t)(((uint16_t)(x)) << SCT_STATEL_STATEL_SHIFT)) & SCT_STATEL_STATEL_MASK)
-/*! @} */
-
-/*! @name STATEH - SCT_STATEH register */
-/*! @{ */
-#define SCT_STATEH_STATEH_MASK (0xFFFFU)
-#define SCT_STATEH_STATEH_SHIFT (0U)
-#define SCT_STATEH_STATEH(x) (((uint16_t)(((uint16_t)(x)) << SCT_STATEH_STATEH_SHIFT)) & SCT_STATEH_STATEH_MASK)
-/*! @} */
-
-/*! @name STATE - SCT state register */
-/*! @{ */
-#define SCT_STATE_STATE_L_MASK (0x1FU)
-#define SCT_STATE_STATE_L_SHIFT (0U)
-/*! STATE_L - State variable.
- */
-#define SCT_STATE_STATE_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_STATE_STATE_L_SHIFT)) & SCT_STATE_STATE_L_MASK)
-#define SCT_STATE_STATE_H_MASK (0x1F0000U)
-#define SCT_STATE_STATE_H_SHIFT (16U)
-/*! STATE_H - State variable.
- */
-#define SCT_STATE_STATE_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_STATE_STATE_H_SHIFT)) & SCT_STATE_STATE_H_MASK)
-/*! @} */
-
-/*! @name INPUT - SCT input register */
-/*! @{ */
-#define SCT_INPUT_AIN0_MASK (0x1U)
-#define SCT_INPUT_AIN0_SHIFT (0U)
-/*! AIN0 - Input 0 state. Input 0 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN0(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN0_SHIFT)) & SCT_INPUT_AIN0_MASK)
-#define SCT_INPUT_AIN1_MASK (0x2U)
-#define SCT_INPUT_AIN1_SHIFT (1U)
-/*! AIN1 - Input 1 state. Input 1 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN1(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN1_SHIFT)) & SCT_INPUT_AIN1_MASK)
-#define SCT_INPUT_AIN2_MASK (0x4U)
-#define SCT_INPUT_AIN2_SHIFT (2U)
-/*! AIN2 - Input 2 state. Input 2 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN2(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN2_SHIFT)) & SCT_INPUT_AIN2_MASK)
-#define SCT_INPUT_AIN3_MASK (0x8U)
-#define SCT_INPUT_AIN3_SHIFT (3U)
-/*! AIN3 - Input 3 state. Input 3 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN3(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN3_SHIFT)) & SCT_INPUT_AIN3_MASK)
-#define SCT_INPUT_AIN4_MASK (0x10U)
-#define SCT_INPUT_AIN4_SHIFT (4U)
-/*! AIN4 - Input 4 state. Input 4 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN4(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN4_SHIFT)) & SCT_INPUT_AIN4_MASK)
-#define SCT_INPUT_AIN5_MASK (0x20U)
-#define SCT_INPUT_AIN5_SHIFT (5U)
-/*! AIN5 - Input 5 state. Input 5 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN5(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN5_SHIFT)) & SCT_INPUT_AIN5_MASK)
-#define SCT_INPUT_AIN6_MASK (0x40U)
-#define SCT_INPUT_AIN6_SHIFT (6U)
-/*! AIN6 - Input 6 state. Input 6 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN6(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN6_SHIFT)) & SCT_INPUT_AIN6_MASK)
-#define SCT_INPUT_AIN7_MASK (0x80U)
-#define SCT_INPUT_AIN7_SHIFT (7U)
-/*! AIN7 - Input 7 state. Input 7 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN7(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN7_SHIFT)) & SCT_INPUT_AIN7_MASK)
-#define SCT_INPUT_AIN8_MASK (0x100U)
-#define SCT_INPUT_AIN8_SHIFT (8U)
-/*! AIN8 - Input 8 state. Input 8 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN8(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN8_SHIFT)) & SCT_INPUT_AIN8_MASK)
-#define SCT_INPUT_AIN9_MASK (0x200U)
-#define SCT_INPUT_AIN9_SHIFT (9U)
-/*! AIN9 - Input 9 state. Input 9 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN9(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN9_SHIFT)) & SCT_INPUT_AIN9_MASK)
-#define SCT_INPUT_AIN10_MASK (0x400U)
-#define SCT_INPUT_AIN10_SHIFT (10U)
-/*! AIN10 - Input 10 state. Input 10 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN10(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN10_SHIFT)) & SCT_INPUT_AIN10_MASK)
-#define SCT_INPUT_AIN11_MASK (0x800U)
-#define SCT_INPUT_AIN11_SHIFT (11U)
-/*! AIN11 - Input 11 state. Input 11 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN11(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN11_SHIFT)) & SCT_INPUT_AIN11_MASK)
-#define SCT_INPUT_AIN12_MASK (0x1000U)
-#define SCT_INPUT_AIN12_SHIFT (12U)
-/*! AIN12 - Input 12 state. Input 12 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN12(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN12_SHIFT)) & SCT_INPUT_AIN12_MASK)
-#define SCT_INPUT_AIN13_MASK (0x2000U)
-#define SCT_INPUT_AIN13_SHIFT (13U)
-/*! AIN13 - Input 13 state. Input 13 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN13(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN13_SHIFT)) & SCT_INPUT_AIN13_MASK)
-#define SCT_INPUT_AIN14_MASK (0x4000U)
-#define SCT_INPUT_AIN14_SHIFT (14U)
-/*! AIN14 - Input 14 state. Input 14 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN14(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN14_SHIFT)) & SCT_INPUT_AIN14_MASK)
-#define SCT_INPUT_AIN15_MASK (0x8000U)
-#define SCT_INPUT_AIN15_SHIFT (15U)
-/*! AIN15 - Input 15 state. Input 15 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN15(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN15_SHIFT)) & SCT_INPUT_AIN15_MASK)
-#define SCT_INPUT_SIN0_MASK (0x10000U)
-#define SCT_INPUT_SIN0_SHIFT (16U)
-/*! SIN0 - Input 0 state. Input 0 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN0(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN0_SHIFT)) & SCT_INPUT_SIN0_MASK)
-#define SCT_INPUT_SIN1_MASK (0x20000U)
-#define SCT_INPUT_SIN1_SHIFT (17U)
-/*! SIN1 - Input 1 state. Input 1 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN1(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN1_SHIFT)) & SCT_INPUT_SIN1_MASK)
-#define SCT_INPUT_SIN2_MASK (0x40000U)
-#define SCT_INPUT_SIN2_SHIFT (18U)
-/*! SIN2 - Input 2 state. Input 2 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN2(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN2_SHIFT)) & SCT_INPUT_SIN2_MASK)
-#define SCT_INPUT_SIN3_MASK (0x80000U)
-#define SCT_INPUT_SIN3_SHIFT (19U)
-/*! SIN3 - Input 3 state. Input 3 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN3(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN3_SHIFT)) & SCT_INPUT_SIN3_MASK)
-#define SCT_INPUT_SIN4_MASK (0x100000U)
-#define SCT_INPUT_SIN4_SHIFT (20U)
-/*! SIN4 - Input 4 state. Input 4 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN4(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN4_SHIFT)) & SCT_INPUT_SIN4_MASK)
-#define SCT_INPUT_SIN5_MASK (0x200000U)
-#define SCT_INPUT_SIN5_SHIFT (21U)
-/*! SIN5 - Input 5 state. Input 5 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN5(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN5_SHIFT)) & SCT_INPUT_SIN5_MASK)
-#define SCT_INPUT_SIN6_MASK (0x400000U)
-#define SCT_INPUT_SIN6_SHIFT (22U)
-/*! SIN6 - Input 6 state. Input 6 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN6(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN6_SHIFT)) & SCT_INPUT_SIN6_MASK)
-#define SCT_INPUT_SIN7_MASK (0x800000U)
-#define SCT_INPUT_SIN7_SHIFT (23U)
-/*! SIN7 - Input 7 state. Input 7 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN7(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN7_SHIFT)) & SCT_INPUT_SIN7_MASK)
-#define SCT_INPUT_SIN8_MASK (0x1000000U)
-#define SCT_INPUT_SIN8_SHIFT (24U)
-/*! SIN8 - Input 8 state. Input 8 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN8(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN8_SHIFT)) & SCT_INPUT_SIN8_MASK)
-#define SCT_INPUT_SIN9_MASK (0x2000000U)
-#define SCT_INPUT_SIN9_SHIFT (25U)
-/*! SIN9 - Input 9 state. Input 9 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN9(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN9_SHIFT)) & SCT_INPUT_SIN9_MASK)
-#define SCT_INPUT_SIN10_MASK (0x4000000U)
-#define SCT_INPUT_SIN10_SHIFT (26U)
-/*! SIN10 - Input 10 state. Input 10 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN10(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN10_SHIFT)) & SCT_INPUT_SIN10_MASK)
-#define SCT_INPUT_SIN11_MASK (0x8000000U)
-#define SCT_INPUT_SIN11_SHIFT (27U)
-/*! SIN11 - Input 11 state. Input 11 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN11(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN11_SHIFT)) & SCT_INPUT_SIN11_MASK)
-#define SCT_INPUT_SIN12_MASK (0x10000000U)
-#define SCT_INPUT_SIN12_SHIFT (28U)
-/*! SIN12 - Input 12 state. Input 12 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN12(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN12_SHIFT)) & SCT_INPUT_SIN12_MASK)
-#define SCT_INPUT_SIN13_MASK (0x20000000U)
-#define SCT_INPUT_SIN13_SHIFT (29U)
-/*! SIN13 - Input 13 state. Input 13 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN13(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN13_SHIFT)) & SCT_INPUT_SIN13_MASK)
-#define SCT_INPUT_SIN14_MASK (0x40000000U)
-#define SCT_INPUT_SIN14_SHIFT (30U)
-/*! SIN14 - Input 14 state. Input 14 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN14(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN14_SHIFT)) & SCT_INPUT_SIN14_MASK)
-#define SCT_INPUT_SIN15_MASK (0x80000000U)
-#define SCT_INPUT_SIN15_SHIFT (31U)
-/*! SIN15 - Input 15 state. Input 15 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN15(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN15_SHIFT)) & SCT_INPUT_SIN15_MASK)
-/*! @} */
-
-/*! @name REGMODEL - SCT_REGMODEL register */
-/*! @{ */
-#define SCT_REGMODEL_REGMODEL_MASK (0xFFFFU)
-#define SCT_REGMODEL_REGMODEL_SHIFT (0U)
-#define SCT_REGMODEL_REGMODEL(x) (((uint16_t)(((uint16_t)(x)) << SCT_REGMODEL_REGMODEL_SHIFT)) & SCT_REGMODEL_REGMODEL_MASK)
-/*! @} */
-
-/*! @name REGMODEH - SCT_REGMODEH register */
-/*! @{ */
-#define SCT_REGMODEH_REGMODEH_MASK (0xFFFFU)
-#define SCT_REGMODEH_REGMODEH_SHIFT (0U)
-#define SCT_REGMODEH_REGMODEH(x) (((uint16_t)(((uint16_t)(x)) << SCT_REGMODEH_REGMODEH_SHIFT)) & SCT_REGMODEH_REGMODEH_MASK)
-/*! @} */
-
-/*! @name REGMODE - SCT match/capture mode register */
-/*! @{ */
-#define SCT_REGMODE_REGMOD_L_MASK (0xFFFFU)
-#define SCT_REGMODE_REGMOD_L_SHIFT (0U)
-/*! REGMOD_L - Each bit controls one match/capture register (register 0 = bit 0, register 1 = bit 1,
- * etc.). The number of bits = number of match/captures in this SCT. 0 = register operates as
- * match register. 1 = register operates as capture register.
- */
-#define SCT_REGMODE_REGMOD_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_REGMODE_REGMOD_L_SHIFT)) & SCT_REGMODE_REGMOD_L_MASK)
-#define SCT_REGMODE_REGMOD_H_MASK (0xFFFF0000U)
-#define SCT_REGMODE_REGMOD_H_SHIFT (16U)
-/*! REGMOD_H - Each bit controls one match/capture register (register 0 = bit 16, register 1 = bit
- * 17, etc.). The number of bits = number of match/captures in this SCT. 0 = register operates as
- * match registers. 1 = register operates as capture registers.
- */
-#define SCT_REGMODE_REGMOD_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_REGMODE_REGMOD_H_SHIFT)) & SCT_REGMODE_REGMOD_H_MASK)
-/*! @} */
-
-/*! @name OUTPUT - SCT output register */
-/*! @{ */
-#define SCT_OUTPUT_OUT_MASK (0xFFFFU)
-#define SCT_OUTPUT_OUT_SHIFT (0U)
-/*! OUT - Writing a 1 to bit n forces the corresponding output HIGH. Writing a 0 forces the
- * corresponding output LOW (output 0 = bit 0, output 1 = bit 1, etc.). The number of bits = number of
- * outputs in this SCT.
- */
-#define SCT_OUTPUT_OUT(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUT_OUT_SHIFT)) & SCT_OUTPUT_OUT_MASK)
-/*! @} */
-
-/*! @name OUTPUTDIRCTRL - SCT output counter direction control register */
-/*! @{ */
-#define SCT_OUTPUTDIRCTRL_SETCLR0_MASK (0x3U)
-#define SCT_OUTPUTDIRCTRL_SETCLR0_SHIFT (0U)
-/*! SETCLR0 - Set/clear operation on output 0. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR0(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR0_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR0_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR1_MASK (0xCU)
-#define SCT_OUTPUTDIRCTRL_SETCLR1_SHIFT (2U)
-/*! SETCLR1 - Set/clear operation on output 1. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR1(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR1_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR1_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR2_MASK (0x30U)
-#define SCT_OUTPUTDIRCTRL_SETCLR2_SHIFT (4U)
-/*! SETCLR2 - Set/clear operation on output 2. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR2(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR2_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR2_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR3_MASK (0xC0U)
-#define SCT_OUTPUTDIRCTRL_SETCLR3_SHIFT (6U)
-/*! SETCLR3 - Set/clear operation on output 3. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR3(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR3_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR3_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR4_MASK (0x300U)
-#define SCT_OUTPUTDIRCTRL_SETCLR4_SHIFT (8U)
-/*! SETCLR4 - Set/clear operation on output 4. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR4(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR4_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR4_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR5_MASK (0xC00U)
-#define SCT_OUTPUTDIRCTRL_SETCLR5_SHIFT (10U)
-/*! SETCLR5 - Set/clear operation on output 5. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR5(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR5_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR5_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR6_MASK (0x3000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR6_SHIFT (12U)
-/*! SETCLR6 - Set/clear operation on output 6. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR6(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR6_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR6_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR7_MASK (0xC000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR7_SHIFT (14U)
-/*! SETCLR7 - Set/clear operation on output 7. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR7(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR7_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR7_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR8_MASK (0x30000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR8_SHIFT (16U)
-/*! SETCLR8 - Set/clear operation on output 8. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR8(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR8_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR8_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR9_MASK (0xC0000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR9_SHIFT (18U)
-/*! SETCLR9 - Set/clear operation on output 9. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR9(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR9_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR9_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR10_MASK (0x300000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR10_SHIFT (20U)
-/*! SETCLR10 - Set/clear operation on output 10. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR10(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR10_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR10_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR11_MASK (0xC00000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR11_SHIFT (22U)
-/*! SETCLR11 - Set/clear operation on output 11. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR11(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR11_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR11_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR12_MASK (0x3000000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR12_SHIFT (24U)
-/*! SETCLR12 - Set/clear operation on output 12. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR12(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR12_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR12_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR13_MASK (0xC000000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR13_SHIFT (26U)
-/*! SETCLR13 - Set/clear operation on output 13. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR13(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR13_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR13_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR14_MASK (0x30000000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR14_SHIFT (28U)
-/*! SETCLR14 - Set/clear operation on output 14. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR14(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR14_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR14_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR15_MASK (0xC0000000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR15_SHIFT (30U)
-/*! SETCLR15 - Set/clear operation on output 15. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR15(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR15_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR15_MASK)
-/*! @} */
-
-/*! @name RES - SCT conflict resolution register */
-/*! @{ */
-#define SCT_RES_O0RES_MASK (0x3U)
-#define SCT_RES_O0RES_SHIFT (0U)
-/*! O0RES - Effect of simultaneous set and clear on output 0.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR0 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR0 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O0RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O0RES_SHIFT)) & SCT_RES_O0RES_MASK)
-#define SCT_RES_O1RES_MASK (0xCU)
-#define SCT_RES_O1RES_SHIFT (2U)
-/*! O1RES - Effect of simultaneous set and clear on output 1.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR1 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR1 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O1RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O1RES_SHIFT)) & SCT_RES_O1RES_MASK)
-#define SCT_RES_O2RES_MASK (0x30U)
-#define SCT_RES_O2RES_SHIFT (4U)
-/*! O2RES - Effect of simultaneous set and clear on output 2.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR2 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output n (or set based on the SETCLR2 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O2RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O2RES_SHIFT)) & SCT_RES_O2RES_MASK)
-#define SCT_RES_O3RES_MASK (0xC0U)
-#define SCT_RES_O3RES_SHIFT (6U)
-/*! O3RES - Effect of simultaneous set and clear on output 3.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR3 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR3 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O3RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O3RES_SHIFT)) & SCT_RES_O3RES_MASK)
-#define SCT_RES_O4RES_MASK (0x300U)
-#define SCT_RES_O4RES_SHIFT (8U)
-/*! O4RES - Effect of simultaneous set and clear on output 4.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR4 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR4 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O4RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O4RES_SHIFT)) & SCT_RES_O4RES_MASK)
-#define SCT_RES_O5RES_MASK (0xC00U)
-#define SCT_RES_O5RES_SHIFT (10U)
-/*! O5RES - Effect of simultaneous set and clear on output 5.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR5 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR5 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O5RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O5RES_SHIFT)) & SCT_RES_O5RES_MASK)
-#define SCT_RES_O6RES_MASK (0x3000U)
-#define SCT_RES_O6RES_SHIFT (12U)
-/*! O6RES - Effect of simultaneous set and clear on output 6.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR6 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR6 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O6RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O6RES_SHIFT)) & SCT_RES_O6RES_MASK)
-#define SCT_RES_O7RES_MASK (0xC000U)
-#define SCT_RES_O7RES_SHIFT (14U)
-/*! O7RES - Effect of simultaneous set and clear on output 7.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR7 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output n (or set based on the SETCLR7 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O7RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O7RES_SHIFT)) & SCT_RES_O7RES_MASK)
-#define SCT_RES_O8RES_MASK (0x30000U)
-#define SCT_RES_O8RES_SHIFT (16U)
-/*! O8RES - Effect of simultaneous set and clear on output 8.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR8 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR8 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O8RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O8RES_SHIFT)) & SCT_RES_O8RES_MASK)
-#define SCT_RES_O9RES_MASK (0xC0000U)
-#define SCT_RES_O9RES_SHIFT (18U)
-/*! O9RES - Effect of simultaneous set and clear on output 9.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR9 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR9 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O9RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O9RES_SHIFT)) & SCT_RES_O9RES_MASK)
-#define SCT_RES_O10RES_MASK (0x300000U)
-#define SCT_RES_O10RES_SHIFT (20U)
-/*! O10RES - Effect of simultaneous set and clear on output 10.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR10 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR10 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O10RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O10RES_SHIFT)) & SCT_RES_O10RES_MASK)
-#define SCT_RES_O11RES_MASK (0xC00000U)
-#define SCT_RES_O11RES_SHIFT (22U)
-/*! O11RES - Effect of simultaneous set and clear on output 11.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR11 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR11 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O11RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O11RES_SHIFT)) & SCT_RES_O11RES_MASK)
-#define SCT_RES_O12RES_MASK (0x3000000U)
-#define SCT_RES_O12RES_SHIFT (24U)
-/*! O12RES - Effect of simultaneous set and clear on output 12.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR12 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR12 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O12RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O12RES_SHIFT)) & SCT_RES_O12RES_MASK)
-#define SCT_RES_O13RES_MASK (0xC000000U)
-#define SCT_RES_O13RES_SHIFT (26U)
-/*! O13RES - Effect of simultaneous set and clear on output 13.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR13 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR13 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O13RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O13RES_SHIFT)) & SCT_RES_O13RES_MASK)
-#define SCT_RES_O14RES_MASK (0x30000000U)
-#define SCT_RES_O14RES_SHIFT (28U)
-/*! O14RES - Effect of simultaneous set and clear on output 14.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR14 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR14 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O14RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O14RES_SHIFT)) & SCT_RES_O14RES_MASK)
-#define SCT_RES_O15RES_MASK (0xC0000000U)
-#define SCT_RES_O15RES_SHIFT (30U)
-/*! O15RES - Effect of simultaneous set and clear on output 15.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR15 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR15 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O15RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O15RES_SHIFT)) & SCT_RES_O15RES_MASK)
-/*! @} */
-
-/*! @name DMAREQ0 - SCT DMA request 0 register */
-/*! @{ */
-#define SCT_DMAREQ0_DEV_0_MASK (0xFFFFU)
-#define SCT_DMAREQ0_DEV_0_SHIFT (0U)
-/*! DEV_0 - If bit n is one, event n triggers DMA request 0 (event 0 = bit 0, event 1 = bit 1,
- * etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_DMAREQ0_DEV_0(x) (((uint32_t)(((uint32_t)(x)) << SCT_DMAREQ0_DEV_0_SHIFT)) & SCT_DMAREQ0_DEV_0_MASK)
-#define SCT_DMAREQ0_DRL0_MASK (0x40000000U)
-#define SCT_DMAREQ0_DRL0_SHIFT (30U)
-/*! DRL0 - A 1 in this bit triggers DMA request 0 when it loads the MATCH_L/Unified registers from the RELOAD_L/Unified registers.
- */
-#define SCT_DMAREQ0_DRL0(x) (((uint32_t)(((uint32_t)(x)) << SCT_DMAREQ0_DRL0_SHIFT)) & SCT_DMAREQ0_DRL0_MASK)
-#define SCT_DMAREQ0_DRQ0_MASK (0x80000000U)
-#define SCT_DMAREQ0_DRQ0_SHIFT (31U)
-/*! DRQ0 - This read-only bit indicates the state of DMA Request 0. Note that if the related DMA
- * channel is enabled and properly set up, it is unlikely that software will see this flag, it will
- * be cleared rapidly by the DMA service. The flag remaining set could point to an issue with DMA
- * setup.
- */
-#define SCT_DMAREQ0_DRQ0(x) (((uint32_t)(((uint32_t)(x)) << SCT_DMAREQ0_DRQ0_SHIFT)) & SCT_DMAREQ0_DRQ0_MASK)
-/*! @} */
-
-/*! @name DMAREQ1 - SCT DMA request 1 register */
-/*! @{ */
-#define SCT_DMAREQ1_DEV_1_MASK (0xFFFFU)
-#define SCT_DMAREQ1_DEV_1_SHIFT (0U)
-/*! DEV_1 - If bit n is one, event n triggers DMA request 1 (event 0 = bit 0, event 1 = bit 1,
- * etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_DMAREQ1_DEV_1(x) (((uint32_t)(((uint32_t)(x)) << SCT_DMAREQ1_DEV_1_SHIFT)) & SCT_DMAREQ1_DEV_1_MASK)
-#define SCT_DMAREQ1_DRL1_MASK (0x40000000U)
-#define SCT_DMAREQ1_DRL1_SHIFT (30U)
-/*! DRL1 - A 1 in this bit triggers DMA request 1 when it loads the Match L/Unified registers from the Reload L/Unified registers.
- */
-#define SCT_DMAREQ1_DRL1(x) (((uint32_t)(((uint32_t)(x)) << SCT_DMAREQ1_DRL1_SHIFT)) & SCT_DMAREQ1_DRL1_MASK)
-#define SCT_DMAREQ1_DRQ1_MASK (0x80000000U)
-#define SCT_DMAREQ1_DRQ1_SHIFT (31U)
-/*! DRQ1 - This read-only bit indicates the state of DMA Request 1. Note that if the related DMA
- * channel is enabled and properly set up, it is unlikely that software will see this flag, it will
- * be cleared rapidly by the DMA service. The flag remaining set could point to an issue with DMA
- * setup.
- */
-#define SCT_DMAREQ1_DRQ1(x) (((uint32_t)(((uint32_t)(x)) << SCT_DMAREQ1_DRQ1_SHIFT)) & SCT_DMAREQ1_DRQ1_MASK)
-/*! @} */
-
-/*! @name EVEN - SCT event interrupt enable register */
-/*! @{ */
-#define SCT_EVEN_IEN_MASK (0xFFFFU)
-#define SCT_EVEN_IEN_SHIFT (0U)
-/*! IEN - The SCT requests an interrupt when bit n of this register and the event flag register are
- * both one (event 0 = bit 0, event 1 = bit 1, etc.). The number of bits = number of events in
- * this SCT.
- */
-#define SCT_EVEN_IEN(x) (((uint32_t)(((uint32_t)(x)) << SCT_EVEN_IEN_SHIFT)) & SCT_EVEN_IEN_MASK)
-/*! @} */
-
-/*! @name EVFLAG - SCT event flag register */
-/*! @{ */
-#define SCT_EVFLAG_FLAG_MASK (0xFFFFU)
-#define SCT_EVFLAG_FLAG_SHIFT (0U)
-/*! FLAG - Bit n is one if event n has occurred since reset or a 1 was last written to this bit
- * (event 0 = bit 0, event 1 = bit 1, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_EVFLAG_FLAG(x) (((uint32_t)(((uint32_t)(x)) << SCT_EVFLAG_FLAG_SHIFT)) & SCT_EVFLAG_FLAG_MASK)
-/*! @} */
-
-/*! @name CONEN - SCT conflict interrupt enable register */
-/*! @{ */
-#define SCT_CONEN_NCEN_MASK (0xFFFFU)
-#define SCT_CONEN_NCEN_SHIFT (0U)
-/*! NCEN - The SCT requests an interrupt when bit n of this register and the SCT conflict flag
- * register are both one (output 0 = bit 0, output 1 = bit 1, etc.). The number of bits = number of
- * outputs in this SCT.
- */
-#define SCT_CONEN_NCEN(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONEN_NCEN_SHIFT)) & SCT_CONEN_NCEN_MASK)
-/*! @} */
-
-/*! @name CONFLAG - SCT conflict flag register */
-/*! @{ */
-#define SCT_CONFLAG_NCFLAG_MASK (0xFFFFU)
-#define SCT_CONFLAG_NCFLAG_SHIFT (0U)
-/*! NCFLAG - Bit n is one if a no-change conflict event occurred on output n since reset or a 1 was
- * last written to this bit (output 0 = bit 0, output 1 = bit 1, etc.). The number of bits =
- * number of outputs in this SCT.
- */
-#define SCT_CONFLAG_NCFLAG(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFLAG_NCFLAG_SHIFT)) & SCT_CONFLAG_NCFLAG_MASK)
-#define SCT_CONFLAG_BUSERRL_MASK (0x40000000U)
-#define SCT_CONFLAG_BUSERRL_SHIFT (30U)
-/*! BUSERRL - The most recent bus error from this SCT involved writing CTR L/Unified, STATE
- * L/Unified, MATCH L/Unified, or the Output register when the L/U counter was not halted. A word write
- * to certain L and H registers can be half successful and half unsuccessful.
- */
-#define SCT_CONFLAG_BUSERRL(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFLAG_BUSERRL_SHIFT)) & SCT_CONFLAG_BUSERRL_MASK)
-#define SCT_CONFLAG_BUSERRH_MASK (0x80000000U)
-#define SCT_CONFLAG_BUSERRH_SHIFT (31U)
-/*! BUSERRH - The most recent bus error from this SCT involved writing CTR H, STATE H, MATCH H, or
- * the Output register when the H counter was not halted.
- */
-#define SCT_CONFLAG_BUSERRH(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFLAG_BUSERRH_SHIFT)) & SCT_CONFLAG_BUSERRH_MASK)
-/*! @} */
-
-/*! @name CAPL - SCT_CAPL register */
-/*! @{ */
-#define SCT_CAPL_CAPL_MASK (0xFFFFU)
-#define SCT_CAPL_CAPL_SHIFT (0U)
-#define SCT_CAPL_CAPL(x) (((uint16_t)(((uint16_t)(x)) << SCT_CAPL_CAPL_SHIFT)) & SCT_CAPL_CAPL_MASK)
-/*! @} */
-
-/* The count of SCT_CAPL */
-#define SCT_CAPL_COUNT (16U)
-
-/*! @name CAPH - SCT_CAPH register */
-/*! @{ */
-#define SCT_CAPH_CAPH_MASK (0xFFFFU)
-#define SCT_CAPH_CAPH_SHIFT (0U)
-#define SCT_CAPH_CAPH(x) (((uint16_t)(((uint16_t)(x)) << SCT_CAPH_CAPH_SHIFT)) & SCT_CAPH_CAPH_MASK)
-/*! @} */
-
-/* The count of SCT_CAPH */
-#define SCT_CAPH_COUNT (16U)
-
-/*! @name CAP - SCT capture register of capture channel */
-/*! @{ */
-#define SCT_CAP_CAPn_L_MASK (0xFFFFU)
-#define SCT_CAP_CAPn_L_SHIFT (0U)
-/*! CAPn_L - When UNIFY = 0, read the 16-bit counter value at which this register was last captured.
- * When UNIFY = 1, read the lower 16 bits of the 32-bit value at which this register was last
- * captured.
- */
-#define SCT_CAP_CAPn_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CAP_CAPn_L_SHIFT)) & SCT_CAP_CAPn_L_MASK)
-#define SCT_CAP_CAPn_H_MASK (0xFFFF0000U)
-#define SCT_CAP_CAPn_H_SHIFT (16U)
-/*! CAPn_H - When UNIFY = 0, read the 16-bit counter value at which this register was last captured.
- * When UNIFY = 1, read the upper 16 bits of the 32-bit value at which this register was last
- * captured.
- */
-#define SCT_CAP_CAPn_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CAP_CAPn_H_SHIFT)) & SCT_CAP_CAPn_H_MASK)
-/*! @} */
-
-/* The count of SCT_CAP */
-#define SCT_CAP_COUNT (16U)
-
-/*! @name MATCHL - SCT_MATCHL register */
-/*! @{ */
-#define SCT_MATCHL_MATCHL_MASK (0xFFFFU)
-#define SCT_MATCHL_MATCHL_SHIFT (0U)
-#define SCT_MATCHL_MATCHL(x) (((uint16_t)(((uint16_t)(x)) << SCT_MATCHL_MATCHL_SHIFT)) & SCT_MATCHL_MATCHL_MASK)
-/*! @} */
-
-/* The count of SCT_MATCHL */
-#define SCT_MATCHL_COUNT (16U)
-
-/*! @name MATCHH - SCT_MATCHH register */
-/*! @{ */
-#define SCT_MATCHH_MATCHH_MASK (0xFFFFU)
-#define SCT_MATCHH_MATCHH_SHIFT (0U)
-#define SCT_MATCHH_MATCHH(x) (((uint16_t)(((uint16_t)(x)) << SCT_MATCHH_MATCHH_SHIFT)) & SCT_MATCHH_MATCHH_MASK)
-/*! @} */
-
-/* The count of SCT_MATCHH */
-#define SCT_MATCHH_COUNT (16U)
-
-/*! @name MATCH - SCT match value register of match channels */
-/*! @{ */
-#define SCT_MATCH_MATCHn_L_MASK (0xFFFFU)
-#define SCT_MATCH_MATCHn_L_SHIFT (0U)
-/*! MATCHn_L - When UNIFY = 0, read or write the 16-bit value to be compared to the L counter. When
- * UNIFY = 1, read or write the lower 16 bits of the 32-bit value to be compared to the unified
- * counter.
- */
-#define SCT_MATCH_MATCHn_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_MATCH_MATCHn_L_SHIFT)) & SCT_MATCH_MATCHn_L_MASK)
-#define SCT_MATCH_MATCHn_H_MASK (0xFFFF0000U)
-#define SCT_MATCH_MATCHn_H_SHIFT (16U)
-/*! MATCHn_H - When UNIFY = 0, read or write the 16-bit value to be compared to the H counter. When
- * UNIFY = 1, read or write the upper 16 bits of the 32-bit value to be compared to the unified
- * counter.
- */
-#define SCT_MATCH_MATCHn_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_MATCH_MATCHn_H_SHIFT)) & SCT_MATCH_MATCHn_H_MASK)
-/*! @} */
-
-/* The count of SCT_MATCH */
-#define SCT_MATCH_COUNT (16U)
-
-/*! @name CAPCTRLL - SCT_CAPCTRLL register */
-/*! @{ */
-#define SCT_CAPCTRLL_CAPCTRLL_MASK (0xFFFFU)
-#define SCT_CAPCTRLL_CAPCTRLL_SHIFT (0U)
-#define SCT_CAPCTRLL_CAPCTRLL(x) (((uint16_t)(((uint16_t)(x)) << SCT_CAPCTRLL_CAPCTRLL_SHIFT)) & SCT_CAPCTRLL_CAPCTRLL_MASK)
-/*! @} */
-
-/* The count of SCT_CAPCTRLL */
-#define SCT_CAPCTRLL_COUNT (16U)
-
-/*! @name CAPCTRLH - SCT_CAPCTRLH register */
-/*! @{ */
-#define SCT_CAPCTRLH_CAPCTRLH_MASK (0xFFFFU)
-#define SCT_CAPCTRLH_CAPCTRLH_SHIFT (0U)
-#define SCT_CAPCTRLH_CAPCTRLH(x) (((uint16_t)(((uint16_t)(x)) << SCT_CAPCTRLH_CAPCTRLH_SHIFT)) & SCT_CAPCTRLH_CAPCTRLH_MASK)
-/*! @} */
-
-/* The count of SCT_CAPCTRLH */
-#define SCT_CAPCTRLH_COUNT (16U)
-
-/*! @name CAPCTRL - SCT capture control register */
-/*! @{ */
-#define SCT_CAPCTRL_CAPCONn_L_MASK (0xFFFFU)
-#define SCT_CAPCTRL_CAPCONn_L_SHIFT (0U)
-/*! CAPCONn_L - If bit m is one, event m causes the CAPn_L (UNIFY = 0) or the CAPn (UNIFY = 1)
- * register to be loaded (event 0 = bit 0, event 1 = bit 1, etc.). The number of bits = number of
- * match/captures in this SCT.
- */
-#define SCT_CAPCTRL_CAPCONn_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CAPCTRL_CAPCONn_L_SHIFT)) & SCT_CAPCTRL_CAPCONn_L_MASK)
-#define SCT_CAPCTRL_CAPCONn_H_MASK (0xFFFF0000U)
-#define SCT_CAPCTRL_CAPCONn_H_SHIFT (16U)
-/*! CAPCONn_H - If bit m is one, event m causes the CAPn_H (UNIFY = 0) register to be loaded (event
- * 0 = bit 16, event 1 = bit 17, etc.). The number of bits = number of match/captures in this SCT.
- */
-#define SCT_CAPCTRL_CAPCONn_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CAPCTRL_CAPCONn_H_SHIFT)) & SCT_CAPCTRL_CAPCONn_H_MASK)
-/*! @} */
-
-/* The count of SCT_CAPCTRL */
-#define SCT_CAPCTRL_COUNT (16U)
-
-/*! @name MATCHRELL - SCT_MATCHRELL register */
-/*! @{ */
-#define SCT_MATCHRELL_MATCHRELL_MASK (0xFFFFU)
-#define SCT_MATCHRELL_MATCHRELL_SHIFT (0U)
-#define SCT_MATCHRELL_MATCHRELL(x) (((uint16_t)(((uint16_t)(x)) << SCT_MATCHRELL_MATCHRELL_SHIFT)) & SCT_MATCHRELL_MATCHRELL_MASK)
-/*! @} */
-
-/* The count of SCT_MATCHRELL */
-#define SCT_MATCHRELL_COUNT (16U)
-
-/*! @name MATCHRELH - SCT_MATCHRELH register */
-/*! @{ */
-#define SCT_MATCHRELH_MATCHRELH_MASK (0xFFFFU)
-#define SCT_MATCHRELH_MATCHRELH_SHIFT (0U)
-#define SCT_MATCHRELH_MATCHRELH(x) (((uint16_t)(((uint16_t)(x)) << SCT_MATCHRELH_MATCHRELH_SHIFT)) & SCT_MATCHRELH_MATCHRELH_MASK)
-/*! @} */
-
-/* The count of SCT_MATCHRELH */
-#define SCT_MATCHRELH_COUNT (16U)
-
-/*! @name MATCHREL - SCT match reload value register */
-/*! @{ */
-#define SCT_MATCHREL_RELOADn_L_MASK (0xFFFFU)
-#define SCT_MATCHREL_RELOADn_L_SHIFT (0U)
-/*! RELOADn_L - When UNIFY = 0, specifies the 16-bit value to be loaded into the MATCHn_L register.
- * When UNIFY = 1, specifies the lower 16 bits of the 32-bit value to be loaded into the MATCHn
- * register.
- */
-#define SCT_MATCHREL_RELOADn_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_MATCHREL_RELOADn_L_SHIFT)) & SCT_MATCHREL_RELOADn_L_MASK)
-#define SCT_MATCHREL_RELOADn_H_MASK (0xFFFF0000U)
-#define SCT_MATCHREL_RELOADn_H_SHIFT (16U)
-/*! RELOADn_H - When UNIFY = 0, specifies the 16-bit to be loaded into the MATCHn_H register. When
- * UNIFY = 1, specifies the upper 16 bits of the 32-bit value to be loaded into the MATCHn
- * register.
- */
-#define SCT_MATCHREL_RELOADn_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_MATCHREL_RELOADn_H_SHIFT)) & SCT_MATCHREL_RELOADn_H_MASK)
-/*! @} */
-
-/* The count of SCT_MATCHREL */
-#define SCT_MATCHREL_COUNT (16U)
-
-/*! @name EV_STATE - SCT event state register 0 */
-/*! @{ */
-#define SCT_EV_STATE_STATEMSKn_MASK (0xFFFFU)
-#define SCT_EV_STATE_STATEMSKn_SHIFT (0U)
-/*! STATEMSKn - If bit m is one, event n happens in state m of the counter selected by the HEVENT
- * bit (n = event number, m = state number; state 0 = bit 0, state 1= bit 1, etc.). The number of
- * bits = number of states in this SCT.
- */
-#define SCT_EV_STATE_STATEMSKn(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_STATE_STATEMSKn_SHIFT)) & SCT_EV_STATE_STATEMSKn_MASK)
-/*! @} */
-
-/* The count of SCT_EV_STATE */
-#define SCT_EV_STATE_COUNT (16U)
-
-/*! @name EV_CTRL - SCT event control register 0 */
-/*! @{ */
-#define SCT_EV_CTRL_MATCHSEL_MASK (0xFU)
-#define SCT_EV_CTRL_MATCHSEL_SHIFT (0U)
-/*! MATCHSEL - Selects the Match register associated with this event (if any). A match can occur
- * only when the counter selected by the HEVENT bit is running.
- */
-#define SCT_EV_CTRL_MATCHSEL(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_MATCHSEL_SHIFT)) & SCT_EV_CTRL_MATCHSEL_MASK)
-#define SCT_EV_CTRL_HEVENT_MASK (0x10U)
-#define SCT_EV_CTRL_HEVENT_SHIFT (4U)
-/*! HEVENT - Select L/H counter. Do not set this bit if UNIFY = 1.
- * 0b0..Selects the L state and the L match register selected by MATCHSEL.
- * 0b1..Selects the H state and the H match register selected by MATCHSEL.
- */
-#define SCT_EV_CTRL_HEVENT(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_HEVENT_SHIFT)) & SCT_EV_CTRL_HEVENT_MASK)
-#define SCT_EV_CTRL_OUTSEL_MASK (0x20U)
-#define SCT_EV_CTRL_OUTSEL_SHIFT (5U)
-/*! OUTSEL - Input/output select
- * 0b0..Selects the inputs selected by IOSEL.
- * 0b1..Selects the outputs selected by IOSEL.
- */
-#define SCT_EV_CTRL_OUTSEL(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_OUTSEL_SHIFT)) & SCT_EV_CTRL_OUTSEL_MASK)
-#define SCT_EV_CTRL_IOSEL_MASK (0x3C0U)
-#define SCT_EV_CTRL_IOSEL_SHIFT (6U)
-/*! IOSEL - Selects the input or output signal number associated with this event (if any). Do not
- * select an input in this register if CKMODE is 1x. In this case the clock input is an implicit
- * ingredient of every event.
- */
-#define SCT_EV_CTRL_IOSEL(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_IOSEL_SHIFT)) & SCT_EV_CTRL_IOSEL_MASK)
-#define SCT_EV_CTRL_IOCOND_MASK (0xC00U)
-#define SCT_EV_CTRL_IOCOND_SHIFT (10U)
-/*! IOCOND - Selects the I/O condition for event n. (The detection of edges on outputs lag the
- * conditions that switch the outputs by one SCT clock). In order to guarantee proper edge/state
- * detection, an input must have a minimum pulse width of at least one SCT clock period .
- * 0b00..LOW
- * 0b01..Rise
- * 0b10..Fall
- * 0b11..HIGH
- */
-#define SCT_EV_CTRL_IOCOND(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_IOCOND_SHIFT)) & SCT_EV_CTRL_IOCOND_MASK)
-#define SCT_EV_CTRL_COMBMODE_MASK (0x3000U)
-#define SCT_EV_CTRL_COMBMODE_SHIFT (12U)
-/*! COMBMODE - Selects how the specified match and I/O condition are used and combined.
- * 0b00..OR. The event occurs when either the specified match or I/O condition occurs.
- * 0b01..MATCH. Uses the specified match only.
- * 0b10..IO. Uses the specified I/O condition only.
- * 0b11..AND. The event occurs when the specified match and I/O condition occur simultaneously.
- */
-#define SCT_EV_CTRL_COMBMODE(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_COMBMODE_SHIFT)) & SCT_EV_CTRL_COMBMODE_MASK)
-#define SCT_EV_CTRL_STATELD_MASK (0x4000U)
-#define SCT_EV_CTRL_STATELD_SHIFT (14U)
-/*! STATELD - This bit controls how the STATEV value modifies the state selected by HEVENT when this
- * event is the highest-numbered event occurring for that state.
- * 0b0..STATEV value is added into STATE (the carry-out is ignored).
- * 0b1..STATEV value is loaded into STATE.
- */
-#define SCT_EV_CTRL_STATELD(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_STATELD_SHIFT)) & SCT_EV_CTRL_STATELD_MASK)
-#define SCT_EV_CTRL_STATEV_MASK (0xF8000U)
-#define SCT_EV_CTRL_STATEV_SHIFT (15U)
-/*! STATEV - This value is loaded into or added to the state selected by HEVENT, depending on
- * STATELD, when this event is the highest-numbered event occurring for that state. If STATELD and
- * STATEV are both zero, there is no change to the STATE value.
- */
-#define SCT_EV_CTRL_STATEV(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_STATEV_SHIFT)) & SCT_EV_CTRL_STATEV_MASK)
-#define SCT_EV_CTRL_MATCHMEM_MASK (0x100000U)
-#define SCT_EV_CTRL_MATCHMEM_SHIFT (20U)
-/*! MATCHMEM - If this bit is one and the COMBMODE field specifies a match component to the
- * triggering of this event, then a match is considered to be active whenever the counter value is
- * GREATER THAN OR EQUAL TO the value specified in the match register when counting up, LESS THEN OR
- * EQUAL TO the match value when counting down. If this bit is zero, a match is only be active
- * during the cycle when the counter is equal to the match value.
- */
-#define SCT_EV_CTRL_MATCHMEM(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_MATCHMEM_SHIFT)) & SCT_EV_CTRL_MATCHMEM_MASK)
-#define SCT_EV_CTRL_DIRECTION_MASK (0x600000U)
-#define SCT_EV_CTRL_DIRECTION_SHIFT (21U)
-/*! DIRECTION - Direction qualifier for event generation. This field only applies when the counters
- * are operating in BIDIR mode. If BIDIR = 0, the SCT ignores this field. Value 0x3 is reserved.
- * 0b00..Direction independent. This event is triggered regardless of the count direction.
- * 0b01..Counting up. This event is triggered only during up-counting when BIDIR = 1.
- * 0b10..Counting down. This event is triggered only during down-counting when BIDIR = 1.
- */
-#define SCT_EV_CTRL_DIRECTION(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_DIRECTION_SHIFT)) & SCT_EV_CTRL_DIRECTION_MASK)
-/*! @} */
-
-/* The count of SCT_EV_CTRL */
-#define SCT_EV_CTRL_COUNT (16U)
-
-/*! @name OUT_SET - SCT output 0 set register */
-/*! @{ */
-#define SCT_OUT_SET_SET_MASK (0xFFFFU)
-#define SCT_OUT_SET_SET_SHIFT (0U)
-/*! SET - A 1 in bit m selects event m to set output n (or clear it if SETCLRn = 0x1 or 0x2) output
- * 0 = bit 0, output 1 = bit 1, etc. The number of bits = number of events in this SCT. When the
- * counter is used in bi-directional mode, it is possible to reverse the action specified by the
- * output set and clear registers when counting down, See the OUTPUTCTRL register.
- */
-#define SCT_OUT_SET_SET(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUT_SET_SET_SHIFT)) & SCT_OUT_SET_SET_MASK)
-/*! @} */
-
-/* The count of SCT_OUT_SET */
-#define SCT_OUT_SET_COUNT (10U)
-
-/*! @name OUT_CLR - SCT output 0 clear register */
-/*! @{ */
-#define SCT_OUT_CLR_CLR_MASK (0xFFFFU)
-#define SCT_OUT_CLR_CLR_SHIFT (0U)
-/*! CLR - A 1 in bit m selects event m to clear output n (or set it if SETCLRn = 0x1 or 0x2) event 0
- * = bit 0, event 1 = bit 1, etc. The number of bits = number of events in this SCT. When the
- * counter is used in bi-directional mode, it is possible to reverse the action specified by the
- * output set and clear registers when counting down, See the OUTPUTCTRL register.
- */
-#define SCT_OUT_CLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUT_CLR_CLR_SHIFT)) & SCT_OUT_CLR_CLR_MASK)
-/*! @} */
-
-/* The count of SCT_OUT_CLR */
-#define SCT_OUT_CLR_COUNT (10U)
-
-
-/*!
- * @}
- */ /* end of group SCT_Register_Masks */
-
-
-/* SCT - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral SCT0 base address */
- #define SCT0_BASE (0x50085000u)
- /** Peripheral SCT0 base address */
- #define SCT0_BASE_NS (0x40085000u)
- /** Peripheral SCT0 base pointer */
- #define SCT0 ((SCT_Type *)SCT0_BASE)
- /** Peripheral SCT0 base pointer */
- #define SCT0_NS ((SCT_Type *)SCT0_BASE_NS)
- /** Array initializer of SCT peripheral base addresses */
- #define SCT_BASE_ADDRS { SCT0_BASE }
- /** Array initializer of SCT peripheral base pointers */
- #define SCT_BASE_PTRS { SCT0 }
- /** Array initializer of SCT peripheral base addresses */
- #define SCT_BASE_ADDRS_NS { SCT0_BASE_NS }
- /** Array initializer of SCT peripheral base pointers */
- #define SCT_BASE_PTRS_NS { SCT0_NS }
-#else
- /** Peripheral SCT0 base address */
- #define SCT0_BASE (0x40085000u)
- /** Peripheral SCT0 base pointer */
- #define SCT0 ((SCT_Type *)SCT0_BASE)
- /** Array initializer of SCT peripheral base addresses */
- #define SCT_BASE_ADDRS { SCT0_BASE }
- /** Array initializer of SCT peripheral base pointers */
- #define SCT_BASE_PTRS { SCT0 }
-#endif
-/** Interrupt vectors for the SCT peripheral type */
-#define SCT_IRQS { SCT0_IRQn }
-
-/*!
- * @}
- */ /* end of group SCT_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- SDIF Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SDIF_Peripheral_Access_Layer SDIF Peripheral Access Layer
- * @{
- */
-
-/** SDIF - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< Control register, offset: 0x0 */
- __IO uint32_t PWREN; /**< Power Enable register, offset: 0x4 */
- __IO uint32_t CLKDIV; /**< Clock Divider register, offset: 0x8 */
- uint8_t RESERVED_0[4];
- __IO uint32_t CLKENA; /**< Clock Enable register, offset: 0x10 */
- __IO uint32_t TMOUT; /**< Time-out register, offset: 0x14 */
- __IO uint32_t CTYPE; /**< Card Type register, offset: 0x18 */
- __IO uint32_t BLKSIZ; /**< Block Size register, offset: 0x1C */
- __IO uint32_t BYTCNT; /**< Byte Count register, offset: 0x20 */
- __IO uint32_t INTMASK; /**< Interrupt Mask register, offset: 0x24 */
- __IO uint32_t CMDARG; /**< Command Argument register, offset: 0x28 */
- __IO uint32_t CMD; /**< Command register, offset: 0x2C */
- __IO uint32_t RESP[4]; /**< Response register, array offset: 0x30, array step: 0x4 */
- __IO uint32_t MINTSTS; /**< Masked Interrupt Status register, offset: 0x40 */
- __IO uint32_t RINTSTS; /**< Raw Interrupt Status register, offset: 0x44 */
- __IO uint32_t STATUS; /**< Status register, offset: 0x48 */
- __IO uint32_t FIFOTH; /**< FIFO Threshold Watermark register, offset: 0x4C */
- __IO uint32_t CDETECT; /**< Card Detect register, offset: 0x50 */
- __IO uint32_t WRTPRT; /**< Write Protect register, offset: 0x54 */
- uint8_t RESERVED_1[4];
- __IO uint32_t TCBCNT; /**< Transferred CIU Card Byte Count register, offset: 0x5C */
- __IO uint32_t TBBCNT; /**< Transferred Host to BIU-FIFO Byte Count register, offset: 0x60 */
- __IO uint32_t DEBNCE; /**< Debounce Count register, offset: 0x64 */
- uint8_t RESERVED_2[16];
- __IO uint32_t RST_N; /**< Hardware Reset, offset: 0x78 */
- uint8_t RESERVED_3[4];
- __IO uint32_t BMOD; /**< Bus Mode register, offset: 0x80 */
- __IO uint32_t PLDMND; /**< Poll Demand register, offset: 0x84 */
- __IO uint32_t DBADDR; /**< Descriptor List Base Address register, offset: 0x88 */
- __IO uint32_t IDSTS; /**< Internal DMAC Status register, offset: 0x8C */
- __IO uint32_t IDINTEN; /**< Internal DMAC Interrupt Enable register, offset: 0x90 */
- __IO uint32_t DSCADDR; /**< Current Host Descriptor Address register, offset: 0x94 */
- __IO uint32_t BUFADDR; /**< Current Buffer Descriptor Address register, offset: 0x98 */
- uint8_t RESERVED_4[100];
- __IO uint32_t CARDTHRCTL; /**< Card Threshold Control, offset: 0x100 */
- __IO uint32_t BACKENDPWR; /**< Power control, offset: 0x104 */
- uint8_t RESERVED_5[248];
- __IO uint32_t FIFO[64]; /**< SDIF FIFO, array offset: 0x200, array step: 0x4 */
-} SDIF_Type;
-
-/* ----------------------------------------------------------------------------
- -- SDIF Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SDIF_Register_Masks SDIF Register Masks
- * @{
- */
-
-/*! @name CTRL - Control register */
-/*! @{ */
-#define SDIF_CTRL_CONTROLLER_RESET_MASK (0x1U)
-#define SDIF_CTRL_CONTROLLER_RESET_SHIFT (0U)
-/*! CONTROLLER_RESET - Controller reset.
- */
-#define SDIF_CTRL_CONTROLLER_RESET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_CONTROLLER_RESET_SHIFT)) & SDIF_CTRL_CONTROLLER_RESET_MASK)
-#define SDIF_CTRL_FIFO_RESET_MASK (0x2U)
-#define SDIF_CTRL_FIFO_RESET_SHIFT (1U)
-/*! FIFO_RESET - Fifo reset.
- */
-#define SDIF_CTRL_FIFO_RESET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_FIFO_RESET_SHIFT)) & SDIF_CTRL_FIFO_RESET_MASK)
-#define SDIF_CTRL_DMA_RESET_MASK (0x4U)
-#define SDIF_CTRL_DMA_RESET_SHIFT (2U)
-/*! DMA_RESET - DMA reset.
- */
-#define SDIF_CTRL_DMA_RESET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_DMA_RESET_SHIFT)) & SDIF_CTRL_DMA_RESET_MASK)
-#define SDIF_CTRL_INT_ENABLE_MASK (0x10U)
-#define SDIF_CTRL_INT_ENABLE_SHIFT (4U)
-/*! INT_ENABLE - Global interrupt enable/disable bit.
- */
-#define SDIF_CTRL_INT_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_INT_ENABLE_SHIFT)) & SDIF_CTRL_INT_ENABLE_MASK)
-#define SDIF_CTRL_READ_WAIT_MASK (0x40U)
-#define SDIF_CTRL_READ_WAIT_SHIFT (6U)
-/*! READ_WAIT - Read/wait.
- */
-#define SDIF_CTRL_READ_WAIT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_READ_WAIT_SHIFT)) & SDIF_CTRL_READ_WAIT_MASK)
-#define SDIF_CTRL_SEND_IRQ_RESPONSE_MASK (0x80U)
-#define SDIF_CTRL_SEND_IRQ_RESPONSE_SHIFT (7U)
-/*! SEND_IRQ_RESPONSE - Send irq response.
- */
-#define SDIF_CTRL_SEND_IRQ_RESPONSE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_SEND_IRQ_RESPONSE_SHIFT)) & SDIF_CTRL_SEND_IRQ_RESPONSE_MASK)
-#define SDIF_CTRL_ABORT_READ_DATA_MASK (0x100U)
-#define SDIF_CTRL_ABORT_READ_DATA_SHIFT (8U)
-/*! ABORT_READ_DATA - Abort read data.
- */
-#define SDIF_CTRL_ABORT_READ_DATA(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_ABORT_READ_DATA_SHIFT)) & SDIF_CTRL_ABORT_READ_DATA_MASK)
-#define SDIF_CTRL_SEND_CCSD_MASK (0x200U)
-#define SDIF_CTRL_SEND_CCSD_SHIFT (9U)
-/*! SEND_CCSD - Send ccsd.
- */
-#define SDIF_CTRL_SEND_CCSD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_SEND_CCSD_SHIFT)) & SDIF_CTRL_SEND_CCSD_MASK)
-#define SDIF_CTRL_SEND_AUTO_STOP_CCSD_MASK (0x400U)
-#define SDIF_CTRL_SEND_AUTO_STOP_CCSD_SHIFT (10U)
-/*! SEND_AUTO_STOP_CCSD - Send auto stop ccsd.
- */
-#define SDIF_CTRL_SEND_AUTO_STOP_CCSD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_SEND_AUTO_STOP_CCSD_SHIFT)) & SDIF_CTRL_SEND_AUTO_STOP_CCSD_MASK)
-#define SDIF_CTRL_CEATA_DEVICE_INTERRUPT_STATUS_MASK (0x800U)
-#define SDIF_CTRL_CEATA_DEVICE_INTERRUPT_STATUS_SHIFT (11U)
-/*! CEATA_DEVICE_INTERRUPT_STATUS - CEATA device interrupt status.
- */
-#define SDIF_CTRL_CEATA_DEVICE_INTERRUPT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_CEATA_DEVICE_INTERRUPT_STATUS_SHIFT)) & SDIF_CTRL_CEATA_DEVICE_INTERRUPT_STATUS_MASK)
-#define SDIF_CTRL_CARD_VOLTAGE_A0_MASK (0x10000U)
-#define SDIF_CTRL_CARD_VOLTAGE_A0_SHIFT (16U)
-/*! CARD_VOLTAGE_A0 - Controls the state of the SD_VOLT0 pin.
- */
-#define SDIF_CTRL_CARD_VOLTAGE_A0(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_CARD_VOLTAGE_A0_SHIFT)) & SDIF_CTRL_CARD_VOLTAGE_A0_MASK)
-#define SDIF_CTRL_CARD_VOLTAGE_A1_MASK (0x20000U)
-#define SDIF_CTRL_CARD_VOLTAGE_A1_SHIFT (17U)
-/*! CARD_VOLTAGE_A1 - Controls the state of the SD_VOLT1 pin.
- */
-#define SDIF_CTRL_CARD_VOLTAGE_A1(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_CARD_VOLTAGE_A1_SHIFT)) & SDIF_CTRL_CARD_VOLTAGE_A1_MASK)
-#define SDIF_CTRL_CARD_VOLTAGE_A2_MASK (0x40000U)
-#define SDIF_CTRL_CARD_VOLTAGE_A2_SHIFT (18U)
-/*! CARD_VOLTAGE_A2 - Controls the state of the SD_VOLT2 pin.
- */
-#define SDIF_CTRL_CARD_VOLTAGE_A2(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_CARD_VOLTAGE_A2_SHIFT)) & SDIF_CTRL_CARD_VOLTAGE_A2_MASK)
-#define SDIF_CTRL_USE_INTERNAL_DMAC_MASK (0x2000000U)
-#define SDIF_CTRL_USE_INTERNAL_DMAC_SHIFT (25U)
-/*! USE_INTERNAL_DMAC - SD/MMC DMA use.
- */
-#define SDIF_CTRL_USE_INTERNAL_DMAC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_USE_INTERNAL_DMAC_SHIFT)) & SDIF_CTRL_USE_INTERNAL_DMAC_MASK)
-/*! @} */
-
-/*! @name PWREN - Power Enable register */
-/*! @{ */
-#define SDIF_PWREN_POWER_ENABLE0_MASK (0x1U)
-#define SDIF_PWREN_POWER_ENABLE0_SHIFT (0U)
-/*! POWER_ENABLE0 - Power on/off switch for card 0; once power is turned on, software should wait
- * for regulator/switch ramp-up time before trying to initialize card 0.
- */
-#define SDIF_PWREN_POWER_ENABLE0(x) (((uint32_t)(((uint32_t)(x)) << SDIF_PWREN_POWER_ENABLE0_SHIFT)) & SDIF_PWREN_POWER_ENABLE0_MASK)
-#define SDIF_PWREN_POWER_ENABLE1_MASK (0x2U)
-#define SDIF_PWREN_POWER_ENABLE1_SHIFT (1U)
-/*! POWER_ENABLE1 - Power on/off switch for card 1; once power is turned on, software should wait
- * for regulator/switch ramp-up time before trying to initialize card 1.
- */
-#define SDIF_PWREN_POWER_ENABLE1(x) (((uint32_t)(((uint32_t)(x)) << SDIF_PWREN_POWER_ENABLE1_SHIFT)) & SDIF_PWREN_POWER_ENABLE1_MASK)
-/*! @} */
-
-/*! @name CLKDIV - Clock Divider register */
-/*! @{ */
-#define SDIF_CLKDIV_CLK_DIVIDER0_MASK (0xFFU)
-#define SDIF_CLKDIV_CLK_DIVIDER0_SHIFT (0U)
-/*! CLK_DIVIDER0 - Clock divider-0 value.
- */
-#define SDIF_CLKDIV_CLK_DIVIDER0(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CLKDIV_CLK_DIVIDER0_SHIFT)) & SDIF_CLKDIV_CLK_DIVIDER0_MASK)
-/*! @} */
-
-/*! @name CLKENA - Clock Enable register */
-/*! @{ */
-#define SDIF_CLKENA_CCLK0_ENABLE_MASK (0x1U)
-#define SDIF_CLKENA_CCLK0_ENABLE_SHIFT (0U)
-/*! CCLK0_ENABLE - Clock-enable control for SD card 0 clock.
- */
-#define SDIF_CLKENA_CCLK0_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CLKENA_CCLK0_ENABLE_SHIFT)) & SDIF_CLKENA_CCLK0_ENABLE_MASK)
-#define SDIF_CLKENA_CCLK1_ENABLE_MASK (0x2U)
-#define SDIF_CLKENA_CCLK1_ENABLE_SHIFT (1U)
-/*! CCLK1_ENABLE - Clock-enable control for SD card 1 clock.
- */
-#define SDIF_CLKENA_CCLK1_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CLKENA_CCLK1_ENABLE_SHIFT)) & SDIF_CLKENA_CCLK1_ENABLE_MASK)
-#define SDIF_CLKENA_CCLK0_LOW_POWER_MASK (0x10000U)
-#define SDIF_CLKENA_CCLK0_LOW_POWER_SHIFT (16U)
-/*! CCLK0_LOW_POWER - Low-power control for SD card 0 clock.
- */
-#define SDIF_CLKENA_CCLK0_LOW_POWER(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CLKENA_CCLK0_LOW_POWER_SHIFT)) & SDIF_CLKENA_CCLK0_LOW_POWER_MASK)
-#define SDIF_CLKENA_CCLK1_LOW_POWER_MASK (0x20000U)
-#define SDIF_CLKENA_CCLK1_LOW_POWER_SHIFT (17U)
-/*! CCLK1_LOW_POWER - Low-power control for SD card 1 clock.
- */
-#define SDIF_CLKENA_CCLK1_LOW_POWER(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CLKENA_CCLK1_LOW_POWER_SHIFT)) & SDIF_CLKENA_CCLK1_LOW_POWER_MASK)
-/*! @} */
-
-/*! @name TMOUT - Time-out register */
-/*! @{ */
-#define SDIF_TMOUT_RESPONSE_TIMEOUT_MASK (0xFFU)
-#define SDIF_TMOUT_RESPONSE_TIMEOUT_SHIFT (0U)
-/*! RESPONSE_TIMEOUT - Response time-out value.
- */
-#define SDIF_TMOUT_RESPONSE_TIMEOUT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_TMOUT_RESPONSE_TIMEOUT_SHIFT)) & SDIF_TMOUT_RESPONSE_TIMEOUT_MASK)
-#define SDIF_TMOUT_DATA_TIMEOUT_MASK (0xFFFFFF00U)
-#define SDIF_TMOUT_DATA_TIMEOUT_SHIFT (8U)
-/*! DATA_TIMEOUT - Value for card Data Read time-out; same value also used for Data Starvation by Host time-out.
- */
-#define SDIF_TMOUT_DATA_TIMEOUT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_TMOUT_DATA_TIMEOUT_SHIFT)) & SDIF_TMOUT_DATA_TIMEOUT_MASK)
-/*! @} */
-
-/*! @name CTYPE - Card Type register */
-/*! @{ */
-#define SDIF_CTYPE_CARD0_WIDTH0_MASK (0x1U)
-#define SDIF_CTYPE_CARD0_WIDTH0_SHIFT (0U)
-/*! CARD0_WIDTH0 - Indicates if card 0 is 1-bit or 4-bit: 0 - 1-bit mode 1 - 4-bit mode 1 and 4-bit
- * modes only work when 8-bit mode in CARD0_WIDTH1 is not enabled (bit 16 in this register is set
- * to 0).
- */
-#define SDIF_CTYPE_CARD0_WIDTH0(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTYPE_CARD0_WIDTH0_SHIFT)) & SDIF_CTYPE_CARD0_WIDTH0_MASK)
-#define SDIF_CTYPE_CARD1_WIDTH0_MASK (0x2U)
-#define SDIF_CTYPE_CARD1_WIDTH0_SHIFT (1U)
-/*! CARD1_WIDTH0 - Indicates if card 1 is 1-bit or 4-bit: 0 - 1-bit mode 1 - 4-bit mode 1 and 4-bit
- * modes only work when 8-bit mode in CARD1_WIDTH1 is not enabled (bit 16 in this register is set
- * to 0).
- */
-#define SDIF_CTYPE_CARD1_WIDTH0(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTYPE_CARD1_WIDTH0_SHIFT)) & SDIF_CTYPE_CARD1_WIDTH0_MASK)
-#define SDIF_CTYPE_CARD0_WIDTH1_MASK (0x10000U)
-#define SDIF_CTYPE_CARD0_WIDTH1_SHIFT (16U)
-/*! CARD0_WIDTH1 - Indicates if card 0 is 8-bit: 0 - Non 8-bit mode 1 - 8-bit mode.
- */
-#define SDIF_CTYPE_CARD0_WIDTH1(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTYPE_CARD0_WIDTH1_SHIFT)) & SDIF_CTYPE_CARD0_WIDTH1_MASK)
-#define SDIF_CTYPE_CARD1_WIDTH1_MASK (0x20000U)
-#define SDIF_CTYPE_CARD1_WIDTH1_SHIFT (17U)
-/*! CARD1_WIDTH1 - Indicates if card 1 is 8-bit: 0 - Non 8-bit mode 1 - 8-bit mode.
- */
-#define SDIF_CTYPE_CARD1_WIDTH1(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTYPE_CARD1_WIDTH1_SHIFT)) & SDIF_CTYPE_CARD1_WIDTH1_MASK)
-/*! @} */
-
-/*! @name BLKSIZ - Block Size register */
-/*! @{ */
-#define SDIF_BLKSIZ_BLOCK_SIZE_MASK (0xFFFFU)
-#define SDIF_BLKSIZ_BLOCK_SIZE_SHIFT (0U)
-/*! BLOCK_SIZE - Block size.
- */
-#define SDIF_BLKSIZ_BLOCK_SIZE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BLKSIZ_BLOCK_SIZE_SHIFT)) & SDIF_BLKSIZ_BLOCK_SIZE_MASK)
-/*! @} */
-
-/*! @name BYTCNT - Byte Count register */
-/*! @{ */
-#define SDIF_BYTCNT_BYTE_COUNT_MASK (0xFFFFFFFFU)
-#define SDIF_BYTCNT_BYTE_COUNT_SHIFT (0U)
-/*! BYTE_COUNT - Number of bytes to be transferred; should be integer multiple of Block Size for block transfers.
- */
-#define SDIF_BYTCNT_BYTE_COUNT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BYTCNT_BYTE_COUNT_SHIFT)) & SDIF_BYTCNT_BYTE_COUNT_MASK)
-/*! @} */
-
-/*! @name INTMASK - Interrupt Mask register */
-/*! @{ */
-#define SDIF_INTMASK_CDET_MASK (0x1U)
-#define SDIF_INTMASK_CDET_SHIFT (0U)
-/*! CDET - Card detect.
- */
-#define SDIF_INTMASK_CDET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_CDET_SHIFT)) & SDIF_INTMASK_CDET_MASK)
-#define SDIF_INTMASK_RE_MASK (0x2U)
-#define SDIF_INTMASK_RE_SHIFT (1U)
-/*! RE - Response error.
- */
-#define SDIF_INTMASK_RE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_RE_SHIFT)) & SDIF_INTMASK_RE_MASK)
-#define SDIF_INTMASK_CDONE_MASK (0x4U)
-#define SDIF_INTMASK_CDONE_SHIFT (2U)
-/*! CDONE - Command done.
- */
-#define SDIF_INTMASK_CDONE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_CDONE_SHIFT)) & SDIF_INTMASK_CDONE_MASK)
-#define SDIF_INTMASK_DTO_MASK (0x8U)
-#define SDIF_INTMASK_DTO_SHIFT (3U)
-/*! DTO - Data transfer over.
- */
-#define SDIF_INTMASK_DTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_DTO_SHIFT)) & SDIF_INTMASK_DTO_MASK)
-#define SDIF_INTMASK_TXDR_MASK (0x10U)
-#define SDIF_INTMASK_TXDR_SHIFT (4U)
-/*! TXDR - Transmit FIFO data request.
- */
-#define SDIF_INTMASK_TXDR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_TXDR_SHIFT)) & SDIF_INTMASK_TXDR_MASK)
-#define SDIF_INTMASK_RXDR_MASK (0x20U)
-#define SDIF_INTMASK_RXDR_SHIFT (5U)
-/*! RXDR - Receive FIFO data request.
- */
-#define SDIF_INTMASK_RXDR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_RXDR_SHIFT)) & SDIF_INTMASK_RXDR_MASK)
-#define SDIF_INTMASK_RCRC_MASK (0x40U)
-#define SDIF_INTMASK_RCRC_SHIFT (6U)
-/*! RCRC - Response CRC error.
- */
-#define SDIF_INTMASK_RCRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_RCRC_SHIFT)) & SDIF_INTMASK_RCRC_MASK)
-#define SDIF_INTMASK_DCRC_MASK (0x80U)
-#define SDIF_INTMASK_DCRC_SHIFT (7U)
-/*! DCRC - Data CRC error.
- */
-#define SDIF_INTMASK_DCRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_DCRC_SHIFT)) & SDIF_INTMASK_DCRC_MASK)
-#define SDIF_INTMASK_RTO_MASK (0x100U)
-#define SDIF_INTMASK_RTO_SHIFT (8U)
-/*! RTO - Response time-out.
- */
-#define SDIF_INTMASK_RTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_RTO_SHIFT)) & SDIF_INTMASK_RTO_MASK)
-#define SDIF_INTMASK_DRTO_MASK (0x200U)
-#define SDIF_INTMASK_DRTO_SHIFT (9U)
-/*! DRTO - Data read time-out.
- */
-#define SDIF_INTMASK_DRTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_DRTO_SHIFT)) & SDIF_INTMASK_DRTO_MASK)
-#define SDIF_INTMASK_HTO_MASK (0x400U)
-#define SDIF_INTMASK_HTO_SHIFT (10U)
-/*! HTO - Data starvation-by-host time-out (HTO).
- */
-#define SDIF_INTMASK_HTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_HTO_SHIFT)) & SDIF_INTMASK_HTO_MASK)
-#define SDIF_INTMASK_FRUN_MASK (0x800U)
-#define SDIF_INTMASK_FRUN_SHIFT (11U)
-/*! FRUN - FIFO underrun/overrun error.
- */
-#define SDIF_INTMASK_FRUN(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_FRUN_SHIFT)) & SDIF_INTMASK_FRUN_MASK)
-#define SDIF_INTMASK_HLE_MASK (0x1000U)
-#define SDIF_INTMASK_HLE_SHIFT (12U)
-/*! HLE - Hardware locked write error.
- */
-#define SDIF_INTMASK_HLE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_HLE_SHIFT)) & SDIF_INTMASK_HLE_MASK)
-#define SDIF_INTMASK_SBE_MASK (0x2000U)
-#define SDIF_INTMASK_SBE_SHIFT (13U)
-/*! SBE - Start-bit error.
- */
-#define SDIF_INTMASK_SBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_SBE_SHIFT)) & SDIF_INTMASK_SBE_MASK)
-#define SDIF_INTMASK_ACD_MASK (0x4000U)
-#define SDIF_INTMASK_ACD_SHIFT (14U)
-/*! ACD - Auto command done.
- */
-#define SDIF_INTMASK_ACD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_ACD_SHIFT)) & SDIF_INTMASK_ACD_MASK)
-#define SDIF_INTMASK_EBE_MASK (0x8000U)
-#define SDIF_INTMASK_EBE_SHIFT (15U)
-/*! EBE - End-bit error (read)/Write no CRC.
- */
-#define SDIF_INTMASK_EBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_EBE_SHIFT)) & SDIF_INTMASK_EBE_MASK)
-#define SDIF_INTMASK_SDIO_INT_MASK_MASK (0x10000U)
-#define SDIF_INTMASK_SDIO_INT_MASK_SHIFT (16U)
-/*! SDIO_INT_MASK - Mask SDIO interrupt.
- */
-#define SDIF_INTMASK_SDIO_INT_MASK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_SDIO_INT_MASK_SHIFT)) & SDIF_INTMASK_SDIO_INT_MASK_MASK)
-/*! @} */
-
-/*! @name CMDARG - Command Argument register */
-/*! @{ */
-#define SDIF_CMDARG_CMD_ARG_MASK (0xFFFFFFFFU)
-#define SDIF_CMDARG_CMD_ARG_SHIFT (0U)
-/*! CMD_ARG - Value indicates command argument to be passed to card.
- */
-#define SDIF_CMDARG_CMD_ARG(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMDARG_CMD_ARG_SHIFT)) & SDIF_CMDARG_CMD_ARG_MASK)
-/*! @} */
-
-/*! @name CMD - Command register */
-/*! @{ */
-#define SDIF_CMD_CMD_INDEX_MASK (0x3FU)
-#define SDIF_CMD_CMD_INDEX_SHIFT (0U)
-/*! CMD_INDEX - Command index.
- */
-#define SDIF_CMD_CMD_INDEX(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_CMD_INDEX_SHIFT)) & SDIF_CMD_CMD_INDEX_MASK)
-#define SDIF_CMD_RESPONSE_EXPECT_MASK (0x40U)
-#define SDIF_CMD_RESPONSE_EXPECT_SHIFT (6U)
-/*! RESPONSE_EXPECT - Response expect.
- */
-#define SDIF_CMD_RESPONSE_EXPECT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_RESPONSE_EXPECT_SHIFT)) & SDIF_CMD_RESPONSE_EXPECT_MASK)
-#define SDIF_CMD_RESPONSE_LENGTH_MASK (0x80U)
-#define SDIF_CMD_RESPONSE_LENGTH_SHIFT (7U)
-/*! RESPONSE_LENGTH - Response length.
- */
-#define SDIF_CMD_RESPONSE_LENGTH(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_RESPONSE_LENGTH_SHIFT)) & SDIF_CMD_RESPONSE_LENGTH_MASK)
-#define SDIF_CMD_CHECK_RESPONSE_CRC_MASK (0x100U)
-#define SDIF_CMD_CHECK_RESPONSE_CRC_SHIFT (8U)
-/*! CHECK_RESPONSE_CRC - Check response CRC.
- */
-#define SDIF_CMD_CHECK_RESPONSE_CRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_CHECK_RESPONSE_CRC_SHIFT)) & SDIF_CMD_CHECK_RESPONSE_CRC_MASK)
-#define SDIF_CMD_DATA_EXPECTED_MASK (0x200U)
-#define SDIF_CMD_DATA_EXPECTED_SHIFT (9U)
-/*! DATA_EXPECTED - Data expected.
- */
-#define SDIF_CMD_DATA_EXPECTED(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_DATA_EXPECTED_SHIFT)) & SDIF_CMD_DATA_EXPECTED_MASK)
-#define SDIF_CMD_READ_WRITE_MASK (0x400U)
-#define SDIF_CMD_READ_WRITE_SHIFT (10U)
-/*! READ_WRITE - read/write.
- */
-#define SDIF_CMD_READ_WRITE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_READ_WRITE_SHIFT)) & SDIF_CMD_READ_WRITE_MASK)
-#define SDIF_CMD_TRANSFER_MODE_MASK (0x800U)
-#define SDIF_CMD_TRANSFER_MODE_SHIFT (11U)
-/*! TRANSFER_MODE - Transfer mode.
- */
-#define SDIF_CMD_TRANSFER_MODE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_TRANSFER_MODE_SHIFT)) & SDIF_CMD_TRANSFER_MODE_MASK)
-#define SDIF_CMD_SEND_AUTO_STOP_MASK (0x1000U)
-#define SDIF_CMD_SEND_AUTO_STOP_SHIFT (12U)
-/*! SEND_AUTO_STOP - Send auto stop.
- */
-#define SDIF_CMD_SEND_AUTO_STOP(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_SEND_AUTO_STOP_SHIFT)) & SDIF_CMD_SEND_AUTO_STOP_MASK)
-#define SDIF_CMD_WAIT_PRVDATA_COMPLETE_MASK (0x2000U)
-#define SDIF_CMD_WAIT_PRVDATA_COMPLETE_SHIFT (13U)
-/*! WAIT_PRVDATA_COMPLETE - Wait prvdata complete.
- */
-#define SDIF_CMD_WAIT_PRVDATA_COMPLETE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_WAIT_PRVDATA_COMPLETE_SHIFT)) & SDIF_CMD_WAIT_PRVDATA_COMPLETE_MASK)
-#define SDIF_CMD_STOP_ABORT_CMD_MASK (0x4000U)
-#define SDIF_CMD_STOP_ABORT_CMD_SHIFT (14U)
-/*! STOP_ABORT_CMD - Stop abort command.
- */
-#define SDIF_CMD_STOP_ABORT_CMD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_STOP_ABORT_CMD_SHIFT)) & SDIF_CMD_STOP_ABORT_CMD_MASK)
-#define SDIF_CMD_SEND_INITIALIZATION_MASK (0x8000U)
-#define SDIF_CMD_SEND_INITIALIZATION_SHIFT (15U)
-/*! SEND_INITIALIZATION - Send initialization.
- */
-#define SDIF_CMD_SEND_INITIALIZATION(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_SEND_INITIALIZATION_SHIFT)) & SDIF_CMD_SEND_INITIALIZATION_MASK)
-#define SDIF_CMD_CARD_NUMBER_MASK (0x1F0000U)
-#define SDIF_CMD_CARD_NUMBER_SHIFT (16U)
-/*! CARD_NUMBER - Specifies the card number of SDCARD for which the current Command is being executed
- * 0b00000..Command will be execute on SDCARD 0
- * 0b00001..Command will be execute on SDCARD 1
- */
-#define SDIF_CMD_CARD_NUMBER(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_CARD_NUMBER_SHIFT)) & SDIF_CMD_CARD_NUMBER_MASK)
-#define SDIF_CMD_UPDATE_CLOCK_REGISTERS_ONLY_MASK (0x200000U)
-#define SDIF_CMD_UPDATE_CLOCK_REGISTERS_ONLY_SHIFT (21U)
-/*! UPDATE_CLOCK_REGISTERS_ONLY - Update clock registers only.
- */
-#define SDIF_CMD_UPDATE_CLOCK_REGISTERS_ONLY(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_UPDATE_CLOCK_REGISTERS_ONLY_SHIFT)) & SDIF_CMD_UPDATE_CLOCK_REGISTERS_ONLY_MASK)
-#define SDIF_CMD_READ_CEATA_DEVICE_MASK (0x400000U)
-#define SDIF_CMD_READ_CEATA_DEVICE_SHIFT (22U)
-/*! READ_CEATA_DEVICE - Read ceata device.
- */
-#define SDIF_CMD_READ_CEATA_DEVICE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_READ_CEATA_DEVICE_SHIFT)) & SDIF_CMD_READ_CEATA_DEVICE_MASK)
-#define SDIF_CMD_CCS_EXPECTED_MASK (0x800000U)
-#define SDIF_CMD_CCS_EXPECTED_SHIFT (23U)
-/*! CCS_EXPECTED - CCS expected.
- */
-#define SDIF_CMD_CCS_EXPECTED(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_CCS_EXPECTED_SHIFT)) & SDIF_CMD_CCS_EXPECTED_MASK)
-#define SDIF_CMD_ENABLE_BOOT_MASK (0x1000000U)
-#define SDIF_CMD_ENABLE_BOOT_SHIFT (24U)
-/*! ENABLE_BOOT - Enable Boot - this bit should be set only for mandatory boot mode.
- */
-#define SDIF_CMD_ENABLE_BOOT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_ENABLE_BOOT_SHIFT)) & SDIF_CMD_ENABLE_BOOT_MASK)
-#define SDIF_CMD_EXPECT_BOOT_ACK_MASK (0x2000000U)
-#define SDIF_CMD_EXPECT_BOOT_ACK_SHIFT (25U)
-/*! EXPECT_BOOT_ACK - Expect Boot Acknowledge.
- */
-#define SDIF_CMD_EXPECT_BOOT_ACK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_EXPECT_BOOT_ACK_SHIFT)) & SDIF_CMD_EXPECT_BOOT_ACK_MASK)
-#define SDIF_CMD_DISABLE_BOOT_MASK (0x4000000U)
-#define SDIF_CMD_DISABLE_BOOT_SHIFT (26U)
-/*! DISABLE_BOOT - Disable Boot.
- */
-#define SDIF_CMD_DISABLE_BOOT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_DISABLE_BOOT_SHIFT)) & SDIF_CMD_DISABLE_BOOT_MASK)
-#define SDIF_CMD_BOOT_MODE_MASK (0x8000000U)
-#define SDIF_CMD_BOOT_MODE_SHIFT (27U)
-/*! BOOT_MODE - Boot Mode.
- */
-#define SDIF_CMD_BOOT_MODE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_BOOT_MODE_SHIFT)) & SDIF_CMD_BOOT_MODE_MASK)
-#define SDIF_CMD_VOLT_SWITCH_MASK (0x10000000U)
-#define SDIF_CMD_VOLT_SWITCH_SHIFT (28U)
-/*! VOLT_SWITCH - Voltage switch bit.
- */
-#define SDIF_CMD_VOLT_SWITCH(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_VOLT_SWITCH_SHIFT)) & SDIF_CMD_VOLT_SWITCH_MASK)
-#define SDIF_CMD_USE_HOLD_REG_MASK (0x20000000U)
-#define SDIF_CMD_USE_HOLD_REG_SHIFT (29U)
-/*! USE_HOLD_REG - Use Hold Register.
- */
-#define SDIF_CMD_USE_HOLD_REG(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_USE_HOLD_REG_SHIFT)) & SDIF_CMD_USE_HOLD_REG_MASK)
-#define SDIF_CMD_START_CMD_MASK (0x80000000U)
-#define SDIF_CMD_START_CMD_SHIFT (31U)
-/*! START_CMD - Start command.
- */
-#define SDIF_CMD_START_CMD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_START_CMD_SHIFT)) & SDIF_CMD_START_CMD_MASK)
-/*! @} */
-
-/*! @name RESP - Response register */
-/*! @{ */
-#define SDIF_RESP_RESPONSE_MASK (0xFFFFFFFFU)
-#define SDIF_RESP_RESPONSE_SHIFT (0U)
-/*! RESPONSE - Bits of response.
- */
-#define SDIF_RESP_RESPONSE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RESP_RESPONSE_SHIFT)) & SDIF_RESP_RESPONSE_MASK)
-/*! @} */
-
-/* The count of SDIF_RESP */
-#define SDIF_RESP_COUNT (4U)
-
-/*! @name MINTSTS - Masked Interrupt Status register */
-/*! @{ */
-#define SDIF_MINTSTS_CDET_MASK (0x1U)
-#define SDIF_MINTSTS_CDET_SHIFT (0U)
-/*! CDET - Card detect.
- */
-#define SDIF_MINTSTS_CDET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_CDET_SHIFT)) & SDIF_MINTSTS_CDET_MASK)
-#define SDIF_MINTSTS_RE_MASK (0x2U)
-#define SDIF_MINTSTS_RE_SHIFT (1U)
-/*! RE - Response error.
- */
-#define SDIF_MINTSTS_RE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_RE_SHIFT)) & SDIF_MINTSTS_RE_MASK)
-#define SDIF_MINTSTS_CDONE_MASK (0x4U)
-#define SDIF_MINTSTS_CDONE_SHIFT (2U)
-/*! CDONE - Command done.
- */
-#define SDIF_MINTSTS_CDONE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_CDONE_SHIFT)) & SDIF_MINTSTS_CDONE_MASK)
-#define SDIF_MINTSTS_DTO_MASK (0x8U)
-#define SDIF_MINTSTS_DTO_SHIFT (3U)
-/*! DTO - Data transfer over.
- */
-#define SDIF_MINTSTS_DTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_DTO_SHIFT)) & SDIF_MINTSTS_DTO_MASK)
-#define SDIF_MINTSTS_TXDR_MASK (0x10U)
-#define SDIF_MINTSTS_TXDR_SHIFT (4U)
-/*! TXDR - Transmit FIFO data request.
- */
-#define SDIF_MINTSTS_TXDR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_TXDR_SHIFT)) & SDIF_MINTSTS_TXDR_MASK)
-#define SDIF_MINTSTS_RXDR_MASK (0x20U)
-#define SDIF_MINTSTS_RXDR_SHIFT (5U)
-/*! RXDR - Receive FIFO data request.
- */
-#define SDIF_MINTSTS_RXDR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_RXDR_SHIFT)) & SDIF_MINTSTS_RXDR_MASK)
-#define SDIF_MINTSTS_RCRC_MASK (0x40U)
-#define SDIF_MINTSTS_RCRC_SHIFT (6U)
-/*! RCRC - Response CRC error.
- */
-#define SDIF_MINTSTS_RCRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_RCRC_SHIFT)) & SDIF_MINTSTS_RCRC_MASK)
-#define SDIF_MINTSTS_DCRC_MASK (0x80U)
-#define SDIF_MINTSTS_DCRC_SHIFT (7U)
-/*! DCRC - Data CRC error.
- */
-#define SDIF_MINTSTS_DCRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_DCRC_SHIFT)) & SDIF_MINTSTS_DCRC_MASK)
-#define SDIF_MINTSTS_RTO_MASK (0x100U)
-#define SDIF_MINTSTS_RTO_SHIFT (8U)
-/*! RTO - Response time-out.
- */
-#define SDIF_MINTSTS_RTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_RTO_SHIFT)) & SDIF_MINTSTS_RTO_MASK)
-#define SDIF_MINTSTS_DRTO_MASK (0x200U)
-#define SDIF_MINTSTS_DRTO_SHIFT (9U)
-/*! DRTO - Data read time-out.
- */
-#define SDIF_MINTSTS_DRTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_DRTO_SHIFT)) & SDIF_MINTSTS_DRTO_MASK)
-#define SDIF_MINTSTS_HTO_MASK (0x400U)
-#define SDIF_MINTSTS_HTO_SHIFT (10U)
-/*! HTO - Data starvation-by-host time-out (HTO).
- */
-#define SDIF_MINTSTS_HTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_HTO_SHIFT)) & SDIF_MINTSTS_HTO_MASK)
-#define SDIF_MINTSTS_FRUN_MASK (0x800U)
-#define SDIF_MINTSTS_FRUN_SHIFT (11U)
-/*! FRUN - FIFO underrun/overrun error.
- */
-#define SDIF_MINTSTS_FRUN(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_FRUN_SHIFT)) & SDIF_MINTSTS_FRUN_MASK)
-#define SDIF_MINTSTS_HLE_MASK (0x1000U)
-#define SDIF_MINTSTS_HLE_SHIFT (12U)
-/*! HLE - Hardware locked write error.
- */
-#define SDIF_MINTSTS_HLE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_HLE_SHIFT)) & SDIF_MINTSTS_HLE_MASK)
-#define SDIF_MINTSTS_SBE_MASK (0x2000U)
-#define SDIF_MINTSTS_SBE_SHIFT (13U)
-/*! SBE - Start-bit error.
- */
-#define SDIF_MINTSTS_SBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_SBE_SHIFT)) & SDIF_MINTSTS_SBE_MASK)
-#define SDIF_MINTSTS_ACD_MASK (0x4000U)
-#define SDIF_MINTSTS_ACD_SHIFT (14U)
-/*! ACD - Auto command done.
- */
-#define SDIF_MINTSTS_ACD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_ACD_SHIFT)) & SDIF_MINTSTS_ACD_MASK)
-#define SDIF_MINTSTS_EBE_MASK (0x8000U)
-#define SDIF_MINTSTS_EBE_SHIFT (15U)
-/*! EBE - End-bit error (read)/write no CRC.
- */
-#define SDIF_MINTSTS_EBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_EBE_SHIFT)) & SDIF_MINTSTS_EBE_MASK)
-#define SDIF_MINTSTS_SDIO_INTERRUPT_MASK (0x10000U)
-#define SDIF_MINTSTS_SDIO_INTERRUPT_SHIFT (16U)
-/*! SDIO_INTERRUPT - Interrupt from SDIO card.
- */
-#define SDIF_MINTSTS_SDIO_INTERRUPT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_SDIO_INTERRUPT_SHIFT)) & SDIF_MINTSTS_SDIO_INTERRUPT_MASK)
-/*! @} */
-
-/*! @name RINTSTS - Raw Interrupt Status register */
-/*! @{ */
-#define SDIF_RINTSTS_CDET_MASK (0x1U)
-#define SDIF_RINTSTS_CDET_SHIFT (0U)
-/*! CDET - Card detect.
- */
-#define SDIF_RINTSTS_CDET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_CDET_SHIFT)) & SDIF_RINTSTS_CDET_MASK)
-#define SDIF_RINTSTS_RE_MASK (0x2U)
-#define SDIF_RINTSTS_RE_SHIFT (1U)
-/*! RE - Response error.
- */
-#define SDIF_RINTSTS_RE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_RE_SHIFT)) & SDIF_RINTSTS_RE_MASK)
-#define SDIF_RINTSTS_CDONE_MASK (0x4U)
-#define SDIF_RINTSTS_CDONE_SHIFT (2U)
-/*! CDONE - Command done.
- */
-#define SDIF_RINTSTS_CDONE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_CDONE_SHIFT)) & SDIF_RINTSTS_CDONE_MASK)
-#define SDIF_RINTSTS_DTO_MASK (0x8U)
-#define SDIF_RINTSTS_DTO_SHIFT (3U)
-/*! DTO - Data transfer over.
- */
-#define SDIF_RINTSTS_DTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_DTO_SHIFT)) & SDIF_RINTSTS_DTO_MASK)
-#define SDIF_RINTSTS_TXDR_MASK (0x10U)
-#define SDIF_RINTSTS_TXDR_SHIFT (4U)
-/*! TXDR - Transmit FIFO data request.
- */
-#define SDIF_RINTSTS_TXDR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_TXDR_SHIFT)) & SDIF_RINTSTS_TXDR_MASK)
-#define SDIF_RINTSTS_RXDR_MASK (0x20U)
-#define SDIF_RINTSTS_RXDR_SHIFT (5U)
-/*! RXDR - Receive FIFO data request.
- */
-#define SDIF_RINTSTS_RXDR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_RXDR_SHIFT)) & SDIF_RINTSTS_RXDR_MASK)
-#define SDIF_RINTSTS_RCRC_MASK (0x40U)
-#define SDIF_RINTSTS_RCRC_SHIFT (6U)
-/*! RCRC - Response CRC error.
- */
-#define SDIF_RINTSTS_RCRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_RCRC_SHIFT)) & SDIF_RINTSTS_RCRC_MASK)
-#define SDIF_RINTSTS_DCRC_MASK (0x80U)
-#define SDIF_RINTSTS_DCRC_SHIFT (7U)
-/*! DCRC - Data CRC error.
- */
-#define SDIF_RINTSTS_DCRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_DCRC_SHIFT)) & SDIF_RINTSTS_DCRC_MASK)
-#define SDIF_RINTSTS_RTO_BAR_MASK (0x100U)
-#define SDIF_RINTSTS_RTO_BAR_SHIFT (8U)
-/*! RTO_BAR - Response time-out (RTO)/Boot Ack Received (BAR).
- */
-#define SDIF_RINTSTS_RTO_BAR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_RTO_BAR_SHIFT)) & SDIF_RINTSTS_RTO_BAR_MASK)
-#define SDIF_RINTSTS_DRTO_BDS_MASK (0x200U)
-#define SDIF_RINTSTS_DRTO_BDS_SHIFT (9U)
-/*! DRTO_BDS - Data read time-out (DRTO)/Boot Data Start (BDS).
- */
-#define SDIF_RINTSTS_DRTO_BDS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_DRTO_BDS_SHIFT)) & SDIF_RINTSTS_DRTO_BDS_MASK)
-#define SDIF_RINTSTS_HTO_MASK (0x400U)
-#define SDIF_RINTSTS_HTO_SHIFT (10U)
-/*! HTO - Data starvation-by-host time-out (HTO).
- */
-#define SDIF_RINTSTS_HTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_HTO_SHIFT)) & SDIF_RINTSTS_HTO_MASK)
-#define SDIF_RINTSTS_FRUN_MASK (0x800U)
-#define SDIF_RINTSTS_FRUN_SHIFT (11U)
-/*! FRUN - FIFO underrun/overrun error.
- */
-#define SDIF_RINTSTS_FRUN(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_FRUN_SHIFT)) & SDIF_RINTSTS_FRUN_MASK)
-#define SDIF_RINTSTS_HLE_MASK (0x1000U)
-#define SDIF_RINTSTS_HLE_SHIFT (12U)
-/*! HLE - Hardware locked write error.
- */
-#define SDIF_RINTSTS_HLE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_HLE_SHIFT)) & SDIF_RINTSTS_HLE_MASK)
-#define SDIF_RINTSTS_SBE_MASK (0x2000U)
-#define SDIF_RINTSTS_SBE_SHIFT (13U)
-/*! SBE - Start-bit error.
- */
-#define SDIF_RINTSTS_SBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_SBE_SHIFT)) & SDIF_RINTSTS_SBE_MASK)
-#define SDIF_RINTSTS_ACD_MASK (0x4000U)
-#define SDIF_RINTSTS_ACD_SHIFT (14U)
-/*! ACD - Auto command done.
- */
-#define SDIF_RINTSTS_ACD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_ACD_SHIFT)) & SDIF_RINTSTS_ACD_MASK)
-#define SDIF_RINTSTS_EBE_MASK (0x8000U)
-#define SDIF_RINTSTS_EBE_SHIFT (15U)
-/*! EBE - End-bit error (read)/write no CRC.
- */
-#define SDIF_RINTSTS_EBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_EBE_SHIFT)) & SDIF_RINTSTS_EBE_MASK)
-#define SDIF_RINTSTS_SDIO_INTERRUPT_MASK (0x10000U)
-#define SDIF_RINTSTS_SDIO_INTERRUPT_SHIFT (16U)
-/*! SDIO_INTERRUPT - Interrupt from SDIO card.
- */
-#define SDIF_RINTSTS_SDIO_INTERRUPT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_SDIO_INTERRUPT_SHIFT)) & SDIF_RINTSTS_SDIO_INTERRUPT_MASK)
-/*! @} */
-
-/*! @name STATUS - Status register */
-/*! @{ */
-#define SDIF_STATUS_FIFO_RX_WATERMARK_MASK (0x1U)
-#define SDIF_STATUS_FIFO_RX_WATERMARK_SHIFT (0U)
-/*! FIFO_RX_WATERMARK - FIFO reached Receive watermark level; not qualified with data transfer.
- */
-#define SDIF_STATUS_FIFO_RX_WATERMARK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_FIFO_RX_WATERMARK_SHIFT)) & SDIF_STATUS_FIFO_RX_WATERMARK_MASK)
-#define SDIF_STATUS_FIFO_TX_WATERMARK_MASK (0x2U)
-#define SDIF_STATUS_FIFO_TX_WATERMARK_SHIFT (1U)
-/*! FIFO_TX_WATERMARK - FIFO reached Transmit watermark level; not qualified with data transfer.
- */
-#define SDIF_STATUS_FIFO_TX_WATERMARK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_FIFO_TX_WATERMARK_SHIFT)) & SDIF_STATUS_FIFO_TX_WATERMARK_MASK)
-#define SDIF_STATUS_FIFO_EMPTY_MASK (0x4U)
-#define SDIF_STATUS_FIFO_EMPTY_SHIFT (2U)
-/*! FIFO_EMPTY - FIFO is empty status.
- */
-#define SDIF_STATUS_FIFO_EMPTY(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_FIFO_EMPTY_SHIFT)) & SDIF_STATUS_FIFO_EMPTY_MASK)
-#define SDIF_STATUS_FIFO_FULL_MASK (0x8U)
-#define SDIF_STATUS_FIFO_FULL_SHIFT (3U)
-/*! FIFO_FULL - FIFO is full status.
- */
-#define SDIF_STATUS_FIFO_FULL(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_FIFO_FULL_SHIFT)) & SDIF_STATUS_FIFO_FULL_MASK)
-#define SDIF_STATUS_CMDFSMSTATES_MASK (0xF0U)
-#define SDIF_STATUS_CMDFSMSTATES_SHIFT (4U)
-/*! CMDFSMSTATES - Command FSM states: 0 - Idle 1 - Send init sequence 2 - Tx cmd start bit 3 - Tx
- * cmd tx bit 4 - Tx cmd index + arg 5 - Tx cmd crc7 6 - Tx cmd end bit 7 - Rx resp start bit 8 -
- * Rx resp IRQ response 9 - Rx resp tx bit 10 - Rx resp cmd idx 11 - Rx resp data 12 - Rx resp
- * crc7 13 - Rx resp end bit 14 - Cmd path wait NCC 15 - Wait; CMD-to-response turnaround NOTE: The
- * command FSM state is represented using 19 bits.
- */
-#define SDIF_STATUS_CMDFSMSTATES(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_CMDFSMSTATES_SHIFT)) & SDIF_STATUS_CMDFSMSTATES_MASK)
-#define SDIF_STATUS_DATA_3_STATUS_MASK (0x100U)
-#define SDIF_STATUS_DATA_3_STATUS_SHIFT (8U)
-/*! DATA_3_STATUS - Raw selected card_data[3]; checks whether card is present 0 - card not present 1 - card present.
- */
-#define SDIF_STATUS_DATA_3_STATUS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_DATA_3_STATUS_SHIFT)) & SDIF_STATUS_DATA_3_STATUS_MASK)
-#define SDIF_STATUS_DATA_BUSY_MASK (0x200U)
-#define SDIF_STATUS_DATA_BUSY_SHIFT (9U)
-/*! DATA_BUSY - Inverted version of raw selected card_data[0] 0 - card data not busy 1 - card data busy.
- */
-#define SDIF_STATUS_DATA_BUSY(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_DATA_BUSY_SHIFT)) & SDIF_STATUS_DATA_BUSY_MASK)
-#define SDIF_STATUS_DATA_STATE_MC_BUSY_MASK (0x400U)
-#define SDIF_STATUS_DATA_STATE_MC_BUSY_SHIFT (10U)
-/*! DATA_STATE_MC_BUSY - Data transmit or receive state-machine is busy.
- */
-#define SDIF_STATUS_DATA_STATE_MC_BUSY(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_DATA_STATE_MC_BUSY_SHIFT)) & SDIF_STATUS_DATA_STATE_MC_BUSY_MASK)
-#define SDIF_STATUS_RESPONSE_INDEX_MASK (0x1F800U)
-#define SDIF_STATUS_RESPONSE_INDEX_SHIFT (11U)
-/*! RESPONSE_INDEX - Index of previous response, including any auto-stop sent by core.
- */
-#define SDIF_STATUS_RESPONSE_INDEX(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_RESPONSE_INDEX_SHIFT)) & SDIF_STATUS_RESPONSE_INDEX_MASK)
-#define SDIF_STATUS_FIFO_COUNT_MASK (0x3FFE0000U)
-#define SDIF_STATUS_FIFO_COUNT_SHIFT (17U)
-/*! FIFO_COUNT - FIFO count - Number of filled locations in FIFO.
- */
-#define SDIF_STATUS_FIFO_COUNT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_FIFO_COUNT_SHIFT)) & SDIF_STATUS_FIFO_COUNT_MASK)
-#define SDIF_STATUS_DMA_ACK_MASK (0x40000000U)
-#define SDIF_STATUS_DMA_ACK_SHIFT (30U)
-/*! DMA_ACK - DMA acknowledge signal state.
- */
-#define SDIF_STATUS_DMA_ACK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_DMA_ACK_SHIFT)) & SDIF_STATUS_DMA_ACK_MASK)
-#define SDIF_STATUS_DMA_REQ_MASK (0x80000000U)
-#define SDIF_STATUS_DMA_REQ_SHIFT (31U)
-/*! DMA_REQ - DMA request signal state.
- */
-#define SDIF_STATUS_DMA_REQ(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_DMA_REQ_SHIFT)) & SDIF_STATUS_DMA_REQ_MASK)
-/*! @} */
-
-/*! @name FIFOTH - FIFO Threshold Watermark register */
-/*! @{ */
-#define SDIF_FIFOTH_TX_WMARK_MASK (0xFFFU)
-#define SDIF_FIFOTH_TX_WMARK_SHIFT (0U)
-/*! TX_WMARK - FIFO threshold watermark level when transmitting data to card.
- */
-#define SDIF_FIFOTH_TX_WMARK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_FIFOTH_TX_WMARK_SHIFT)) & SDIF_FIFOTH_TX_WMARK_MASK)
-#define SDIF_FIFOTH_RX_WMARK_MASK (0xFFF0000U)
-#define SDIF_FIFOTH_RX_WMARK_SHIFT (16U)
-/*! RX_WMARK - FIFO threshold watermark level when receiving data to card.
- */
-#define SDIF_FIFOTH_RX_WMARK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_FIFOTH_RX_WMARK_SHIFT)) & SDIF_FIFOTH_RX_WMARK_MASK)
-#define SDIF_FIFOTH_DMA_MTS_MASK (0x70000000U)
-#define SDIF_FIFOTH_DMA_MTS_SHIFT (28U)
-/*! DMA_MTS - Burst size of multiple transaction; should be programmed same as DW-DMA controller
- * multiple-transaction-size SRC/DEST_MSIZE.
- */
-#define SDIF_FIFOTH_DMA_MTS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_FIFOTH_DMA_MTS_SHIFT)) & SDIF_FIFOTH_DMA_MTS_MASK)
-/*! @} */
-
-/*! @name CDETECT - Card Detect register */
-/*! @{ */
-#define SDIF_CDETECT_CARD0_DETECT_MASK (0x1U)
-#define SDIF_CDETECT_CARD0_DETECT_SHIFT (0U)
-/*! CARD0_DETECT - Card 0 detect
- */
-#define SDIF_CDETECT_CARD0_DETECT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CDETECT_CARD0_DETECT_SHIFT)) & SDIF_CDETECT_CARD0_DETECT_MASK)
-#define SDIF_CDETECT_CARD1_DETECT_MASK (0x2U)
-#define SDIF_CDETECT_CARD1_DETECT_SHIFT (1U)
-/*! CARD1_DETECT - Card 1 detect
- */
-#define SDIF_CDETECT_CARD1_DETECT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CDETECT_CARD1_DETECT_SHIFT)) & SDIF_CDETECT_CARD1_DETECT_MASK)
-/*! @} */
-
-/*! @name WRTPRT - Write Protect register */
-/*! @{ */
-#define SDIF_WRTPRT_WRITE_PROTECT_MASK (0x1U)
-#define SDIF_WRTPRT_WRITE_PROTECT_SHIFT (0U)
-/*! WRITE_PROTECT - Write protect.
- */
-#define SDIF_WRTPRT_WRITE_PROTECT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_WRTPRT_WRITE_PROTECT_SHIFT)) & SDIF_WRTPRT_WRITE_PROTECT_MASK)
-/*! @} */
-
-/*! @name TCBCNT - Transferred CIU Card Byte Count register */
-/*! @{ */
-#define SDIF_TCBCNT_TRANS_CARD_BYTE_COUNT_MASK (0xFFFFFFFFU)
-#define SDIF_TCBCNT_TRANS_CARD_BYTE_COUNT_SHIFT (0U)
-/*! TRANS_CARD_BYTE_COUNT - Number of bytes transferred by CIU unit to card.
- */
-#define SDIF_TCBCNT_TRANS_CARD_BYTE_COUNT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_TCBCNT_TRANS_CARD_BYTE_COUNT_SHIFT)) & SDIF_TCBCNT_TRANS_CARD_BYTE_COUNT_MASK)
-/*! @} */
-
-/*! @name TBBCNT - Transferred Host to BIU-FIFO Byte Count register */
-/*! @{ */
-#define SDIF_TBBCNT_TRANS_FIFO_BYTE_COUNT_MASK (0xFFFFFFFFU)
-#define SDIF_TBBCNT_TRANS_FIFO_BYTE_COUNT_SHIFT (0U)
-/*! TRANS_FIFO_BYTE_COUNT - Number of bytes transferred between Host/DMA memory and BIU FIFO.
- */
-#define SDIF_TBBCNT_TRANS_FIFO_BYTE_COUNT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_TBBCNT_TRANS_FIFO_BYTE_COUNT_SHIFT)) & SDIF_TBBCNT_TRANS_FIFO_BYTE_COUNT_MASK)
-/*! @} */
-
-/*! @name DEBNCE - Debounce Count register */
-/*! @{ */
-#define SDIF_DEBNCE_DEBOUNCE_COUNT_MASK (0xFFFFFFU)
-#define SDIF_DEBNCE_DEBOUNCE_COUNT_SHIFT (0U)
-/*! DEBOUNCE_COUNT - Number of host clocks (SD_CLK) used by debounce filter logic for card detect; typical debounce time is 5-25 ms.
- */
-#define SDIF_DEBNCE_DEBOUNCE_COUNT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_DEBNCE_DEBOUNCE_COUNT_SHIFT)) & SDIF_DEBNCE_DEBOUNCE_COUNT_MASK)
-/*! @} */
-
-/*! @name RST_N - Hardware Reset */
-/*! @{ */
-#define SDIF_RST_N_CARD_RESET_MASK (0x1U)
-#define SDIF_RST_N_CARD_RESET_SHIFT (0U)
-/*! CARD_RESET - Hardware reset.
- */
-#define SDIF_RST_N_CARD_RESET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RST_N_CARD_RESET_SHIFT)) & SDIF_RST_N_CARD_RESET_MASK)
-/*! @} */
-
-/*! @name BMOD - Bus Mode register */
-/*! @{ */
-#define SDIF_BMOD_SWR_MASK (0x1U)
-#define SDIF_BMOD_SWR_SHIFT (0U)
-/*! SWR - Software Reset.
- */
-#define SDIF_BMOD_SWR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BMOD_SWR_SHIFT)) & SDIF_BMOD_SWR_MASK)
-#define SDIF_BMOD_FB_MASK (0x2U)
-#define SDIF_BMOD_FB_SHIFT (1U)
-/*! FB - Fixed Burst.
- */
-#define SDIF_BMOD_FB(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BMOD_FB_SHIFT)) & SDIF_BMOD_FB_MASK)
-#define SDIF_BMOD_DSL_MASK (0x7CU)
-#define SDIF_BMOD_DSL_SHIFT (2U)
-/*! DSL - Descriptor Skip Length.
- */
-#define SDIF_BMOD_DSL(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BMOD_DSL_SHIFT)) & SDIF_BMOD_DSL_MASK)
-#define SDIF_BMOD_DE_MASK (0x80U)
-#define SDIF_BMOD_DE_SHIFT (7U)
-/*! DE - SD/MMC DMA Enable.
- */
-#define SDIF_BMOD_DE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BMOD_DE_SHIFT)) & SDIF_BMOD_DE_MASK)
-#define SDIF_BMOD_PBL_MASK (0x700U)
-#define SDIF_BMOD_PBL_SHIFT (8U)
-/*! PBL - Programmable Burst Length.
- */
-#define SDIF_BMOD_PBL(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BMOD_PBL_SHIFT)) & SDIF_BMOD_PBL_MASK)
-/*! @} */
-
-/*! @name PLDMND - Poll Demand register */
-/*! @{ */
-#define SDIF_PLDMND_PD_MASK (0xFFFFFFFFU)
-#define SDIF_PLDMND_PD_SHIFT (0U)
-/*! PD - Poll Demand.
- */
-#define SDIF_PLDMND_PD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_PLDMND_PD_SHIFT)) & SDIF_PLDMND_PD_MASK)
-/*! @} */
-
-/*! @name DBADDR - Descriptor List Base Address register */
-/*! @{ */
-#define SDIF_DBADDR_SDL_MASK (0xFFFFFFFFU)
-#define SDIF_DBADDR_SDL_SHIFT (0U)
-/*! SDL - Start of Descriptor List.
- */
-#define SDIF_DBADDR_SDL(x) (((uint32_t)(((uint32_t)(x)) << SDIF_DBADDR_SDL_SHIFT)) & SDIF_DBADDR_SDL_MASK)
-/*! @} */
-
-/*! @name IDSTS - Internal DMAC Status register */
-/*! @{ */
-#define SDIF_IDSTS_TI_MASK (0x1U)
-#define SDIF_IDSTS_TI_SHIFT (0U)
-/*! TI - Transmit Interrupt.
- */
-#define SDIF_IDSTS_TI(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_TI_SHIFT)) & SDIF_IDSTS_TI_MASK)
-#define SDIF_IDSTS_RI_MASK (0x2U)
-#define SDIF_IDSTS_RI_SHIFT (1U)
-/*! RI - Receive Interrupt.
- */
-#define SDIF_IDSTS_RI(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_RI_SHIFT)) & SDIF_IDSTS_RI_MASK)
-#define SDIF_IDSTS_FBE_MASK (0x4U)
-#define SDIF_IDSTS_FBE_SHIFT (2U)
-/*! FBE - Fatal Bus Error Interrupt.
- */
-#define SDIF_IDSTS_FBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_FBE_SHIFT)) & SDIF_IDSTS_FBE_MASK)
-#define SDIF_IDSTS_DU_MASK (0x10U)
-#define SDIF_IDSTS_DU_SHIFT (4U)
-/*! DU - Descriptor Unavailable Interrupt.
- */
-#define SDIF_IDSTS_DU(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_DU_SHIFT)) & SDIF_IDSTS_DU_MASK)
-#define SDIF_IDSTS_CES_MASK (0x20U)
-#define SDIF_IDSTS_CES_SHIFT (5U)
-/*! CES - Card Error Summary.
- */
-#define SDIF_IDSTS_CES(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_CES_SHIFT)) & SDIF_IDSTS_CES_MASK)
-#define SDIF_IDSTS_NIS_MASK (0x100U)
-#define SDIF_IDSTS_NIS_SHIFT (8U)
-/*! NIS - Normal Interrupt Summary.
- */
-#define SDIF_IDSTS_NIS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_NIS_SHIFT)) & SDIF_IDSTS_NIS_MASK)
-#define SDIF_IDSTS_AIS_MASK (0x200U)
-#define SDIF_IDSTS_AIS_SHIFT (9U)
-/*! AIS - Abnormal Interrupt Summary.
- */
-#define SDIF_IDSTS_AIS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_AIS_SHIFT)) & SDIF_IDSTS_AIS_MASK)
-#define SDIF_IDSTS_EB_MASK (0x1C00U)
-#define SDIF_IDSTS_EB_SHIFT (10U)
-/*! EB - Error Bits.
- */
-#define SDIF_IDSTS_EB(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_EB_SHIFT)) & SDIF_IDSTS_EB_MASK)
-#define SDIF_IDSTS_FSM_MASK (0x1E000U)
-#define SDIF_IDSTS_FSM_SHIFT (13U)
-/*! FSM - DMAC state machine present state.
- */
-#define SDIF_IDSTS_FSM(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_FSM_SHIFT)) & SDIF_IDSTS_FSM_MASK)
-/*! @} */
-
-/*! @name IDINTEN - Internal DMAC Interrupt Enable register */
-/*! @{ */
-#define SDIF_IDINTEN_TI_MASK (0x1U)
-#define SDIF_IDINTEN_TI_SHIFT (0U)
-/*! TI - Transmit Interrupt Enable.
- */
-#define SDIF_IDINTEN_TI(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_TI_SHIFT)) & SDIF_IDINTEN_TI_MASK)
-#define SDIF_IDINTEN_RI_MASK (0x2U)
-#define SDIF_IDINTEN_RI_SHIFT (1U)
-/*! RI - Receive Interrupt Enable.
- */
-#define SDIF_IDINTEN_RI(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_RI_SHIFT)) & SDIF_IDINTEN_RI_MASK)
-#define SDIF_IDINTEN_FBE_MASK (0x4U)
-#define SDIF_IDINTEN_FBE_SHIFT (2U)
-/*! FBE - Fatal Bus Error Enable.
- */
-#define SDIF_IDINTEN_FBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_FBE_SHIFT)) & SDIF_IDINTEN_FBE_MASK)
-#define SDIF_IDINTEN_DU_MASK (0x10U)
-#define SDIF_IDINTEN_DU_SHIFT (4U)
-/*! DU - Descriptor Unavailable Interrupt.
- */
-#define SDIF_IDINTEN_DU(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_DU_SHIFT)) & SDIF_IDINTEN_DU_MASK)
-#define SDIF_IDINTEN_CES_MASK (0x20U)
-#define SDIF_IDINTEN_CES_SHIFT (5U)
-/*! CES - Card Error summary Interrupt Enable.
- */
-#define SDIF_IDINTEN_CES(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_CES_SHIFT)) & SDIF_IDINTEN_CES_MASK)
-#define SDIF_IDINTEN_NIS_MASK (0x100U)
-#define SDIF_IDINTEN_NIS_SHIFT (8U)
-/*! NIS - Normal Interrupt Summary Enable.
- */
-#define SDIF_IDINTEN_NIS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_NIS_SHIFT)) & SDIF_IDINTEN_NIS_MASK)
-#define SDIF_IDINTEN_AIS_MASK (0x200U)
-#define SDIF_IDINTEN_AIS_SHIFT (9U)
-/*! AIS - Abnormal Interrupt Summary Enable.
- */
-#define SDIF_IDINTEN_AIS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_AIS_SHIFT)) & SDIF_IDINTEN_AIS_MASK)
-/*! @} */
-
-/*! @name DSCADDR - Current Host Descriptor Address register */
-/*! @{ */
-#define SDIF_DSCADDR_HDA_MASK (0xFFFFFFFFU)
-#define SDIF_DSCADDR_HDA_SHIFT (0U)
-/*! HDA - Host Descriptor Address Pointer.
- */
-#define SDIF_DSCADDR_HDA(x) (((uint32_t)(((uint32_t)(x)) << SDIF_DSCADDR_HDA_SHIFT)) & SDIF_DSCADDR_HDA_MASK)
-/*! @} */
-
-/*! @name BUFADDR - Current Buffer Descriptor Address register */
-/*! @{ */
-#define SDIF_BUFADDR_HBA_MASK (0xFFFFFFFFU)
-#define SDIF_BUFADDR_HBA_SHIFT (0U)
-/*! HBA - Host Buffer Address Pointer.
- */
-#define SDIF_BUFADDR_HBA(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BUFADDR_HBA_SHIFT)) & SDIF_BUFADDR_HBA_MASK)
-/*! @} */
-
-/*! @name CARDTHRCTL - Card Threshold Control */
-/*! @{ */
-#define SDIF_CARDTHRCTL_CARDRDTHREN_MASK (0x1U)
-#define SDIF_CARDTHRCTL_CARDRDTHREN_SHIFT (0U)
-/*! CARDRDTHREN - Card Read Threshold Enable.
- */
-#define SDIF_CARDTHRCTL_CARDRDTHREN(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CARDTHRCTL_CARDRDTHREN_SHIFT)) & SDIF_CARDTHRCTL_CARDRDTHREN_MASK)
-#define SDIF_CARDTHRCTL_BSYCLRINTEN_MASK (0x2U)
-#define SDIF_CARDTHRCTL_BSYCLRINTEN_SHIFT (1U)
-/*! BSYCLRINTEN - Busy Clear Interrupt Enable.
- */
-#define SDIF_CARDTHRCTL_BSYCLRINTEN(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CARDTHRCTL_BSYCLRINTEN_SHIFT)) & SDIF_CARDTHRCTL_BSYCLRINTEN_MASK)
-#define SDIF_CARDTHRCTL_CARDTHRESHOLD_MASK (0xFF0000U)
-#define SDIF_CARDTHRCTL_CARDTHRESHOLD_SHIFT (16U)
-/*! CARDTHRESHOLD - Card Threshold size.
- */
-#define SDIF_CARDTHRCTL_CARDTHRESHOLD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CARDTHRCTL_CARDTHRESHOLD_SHIFT)) & SDIF_CARDTHRCTL_CARDTHRESHOLD_MASK)
-/*! @} */
-
-/*! @name BACKENDPWR - Power control */
-/*! @{ */
-#define SDIF_BACKENDPWR_BACKENDPWR_MASK (0x1U)
-#define SDIF_BACKENDPWR_BACKENDPWR_SHIFT (0U)
-/*! BACKENDPWR - Back-end Power control for card application.
- */
-#define SDIF_BACKENDPWR_BACKENDPWR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BACKENDPWR_BACKENDPWR_SHIFT)) & SDIF_BACKENDPWR_BACKENDPWR_MASK)
-/*! @} */
-
-/*! @name FIFO - SDIF FIFO */
-/*! @{ */
-#define SDIF_FIFO_DATA_MASK (0xFFFFFFFFU)
-#define SDIF_FIFO_DATA_SHIFT (0U)
-/*! DATA - SDIF FIFO.
- */
-#define SDIF_FIFO_DATA(x) (((uint32_t)(((uint32_t)(x)) << SDIF_FIFO_DATA_SHIFT)) & SDIF_FIFO_DATA_MASK)
-/*! @} */
-
-/* The count of SDIF_FIFO */
-#define SDIF_FIFO_COUNT (64U)
-
-
-/*!
- * @}
- */ /* end of group SDIF_Register_Masks */
-
-
-/* SDIF - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral SDIF base address */
- #define SDIF_BASE (0x5009B000u)
- /** Peripheral SDIF base address */
- #define SDIF_BASE_NS (0x4009B000u)
- /** Peripheral SDIF base pointer */
- #define SDIF ((SDIF_Type *)SDIF_BASE)
- /** Peripheral SDIF base pointer */
- #define SDIF_NS ((SDIF_Type *)SDIF_BASE_NS)
- /** Array initializer of SDIF peripheral base addresses */
- #define SDIF_BASE_ADDRS { SDIF_BASE }
- /** Array initializer of SDIF peripheral base pointers */
- #define SDIF_BASE_PTRS { SDIF }
- /** Array initializer of SDIF peripheral base addresses */
- #define SDIF_BASE_ADDRS_NS { SDIF_BASE_NS }
- /** Array initializer of SDIF peripheral base pointers */
- #define SDIF_BASE_PTRS_NS { SDIF_NS }
-#else
- /** Peripheral SDIF base address */
- #define SDIF_BASE (0x4009B000u)
- /** Peripheral SDIF base pointer */
- #define SDIF ((SDIF_Type *)SDIF_BASE)
- /** Array initializer of SDIF peripheral base addresses */
- #define SDIF_BASE_ADDRS { SDIF_BASE }
- /** Array initializer of SDIF peripheral base pointers */
- #define SDIF_BASE_PTRS { SDIF }
-#endif
-/** Interrupt vectors for the SDIF peripheral type */
-#define SDIF_IRQS { SDIO_IRQn }
-
-/*!
- * @}
- */ /* end of group SDIF_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- SPI Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SPI_Peripheral_Access_Layer SPI Peripheral Access Layer
- * @{
- */
-
-/** SPI - Register Layout Typedef */
-typedef struct {
- uint8_t RESERVED_0[1024];
- __IO uint32_t CFG; /**< SPI Configuration register, offset: 0x400 */
- __IO uint32_t DLY; /**< SPI Delay register, offset: 0x404 */
- __IO uint32_t STAT; /**< SPI Status. Some status flags can be cleared by writing a 1 to that bit position., offset: 0x408 */
- __IO uint32_t INTENSET; /**< SPI Interrupt Enable read and Set. A complete value may be read from this register. Writing a 1 to any implemented bit position causes that bit to be set., offset: 0x40C */
- __O uint32_t INTENCLR; /**< SPI Interrupt Enable Clear. Writing a 1 to any implemented bit position causes the corresponding bit in INTENSET to be cleared., offset: 0x410 */
- uint8_t RESERVED_1[16];
- __IO uint32_t DIV; /**< SPI clock Divider, offset: 0x424 */
- __I uint32_t INTSTAT; /**< SPI Interrupt Status, offset: 0x428 */
- uint8_t RESERVED_2[2516];
- __IO uint32_t FIFOCFG; /**< FIFO configuration and enable register., offset: 0xE00 */
- __IO uint32_t FIFOSTAT; /**< FIFO status register., offset: 0xE04 */
- __IO uint32_t FIFOTRIG; /**< FIFO trigger settings for interrupt and DMA request., offset: 0xE08 */
- uint8_t RESERVED_3[4];
- __IO uint32_t FIFOINTENSET; /**< FIFO interrupt enable set (enable) and read register., offset: 0xE10 */
- __IO uint32_t FIFOINTENCLR; /**< FIFO interrupt enable clear (disable) and read register., offset: 0xE14 */
- __I uint32_t FIFOINTSTAT; /**< FIFO interrupt status register., offset: 0xE18 */
- uint8_t RESERVED_4[4];
- __O uint32_t FIFOWR; /**< FIFO write data., offset: 0xE20 */
- uint8_t RESERVED_5[12];
- __I uint32_t FIFORD; /**< FIFO read data., offset: 0xE30 */
- uint8_t RESERVED_6[12];
- __I uint32_t FIFORDNOPOP; /**< FIFO data read with no FIFO pop., offset: 0xE40 */
- uint8_t RESERVED_7[440];
- __I uint32_t ID; /**< Peripheral identification register., offset: 0xFFC */
-} SPI_Type;
-
-/* ----------------------------------------------------------------------------
- -- SPI Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SPI_Register_Masks SPI Register Masks
- * @{
- */
-
-/*! @name CFG - SPI Configuration register */
-/*! @{ */
-#define SPI_CFG_ENABLE_MASK (0x1U)
-#define SPI_CFG_ENABLE_SHIFT (0U)
-/*! ENABLE - SPI enable.
- * 0b0..Disabled. The SPI is disabled and the internal state machine and counters are reset.
- * 0b1..Enabled. The SPI is enabled for operation.
- */
-#define SPI_CFG_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_ENABLE_SHIFT)) & SPI_CFG_ENABLE_MASK)
-#define SPI_CFG_MASTER_MASK (0x4U)
-#define SPI_CFG_MASTER_SHIFT (2U)
-/*! MASTER - Master mode select.
- * 0b0..Slave mode. The SPI will operate in slave mode. SCK, MOSI, and the SSEL signals are inputs, MISO is an output.
- * 0b1..Master mode. The SPI will operate in master mode. SCK, MOSI, and the SSEL signals are outputs, MISO is an input.
- */
-#define SPI_CFG_MASTER(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_MASTER_SHIFT)) & SPI_CFG_MASTER_MASK)
-#define SPI_CFG_LSBF_MASK (0x8U)
-#define SPI_CFG_LSBF_SHIFT (3U)
-/*! LSBF - LSB First mode enable.
- * 0b0..Standard. Data is transmitted and received in standard MSB first order.
- * 0b1..Reverse. Data is transmitted and received in reverse order (LSB first).
- */
-#define SPI_CFG_LSBF(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_LSBF_SHIFT)) & SPI_CFG_LSBF_MASK)
-#define SPI_CFG_CPHA_MASK (0x10U)
-#define SPI_CFG_CPHA_SHIFT (4U)
-/*! CPHA - Clock Phase select.
- * 0b0..Change. The SPI captures serial data on the first clock transition of the transfer (when the clock
- * changes away from the rest state). Data is changed on the following edge.
- * 0b1..Capture. The SPI changes serial data on the first clock transition of the transfer (when the clock
- * changes away from the rest state). Data is captured on the following edge.
- */
-#define SPI_CFG_CPHA(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_CPHA_SHIFT)) & SPI_CFG_CPHA_MASK)
-#define SPI_CFG_CPOL_MASK (0x20U)
-#define SPI_CFG_CPOL_SHIFT (5U)
-/*! CPOL - Clock Polarity select.
- * 0b0..Low. The rest state of the clock (between transfers) is low.
- * 0b1..High. The rest state of the clock (between transfers) is high.
- */
-#define SPI_CFG_CPOL(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_CPOL_SHIFT)) & SPI_CFG_CPOL_MASK)
-#define SPI_CFG_LOOP_MASK (0x80U)
-#define SPI_CFG_LOOP_SHIFT (7U)
-/*! LOOP - Loopback mode enable. Loopback mode applies only to Master mode, and connects transmit
- * and receive data connected together to allow simple software testing.
- * 0b0..Disabled.
- * 0b1..Enabled.
- */
-#define SPI_CFG_LOOP(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_LOOP_SHIFT)) & SPI_CFG_LOOP_MASK)
-#define SPI_CFG_SPOL0_MASK (0x100U)
-#define SPI_CFG_SPOL0_SHIFT (8U)
-/*! SPOL0 - SSEL0 Polarity select.
- * 0b0..Low. The SSEL0 pin is active low.
- * 0b1..High. The SSEL0 pin is active high.
- */
-#define SPI_CFG_SPOL0(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_SPOL0_SHIFT)) & SPI_CFG_SPOL0_MASK)
-#define SPI_CFG_SPOL1_MASK (0x200U)
-#define SPI_CFG_SPOL1_SHIFT (9U)
-/*! SPOL1 - SSEL1 Polarity select.
- * 0b0..Low. The SSEL1 pin is active low.
- * 0b1..High. The SSEL1 pin is active high.
- */
-#define SPI_CFG_SPOL1(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_SPOL1_SHIFT)) & SPI_CFG_SPOL1_MASK)
-#define SPI_CFG_SPOL2_MASK (0x400U)
-#define SPI_CFG_SPOL2_SHIFT (10U)
-/*! SPOL2 - SSEL2 Polarity select.
- * 0b0..Low. The SSEL2 pin is active low.
- * 0b1..High. The SSEL2 pin is active high.
- */
-#define SPI_CFG_SPOL2(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_SPOL2_SHIFT)) & SPI_CFG_SPOL2_MASK)
-#define SPI_CFG_SPOL3_MASK (0x800U)
-#define SPI_CFG_SPOL3_SHIFT (11U)
-/*! SPOL3 - SSEL3 Polarity select.
- * 0b0..Low. The SSEL3 pin is active low.
- * 0b1..High. The SSEL3 pin is active high.
- */
-#define SPI_CFG_SPOL3(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_SPOL3_SHIFT)) & SPI_CFG_SPOL3_MASK)
-/*! @} */
-
-/*! @name DLY - SPI Delay register */
-/*! @{ */
-#define SPI_DLY_PRE_DELAY_MASK (0xFU)
-#define SPI_DLY_PRE_DELAY_SHIFT (0U)
-/*! PRE_DELAY - Controls the amount of time between SSEL assertion and the beginning of a data
- * transfer. There is always one SPI clock time between SSEL assertion and the first clock edge. This
- * is not considered part of the pre-delay. 0x0 = No additional time is inserted. 0x1 = 1 SPI
- * clock time is inserted. 0x2 = 2 SPI clock times are inserted. 0xF = 15 SPI clock times are
- * inserted.
- */
-#define SPI_DLY_PRE_DELAY(x) (((uint32_t)(((uint32_t)(x)) << SPI_DLY_PRE_DELAY_SHIFT)) & SPI_DLY_PRE_DELAY_MASK)
-#define SPI_DLY_POST_DELAY_MASK (0xF0U)
-#define SPI_DLY_POST_DELAY_SHIFT (4U)
-/*! POST_DELAY - Controls the amount of time between the end of a data transfer and SSEL
- * deassertion. 0x0 = No additional time is inserted. 0x1 = 1 SPI clock time is inserted. 0x2 = 2 SPI clock
- * times are inserted. 0xF = 15 SPI clock times are inserted.
- */
-#define SPI_DLY_POST_DELAY(x) (((uint32_t)(((uint32_t)(x)) << SPI_DLY_POST_DELAY_SHIFT)) & SPI_DLY_POST_DELAY_MASK)
-#define SPI_DLY_FRAME_DELAY_MASK (0xF00U)
-#define SPI_DLY_FRAME_DELAY_SHIFT (8U)
-/*! FRAME_DELAY - If the EOF flag is set, controls the minimum amount of time between the current
- * frame and the next frame (or SSEL deassertion if EOT). 0x0 = No additional time is inserted. 0x1
- * = 1 SPI clock time is inserted. 0x2 = 2 SPI clock times are inserted. 0xF = 15 SPI clock
- * times are inserted.
- */
-#define SPI_DLY_FRAME_DELAY(x) (((uint32_t)(((uint32_t)(x)) << SPI_DLY_FRAME_DELAY_SHIFT)) & SPI_DLY_FRAME_DELAY_MASK)
-#define SPI_DLY_TRANSFER_DELAY_MASK (0xF000U)
-#define SPI_DLY_TRANSFER_DELAY_SHIFT (12U)
-/*! TRANSFER_DELAY - Controls the minimum amount of time that the SSEL is deasserted between
- * transfers. 0x0 = The minimum time that SSEL is deasserted is 1 SPI clock time. (Zero added time.) 0x1
- * = The minimum time that SSEL is deasserted is 2 SPI clock times. 0x2 = The minimum time that
- * SSEL is deasserted is 3 SPI clock times. 0xF = The minimum time that SSEL is deasserted is 16
- * SPI clock times.
- */
-#define SPI_DLY_TRANSFER_DELAY(x) (((uint32_t)(((uint32_t)(x)) << SPI_DLY_TRANSFER_DELAY_SHIFT)) & SPI_DLY_TRANSFER_DELAY_MASK)
-/*! @} */
-
-/*! @name STAT - SPI Status. Some status flags can be cleared by writing a 1 to that bit position. */
-/*! @{ */
-#define SPI_STAT_SSA_MASK (0x10U)
-#define SPI_STAT_SSA_SHIFT (4U)
-/*! SSA - Slave Select Assert. This flag is set whenever any slave select transitions from
- * deasserted to asserted, in both master and slave modes. This allows determining when the SPI
- * transmit/receive functions become busy, and allows waking up the device from reduced power modes when a
- * slave mode access begins. This flag is cleared by software.
- */
-#define SPI_STAT_SSA(x) (((uint32_t)(((uint32_t)(x)) << SPI_STAT_SSA_SHIFT)) & SPI_STAT_SSA_MASK)
-#define SPI_STAT_SSD_MASK (0x20U)
-#define SPI_STAT_SSD_SHIFT (5U)
-/*! SSD - Slave Select Deassert. This flag is set whenever any asserted slave selects transition to
- * deasserted, in both master and slave modes. This allows determining when the SPI
- * transmit/receive functions become idle. This flag is cleared by software.
- */
-#define SPI_STAT_SSD(x) (((uint32_t)(((uint32_t)(x)) << SPI_STAT_SSD_SHIFT)) & SPI_STAT_SSD_MASK)
-#define SPI_STAT_STALLED_MASK (0x40U)
-#define SPI_STAT_STALLED_SHIFT (6U)
-/*! STALLED - Stalled status flag. This indicates whether the SPI is currently in a stall condition.
- */
-#define SPI_STAT_STALLED(x) (((uint32_t)(((uint32_t)(x)) << SPI_STAT_STALLED_SHIFT)) & SPI_STAT_STALLED_MASK)
-#define SPI_STAT_ENDTRANSFER_MASK (0x80U)
-#define SPI_STAT_ENDTRANSFER_SHIFT (7U)
-/*! ENDTRANSFER - End Transfer control bit. Software can set this bit to force an end to the current
- * transfer when the transmitter finishes any activity already in progress, as if the EOT flag
- * had been set prior to the last transmission. This capability is included to support cases where
- * it is not known when transmit data is written that it will be the end of a transfer. The bit
- * is cleared when the transmitter becomes idle as the transfer comes to an end. Forcing an end
- * of transfer in this manner causes any specified FRAME_DELAY and TRANSFER_DELAY to be inserted.
- */
-#define SPI_STAT_ENDTRANSFER(x) (((uint32_t)(((uint32_t)(x)) << SPI_STAT_ENDTRANSFER_SHIFT)) & SPI_STAT_ENDTRANSFER_MASK)
-#define SPI_STAT_MSTIDLE_MASK (0x100U)
-#define SPI_STAT_MSTIDLE_SHIFT (8U)
-/*! MSTIDLE - Master idle status flag. This bit is 1 whenever the SPI master function is fully idle.
- * This means that the transmit holding register is empty and the transmitter is not in the
- * process of sending data.
- */
-#define SPI_STAT_MSTIDLE(x) (((uint32_t)(((uint32_t)(x)) << SPI_STAT_MSTIDLE_SHIFT)) & SPI_STAT_MSTIDLE_MASK)
-/*! @} */
-
-/*! @name INTENSET - SPI Interrupt Enable read and Set. A complete value may be read from this register. Writing a 1 to any implemented bit position causes that bit to be set. */
-/*! @{ */
-#define SPI_INTENSET_SSAEN_MASK (0x10U)
-#define SPI_INTENSET_SSAEN_SHIFT (4U)
-/*! SSAEN - Slave select assert interrupt enable. Determines whether an interrupt occurs when the Slave Select is asserted.
- * 0b0..Disabled. No interrupt will be generated when any Slave Select transitions from deasserted to asserted.
- * 0b1..Enabled. An interrupt will be generated when any Slave Select transitions from deasserted to asserted.
- */
-#define SPI_INTENSET_SSAEN(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTENSET_SSAEN_SHIFT)) & SPI_INTENSET_SSAEN_MASK)
-#define SPI_INTENSET_SSDEN_MASK (0x20U)
-#define SPI_INTENSET_SSDEN_SHIFT (5U)
-/*! SSDEN - Slave select deassert interrupt enable. Determines whether an interrupt occurs when the Slave Select is deasserted.
- * 0b0..Disabled. No interrupt will be generated when all asserted Slave Selects transition to deasserted.
- * 0b1..Enabled. An interrupt will be generated when all asserted Slave Selects transition to deasserted.
- */
-#define SPI_INTENSET_SSDEN(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTENSET_SSDEN_SHIFT)) & SPI_INTENSET_SSDEN_MASK)
-#define SPI_INTENSET_MSTIDLEEN_MASK (0x100U)
-#define SPI_INTENSET_MSTIDLEEN_SHIFT (8U)
-/*! MSTIDLEEN - Master idle interrupt enable.
- * 0b0..No interrupt will be generated when the SPI master function is idle.
- * 0b1..An interrupt will be generated when the SPI master function is fully idle.
- */
-#define SPI_INTENSET_MSTIDLEEN(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTENSET_MSTIDLEEN_SHIFT)) & SPI_INTENSET_MSTIDLEEN_MASK)
-/*! @} */
-
-/*! @name INTENCLR - SPI Interrupt Enable Clear. Writing a 1 to any implemented bit position causes the corresponding bit in INTENSET to be cleared. */
-/*! @{ */
-#define SPI_INTENCLR_SSAEN_MASK (0x10U)
-#define SPI_INTENCLR_SSAEN_SHIFT (4U)
-/*! SSAEN - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define SPI_INTENCLR_SSAEN(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTENCLR_SSAEN_SHIFT)) & SPI_INTENCLR_SSAEN_MASK)
-#define SPI_INTENCLR_SSDEN_MASK (0x20U)
-#define SPI_INTENCLR_SSDEN_SHIFT (5U)
-/*! SSDEN - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define SPI_INTENCLR_SSDEN(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTENCLR_SSDEN_SHIFT)) & SPI_INTENCLR_SSDEN_MASK)
-#define SPI_INTENCLR_MSTIDLE_MASK (0x100U)
-#define SPI_INTENCLR_MSTIDLE_SHIFT (8U)
-/*! MSTIDLE - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define SPI_INTENCLR_MSTIDLE(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTENCLR_MSTIDLE_SHIFT)) & SPI_INTENCLR_MSTIDLE_MASK)
-/*! @} */
-
-/*! @name DIV - SPI clock Divider */
-/*! @{ */
-#define SPI_DIV_DIVVAL_MASK (0xFFFFU)
-#define SPI_DIV_DIVVAL_SHIFT (0U)
-/*! DIVVAL - Rate divider value. Specifies how the Flexcomm clock (FCLK) is divided to produce the
- * SPI clock rate in master mode. DIVVAL is -1 encoded such that the value 0 results in FCLK/1,
- * the value 1 results in FCLK/2, up to the maximum possible divide value of 0xFFFF, which results
- * in FCLK/65536.
- */
-#define SPI_DIV_DIVVAL(x) (((uint32_t)(((uint32_t)(x)) << SPI_DIV_DIVVAL_SHIFT)) & SPI_DIV_DIVVAL_MASK)
-/*! @} */
-
-/*! @name INTSTAT - SPI Interrupt Status */
-/*! @{ */
-#define SPI_INTSTAT_SSA_MASK (0x10U)
-#define SPI_INTSTAT_SSA_SHIFT (4U)
-/*! SSA - Slave Select Assert.
- */
-#define SPI_INTSTAT_SSA(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTSTAT_SSA_SHIFT)) & SPI_INTSTAT_SSA_MASK)
-#define SPI_INTSTAT_SSD_MASK (0x20U)
-#define SPI_INTSTAT_SSD_SHIFT (5U)
-/*! SSD - Slave Select Deassert.
- */
-#define SPI_INTSTAT_SSD(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTSTAT_SSD_SHIFT)) & SPI_INTSTAT_SSD_MASK)
-#define SPI_INTSTAT_MSTIDLE_MASK (0x100U)
-#define SPI_INTSTAT_MSTIDLE_SHIFT (8U)
-/*! MSTIDLE - Master Idle status flag.
- */
-#define SPI_INTSTAT_MSTIDLE(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTSTAT_MSTIDLE_SHIFT)) & SPI_INTSTAT_MSTIDLE_MASK)
-/*! @} */
-
-/*! @name FIFOCFG - FIFO configuration and enable register. */
-/*! @{ */
-#define SPI_FIFOCFG_ENABLETX_MASK (0x1U)
-#define SPI_FIFOCFG_ENABLETX_SHIFT (0U)
-/*! ENABLETX - Enable the transmit FIFO.
- * 0b0..The transmit FIFO is not enabled.
- * 0b1..The transmit FIFO is enabled.
- */
-#define SPI_FIFOCFG_ENABLETX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_ENABLETX_SHIFT)) & SPI_FIFOCFG_ENABLETX_MASK)
-#define SPI_FIFOCFG_ENABLERX_MASK (0x2U)
-#define SPI_FIFOCFG_ENABLERX_SHIFT (1U)
-/*! ENABLERX - Enable the receive FIFO.
- * 0b0..The receive FIFO is not enabled.
- * 0b1..The receive FIFO is enabled.
- */
-#define SPI_FIFOCFG_ENABLERX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_ENABLERX_SHIFT)) & SPI_FIFOCFG_ENABLERX_MASK)
-#define SPI_FIFOCFG_SIZE_MASK (0x30U)
-#define SPI_FIFOCFG_SIZE_SHIFT (4U)
-/*! SIZE - FIFO size configuration. This is a read-only field. 0x0 = FIFO is configured as 16
- * entries of 8 bits. 0x1, 0x2, 0x3 = not applicable to USART.
- */
-#define SPI_FIFOCFG_SIZE(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_SIZE_SHIFT)) & SPI_FIFOCFG_SIZE_MASK)
-#define SPI_FIFOCFG_DMATX_MASK (0x1000U)
-#define SPI_FIFOCFG_DMATX_SHIFT (12U)
-/*! DMATX - DMA configuration for transmit.
- * 0b0..DMA is not used for the transmit function.
- * 0b1..Trigger DMA for the transmit function if the FIFO is not full. Generally, data interrupts would be disabled if DMA is enabled.
- */
-#define SPI_FIFOCFG_DMATX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_DMATX_SHIFT)) & SPI_FIFOCFG_DMATX_MASK)
-#define SPI_FIFOCFG_DMARX_MASK (0x2000U)
-#define SPI_FIFOCFG_DMARX_SHIFT (13U)
-/*! DMARX - DMA configuration for receive.
- * 0b0..DMA is not used for the receive function.
- * 0b1..Trigger DMA for the receive function if the FIFO is not empty. Generally, data interrupts would be disabled if DMA is enabled.
- */
-#define SPI_FIFOCFG_DMARX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_DMARX_SHIFT)) & SPI_FIFOCFG_DMARX_MASK)
-#define SPI_FIFOCFG_WAKETX_MASK (0x4000U)
-#define SPI_FIFOCFG_WAKETX_SHIFT (14U)
-/*! WAKETX - Wake-up for transmit FIFO level. This allows the device to be woken from reduced power
- * modes (up to power-down, as long as the peripheral function works in that power mode) without
- * enabling the TXLVL interrupt. Only DMA wakes up, processes data, and goes back to sleep. The
- * CPU will remain stopped until woken by another cause, such as DMA completion. See Hardware
- * Wake-up control register.
- * 0b0..Only enabled interrupts will wake up the device form reduced power modes.
- * 0b1..A device wake-up for DMA will occur if the transmit FIFO level reaches the value specified by TXLVL in
- * FIFOTRIG, even when the TXLVL interrupt is not enabled.
- */
-#define SPI_FIFOCFG_WAKETX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_WAKETX_SHIFT)) & SPI_FIFOCFG_WAKETX_MASK)
-#define SPI_FIFOCFG_WAKERX_MASK (0x8000U)
-#define SPI_FIFOCFG_WAKERX_SHIFT (15U)
-/*! WAKERX - Wake-up for receive FIFO level. This allows the device to be woken from reduced power
- * modes (up to power-down, as long as the peripheral function works in that power mode) without
- * enabling the TXLVL interrupt. Only DMA wakes up, processes data, and goes back to sleep. The
- * CPU will remain stopped until woken by another cause, such as DMA completion. See Hardware
- * Wake-up control register.
- * 0b0..Only enabled interrupts will wake up the device form reduced power modes.
- * 0b1..A device wake-up for DMA will occur if the receive FIFO level reaches the value specified by RXLVL in
- * FIFOTRIG, even when the RXLVL interrupt is not enabled.
- */
-#define SPI_FIFOCFG_WAKERX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_WAKERX_SHIFT)) & SPI_FIFOCFG_WAKERX_MASK)
-#define SPI_FIFOCFG_EMPTYTX_MASK (0x10000U)
-#define SPI_FIFOCFG_EMPTYTX_SHIFT (16U)
-/*! EMPTYTX - Empty command for the transmit FIFO. When a 1 is written to this bit, the TX FIFO is emptied.
- */
-#define SPI_FIFOCFG_EMPTYTX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_EMPTYTX_SHIFT)) & SPI_FIFOCFG_EMPTYTX_MASK)
-#define SPI_FIFOCFG_EMPTYRX_MASK (0x20000U)
-#define SPI_FIFOCFG_EMPTYRX_SHIFT (17U)
-/*! EMPTYRX - Empty command for the receive FIFO. When a 1 is written to this bit, the RX FIFO is emptied.
- */
-#define SPI_FIFOCFG_EMPTYRX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_EMPTYRX_SHIFT)) & SPI_FIFOCFG_EMPTYRX_MASK)
-/*! @} */
-
-/*! @name FIFOSTAT - FIFO status register. */
-/*! @{ */
-#define SPI_FIFOSTAT_TXERR_MASK (0x1U)
-#define SPI_FIFOSTAT_TXERR_SHIFT (0U)
-/*! TXERR - TX FIFO error. Will be set if a transmit FIFO error occurs. This could be an overflow
- * caused by pushing data into a full FIFO, or by an underflow if the FIFO is empty when data is
- * needed. Cleared by writing a 1 to this bit.
- */
-#define SPI_FIFOSTAT_TXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_TXERR_SHIFT)) & SPI_FIFOSTAT_TXERR_MASK)
-#define SPI_FIFOSTAT_RXERR_MASK (0x2U)
-#define SPI_FIFOSTAT_RXERR_SHIFT (1U)
-/*! RXERR - RX FIFO error. Will be set if a receive FIFO overflow occurs, caused by software or DMA
- * not emptying the FIFO fast enough. Cleared by writing a 1 to this bit.
- */
-#define SPI_FIFOSTAT_RXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_RXERR_SHIFT)) & SPI_FIFOSTAT_RXERR_MASK)
-#define SPI_FIFOSTAT_PERINT_MASK (0x8U)
-#define SPI_FIFOSTAT_PERINT_SHIFT (3U)
-/*! PERINT - Peripheral interrupt. When 1, this indicates that the peripheral function has asserted
- * an interrupt. The details can be found by reading the peripheral's STAT register.
- */
-#define SPI_FIFOSTAT_PERINT(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_PERINT_SHIFT)) & SPI_FIFOSTAT_PERINT_MASK)
-#define SPI_FIFOSTAT_TXEMPTY_MASK (0x10U)
-#define SPI_FIFOSTAT_TXEMPTY_SHIFT (4U)
-/*! TXEMPTY - Transmit FIFO empty. When 1, the transmit FIFO is empty. The peripheral may still be processing the last piece of data.
- */
-#define SPI_FIFOSTAT_TXEMPTY(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_TXEMPTY_SHIFT)) & SPI_FIFOSTAT_TXEMPTY_MASK)
-#define SPI_FIFOSTAT_TXNOTFULL_MASK (0x20U)
-#define SPI_FIFOSTAT_TXNOTFULL_SHIFT (5U)
-/*! TXNOTFULL - Transmit FIFO not full. When 1, the transmit FIFO is not full, so more data can be
- * written. When 0, the transmit FIFO is full and another write would cause it to overflow.
- */
-#define SPI_FIFOSTAT_TXNOTFULL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_TXNOTFULL_SHIFT)) & SPI_FIFOSTAT_TXNOTFULL_MASK)
-#define SPI_FIFOSTAT_RXNOTEMPTY_MASK (0x40U)
-#define SPI_FIFOSTAT_RXNOTEMPTY_SHIFT (6U)
-/*! RXNOTEMPTY - Receive FIFO not empty. When 1, the receive FIFO is not empty, so data can be read. When 0, the receive FIFO is empty.
- */
-#define SPI_FIFOSTAT_RXNOTEMPTY(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_RXNOTEMPTY_SHIFT)) & SPI_FIFOSTAT_RXNOTEMPTY_MASK)
-#define SPI_FIFOSTAT_RXFULL_MASK (0x80U)
-#define SPI_FIFOSTAT_RXFULL_SHIFT (7U)
-/*! RXFULL - Receive FIFO full. When 1, the receive FIFO is full. Data needs to be read out to
- * prevent the peripheral from causing an overflow.
- */
-#define SPI_FIFOSTAT_RXFULL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_RXFULL_SHIFT)) & SPI_FIFOSTAT_RXFULL_MASK)
-#define SPI_FIFOSTAT_TXLVL_MASK (0x1F00U)
-#define SPI_FIFOSTAT_TXLVL_SHIFT (8U)
-/*! TXLVL - Transmit FIFO current level. A 0 means the TX FIFO is currently empty, and the TXEMPTY
- * and TXNOTFULL flags will be 1. Other values tell how much data is actually in the TX FIFO at
- * the point where the read occurs. If the TX FIFO is full, the TXEMPTY and TXNOTFULL flags will be
- * 0.
- */
-#define SPI_FIFOSTAT_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_TXLVL_SHIFT)) & SPI_FIFOSTAT_TXLVL_MASK)
-#define SPI_FIFOSTAT_RXLVL_MASK (0x1F0000U)
-#define SPI_FIFOSTAT_RXLVL_SHIFT (16U)
-/*! RXLVL - Receive FIFO current level. A 0 means the RX FIFO is currently empty, and the RXFULL and
- * RXNOTEMPTY flags will be 0. Other values tell how much data is actually in the RX FIFO at the
- * point where the read occurs. If the RX FIFO is full, the RXFULL and RXNOTEMPTY flags will be
- * 1.
- */
-#define SPI_FIFOSTAT_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_RXLVL_SHIFT)) & SPI_FIFOSTAT_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOTRIG - FIFO trigger settings for interrupt and DMA request. */
-/*! @{ */
-#define SPI_FIFOTRIG_TXLVLENA_MASK (0x1U)
-#define SPI_FIFOTRIG_TXLVLENA_SHIFT (0U)
-/*! TXLVLENA - Transmit FIFO level trigger enable. This trigger will become an interrupt if enabled
- * in FIFOINTENSET, or a DMA trigger if DMATX in FIFOCFG is set.
- * 0b0..Transmit FIFO level does not generate a FIFO level trigger.
- * 0b1..An trigger will be generated if the transmit FIFO level reaches the value specified by the TXLVL field in this register.
- */
-#define SPI_FIFOTRIG_TXLVLENA(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOTRIG_TXLVLENA_SHIFT)) & SPI_FIFOTRIG_TXLVLENA_MASK)
-#define SPI_FIFOTRIG_RXLVLENA_MASK (0x2U)
-#define SPI_FIFOTRIG_RXLVLENA_SHIFT (1U)
-/*! RXLVLENA - Receive FIFO level trigger enable. This trigger will become an interrupt if enabled
- * in FIFOINTENSET, or a DMA trigger if DMARX in FIFOCFG is set.
- * 0b0..Receive FIFO level does not generate a FIFO level trigger.
- * 0b1..An trigger will be generated if the receive FIFO level reaches the value specified by the RXLVL field in this register.
- */
-#define SPI_FIFOTRIG_RXLVLENA(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOTRIG_RXLVLENA_SHIFT)) & SPI_FIFOTRIG_RXLVLENA_MASK)
-#define SPI_FIFOTRIG_TXLVL_MASK (0xF00U)
-#define SPI_FIFOTRIG_TXLVL_SHIFT (8U)
-/*! TXLVL - Transmit FIFO level trigger point. This field is used only when TXLVLENA = 1. If enabled
- * to do so, the FIFO level can wake up the device just enough to perform DMA, then return to
- * the reduced power mode. See Hardware Wake-up control register. 0 = trigger when the TX FIFO
- * becomes empty. 1 = trigger when the TX FIFO level decreases to one entry. 15 = trigger when the TX
- * FIFO level decreases to 15 entries (is no longer full).
- */
-#define SPI_FIFOTRIG_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOTRIG_TXLVL_SHIFT)) & SPI_FIFOTRIG_TXLVL_MASK)
-#define SPI_FIFOTRIG_RXLVL_MASK (0xF0000U)
-#define SPI_FIFOTRIG_RXLVL_SHIFT (16U)
-/*! RXLVL - Receive FIFO level trigger point. The RX FIFO level is checked when a new piece of data
- * is received. This field is used only when RXLVLENA = 1. If enabled to do so, the FIFO level
- * can wake up the device just enough to perform DMA, then return to the reduced power mode. See
- * Hardware Wake-up control register. 0 = trigger when the RX FIFO has received one entry (is no
- * longer empty). 1 = trigger when the RX FIFO has received two entries. 15 = trigger when the RX
- * FIFO has received 16 entries (has become full).
- */
-#define SPI_FIFOTRIG_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOTRIG_RXLVL_SHIFT)) & SPI_FIFOTRIG_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTENSET - FIFO interrupt enable set (enable) and read register. */
-/*! @{ */
-#define SPI_FIFOINTENSET_TXERR_MASK (0x1U)
-#define SPI_FIFOINTENSET_TXERR_SHIFT (0U)
-/*! TXERR - Determines whether an interrupt occurs when a transmit error occurs, based on the TXERR flag in the FIFOSTAT register.
- * 0b0..No interrupt will be generated for a transmit error.
- * 0b1..An interrupt will be generated when a transmit error occurs.
- */
-#define SPI_FIFOINTENSET_TXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENSET_TXERR_SHIFT)) & SPI_FIFOINTENSET_TXERR_MASK)
-#define SPI_FIFOINTENSET_RXERR_MASK (0x2U)
-#define SPI_FIFOINTENSET_RXERR_SHIFT (1U)
-/*! RXERR - Determines whether an interrupt occurs when a receive error occurs, based on the RXERR flag in the FIFOSTAT register.
- * 0b0..No interrupt will be generated for a receive error.
- * 0b1..An interrupt will be generated when a receive error occurs.
- */
-#define SPI_FIFOINTENSET_RXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENSET_RXERR_SHIFT)) & SPI_FIFOINTENSET_RXERR_MASK)
-#define SPI_FIFOINTENSET_TXLVL_MASK (0x4U)
-#define SPI_FIFOINTENSET_TXLVL_SHIFT (2U)
-/*! TXLVL - Determines whether an interrupt occurs when a the transmit FIFO reaches the level
- * specified by the TXLVL field in the FIFOTRIG register.
- * 0b0..No interrupt will be generated based on the TX FIFO level.
- * 0b1..If TXLVLENA in the FIFOTRIG register = 1, an interrupt will be generated when the TX FIFO level decreases
- * to the level specified by TXLVL in the FIFOTRIG register.
- */
-#define SPI_FIFOINTENSET_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENSET_TXLVL_SHIFT)) & SPI_FIFOINTENSET_TXLVL_MASK)
-#define SPI_FIFOINTENSET_RXLVL_MASK (0x8U)
-#define SPI_FIFOINTENSET_RXLVL_SHIFT (3U)
-/*! RXLVL - Determines whether an interrupt occurs when a the receive FIFO reaches the level
- * specified by the TXLVL field in the FIFOTRIG register.
- * 0b0..No interrupt will be generated based on the RX FIFO level.
- * 0b1..If RXLVLENA in the FIFOTRIG register = 1, an interrupt will be generated when the when the RX FIFO level
- * increases to the level specified by RXLVL in the FIFOTRIG register.
- */
-#define SPI_FIFOINTENSET_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENSET_RXLVL_SHIFT)) & SPI_FIFOINTENSET_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTENCLR - FIFO interrupt enable clear (disable) and read register. */
-/*! @{ */
-#define SPI_FIFOINTENCLR_TXERR_MASK (0x1U)
-#define SPI_FIFOINTENCLR_TXERR_SHIFT (0U)
-/*! TXERR - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define SPI_FIFOINTENCLR_TXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENCLR_TXERR_SHIFT)) & SPI_FIFOINTENCLR_TXERR_MASK)
-#define SPI_FIFOINTENCLR_RXERR_MASK (0x2U)
-#define SPI_FIFOINTENCLR_RXERR_SHIFT (1U)
-/*! RXERR - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define SPI_FIFOINTENCLR_RXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENCLR_RXERR_SHIFT)) & SPI_FIFOINTENCLR_RXERR_MASK)
-#define SPI_FIFOINTENCLR_TXLVL_MASK (0x4U)
-#define SPI_FIFOINTENCLR_TXLVL_SHIFT (2U)
-/*! TXLVL - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define SPI_FIFOINTENCLR_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENCLR_TXLVL_SHIFT)) & SPI_FIFOINTENCLR_TXLVL_MASK)
-#define SPI_FIFOINTENCLR_RXLVL_MASK (0x8U)
-#define SPI_FIFOINTENCLR_RXLVL_SHIFT (3U)
-/*! RXLVL - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define SPI_FIFOINTENCLR_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENCLR_RXLVL_SHIFT)) & SPI_FIFOINTENCLR_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTSTAT - FIFO interrupt status register. */
-/*! @{ */
-#define SPI_FIFOINTSTAT_TXERR_MASK (0x1U)
-#define SPI_FIFOINTSTAT_TXERR_SHIFT (0U)
-/*! TXERR - TX FIFO error.
- */
-#define SPI_FIFOINTSTAT_TXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTSTAT_TXERR_SHIFT)) & SPI_FIFOINTSTAT_TXERR_MASK)
-#define SPI_FIFOINTSTAT_RXERR_MASK (0x2U)
-#define SPI_FIFOINTSTAT_RXERR_SHIFT (1U)
-/*! RXERR - RX FIFO error.
- */
-#define SPI_FIFOINTSTAT_RXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTSTAT_RXERR_SHIFT)) & SPI_FIFOINTSTAT_RXERR_MASK)
-#define SPI_FIFOINTSTAT_TXLVL_MASK (0x4U)
-#define SPI_FIFOINTSTAT_TXLVL_SHIFT (2U)
-/*! TXLVL - Transmit FIFO level interrupt.
- */
-#define SPI_FIFOINTSTAT_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTSTAT_TXLVL_SHIFT)) & SPI_FIFOINTSTAT_TXLVL_MASK)
-#define SPI_FIFOINTSTAT_RXLVL_MASK (0x8U)
-#define SPI_FIFOINTSTAT_RXLVL_SHIFT (3U)
-/*! RXLVL - Receive FIFO level interrupt.
- */
-#define SPI_FIFOINTSTAT_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTSTAT_RXLVL_SHIFT)) & SPI_FIFOINTSTAT_RXLVL_MASK)
-#define SPI_FIFOINTSTAT_PERINT_MASK (0x10U)
-#define SPI_FIFOINTSTAT_PERINT_SHIFT (4U)
-/*! PERINT - Peripheral interrupt.
- */
-#define SPI_FIFOINTSTAT_PERINT(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTSTAT_PERINT_SHIFT)) & SPI_FIFOINTSTAT_PERINT_MASK)
-/*! @} */
-
-/*! @name FIFOWR - FIFO write data. */
-/*! @{ */
-#define SPI_FIFOWR_TXDATA_MASK (0xFFFFU)
-#define SPI_FIFOWR_TXDATA_SHIFT (0U)
-/*! TXDATA - Transmit data to the FIFO.
- */
-#define SPI_FIFOWR_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_TXDATA_SHIFT)) & SPI_FIFOWR_TXDATA_MASK)
-#define SPI_FIFOWR_TXSSEL0_N_MASK (0x10000U)
-#define SPI_FIFOWR_TXSSEL0_N_SHIFT (16U)
-/*! TXSSEL0_N - Transmit slave select. This field asserts SSEL0 in master mode. The output on the pin is active LOW by default.
- * 0b0..SSEL0 asserted.
- * 0b1..SSEL0 not asserted.
- */
-#define SPI_FIFOWR_TXSSEL0_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_TXSSEL0_N_SHIFT)) & SPI_FIFOWR_TXSSEL0_N_MASK)
-#define SPI_FIFOWR_TXSSEL1_N_MASK (0x20000U)
-#define SPI_FIFOWR_TXSSEL1_N_SHIFT (17U)
-/*! TXSSEL1_N - Transmit slave select. This field asserts SSEL1 in master mode. The output on the pin is active LOW by default.
- * 0b0..SSEL1 asserted.
- * 0b1..SSEL1 not asserted.
- */
-#define SPI_FIFOWR_TXSSEL1_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_TXSSEL1_N_SHIFT)) & SPI_FIFOWR_TXSSEL1_N_MASK)
-#define SPI_FIFOWR_TXSSEL2_N_MASK (0x40000U)
-#define SPI_FIFOWR_TXSSEL2_N_SHIFT (18U)
-/*! TXSSEL2_N - Transmit slave select. This field asserts SSEL2 in master mode. The output on the pin is active LOW by default.
- * 0b0..SSEL2 asserted.
- * 0b1..SSEL2 not asserted.
- */
-#define SPI_FIFOWR_TXSSEL2_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_TXSSEL2_N_SHIFT)) & SPI_FIFOWR_TXSSEL2_N_MASK)
-#define SPI_FIFOWR_TXSSEL3_N_MASK (0x80000U)
-#define SPI_FIFOWR_TXSSEL3_N_SHIFT (19U)
-/*! TXSSEL3_N - Transmit slave select. This field asserts SSEL3 in master mode. The output on the pin is active LOW by default.
- * 0b0..SSEL3 asserted.
- * 0b1..SSEL3 not asserted.
- */
-#define SPI_FIFOWR_TXSSEL3_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_TXSSEL3_N_SHIFT)) & SPI_FIFOWR_TXSSEL3_N_MASK)
-#define SPI_FIFOWR_EOT_MASK (0x100000U)
-#define SPI_FIFOWR_EOT_SHIFT (20U)
-/*! EOT - End of transfer. The asserted SSEL will be deasserted at the end of a transfer and remain
- * so far at least the time specified by the Transfer_delay value in the DLY register.
- * 0b0..SSEL not deasserted. This piece of data is not treated as the end of a transfer. SSEL will not be deasserted at the end of this data.
- * 0b1..SSEL deasserted. This piece of data is treated as the end of a transfer. SSEL will be deasserted at the end of this piece of data.
- */
-#define SPI_FIFOWR_EOT(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_EOT_SHIFT)) & SPI_FIFOWR_EOT_MASK)
-#define SPI_FIFOWR_EOF_MASK (0x200000U)
-#define SPI_FIFOWR_EOF_SHIFT (21U)
-/*! EOF - End of frame. Between frames, a delay may be inserted, as defined by the Frame_delay value
- * in the DLY register. The end of a frame may not be particularly meaningful if the Frame_delay
- * value = 0. This control can be used as part of the support for frame lengths greater than 16
- * bits.
- * 0b0..Data not EOF. This piece of data transmitted is not treated as the end of a frame.
- * 0b1..Data EOF. This piece of data is treated as the end of a frame, causing the Frame_delay time to be
- * inserted before subsequent data is transmitted.
- */
-#define SPI_FIFOWR_EOF(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_EOF_SHIFT)) & SPI_FIFOWR_EOF_MASK)
-#define SPI_FIFOWR_RXIGNORE_MASK (0x400000U)
-#define SPI_FIFOWR_RXIGNORE_SHIFT (22U)
-/*! RXIGNORE - Receive Ignore. This allows data to be transmitted using the SPI without the need to
- * read unneeded data from the receiver. Setting this bit simplifies the transmit process and can
- * be used with the DMA.
- * 0b0..Read received data. Received data must be read in order to allow transmission to progress. SPI transmit
- * will halt when the receive data FIFO is full. In slave mode, an overrun error will occur if received data
- * is not read before new data is received.
- * 0b1..Ignore received data. Received data is ignored, allowing transmission without reading unneeded received
- * data. No receiver flags are generated.
- */
-#define SPI_FIFOWR_RXIGNORE(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_RXIGNORE_SHIFT)) & SPI_FIFOWR_RXIGNORE_MASK)
-#define SPI_FIFOWR_LEN_MASK (0xF000000U)
-#define SPI_FIFOWR_LEN_SHIFT (24U)
-/*! LEN - Data Length. Specifies the data length from 4 to 16 bits. Note that transfer lengths
- * greater than 16 bits are supported by implementing multiple sequential transmits. 0x0-2 = Reserved.
- * 0x3 = Data transfer is 4 bits in length. 0x4 = Data transfer is 5 bits in length. 0xF = Data
- * transfer is 16 bits in length.
- */
-#define SPI_FIFOWR_LEN(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_LEN_SHIFT)) & SPI_FIFOWR_LEN_MASK)
-/*! @} */
-
-/*! @name FIFORD - FIFO read data. */
-/*! @{ */
-#define SPI_FIFORD_RXDATA_MASK (0xFFFFU)
-#define SPI_FIFORD_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO.
- */
-#define SPI_FIFORD_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORD_RXDATA_SHIFT)) & SPI_FIFORD_RXDATA_MASK)
-#define SPI_FIFORD_RXSSEL0_N_MASK (0x10000U)
-#define SPI_FIFORD_RXSSEL0_N_SHIFT (16U)
-/*! RXSSEL0_N - Slave Select for receive. This field allows the state of the SSEL0 pin to be saved
- * along with received data. The value will reflect the SSEL0 pin for both master and slave
- * operation. A zero indicates that a slave select is active. The actual polarity of each slave select
- * pin is configured by the related SPOL bit in CFG.
- */
-#define SPI_FIFORD_RXSSEL0_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORD_RXSSEL0_N_SHIFT)) & SPI_FIFORD_RXSSEL0_N_MASK)
-#define SPI_FIFORD_RXSSEL1_N_MASK (0x20000U)
-#define SPI_FIFORD_RXSSEL1_N_SHIFT (17U)
-/*! RXSSEL1_N - Slave Select for receive. This field allows the state of the SSEL1 pin to be saved
- * along with received data. The value will reflect the SSEL1 pin for both master and slave
- * operation. A zero indicates that a slave select is active. The actual polarity of each slave select
- * pin is configured by the related SPOL bit in CFG.
- */
-#define SPI_FIFORD_RXSSEL1_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORD_RXSSEL1_N_SHIFT)) & SPI_FIFORD_RXSSEL1_N_MASK)
-#define SPI_FIFORD_RXSSEL2_N_MASK (0x40000U)
-#define SPI_FIFORD_RXSSEL2_N_SHIFT (18U)
-/*! RXSSEL2_N - Slave Select for receive. This field allows the state of the SSEL2 pin to be saved
- * along with received data. The value will reflect the SSEL2 pin for both master and slave
- * operation. A zero indicates that a slave select is active. The actual polarity of each slave select
- * pin is configured by the related SPOL bit in CFG.
- */
-#define SPI_FIFORD_RXSSEL2_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORD_RXSSEL2_N_SHIFT)) & SPI_FIFORD_RXSSEL2_N_MASK)
-#define SPI_FIFORD_RXSSEL3_N_MASK (0x80000U)
-#define SPI_FIFORD_RXSSEL3_N_SHIFT (19U)
-/*! RXSSEL3_N - Slave Select for receive. This field allows the state of the SSEL3 pin to be saved
- * along with received data. The value will reflect the SSEL3 pin for both master and slave
- * operation. A zero indicates that a slave select is active. The actual polarity of each slave select
- * pin is configured by the related SPOL bit in CFG.
- */
-#define SPI_FIFORD_RXSSEL3_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORD_RXSSEL3_N_SHIFT)) & SPI_FIFORD_RXSSEL3_N_MASK)
-#define SPI_FIFORD_SOT_MASK (0x100000U)
-#define SPI_FIFORD_SOT_SHIFT (20U)
-/*! SOT - Start of Transfer flag. This flag will be 1 if this is the first data after the SSELs went
- * from deasserted to asserted (i.e., any previous transfer has ended). This information can be
- * used to identify the first piece of data in cases where the transfer length is greater than 16
- * bits.
- */
-#define SPI_FIFORD_SOT(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORD_SOT_SHIFT)) & SPI_FIFORD_SOT_MASK)
-/*! @} */
-
-/*! @name FIFORDNOPOP - FIFO data read with no FIFO pop. */
-/*! @{ */
-#define SPI_FIFORDNOPOP_RXDATA_MASK (0xFFFFU)
-#define SPI_FIFORDNOPOP_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO.
- */
-#define SPI_FIFORDNOPOP_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORDNOPOP_RXDATA_SHIFT)) & SPI_FIFORDNOPOP_RXDATA_MASK)
-#define SPI_FIFORDNOPOP_RXSSEL0_N_MASK (0x10000U)
-#define SPI_FIFORDNOPOP_RXSSEL0_N_SHIFT (16U)
-/*! RXSSEL0_N - Slave Select for receive.
- */
-#define SPI_FIFORDNOPOP_RXSSEL0_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORDNOPOP_RXSSEL0_N_SHIFT)) & SPI_FIFORDNOPOP_RXSSEL0_N_MASK)
-#define SPI_FIFORDNOPOP_RXSSEL1_N_MASK (0x20000U)
-#define SPI_FIFORDNOPOP_RXSSEL1_N_SHIFT (17U)
-/*! RXSSEL1_N - Slave Select for receive.
- */
-#define SPI_FIFORDNOPOP_RXSSEL1_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORDNOPOP_RXSSEL1_N_SHIFT)) & SPI_FIFORDNOPOP_RXSSEL1_N_MASK)
-#define SPI_FIFORDNOPOP_RXSSEL2_N_MASK (0x40000U)
-#define SPI_FIFORDNOPOP_RXSSEL2_N_SHIFT (18U)
-/*! RXSSEL2_N - Slave Select for receive.
- */
-#define SPI_FIFORDNOPOP_RXSSEL2_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORDNOPOP_RXSSEL2_N_SHIFT)) & SPI_FIFORDNOPOP_RXSSEL2_N_MASK)
-#define SPI_FIFORDNOPOP_RXSSEL3_N_MASK (0x80000U)
-#define SPI_FIFORDNOPOP_RXSSEL3_N_SHIFT (19U)
-/*! RXSSEL3_N - Slave Select for receive.
- */
-#define SPI_FIFORDNOPOP_RXSSEL3_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORDNOPOP_RXSSEL3_N_SHIFT)) & SPI_FIFORDNOPOP_RXSSEL3_N_MASK)
-#define SPI_FIFORDNOPOP_SOT_MASK (0x100000U)
-#define SPI_FIFORDNOPOP_SOT_SHIFT (20U)
-/*! SOT - Start of transfer flag.
- */
-#define SPI_FIFORDNOPOP_SOT(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORDNOPOP_SOT_SHIFT)) & SPI_FIFORDNOPOP_SOT_MASK)
-/*! @} */
-
-/*! @name ID - Peripheral identification register. */
-/*! @{ */
-#define SPI_ID_APERTURE_MASK (0xFFU)
-#define SPI_ID_APERTURE_SHIFT (0U)
-/*! APERTURE - Aperture: encoded as (aperture size/4K) -1, so 0x00 means a 4K aperture.
- */
-#define SPI_ID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << SPI_ID_APERTURE_SHIFT)) & SPI_ID_APERTURE_MASK)
-#define SPI_ID_MINOR_REV_MASK (0xF00U)
-#define SPI_ID_MINOR_REV_SHIFT (8U)
-/*! MINOR_REV - Minor revision of module implementation.
- */
-#define SPI_ID_MINOR_REV(x) (((uint32_t)(((uint32_t)(x)) << SPI_ID_MINOR_REV_SHIFT)) & SPI_ID_MINOR_REV_MASK)
-#define SPI_ID_MAJOR_REV_MASK (0xF000U)
-#define SPI_ID_MAJOR_REV_SHIFT (12U)
-/*! MAJOR_REV - Major revision of module implementation.
- */
-#define SPI_ID_MAJOR_REV(x) (((uint32_t)(((uint32_t)(x)) << SPI_ID_MAJOR_REV_SHIFT)) & SPI_ID_MAJOR_REV_MASK)
-#define SPI_ID_ID_MASK (0xFFFF0000U)
-#define SPI_ID_ID_SHIFT (16U)
-/*! ID - Module identifier for the selected function.
- */
-#define SPI_ID_ID(x) (((uint32_t)(((uint32_t)(x)) << SPI_ID_ID_SHIFT)) & SPI_ID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group SPI_Register_Masks */
-
-
-/* SPI - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral SPI0 base address */
- #define SPI0_BASE (0x50086000u)
- /** Peripheral SPI0 base address */
- #define SPI0_BASE_NS (0x40086000u)
- /** Peripheral SPI0 base pointer */
- #define SPI0 ((SPI_Type *)SPI0_BASE)
- /** Peripheral SPI0 base pointer */
- #define SPI0_NS ((SPI_Type *)SPI0_BASE_NS)
- /** Peripheral SPI1 base address */
- #define SPI1_BASE (0x50087000u)
- /** Peripheral SPI1 base address */
- #define SPI1_BASE_NS (0x40087000u)
- /** Peripheral SPI1 base pointer */
- #define SPI1 ((SPI_Type *)SPI1_BASE)
- /** Peripheral SPI1 base pointer */
- #define SPI1_NS ((SPI_Type *)SPI1_BASE_NS)
- /** Peripheral SPI2 base address */
- #define SPI2_BASE (0x50088000u)
- /** Peripheral SPI2 base address */
- #define SPI2_BASE_NS (0x40088000u)
- /** Peripheral SPI2 base pointer */
- #define SPI2 ((SPI_Type *)SPI2_BASE)
- /** Peripheral SPI2 base pointer */
- #define SPI2_NS ((SPI_Type *)SPI2_BASE_NS)
- /** Peripheral SPI3 base address */
- #define SPI3_BASE (0x50089000u)
- /** Peripheral SPI3 base address */
- #define SPI3_BASE_NS (0x40089000u)
- /** Peripheral SPI3 base pointer */
- #define SPI3 ((SPI_Type *)SPI3_BASE)
- /** Peripheral SPI3 base pointer */
- #define SPI3_NS ((SPI_Type *)SPI3_BASE_NS)
- /** Peripheral SPI4 base address */
- #define SPI4_BASE (0x5008A000u)
- /** Peripheral SPI4 base address */
- #define SPI4_BASE_NS (0x4008A000u)
- /** Peripheral SPI4 base pointer */
- #define SPI4 ((SPI_Type *)SPI4_BASE)
- /** Peripheral SPI4 base pointer */
- #define SPI4_NS ((SPI_Type *)SPI4_BASE_NS)
- /** Peripheral SPI5 base address */
- #define SPI5_BASE (0x50096000u)
- /** Peripheral SPI5 base address */
- #define SPI5_BASE_NS (0x40096000u)
- /** Peripheral SPI5 base pointer */
- #define SPI5 ((SPI_Type *)SPI5_BASE)
- /** Peripheral SPI5 base pointer */
- #define SPI5_NS ((SPI_Type *)SPI5_BASE_NS)
- /** Peripheral SPI6 base address */
- #define SPI6_BASE (0x50097000u)
- /** Peripheral SPI6 base address */
- #define SPI6_BASE_NS (0x40097000u)
- /** Peripheral SPI6 base pointer */
- #define SPI6 ((SPI_Type *)SPI6_BASE)
- /** Peripheral SPI6 base pointer */
- #define SPI6_NS ((SPI_Type *)SPI6_BASE_NS)
- /** Peripheral SPI7 base address */
- #define SPI7_BASE (0x50098000u)
- /** Peripheral SPI7 base address */
- #define SPI7_BASE_NS (0x40098000u)
- /** Peripheral SPI7 base pointer */
- #define SPI7 ((SPI_Type *)SPI7_BASE)
- /** Peripheral SPI7 base pointer */
- #define SPI7_NS ((SPI_Type *)SPI7_BASE_NS)
- /** Peripheral SPI8 base address */
- #define SPI8_BASE (0x5009F000u)
- /** Peripheral SPI8 base address */
- #define SPI8_BASE_NS (0x4009F000u)
- /** Peripheral SPI8 base pointer */
- #define SPI8 ((SPI_Type *)SPI8_BASE)
- /** Peripheral SPI8 base pointer */
- #define SPI8_NS ((SPI_Type *)SPI8_BASE_NS)
- /** Array initializer of SPI peripheral base addresses */
- #define SPI_BASE_ADDRS { SPI0_BASE, SPI1_BASE, SPI2_BASE, SPI3_BASE, SPI4_BASE, SPI5_BASE, SPI6_BASE, SPI7_BASE, SPI8_BASE }
- /** Array initializer of SPI peripheral base pointers */
- #define SPI_BASE_PTRS { SPI0, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SPI7, SPI8 }
- /** Array initializer of SPI peripheral base addresses */
- #define SPI_BASE_ADDRS_NS { SPI0_BASE_NS, SPI1_BASE_NS, SPI2_BASE_NS, SPI3_BASE_NS, SPI4_BASE_NS, SPI5_BASE_NS, SPI6_BASE_NS, SPI7_BASE_NS, SPI8_BASE_NS }
- /** Array initializer of SPI peripheral base pointers */
- #define SPI_BASE_PTRS_NS { SPI0_NS, SPI1_NS, SPI2_NS, SPI3_NS, SPI4_NS, SPI5_NS, SPI6_NS, SPI7_NS, SPI8_NS }
-#else
- /** Peripheral SPI0 base address */
- #define SPI0_BASE (0x40086000u)
- /** Peripheral SPI0 base pointer */
- #define SPI0 ((SPI_Type *)SPI0_BASE)
- /** Peripheral SPI1 base address */
- #define SPI1_BASE (0x40087000u)
- /** Peripheral SPI1 base pointer */
- #define SPI1 ((SPI_Type *)SPI1_BASE)
- /** Peripheral SPI2 base address */
- #define SPI2_BASE (0x40088000u)
- /** Peripheral SPI2 base pointer */
- #define SPI2 ((SPI_Type *)SPI2_BASE)
- /** Peripheral SPI3 base address */
- #define SPI3_BASE (0x40089000u)
- /** Peripheral SPI3 base pointer */
- #define SPI3 ((SPI_Type *)SPI3_BASE)
- /** Peripheral SPI4 base address */
- #define SPI4_BASE (0x4008A000u)
- /** Peripheral SPI4 base pointer */
- #define SPI4 ((SPI_Type *)SPI4_BASE)
- /** Peripheral SPI5 base address */
- #define SPI5_BASE (0x40096000u)
- /** Peripheral SPI5 base pointer */
- #define SPI5 ((SPI_Type *)SPI5_BASE)
- /** Peripheral SPI6 base address */
- #define SPI6_BASE (0x40097000u)
- /** Peripheral SPI6 base pointer */
- #define SPI6 ((SPI_Type *)SPI6_BASE)
- /** Peripheral SPI7 base address */
- #define SPI7_BASE (0x40098000u)
- /** Peripheral SPI7 base pointer */
- #define SPI7 ((SPI_Type *)SPI7_BASE)
- /** Peripheral SPI8 base address */
- #define SPI8_BASE (0x4009F000u)
- /** Peripheral SPI8 base pointer */
- #define SPI8 ((SPI_Type *)SPI8_BASE)
- /** Array initializer of SPI peripheral base addresses */
- #define SPI_BASE_ADDRS { SPI0_BASE, SPI1_BASE, SPI2_BASE, SPI3_BASE, SPI4_BASE, SPI5_BASE, SPI6_BASE, SPI7_BASE, SPI8_BASE }
- /** Array initializer of SPI peripheral base pointers */
- #define SPI_BASE_PTRS { SPI0, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SPI7, SPI8 }
-#endif
-/** Interrupt vectors for the SPI peripheral type */
-#define SPI_IRQS { FLEXCOMM0_IRQn, FLEXCOMM1_IRQn, FLEXCOMM2_IRQn, FLEXCOMM3_IRQn, FLEXCOMM4_IRQn, FLEXCOMM5_IRQn, FLEXCOMM6_IRQn, FLEXCOMM7_IRQn, FLEXCOMM8_IRQn }
-
-/*!
- * @}
- */ /* end of group SPI_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- SYSCON Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SYSCON_Peripheral_Access_Layer SYSCON Peripheral Access Layer
- * @{
- */
-
-/** SYSCON - Register Layout Typedef */
-typedef struct {
- __IO uint32_t MEMORYREMAP; /**< Memory Remap control register, offset: 0x0 */
- uint8_t RESERVED_0[12];
- __IO uint32_t AHBMATPRIO; /**< AHB Matrix priority control register Priority values are 3 = highest, 0 = lowest, offset: 0x10 */
- uint8_t RESERVED_1[36];
- __IO uint32_t CPU0STCKCAL; /**< System tick calibration for secure part of CPU0, offset: 0x38 */
- __IO uint32_t CPU0NSTCKCAL; /**< System tick calibration for non-secure part of CPU0, offset: 0x3C */
- __IO uint32_t CPU1STCKCAL; /**< System tick calibration for CPU1, offset: 0x40 */
- uint8_t RESERVED_2[4];
- __IO uint32_t NMISRC; /**< NMI Source Select, offset: 0x48 */
- uint8_t RESERVED_3[180];
- union { /* offset: 0x100 */
- struct { /* offset: 0x100 */
- __IO uint32_t PRESETCTRL0; /**< Peripheral reset control 0, offset: 0x100 */
- __IO uint32_t PRESETCTRL1; /**< Peripheral reset control 1, offset: 0x104 */
- __IO uint32_t PRESETCTRL2; /**< Peripheral reset control 2, offset: 0x108 */
- } PRESETCTRL;
- __IO uint32_t PRESETCTRLX[3]; /**< Peripheral reset control register, array offset: 0x100, array step: 0x4 */
- };
- uint8_t RESERVED_4[20];
- __IO uint32_t PRESETCTRLSET[3]; /**< Peripheral reset control set register, array offset: 0x120, array step: 0x4 */
- uint8_t RESERVED_5[20];
- __IO uint32_t PRESETCTRLCLR[3]; /**< Peripheral reset control clear register, array offset: 0x140, array step: 0x4 */
- uint8_t RESERVED_6[20];
- __O uint32_t SWR_RESET; /**< generate a software_reset, offset: 0x160 */
- uint8_t RESERVED_7[156];
- union { /* offset: 0x200 */
- struct { /* offset: 0x200 */
- __IO uint32_t AHBCLKCTRL0; /**< AHB Clock control 0, offset: 0x200 */
- __IO uint32_t AHBCLKCTRL1; /**< AHB Clock control 1, offset: 0x204 */
- __IO uint32_t AHBCLKCTRL2; /**< AHB Clock control 2, offset: 0x208 */
- } AHBCLKCTRL;
- __IO uint32_t AHBCLKCTRLX[3]; /**< Peripheral reset control register, array offset: 0x200, array step: 0x4 */
- };
- uint8_t RESERVED_8[20];
- __IO uint32_t AHBCLKCTRLSET[3]; /**< Peripheral reset control register, array offset: 0x220, array step: 0x4 */
- uint8_t RESERVED_9[20];
- __IO uint32_t AHBCLKCTRLCLR[3]; /**< Peripheral reset control register, array offset: 0x240, array step: 0x4 */
- uint8_t RESERVED_10[20];
- union { /* offset: 0x260 */
- struct { /* offset: 0x260 */
- __IO uint32_t SYSTICKCLKSEL0; /**< System Tick Timer for CPU0 source select, offset: 0x260 */
- __IO uint32_t SYSTICKCLKSEL1; /**< System Tick Timer for CPU1 source select, offset: 0x264 */
- } SYSTICKCLKSEL;
- __IO uint32_t SYSTICKCLKSELX[2]; /**< Peripheral reset control register, array offset: 0x260, array step: 0x4 */
- };
- __IO uint32_t TRACECLKSEL; /**< Trace clock source select, offset: 0x268 */
- union { /* offset: 0x26C */
- struct { /* offset: 0x26C */
- __IO uint32_t CTIMERCLKSEL0; /**< CTimer 0 clock source select, offset: 0x26C */
- __IO uint32_t CTIMERCLKSEL1; /**< CTimer 1 clock source select, offset: 0x270 */
- __IO uint32_t CTIMERCLKSEL2; /**< CTimer 2 clock source select, offset: 0x274 */
- __IO uint32_t CTIMERCLKSEL3; /**< CTimer 3 clock source select, offset: 0x278 */
- __IO uint32_t CTIMERCLKSEL4; /**< CTimer 4 clock source select, offset: 0x27C */
- } CTIMERCLKSEL;
- __IO uint32_t CTIMERCLKSELX[5]; /**< Peripheral reset control register, array offset: 0x26C, array step: 0x4 */
- };
- __IO uint32_t MAINCLKSELA; /**< Main clock A source select, offset: 0x280 */
- __IO uint32_t MAINCLKSELB; /**< Main clock source select, offset: 0x284 */
- __IO uint32_t CLKOUTSEL; /**< CLKOUT clock source select, offset: 0x288 */
- uint8_t RESERVED_11[4];
- __IO uint32_t PLL0CLKSEL; /**< PLL0 clock source select, offset: 0x290 */
- __IO uint32_t PLL1CLKSEL; /**< PLL1 clock source select, offset: 0x294 */
- uint8_t RESERVED_12[12];
- __IO uint32_t ADCCLKSEL; /**< ADC clock source select, offset: 0x2A4 */
- __IO uint32_t USB0CLKSEL; /**< FS USB clock source select, offset: 0x2A8 */
- uint8_t RESERVED_13[4];
- union { /* offset: 0x2B0 */
- struct { /* offset: 0x2B0 */
- __IO uint32_t FCCLKSEL0; /**< Flexcomm Interface 0 clock source select for Fractional Rate Divider, offset: 0x2B0 */
- __IO uint32_t FCCLKSEL1; /**< Flexcomm Interface 1 clock source select for Fractional Rate Divider, offset: 0x2B4 */
- __IO uint32_t FCCLKSEL2; /**< Flexcomm Interface 2 clock source select for Fractional Rate Divider, offset: 0x2B8 */
- __IO uint32_t FCCLKSEL3; /**< Flexcomm Interface 3 clock source select for Fractional Rate Divider, offset: 0x2BC */
- __IO uint32_t FCCLKSEL4; /**< Flexcomm Interface 4 clock source select for Fractional Rate Divider, offset: 0x2C0 */
- __IO uint32_t FCCLKSEL5; /**< Flexcomm Interface 5 clock source select for Fractional Rate Divider, offset: 0x2C4 */
- __IO uint32_t FCCLKSEL6; /**< Flexcomm Interface 6 clock source select for Fractional Rate Divider, offset: 0x2C8 */
- __IO uint32_t FCCLKSEL7; /**< Flexcomm Interface 7 clock source select for Fractional Rate Divider, offset: 0x2CC */
- } FCCLKSEL;
- __IO uint32_t FCCLKSELX[8]; /**< Peripheral reset control register, array offset: 0x2B0, array step: 0x4 */
- };
- __IO uint32_t HSLSPICLKSEL; /**< HS LSPI clock source select, offset: 0x2D0 */
- uint8_t RESERVED_14[12];
- __IO uint32_t MCLKCLKSEL; /**< MCLK clock source select, offset: 0x2E0 */
- uint8_t RESERVED_15[12];
- __IO uint32_t SCTCLKSEL; /**< SCTimer/PWM clock source select, offset: 0x2F0 */
- uint8_t RESERVED_16[4];
- __IO uint32_t SDIOCLKSEL; /**< SDIO clock source select, offset: 0x2F8 */
- uint8_t RESERVED_17[4];
- __IO uint32_t SYSTICKCLKDIV0; /**< System Tick Timer divider for CPU0, offset: 0x300 */
- __IO uint32_t SYSTICKCLKDIV1; /**< System Tick Timer divider for CPU1, offset: 0x304 */
- __IO uint32_t TRACECLKDIV; /**< TRACE clock divider, offset: 0x308 */
- uint8_t RESERVED_18[20];
- union { /* offset: 0x320 */
- struct { /* offset: 0x320 */
- __IO uint32_t FLEXFRG0CTRL; /**< Fractional rate divider for flexcomm 0, offset: 0x320 */
- __IO uint32_t FLEXFRG1CTRL; /**< Fractional rate divider for flexcomm 1, offset: 0x324 */
- __IO uint32_t FLEXFRG2CTRL; /**< Fractional rate divider for flexcomm 2, offset: 0x328 */
- __IO uint32_t FLEXFRG3CTRL; /**< Fractional rate divider for flexcomm 3, offset: 0x32C */
- __IO uint32_t FLEXFRG4CTRL; /**< Fractional rate divider for flexcomm 4, offset: 0x330 */
- __IO uint32_t FLEXFRG5CTRL; /**< Fractional rate divider for flexcomm 5, offset: 0x334 */
- __IO uint32_t FLEXFRG6CTRL; /**< Fractional rate divider for flexcomm 6, offset: 0x338 */
- __IO uint32_t FLEXFRG7CTRL; /**< Fractional rate divider for flexcomm 7, offset: 0x33C */
- } FLEXFRGCTRL;
- __IO uint32_t FLEXFRGXCTRL[8]; /**< Peripheral reset control register, array offset: 0x320, array step: 0x4 */
- };
- uint8_t RESERVED_19[64];
- __IO uint32_t AHBCLKDIV; /**< System clock divider, offset: 0x380 */
- __IO uint32_t CLKOUTDIV; /**< CLKOUT clock divider, offset: 0x384 */
- __IO uint32_t FROHFDIV; /**< FRO_HF (96MHz) clock divider, offset: 0x388 */
- __IO uint32_t WDTCLKDIV; /**< WDT clock divider, offset: 0x38C */
- uint8_t RESERVED_20[4];
- __IO uint32_t ADCCLKDIV; /**< ADC clock divider, offset: 0x394 */
- __IO uint32_t USB0CLKDIV; /**< USB0 Clock divider, offset: 0x398 */
- uint8_t RESERVED_21[16];
- __IO uint32_t MCLKDIV; /**< I2S MCLK clock divider, offset: 0x3AC */
- uint8_t RESERVED_22[4];
- __IO uint32_t SCTCLKDIV; /**< SCT/PWM clock divider, offset: 0x3B4 */
- uint8_t RESERVED_23[4];
- __IO uint32_t SDIOCLKDIV; /**< SDIO clock divider, offset: 0x3BC */
- uint8_t RESERVED_24[4];
- __IO uint32_t PLL0CLKDIV; /**< PLL0 clock divider, offset: 0x3C4 */
- uint8_t RESERVED_25[52];
- __IO uint32_t CLOCKGENUPDATELOCKOUT; /**< Control clock configuration registers access (like xxxDIV, xxxSEL), offset: 0x3FC */
- __IO uint32_t FMCCR; /**< FMC configuration register, offset: 0x400 */
- uint8_t RESERVED_26[8];
- __IO uint32_t USB0NEEDCLKCTRL; /**< USB0 need clock control, offset: 0x40C */
- __I uint32_t USB0NEEDCLKSTAT; /**< USB0 need clock status, offset: 0x410 */
- uint8_t RESERVED_27[8];
- __O uint32_t FMCFLUSH; /**< FMCflush control, offset: 0x41C */
- __IO uint32_t MCLKIO; /**< MCLK control, offset: 0x420 */
- __IO uint32_t USB1NEEDCLKCTRL; /**< USB1 need clock control, offset: 0x424 */
- __I uint32_t USB1NEEDCLKSTAT; /**< USB1 need clock status, offset: 0x428 */
- uint8_t RESERVED_28[52];
- __IO uint32_t SDIOCLKCTRL; /**< SDIO CCLKIN phase and delay control, offset: 0x460 */
- uint8_t RESERVED_29[252];
- __IO uint32_t PLL1CTRL; /**< PLL1 550m control, offset: 0x560 */
- __I uint32_t PLL1STAT; /**< PLL1 550m status, offset: 0x564 */
- __IO uint32_t PLL1NDEC; /**< PLL1 550m N divider, offset: 0x568 */
- __IO uint32_t PLL1MDEC; /**< PLL1 550m M divider, offset: 0x56C */
- __IO uint32_t PLL1PDEC; /**< PLL1 550m P divider, offset: 0x570 */
- uint8_t RESERVED_30[12];
- __IO uint32_t PLL0CTRL; /**< PLL0 550m control, offset: 0x580 */
- __I uint32_t PLL0STAT; /**< PLL0 550m status, offset: 0x584 */
- __IO uint32_t PLL0NDEC; /**< PLL0 550m N divider, offset: 0x588 */
- __IO uint32_t PLL0PDEC; /**< PLL0 550m P divider, offset: 0x58C */
- __IO uint32_t PLL0SSCG0; /**< PLL0 Spread Spectrum Wrapper control register 0, offset: 0x590 */
- __IO uint32_t PLL0SSCG1; /**< PLL0 Spread Spectrum Wrapper control register 1, offset: 0x594 */
- uint8_t RESERVED_31[616];
- __IO uint32_t CPUCTRL; /**< CPU Control for multiple processors, offset: 0x800 */
- __IO uint32_t CPBOOT; /**< Coprocessor Boot Address, offset: 0x804 */
- uint8_t RESERVED_32[4];
- __I uint32_t CPSTAT; /**< CPU Status, offset: 0x80C */
- uint8_t RESERVED_33[520];
- __IO uint32_t CLOCK_CTRL; /**< Various system clock controls : Flash clock (48 MHz) control, clocks to Frequency Measures, offset: 0xA18 */
- uint8_t RESERVED_34[244];
- __IO uint32_t COMP_INT_CTRL; /**< Comparator Interrupt control, offset: 0xB10 */
- __I uint32_t COMP_INT_STATUS; /**< Comparator Interrupt status, offset: 0xB14 */
- uint8_t RESERVED_35[748];
- __IO uint32_t AUTOCLKGATEOVERRIDE; /**< Control automatic clock gating, offset: 0xE04 */
- __IO uint32_t GPIOPSYNC; /**< Enable bypass of the first stage of synchonization inside GPIO_INT module, offset: 0xE08 */
- uint8_t RESERVED_36[404];
- __IO uint32_t DEBUG_LOCK_EN; /**< Control write access to security registers., offset: 0xFA0 */
- __IO uint32_t DEBUG_FEATURES; /**< Cortex M33 (CPU0) and micro Cortex M33 (CPU1) debug features control., offset: 0xFA4 */
- __IO uint32_t DEBUG_FEATURES_DP; /**< Cortex M33 (CPU0) and micro Cortex M33 (CPU1) debug features control DUPLICATE register., offset: 0xFA8 */
- uint8_t RESERVED_37[16];
- __O uint32_t KEY_BLOCK; /**< block quiddikey/PUF all index., offset: 0xFBC */
- __IO uint32_t DEBUG_AUTH_BEACON; /**< Debug authentication BEACON register, offset: 0xFC0 */
- uint8_t RESERVED_38[16];
- __IO uint32_t CPUCFG; /**< CPUs configuration register, offset: 0xFD4 */
- uint8_t RESERVED_39[32];
- __I uint32_t DEVICE_ID0; /**< Device ID, offset: 0xFF8 */
- __I uint32_t DIEID; /**< Chip revision ID and Number, offset: 0xFFC */
-} SYSCON_Type;
-
-/* ----------------------------------------------------------------------------
- -- SYSCON Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SYSCON_Register_Masks SYSCON Register Masks
- * @{
- */
-
-/*! @name MEMORYREMAP - Memory Remap control register */
-/*! @{ */
-#define SYSCON_MEMORYREMAP_MAP_MASK (0x3U)
-#define SYSCON_MEMORYREMAP_MAP_SHIFT (0U)
-/*! MAP - Select the location of the vector table :.
- * 0b00..Vector Table in ROM.
- * 0b01..Vector Table in RAM.
- * 0b10..Vector Table in Flash.
- * 0b11..Vector Table in Flash.
- */
-#define SYSCON_MEMORYREMAP_MAP(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MEMORYREMAP_MAP_SHIFT)) & SYSCON_MEMORYREMAP_MAP_MASK)
-/*! @} */
-
-/*! @name AHBMATPRIO - AHB Matrix priority control register Priority values are 3 = highest, 0 = lowest */
-/*! @{ */
-#define SYSCON_AHBMATPRIO_PRI_CPU0_CBUS_MASK (0x3U)
-#define SYSCON_AHBMATPRIO_PRI_CPU0_CBUS_SHIFT (0U)
-/*! PRI_CPU0_CBUS - CPU0 C-AHB bus.
- */
-#define SYSCON_AHBMATPRIO_PRI_CPU0_CBUS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_CPU0_CBUS_SHIFT)) & SYSCON_AHBMATPRIO_PRI_CPU0_CBUS_MASK)
-#define SYSCON_AHBMATPRIO_PRI_CPU0_SBUS_MASK (0xCU)
-#define SYSCON_AHBMATPRIO_PRI_CPU0_SBUS_SHIFT (2U)
-/*! PRI_CPU0_SBUS - CPU0 S-AHB bus.
- */
-#define SYSCON_AHBMATPRIO_PRI_CPU0_SBUS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_CPU0_SBUS_SHIFT)) & SYSCON_AHBMATPRIO_PRI_CPU0_SBUS_MASK)
-#define SYSCON_AHBMATPRIO_PRI_CPU1_CBUS_MASK (0x30U)
-#define SYSCON_AHBMATPRIO_PRI_CPU1_CBUS_SHIFT (4U)
-/*! PRI_CPU1_CBUS - CPU1 C-AHB bus.
- */
-#define SYSCON_AHBMATPRIO_PRI_CPU1_CBUS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_CPU1_CBUS_SHIFT)) & SYSCON_AHBMATPRIO_PRI_CPU1_CBUS_MASK)
-#define SYSCON_AHBMATPRIO_PRI_CPU1_SBUS_MASK (0xC0U)
-#define SYSCON_AHBMATPRIO_PRI_CPU1_SBUS_SHIFT (6U)
-/*! PRI_CPU1_SBUS - CPU1 S-AHB bus.
- */
-#define SYSCON_AHBMATPRIO_PRI_CPU1_SBUS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_CPU1_SBUS_SHIFT)) & SYSCON_AHBMATPRIO_PRI_CPU1_SBUS_MASK)
-#define SYSCON_AHBMATPRIO_PRI_USB_FS_MASK (0x300U)
-#define SYSCON_AHBMATPRIO_PRI_USB_FS_SHIFT (8U)
-/*! PRI_USB_FS - USB-FS.(USB0)
- */
-#define SYSCON_AHBMATPRIO_PRI_USB_FS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_USB_FS_SHIFT)) & SYSCON_AHBMATPRIO_PRI_USB_FS_MASK)
-#define SYSCON_AHBMATPRIO_PRI_SDMA0_MASK (0xC00U)
-#define SYSCON_AHBMATPRIO_PRI_SDMA0_SHIFT (10U)
-/*! PRI_SDMA0 - DMA0 controller priority.
- */
-#define SYSCON_AHBMATPRIO_PRI_SDMA0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_SDMA0_SHIFT)) & SYSCON_AHBMATPRIO_PRI_SDMA0_MASK)
-#define SYSCON_AHBMATPRIO_PRI_SDIO_MASK (0x30000U)
-#define SYSCON_AHBMATPRIO_PRI_SDIO_SHIFT (16U)
-/*! PRI_SDIO - SDIO.
- */
-#define SYSCON_AHBMATPRIO_PRI_SDIO(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_SDIO_SHIFT)) & SYSCON_AHBMATPRIO_PRI_SDIO_MASK)
-#define SYSCON_AHBMATPRIO_PRI_PQ_MASK (0xC0000U)
-#define SYSCON_AHBMATPRIO_PRI_PQ_SHIFT (18U)
-/*! PRI_PQ - PQ (HW Accelerator).
- */
-#define SYSCON_AHBMATPRIO_PRI_PQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_PQ_SHIFT)) & SYSCON_AHBMATPRIO_PRI_PQ_MASK)
-#define SYSCON_AHBMATPRIO_PRI_HASH_AES_MASK (0x300000U)
-#define SYSCON_AHBMATPRIO_PRI_HASH_AES_SHIFT (20U)
-/*! PRI_HASH_AES - HASH_AES.
- */
-#define SYSCON_AHBMATPRIO_PRI_HASH_AES(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_HASH_AES_SHIFT)) & SYSCON_AHBMATPRIO_PRI_HASH_AES_MASK)
-#define SYSCON_AHBMATPRIO_PRI_USB_HS_MASK (0xC00000U)
-#define SYSCON_AHBMATPRIO_PRI_USB_HS_SHIFT (22U)
-/*! PRI_USB_HS - USB-HS.(USB1)
- */
-#define SYSCON_AHBMATPRIO_PRI_USB_HS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_USB_HS_SHIFT)) & SYSCON_AHBMATPRIO_PRI_USB_HS_MASK)
-#define SYSCON_AHBMATPRIO_PRI_SDMA1_MASK (0x3000000U)
-#define SYSCON_AHBMATPRIO_PRI_SDMA1_SHIFT (24U)
-/*! PRI_SDMA1 - DMA1 controller priority.
- */
-#define SYSCON_AHBMATPRIO_PRI_SDMA1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_SDMA1_SHIFT)) & SYSCON_AHBMATPRIO_PRI_SDMA1_MASK)
-/*! @} */
-
-/*! @name CPU0STCKCAL - System tick calibration for secure part of CPU0 */
-/*! @{ */
-#define SYSCON_CPU0STCKCAL_TENMS_MASK (0xFFFFFFU)
-#define SYSCON_CPU0STCKCAL_TENMS_SHIFT (0U)
-/*! TENMS - Reload value for 10ms (100Hz) timing, subject to system clock skew errors. If the value
- * reads as zero, the calibration value is not known.
- */
-#define SYSCON_CPU0STCKCAL_TENMS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU0STCKCAL_TENMS_SHIFT)) & SYSCON_CPU0STCKCAL_TENMS_MASK)
-#define SYSCON_CPU0STCKCAL_SKEW_MASK (0x1000000U)
-#define SYSCON_CPU0STCKCAL_SKEW_SHIFT (24U)
-/*! SKEW - Initial value for the Systick timer.
- */
-#define SYSCON_CPU0STCKCAL_SKEW(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU0STCKCAL_SKEW_SHIFT)) & SYSCON_CPU0STCKCAL_SKEW_MASK)
-#define SYSCON_CPU0STCKCAL_NOREF_MASK (0x2000000U)
-#define SYSCON_CPU0STCKCAL_NOREF_SHIFT (25U)
-/*! NOREF - Indicates whether the device provides a reference clock to the processor: 0 = reference
- * clock provided; 1 = no reference clock provided.
- */
-#define SYSCON_CPU0STCKCAL_NOREF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU0STCKCAL_NOREF_SHIFT)) & SYSCON_CPU0STCKCAL_NOREF_MASK)
-/*! @} */
-
-/*! @name CPU0NSTCKCAL - System tick calibration for non-secure part of CPU0 */
-/*! @{ */
-#define SYSCON_CPU0NSTCKCAL_TENMS_MASK (0xFFFFFFU)
-#define SYSCON_CPU0NSTCKCAL_TENMS_SHIFT (0U)
-/*! TENMS - Reload value for 10 ms (100 Hz) timing, subject to system clock skew errors. If the
- * value reads as zero, the calibration value is not known.
- */
-#define SYSCON_CPU0NSTCKCAL_TENMS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU0NSTCKCAL_TENMS_SHIFT)) & SYSCON_CPU0NSTCKCAL_TENMS_MASK)
-#define SYSCON_CPU0NSTCKCAL_SKEW_MASK (0x1000000U)
-#define SYSCON_CPU0NSTCKCAL_SKEW_SHIFT (24U)
-/*! SKEW - Indicates whether the TENMS value is exact: 0 = TENMS value is exact; 1 = TENMS value is inexact, or not given.
- */
-#define SYSCON_CPU0NSTCKCAL_SKEW(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU0NSTCKCAL_SKEW_SHIFT)) & SYSCON_CPU0NSTCKCAL_SKEW_MASK)
-#define SYSCON_CPU0NSTCKCAL_NOREF_MASK (0x2000000U)
-#define SYSCON_CPU0NSTCKCAL_NOREF_SHIFT (25U)
-/*! NOREF - Initial value for the Systick timer.
- */
-#define SYSCON_CPU0NSTCKCAL_NOREF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU0NSTCKCAL_NOREF_SHIFT)) & SYSCON_CPU0NSTCKCAL_NOREF_MASK)
-/*! @} */
-
-/*! @name CPU1STCKCAL - System tick calibration for CPU1 */
-/*! @{ */
-#define SYSCON_CPU1STCKCAL_TENMS_MASK (0xFFFFFFU)
-#define SYSCON_CPU1STCKCAL_TENMS_SHIFT (0U)
-/*! TENMS - Reload value for 10ms (100Hz) timing, subject to system clock skew errors. If the value
- * reads as zero, the calibration value is not known.
- */
-#define SYSCON_CPU1STCKCAL_TENMS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU1STCKCAL_TENMS_SHIFT)) & SYSCON_CPU1STCKCAL_TENMS_MASK)
-#define SYSCON_CPU1STCKCAL_SKEW_MASK (0x1000000U)
-#define SYSCON_CPU1STCKCAL_SKEW_SHIFT (24U)
-/*! SKEW - Indicates whether the TENMS value is exact: 0 = TENMS value is exact; 1 = TENMS value is inexact, or not given.
- */
-#define SYSCON_CPU1STCKCAL_SKEW(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU1STCKCAL_SKEW_SHIFT)) & SYSCON_CPU1STCKCAL_SKEW_MASK)
-#define SYSCON_CPU1STCKCAL_NOREF_MASK (0x2000000U)
-#define SYSCON_CPU1STCKCAL_NOREF_SHIFT (25U)
-/*! NOREF - Indicates whether the device provides a reference clock to the processor: 0 = reference
- * clock provided; 1 = no reference clock provided.
- */
-#define SYSCON_CPU1STCKCAL_NOREF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU1STCKCAL_NOREF_SHIFT)) & SYSCON_CPU1STCKCAL_NOREF_MASK)
-/*! @} */
-
-/*! @name NMISRC - NMI Source Select */
-/*! @{ */
-#define SYSCON_NMISRC_IRQCPU0_MASK (0x3FU)
-#define SYSCON_NMISRC_IRQCPU0_SHIFT (0U)
-/*! IRQCPU0 - The IRQ number of the interrupt that acts as the Non-Maskable Interrupt (NMI) for the CPU0, if enabled by NMIENCPU0.
- */
-#define SYSCON_NMISRC_IRQCPU0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_NMISRC_IRQCPU0_SHIFT)) & SYSCON_NMISRC_IRQCPU0_MASK)
-#define SYSCON_NMISRC_IRQCPU1_MASK (0x3F00U)
-#define SYSCON_NMISRC_IRQCPU1_SHIFT (8U)
-/*! IRQCPU1 - The IRQ number of the interrupt that acts as the Non-Maskable Interrupt (NMI) for the CPU1, if enabled by NMIENCPU1.
- */
-#define SYSCON_NMISRC_IRQCPU1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_NMISRC_IRQCPU1_SHIFT)) & SYSCON_NMISRC_IRQCPU1_MASK)
-#define SYSCON_NMISRC_NMIENCPU1_MASK (0x40000000U)
-#define SYSCON_NMISRC_NMIENCPU1_SHIFT (30U)
-/*! NMIENCPU1 - Write a 1 to this bit to enable the Non-Maskable Interrupt (NMI) source selected by IRQCPU1.
- */
-#define SYSCON_NMISRC_NMIENCPU1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_NMISRC_NMIENCPU1_SHIFT)) & SYSCON_NMISRC_NMIENCPU1_MASK)
-#define SYSCON_NMISRC_NMIENCPU0_MASK (0x80000000U)
-#define SYSCON_NMISRC_NMIENCPU0_SHIFT (31U)
-/*! NMIENCPU0 - Write a 1 to this bit to enable the Non-Maskable Interrupt (NMI) source selected by IRQCPU0.
- */
-#define SYSCON_NMISRC_NMIENCPU0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_NMISRC_NMIENCPU0_SHIFT)) & SYSCON_NMISRC_NMIENCPU0_MASK)
-/*! @} */
-
-/*! @name PRESETCTRL0 - Peripheral reset control 0 */
-/*! @{ */
-#define SYSCON_PRESETCTRL0_ROM_RST_MASK (0x2U)
-#define SYSCON_PRESETCTRL0_ROM_RST_SHIFT (1U)
-/*! ROM_RST - ROM reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_ROM_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_ROM_RST_SHIFT)) & SYSCON_PRESETCTRL0_ROM_RST_MASK)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL1_RST_MASK (0x8U)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL1_RST_SHIFT (3U)
-/*! SRAM_CTRL1_RST - SRAM Controller 1 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_SRAM_CTRL1_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_SRAM_CTRL1_RST_SHIFT)) & SYSCON_PRESETCTRL0_SRAM_CTRL1_RST_MASK)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL2_RST_MASK (0x10U)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL2_RST_SHIFT (4U)
-/*! SRAM_CTRL2_RST - SRAM Controller 2 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_SRAM_CTRL2_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_SRAM_CTRL2_RST_SHIFT)) & SYSCON_PRESETCTRL0_SRAM_CTRL2_RST_MASK)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL3_RST_MASK (0x20U)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL3_RST_SHIFT (5U)
-/*! SRAM_CTRL3_RST - SRAM Controller 3 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_SRAM_CTRL3_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_SRAM_CTRL3_RST_SHIFT)) & SYSCON_PRESETCTRL0_SRAM_CTRL3_RST_MASK)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL4_RST_MASK (0x40U)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL4_RST_SHIFT (6U)
-/*! SRAM_CTRL4_RST - SRAM Controller 4 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_SRAM_CTRL4_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_SRAM_CTRL4_RST_SHIFT)) & SYSCON_PRESETCTRL0_SRAM_CTRL4_RST_MASK)
-#define SYSCON_PRESETCTRL0_FLASH_RST_MASK (0x80U)
-#define SYSCON_PRESETCTRL0_FLASH_RST_SHIFT (7U)
-/*! FLASH_RST - Flash controller reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_FLASH_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_FLASH_RST_SHIFT)) & SYSCON_PRESETCTRL0_FLASH_RST_MASK)
-#define SYSCON_PRESETCTRL0_FMC_RST_MASK (0x100U)
-#define SYSCON_PRESETCTRL0_FMC_RST_SHIFT (8U)
-/*! FMC_RST - FMC controller reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_FMC_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_FMC_RST_SHIFT)) & SYSCON_PRESETCTRL0_FMC_RST_MASK)
-#define SYSCON_PRESETCTRL0_MUX_RST_MASK (0x800U)
-#define SYSCON_PRESETCTRL0_MUX_RST_SHIFT (11U)
-/*! MUX_RST - Input Mux reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_MUX_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_MUX_RST_SHIFT)) & SYSCON_PRESETCTRL0_MUX_RST_MASK)
-#define SYSCON_PRESETCTRL0_IOCON_RST_MASK (0x2000U)
-#define SYSCON_PRESETCTRL0_IOCON_RST_SHIFT (13U)
-/*! IOCON_RST - I/O controller reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_IOCON_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_IOCON_RST_SHIFT)) & SYSCON_PRESETCTRL0_IOCON_RST_MASK)
-#define SYSCON_PRESETCTRL0_GPIO0_RST_MASK (0x4000U)
-#define SYSCON_PRESETCTRL0_GPIO0_RST_SHIFT (14U)
-/*! GPIO0_RST - GPIO0 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_GPIO0_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_GPIO0_RST_SHIFT)) & SYSCON_PRESETCTRL0_GPIO0_RST_MASK)
-#define SYSCON_PRESETCTRL0_GPIO1_RST_MASK (0x8000U)
-#define SYSCON_PRESETCTRL0_GPIO1_RST_SHIFT (15U)
-/*! GPIO1_RST - GPIO1 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_GPIO1_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_GPIO1_RST_SHIFT)) & SYSCON_PRESETCTRL0_GPIO1_RST_MASK)
-#define SYSCON_PRESETCTRL0_GPIO2_RST_MASK (0x10000U)
-#define SYSCON_PRESETCTRL0_GPIO2_RST_SHIFT (16U)
-/*! GPIO2_RST - GPIO2 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_GPIO2_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_GPIO2_RST_SHIFT)) & SYSCON_PRESETCTRL0_GPIO2_RST_MASK)
-#define SYSCON_PRESETCTRL0_GPIO3_RST_MASK (0x20000U)
-#define SYSCON_PRESETCTRL0_GPIO3_RST_SHIFT (17U)
-/*! GPIO3_RST - GPIO3 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_GPIO3_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_GPIO3_RST_SHIFT)) & SYSCON_PRESETCTRL0_GPIO3_RST_MASK)
-#define SYSCON_PRESETCTRL0_PINT_RST_MASK (0x40000U)
-#define SYSCON_PRESETCTRL0_PINT_RST_SHIFT (18U)
-/*! PINT_RST - Pin interrupt (PINT) reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_PINT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_PINT_RST_SHIFT)) & SYSCON_PRESETCTRL0_PINT_RST_MASK)
-#define SYSCON_PRESETCTRL0_GINT_RST_MASK (0x80000U)
-#define SYSCON_PRESETCTRL0_GINT_RST_SHIFT (19U)
-/*! GINT_RST - Group interrupt (GINT) reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_GINT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_GINT_RST_SHIFT)) & SYSCON_PRESETCTRL0_GINT_RST_MASK)
-#define SYSCON_PRESETCTRL0_DMA0_RST_MASK (0x100000U)
-#define SYSCON_PRESETCTRL0_DMA0_RST_SHIFT (20U)
-/*! DMA0_RST - DMA0 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_DMA0_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_DMA0_RST_SHIFT)) & SYSCON_PRESETCTRL0_DMA0_RST_MASK)
-#define SYSCON_PRESETCTRL0_CRCGEN_RST_MASK (0x200000U)
-#define SYSCON_PRESETCTRL0_CRCGEN_RST_SHIFT (21U)
-/*! CRCGEN_RST - CRCGEN reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_CRCGEN_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_CRCGEN_RST_SHIFT)) & SYSCON_PRESETCTRL0_CRCGEN_RST_MASK)
-#define SYSCON_PRESETCTRL0_WWDT_RST_MASK (0x400000U)
-#define SYSCON_PRESETCTRL0_WWDT_RST_SHIFT (22U)
-/*! WWDT_RST - Watchdog Timer reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_WWDT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_WWDT_RST_SHIFT)) & SYSCON_PRESETCTRL0_WWDT_RST_MASK)
-#define SYSCON_PRESETCTRL0_RTC_RST_MASK (0x800000U)
-#define SYSCON_PRESETCTRL0_RTC_RST_SHIFT (23U)
-/*! RTC_RST - Real Time Clock (RTC) reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_RTC_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_RTC_RST_SHIFT)) & SYSCON_PRESETCTRL0_RTC_RST_MASK)
-#define SYSCON_PRESETCTRL0_MAILBOX_RST_MASK (0x4000000U)
-#define SYSCON_PRESETCTRL0_MAILBOX_RST_SHIFT (26U)
-/*! MAILBOX_RST - Inter CPU communication Mailbox reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_MAILBOX_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_MAILBOX_RST_SHIFT)) & SYSCON_PRESETCTRL0_MAILBOX_RST_MASK)
-#define SYSCON_PRESETCTRL0_ADC_RST_MASK (0x8000000U)
-#define SYSCON_PRESETCTRL0_ADC_RST_SHIFT (27U)
-/*! ADC_RST - ADC reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_ADC_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_ADC_RST_SHIFT)) & SYSCON_PRESETCTRL0_ADC_RST_MASK)
-/*! @} */
-
-/*! @name PRESETCTRL1 - Peripheral reset control 1 */
-/*! @{ */
-#define SYSCON_PRESETCTRL1_MRT_RST_MASK (0x1U)
-#define SYSCON_PRESETCTRL1_MRT_RST_SHIFT (0U)
-/*! MRT_RST - MRT reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_MRT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_MRT_RST_SHIFT)) & SYSCON_PRESETCTRL1_MRT_RST_MASK)
-#define SYSCON_PRESETCTRL1_OSTIMER_RST_MASK (0x2U)
-#define SYSCON_PRESETCTRL1_OSTIMER_RST_SHIFT (1U)
-/*! OSTIMER_RST - OS Event Timer reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_OSTIMER_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_OSTIMER_RST_SHIFT)) & SYSCON_PRESETCTRL1_OSTIMER_RST_MASK)
-#define SYSCON_PRESETCTRL1_SCT_RST_MASK (0x4U)
-#define SYSCON_PRESETCTRL1_SCT_RST_SHIFT (2U)
-/*! SCT_RST - SCT reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_SCT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_SCT_RST_SHIFT)) & SYSCON_PRESETCTRL1_SCT_RST_MASK)
-#define SYSCON_PRESETCTRL1_SCTIPU_RST_MASK (0x40U)
-#define SYSCON_PRESETCTRL1_SCTIPU_RST_SHIFT (6U)
-/*! SCTIPU_RST - SCTIPU reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_SCTIPU_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_SCTIPU_RST_SHIFT)) & SYSCON_PRESETCTRL1_SCTIPU_RST_MASK)
-#define SYSCON_PRESETCTRL1_UTICK_RST_MASK (0x400U)
-#define SYSCON_PRESETCTRL1_UTICK_RST_SHIFT (10U)
-/*! UTICK_RST - UTICK reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_UTICK_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_UTICK_RST_SHIFT)) & SYSCON_PRESETCTRL1_UTICK_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC0_RST_MASK (0x800U)
-#define SYSCON_PRESETCTRL1_FC0_RST_SHIFT (11U)
-/*! FC0_RST - FC0 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC0_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC0_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC0_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC1_RST_MASK (0x1000U)
-#define SYSCON_PRESETCTRL1_FC1_RST_SHIFT (12U)
-/*! FC1_RST - FC1 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC1_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC1_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC1_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC2_RST_MASK (0x2000U)
-#define SYSCON_PRESETCTRL1_FC2_RST_SHIFT (13U)
-/*! FC2_RST - FC2 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC2_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC2_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC2_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC3_RST_MASK (0x4000U)
-#define SYSCON_PRESETCTRL1_FC3_RST_SHIFT (14U)
-/*! FC3_RST - FC3 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC3_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC3_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC3_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC4_RST_MASK (0x8000U)
-#define SYSCON_PRESETCTRL1_FC4_RST_SHIFT (15U)
-/*! FC4_RST - FC4 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC4_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC4_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC4_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC5_RST_MASK (0x10000U)
-#define SYSCON_PRESETCTRL1_FC5_RST_SHIFT (16U)
-/*! FC5_RST - FC5 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC5_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC5_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC5_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC6_RST_MASK (0x20000U)
-#define SYSCON_PRESETCTRL1_FC6_RST_SHIFT (17U)
-/*! FC6_RST - FC6 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC6_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC6_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC6_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC7_RST_MASK (0x40000U)
-#define SYSCON_PRESETCTRL1_FC7_RST_SHIFT (18U)
-/*! FC7_RST - FC7 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC7_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC7_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC7_RST_MASK)
-#define SYSCON_PRESETCTRL1_TIMER2_RST_MASK (0x400000U)
-#define SYSCON_PRESETCTRL1_TIMER2_RST_SHIFT (22U)
-/*! TIMER2_RST - Timer 2 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_TIMER2_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_TIMER2_RST_SHIFT)) & SYSCON_PRESETCTRL1_TIMER2_RST_MASK)
-#define SYSCON_PRESETCTRL1_USB0_DEV_RST_MASK (0x2000000U)
-#define SYSCON_PRESETCTRL1_USB0_DEV_RST_SHIFT (25U)
-/*! USB0_DEV_RST - USB0 DEV reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_USB0_DEV_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_USB0_DEV_RST_SHIFT)) & SYSCON_PRESETCTRL1_USB0_DEV_RST_MASK)
-#define SYSCON_PRESETCTRL1_TIMER0_RST_MASK (0x4000000U)
-#define SYSCON_PRESETCTRL1_TIMER0_RST_SHIFT (26U)
-/*! TIMER0_RST - Timer 0 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_TIMER0_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_TIMER0_RST_SHIFT)) & SYSCON_PRESETCTRL1_TIMER0_RST_MASK)
-#define SYSCON_PRESETCTRL1_TIMER1_RST_MASK (0x8000000U)
-#define SYSCON_PRESETCTRL1_TIMER1_RST_SHIFT (27U)
-/*! TIMER1_RST - Timer 1 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_TIMER1_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_TIMER1_RST_SHIFT)) & SYSCON_PRESETCTRL1_TIMER1_RST_MASK)
-/*! @} */
-
-/*! @name PRESETCTRL2 - Peripheral reset control 2 */
-/*! @{ */
-#define SYSCON_PRESETCTRL2_DMA1_RST_MASK (0x2U)
-#define SYSCON_PRESETCTRL2_DMA1_RST_SHIFT (1U)
-/*! DMA1_RST - DMA1 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_DMA1_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_DMA1_RST_SHIFT)) & SYSCON_PRESETCTRL2_DMA1_RST_MASK)
-#define SYSCON_PRESETCTRL2_COMP_RST_MASK (0x4U)
-#define SYSCON_PRESETCTRL2_COMP_RST_SHIFT (2U)
-/*! COMP_RST - Comparator reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_COMP_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_COMP_RST_SHIFT)) & SYSCON_PRESETCTRL2_COMP_RST_MASK)
-#define SYSCON_PRESETCTRL2_SDIO_RST_MASK (0x8U)
-#define SYSCON_PRESETCTRL2_SDIO_RST_SHIFT (3U)
-/*! SDIO_RST - SDIO reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_SDIO_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_SDIO_RST_SHIFT)) & SYSCON_PRESETCTRL2_SDIO_RST_MASK)
-#define SYSCON_PRESETCTRL2_USB1_HOST_RST_MASK (0x10U)
-#define SYSCON_PRESETCTRL2_USB1_HOST_RST_SHIFT (4U)
-/*! USB1_HOST_RST - USB1 Host reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_USB1_HOST_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_USB1_HOST_RST_SHIFT)) & SYSCON_PRESETCTRL2_USB1_HOST_RST_MASK)
-#define SYSCON_PRESETCTRL2_USB1_DEV_RST_MASK (0x20U)
-#define SYSCON_PRESETCTRL2_USB1_DEV_RST_SHIFT (5U)
-/*! USB1_DEV_RST - USB1 dev reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_USB1_DEV_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_USB1_DEV_RST_SHIFT)) & SYSCON_PRESETCTRL2_USB1_DEV_RST_MASK)
-#define SYSCON_PRESETCTRL2_USB1_RAM_RST_MASK (0x40U)
-#define SYSCON_PRESETCTRL2_USB1_RAM_RST_SHIFT (6U)
-/*! USB1_RAM_RST - USB1 RAM reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_USB1_RAM_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_USB1_RAM_RST_SHIFT)) & SYSCON_PRESETCTRL2_USB1_RAM_RST_MASK)
-#define SYSCON_PRESETCTRL2_USB1_PHY_RST_MASK (0x80U)
-#define SYSCON_PRESETCTRL2_USB1_PHY_RST_SHIFT (7U)
-/*! USB1_PHY_RST - USB1 PHY reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_USB1_PHY_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_USB1_PHY_RST_SHIFT)) & SYSCON_PRESETCTRL2_USB1_PHY_RST_MASK)
-#define SYSCON_PRESETCTRL2_FREQME_RST_MASK (0x100U)
-#define SYSCON_PRESETCTRL2_FREQME_RST_SHIFT (8U)
-/*! FREQME_RST - Frequency meter reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_FREQME_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_FREQME_RST_SHIFT)) & SYSCON_PRESETCTRL2_FREQME_RST_MASK)
-#define SYSCON_PRESETCTRL2_RNG_RST_MASK (0x2000U)
-#define SYSCON_PRESETCTRL2_RNG_RST_SHIFT (13U)
-/*! RNG_RST - RNG reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_RNG_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_RNG_RST_SHIFT)) & SYSCON_PRESETCTRL2_RNG_RST_MASK)
-#define SYSCON_PRESETCTRL2_SYSCTL_RST_MASK (0x8000U)
-#define SYSCON_PRESETCTRL2_SYSCTL_RST_SHIFT (15U)
-/*! SYSCTL_RST - SYSCTL Block reset.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_SYSCTL_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_SYSCTL_RST_SHIFT)) & SYSCON_PRESETCTRL2_SYSCTL_RST_MASK)
-#define SYSCON_PRESETCTRL2_USB0_HOSTM_RST_MASK (0x10000U)
-#define SYSCON_PRESETCTRL2_USB0_HOSTM_RST_SHIFT (16U)
-/*! USB0_HOSTM_RST - USB0 Host Master reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_USB0_HOSTM_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_USB0_HOSTM_RST_SHIFT)) & SYSCON_PRESETCTRL2_USB0_HOSTM_RST_MASK)
-#define SYSCON_PRESETCTRL2_USB0_HOSTS_RST_MASK (0x20000U)
-#define SYSCON_PRESETCTRL2_USB0_HOSTS_RST_SHIFT (17U)
-/*! USB0_HOSTS_RST - USB0 Host Slave reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_USB0_HOSTS_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_USB0_HOSTS_RST_SHIFT)) & SYSCON_PRESETCTRL2_USB0_HOSTS_RST_MASK)
-#define SYSCON_PRESETCTRL2_HASH_AES_RST_MASK (0x40000U)
-#define SYSCON_PRESETCTRL2_HASH_AES_RST_SHIFT (18U)
-/*! HASH_AES_RST - HASH_AES reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_HASH_AES_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_HASH_AES_RST_SHIFT)) & SYSCON_PRESETCTRL2_HASH_AES_RST_MASK)
-#define SYSCON_PRESETCTRL2_PQ_RST_MASK (0x80000U)
-#define SYSCON_PRESETCTRL2_PQ_RST_SHIFT (19U)
-/*! PQ_RST - Power Quad reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_PQ_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_PQ_RST_SHIFT)) & SYSCON_PRESETCTRL2_PQ_RST_MASK)
-#define SYSCON_PRESETCTRL2_PLULUT_RST_MASK (0x100000U)
-#define SYSCON_PRESETCTRL2_PLULUT_RST_SHIFT (20U)
-/*! PLULUT_RST - PLU LUT reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_PLULUT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_PLULUT_RST_SHIFT)) & SYSCON_PRESETCTRL2_PLULUT_RST_MASK)
-#define SYSCON_PRESETCTRL2_TIMER3_RST_MASK (0x200000U)
-#define SYSCON_PRESETCTRL2_TIMER3_RST_SHIFT (21U)
-/*! TIMER3_RST - Timer 3 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_TIMER3_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_TIMER3_RST_SHIFT)) & SYSCON_PRESETCTRL2_TIMER3_RST_MASK)
-#define SYSCON_PRESETCTRL2_TIMER4_RST_MASK (0x400000U)
-#define SYSCON_PRESETCTRL2_TIMER4_RST_SHIFT (22U)
-/*! TIMER4_RST - Timer 4 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_TIMER4_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_TIMER4_RST_SHIFT)) & SYSCON_PRESETCTRL2_TIMER4_RST_MASK)
-#define SYSCON_PRESETCTRL2_PUF_RST_MASK (0x800000U)
-#define SYSCON_PRESETCTRL2_PUF_RST_SHIFT (23U)
-/*! PUF_RST - PUF reset control reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_PUF_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_PUF_RST_SHIFT)) & SYSCON_PRESETCTRL2_PUF_RST_MASK)
-#define SYSCON_PRESETCTRL2_CASPER_RST_MASK (0x1000000U)
-#define SYSCON_PRESETCTRL2_CASPER_RST_SHIFT (24U)
-/*! CASPER_RST - Casper reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_CASPER_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_CASPER_RST_SHIFT)) & SYSCON_PRESETCTRL2_CASPER_RST_MASK)
-#define SYSCON_PRESETCTRL2_ANALOG_CTRL_RST_MASK (0x8000000U)
-#define SYSCON_PRESETCTRL2_ANALOG_CTRL_RST_SHIFT (27U)
-/*! ANALOG_CTRL_RST - analog control reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_ANALOG_CTRL_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_ANALOG_CTRL_RST_SHIFT)) & SYSCON_PRESETCTRL2_ANALOG_CTRL_RST_MASK)
-#define SYSCON_PRESETCTRL2_HS_LSPI_RST_MASK (0x10000000U)
-#define SYSCON_PRESETCTRL2_HS_LSPI_RST_SHIFT (28U)
-/*! HS_LSPI_RST - HS LSPI reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_HS_LSPI_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_HS_LSPI_RST_SHIFT)) & SYSCON_PRESETCTRL2_HS_LSPI_RST_MASK)
-#define SYSCON_PRESETCTRL2_GPIO_SEC_RST_MASK (0x20000000U)
-#define SYSCON_PRESETCTRL2_GPIO_SEC_RST_SHIFT (29U)
-/*! GPIO_SEC_RST - GPIO secure reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_GPIO_SEC_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_GPIO_SEC_RST_SHIFT)) & SYSCON_PRESETCTRL2_GPIO_SEC_RST_MASK)
-#define SYSCON_PRESETCTRL2_GPIO_SEC_INT_RST_MASK (0x40000000U)
-#define SYSCON_PRESETCTRL2_GPIO_SEC_INT_RST_SHIFT (30U)
-/*! GPIO_SEC_INT_RST - GPIO secure int reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_GPIO_SEC_INT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_GPIO_SEC_INT_RST_SHIFT)) & SYSCON_PRESETCTRL2_GPIO_SEC_INT_RST_MASK)
-/*! @} */
-
-/*! @name PRESETCTRLX - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_PRESETCTRLX_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_PRESETCTRLX_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_PRESETCTRLX_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRLX_DATA_SHIFT)) & SYSCON_PRESETCTRLX_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_PRESETCTRLX */
-#define SYSCON_PRESETCTRLX_COUNT (3U)
-
-/*! @name PRESETCTRLSET - Peripheral reset control set register */
-/*! @{ */
-#define SYSCON_PRESETCTRLSET_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_PRESETCTRLSET_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_PRESETCTRLSET_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRLSET_DATA_SHIFT)) & SYSCON_PRESETCTRLSET_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_PRESETCTRLSET */
-#define SYSCON_PRESETCTRLSET_COUNT (3U)
-
-/*! @name PRESETCTRLCLR - Peripheral reset control clear register */
-/*! @{ */
-#define SYSCON_PRESETCTRLCLR_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_PRESETCTRLCLR_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_PRESETCTRLCLR_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRLCLR_DATA_SHIFT)) & SYSCON_PRESETCTRLCLR_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_PRESETCTRLCLR */
-#define SYSCON_PRESETCTRLCLR_COUNT (3U)
-
-/*! @name SWR_RESET - generate a software_reset */
-/*! @{ */
-#define SYSCON_SWR_RESET_SWR_RESET_MASK (0xFFFFFFFFU)
-#define SYSCON_SWR_RESET_SWR_RESET_SHIFT (0U)
-/*! SWR_RESET - Write 0x5A00_0001 to generate a software_reset.
- * 0b01011010000000000000000000000001..Generate a software reset.
- * 0b00000000000000000000000000000000..Bloc is not reset.
- */
-#define SYSCON_SWR_RESET_SWR_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SWR_RESET_SWR_RESET_SHIFT)) & SYSCON_SWR_RESET_SWR_RESET_MASK)
-/*! @} */
-
-/*! @name AHBCLKCTRL0 - AHB Clock control 0 */
-/*! @{ */
-#define SYSCON_AHBCLKCTRL0_ROM_MASK (0x2U)
-#define SYSCON_AHBCLKCTRL0_ROM_SHIFT (1U)
-/*! ROM - Enables the clock for the ROM.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_ROM(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_ROM_SHIFT)) & SYSCON_AHBCLKCTRL0_ROM_MASK)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL1_MASK (0x8U)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL1_SHIFT (3U)
-/*! SRAM_CTRL1 - Enables the clock for the SRAM Controller 1.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_SRAM_CTRL1_SHIFT)) & SYSCON_AHBCLKCTRL0_SRAM_CTRL1_MASK)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL2_MASK (0x10U)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL2_SHIFT (4U)
-/*! SRAM_CTRL2 - Enables the clock for the SRAM Controller 2.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL2(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_SRAM_CTRL2_SHIFT)) & SYSCON_AHBCLKCTRL0_SRAM_CTRL2_MASK)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL3_MASK (0x20U)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL3_SHIFT (5U)
-/*! SRAM_CTRL3 - Enables the clock for the SRAM Controller 3.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL3(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_SRAM_CTRL3_SHIFT)) & SYSCON_AHBCLKCTRL0_SRAM_CTRL3_MASK)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL4_MASK (0x40U)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL4_SHIFT (6U)
-/*! SRAM_CTRL4 - Enables the clock for the SRAM Controller 4.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL4(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_SRAM_CTRL4_SHIFT)) & SYSCON_AHBCLKCTRL0_SRAM_CTRL4_MASK)
-#define SYSCON_AHBCLKCTRL0_FLASH_MASK (0x80U)
-#define SYSCON_AHBCLKCTRL0_FLASH_SHIFT (7U)
-/*! FLASH - Enables the clock for the Flash controller.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_FLASH(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_FLASH_SHIFT)) & SYSCON_AHBCLKCTRL0_FLASH_MASK)
-#define SYSCON_AHBCLKCTRL0_FMC_MASK (0x100U)
-#define SYSCON_AHBCLKCTRL0_FMC_SHIFT (8U)
-/*! FMC - Enables the clock for the FMC controller.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_FMC(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_FMC_SHIFT)) & SYSCON_AHBCLKCTRL0_FMC_MASK)
-#define SYSCON_AHBCLKCTRL0_MUX_MASK (0x800U)
-#define SYSCON_AHBCLKCTRL0_MUX_SHIFT (11U)
-/*! MUX - Enables the clock for the Input Mux.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_MUX(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_MUX_SHIFT)) & SYSCON_AHBCLKCTRL0_MUX_MASK)
-#define SYSCON_AHBCLKCTRL0_IOCON_MASK (0x2000U)
-#define SYSCON_AHBCLKCTRL0_IOCON_SHIFT (13U)
-/*! IOCON - Enables the clock for the I/O controller.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_IOCON(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_IOCON_SHIFT)) & SYSCON_AHBCLKCTRL0_IOCON_MASK)
-#define SYSCON_AHBCLKCTRL0_GPIO0_MASK (0x4000U)
-#define SYSCON_AHBCLKCTRL0_GPIO0_SHIFT (14U)
-/*! GPIO0 - Enables the clock for the GPIO0.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_GPIO0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_GPIO0_SHIFT)) & SYSCON_AHBCLKCTRL0_GPIO0_MASK)
-#define SYSCON_AHBCLKCTRL0_GPIO1_MASK (0x8000U)
-#define SYSCON_AHBCLKCTRL0_GPIO1_SHIFT (15U)
-/*! GPIO1 - Enables the clock for the GPIO1.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_GPIO1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_GPIO1_SHIFT)) & SYSCON_AHBCLKCTRL0_GPIO1_MASK)
-#define SYSCON_AHBCLKCTRL0_GPIO2_MASK (0x10000U)
-#define SYSCON_AHBCLKCTRL0_GPIO2_SHIFT (16U)
-/*! GPIO2 - Enables the clock for the GPIO2.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_GPIO2(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_GPIO2_SHIFT)) & SYSCON_AHBCLKCTRL0_GPIO2_MASK)
-#define SYSCON_AHBCLKCTRL0_GPIO3_MASK (0x20000U)
-#define SYSCON_AHBCLKCTRL0_GPIO3_SHIFT (17U)
-/*! GPIO3 - Enables the clock for the GPIO3.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_GPIO3(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_GPIO3_SHIFT)) & SYSCON_AHBCLKCTRL0_GPIO3_MASK)
-#define SYSCON_AHBCLKCTRL0_PINT_MASK (0x40000U)
-#define SYSCON_AHBCLKCTRL0_PINT_SHIFT (18U)
-/*! PINT - Enables the clock for the Pin interrupt (PINT).
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_PINT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_PINT_SHIFT)) & SYSCON_AHBCLKCTRL0_PINT_MASK)
-#define SYSCON_AHBCLKCTRL0_GINT_MASK (0x80000U)
-#define SYSCON_AHBCLKCTRL0_GINT_SHIFT (19U)
-/*! GINT - Enables the clock for the Group interrupt (GINT).
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_GINT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_GINT_SHIFT)) & SYSCON_AHBCLKCTRL0_GINT_MASK)
-#define SYSCON_AHBCLKCTRL0_DMA0_MASK (0x100000U)
-#define SYSCON_AHBCLKCTRL0_DMA0_SHIFT (20U)
-/*! DMA0 - Enables the clock for the DMA0.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_DMA0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_DMA0_SHIFT)) & SYSCON_AHBCLKCTRL0_DMA0_MASK)
-#define SYSCON_AHBCLKCTRL0_CRCGEN_MASK (0x200000U)
-#define SYSCON_AHBCLKCTRL0_CRCGEN_SHIFT (21U)
-/*! CRCGEN - Enables the clock for the CRCGEN.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_CRCGEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_CRCGEN_SHIFT)) & SYSCON_AHBCLKCTRL0_CRCGEN_MASK)
-#define SYSCON_AHBCLKCTRL0_WWDT_MASK (0x400000U)
-#define SYSCON_AHBCLKCTRL0_WWDT_SHIFT (22U)
-/*! WWDT - Enables the clock for the Watchdog Timer.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_WWDT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_WWDT_SHIFT)) & SYSCON_AHBCLKCTRL0_WWDT_MASK)
-#define SYSCON_AHBCLKCTRL0_RTC_MASK (0x800000U)
-#define SYSCON_AHBCLKCTRL0_RTC_SHIFT (23U)
-/*! RTC - Enables the clock for the Real Time Clock (RTC).
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_RTC(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_RTC_SHIFT)) & SYSCON_AHBCLKCTRL0_RTC_MASK)
-#define SYSCON_AHBCLKCTRL0_MAILBOX_MASK (0x4000000U)
-#define SYSCON_AHBCLKCTRL0_MAILBOX_SHIFT (26U)
-/*! MAILBOX - Enables the clock for the Inter CPU communication Mailbox.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_MAILBOX(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_MAILBOX_SHIFT)) & SYSCON_AHBCLKCTRL0_MAILBOX_MASK)
-#define SYSCON_AHBCLKCTRL0_ADC_MASK (0x8000000U)
-#define SYSCON_AHBCLKCTRL0_ADC_SHIFT (27U)
-/*! ADC - Enables the clock for the ADC.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_ADC(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_ADC_SHIFT)) & SYSCON_AHBCLKCTRL0_ADC_MASK)
-/*! @} */
-
-/*! @name AHBCLKCTRL1 - AHB Clock control 1 */
-/*! @{ */
-#define SYSCON_AHBCLKCTRL1_MRT_MASK (0x1U)
-#define SYSCON_AHBCLKCTRL1_MRT_SHIFT (0U)
-/*! MRT - Enables the clock for the MRT.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_MRT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_MRT_SHIFT)) & SYSCON_AHBCLKCTRL1_MRT_MASK)
-#define SYSCON_AHBCLKCTRL1_OSTIMER_MASK (0x2U)
-#define SYSCON_AHBCLKCTRL1_OSTIMER_SHIFT (1U)
-/*! OSTIMER - Enables the clock for the OS Event Timer.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_OSTIMER(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_OSTIMER_SHIFT)) & SYSCON_AHBCLKCTRL1_OSTIMER_MASK)
-#define SYSCON_AHBCLKCTRL1_SCT_MASK (0x4U)
-#define SYSCON_AHBCLKCTRL1_SCT_SHIFT (2U)
-/*! SCT - Enables the clock for the SCT.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_SCT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_SCT_SHIFT)) & SYSCON_AHBCLKCTRL1_SCT_MASK)
-#define SYSCON_AHBCLKCTRL1_UTICK_MASK (0x400U)
-#define SYSCON_AHBCLKCTRL1_UTICK_SHIFT (10U)
-/*! UTICK - Enables the clock for the UTICK.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_UTICK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_UTICK_SHIFT)) & SYSCON_AHBCLKCTRL1_UTICK_MASK)
-#define SYSCON_AHBCLKCTRL1_FC0_MASK (0x800U)
-#define SYSCON_AHBCLKCTRL1_FC0_SHIFT (11U)
-/*! FC0 - Enables the clock for the FC0.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC0_SHIFT)) & SYSCON_AHBCLKCTRL1_FC0_MASK)
-#define SYSCON_AHBCLKCTRL1_FC1_MASK (0x1000U)
-#define SYSCON_AHBCLKCTRL1_FC1_SHIFT (12U)
-/*! FC1 - Enables the clock for the FC1.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC1_SHIFT)) & SYSCON_AHBCLKCTRL1_FC1_MASK)
-#define SYSCON_AHBCLKCTRL1_FC2_MASK (0x2000U)
-#define SYSCON_AHBCLKCTRL1_FC2_SHIFT (13U)
-/*! FC2 - Enables the clock for the FC2.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC2(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC2_SHIFT)) & SYSCON_AHBCLKCTRL1_FC2_MASK)
-#define SYSCON_AHBCLKCTRL1_FC3_MASK (0x4000U)
-#define SYSCON_AHBCLKCTRL1_FC3_SHIFT (14U)
-/*! FC3 - Enables the clock for the FC3.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC3(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC3_SHIFT)) & SYSCON_AHBCLKCTRL1_FC3_MASK)
-#define SYSCON_AHBCLKCTRL1_FC4_MASK (0x8000U)
-#define SYSCON_AHBCLKCTRL1_FC4_SHIFT (15U)
-/*! FC4 - Enables the clock for the FC4.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC4(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC4_SHIFT)) & SYSCON_AHBCLKCTRL1_FC4_MASK)
-#define SYSCON_AHBCLKCTRL1_FC5_MASK (0x10000U)
-#define SYSCON_AHBCLKCTRL1_FC5_SHIFT (16U)
-/*! FC5 - Enables the clock for the FC5.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC5(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC5_SHIFT)) & SYSCON_AHBCLKCTRL1_FC5_MASK)
-#define SYSCON_AHBCLKCTRL1_FC6_MASK (0x20000U)
-#define SYSCON_AHBCLKCTRL1_FC6_SHIFT (17U)
-/*! FC6 - Enables the clock for the FC6.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC6(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC6_SHIFT)) & SYSCON_AHBCLKCTRL1_FC6_MASK)
-#define SYSCON_AHBCLKCTRL1_FC7_MASK (0x40000U)
-#define SYSCON_AHBCLKCTRL1_FC7_SHIFT (18U)
-/*! FC7 - Enables the clock for the FC7.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC7(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC7_SHIFT)) & SYSCON_AHBCLKCTRL1_FC7_MASK)
-#define SYSCON_AHBCLKCTRL1_TIMER2_MASK (0x400000U)
-#define SYSCON_AHBCLKCTRL1_TIMER2_SHIFT (22U)
-/*! TIMER2 - Enables the clock for the Timer 2.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_TIMER2(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_TIMER2_SHIFT)) & SYSCON_AHBCLKCTRL1_TIMER2_MASK)
-#define SYSCON_AHBCLKCTRL1_USB0_DEV_MASK (0x2000000U)
-#define SYSCON_AHBCLKCTRL1_USB0_DEV_SHIFT (25U)
-/*! USB0_DEV - Enables the clock for the USB0 DEV.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_USB0_DEV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_USB0_DEV_SHIFT)) & SYSCON_AHBCLKCTRL1_USB0_DEV_MASK)
-#define SYSCON_AHBCLKCTRL1_TIMER0_MASK (0x4000000U)
-#define SYSCON_AHBCLKCTRL1_TIMER0_SHIFT (26U)
-/*! TIMER0 - Enables the clock for the Timer 0.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_TIMER0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_TIMER0_SHIFT)) & SYSCON_AHBCLKCTRL1_TIMER0_MASK)
-#define SYSCON_AHBCLKCTRL1_TIMER1_MASK (0x8000000U)
-#define SYSCON_AHBCLKCTRL1_TIMER1_SHIFT (27U)
-/*! TIMER1 - Enables the clock for the Timer 1.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_TIMER1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_TIMER1_SHIFT)) & SYSCON_AHBCLKCTRL1_TIMER1_MASK)
-/*! @} */
-
-/*! @name AHBCLKCTRL2 - AHB Clock control 2 */
-/*! @{ */
-#define SYSCON_AHBCLKCTRL2_DMA1_MASK (0x2U)
-#define SYSCON_AHBCLKCTRL2_DMA1_SHIFT (1U)
-/*! DMA1 - Enables the clock for the DMA1.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_DMA1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_DMA1_SHIFT)) & SYSCON_AHBCLKCTRL2_DMA1_MASK)
-#define SYSCON_AHBCLKCTRL2_COMP_MASK (0x4U)
-#define SYSCON_AHBCLKCTRL2_COMP_SHIFT (2U)
-/*! COMP - Enables the clock for the Comparator.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_COMP(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_COMP_SHIFT)) & SYSCON_AHBCLKCTRL2_COMP_MASK)
-#define SYSCON_AHBCLKCTRL2_SDIO_MASK (0x8U)
-#define SYSCON_AHBCLKCTRL2_SDIO_SHIFT (3U)
-/*! SDIO - Enables the clock for the SDIO.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_SDIO(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_SDIO_SHIFT)) & SYSCON_AHBCLKCTRL2_SDIO_MASK)
-#define SYSCON_AHBCLKCTRL2_USB1_HOST_MASK (0x10U)
-#define SYSCON_AHBCLKCTRL2_USB1_HOST_SHIFT (4U)
-/*! USB1_HOST - Enables the clock for the USB1 Host.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_USB1_HOST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_USB1_HOST_SHIFT)) & SYSCON_AHBCLKCTRL2_USB1_HOST_MASK)
-#define SYSCON_AHBCLKCTRL2_USB1_DEV_MASK (0x20U)
-#define SYSCON_AHBCLKCTRL2_USB1_DEV_SHIFT (5U)
-/*! USB1_DEV - Enables the clock for the USB1 dev.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_USB1_DEV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_USB1_DEV_SHIFT)) & SYSCON_AHBCLKCTRL2_USB1_DEV_MASK)
-#define SYSCON_AHBCLKCTRL2_USB1_RAM_MASK (0x40U)
-#define SYSCON_AHBCLKCTRL2_USB1_RAM_SHIFT (6U)
-/*! USB1_RAM - Enables the clock for the USB1 RAM.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_USB1_RAM(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_USB1_RAM_SHIFT)) & SYSCON_AHBCLKCTRL2_USB1_RAM_MASK)
-#define SYSCON_AHBCLKCTRL2_USB1_PHY_MASK (0x80U)
-#define SYSCON_AHBCLKCTRL2_USB1_PHY_SHIFT (7U)
-/*! USB1_PHY - Enables the clock for the USB1 PHY.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_USB1_PHY(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_USB1_PHY_SHIFT)) & SYSCON_AHBCLKCTRL2_USB1_PHY_MASK)
-#define SYSCON_AHBCLKCTRL2_FREQME_MASK (0x100U)
-#define SYSCON_AHBCLKCTRL2_FREQME_SHIFT (8U)
-/*! FREQME - Enables the clock for the Frequency meter.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_FREQME(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_FREQME_SHIFT)) & SYSCON_AHBCLKCTRL2_FREQME_MASK)
-#define SYSCON_AHBCLKCTRL2_RNG_MASK (0x2000U)
-#define SYSCON_AHBCLKCTRL2_RNG_SHIFT (13U)
-/*! RNG - Enables the clock for the RNG.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_RNG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_RNG_SHIFT)) & SYSCON_AHBCLKCTRL2_RNG_MASK)
-#define SYSCON_AHBCLKCTRL2_SYSCTL_MASK (0x8000U)
-#define SYSCON_AHBCLKCTRL2_SYSCTL_SHIFT (15U)
-/*! SYSCTL - SYSCTL block clock.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_SYSCTL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_SYSCTL_SHIFT)) & SYSCON_AHBCLKCTRL2_SYSCTL_MASK)
-#define SYSCON_AHBCLKCTRL2_USB0_HOSTM_MASK (0x10000U)
-#define SYSCON_AHBCLKCTRL2_USB0_HOSTM_SHIFT (16U)
-/*! USB0_HOSTM - Enables the clock for the USB0 Host Master.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_USB0_HOSTM(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_USB0_HOSTM_SHIFT)) & SYSCON_AHBCLKCTRL2_USB0_HOSTM_MASK)
-#define SYSCON_AHBCLKCTRL2_USB0_HOSTS_MASK (0x20000U)
-#define SYSCON_AHBCLKCTRL2_USB0_HOSTS_SHIFT (17U)
-/*! USB0_HOSTS - Enables the clock for the USB0 Host Slave.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_USB0_HOSTS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_USB0_HOSTS_SHIFT)) & SYSCON_AHBCLKCTRL2_USB0_HOSTS_MASK)
-#define SYSCON_AHBCLKCTRL2_HASH_AES_MASK (0x40000U)
-#define SYSCON_AHBCLKCTRL2_HASH_AES_SHIFT (18U)
-/*! HASH_AES - Enables the clock for the HASH_AES.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_HASH_AES(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_HASH_AES_SHIFT)) & SYSCON_AHBCLKCTRL2_HASH_AES_MASK)
-#define SYSCON_AHBCLKCTRL2_PQ_MASK (0x80000U)
-#define SYSCON_AHBCLKCTRL2_PQ_SHIFT (19U)
-/*! PQ - Enables the clock for the Power Quad.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_PQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_PQ_SHIFT)) & SYSCON_AHBCLKCTRL2_PQ_MASK)
-#define SYSCON_AHBCLKCTRL2_PLULUT_MASK (0x100000U)
-#define SYSCON_AHBCLKCTRL2_PLULUT_SHIFT (20U)
-/*! PLULUT - Enables the clock for the PLU LUT.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_PLULUT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_PLULUT_SHIFT)) & SYSCON_AHBCLKCTRL2_PLULUT_MASK)
-#define SYSCON_AHBCLKCTRL2_TIMER3_MASK (0x200000U)
-#define SYSCON_AHBCLKCTRL2_TIMER3_SHIFT (21U)
-/*! TIMER3 - Enables the clock for the Timer 3.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_TIMER3(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_TIMER3_SHIFT)) & SYSCON_AHBCLKCTRL2_TIMER3_MASK)
-#define SYSCON_AHBCLKCTRL2_TIMER4_MASK (0x400000U)
-#define SYSCON_AHBCLKCTRL2_TIMER4_SHIFT (22U)
-/*! TIMER4 - Enables the clock for the Timer 4.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_TIMER4(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_TIMER4_SHIFT)) & SYSCON_AHBCLKCTRL2_TIMER4_MASK)
-#define SYSCON_AHBCLKCTRL2_PUF_MASK (0x800000U)
-#define SYSCON_AHBCLKCTRL2_PUF_SHIFT (23U)
-/*! PUF - Enables the clock for the PUF reset control.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_PUF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_PUF_SHIFT)) & SYSCON_AHBCLKCTRL2_PUF_MASK)
-#define SYSCON_AHBCLKCTRL2_CASPER_MASK (0x1000000U)
-#define SYSCON_AHBCLKCTRL2_CASPER_SHIFT (24U)
-/*! CASPER - Enables the clock for the Casper.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_CASPER(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_CASPER_SHIFT)) & SYSCON_AHBCLKCTRL2_CASPER_MASK)
-#define SYSCON_AHBCLKCTRL2_ANALOG_CTRL_MASK (0x8000000U)
-#define SYSCON_AHBCLKCTRL2_ANALOG_CTRL_SHIFT (27U)
-/*! ANALOG_CTRL - Enables the clock for the analog control.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_ANALOG_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_ANALOG_CTRL_SHIFT)) & SYSCON_AHBCLKCTRL2_ANALOG_CTRL_MASK)
-#define SYSCON_AHBCLKCTRL2_HS_LSPI_MASK (0x10000000U)
-#define SYSCON_AHBCLKCTRL2_HS_LSPI_SHIFT (28U)
-/*! HS_LSPI - Enables the clock for the HS LSPI.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_HS_LSPI(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_HS_LSPI_SHIFT)) & SYSCON_AHBCLKCTRL2_HS_LSPI_MASK)
-#define SYSCON_AHBCLKCTRL2_GPIO_SEC_MASK (0x20000000U)
-#define SYSCON_AHBCLKCTRL2_GPIO_SEC_SHIFT (29U)
-/*! GPIO_SEC - Enables the clock for the GPIO secure.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_GPIO_SEC(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_GPIO_SEC_SHIFT)) & SYSCON_AHBCLKCTRL2_GPIO_SEC_MASK)
-#define SYSCON_AHBCLKCTRL2_GPIO_SEC_INT_MASK (0x40000000U)
-#define SYSCON_AHBCLKCTRL2_GPIO_SEC_INT_SHIFT (30U)
-/*! GPIO_SEC_INT - Enables the clock for the GPIO secure int.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_GPIO_SEC_INT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_GPIO_SEC_INT_SHIFT)) & SYSCON_AHBCLKCTRL2_GPIO_SEC_INT_MASK)
-/*! @} */
-
-/*! @name AHBCLKCTRLX - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_AHBCLKCTRLX_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_AHBCLKCTRLX_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_AHBCLKCTRLX_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRLX_DATA_SHIFT)) & SYSCON_AHBCLKCTRLX_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_AHBCLKCTRLX */
-#define SYSCON_AHBCLKCTRLX_COUNT (3U)
-
-/*! @name AHBCLKCTRLSET - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_AHBCLKCTRLSET_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_AHBCLKCTRLSET_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_AHBCLKCTRLSET_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRLSET_DATA_SHIFT)) & SYSCON_AHBCLKCTRLSET_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_AHBCLKCTRLSET */
-#define SYSCON_AHBCLKCTRLSET_COUNT (3U)
-
-/*! @name AHBCLKCTRLCLR - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_AHBCLKCTRLCLR_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_AHBCLKCTRLCLR_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_AHBCLKCTRLCLR_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRLCLR_DATA_SHIFT)) & SYSCON_AHBCLKCTRLCLR_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_AHBCLKCTRLCLR */
-#define SYSCON_AHBCLKCTRLCLR_COUNT (3U)
-
-/*! @name SYSTICKCLKSEL0 - System Tick Timer for CPU0 source select */
-/*! @{ */
-#define SYSCON_SYSTICKCLKSEL0_SEL_MASK (0x7U)
-#define SYSCON_SYSTICKCLKSEL0_SEL_SHIFT (0U)
-/*! SEL - System Tick Timer for CPU0 source select.
- * 0b000..System Tick 0 divided clock.
- * 0b001..FRO 1MHz clock.
- * 0b010..Oscillator 32 kHz clock.
- * 0b011..No clock.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_SYSTICKCLKSEL0_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKSEL0_SEL_SHIFT)) & SYSCON_SYSTICKCLKSEL0_SEL_MASK)
-/*! @} */
-
-/*! @name SYSTICKCLKSEL1 - System Tick Timer for CPU1 source select */
-/*! @{ */
-#define SYSCON_SYSTICKCLKSEL1_SEL_MASK (0x7U)
-#define SYSCON_SYSTICKCLKSEL1_SEL_SHIFT (0U)
-/*! SEL - System Tick Timer for CPU1 source select.
- * 0b000..System Tick 1 divided clock.
- * 0b001..FRO 1MHz clock.
- * 0b010..Oscillator 32 kHz clock.
- * 0b011..No clock.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_SYSTICKCLKSEL1_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKSEL1_SEL_SHIFT)) & SYSCON_SYSTICKCLKSEL1_SEL_MASK)
-/*! @} */
-
-/*! @name SYSTICKCLKSELX - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_SYSTICKCLKSELX_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_SYSTICKCLKSELX_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_SYSTICKCLKSELX_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKSELX_DATA_SHIFT)) & SYSCON_SYSTICKCLKSELX_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_SYSTICKCLKSELX */
-#define SYSCON_SYSTICKCLKSELX_COUNT (2U)
-
-/*! @name TRACECLKSEL - Trace clock source select */
-/*! @{ */
-#define SYSCON_TRACECLKSEL_SEL_MASK (0x7U)
-#define SYSCON_TRACECLKSEL_SEL_SHIFT (0U)
-/*! SEL - Trace clock source select.
- * 0b000..Trace divided clock.
- * 0b001..FRO 1MHz clock.
- * 0b010..Oscillator 32 kHz clock.
- * 0b011..No clock.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_TRACECLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_TRACECLKSEL_SEL_SHIFT)) & SYSCON_TRACECLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name CTIMERCLKSEL0 - CTimer 0 clock source select */
-/*! @{ */
-#define SYSCON_CTIMERCLKSEL0_SEL_MASK (0x7U)
-#define SYSCON_CTIMERCLKSEL0_SEL_SHIFT (0U)
-/*! SEL - CTimer 0 clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_CTIMERCLKSEL0_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CTIMERCLKSEL0_SEL_SHIFT)) & SYSCON_CTIMERCLKSEL0_SEL_MASK)
-/*! @} */
-
-/*! @name CTIMERCLKSEL1 - CTimer 1 clock source select */
-/*! @{ */
-#define SYSCON_CTIMERCLKSEL1_SEL_MASK (0x7U)
-#define SYSCON_CTIMERCLKSEL1_SEL_SHIFT (0U)
-/*! SEL - CTimer 1 clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_CTIMERCLKSEL1_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CTIMERCLKSEL1_SEL_SHIFT)) & SYSCON_CTIMERCLKSEL1_SEL_MASK)
-/*! @} */
-
-/*! @name CTIMERCLKSEL2 - CTimer 2 clock source select */
-/*! @{ */
-#define SYSCON_CTIMERCLKSEL2_SEL_MASK (0x7U)
-#define SYSCON_CTIMERCLKSEL2_SEL_SHIFT (0U)
-/*! SEL - CTimer 2 clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_CTIMERCLKSEL2_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CTIMERCLKSEL2_SEL_SHIFT)) & SYSCON_CTIMERCLKSEL2_SEL_MASK)
-/*! @} */
-
-/*! @name CTIMERCLKSEL3 - CTimer 3 clock source select */
-/*! @{ */
-#define SYSCON_CTIMERCLKSEL3_SEL_MASK (0x7U)
-#define SYSCON_CTIMERCLKSEL3_SEL_SHIFT (0U)
-/*! SEL - CTimer 3 clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_CTIMERCLKSEL3_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CTIMERCLKSEL3_SEL_SHIFT)) & SYSCON_CTIMERCLKSEL3_SEL_MASK)
-/*! @} */
-
-/*! @name CTIMERCLKSEL4 - CTimer 4 clock source select */
-/*! @{ */
-#define SYSCON_CTIMERCLKSEL4_SEL_MASK (0x7U)
-#define SYSCON_CTIMERCLKSEL4_SEL_SHIFT (0U)
-/*! SEL - CTimer 4 clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_CTIMERCLKSEL4_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CTIMERCLKSEL4_SEL_SHIFT)) & SYSCON_CTIMERCLKSEL4_SEL_MASK)
-/*! @} */
-
-/*! @name CTIMERCLKSELX - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_CTIMERCLKSELX_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_CTIMERCLKSELX_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_CTIMERCLKSELX_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CTIMERCLKSELX_DATA_SHIFT)) & SYSCON_CTIMERCLKSELX_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_CTIMERCLKSELX */
-#define SYSCON_CTIMERCLKSELX_COUNT (5U)
-
-/*! @name MAINCLKSELA - Main clock A source select */
-/*! @{ */
-#define SYSCON_MAINCLKSELA_SEL_MASK (0x7U)
-#define SYSCON_MAINCLKSELA_SEL_SHIFT (0U)
-/*! SEL - Main clock A source select.
- * 0b000..FRO 12 MHz clock.
- * 0b001..CLKIN clock.
- * 0b010..FRO 1MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..Reserved.
- * 0b101..Reserved.
- * 0b110..Reserved.
- * 0b111..Reserved.
- */
-#define SYSCON_MAINCLKSELA_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MAINCLKSELA_SEL_SHIFT)) & SYSCON_MAINCLKSELA_SEL_MASK)
-/*! @} */
-
-/*! @name MAINCLKSELB - Main clock source select */
-/*! @{ */
-#define SYSCON_MAINCLKSELB_SEL_MASK (0x7U)
-#define SYSCON_MAINCLKSELB_SEL_SHIFT (0U)
-/*! SEL - Main clock source select.
- * 0b000..Main Clock A.
- * 0b001..PLL0 clock.
- * 0b010..PLL1 clock.
- * 0b011..Oscillator 32 kHz clock.
- * 0b100..Reserved.
- * 0b101..Reserved.
- * 0b110..Reserved.
- * 0b111..Reserved.
- */
-#define SYSCON_MAINCLKSELB_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MAINCLKSELB_SEL_SHIFT)) & SYSCON_MAINCLKSELB_SEL_MASK)
-/*! @} */
-
-/*! @name CLKOUTSEL - CLKOUT clock source select */
-/*! @{ */
-#define SYSCON_CLKOUTSEL_SEL_MASK (0x7U)
-#define SYSCON_CLKOUTSEL_SEL_SHIFT (0U)
-/*! SEL - CLKOUT clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..CLKIN clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..PLL1 clock.
- * 0b110..Oscillator 32kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_CLKOUTSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLKOUTSEL_SEL_SHIFT)) & SYSCON_CLKOUTSEL_SEL_MASK)
-/*! @} */
-
-/*! @name PLL0CLKSEL - PLL0 clock source select */
-/*! @{ */
-#define SYSCON_PLL0CLKSEL_SEL_MASK (0x7U)
-#define SYSCON_PLL0CLKSEL_SEL_SHIFT (0U)
-/*! SEL - PLL0 clock source select.
- * 0b000..FRO 12 MHz clock.
- * 0b001..CLKIN clock.
- * 0b010..FRO 1MHz clock.
- * 0b011..Oscillator 32kHz clock.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_PLL0CLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CLKSEL_SEL_SHIFT)) & SYSCON_PLL0CLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name PLL1CLKSEL - PLL1 clock source select */
-/*! @{ */
-#define SYSCON_PLL1CLKSEL_SEL_MASK (0x7U)
-#define SYSCON_PLL1CLKSEL_SEL_SHIFT (0U)
-/*! SEL - PLL1 clock source select.
- * 0b000..FRO 12 MHz clock.
- * 0b001..CLKIN clock.
- * 0b010..FRO 1MHz clock.
- * 0b011..Oscillator 32kHz clock.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_PLL1CLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CLKSEL_SEL_SHIFT)) & SYSCON_PLL1CLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name ADCCLKSEL - ADC clock source select */
-/*! @{ */
-#define SYSCON_ADCCLKSEL_SEL_MASK (0x7U)
-#define SYSCON_ADCCLKSEL_SEL_SHIFT (0U)
-/*! SEL - ADC clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..FRO 96 MHz clock.
- * 0b011..Reserved.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_ADCCLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_ADCCLKSEL_SEL_SHIFT)) & SYSCON_ADCCLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name USB0CLKSEL - FS USB clock source select */
-/*! @{ */
-#define SYSCON_USB0CLKSEL_SEL_MASK (0x7U)
-#define SYSCON_USB0CLKSEL_SEL_SHIFT (0U)
-/*! SEL - FS USB clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..No clock.
- * 0b101..PLL1 clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_USB0CLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0CLKSEL_SEL_SHIFT)) & SYSCON_USB0CLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL0 - Flexcomm Interface 0 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL0_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL0_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 0 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL0_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL0_SEL_SHIFT)) & SYSCON_FCCLKSEL0_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL1 - Flexcomm Interface 1 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL1_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL1_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 1 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL1_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL1_SEL_SHIFT)) & SYSCON_FCCLKSEL1_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL2 - Flexcomm Interface 2 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL2_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL2_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 2 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL2_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL2_SEL_SHIFT)) & SYSCON_FCCLKSEL2_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL3 - Flexcomm Interface 3 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL3_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL3_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 3 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL3_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL3_SEL_SHIFT)) & SYSCON_FCCLKSEL3_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL4 - Flexcomm Interface 4 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL4_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL4_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 4 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL4_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL4_SEL_SHIFT)) & SYSCON_FCCLKSEL4_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL5 - Flexcomm Interface 5 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL5_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL5_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 5 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL5_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL5_SEL_SHIFT)) & SYSCON_FCCLKSEL5_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL6 - Flexcomm Interface 6 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL6_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL6_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 6 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL6_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL6_SEL_SHIFT)) & SYSCON_FCCLKSEL6_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL7 - Flexcomm Interface 7 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL7_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL7_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 7 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL7_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL7_SEL_SHIFT)) & SYSCON_FCCLKSEL7_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSELX - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_FCCLKSELX_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_FCCLKSELX_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_FCCLKSELX_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSELX_DATA_SHIFT)) & SYSCON_FCCLKSELX_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_FCCLKSELX */
-#define SYSCON_FCCLKSELX_COUNT (8U)
-
-/*! @name HSLSPICLKSEL - HS LSPI clock source select */
-/*! @{ */
-#define SYSCON_HSLSPICLKSEL_SEL_MASK (0x7U)
-#define SYSCON_HSLSPICLKSEL_SEL_SHIFT (0U)
-/*! SEL - HS LSPI clock source select.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..No clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_HSLSPICLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_HSLSPICLKSEL_SEL_SHIFT)) & SYSCON_HSLSPICLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name MCLKCLKSEL - MCLK clock source select */
-/*! @{ */
-#define SYSCON_MCLKCLKSEL_SEL_MASK (0x7U)
-#define SYSCON_MCLKCLKSEL_SEL_SHIFT (0U)
-/*! SEL - MCLK clock source select.
- * 0b000..FRO 96 MHz clock.
- * 0b001..PLL0 clock.
- * 0b010..Reserved.
- * 0b011..Reserved.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_MCLKCLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MCLKCLKSEL_SEL_SHIFT)) & SYSCON_MCLKCLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name SCTCLKSEL - SCTimer/PWM clock source select */
-/*! @{ */
-#define SYSCON_SCTCLKSEL_SEL_MASK (0x7U)
-#define SYSCON_SCTCLKSEL_SEL_SHIFT (0U)
-/*! SEL - SCTimer/PWM clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..CLKIN clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..No clock.
- * 0b101..MCLK clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_SCTCLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SCTCLKSEL_SEL_SHIFT)) & SYSCON_SCTCLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name SDIOCLKSEL - SDIO clock source select */
-/*! @{ */
-#define SYSCON_SDIOCLKSEL_SEL_MASK (0x7U)
-#define SYSCON_SDIOCLKSEL_SEL_SHIFT (0U)
-/*! SEL - SDIO clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..No clock.
- * 0b101..PLL1 clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_SDIOCLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKSEL_SEL_SHIFT)) & SYSCON_SDIOCLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name SYSTICKCLKDIV0 - System Tick Timer divider for CPU0 */
-/*! @{ */
-#define SYSCON_SYSTICKCLKDIV0_DIV_MASK (0xFFU)
-#define SYSCON_SYSTICKCLKDIV0_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_SYSTICKCLKDIV0_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV0_DIV_SHIFT)) & SYSCON_SYSTICKCLKDIV0_DIV_MASK)
-#define SYSCON_SYSTICKCLKDIV0_RESET_MASK (0x20000000U)
-#define SYSCON_SYSTICKCLKDIV0_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_SYSTICKCLKDIV0_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV0_RESET_SHIFT)) & SYSCON_SYSTICKCLKDIV0_RESET_MASK)
-#define SYSCON_SYSTICKCLKDIV0_HALT_MASK (0x40000000U)
-#define SYSCON_SYSTICKCLKDIV0_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_SYSTICKCLKDIV0_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV0_HALT_SHIFT)) & SYSCON_SYSTICKCLKDIV0_HALT_MASK)
-#define SYSCON_SYSTICKCLKDIV0_REQFLAG_MASK (0x80000000U)
-#define SYSCON_SYSTICKCLKDIV0_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_SYSTICKCLKDIV0_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV0_REQFLAG_SHIFT)) & SYSCON_SYSTICKCLKDIV0_REQFLAG_MASK)
-/*! @} */
-
-/*! @name SYSTICKCLKDIV1 - System Tick Timer divider for CPU1 */
-/*! @{ */
-#define SYSCON_SYSTICKCLKDIV1_DIV_MASK (0xFFU)
-#define SYSCON_SYSTICKCLKDIV1_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_SYSTICKCLKDIV1_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV1_DIV_SHIFT)) & SYSCON_SYSTICKCLKDIV1_DIV_MASK)
-#define SYSCON_SYSTICKCLKDIV1_RESET_MASK (0x20000000U)
-#define SYSCON_SYSTICKCLKDIV1_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_SYSTICKCLKDIV1_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV1_RESET_SHIFT)) & SYSCON_SYSTICKCLKDIV1_RESET_MASK)
-#define SYSCON_SYSTICKCLKDIV1_HALT_MASK (0x40000000U)
-#define SYSCON_SYSTICKCLKDIV1_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_SYSTICKCLKDIV1_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV1_HALT_SHIFT)) & SYSCON_SYSTICKCLKDIV1_HALT_MASK)
-#define SYSCON_SYSTICKCLKDIV1_REQFLAG_MASK (0x80000000U)
-#define SYSCON_SYSTICKCLKDIV1_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_SYSTICKCLKDIV1_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV1_REQFLAG_SHIFT)) & SYSCON_SYSTICKCLKDIV1_REQFLAG_MASK)
-/*! @} */
-
-/*! @name TRACECLKDIV - TRACE clock divider */
-/*! @{ */
-#define SYSCON_TRACECLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_TRACECLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_TRACECLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_TRACECLKDIV_DIV_SHIFT)) & SYSCON_TRACECLKDIV_DIV_MASK)
-#define SYSCON_TRACECLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_TRACECLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_TRACECLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_TRACECLKDIV_RESET_SHIFT)) & SYSCON_TRACECLKDIV_RESET_MASK)
-#define SYSCON_TRACECLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_TRACECLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_TRACECLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_TRACECLKDIV_HALT_SHIFT)) & SYSCON_TRACECLKDIV_HALT_MASK)
-#define SYSCON_TRACECLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_TRACECLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_TRACECLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_TRACECLKDIV_REQFLAG_SHIFT)) & SYSCON_TRACECLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name FLEXFRG0CTRL - Fractional rate divider for flexcomm 0 */
-/*! @{ */
-#define SYSCON_FLEXFRG0CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG0CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG0CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG0CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG0CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG0CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG0CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG0CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG0CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG0CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG1CTRL - Fractional rate divider for flexcomm 1 */
-/*! @{ */
-#define SYSCON_FLEXFRG1CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG1CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG1CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG1CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG1CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG1CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG1CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG1CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG1CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG1CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG2CTRL - Fractional rate divider for flexcomm 2 */
-/*! @{ */
-#define SYSCON_FLEXFRG2CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG2CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG2CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG2CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG2CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG2CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG2CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG2CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG2CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG2CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG3CTRL - Fractional rate divider for flexcomm 3 */
-/*! @{ */
-#define SYSCON_FLEXFRG3CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG3CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG3CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG3CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG3CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG3CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG3CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG3CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG3CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG3CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG4CTRL - Fractional rate divider for flexcomm 4 */
-/*! @{ */
-#define SYSCON_FLEXFRG4CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG4CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG4CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG4CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG4CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG4CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG4CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG4CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG4CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG4CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG5CTRL - Fractional rate divider for flexcomm 5 */
-/*! @{ */
-#define SYSCON_FLEXFRG5CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG5CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG5CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG5CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG5CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG5CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG5CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG5CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG5CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG5CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG6CTRL - Fractional rate divider for flexcomm 6 */
-/*! @{ */
-#define SYSCON_FLEXFRG6CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG6CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG6CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG6CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG6CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG6CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG6CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG6CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG6CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG6CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG7CTRL - Fractional rate divider for flexcomm 7 */
-/*! @{ */
-#define SYSCON_FLEXFRG7CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG7CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG7CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG7CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG7CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG7CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG7CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG7CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG7CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG7CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRGXCTRL - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_FLEXFRGXCTRL_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_FLEXFRGXCTRL_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_FLEXFRGXCTRL_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRGXCTRL_DATA_SHIFT)) & SYSCON_FLEXFRGXCTRL_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_FLEXFRGXCTRL */
-#define SYSCON_FLEXFRGXCTRL_COUNT (8U)
-
-/*! @name AHBCLKDIV - System clock divider */
-/*! @{ */
-#define SYSCON_AHBCLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_AHBCLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_AHBCLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKDIV_DIV_SHIFT)) & SYSCON_AHBCLKDIV_DIV_MASK)
-#define SYSCON_AHBCLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_AHBCLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_AHBCLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKDIV_RESET_SHIFT)) & SYSCON_AHBCLKDIV_RESET_MASK)
-#define SYSCON_AHBCLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_AHBCLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_AHBCLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKDIV_HALT_SHIFT)) & SYSCON_AHBCLKDIV_HALT_MASK)
-#define SYSCON_AHBCLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_AHBCLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_AHBCLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKDIV_REQFLAG_SHIFT)) & SYSCON_AHBCLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name CLKOUTDIV - CLKOUT clock divider */
-/*! @{ */
-#define SYSCON_CLKOUTDIV_DIV_MASK (0xFFU)
-#define SYSCON_CLKOUTDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_CLKOUTDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLKOUTDIV_DIV_SHIFT)) & SYSCON_CLKOUTDIV_DIV_MASK)
-#define SYSCON_CLKOUTDIV_RESET_MASK (0x20000000U)
-#define SYSCON_CLKOUTDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_CLKOUTDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLKOUTDIV_RESET_SHIFT)) & SYSCON_CLKOUTDIV_RESET_MASK)
-#define SYSCON_CLKOUTDIV_HALT_MASK (0x40000000U)
-#define SYSCON_CLKOUTDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_CLKOUTDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLKOUTDIV_HALT_SHIFT)) & SYSCON_CLKOUTDIV_HALT_MASK)
-#define SYSCON_CLKOUTDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_CLKOUTDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_CLKOUTDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLKOUTDIV_REQFLAG_SHIFT)) & SYSCON_CLKOUTDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name FROHFDIV - FRO_HF (96MHz) clock divider */
-/*! @{ */
-#define SYSCON_FROHFDIV_DIV_MASK (0xFFU)
-#define SYSCON_FROHFDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_FROHFDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FROHFDIV_DIV_SHIFT)) & SYSCON_FROHFDIV_DIV_MASK)
-#define SYSCON_FROHFDIV_RESET_MASK (0x20000000U)
-#define SYSCON_FROHFDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_FROHFDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FROHFDIV_RESET_SHIFT)) & SYSCON_FROHFDIV_RESET_MASK)
-#define SYSCON_FROHFDIV_HALT_MASK (0x40000000U)
-#define SYSCON_FROHFDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_FROHFDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FROHFDIV_HALT_SHIFT)) & SYSCON_FROHFDIV_HALT_MASK)
-#define SYSCON_FROHFDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_FROHFDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_FROHFDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FROHFDIV_REQFLAG_SHIFT)) & SYSCON_FROHFDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name WDTCLKDIV - WDT clock divider */
-/*! @{ */
-#define SYSCON_WDTCLKDIV_DIV_MASK (0x3FU)
-#define SYSCON_WDTCLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_WDTCLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_WDTCLKDIV_DIV_SHIFT)) & SYSCON_WDTCLKDIV_DIV_MASK)
-#define SYSCON_WDTCLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_WDTCLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_WDTCLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_WDTCLKDIV_RESET_SHIFT)) & SYSCON_WDTCLKDIV_RESET_MASK)
-#define SYSCON_WDTCLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_WDTCLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_WDTCLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_WDTCLKDIV_HALT_SHIFT)) & SYSCON_WDTCLKDIV_HALT_MASK)
-#define SYSCON_WDTCLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_WDTCLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_WDTCLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_WDTCLKDIV_REQFLAG_SHIFT)) & SYSCON_WDTCLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name ADCCLKDIV - ADC clock divider */
-/*! @{ */
-#define SYSCON_ADCCLKDIV_DIV_MASK (0x7U)
-#define SYSCON_ADCCLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_ADCCLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_ADCCLKDIV_DIV_SHIFT)) & SYSCON_ADCCLKDIV_DIV_MASK)
-#define SYSCON_ADCCLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_ADCCLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_ADCCLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_ADCCLKDIV_RESET_SHIFT)) & SYSCON_ADCCLKDIV_RESET_MASK)
-#define SYSCON_ADCCLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_ADCCLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_ADCCLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_ADCCLKDIV_HALT_SHIFT)) & SYSCON_ADCCLKDIV_HALT_MASK)
-#define SYSCON_ADCCLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_ADCCLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_ADCCLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_ADCCLKDIV_REQFLAG_SHIFT)) & SYSCON_ADCCLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name USB0CLKDIV - USB0 Clock divider */
-/*! @{ */
-#define SYSCON_USB0CLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_USB0CLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_USB0CLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0CLKDIV_DIV_SHIFT)) & SYSCON_USB0CLKDIV_DIV_MASK)
-#define SYSCON_USB0CLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_USB0CLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_USB0CLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0CLKDIV_RESET_SHIFT)) & SYSCON_USB0CLKDIV_RESET_MASK)
-#define SYSCON_USB0CLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_USB0CLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_USB0CLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0CLKDIV_HALT_SHIFT)) & SYSCON_USB0CLKDIV_HALT_MASK)
-#define SYSCON_USB0CLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_USB0CLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_USB0CLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0CLKDIV_REQFLAG_SHIFT)) & SYSCON_USB0CLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name MCLKDIV - I2S MCLK clock divider */
-/*! @{ */
-#define SYSCON_MCLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_MCLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_MCLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MCLKDIV_DIV_SHIFT)) & SYSCON_MCLKDIV_DIV_MASK)
-#define SYSCON_MCLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_MCLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_MCLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MCLKDIV_RESET_SHIFT)) & SYSCON_MCLKDIV_RESET_MASK)
-#define SYSCON_MCLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_MCLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_MCLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MCLKDIV_HALT_SHIFT)) & SYSCON_MCLKDIV_HALT_MASK)
-#define SYSCON_MCLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_MCLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_MCLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MCLKDIV_REQFLAG_SHIFT)) & SYSCON_MCLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name SCTCLKDIV - SCT/PWM clock divider */
-/*! @{ */
-#define SYSCON_SCTCLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_SCTCLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_SCTCLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SCTCLKDIV_DIV_SHIFT)) & SYSCON_SCTCLKDIV_DIV_MASK)
-#define SYSCON_SCTCLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_SCTCLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_SCTCLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SCTCLKDIV_RESET_SHIFT)) & SYSCON_SCTCLKDIV_RESET_MASK)
-#define SYSCON_SCTCLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_SCTCLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_SCTCLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SCTCLKDIV_HALT_SHIFT)) & SYSCON_SCTCLKDIV_HALT_MASK)
-#define SYSCON_SCTCLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_SCTCLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_SCTCLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SCTCLKDIV_REQFLAG_SHIFT)) & SYSCON_SCTCLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name SDIOCLKDIV - SDIO clock divider */
-/*! @{ */
-#define SYSCON_SDIOCLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_SDIOCLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_SDIOCLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKDIV_DIV_SHIFT)) & SYSCON_SDIOCLKDIV_DIV_MASK)
-#define SYSCON_SDIOCLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_SDIOCLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_SDIOCLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKDIV_RESET_SHIFT)) & SYSCON_SDIOCLKDIV_RESET_MASK)
-#define SYSCON_SDIOCLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_SDIOCLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_SDIOCLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKDIV_HALT_SHIFT)) & SYSCON_SDIOCLKDIV_HALT_MASK)
-#define SYSCON_SDIOCLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_SDIOCLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_SDIOCLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKDIV_REQFLAG_SHIFT)) & SYSCON_SDIOCLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name PLL0CLKDIV - PLL0 clock divider */
-/*! @{ */
-#define SYSCON_PLL0CLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_PLL0CLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_PLL0CLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CLKDIV_DIV_SHIFT)) & SYSCON_PLL0CLKDIV_DIV_MASK)
-#define SYSCON_PLL0CLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_PLL0CLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_PLL0CLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CLKDIV_RESET_SHIFT)) & SYSCON_PLL0CLKDIV_RESET_MASK)
-#define SYSCON_PLL0CLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_PLL0CLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_PLL0CLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CLKDIV_HALT_SHIFT)) & SYSCON_PLL0CLKDIV_HALT_MASK)
-#define SYSCON_PLL0CLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_PLL0CLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_PLL0CLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CLKDIV_REQFLAG_SHIFT)) & SYSCON_PLL0CLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name CLOCKGENUPDATELOCKOUT - Control clock configuration registers access (like xxxDIV, xxxSEL) */
-/*! @{ */
-#define SYSCON_CLOCKGENUPDATELOCKOUT_CLOCKGENUPDATELOCKOUT_MASK (0xFFFFFFFFU)
-#define SYSCON_CLOCKGENUPDATELOCKOUT_CLOCKGENUPDATELOCKOUT_SHIFT (0U)
-/*! CLOCKGENUPDATELOCKOUT - Control clock configuration registers access (like xxxDIV, xxxSEL).
- * 0b00000000000000000000000000000001..update all clock configuration.
- * 0b00000000000000000000000000000000..all hardware clock configruration are freeze.
- */
-#define SYSCON_CLOCKGENUPDATELOCKOUT_CLOCKGENUPDATELOCKOUT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCKGENUPDATELOCKOUT_CLOCKGENUPDATELOCKOUT_SHIFT)) & SYSCON_CLOCKGENUPDATELOCKOUT_CLOCKGENUPDATELOCKOUT_MASK)
-/*! @} */
-
-/*! @name FMCCR - FMC configuration register */
-/*! @{ */
-#define SYSCON_FMCCR_FLASHTIM_MASK (0xF000U)
-#define SYSCON_FMCCR_FLASHTIM_SHIFT (12U)
-/*! FLASHTIM - Flash memory access time.
- * 0b0000..1 system clock flash access time (for system clock rates up to 11 MHz).
- * 0b0001..2 system clocks flash access time (for system clock rates up to 22 MHz).
- * 0b0010..3 system clocks flash access time (for system clock rates up to 33 MHz).
- * 0b0011..4 system clocks flash access time (for system clock rates up to 44 MHz).
- * 0b0100..5 system clocks flash access time (for system clock rates up to 55 MHz).
- * 0b0101..6 system clocks flash access time (for system clock rates up to 66 MHz).
- * 0b0110..7 system clocks flash access time (for system clock rates up to 77 MHz).
- * 0b0111..8 system clocks flash access time (for system clock rates up to 88 MHz).
- * 0b1000..9 system clocks flash access time (for system clock rates up to 100 MHz).
- */
-#define SYSCON_FMCCR_FLASHTIM(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FMCCR_FLASHTIM_SHIFT)) & SYSCON_FMCCR_FLASHTIM_MASK)
-/*! @} */
-
-/*! @name USB0NEEDCLKCTRL - USB0 need clock control */
-/*! @{ */
-#define SYSCON_USB0NEEDCLKCTRL_AP_FS_DEV_NEEDCLK_MASK (0x1U)
-#define SYSCON_USB0NEEDCLKCTRL_AP_FS_DEV_NEEDCLK_SHIFT (0U)
-/*! AP_FS_DEV_NEEDCLK - USB0 Device USB0_NEEDCLK signal control:.
- * 0b0..Under hardware control.
- * 0b1..Forced high.
- */
-#define SYSCON_USB0NEEDCLKCTRL_AP_FS_DEV_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0NEEDCLKCTRL_AP_FS_DEV_NEEDCLK_SHIFT)) & SYSCON_USB0NEEDCLKCTRL_AP_FS_DEV_NEEDCLK_MASK)
-#define SYSCON_USB0NEEDCLKCTRL_POL_FS_DEV_NEEDCLK_MASK (0x2U)
-#define SYSCON_USB0NEEDCLKCTRL_POL_FS_DEV_NEEDCLK_SHIFT (1U)
-/*! POL_FS_DEV_NEEDCLK - USB0 Device USB0_NEEDCLK polarity for triggering the USB0 wake-up interrupt:.
- * 0b0..Falling edge of device USB0_NEEDCLK triggers wake-up.
- * 0b1..Rising edge of device USB0_NEEDCLK triggers wake-up.
- */
-#define SYSCON_USB0NEEDCLKCTRL_POL_FS_DEV_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0NEEDCLKCTRL_POL_FS_DEV_NEEDCLK_SHIFT)) & SYSCON_USB0NEEDCLKCTRL_POL_FS_DEV_NEEDCLK_MASK)
-#define SYSCON_USB0NEEDCLKCTRL_AP_FS_HOST_NEEDCLK_MASK (0x4U)
-#define SYSCON_USB0NEEDCLKCTRL_AP_FS_HOST_NEEDCLK_SHIFT (2U)
-/*! AP_FS_HOST_NEEDCLK - USB0 Host USB0_NEEDCLK signal control:.
- * 0b0..Under hardware control.
- * 0b1..Forced high.
- */
-#define SYSCON_USB0NEEDCLKCTRL_AP_FS_HOST_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0NEEDCLKCTRL_AP_FS_HOST_NEEDCLK_SHIFT)) & SYSCON_USB0NEEDCLKCTRL_AP_FS_HOST_NEEDCLK_MASK)
-#define SYSCON_USB0NEEDCLKCTRL_POL_FS_HOST_NEEDCLK_MASK (0x8U)
-#define SYSCON_USB0NEEDCLKCTRL_POL_FS_HOST_NEEDCLK_SHIFT (3U)
-/*! POL_FS_HOST_NEEDCLK - USB0 Host USB0_NEEDCLK polarity for triggering the USB0 wake-up interrupt:.
- * 0b0..Falling edge of device USB0_NEEDCLK triggers wake-up.
- * 0b1..Rising edge of device USB0_NEEDCLK triggers wake-up.
- */
-#define SYSCON_USB0NEEDCLKCTRL_POL_FS_HOST_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0NEEDCLKCTRL_POL_FS_HOST_NEEDCLK_SHIFT)) & SYSCON_USB0NEEDCLKCTRL_POL_FS_HOST_NEEDCLK_MASK)
-/*! @} */
-
-/*! @name USB0NEEDCLKSTAT - USB0 need clock status */
-/*! @{ */
-#define SYSCON_USB0NEEDCLKSTAT_DEV_NEEDCLK_MASK (0x1U)
-#define SYSCON_USB0NEEDCLKSTAT_DEV_NEEDCLK_SHIFT (0U)
-/*! DEV_NEEDCLK - USB0 Device USB0_NEEDCLK signal status:.
- * 0b1..USB0 Device clock is high.
- * 0b0..USB0 Device clock is low.
- */
-#define SYSCON_USB0NEEDCLKSTAT_DEV_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0NEEDCLKSTAT_DEV_NEEDCLK_SHIFT)) & SYSCON_USB0NEEDCLKSTAT_DEV_NEEDCLK_MASK)
-#define SYSCON_USB0NEEDCLKSTAT_HOST_NEEDCLK_MASK (0x2U)
-#define SYSCON_USB0NEEDCLKSTAT_HOST_NEEDCLK_SHIFT (1U)
-/*! HOST_NEEDCLK - USB0 Host USB0_NEEDCLK signal status:.
- * 0b1..USB0 Host clock is high.
- * 0b0..USB0 Host clock is low.
- */
-#define SYSCON_USB0NEEDCLKSTAT_HOST_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0NEEDCLKSTAT_HOST_NEEDCLK_SHIFT)) & SYSCON_USB0NEEDCLKSTAT_HOST_NEEDCLK_MASK)
-/*! @} */
-
-/*! @name FMCFLUSH - FMCflush control */
-/*! @{ */
-#define SYSCON_FMCFLUSH_FLUSH_MASK (0x1U)
-#define SYSCON_FMCFLUSH_FLUSH_SHIFT (0U)
-/*! FLUSH - Flush control
- * 0b1..Flush the FMC buffer contents.
- * 0b0..No action is performed.
- */
-#define SYSCON_FMCFLUSH_FLUSH(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FMCFLUSH_FLUSH_SHIFT)) & SYSCON_FMCFLUSH_FLUSH_MASK)
-/*! @} */
-
-/*! @name MCLKIO - MCLK control */
-/*! @{ */
-#define SYSCON_MCLKIO_MCLKIO_MASK (0x1U)
-#define SYSCON_MCLKIO_MCLKIO_SHIFT (0U)
-/*! MCLKIO - MCLK control.
- * 0b0..input mode.
- * 0b1..output mode.
- */
-#define SYSCON_MCLKIO_MCLKIO(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MCLKIO_MCLKIO_SHIFT)) & SYSCON_MCLKIO_MCLKIO_MASK)
-/*! @} */
-
-/*! @name USB1NEEDCLKCTRL - USB1 need clock control */
-/*! @{ */
-#define SYSCON_USB1NEEDCLKCTRL_AP_HS_DEV_NEEDCLK_MASK (0x1U)
-#define SYSCON_USB1NEEDCLKCTRL_AP_HS_DEV_NEEDCLK_SHIFT (0U)
-/*! AP_HS_DEV_NEEDCLK - USB1 Device need_clock signal control:
- * 0b0..HOST_NEEDCLK is under hardware control.
- * 0b1..HOST_NEEDCLK is forced high.
- */
-#define SYSCON_USB1NEEDCLKCTRL_AP_HS_DEV_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKCTRL_AP_HS_DEV_NEEDCLK_SHIFT)) & SYSCON_USB1NEEDCLKCTRL_AP_HS_DEV_NEEDCLK_MASK)
-#define SYSCON_USB1NEEDCLKCTRL_POL_HS_DEV_NEEDCLK_MASK (0x2U)
-#define SYSCON_USB1NEEDCLKCTRL_POL_HS_DEV_NEEDCLK_SHIFT (1U)
-/*! POL_HS_DEV_NEEDCLK - USB1 device need clock polarity for triggering the USB1_NEEDCLK wake-up interrupt:
- * 0b0..Falling edge of DEV_NEEDCLK triggers wake-up.
- * 0b1..Rising edge of DEV_NEEDCLK triggers wake-up.
- */
-#define SYSCON_USB1NEEDCLKCTRL_POL_HS_DEV_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKCTRL_POL_HS_DEV_NEEDCLK_SHIFT)) & SYSCON_USB1NEEDCLKCTRL_POL_HS_DEV_NEEDCLK_MASK)
-#define SYSCON_USB1NEEDCLKCTRL_AP_HS_HOST_NEEDCLK_MASK (0x4U)
-#define SYSCON_USB1NEEDCLKCTRL_AP_HS_HOST_NEEDCLK_SHIFT (2U)
-/*! AP_HS_HOST_NEEDCLK - USB1 Host need clock signal control:
- * 0b0..HOST_NEEDCLK is under hardware control.
- * 0b1..HOST_NEEDCLK is forced high.
- */
-#define SYSCON_USB1NEEDCLKCTRL_AP_HS_HOST_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKCTRL_AP_HS_HOST_NEEDCLK_SHIFT)) & SYSCON_USB1NEEDCLKCTRL_AP_HS_HOST_NEEDCLK_MASK)
-#define SYSCON_USB1NEEDCLKCTRL_POL_HS_HOST_NEEDCLK_MASK (0x8U)
-#define SYSCON_USB1NEEDCLKCTRL_POL_HS_HOST_NEEDCLK_SHIFT (3U)
-/*! POL_HS_HOST_NEEDCLK - USB1 host need clock polarity for triggering the USB1_NEEDCLK wake-up interrupt.
- * 0b0..Falling edge of HOST_NEEDCLK triggers wake-up.
- * 0b1..Rising edge of HOST_NEEDCLK triggers wake-up.
- */
-#define SYSCON_USB1NEEDCLKCTRL_POL_HS_HOST_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKCTRL_POL_HS_HOST_NEEDCLK_SHIFT)) & SYSCON_USB1NEEDCLKCTRL_POL_HS_HOST_NEEDCLK_MASK)
-#define SYSCON_USB1NEEDCLKCTRL_HS_DEV_WAKEUP_N_MASK (0x10U)
-#define SYSCON_USB1NEEDCLKCTRL_HS_DEV_WAKEUP_N_SHIFT (4U)
-/*! HS_DEV_WAKEUP_N - Software override of device controller PHY wake up logic.
- * 0b0..Forces USB1_PHY to wake-up.
- * 0b1..Normal USB1_PHY behavior.
- */
-#define SYSCON_USB1NEEDCLKCTRL_HS_DEV_WAKEUP_N(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKCTRL_HS_DEV_WAKEUP_N_SHIFT)) & SYSCON_USB1NEEDCLKCTRL_HS_DEV_WAKEUP_N_MASK)
-/*! @} */
-
-/*! @name USB1NEEDCLKSTAT - USB1 need clock status */
-/*! @{ */
-#define SYSCON_USB1NEEDCLKSTAT_DEV_NEEDCLK_MASK (0x1U)
-#define SYSCON_USB1NEEDCLKSTAT_DEV_NEEDCLK_SHIFT (0U)
-/*! DEV_NEEDCLK - USB1 Device need_clock signal status:.
- * 0b1..DEV_NEEDCLK is high.
- * 0b0..DEV_NEEDCLK is low.
- */
-#define SYSCON_USB1NEEDCLKSTAT_DEV_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKSTAT_DEV_NEEDCLK_SHIFT)) & SYSCON_USB1NEEDCLKSTAT_DEV_NEEDCLK_MASK)
-#define SYSCON_USB1NEEDCLKSTAT_HOST_NEEDCLK_MASK (0x2U)
-#define SYSCON_USB1NEEDCLKSTAT_HOST_NEEDCLK_SHIFT (1U)
-/*! HOST_NEEDCLK - USB1 Host need_clock signal status:.
- * 0b1..HOST_NEEDCLK is high.
- * 0b0..HOST_NEEDCLK is low.
- */
-#define SYSCON_USB1NEEDCLKSTAT_HOST_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKSTAT_HOST_NEEDCLK_SHIFT)) & SYSCON_USB1NEEDCLKSTAT_HOST_NEEDCLK_MASK)
-/*! @} */
-
-/*! @name SDIOCLKCTRL - SDIO CCLKIN phase and delay control */
-/*! @{ */
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_PHASE_MASK (0x3U)
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_PHASE_SHIFT (0U)
-/*! CCLK_DRV_PHASE - Programmable delay value by which cclk_in_drv is phase-shifted with regard to cclk_in.
- * 0b00..0 degree shift.
- * 0b01..90 degree shift.
- * 0b10..180 degree shift.
- * 0b11..270 degree shift.
- */
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_PHASE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_CCLK_DRV_PHASE_SHIFT)) & SYSCON_SDIOCLKCTRL_CCLK_DRV_PHASE_MASK)
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_PHASE_MASK (0xCU)
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_PHASE_SHIFT (2U)
-/*! CCLK_SAMPLE_PHASE - Programmable delay value by which cclk_in_sample is delayed with regard to cclk_in.
- * 0b00..0 degree shift.
- * 0b01..90 degree shift.
- * 0b10..180 degree shift.
- * 0b11..270 degree shift.
- */
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_PHASE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_PHASE_SHIFT)) & SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_PHASE_MASK)
-#define SYSCON_SDIOCLKCTRL_PHASE_ACTIVE_MASK (0x80U)
-#define SYSCON_SDIOCLKCTRL_PHASE_ACTIVE_SHIFT (7U)
-/*! PHASE_ACTIVE - Enables the delays CCLK_DRV_PHASE and CCLK_SAMPLE_PHASE.
- * 0b0..Bypassed.
- * 0b1..Activates phase shift logic. When active, the clock divider is active and phase delays are enabled.
- */
-#define SYSCON_SDIOCLKCTRL_PHASE_ACTIVE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_PHASE_ACTIVE_SHIFT)) & SYSCON_SDIOCLKCTRL_PHASE_ACTIVE_MASK)
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_MASK (0x1F0000U)
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_SHIFT (16U)
-/*! CCLK_DRV_DELAY - Programmable delay value by which cclk_in_drv is delayed with regard to cclk_in.
- */
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_SHIFT)) & SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_MASK)
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_ACTIVE_MASK (0x800000U)
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_ACTIVE_SHIFT (23U)
-/*! CCLK_DRV_DELAY_ACTIVE - Enables drive delay, as controlled by the CCLK_DRV_DELAY field.
- * 0b1..Enable drive delay.
- * 0b0..Disable drive delay.
- */
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_ACTIVE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_ACTIVE_SHIFT)) & SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_ACTIVE_MASK)
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_MASK (0x1F000000U)
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_SHIFT (24U)
-/*! CCLK_SAMPLE_DELAY - Programmable delay value by which cclk_in_sample is delayed with regard to cclk_in.
- */
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_SHIFT)) & SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_MASK)
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_ACTIVE_MASK (0x80000000U)
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_ACTIVE_SHIFT (31U)
-/*! CCLK_SAMPLE_DELAY_ACTIVE - Enables sample delay, as controlled by the CCLK_SAMPLE_DELAY field.
- * 0b1..Enables sample delay.
- * 0b0..Disables sample delay.
- */
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_ACTIVE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_ACTIVE_SHIFT)) & SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_ACTIVE_MASK)
-/*! @} */
-
-/*! @name PLL1CTRL - PLL1 550m control */
-/*! @{ */
-#define SYSCON_PLL1CTRL_SELR_MASK (0xFU)
-#define SYSCON_PLL1CTRL_SELR_SHIFT (0U)
-/*! SELR - Bandwidth select R value.
- */
-#define SYSCON_PLL1CTRL_SELR(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_SELR_SHIFT)) & SYSCON_PLL1CTRL_SELR_MASK)
-#define SYSCON_PLL1CTRL_SELI_MASK (0x3F0U)
-#define SYSCON_PLL1CTRL_SELI_SHIFT (4U)
-/*! SELI - Bandwidth select I value.
- */
-#define SYSCON_PLL1CTRL_SELI(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_SELI_SHIFT)) & SYSCON_PLL1CTRL_SELI_MASK)
-#define SYSCON_PLL1CTRL_SELP_MASK (0x7C00U)
-#define SYSCON_PLL1CTRL_SELP_SHIFT (10U)
-/*! SELP - Bandwidth select P value.
- */
-#define SYSCON_PLL1CTRL_SELP(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_SELP_SHIFT)) & SYSCON_PLL1CTRL_SELP_MASK)
-#define SYSCON_PLL1CTRL_BYPASSPLL_MASK (0x8000U)
-#define SYSCON_PLL1CTRL_BYPASSPLL_SHIFT (15U)
-/*! BYPASSPLL - Bypass PLL input clock is sent directly to the PLL output (default).
- * 0b1..PLL input clock is sent directly to the PLL output.
- * 0b0..use PLL.
- */
-#define SYSCON_PLL1CTRL_BYPASSPLL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_BYPASSPLL_SHIFT)) & SYSCON_PLL1CTRL_BYPASSPLL_MASK)
-#define SYSCON_PLL1CTRL_BYPASSPOSTDIV2_MASK (0x10000U)
-#define SYSCON_PLL1CTRL_BYPASSPOSTDIV2_SHIFT (16U)
-/*! BYPASSPOSTDIV2 - bypass of the divide-by-2 divider in the post-divider.
- * 0b1..bypass of the divide-by-2 divider in the post-divider.
- * 0b0..use the divide-by-2 divider in the post-divider.
- */
-#define SYSCON_PLL1CTRL_BYPASSPOSTDIV2(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_BYPASSPOSTDIV2_SHIFT)) & SYSCON_PLL1CTRL_BYPASSPOSTDIV2_MASK)
-#define SYSCON_PLL1CTRL_LIMUPOFF_MASK (0x20000U)
-#define SYSCON_PLL1CTRL_LIMUPOFF_SHIFT (17U)
-/*! LIMUPOFF - limup_off = 1 in spread spectrum and fractional PLL applications.
- */
-#define SYSCON_PLL1CTRL_LIMUPOFF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_LIMUPOFF_SHIFT)) & SYSCON_PLL1CTRL_LIMUPOFF_MASK)
-#define SYSCON_PLL1CTRL_BWDIRECT_MASK (0x40000U)
-#define SYSCON_PLL1CTRL_BWDIRECT_SHIFT (18U)
-/*! BWDIRECT - control of the bandwidth of the PLL.
- * 0b1..modify the bandwidth of the PLL directly.
- * 0b0..the bandwidth is changed synchronously with the feedback-divider.
- */
-#define SYSCON_PLL1CTRL_BWDIRECT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_BWDIRECT_SHIFT)) & SYSCON_PLL1CTRL_BWDIRECT_MASK)
-#define SYSCON_PLL1CTRL_BYPASSPREDIV_MASK (0x80000U)
-#define SYSCON_PLL1CTRL_BYPASSPREDIV_SHIFT (19U)
-/*! BYPASSPREDIV - bypass of the pre-divider.
- * 0b1..bypass of the pre-divider.
- * 0b0..use the pre-divider.
- */
-#define SYSCON_PLL1CTRL_BYPASSPREDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_BYPASSPREDIV_SHIFT)) & SYSCON_PLL1CTRL_BYPASSPREDIV_MASK)
-#define SYSCON_PLL1CTRL_BYPASSPOSTDIV_MASK (0x100000U)
-#define SYSCON_PLL1CTRL_BYPASSPOSTDIV_SHIFT (20U)
-/*! BYPASSPOSTDIV - bypass of the post-divider.
- * 0b1..bypass of the post-divider.
- * 0b0..use the post-divider.
- */
-#define SYSCON_PLL1CTRL_BYPASSPOSTDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_BYPASSPOSTDIV_SHIFT)) & SYSCON_PLL1CTRL_BYPASSPOSTDIV_MASK)
-#define SYSCON_PLL1CTRL_CLKEN_MASK (0x200000U)
-#define SYSCON_PLL1CTRL_CLKEN_SHIFT (21U)
-/*! CLKEN - enable the output clock.
- * 0b1..Enable the output clock.
- * 0b0..Disable the output clock.
- */
-#define SYSCON_PLL1CTRL_CLKEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_CLKEN_SHIFT)) & SYSCON_PLL1CTRL_CLKEN_MASK)
-#define SYSCON_PLL1CTRL_FRMEN_MASK (0x400000U)
-#define SYSCON_PLL1CTRL_FRMEN_SHIFT (22U)
-/*! FRMEN - 1: free running mode.
- */
-#define SYSCON_PLL1CTRL_FRMEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_FRMEN_SHIFT)) & SYSCON_PLL1CTRL_FRMEN_MASK)
-#define SYSCON_PLL1CTRL_FRMCLKSTABLE_MASK (0x800000U)
-#define SYSCON_PLL1CTRL_FRMCLKSTABLE_SHIFT (23U)
-/*! FRMCLKSTABLE - free running mode clockstable: Warning: Only make frm_clockstable = 1 after the PLL output frequency is stable.
- */
-#define SYSCON_PLL1CTRL_FRMCLKSTABLE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_FRMCLKSTABLE_SHIFT)) & SYSCON_PLL1CTRL_FRMCLKSTABLE_MASK)
-#define SYSCON_PLL1CTRL_SKEWEN_MASK (0x1000000U)
-#define SYSCON_PLL1CTRL_SKEWEN_SHIFT (24U)
-/*! SKEWEN - Skew mode.
- * 0b1..skewmode is enable.
- * 0b0..skewmode is disable.
- */
-#define SYSCON_PLL1CTRL_SKEWEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_SKEWEN_SHIFT)) & SYSCON_PLL1CTRL_SKEWEN_MASK)
-/*! @} */
-
-/*! @name PLL1STAT - PLL1 550m status */
-/*! @{ */
-#define SYSCON_PLL1STAT_LOCK_MASK (0x1U)
-#define SYSCON_PLL1STAT_LOCK_SHIFT (0U)
-/*! LOCK - lock detector output (active high) Warning: The lock signal is only reliable between fref[2] :100 kHz to 20 MHz.
- */
-#define SYSCON_PLL1STAT_LOCK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1STAT_LOCK_SHIFT)) & SYSCON_PLL1STAT_LOCK_MASK)
-#define SYSCON_PLL1STAT_PREDIVACK_MASK (0x2U)
-#define SYSCON_PLL1STAT_PREDIVACK_SHIFT (1U)
-/*! PREDIVACK - pre-divider ratio change acknowledge.
- */
-#define SYSCON_PLL1STAT_PREDIVACK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1STAT_PREDIVACK_SHIFT)) & SYSCON_PLL1STAT_PREDIVACK_MASK)
-#define SYSCON_PLL1STAT_FEEDDIVACK_MASK (0x4U)
-#define SYSCON_PLL1STAT_FEEDDIVACK_SHIFT (2U)
-/*! FEEDDIVACK - feedback divider ratio change acknowledge.
- */
-#define SYSCON_PLL1STAT_FEEDDIVACK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1STAT_FEEDDIVACK_SHIFT)) & SYSCON_PLL1STAT_FEEDDIVACK_MASK)
-#define SYSCON_PLL1STAT_POSTDIVACK_MASK (0x8U)
-#define SYSCON_PLL1STAT_POSTDIVACK_SHIFT (3U)
-/*! POSTDIVACK - post-divider ratio change acknowledge.
- */
-#define SYSCON_PLL1STAT_POSTDIVACK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1STAT_POSTDIVACK_SHIFT)) & SYSCON_PLL1STAT_POSTDIVACK_MASK)
-#define SYSCON_PLL1STAT_FRMDET_MASK (0x10U)
-#define SYSCON_PLL1STAT_FRMDET_SHIFT (4U)
-/*! FRMDET - free running detector output (active high).
- */
-#define SYSCON_PLL1STAT_FRMDET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1STAT_FRMDET_SHIFT)) & SYSCON_PLL1STAT_FRMDET_MASK)
-/*! @} */
-
-/*! @name PLL1NDEC - PLL1 550m N divider */
-/*! @{ */
-#define SYSCON_PLL1NDEC_NDIV_MASK (0xFFU)
-#define SYSCON_PLL1NDEC_NDIV_SHIFT (0U)
-/*! NDIV - pre-divider divider ratio (N-divider).
- */
-#define SYSCON_PLL1NDEC_NDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1NDEC_NDIV_SHIFT)) & SYSCON_PLL1NDEC_NDIV_MASK)
-#define SYSCON_PLL1NDEC_NREQ_MASK (0x100U)
-#define SYSCON_PLL1NDEC_NREQ_SHIFT (8U)
-/*! NREQ - pre-divider ratio change request.
- */
-#define SYSCON_PLL1NDEC_NREQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1NDEC_NREQ_SHIFT)) & SYSCON_PLL1NDEC_NREQ_MASK)
-/*! @} */
-
-/*! @name PLL1MDEC - PLL1 550m M divider */
-/*! @{ */
-#define SYSCON_PLL1MDEC_MDIV_MASK (0xFFFFU)
-#define SYSCON_PLL1MDEC_MDIV_SHIFT (0U)
-/*! MDIV - feedback divider divider ratio (M-divider).
- */
-#define SYSCON_PLL1MDEC_MDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1MDEC_MDIV_SHIFT)) & SYSCON_PLL1MDEC_MDIV_MASK)
-#define SYSCON_PLL1MDEC_MREQ_MASK (0x10000U)
-#define SYSCON_PLL1MDEC_MREQ_SHIFT (16U)
-/*! MREQ - feedback ratio change request.
- */
-#define SYSCON_PLL1MDEC_MREQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1MDEC_MREQ_SHIFT)) & SYSCON_PLL1MDEC_MREQ_MASK)
-/*! @} */
-
-/*! @name PLL1PDEC - PLL1 550m P divider */
-/*! @{ */
-#define SYSCON_PLL1PDEC_PDIV_MASK (0x1FU)
-#define SYSCON_PLL1PDEC_PDIV_SHIFT (0U)
-/*! PDIV - post-divider divider ratio (P-divider)
- */
-#define SYSCON_PLL1PDEC_PDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1PDEC_PDIV_SHIFT)) & SYSCON_PLL1PDEC_PDIV_MASK)
-#define SYSCON_PLL1PDEC_PREQ_MASK (0x20U)
-#define SYSCON_PLL1PDEC_PREQ_SHIFT (5U)
-/*! PREQ - feedback ratio change request.
- */
-#define SYSCON_PLL1PDEC_PREQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1PDEC_PREQ_SHIFT)) & SYSCON_PLL1PDEC_PREQ_MASK)
-/*! @} */
-
-/*! @name PLL0CTRL - PLL0 550m control */
-/*! @{ */
-#define SYSCON_PLL0CTRL_SELR_MASK (0xFU)
-#define SYSCON_PLL0CTRL_SELR_SHIFT (0U)
-/*! SELR - Bandwidth select R value.
- */
-#define SYSCON_PLL0CTRL_SELR(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_SELR_SHIFT)) & SYSCON_PLL0CTRL_SELR_MASK)
-#define SYSCON_PLL0CTRL_SELI_MASK (0x3F0U)
-#define SYSCON_PLL0CTRL_SELI_SHIFT (4U)
-/*! SELI - Bandwidth select I value.
- */
-#define SYSCON_PLL0CTRL_SELI(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_SELI_SHIFT)) & SYSCON_PLL0CTRL_SELI_MASK)
-#define SYSCON_PLL0CTRL_SELP_MASK (0x7C00U)
-#define SYSCON_PLL0CTRL_SELP_SHIFT (10U)
-/*! SELP - Bandwidth select P value.
- */
-#define SYSCON_PLL0CTRL_SELP(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_SELP_SHIFT)) & SYSCON_PLL0CTRL_SELP_MASK)
-#define SYSCON_PLL0CTRL_BYPASSPLL_MASK (0x8000U)
-#define SYSCON_PLL0CTRL_BYPASSPLL_SHIFT (15U)
-/*! BYPASSPLL - Bypass PLL input clock is sent directly to the PLL output (default).
- * 0b1..Bypass PLL input clock is sent directly to the PLL output.
- * 0b0..use PLL.
- */
-#define SYSCON_PLL0CTRL_BYPASSPLL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_BYPASSPLL_SHIFT)) & SYSCON_PLL0CTRL_BYPASSPLL_MASK)
-#define SYSCON_PLL0CTRL_BYPASSPOSTDIV2_MASK (0x10000U)
-#define SYSCON_PLL0CTRL_BYPASSPOSTDIV2_SHIFT (16U)
-/*! BYPASSPOSTDIV2 - bypass of the divide-by-2 divider in the post-divider.
- * 0b1..bypass of the divide-by-2 divider in the post-divider.
- * 0b0..use the divide-by-2 divider in the post-divider.
- */
-#define SYSCON_PLL0CTRL_BYPASSPOSTDIV2(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_BYPASSPOSTDIV2_SHIFT)) & SYSCON_PLL0CTRL_BYPASSPOSTDIV2_MASK)
-#define SYSCON_PLL0CTRL_LIMUPOFF_MASK (0x20000U)
-#define SYSCON_PLL0CTRL_LIMUPOFF_SHIFT (17U)
-/*! LIMUPOFF - limup_off = 1 in spread spectrum and fractional PLL applications.
- */
-#define SYSCON_PLL0CTRL_LIMUPOFF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_LIMUPOFF_SHIFT)) & SYSCON_PLL0CTRL_LIMUPOFF_MASK)
-#define SYSCON_PLL0CTRL_BWDIRECT_MASK (0x40000U)
-#define SYSCON_PLL0CTRL_BWDIRECT_SHIFT (18U)
-/*! BWDIRECT - Control of the bandwidth of the PLL.
- * 0b1..modify the bandwidth of the PLL directly.
- * 0b0..the bandwidth is changed synchronously with the feedback-divider.
- */
-#define SYSCON_PLL0CTRL_BWDIRECT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_BWDIRECT_SHIFT)) & SYSCON_PLL0CTRL_BWDIRECT_MASK)
-#define SYSCON_PLL0CTRL_BYPASSPREDIV_MASK (0x80000U)
-#define SYSCON_PLL0CTRL_BYPASSPREDIV_SHIFT (19U)
-/*! BYPASSPREDIV - bypass of the pre-divider.
- * 0b1..bypass of the pre-divider.
- * 0b0..use the pre-divider.
- */
-#define SYSCON_PLL0CTRL_BYPASSPREDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_BYPASSPREDIV_SHIFT)) & SYSCON_PLL0CTRL_BYPASSPREDIV_MASK)
-#define SYSCON_PLL0CTRL_BYPASSPOSTDIV_MASK (0x100000U)
-#define SYSCON_PLL0CTRL_BYPASSPOSTDIV_SHIFT (20U)
-/*! BYPASSPOSTDIV - bypass of the post-divider.
- * 0b1..bypass of the post-divider.
- * 0b0..use the post-divider.
- */
-#define SYSCON_PLL0CTRL_BYPASSPOSTDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_BYPASSPOSTDIV_SHIFT)) & SYSCON_PLL0CTRL_BYPASSPOSTDIV_MASK)
-#define SYSCON_PLL0CTRL_CLKEN_MASK (0x200000U)
-#define SYSCON_PLL0CTRL_CLKEN_SHIFT (21U)
-/*! CLKEN - enable the output clock.
- * 0b1..enable the output clock.
- * 0b0..disable the output clock.
- */
-#define SYSCON_PLL0CTRL_CLKEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_CLKEN_SHIFT)) & SYSCON_PLL0CTRL_CLKEN_MASK)
-#define SYSCON_PLL0CTRL_FRMEN_MASK (0x400000U)
-#define SYSCON_PLL0CTRL_FRMEN_SHIFT (22U)
-/*! FRMEN - free running mode.
- * 0b1..free running mode is enable.
- * 0b0..free running mode is disable.
- */
-#define SYSCON_PLL0CTRL_FRMEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_FRMEN_SHIFT)) & SYSCON_PLL0CTRL_FRMEN_MASK)
-#define SYSCON_PLL0CTRL_FRMCLKSTABLE_MASK (0x800000U)
-#define SYSCON_PLL0CTRL_FRMCLKSTABLE_SHIFT (23U)
-/*! FRMCLKSTABLE - free running mode clockstable: Warning: Only make frm_clockstable =1 after the PLL output frequency is stable.
- */
-#define SYSCON_PLL0CTRL_FRMCLKSTABLE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_FRMCLKSTABLE_SHIFT)) & SYSCON_PLL0CTRL_FRMCLKSTABLE_MASK)
-#define SYSCON_PLL0CTRL_SKEWEN_MASK (0x1000000U)
-#define SYSCON_PLL0CTRL_SKEWEN_SHIFT (24U)
-/*! SKEWEN - skew mode.
- * 0b1..skew mode is enable.
- * 0b0..skew mode is disable.
- */
-#define SYSCON_PLL0CTRL_SKEWEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_SKEWEN_SHIFT)) & SYSCON_PLL0CTRL_SKEWEN_MASK)
-/*! @} */
-
-/*! @name PLL0STAT - PLL0 550m status */
-/*! @{ */
-#define SYSCON_PLL0STAT_LOCK_MASK (0x1U)
-#define SYSCON_PLL0STAT_LOCK_SHIFT (0U)
-/*! LOCK - lock detector output (active high) Warning: The lock signal is only reliable between fref[2] :100 kHz to 20 MHz.
- */
-#define SYSCON_PLL0STAT_LOCK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0STAT_LOCK_SHIFT)) & SYSCON_PLL0STAT_LOCK_MASK)
-#define SYSCON_PLL0STAT_PREDIVACK_MASK (0x2U)
-#define SYSCON_PLL0STAT_PREDIVACK_SHIFT (1U)
-/*! PREDIVACK - pre-divider ratio change acknowledge.
- */
-#define SYSCON_PLL0STAT_PREDIVACK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0STAT_PREDIVACK_SHIFT)) & SYSCON_PLL0STAT_PREDIVACK_MASK)
-#define SYSCON_PLL0STAT_FEEDDIVACK_MASK (0x4U)
-#define SYSCON_PLL0STAT_FEEDDIVACK_SHIFT (2U)
-/*! FEEDDIVACK - feedback divider ratio change acknowledge.
- */
-#define SYSCON_PLL0STAT_FEEDDIVACK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0STAT_FEEDDIVACK_SHIFT)) & SYSCON_PLL0STAT_FEEDDIVACK_MASK)
-#define SYSCON_PLL0STAT_POSTDIVACK_MASK (0x8U)
-#define SYSCON_PLL0STAT_POSTDIVACK_SHIFT (3U)
-/*! POSTDIVACK - post-divider ratio change acknowledge.
- */
-#define SYSCON_PLL0STAT_POSTDIVACK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0STAT_POSTDIVACK_SHIFT)) & SYSCON_PLL0STAT_POSTDIVACK_MASK)
-#define SYSCON_PLL0STAT_FRMDET_MASK (0x10U)
-#define SYSCON_PLL0STAT_FRMDET_SHIFT (4U)
-/*! FRMDET - free running detector output (active high).
- */
-#define SYSCON_PLL0STAT_FRMDET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0STAT_FRMDET_SHIFT)) & SYSCON_PLL0STAT_FRMDET_MASK)
-/*! @} */
-
-/*! @name PLL0NDEC - PLL0 550m N divider */
-/*! @{ */
-#define SYSCON_PLL0NDEC_NDIV_MASK (0xFFU)
-#define SYSCON_PLL0NDEC_NDIV_SHIFT (0U)
-/*! NDIV - pre-divider divider ratio (N-divider).
- */
-#define SYSCON_PLL0NDEC_NDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0NDEC_NDIV_SHIFT)) & SYSCON_PLL0NDEC_NDIV_MASK)
-#define SYSCON_PLL0NDEC_NREQ_MASK (0x100U)
-#define SYSCON_PLL0NDEC_NREQ_SHIFT (8U)
-/*! NREQ - pre-divider ratio change request.
- */
-#define SYSCON_PLL0NDEC_NREQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0NDEC_NREQ_SHIFT)) & SYSCON_PLL0NDEC_NREQ_MASK)
-/*! @} */
-
-/*! @name PLL0PDEC - PLL0 550m P divider */
-/*! @{ */
-#define SYSCON_PLL0PDEC_PDIV_MASK (0x1FU)
-#define SYSCON_PLL0PDEC_PDIV_SHIFT (0U)
-/*! PDIV - post-divider divider ratio (P-divider)
- */
-#define SYSCON_PLL0PDEC_PDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0PDEC_PDIV_SHIFT)) & SYSCON_PLL0PDEC_PDIV_MASK)
-#define SYSCON_PLL0PDEC_PREQ_MASK (0x20U)
-#define SYSCON_PLL0PDEC_PREQ_SHIFT (5U)
-/*! PREQ - feedback ratio change request.
- */
-#define SYSCON_PLL0PDEC_PREQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0PDEC_PREQ_SHIFT)) & SYSCON_PLL0PDEC_PREQ_MASK)
-/*! @} */
-
-/*! @name PLL0SSCG0 - PLL0 Spread Spectrum Wrapper control register 0 */
-/*! @{ */
-#define SYSCON_PLL0SSCG0_MD_LBS_MASK (0xFFFFFFFFU)
-#define SYSCON_PLL0SSCG0_MD_LBS_SHIFT (0U)
-/*! MD_LBS - input word of the wrapper bit 31 to 0.
- */
-#define SYSCON_PLL0SSCG0_MD_LBS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG0_MD_LBS_SHIFT)) & SYSCON_PLL0SSCG0_MD_LBS_MASK)
-/*! @} */
-
-/*! @name PLL0SSCG1 - PLL0 Spread Spectrum Wrapper control register 1 */
-/*! @{ */
-#define SYSCON_PLL0SSCG1_MD_MBS_MASK (0x1U)
-#define SYSCON_PLL0SSCG1_MD_MBS_SHIFT (0U)
-/*! MD_MBS - input word of the wrapper bit 32.
- */
-#define SYSCON_PLL0SSCG1_MD_MBS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MD_MBS_SHIFT)) & SYSCON_PLL0SSCG1_MD_MBS_MASK)
-#define SYSCON_PLL0SSCG1_MD_REQ_MASK (0x2U)
-#define SYSCON_PLL0SSCG1_MD_REQ_SHIFT (1U)
-/*! MD_REQ - md change request.
- */
-#define SYSCON_PLL0SSCG1_MD_REQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MD_REQ_SHIFT)) & SYSCON_PLL0SSCG1_MD_REQ_MASK)
-#define SYSCON_PLL0SSCG1_MF_MASK (0x1CU)
-#define SYSCON_PLL0SSCG1_MF_SHIFT (2U)
-/*! MF - programmable modulation frequency fm = Fref/Nss mf[2:0] = 000 => Nss=512 (fm ~ 3.
- */
-#define SYSCON_PLL0SSCG1_MF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MF_SHIFT)) & SYSCON_PLL0SSCG1_MF_MASK)
-#define SYSCON_PLL0SSCG1_MR_MASK (0xE0U)
-#define SYSCON_PLL0SSCG1_MR_SHIFT (5U)
-/*! MR - programmable frequency modulation depth Dfmodpk-pk = Fref*kss/Fcco = kss/(2*md[32:25]dec)
- * mr[2:0] = 000 => kss = 0 (no spread spectrum) mr[2:0] = 001 => kss ~ 1 mr[2:0] = 010 => kss ~ 1.
- */
-#define SYSCON_PLL0SSCG1_MR(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MR_SHIFT)) & SYSCON_PLL0SSCG1_MR_MASK)
-#define SYSCON_PLL0SSCG1_MC_MASK (0x300U)
-#define SYSCON_PLL0SSCG1_MC_SHIFT (8U)
-/*! MC - modulation waveform control Compensation for low pass filtering of the PLL to get a
- * triangular modulation at the output of the PLL, giving a flat frequency spectrum.
- */
-#define SYSCON_PLL0SSCG1_MC(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MC_SHIFT)) & SYSCON_PLL0SSCG1_MC_MASK)
-#define SYSCON_PLL0SSCG1_MDIV_EXT_MASK (0x3FFFC00U)
-#define SYSCON_PLL0SSCG1_MDIV_EXT_SHIFT (10U)
-/*! MDIV_EXT - to select an external mdiv value.
- */
-#define SYSCON_PLL0SSCG1_MDIV_EXT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MDIV_EXT_SHIFT)) & SYSCON_PLL0SSCG1_MDIV_EXT_MASK)
-#define SYSCON_PLL0SSCG1_MREQ_MASK (0x4000000U)
-#define SYSCON_PLL0SSCG1_MREQ_SHIFT (26U)
-/*! MREQ - to select an external mreq value.
- */
-#define SYSCON_PLL0SSCG1_MREQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MREQ_SHIFT)) & SYSCON_PLL0SSCG1_MREQ_MASK)
-#define SYSCON_PLL0SSCG1_DITHER_MASK (0x8000000U)
-#define SYSCON_PLL0SSCG1_DITHER_SHIFT (27U)
-/*! DITHER - dithering between two modulation frequencies in a random way or in a pseudo random way
- * (white noise), in order to decrease the probability that the modulated waveform will occur
- * with the same phase on a particular point on the screen.
- */
-#define SYSCON_PLL0SSCG1_DITHER(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_DITHER_SHIFT)) & SYSCON_PLL0SSCG1_DITHER_MASK)
-#define SYSCON_PLL0SSCG1_SEL_EXT_MASK (0x10000000U)
-#define SYSCON_PLL0SSCG1_SEL_EXT_SHIFT (28U)
-/*! SEL_EXT - to select mdiv_ext and mreq_ext sel_ext = 0: mdiv ~ md[32:0], mreq = 1 sel_ext = 1 : mdiv = mdiv_ext, mreq = mreq_ext.
- */
-#define SYSCON_PLL0SSCG1_SEL_EXT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_SEL_EXT_SHIFT)) & SYSCON_PLL0SSCG1_SEL_EXT_MASK)
-/*! @} */
-
-/*! @name CPUCTRL - CPU Control for multiple processors */
-/*! @{ */
-#define SYSCON_CPUCTRL_CPU1CLKEN_MASK (0x8U)
-#define SYSCON_CPUCTRL_CPU1CLKEN_SHIFT (3U)
-/*! CPU1CLKEN - CPU1 clock enable.
- * 0b1..The CPU1 clock is enabled.
- * 0b0..The CPU1 clock is not enabled.
- */
-#define SYSCON_CPUCTRL_CPU1CLKEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPUCTRL_CPU1CLKEN_SHIFT)) & SYSCON_CPUCTRL_CPU1CLKEN_MASK)
-#define SYSCON_CPUCTRL_CPU1RSTEN_MASK (0x20U)
-#define SYSCON_CPUCTRL_CPU1RSTEN_SHIFT (5U)
-/*! CPU1RSTEN - CPU1 reset.
- * 0b1..The CPU1 is being reset.
- * 0b0..The CPU1 is not being reset.
- */
-#define SYSCON_CPUCTRL_CPU1RSTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPUCTRL_CPU1RSTEN_SHIFT)) & SYSCON_CPUCTRL_CPU1RSTEN_MASK)
-/*! @} */
-
-/*! @name CPBOOT - Coprocessor Boot Address */
-/*! @{ */
-#define SYSCON_CPBOOT_CPBOOT_MASK (0xFFFFFFFFU)
-#define SYSCON_CPBOOT_CPBOOT_SHIFT (0U)
-/*! CPBOOT - Coprocessor Boot Address for CPU1.
- */
-#define SYSCON_CPBOOT_CPBOOT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPBOOT_CPBOOT_SHIFT)) & SYSCON_CPBOOT_CPBOOT_MASK)
-/*! @} */
-
-/*! @name CPSTAT - CPU Status */
-/*! @{ */
-#define SYSCON_CPSTAT_CPU0SLEEPING_MASK (0x1U)
-#define SYSCON_CPSTAT_CPU0SLEEPING_SHIFT (0U)
-/*! CPU0SLEEPING - The CPU0 sleeping state.
- * 0b1..the CPU is sleeping.
- * 0b0..the CPU is not sleeping.
- */
-#define SYSCON_CPSTAT_CPU0SLEEPING(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPSTAT_CPU0SLEEPING_SHIFT)) & SYSCON_CPSTAT_CPU0SLEEPING_MASK)
-#define SYSCON_CPSTAT_CPU1SLEEPING_MASK (0x2U)
-#define SYSCON_CPSTAT_CPU1SLEEPING_SHIFT (1U)
-/*! CPU1SLEEPING - The CPU1 sleeping state.
- * 0b1..the CPU is sleeping.
- * 0b0..the CPU is not sleeping.
- */
-#define SYSCON_CPSTAT_CPU1SLEEPING(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPSTAT_CPU1SLEEPING_SHIFT)) & SYSCON_CPSTAT_CPU1SLEEPING_MASK)
-#define SYSCON_CPSTAT_CPU0LOCKUP_MASK (0x4U)
-#define SYSCON_CPSTAT_CPU0LOCKUP_SHIFT (2U)
-/*! CPU0LOCKUP - The CPU0 lockup state.
- * 0b1..the CPU is in lockup.
- * 0b0..the CPU is not in lockup.
- */
-#define SYSCON_CPSTAT_CPU0LOCKUP(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPSTAT_CPU0LOCKUP_SHIFT)) & SYSCON_CPSTAT_CPU0LOCKUP_MASK)
-#define SYSCON_CPSTAT_CPU1LOCKUP_MASK (0x8U)
-#define SYSCON_CPSTAT_CPU1LOCKUP_SHIFT (3U)
-/*! CPU1LOCKUP - The CPU1 lockup state.
- * 0b1..the CPU is in lockup.
- * 0b0..the CPU is not in lockup.
- */
-#define SYSCON_CPSTAT_CPU1LOCKUP(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPSTAT_CPU1LOCKUP_SHIFT)) & SYSCON_CPSTAT_CPU1LOCKUP_MASK)
-/*! @} */
-
-/*! @name CLOCK_CTRL - Various system clock controls : Flash clock (48 MHz) control, clocks to Frequency Measures */
-/*! @{ */
-#define SYSCON_CLOCK_CTRL_XTAL32MHZ_FREQM_ENA_MASK (0x2U)
-#define SYSCON_CLOCK_CTRL_XTAL32MHZ_FREQM_ENA_SHIFT (1U)
-/*! XTAL32MHZ_FREQM_ENA - Enable XTAL32MHz clock for Frequency Measure module.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_XTAL32MHZ_FREQM_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_XTAL32MHZ_FREQM_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_XTAL32MHZ_FREQM_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_FRO1MHZ_UTICK_ENA_MASK (0x4U)
-#define SYSCON_CLOCK_CTRL_FRO1MHZ_UTICK_ENA_SHIFT (2U)
-/*! FRO1MHZ_UTICK_ENA - Enable FRO 1MHz clock for Frequency Measure module and for UTICK.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_FRO1MHZ_UTICK_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_FRO1MHZ_UTICK_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_FRO1MHZ_UTICK_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_FRO12MHZ_FREQM_ENA_MASK (0x8U)
-#define SYSCON_CLOCK_CTRL_FRO12MHZ_FREQM_ENA_SHIFT (3U)
-/*! FRO12MHZ_FREQM_ENA - Enable FRO 12MHz clock for Frequency Measure module.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_FRO12MHZ_FREQM_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_FRO12MHZ_FREQM_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_FRO12MHZ_FREQM_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_FRO_HF_FREQM_ENA_MASK (0x10U)
-#define SYSCON_CLOCK_CTRL_FRO_HF_FREQM_ENA_SHIFT (4U)
-/*! FRO_HF_FREQM_ENA - Enable FRO 96MHz clock for Frequency Measure module.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_FRO_HF_FREQM_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_FRO_HF_FREQM_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_FRO_HF_FREQM_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_CLKIN_ENA_MASK (0x20U)
-#define SYSCON_CLOCK_CTRL_CLKIN_ENA_SHIFT (5U)
-/*! CLKIN_ENA - Enable clock_in clock for clock module.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_CLKIN_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_CLKIN_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_CLKIN_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_MASK (0x40U)
-#define SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_SHIFT (6U)
-/*! FRO1MHZ_CLK_ENA - Enable FRO 1MHz clock for clock muxing in clock gen.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_ANA_FRO12M_CLK_ENA_MASK (0x80U)
-#define SYSCON_CLOCK_CTRL_ANA_FRO12M_CLK_ENA_SHIFT (7U)
-/*! ANA_FRO12M_CLK_ENA - Enable FRO 12MHz clock for analog control of the FRO 192MHz.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_ANA_FRO12M_CLK_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_ANA_FRO12M_CLK_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_ANA_FRO12M_CLK_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_XO_CAL_CLK_ENA_MASK (0x100U)
-#define SYSCON_CLOCK_CTRL_XO_CAL_CLK_ENA_SHIFT (8U)
-/*! XO_CAL_CLK_ENA - Enable clock for cristal oscilator calibration.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_XO_CAL_CLK_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_XO_CAL_CLK_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_XO_CAL_CLK_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_PLU_DEGLITCH_CLK_ENA_MASK (0x200U)
-#define SYSCON_CLOCK_CTRL_PLU_DEGLITCH_CLK_ENA_SHIFT (9U)
-/*! PLU_DEGLITCH_CLK_ENA - Enable clocks FRO_1MHz and FRO_12MHz for PLU deglitching.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_PLU_DEGLITCH_CLK_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_PLU_DEGLITCH_CLK_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_PLU_DEGLITCH_CLK_ENA_MASK)
-/*! @} */
-
-/*! @name COMP_INT_CTRL - Comparator Interrupt control */
-/*! @{ */
-#define SYSCON_COMP_INT_CTRL_INT_ENABLE_MASK (0x1U)
-#define SYSCON_COMP_INT_CTRL_INT_ENABLE_SHIFT (0U)
-/*! INT_ENABLE - Analog Comparator interrupt enable control:.
- * 0b1..interrupt enable.
- * 0b0..interrupt disable.
- */
-#define SYSCON_COMP_INT_CTRL_INT_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_CTRL_INT_ENABLE_SHIFT)) & SYSCON_COMP_INT_CTRL_INT_ENABLE_MASK)
-#define SYSCON_COMP_INT_CTRL_INT_CLEAR_MASK (0x2U)
-#define SYSCON_COMP_INT_CTRL_INT_CLEAR_SHIFT (1U)
-/*! INT_CLEAR - Analog Comparator interrupt clear.
- * 0b0..No effect.
- * 0b1..Clear the interrupt. Self-cleared bit.
- */
-#define SYSCON_COMP_INT_CTRL_INT_CLEAR(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_CTRL_INT_CLEAR_SHIFT)) & SYSCON_COMP_INT_CTRL_INT_CLEAR_MASK)
-#define SYSCON_COMP_INT_CTRL_INT_CTRL_MASK (0x1CU)
-#define SYSCON_COMP_INT_CTRL_INT_CTRL_SHIFT (2U)
-/*! INT_CTRL - Comparator interrupt type selector:.
- * 0b000..The analog comparator interrupt edge sensitive is disabled.
- * 0b010..analog comparator interrupt is rising edge sensitive.
- * 0b100..analog comparator interrupt is falling edge sensitive.
- * 0b110..analog comparator interrupt is rising and falling edge sensitive.
- * 0b001..The analog comparator interrupt level sensitive is disabled.
- * 0b011..Analog Comparator interrupt is high level sensitive.
- * 0b101..Analog Comparator interrupt is low level sensitive.
- * 0b111..The analog comparator interrupt level sensitive is disabled.
- */
-#define SYSCON_COMP_INT_CTRL_INT_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_CTRL_INT_CTRL_SHIFT)) & SYSCON_COMP_INT_CTRL_INT_CTRL_MASK)
-#define SYSCON_COMP_INT_CTRL_INT_SOURCE_MASK (0x20U)
-#define SYSCON_COMP_INT_CTRL_INT_SOURCE_SHIFT (5U)
-/*! INT_SOURCE - Select which Analog comparator output (filtered our un-filtered) is used for interrupt detection.
- * 0b0..Select Analog Comparator filtered output as input for interrupt detection.
- * 0b1..Select Analog Comparator raw output (unfiltered) as input for interrupt detection. Must be used when
- * Analog comparator is used as wake up source in Power down mode.
- */
-#define SYSCON_COMP_INT_CTRL_INT_SOURCE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_CTRL_INT_SOURCE_SHIFT)) & SYSCON_COMP_INT_CTRL_INT_SOURCE_MASK)
-/*! @} */
-
-/*! @name COMP_INT_STATUS - Comparator Interrupt status */
-/*! @{ */
-#define SYSCON_COMP_INT_STATUS_STATUS_MASK (0x1U)
-#define SYSCON_COMP_INT_STATUS_STATUS_SHIFT (0U)
-/*! STATUS - Interrupt status BEFORE Interrupt Enable.
- * 0b0..no interrupt pending.
- * 0b1..interrupt pending.
- */
-#define SYSCON_COMP_INT_STATUS_STATUS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_STATUS_STATUS_SHIFT)) & SYSCON_COMP_INT_STATUS_STATUS_MASK)
-#define SYSCON_COMP_INT_STATUS_INT_STATUS_MASK (0x2U)
-#define SYSCON_COMP_INT_STATUS_INT_STATUS_SHIFT (1U)
-/*! INT_STATUS - Interrupt status AFTER Interrupt Enable.
- * 0b0..no interrupt pending.
- * 0b1..interrupt pending.
- */
-#define SYSCON_COMP_INT_STATUS_INT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_STATUS_INT_STATUS_SHIFT)) & SYSCON_COMP_INT_STATUS_INT_STATUS_MASK)
-#define SYSCON_COMP_INT_STATUS_VAL_MASK (0x4U)
-#define SYSCON_COMP_INT_STATUS_VAL_SHIFT (2U)
-/*! VAL - comparator analog output.
- * 0b1..P+ is greater than P-.
- * 0b0..P+ is smaller than P-.
- */
-#define SYSCON_COMP_INT_STATUS_VAL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_STATUS_VAL_SHIFT)) & SYSCON_COMP_INT_STATUS_VAL_MASK)
-/*! @} */
-
-/*! @name AUTOCLKGATEOVERRIDE - Control automatic clock gating */
-/*! @{ */
-#define SYSCON_AUTOCLKGATEOVERRIDE_ROM_MASK (0x1U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_ROM_SHIFT (0U)
-/*! ROM - Control automatic clock gating of ROM controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_ROM(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_ROM_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_ROM_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAMX_CTRL_MASK (0x2U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAMX_CTRL_SHIFT (1U)
-/*! RAMX_CTRL - Control automatic clock gating of RAMX controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAMX_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_RAMX_CTRL_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_RAMX_CTRL_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM0_CTRL_MASK (0x4U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM0_CTRL_SHIFT (2U)
-/*! RAM0_CTRL - Control automatic clock gating of RAM0 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM0_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_RAM0_CTRL_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_RAM0_CTRL_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM1_CTRL_MASK (0x8U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM1_CTRL_SHIFT (3U)
-/*! RAM1_CTRL - Control automatic clock gating of RAM1 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM1_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_RAM1_CTRL_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_RAM1_CTRL_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM2_CTRL_MASK (0x10U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM2_CTRL_SHIFT (4U)
-/*! RAM2_CTRL - Control automatic clock gating of RAM2 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM2_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_RAM2_CTRL_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_RAM2_CTRL_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM3_CTRL_MASK (0x20U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM3_CTRL_SHIFT (5U)
-/*! RAM3_CTRL - Control automatic clock gating of RAM3 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM3_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_RAM3_CTRL_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_RAM3_CTRL_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM4_CTRL_MASK (0x40U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM4_CTRL_SHIFT (6U)
-/*! RAM4_CTRL - Control automatic clock gating of RAM4 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM4_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_RAM4_CTRL_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_RAM4_CTRL_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYNC0_APB_MASK (0x80U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYNC0_APB_SHIFT (7U)
-/*! SYNC0_APB - Control automatic clock gating of synchronous bridge controller 0.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYNC0_APB(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_SYNC0_APB_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_SYNC0_APB_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYNC1_APB_MASK (0x100U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYNC1_APB_SHIFT (8U)
-/*! SYNC1_APB - Control automatic clock gating of synchronous bridge controller 1.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYNC1_APB(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_SYNC1_APB_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_SYNC1_APB_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_CRCGEN_MASK (0x800U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_CRCGEN_SHIFT (11U)
-/*! CRCGEN - Control automatic clock gating of CRCGEN controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_CRCGEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_CRCGEN_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_CRCGEN_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SDMA0_MASK (0x1000U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SDMA0_SHIFT (12U)
-/*! SDMA0 - Control automatic clock gating of DMA0 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_SDMA0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_SDMA0_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_SDMA0_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SDMA1_MASK (0x2000U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SDMA1_SHIFT (13U)
-/*! SDMA1 - Control automatic clock gating of DMA1 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_SDMA1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_SDMA1_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_SDMA1_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_USB0_MASK (0x4000U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_USB0_SHIFT (14U)
-/*! USB0 - Control automatic clock gating of USB controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_USB0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_USB0_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_USB0_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYSCON_MASK (0x8000U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYSCON_SHIFT (15U)
-/*! SYSCON - Control automatic clock gating of synchronous system controller registers bank.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYSCON(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_SYSCON_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_SYSCON_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_ENABLEUPDATE_MASK (0xFFFF0000U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_ENABLEUPDATE_SHIFT (16U)
-/*! ENABLEUPDATE - The value 0xC0DE must be written for AUTOCLKGATEOVERRIDE registers fields updates to have effect.
- * 0b1100000011011110..Bit Fields 0 - 15 of this register are updated
- * 0b0000000000000000..Bit Fields 0 - 15 of this register are not updated
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_ENABLEUPDATE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_ENABLEUPDATE_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_ENABLEUPDATE_MASK)
-/*! @} */
-
-/*! @name GPIOPSYNC - Enable bypass of the first stage of synchonization inside GPIO_INT module */
-/*! @{ */
-#define SYSCON_GPIOPSYNC_PSYNC_MASK (0x1U)
-#define SYSCON_GPIOPSYNC_PSYNC_SHIFT (0U)
-/*! PSYNC - Enable bypass of the first stage of synchonization inside GPIO_INT module.
- * 0b1..bypass of the first stage of synchonization inside GPIO_INT module.
- * 0b0..use the first stage of synchonization inside GPIO_INT module.
- */
-#define SYSCON_GPIOPSYNC_PSYNC(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_GPIOPSYNC_PSYNC_SHIFT)) & SYSCON_GPIOPSYNC_PSYNC_MASK)
-/*! @} */
-
-/*! @name DEBUG_LOCK_EN - Control write access to security registers. */
-/*! @{ */
-#define SYSCON_DEBUG_LOCK_EN_LOCK_ALL_MASK (0xFU)
-#define SYSCON_DEBUG_LOCK_EN_LOCK_ALL_SHIFT (0U)
-/*! LOCK_ALL - Control write access to CODESECURITYPROTTEST, CODESECURITYPROTCPU0,
- * CODESECURITYPROTCPU1, CPU0_DEBUG_FEATURES, CPU1_DEBUG_FEATURES and DBG_AUTH_SCRATCH registers.
- * 0b1010..1010: Enable write access to all 6 registers.
- * 0b0000..Any other value than b1010: disable write access to all 6 registers.
- */
-#define SYSCON_DEBUG_LOCK_EN_LOCK_ALL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_LOCK_EN_LOCK_ALL_SHIFT)) & SYSCON_DEBUG_LOCK_EN_LOCK_ALL_MASK)
-/*! @} */
-
-/*! @name DEBUG_FEATURES - Cortex M33 (CPU0) and micro Cortex M33 (CPU1) debug features control. */
-/*! @{ */
-#define SYSCON_DEBUG_FEATURES_CPU0_DBGEN_MASK (0x3U)
-#define SYSCON_DEBUG_FEATURES_CPU0_DBGEN_SHIFT (0U)
-/*! CPU0_DBGEN - CPU0 Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_CPU0_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_CPU0_DBGEN_SHIFT)) & SYSCON_DEBUG_FEATURES_CPU0_DBGEN_MASK)
-#define SYSCON_DEBUG_FEATURES_CPU0_NIDEN_MASK (0xCU)
-#define SYSCON_DEBUG_FEATURES_CPU0_NIDEN_SHIFT (2U)
-/*! CPU0_NIDEN - CPU0 Non Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_CPU0_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_CPU0_NIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_CPU0_NIDEN_MASK)
-#define SYSCON_DEBUG_FEATURES_CPU0_SPIDEN_MASK (0x30U)
-#define SYSCON_DEBUG_FEATURES_CPU0_SPIDEN_SHIFT (4U)
-/*! CPU0_SPIDEN - CPU0 Secure Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_CPU0_SPIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_CPU0_SPIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_CPU0_SPIDEN_MASK)
-#define SYSCON_DEBUG_FEATURES_CPU0_SPNIDEN_MASK (0xC0U)
-#define SYSCON_DEBUG_FEATURES_CPU0_SPNIDEN_SHIFT (6U)
-/*! CPU0_SPNIDEN - CPU0 Secure Non Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_CPU0_SPNIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_CPU0_SPNIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_CPU0_SPNIDEN_MASK)
-#define SYSCON_DEBUG_FEATURES_CPU1_DBGEN_MASK (0x300U)
-#define SYSCON_DEBUG_FEATURES_CPU1_DBGEN_SHIFT (8U)
-/*! CPU1_DBGEN - CPU1 Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_CPU1_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_CPU1_DBGEN_SHIFT)) & SYSCON_DEBUG_FEATURES_CPU1_DBGEN_MASK)
-#define SYSCON_DEBUG_FEATURES_CPU1_NIDEN_MASK (0xC00U)
-#define SYSCON_DEBUG_FEATURES_CPU1_NIDEN_SHIFT (10U)
-/*! CPU1_NIDEN - CPU1 Non Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_CPU1_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_CPU1_NIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_CPU1_NIDEN_MASK)
-/*! @} */
-
-/*! @name DEBUG_FEATURES_DP - Cortex M33 (CPU0) and micro Cortex M33 (CPU1) debug features control DUPLICATE register. */
-/*! @{ */
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_DBGEN_MASK (0x3U)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_DBGEN_SHIFT (0U)
-/*! CPU0_DBGEN - CPU0 (CPU0) Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_DP_CPU0_DBGEN_SHIFT)) & SYSCON_DEBUG_FEATURES_DP_CPU0_DBGEN_MASK)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_NIDEN_MASK (0xCU)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_NIDEN_SHIFT (2U)
-/*! CPU0_NIDEN - CPU0 Non Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_DP_CPU0_NIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_DP_CPU0_NIDEN_MASK)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_SPIDEN_MASK (0x30U)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_SPIDEN_SHIFT (4U)
-/*! CPU0_SPIDEN - CPU0 Secure Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_SPIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_DP_CPU0_SPIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_DP_CPU0_SPIDEN_MASK)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_SPNIDEN_MASK (0xC0U)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_SPNIDEN_SHIFT (6U)
-/*! CPU0_SPNIDEN - CPU0 Secure Non Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_SPNIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_DP_CPU0_SPNIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_DP_CPU0_SPNIDEN_MASK)
-#define SYSCON_DEBUG_FEATURES_DP_CPU1_DBGEN_MASK (0x300U)
-#define SYSCON_DEBUG_FEATURES_DP_CPU1_DBGEN_SHIFT (8U)
-/*! CPU1_DBGEN - CPU1 Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_DP_CPU1_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_DP_CPU1_DBGEN_SHIFT)) & SYSCON_DEBUG_FEATURES_DP_CPU1_DBGEN_MASK)
-#define SYSCON_DEBUG_FEATURES_DP_CPU1_NIDEN_MASK (0xC00U)
-#define SYSCON_DEBUG_FEATURES_DP_CPU1_NIDEN_SHIFT (10U)
-/*! CPU1_NIDEN - CPU1 Non Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_DP_CPU1_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_DP_CPU1_NIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_DP_CPU1_NIDEN_MASK)
-/*! @} */
-
-/*! @name KEY_BLOCK - block quiddikey/PUF all index. */
-/*! @{ */
-#define SYSCON_KEY_BLOCK_KEY_BLOCK_MASK (0xFFFFFFFFU)
-#define SYSCON_KEY_BLOCK_KEY_BLOCK_SHIFT (0U)
-/*! KEY_BLOCK - Write a value to block quiddikey/PUF all index.
- */
-#define SYSCON_KEY_BLOCK_KEY_BLOCK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_KEY_BLOCK_KEY_BLOCK_SHIFT)) & SYSCON_KEY_BLOCK_KEY_BLOCK_MASK)
-/*! @} */
-
-/*! @name DEBUG_AUTH_BEACON - Debug authentication BEACON register */
-/*! @{ */
-#define SYSCON_DEBUG_AUTH_BEACON_BEACON_MASK (0xFFFFFFFFU)
-#define SYSCON_DEBUG_AUTH_BEACON_BEACON_SHIFT (0U)
-/*! BEACON - Set by the debug authentication code in ROM to pass the debug beacons (Credential
- * Beacon and Authentication Beacon) to application code.
- */
-#define SYSCON_DEBUG_AUTH_BEACON_BEACON(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_AUTH_BEACON_BEACON_SHIFT)) & SYSCON_DEBUG_AUTH_BEACON_BEACON_MASK)
-/*! @} */
-
-/*! @name CPUCFG - CPUs configuration register */
-/*! @{ */
-#define SYSCON_CPUCFG_CPU1ENABLE_MASK (0x4U)
-#define SYSCON_CPUCFG_CPU1ENABLE_SHIFT (2U)
-/*! CPU1ENABLE - Enable CPU1.
- * 0b0..CPU1 is disable (Processor in reset).
- * 0b1..CPU1 is enable.
- */
-#define SYSCON_CPUCFG_CPU1ENABLE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPUCFG_CPU1ENABLE_SHIFT)) & SYSCON_CPUCFG_CPU1ENABLE_MASK)
-/*! @} */
-
-/*! @name DEVICE_ID0 - Device ID */
-/*! @{ */
-#define SYSCON_DEVICE_ID0_ROM_REV_MINOR_MASK (0xF00000U)
-#define SYSCON_DEVICE_ID0_ROM_REV_MINOR_SHIFT (20U)
-/*! ROM_REV_MINOR - ROM revision.
- */
-#define SYSCON_DEVICE_ID0_ROM_REV_MINOR(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEVICE_ID0_ROM_REV_MINOR_SHIFT)) & SYSCON_DEVICE_ID0_ROM_REV_MINOR_MASK)
-/*! @} */
-
-/*! @name DIEID - Chip revision ID and Number */
-/*! @{ */
-#define SYSCON_DIEID_REV_ID_MASK (0xFU)
-#define SYSCON_DIEID_REV_ID_SHIFT (0U)
-/*! REV_ID - Chip Metal Revision ID.
- */
-#define SYSCON_DIEID_REV_ID(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DIEID_REV_ID_SHIFT)) & SYSCON_DIEID_REV_ID_MASK)
-#define SYSCON_DIEID_MCO_NUM_IN_DIE_ID_MASK (0xFFFFF0U)
-#define SYSCON_DIEID_MCO_NUM_IN_DIE_ID_SHIFT (4U)
-/*! MCO_NUM_IN_DIE_ID - Chip Number 0x426B.
- */
-#define SYSCON_DIEID_MCO_NUM_IN_DIE_ID(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DIEID_MCO_NUM_IN_DIE_ID_SHIFT)) & SYSCON_DIEID_MCO_NUM_IN_DIE_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group SYSCON_Register_Masks */
-
-
-/* SYSCON - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral SYSCON base address */
- #define SYSCON_BASE (0x50000000u)
- /** Peripheral SYSCON base address */
- #define SYSCON_BASE_NS (0x40000000u)
- /** Peripheral SYSCON base pointer */
- #define SYSCON ((SYSCON_Type *)SYSCON_BASE)
- /** Peripheral SYSCON base pointer */
- #define SYSCON_NS ((SYSCON_Type *)SYSCON_BASE_NS)
- /** Array initializer of SYSCON peripheral base addresses */
- #define SYSCON_BASE_ADDRS { SYSCON_BASE }
- /** Array initializer of SYSCON peripheral base pointers */
- #define SYSCON_BASE_PTRS { SYSCON }
- /** Array initializer of SYSCON peripheral base addresses */
- #define SYSCON_BASE_ADDRS_NS { SYSCON_BASE_NS }
- /** Array initializer of SYSCON peripheral base pointers */
- #define SYSCON_BASE_PTRS_NS { SYSCON_NS }
-#else
- /** Peripheral SYSCON base address */
- #define SYSCON_BASE (0x40000000u)
- /** Peripheral SYSCON base pointer */
- #define SYSCON ((SYSCON_Type *)SYSCON_BASE)
- /** Array initializer of SYSCON peripheral base addresses */
- #define SYSCON_BASE_ADDRS { SYSCON_BASE }
- /** Array initializer of SYSCON peripheral base pointers */
- #define SYSCON_BASE_PTRS { SYSCON }
-#endif
-
-/*!
- * @}
- */ /* end of group SYSCON_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- SYSCTL Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SYSCTL_Peripheral_Access_Layer SYSCTL Peripheral Access Layer
- * @{
- */
-
-/** SYSCTL - Register Layout Typedef */
-typedef struct {
- __IO uint32_t UPDATELCKOUT; /**< update lock out control, offset: 0x0 */
- uint8_t RESERVED_0[60];
- __IO uint32_t FCCTRLSEL[8]; /**< Selects the source for SCK going into Flexcomm 0..Selects the source for SCK going into Flexcomm 7, array offset: 0x40, array step: 0x4 */
- uint8_t RESERVED_1[32];
- __IO uint32_t SHAREDCTRLSET[2]; /**< Selects sources and data combinations for shared signal set 0...Selects sources and data combinations for shared signal set 1., array offset: 0x80, array step: 0x4 */
- uint8_t RESERVED_2[120];
- __I uint32_t USB_HS_STATUS; /**< Status register for USB HS, offset: 0x100 */
-} SYSCTL_Type;
-
-/* ----------------------------------------------------------------------------
- -- SYSCTL Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SYSCTL_Register_Masks SYSCTL Register Masks
- * @{
- */
-
-/*! @name UPDATELCKOUT - update lock out control */
-/*! @{ */
-#define SYSCTL_UPDATELCKOUT_UPDATELCKOUT_MASK (0x1U)
-#define SYSCTL_UPDATELCKOUT_UPDATELCKOUT_SHIFT (0U)
-/*! UPDATELCKOUT - All Registers
- * 0b0..Normal Mode. Can be written to.
- * 0b1..Protected Mode. Cannot be written to.
- */
-#define SYSCTL_UPDATELCKOUT_UPDATELCKOUT(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_UPDATELCKOUT_UPDATELCKOUT_SHIFT)) & SYSCTL_UPDATELCKOUT_UPDATELCKOUT_MASK)
-/*! @} */
-
-/*! @name FCCTRLSEL - Selects the source for SCK going into Flexcomm 0..Selects the source for SCK going into Flexcomm 7 */
-/*! @{ */
-#define SYSCTL_FCCTRLSEL_SCKINSEL_MASK (0x3U)
-#define SYSCTL_FCCTRLSEL_SCKINSEL_SHIFT (0U)
-/*! SCKINSEL - Selects the source for SCK going into this Flexcomm.
- * 0b00..Selects the dedicated FCn_SCK function for this Flexcomm.
- * 0b01..SCK is taken from shared signal set 0 (defined by SHAREDCTRLSET0).
- * 0b10..SCK is taken from shared signal set 1 (defined by SHAREDCTRLSET1).
- * 0b11..Reserved.
- */
-#define SYSCTL_FCCTRLSEL_SCKINSEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_FCCTRLSEL_SCKINSEL_SHIFT)) & SYSCTL_FCCTRLSEL_SCKINSEL_MASK)
-#define SYSCTL_FCCTRLSEL_WSINSEL_MASK (0x300U)
-#define SYSCTL_FCCTRLSEL_WSINSEL_SHIFT (8U)
-/*! WSINSEL - Selects the source for WS going into this Flexcomm.
- * 0b00..Selects the dedicated (FCn_TXD_SCL_MISO_WS) function for this Flexcomm.
- * 0b01..WS is taken from shared signal set 0 (defined by SHAREDCTRLSET0).
- * 0b10..WS is taken from shared signal set 1 (defined by SHAREDCTRLSET1).
- * 0b11..Reserved.
- */
-#define SYSCTL_FCCTRLSEL_WSINSEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_FCCTRLSEL_WSINSEL_SHIFT)) & SYSCTL_FCCTRLSEL_WSINSEL_MASK)
-#define SYSCTL_FCCTRLSEL_DATAINSEL_MASK (0x30000U)
-#define SYSCTL_FCCTRLSEL_DATAINSEL_SHIFT (16U)
-/*! DATAINSEL - Selects the source for DATA input to this Flexcomm.
- * 0b00..Selects the dedicated FCn_RXD_SDA_MOSI_DATA input for this Flexcomm.
- * 0b01..Input data is taken from shared signal set 0 (defined by SHAREDCTRLSET0).
- * 0b10..Input data is taken from shared signal set 1 (defined by SHAREDCTRLSET1).
- * 0b11..Reserved.
- */
-#define SYSCTL_FCCTRLSEL_DATAINSEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_FCCTRLSEL_DATAINSEL_SHIFT)) & SYSCTL_FCCTRLSEL_DATAINSEL_MASK)
-#define SYSCTL_FCCTRLSEL_DATAOUTSEL_MASK (0x3000000U)
-#define SYSCTL_FCCTRLSEL_DATAOUTSEL_SHIFT (24U)
-/*! DATAOUTSEL - Selects the source for DATA output from this Flexcomm.
- * 0b00..Selects the dedicated FCn_RXD_SDA_MOSI_DATA output from this Flexcomm.
- * 0b01..Output data is taken from shared signal set 0 (defined by SHAREDCTRLSET0).
- * 0b10..Output data is taken from shared signal set 1 (defined by SHAREDCTRLSET1).
- * 0b11..Reserved.
- */
-#define SYSCTL_FCCTRLSEL_DATAOUTSEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_FCCTRLSEL_DATAOUTSEL_SHIFT)) & SYSCTL_FCCTRLSEL_DATAOUTSEL_MASK)
-/*! @} */
-
-/* The count of SYSCTL_FCCTRLSEL */
-#define SYSCTL_FCCTRLSEL_COUNT (8U)
-
-/*! @name SHAREDCTRLSET - Selects sources and data combinations for shared signal set 0...Selects sources and data combinations for shared signal set 1. */
-/*! @{ */
-#define SYSCTL_SHAREDCTRLSET_SHAREDSCKSEL_MASK (0x7U)
-#define SYSCTL_SHAREDCTRLSET_SHAREDSCKSEL_SHIFT (0U)
-/*! SHAREDSCKSEL - Selects the source for SCK of this shared signal set.
- * 0b000..SCK for this shared signal set comes from Flexcomm 0.
- * 0b001..SCK for this shared signal set comes from Flexcomm 1.
- * 0b010..SCK for this shared signal set comes from Flexcomm 2.
- * 0b011..SCK for this shared signal set comes from Flexcomm 3.
- * 0b100..SCK for this shared signal set comes from Flexcomm 4.
- * 0b101..SCK for this shared signal set comes from Flexcomm 5.
- * 0b110..SCK for this shared signal set comes from Flexcomm 6.
- * 0b111..SCK for this shared signal set comes from Flexcomm 7.
- */
-#define SYSCTL_SHAREDCTRLSET_SHAREDSCKSEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_SHAREDSCKSEL_SHIFT)) & SYSCTL_SHAREDCTRLSET_SHAREDSCKSEL_MASK)
-#define SYSCTL_SHAREDCTRLSET_SHAREDWSSEL_MASK (0x70U)
-#define SYSCTL_SHAREDCTRLSET_SHAREDWSSEL_SHIFT (4U)
-/*! SHAREDWSSEL - Selects the source for WS of this shared signal set.
- * 0b000..WS for this shared signal set comes from Flexcomm 0.
- * 0b001..WS for this shared signal set comes from Flexcomm 1.
- * 0b010..WS for this shared signal set comes from Flexcomm 2.
- * 0b011..WS for this shared signal set comes from Flexcomm 3.
- * 0b100..WS for this shared signal set comes from Flexcomm 4.
- * 0b101..WS for this shared signal set comes from Flexcomm 5.
- * 0b110..WS for this shared signal set comes from Flexcomm 6.
- * 0b111..WS for this shared signal set comes from Flexcomm 7.
- */
-#define SYSCTL_SHAREDCTRLSET_SHAREDWSSEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_SHAREDWSSEL_SHIFT)) & SYSCTL_SHAREDCTRLSET_SHAREDWSSEL_MASK)
-#define SYSCTL_SHAREDCTRLSET_SHAREDDATASEL_MASK (0x700U)
-#define SYSCTL_SHAREDCTRLSET_SHAREDDATASEL_SHIFT (8U)
-/*! SHAREDDATASEL - Selects the source for DATA input for this shared signal set.
- * 0b000..DATA input for this shared signal set comes from Flexcomm 0.
- * 0b001..DATA input for this shared signal set comes from Flexcomm 1.
- * 0b010..DATA input for this shared signal set comes from Flexcomm 2.
- * 0b011..DATA input for this shared signal set comes from Flexcomm 3.
- * 0b100..DATA input for this shared signal set comes from Flexcomm 4.
- * 0b101..DATA input for this shared signal set comes from Flexcomm 5.
- * 0b110..DATA input for this shared signal set comes from Flexcomm 6.
- * 0b111..DATA input for this shared signal set comes from Flexcomm 7.
- */
-#define SYSCTL_SHAREDCTRLSET_SHAREDDATASEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_SHAREDDATASEL_SHIFT)) & SYSCTL_SHAREDCTRLSET_SHAREDDATASEL_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC0DATAOUTEN_MASK (0x10000U)
-#define SYSCTL_SHAREDCTRLSET_FC0DATAOUTEN_SHIFT (16U)
-/*! FC0DATAOUTEN - Controls FC0 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC0 does not contribute to this shared set.
- * 0b1..Data output from FC0 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC0DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC0DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC0DATAOUTEN_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC1DATAOUTEN_MASK (0x20000U)
-#define SYSCTL_SHAREDCTRLSET_FC1DATAOUTEN_SHIFT (17U)
-/*! FC1DATAOUTEN - Controls FC1 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC1 does not contribute to this shared set.
- * 0b1..Data output from FC1 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC1DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC1DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC1DATAOUTEN_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC2DATAOUTEN_MASK (0x40000U)
-#define SYSCTL_SHAREDCTRLSET_FC2DATAOUTEN_SHIFT (18U)
-/*! FC2DATAOUTEN - Controls FC2 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC2 does not contribute to this shared set.
- * 0b1..Data output from FC2 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC2DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC2DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC2DATAOUTEN_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC4DATAOUTEN_MASK (0x100000U)
-#define SYSCTL_SHAREDCTRLSET_FC4DATAOUTEN_SHIFT (20U)
-/*! FC4DATAOUTEN - Controls FC4 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC4 does not contribute to this shared set.
- * 0b1..Data output from FC4 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC4DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC4DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC4DATAOUTEN_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC5DATAOUTEN_MASK (0x200000U)
-#define SYSCTL_SHAREDCTRLSET_FC5DATAOUTEN_SHIFT (21U)
-/*! FC5DATAOUTEN - Controls FC5 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC5 does not contribute to this shared set.
- * 0b1..Data output from FC5 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC5DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC5DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC5DATAOUTEN_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC6DATAOUTEN_MASK (0x400000U)
-#define SYSCTL_SHAREDCTRLSET_FC6DATAOUTEN_SHIFT (22U)
-/*! FC6DATAOUTEN - Controls FC6 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC6 does not contribute to this shared set.
- * 0b1..Data output from FC6 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC6DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC6DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC6DATAOUTEN_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC7DATAOUTEN_MASK (0x800000U)
-#define SYSCTL_SHAREDCTRLSET_FC7DATAOUTEN_SHIFT (23U)
-/*! FC7DATAOUTEN - Controls FC7 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC7 does not contribute to this shared set.
- * 0b1..Data output from FC7 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC7DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC7DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC7DATAOUTEN_MASK)
-/*! @} */
-
-/* The count of SYSCTL_SHAREDCTRLSET */
-#define SYSCTL_SHAREDCTRLSET_COUNT (2U)
-
-/*! @name USB_HS_STATUS - Status register for USB HS */
-/*! @{ */
-#define SYSCTL_USB_HS_STATUS_USBHS_3V_NOK_MASK (0x1U)
-#define SYSCTL_USB_HS_STATUS_USBHS_3V_NOK_SHIFT (0U)
-/*! USBHS_3V_NOK - USB_HS: Low voltage detection on 3.3V supply.
- * 0b0..3v3 supply is good.
- * 0b1..3v3 supply is too low.
- */
-#define SYSCTL_USB_HS_STATUS_USBHS_3V_NOK(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_USB_HS_STATUS_USBHS_3V_NOK_SHIFT)) & SYSCTL_USB_HS_STATUS_USBHS_3V_NOK_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group SYSCTL_Register_Masks */
-
-
-/* SYSCTL - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral SYSCTL base address */
- #define SYSCTL_BASE (0x50023000u)
- /** Peripheral SYSCTL base address */
- #define SYSCTL_BASE_NS (0x40023000u)
- /** Peripheral SYSCTL base pointer */
- #define SYSCTL ((SYSCTL_Type *)SYSCTL_BASE)
- /** Peripheral SYSCTL base pointer */
- #define SYSCTL_NS ((SYSCTL_Type *)SYSCTL_BASE_NS)
- /** Array initializer of SYSCTL peripheral base addresses */
- #define SYSCTL_BASE_ADDRS { SYSCTL_BASE }
- /** Array initializer of SYSCTL peripheral base pointers */
- #define SYSCTL_BASE_PTRS { SYSCTL }
- /** Array initializer of SYSCTL peripheral base addresses */
- #define SYSCTL_BASE_ADDRS_NS { SYSCTL_BASE_NS }
- /** Array initializer of SYSCTL peripheral base pointers */
- #define SYSCTL_BASE_PTRS_NS { SYSCTL_NS }
-#else
- /** Peripheral SYSCTL base address */
- #define SYSCTL_BASE (0x40023000u)
- /** Peripheral SYSCTL base pointer */
- #define SYSCTL ((SYSCTL_Type *)SYSCTL_BASE)
- /** Array initializer of SYSCTL peripheral base addresses */
- #define SYSCTL_BASE_ADDRS { SYSCTL_BASE }
- /** Array initializer of SYSCTL peripheral base pointers */
- #define SYSCTL_BASE_PTRS { SYSCTL }
-#endif
-
-/*!
- * @}
- */ /* end of group SYSCTL_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- USART Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USART_Peripheral_Access_Layer USART Peripheral Access Layer
- * @{
- */
-
-/** USART - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CFG; /**< USART Configuration register. Basic USART configuration settings that typically are not changed during operation., offset: 0x0 */
- __IO uint32_t CTL; /**< USART Control register. USART control settings that are more likely to change during operation., offset: 0x4 */
- __IO uint32_t STAT; /**< USART Status register. The complete status value can be read here. Writing ones clears some bits in the register. Some bits can be cleared by writing a 1 to them., offset: 0x8 */
- __IO uint32_t INTENSET; /**< Interrupt Enable read and Set register for USART (not FIFO) status. Contains individual interrupt enable bits for each potential USART interrupt. A complete value may be read from this register. Writing a 1 to any implemented bit position causes that bit to be set., offset: 0xC */
- __O uint32_t INTENCLR; /**< Interrupt Enable Clear register. Allows clearing any combination of bits in the INTENSET register. Writing a 1 to any implemented bit position causes the corresponding bit to be cleared., offset: 0x10 */
- uint8_t RESERVED_0[12];
- __IO uint32_t BRG; /**< Baud Rate Generator register. 16-bit integer baud rate divisor value., offset: 0x20 */
- __I uint32_t INTSTAT; /**< Interrupt status register. Reflects interrupts that are currently enabled., offset: 0x24 */
- __IO uint32_t OSR; /**< Oversample selection register for asynchronous communication., offset: 0x28 */
- __IO uint32_t ADDR; /**< Address register for automatic address matching., offset: 0x2C */
- uint8_t RESERVED_1[3536];
- __IO uint32_t FIFOCFG; /**< FIFO configuration and enable register., offset: 0xE00 */
- __IO uint32_t FIFOSTAT; /**< FIFO status register., offset: 0xE04 */
- __IO uint32_t FIFOTRIG; /**< FIFO trigger settings for interrupt and DMA request., offset: 0xE08 */
- uint8_t RESERVED_2[4];
- __IO uint32_t FIFOINTENSET; /**< FIFO interrupt enable set (enable) and read register., offset: 0xE10 */
- __IO uint32_t FIFOINTENCLR; /**< FIFO interrupt enable clear (disable) and read register., offset: 0xE14 */
- __I uint32_t FIFOINTSTAT; /**< FIFO interrupt status register., offset: 0xE18 */
- uint8_t RESERVED_3[4];
- __O uint32_t FIFOWR; /**< FIFO write data., offset: 0xE20 */
- uint8_t RESERVED_4[12];
- __I uint32_t FIFORD; /**< FIFO read data., offset: 0xE30 */
- uint8_t RESERVED_5[12];
- __I uint32_t FIFORDNOPOP; /**< FIFO data read with no FIFO pop., offset: 0xE40 */
- uint8_t RESERVED_6[440];
- __I uint32_t ID; /**< Peripheral identification register., offset: 0xFFC */
-} USART_Type;
-
-/* ----------------------------------------------------------------------------
- -- USART Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USART_Register_Masks USART Register Masks
- * @{
- */
-
-/*! @name CFG - USART Configuration register. Basic USART configuration settings that typically are not changed during operation. */
-/*! @{ */
-#define USART_CFG_ENABLE_MASK (0x1U)
-#define USART_CFG_ENABLE_SHIFT (0U)
-/*! ENABLE - USART Enable.
- * 0b0..Disabled. The USART is disabled and the internal state machine and counters are reset. While Enable = 0,
- * all USART interrupts and DMA transfers are disabled. When Enable is set again, CFG and most other control
- * bits remain unchanged. When re-enabled, the USART will immediately be ready to transmit because the
- * transmitter has been reset and is therefore available.
- * 0b1..Enabled. The USART is enabled for operation.
- */
-#define USART_CFG_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_ENABLE_SHIFT)) & USART_CFG_ENABLE_MASK)
-#define USART_CFG_DATALEN_MASK (0xCU)
-#define USART_CFG_DATALEN_SHIFT (2U)
-/*! DATALEN - Selects the data size for the USART.
- * 0b00..7 bit Data length.
- * 0b01..8 bit Data length.
- * 0b10..9 bit data length. The 9th bit is commonly used for addressing in multidrop mode. See the ADDRDET bit in the CTL register.
- * 0b11..Reserved.
- */
-#define USART_CFG_DATALEN(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_DATALEN_SHIFT)) & USART_CFG_DATALEN_MASK)
-#define USART_CFG_PARITYSEL_MASK (0x30U)
-#define USART_CFG_PARITYSEL_SHIFT (4U)
-/*! PARITYSEL - Selects what type of parity is used by the USART.
- * 0b00..No parity.
- * 0b01..Reserved.
- * 0b10..Even parity. Adds a bit to each character such that the number of 1s in a transmitted character is even,
- * and the number of 1s in a received character is expected to be even.
- * 0b11..Odd parity. Adds a bit to each character such that the number of 1s in a transmitted character is odd,
- * and the number of 1s in a received character is expected to be odd.
- */
-#define USART_CFG_PARITYSEL(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_PARITYSEL_SHIFT)) & USART_CFG_PARITYSEL_MASK)
-#define USART_CFG_STOPLEN_MASK (0x40U)
-#define USART_CFG_STOPLEN_SHIFT (6U)
-/*! STOPLEN - Number of stop bits appended to transmitted data. Only a single stop bit is required for received data.
- * 0b0..1 stop bit.
- * 0b1..2 stop bits. This setting should only be used for asynchronous communication.
- */
-#define USART_CFG_STOPLEN(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_STOPLEN_SHIFT)) & USART_CFG_STOPLEN_MASK)
-#define USART_CFG_MODE32K_MASK (0x80U)
-#define USART_CFG_MODE32K_SHIFT (7U)
-/*! MODE32K - Selects standard or 32 kHz clocking mode.
- * 0b0..Disabled. USART uses standard clocking.
- * 0b1..Enabled. USART uses the 32 kHz clock from the RTC oscillator as the clock source to the BRG, and uses a special bit clocking scheme.
- */
-#define USART_CFG_MODE32K(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_MODE32K_SHIFT)) & USART_CFG_MODE32K_MASK)
-#define USART_CFG_LINMODE_MASK (0x100U)
-#define USART_CFG_LINMODE_SHIFT (8U)
-/*! LINMODE - LIN break mode enable.
- * 0b0..Disabled. Break detect and generate is configured for normal operation.
- * 0b1..Enabled. Break detect and generate is configured for LIN bus operation.
- */
-#define USART_CFG_LINMODE(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_LINMODE_SHIFT)) & USART_CFG_LINMODE_MASK)
-#define USART_CFG_CTSEN_MASK (0x200U)
-#define USART_CFG_CTSEN_SHIFT (9U)
-/*! CTSEN - CTS Enable. Determines whether CTS is used for flow control. CTS can be from the input
- * pin, or from the USART's own RTS if loopback mode is enabled.
- * 0b0..No flow control. The transmitter does not receive any automatic flow control signal.
- * 0b1..Flow control enabled. The transmitter uses the CTS input (or RTS output in loopback mode) for flow control purposes.
- */
-#define USART_CFG_CTSEN(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_CTSEN_SHIFT)) & USART_CFG_CTSEN_MASK)
-#define USART_CFG_SYNCEN_MASK (0x800U)
-#define USART_CFG_SYNCEN_SHIFT (11U)
-/*! SYNCEN - Selects synchronous or asynchronous operation.
- * 0b0..Asynchronous mode.
- * 0b1..Synchronous mode.
- */
-#define USART_CFG_SYNCEN(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_SYNCEN_SHIFT)) & USART_CFG_SYNCEN_MASK)
-#define USART_CFG_CLKPOL_MASK (0x1000U)
-#define USART_CFG_CLKPOL_SHIFT (12U)
-/*! CLKPOL - Selects the clock polarity and sampling edge of received data in synchronous mode.
- * 0b0..Falling edge. Un_RXD is sampled on the falling edge of SCLK.
- * 0b1..Rising edge. Un_RXD is sampled on the rising edge of SCLK.
- */
-#define USART_CFG_CLKPOL(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_CLKPOL_SHIFT)) & USART_CFG_CLKPOL_MASK)
-#define USART_CFG_SYNCMST_MASK (0x4000U)
-#define USART_CFG_SYNCMST_SHIFT (14U)
-/*! SYNCMST - Synchronous mode Master select.
- * 0b0..Slave. When synchronous mode is enabled, the USART is a slave.
- * 0b1..Master. When synchronous mode is enabled, the USART is a master.
- */
-#define USART_CFG_SYNCMST(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_SYNCMST_SHIFT)) & USART_CFG_SYNCMST_MASK)
-#define USART_CFG_LOOP_MASK (0x8000U)
-#define USART_CFG_LOOP_SHIFT (15U)
-/*! LOOP - Selects data loopback mode.
- * 0b0..Normal operation.
- * 0b1..Loopback mode. This provides a mechanism to perform diagnostic loopback testing for USART data. Serial
- * data from the transmitter (Un_TXD) is connected internally to serial input of the receive (Un_RXD). Un_TXD
- * and Un_RTS activity will also appear on external pins if these functions are configured to appear on device
- * pins. The receiver RTS signal is also looped back to CTS and performs flow control if enabled by CTSEN.
- */
-#define USART_CFG_LOOP(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_LOOP_SHIFT)) & USART_CFG_LOOP_MASK)
-#define USART_CFG_OETA_MASK (0x40000U)
-#define USART_CFG_OETA_SHIFT (18U)
-/*! OETA - Output Enable Turnaround time enable for RS-485 operation.
- * 0b0..Disabled. If selected by OESEL, the Output Enable signal deasserted at the end of the last stop bit of a transmission.
- * 0b1..Enabled. If selected by OESEL, the Output Enable signal remains asserted for one character time after the
- * end of the last stop bit of a transmission. OE will also remain asserted if another transmit begins
- * before it is deasserted.
- */
-#define USART_CFG_OETA(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_OETA_SHIFT)) & USART_CFG_OETA_MASK)
-#define USART_CFG_AUTOADDR_MASK (0x80000U)
-#define USART_CFG_AUTOADDR_SHIFT (19U)
-/*! AUTOADDR - Automatic Address matching enable.
- * 0b0..Disabled. When addressing is enabled by ADDRDET, address matching is done by software. This provides the
- * possibility of versatile addressing (e.g. respond to more than one address).
- * 0b1..Enabled. When addressing is enabled by ADDRDET, address matching is done by hardware, using the value in
- * the ADDR register as the address to match.
- */
-#define USART_CFG_AUTOADDR(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_AUTOADDR_SHIFT)) & USART_CFG_AUTOADDR_MASK)
-#define USART_CFG_OESEL_MASK (0x100000U)
-#define USART_CFG_OESEL_SHIFT (20U)
-/*! OESEL - Output Enable Select.
- * 0b0..Standard. The RTS signal is used as the standard flow control function.
- * 0b1..RS-485. The RTS signal configured to provide an output enable signal to control an RS-485 transceiver.
- */
-#define USART_CFG_OESEL(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_OESEL_SHIFT)) & USART_CFG_OESEL_MASK)
-#define USART_CFG_OEPOL_MASK (0x200000U)
-#define USART_CFG_OEPOL_SHIFT (21U)
-/*! OEPOL - Output Enable Polarity.
- * 0b0..Low. If selected by OESEL, the output enable is active low.
- * 0b1..High. If selected by OESEL, the output enable is active high.
- */
-#define USART_CFG_OEPOL(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_OEPOL_SHIFT)) & USART_CFG_OEPOL_MASK)
-#define USART_CFG_RXPOL_MASK (0x400000U)
-#define USART_CFG_RXPOL_SHIFT (22U)
-/*! RXPOL - Receive data polarity.
- * 0b0..Standard. The RX signal is used as it arrives from the pin. This means that the RX rest value is 1, start
- * bit is 0, data is not inverted, and the stop bit is 1.
- * 0b1..Inverted. The RX signal is inverted before being used by the USART. This means that the RX rest value is
- * 0, start bit is 1, data is inverted, and the stop bit is 0.
- */
-#define USART_CFG_RXPOL(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_RXPOL_SHIFT)) & USART_CFG_RXPOL_MASK)
-#define USART_CFG_TXPOL_MASK (0x800000U)
-#define USART_CFG_TXPOL_SHIFT (23U)
-/*! TXPOL - Transmit data polarity.
- * 0b0..Standard. The TX signal is sent out without change. This means that the TX rest value is 1, start bit is
- * 0, data is not inverted, and the stop bit is 1.
- * 0b1..Inverted. The TX signal is inverted by the USART before being sent out. This means that the TX rest value
- * is 0, start bit is 1, data is inverted, and the stop bit is 0.
- */
-#define USART_CFG_TXPOL(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_TXPOL_SHIFT)) & USART_CFG_TXPOL_MASK)
-/*! @} */
-
-/*! @name CTL - USART Control register. USART control settings that are more likely to change during operation. */
-/*! @{ */
-#define USART_CTL_TXBRKEN_MASK (0x2U)
-#define USART_CTL_TXBRKEN_SHIFT (1U)
-/*! TXBRKEN - Break Enable.
- * 0b0..Normal operation.
- * 0b1..Continuous break. Continuous break is sent immediately when this bit is set, and remains until this bit
- * is cleared. A break may be sent without danger of corrupting any currently transmitting character if the
- * transmitter is first disabled (TXDIS in CTL is set) and then waiting for the transmitter to be disabled
- * (TXDISINT in STAT = 1) before writing 1 to TXBRKEN.
- */
-#define USART_CTL_TXBRKEN(x) (((uint32_t)(((uint32_t)(x)) << USART_CTL_TXBRKEN_SHIFT)) & USART_CTL_TXBRKEN_MASK)
-#define USART_CTL_ADDRDET_MASK (0x4U)
-#define USART_CTL_ADDRDET_SHIFT (2U)
-/*! ADDRDET - Enable address detect mode.
- * 0b0..Disabled. The USART presents all incoming data.
- * 0b1..Enabled. The USART receiver ignores incoming data that does not have the most significant bit of the data
- * (typically the 9th bit) = 1. When the data MSB bit = 1, the receiver treats the incoming data normally,
- * generating a received data interrupt. Software can then check the data to see if this is an address that
- * should be handled. If it is, the ADDRDET bit is cleared by software and further incoming data is handled
- * normally.
- */
-#define USART_CTL_ADDRDET(x) (((uint32_t)(((uint32_t)(x)) << USART_CTL_ADDRDET_SHIFT)) & USART_CTL_ADDRDET_MASK)
-#define USART_CTL_TXDIS_MASK (0x40U)
-#define USART_CTL_TXDIS_SHIFT (6U)
-/*! TXDIS - Transmit Disable.
- * 0b0..Not disabled. USART transmitter is not disabled.
- * 0b1..Disabled. USART transmitter is disabled after any character currently being transmitted is complete. This
- * feature can be used to facilitate software flow control.
- */
-#define USART_CTL_TXDIS(x) (((uint32_t)(((uint32_t)(x)) << USART_CTL_TXDIS_SHIFT)) & USART_CTL_TXDIS_MASK)
-#define USART_CTL_CC_MASK (0x100U)
-#define USART_CTL_CC_SHIFT (8U)
-/*! CC - Continuous Clock generation. By default, SCLK is only output while data is being transmitted in synchronous mode.
- * 0b0..Clock on character. In synchronous mode, SCLK cycles only when characters are being sent on Un_TXD or to
- * complete a character that is being received.
- * 0b1..Continuous clock. SCLK runs continuously in synchronous mode, allowing characters to be received on
- * Un_RxD independently from transmission on Un_TXD).
- */
-#define USART_CTL_CC(x) (((uint32_t)(((uint32_t)(x)) << USART_CTL_CC_SHIFT)) & USART_CTL_CC_MASK)
-#define USART_CTL_CLRCCONRX_MASK (0x200U)
-#define USART_CTL_CLRCCONRX_SHIFT (9U)
-/*! CLRCCONRX - Clear Continuous Clock.
- * 0b0..No effect. No effect on the CC bit.
- * 0b1..Auto-clear. The CC bit is automatically cleared when a complete character has been received. This bit is cleared at the same time.
- */
-#define USART_CTL_CLRCCONRX(x) (((uint32_t)(((uint32_t)(x)) << USART_CTL_CLRCCONRX_SHIFT)) & USART_CTL_CLRCCONRX_MASK)
-#define USART_CTL_AUTOBAUD_MASK (0x10000U)
-#define USART_CTL_AUTOBAUD_SHIFT (16U)
-/*! AUTOBAUD - Autobaud enable.
- * 0b0..Disabled. USART is in normal operating mode.
- * 0b1..Enabled. USART is in autobaud mode. This bit should only be set when the USART receiver is idle. The
- * first start bit of RX is measured and used the update the BRG register to match the received data rate.
- * AUTOBAUD is cleared once this process is complete, or if there is an AERR.
- */
-#define USART_CTL_AUTOBAUD(x) (((uint32_t)(((uint32_t)(x)) << USART_CTL_AUTOBAUD_SHIFT)) & USART_CTL_AUTOBAUD_MASK)
-/*! @} */
-
-/*! @name STAT - USART Status register. The complete status value can be read here. Writing ones clears some bits in the register. Some bits can be cleared by writing a 1 to them. */
-/*! @{ */
-#define USART_STAT_RXIDLE_MASK (0x2U)
-#define USART_STAT_RXIDLE_SHIFT (1U)
-/*! RXIDLE - Receiver Idle. When 0, indicates that the receiver is currently in the process of
- * receiving data. When 1, indicates that the receiver is not currently in the process of receiving
- * data.
- */
-#define USART_STAT_RXIDLE(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_RXIDLE_SHIFT)) & USART_STAT_RXIDLE_MASK)
-#define USART_STAT_TXIDLE_MASK (0x8U)
-#define USART_STAT_TXIDLE_SHIFT (3U)
-/*! TXIDLE - Transmitter Idle. When 0, indicates that the transmitter is currently in the process of
- * sending data.When 1, indicate that the transmitter is not currently in the process of sending
- * data.
- */
-#define USART_STAT_TXIDLE(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_TXIDLE_SHIFT)) & USART_STAT_TXIDLE_MASK)
-#define USART_STAT_CTS_MASK (0x10U)
-#define USART_STAT_CTS_SHIFT (4U)
-/*! CTS - This bit reflects the current state of the CTS signal, regardless of the setting of the
- * CTSEN bit in the CFG register. This will be the value of the CTS input pin unless loopback mode
- * is enabled.
- */
-#define USART_STAT_CTS(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_CTS_SHIFT)) & USART_STAT_CTS_MASK)
-#define USART_STAT_DELTACTS_MASK (0x20U)
-#define USART_STAT_DELTACTS_SHIFT (5U)
-/*! DELTACTS - This bit is set when a change in the state is detected for the CTS flag above. This bit is cleared by software.
- */
-#define USART_STAT_DELTACTS(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_DELTACTS_SHIFT)) & USART_STAT_DELTACTS_MASK)
-#define USART_STAT_TXDISSTAT_MASK (0x40U)
-#define USART_STAT_TXDISSTAT_SHIFT (6U)
-/*! TXDISSTAT - Transmitter Disabled Status flag. When 1, this bit indicates that the USART
- * transmitter is fully idle after being disabled via the TXDIS bit in the CFG register (TXDIS = 1).
- */
-#define USART_STAT_TXDISSTAT(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_TXDISSTAT_SHIFT)) & USART_STAT_TXDISSTAT_MASK)
-#define USART_STAT_RXBRK_MASK (0x400U)
-#define USART_STAT_RXBRK_SHIFT (10U)
-/*! RXBRK - Received Break. This bit reflects the current state of the receiver break detection
- * logic. It is set when the Un_RXD pin remains low for 16 bit times. Note that FRAMERRINT will also
- * be set when this condition occurs because the stop bit(s) for the character would be missing.
- * RXBRK is cleared when the Un_RXD pin goes high.
- */
-#define USART_STAT_RXBRK(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_RXBRK_SHIFT)) & USART_STAT_RXBRK_MASK)
-#define USART_STAT_DELTARXBRK_MASK (0x800U)
-#define USART_STAT_DELTARXBRK_SHIFT (11U)
-/*! DELTARXBRK - This bit is set when a change in the state of receiver break detection occurs. Cleared by software.
- */
-#define USART_STAT_DELTARXBRK(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_DELTARXBRK_SHIFT)) & USART_STAT_DELTARXBRK_MASK)
-#define USART_STAT_START_MASK (0x1000U)
-#define USART_STAT_START_SHIFT (12U)
-/*! START - This bit is set when a start is detected on the receiver input. Its purpose is primarily
- * to allow wake-up from Deep-sleep or Power-down mode immediately when a start is detected.
- * Cleared by software.
- */
-#define USART_STAT_START(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_START_SHIFT)) & USART_STAT_START_MASK)
-#define USART_STAT_FRAMERRINT_MASK (0x2000U)
-#define USART_STAT_FRAMERRINT_SHIFT (13U)
-/*! FRAMERRINT - Framing Error interrupt flag. This flag is set when a character is received with a
- * missing stop bit at the expected location. This could be an indication of a baud rate or
- * configuration mismatch with the transmitting source.
- */
-#define USART_STAT_FRAMERRINT(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_FRAMERRINT_SHIFT)) & USART_STAT_FRAMERRINT_MASK)
-#define USART_STAT_PARITYERRINT_MASK (0x4000U)
-#define USART_STAT_PARITYERRINT_SHIFT (14U)
-/*! PARITYERRINT - Parity Error interrupt flag. This flag is set when a parity error is detected in a received character.
- */
-#define USART_STAT_PARITYERRINT(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_PARITYERRINT_SHIFT)) & USART_STAT_PARITYERRINT_MASK)
-#define USART_STAT_RXNOISEINT_MASK (0x8000U)
-#define USART_STAT_RXNOISEINT_SHIFT (15U)
-/*! RXNOISEINT - Received Noise interrupt flag. Three samples of received data are taken in order to
- * determine the value of each received data bit, except in synchronous mode. This acts as a
- * noise filter if one sample disagrees. This flag is set when a received data bit contains one
- * disagreeing sample. This could indicate line noise, a baud rate or character format mismatch, or
- * loss of synchronization during data reception.
- */
-#define USART_STAT_RXNOISEINT(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_RXNOISEINT_SHIFT)) & USART_STAT_RXNOISEINT_MASK)
-#define USART_STAT_ABERR_MASK (0x10000U)
-#define USART_STAT_ABERR_SHIFT (16U)
-/*! ABERR - Auto baud Error. An auto baud error can occur if the BRG counts to its limit before the
- * end of the start bit that is being measured, essentially an auto baud time-out.
- */
-#define USART_STAT_ABERR(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_ABERR_SHIFT)) & USART_STAT_ABERR_MASK)
-/*! @} */
-
-/*! @name INTENSET - Interrupt Enable read and Set register for USART (not FIFO) status. Contains individual interrupt enable bits for each potential USART interrupt. A complete value may be read from this register. Writing a 1 to any implemented bit position causes that bit to be set. */
-/*! @{ */
-#define USART_INTENSET_TXIDLEEN_MASK (0x8U)
-#define USART_INTENSET_TXIDLEEN_SHIFT (3U)
-/*! TXIDLEEN - When 1, enables an interrupt when the transmitter becomes idle (TXIDLE = 1).
- */
-#define USART_INTENSET_TXIDLEEN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_TXIDLEEN_SHIFT)) & USART_INTENSET_TXIDLEEN_MASK)
-#define USART_INTENSET_DELTACTSEN_MASK (0x20U)
-#define USART_INTENSET_DELTACTSEN_SHIFT (5U)
-/*! DELTACTSEN - When 1, enables an interrupt when there is a change in the state of the CTS input.
- */
-#define USART_INTENSET_DELTACTSEN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_DELTACTSEN_SHIFT)) & USART_INTENSET_DELTACTSEN_MASK)
-#define USART_INTENSET_TXDISEN_MASK (0x40U)
-#define USART_INTENSET_TXDISEN_SHIFT (6U)
-/*! TXDISEN - When 1, enables an interrupt when the transmitter is fully disabled as indicated by
- * the TXDISINT flag in STAT. See description of the TXDISINT bit for details.
- */
-#define USART_INTENSET_TXDISEN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_TXDISEN_SHIFT)) & USART_INTENSET_TXDISEN_MASK)
-#define USART_INTENSET_DELTARXBRKEN_MASK (0x800U)
-#define USART_INTENSET_DELTARXBRKEN_SHIFT (11U)
-/*! DELTARXBRKEN - When 1, enables an interrupt when a change of state has occurred in the detection
- * of a received break condition (break condition asserted or deasserted).
- */
-#define USART_INTENSET_DELTARXBRKEN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_DELTARXBRKEN_SHIFT)) & USART_INTENSET_DELTARXBRKEN_MASK)
-#define USART_INTENSET_STARTEN_MASK (0x1000U)
-#define USART_INTENSET_STARTEN_SHIFT (12U)
-/*! STARTEN - When 1, enables an interrupt when a received start bit has been detected.
- */
-#define USART_INTENSET_STARTEN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_STARTEN_SHIFT)) & USART_INTENSET_STARTEN_MASK)
-#define USART_INTENSET_FRAMERREN_MASK (0x2000U)
-#define USART_INTENSET_FRAMERREN_SHIFT (13U)
-/*! FRAMERREN - When 1, enables an interrupt when a framing error has been detected.
- */
-#define USART_INTENSET_FRAMERREN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_FRAMERREN_SHIFT)) & USART_INTENSET_FRAMERREN_MASK)
-#define USART_INTENSET_PARITYERREN_MASK (0x4000U)
-#define USART_INTENSET_PARITYERREN_SHIFT (14U)
-/*! PARITYERREN - When 1, enables an interrupt when a parity error has been detected.
- */
-#define USART_INTENSET_PARITYERREN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_PARITYERREN_SHIFT)) & USART_INTENSET_PARITYERREN_MASK)
-#define USART_INTENSET_RXNOISEEN_MASK (0x8000U)
-#define USART_INTENSET_RXNOISEEN_SHIFT (15U)
-/*! RXNOISEEN - When 1, enables an interrupt when noise is detected. See description of the RXNOISEINT bit in Table 354.
- */
-#define USART_INTENSET_RXNOISEEN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_RXNOISEEN_SHIFT)) & USART_INTENSET_RXNOISEEN_MASK)
-#define USART_INTENSET_ABERREN_MASK (0x10000U)
-#define USART_INTENSET_ABERREN_SHIFT (16U)
-/*! ABERREN - When 1, enables an interrupt when an auto baud error occurs.
- */
-#define USART_INTENSET_ABERREN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_ABERREN_SHIFT)) & USART_INTENSET_ABERREN_MASK)
-/*! @} */
-
-/*! @name INTENCLR - Interrupt Enable Clear register. Allows clearing any combination of bits in the INTENSET register. Writing a 1 to any implemented bit position causes the corresponding bit to be cleared. */
-/*! @{ */
-#define USART_INTENCLR_TXIDLECLR_MASK (0x8U)
-#define USART_INTENCLR_TXIDLECLR_SHIFT (3U)
-/*! TXIDLECLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_TXIDLECLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_TXIDLECLR_SHIFT)) & USART_INTENCLR_TXIDLECLR_MASK)
-#define USART_INTENCLR_DELTACTSCLR_MASK (0x20U)
-#define USART_INTENCLR_DELTACTSCLR_SHIFT (5U)
-/*! DELTACTSCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_DELTACTSCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_DELTACTSCLR_SHIFT)) & USART_INTENCLR_DELTACTSCLR_MASK)
-#define USART_INTENCLR_TXDISCLR_MASK (0x40U)
-#define USART_INTENCLR_TXDISCLR_SHIFT (6U)
-/*! TXDISCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_TXDISCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_TXDISCLR_SHIFT)) & USART_INTENCLR_TXDISCLR_MASK)
-#define USART_INTENCLR_DELTARXBRKCLR_MASK (0x800U)
-#define USART_INTENCLR_DELTARXBRKCLR_SHIFT (11U)
-/*! DELTARXBRKCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_DELTARXBRKCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_DELTARXBRKCLR_SHIFT)) & USART_INTENCLR_DELTARXBRKCLR_MASK)
-#define USART_INTENCLR_STARTCLR_MASK (0x1000U)
-#define USART_INTENCLR_STARTCLR_SHIFT (12U)
-/*! STARTCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_STARTCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_STARTCLR_SHIFT)) & USART_INTENCLR_STARTCLR_MASK)
-#define USART_INTENCLR_FRAMERRCLR_MASK (0x2000U)
-#define USART_INTENCLR_FRAMERRCLR_SHIFT (13U)
-/*! FRAMERRCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_FRAMERRCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_FRAMERRCLR_SHIFT)) & USART_INTENCLR_FRAMERRCLR_MASK)
-#define USART_INTENCLR_PARITYERRCLR_MASK (0x4000U)
-#define USART_INTENCLR_PARITYERRCLR_SHIFT (14U)
-/*! PARITYERRCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_PARITYERRCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_PARITYERRCLR_SHIFT)) & USART_INTENCLR_PARITYERRCLR_MASK)
-#define USART_INTENCLR_RXNOISECLR_MASK (0x8000U)
-#define USART_INTENCLR_RXNOISECLR_SHIFT (15U)
-/*! RXNOISECLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_RXNOISECLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_RXNOISECLR_SHIFT)) & USART_INTENCLR_RXNOISECLR_MASK)
-#define USART_INTENCLR_ABERRCLR_MASK (0x10000U)
-#define USART_INTENCLR_ABERRCLR_SHIFT (16U)
-/*! ABERRCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_ABERRCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_ABERRCLR_SHIFT)) & USART_INTENCLR_ABERRCLR_MASK)
-/*! @} */
-
-/*! @name BRG - Baud Rate Generator register. 16-bit integer baud rate divisor value. */
-/*! @{ */
-#define USART_BRG_BRGVAL_MASK (0xFFFFU)
-#define USART_BRG_BRGVAL_SHIFT (0U)
-/*! BRGVAL - This value is used to divide the USART input clock to determine the baud rate, based on
- * the input clock from the FRG. 0 = FCLK is used directly by the USART function. 1 = FCLK is
- * divided by 2 before use by the USART function. 2 = FCLK is divided by 3 before use by the USART
- * function. 0xFFFF = FCLK is divided by 65,536 before use by the USART function.
- */
-#define USART_BRG_BRGVAL(x) (((uint32_t)(((uint32_t)(x)) << USART_BRG_BRGVAL_SHIFT)) & USART_BRG_BRGVAL_MASK)
-/*! @} */
-
-/*! @name INTSTAT - Interrupt status register. Reflects interrupts that are currently enabled. */
-/*! @{ */
-#define USART_INTSTAT_TXIDLE_MASK (0x8U)
-#define USART_INTSTAT_TXIDLE_SHIFT (3U)
-/*! TXIDLE - Transmitter Idle status.
- */
-#define USART_INTSTAT_TXIDLE(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_TXIDLE_SHIFT)) & USART_INTSTAT_TXIDLE_MASK)
-#define USART_INTSTAT_DELTACTS_MASK (0x20U)
-#define USART_INTSTAT_DELTACTS_SHIFT (5U)
-/*! DELTACTS - This bit is set when a change in the state of the CTS input is detected.
- */
-#define USART_INTSTAT_DELTACTS(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_DELTACTS_SHIFT)) & USART_INTSTAT_DELTACTS_MASK)
-#define USART_INTSTAT_TXDISINT_MASK (0x40U)
-#define USART_INTSTAT_TXDISINT_SHIFT (6U)
-/*! TXDISINT - Transmitter Disabled Interrupt flag.
- */
-#define USART_INTSTAT_TXDISINT(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_TXDISINT_SHIFT)) & USART_INTSTAT_TXDISINT_MASK)
-#define USART_INTSTAT_DELTARXBRK_MASK (0x800U)
-#define USART_INTSTAT_DELTARXBRK_SHIFT (11U)
-/*! DELTARXBRK - This bit is set when a change in the state of receiver break detection occurs.
- */
-#define USART_INTSTAT_DELTARXBRK(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_DELTARXBRK_SHIFT)) & USART_INTSTAT_DELTARXBRK_MASK)
-#define USART_INTSTAT_START_MASK (0x1000U)
-#define USART_INTSTAT_START_SHIFT (12U)
-/*! START - This bit is set when a start is detected on the receiver input.
- */
-#define USART_INTSTAT_START(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_START_SHIFT)) & USART_INTSTAT_START_MASK)
-#define USART_INTSTAT_FRAMERRINT_MASK (0x2000U)
-#define USART_INTSTAT_FRAMERRINT_SHIFT (13U)
-/*! FRAMERRINT - Framing Error interrupt flag.
- */
-#define USART_INTSTAT_FRAMERRINT(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_FRAMERRINT_SHIFT)) & USART_INTSTAT_FRAMERRINT_MASK)
-#define USART_INTSTAT_PARITYERRINT_MASK (0x4000U)
-#define USART_INTSTAT_PARITYERRINT_SHIFT (14U)
-/*! PARITYERRINT - Parity Error interrupt flag.
- */
-#define USART_INTSTAT_PARITYERRINT(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_PARITYERRINT_SHIFT)) & USART_INTSTAT_PARITYERRINT_MASK)
-#define USART_INTSTAT_RXNOISEINT_MASK (0x8000U)
-#define USART_INTSTAT_RXNOISEINT_SHIFT (15U)
-/*! RXNOISEINT - Received Noise interrupt flag.
- */
-#define USART_INTSTAT_RXNOISEINT(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_RXNOISEINT_SHIFT)) & USART_INTSTAT_RXNOISEINT_MASK)
-#define USART_INTSTAT_ABERRINT_MASK (0x10000U)
-#define USART_INTSTAT_ABERRINT_SHIFT (16U)
-/*! ABERRINT - Auto baud Error Interrupt flag.
- */
-#define USART_INTSTAT_ABERRINT(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_ABERRINT_SHIFT)) & USART_INTSTAT_ABERRINT_MASK)
-/*! @} */
-
-/*! @name OSR - Oversample selection register for asynchronous communication. */
-/*! @{ */
-#define USART_OSR_OSRVAL_MASK (0xFU)
-#define USART_OSR_OSRVAL_SHIFT (0U)
-/*! OSRVAL - Oversample Selection Value. 0 to 3 = not supported 0x4 = 5 function clocks are used to
- * transmit and receive each data bit. 0x5 = 6 function clocks are used to transmit and receive
- * each data bit. 0xF= 16 function clocks are used to transmit and receive each data bit.
- */
-#define USART_OSR_OSRVAL(x) (((uint32_t)(((uint32_t)(x)) << USART_OSR_OSRVAL_SHIFT)) & USART_OSR_OSRVAL_MASK)
-/*! @} */
-
-/*! @name ADDR - Address register for automatic address matching. */
-/*! @{ */
-#define USART_ADDR_ADDRESS_MASK (0xFFU)
-#define USART_ADDR_ADDRESS_SHIFT (0U)
-/*! ADDRESS - 8-bit address used with automatic address matching. Used when address detection is
- * enabled (ADDRDET in CTL = 1) and automatic address matching is enabled (AUTOADDR in CFG = 1).
- */
-#define USART_ADDR_ADDRESS(x) (((uint32_t)(((uint32_t)(x)) << USART_ADDR_ADDRESS_SHIFT)) & USART_ADDR_ADDRESS_MASK)
-/*! @} */
-
-/*! @name FIFOCFG - FIFO configuration and enable register. */
-/*! @{ */
-#define USART_FIFOCFG_ENABLETX_MASK (0x1U)
-#define USART_FIFOCFG_ENABLETX_SHIFT (0U)
-/*! ENABLETX - Enable the transmit FIFO.
- * 0b0..The transmit FIFO is not enabled.
- * 0b1..The transmit FIFO is enabled.
- */
-#define USART_FIFOCFG_ENABLETX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_ENABLETX_SHIFT)) & USART_FIFOCFG_ENABLETX_MASK)
-#define USART_FIFOCFG_ENABLERX_MASK (0x2U)
-#define USART_FIFOCFG_ENABLERX_SHIFT (1U)
-/*! ENABLERX - Enable the receive FIFO.
- * 0b0..The receive FIFO is not enabled.
- * 0b1..The receive FIFO is enabled.
- */
-#define USART_FIFOCFG_ENABLERX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_ENABLERX_SHIFT)) & USART_FIFOCFG_ENABLERX_MASK)
-#define USART_FIFOCFG_SIZE_MASK (0x30U)
-#define USART_FIFOCFG_SIZE_SHIFT (4U)
-/*! SIZE - FIFO size configuration. This is a read-only field. 0x0 = FIFO is configured as 16
- * entries of 8 bits. 0x1, 0x2, 0x3 = not applicable to USART.
- */
-#define USART_FIFOCFG_SIZE(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_SIZE_SHIFT)) & USART_FIFOCFG_SIZE_MASK)
-#define USART_FIFOCFG_DMATX_MASK (0x1000U)
-#define USART_FIFOCFG_DMATX_SHIFT (12U)
-/*! DMATX - DMA configuration for transmit.
- * 0b0..DMA is not used for the transmit function.
- * 0b1..Trigger DMA for the transmit function if the FIFO is not full. Generally, data interrupts would be disabled if DMA is enabled.
- */
-#define USART_FIFOCFG_DMATX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_DMATX_SHIFT)) & USART_FIFOCFG_DMATX_MASK)
-#define USART_FIFOCFG_DMARX_MASK (0x2000U)
-#define USART_FIFOCFG_DMARX_SHIFT (13U)
-/*! DMARX - DMA configuration for receive.
- * 0b0..DMA is not used for the receive function.
- * 0b1..Trigger DMA for the receive function if the FIFO is not empty. Generally, data interrupts would be disabled if DMA is enabled.
- */
-#define USART_FIFOCFG_DMARX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_DMARX_SHIFT)) & USART_FIFOCFG_DMARX_MASK)
-#define USART_FIFOCFG_WAKETX_MASK (0x4000U)
-#define USART_FIFOCFG_WAKETX_SHIFT (14U)
-/*! WAKETX - Wake-up for transmit FIFO level. This allows the device to be woken from reduced power
- * modes (up to power-down, as long as the peripheral function works in that power mode) without
- * enabling the TXLVL interrupt. Only DMA wakes up, processes data, and goes back to sleep. The
- * CPU will remain stopped until woken by another cause, such as DMA completion. See Hardware
- * Wake-up control register.
- * 0b0..Only enabled interrupts will wake up the device form reduced power modes.
- * 0b1..A device wake-up for DMA will occur if the transmit FIFO level reaches the value specified by TXLVL in
- * FIFOTRIG, even when the TXLVL interrupt is not enabled.
- */
-#define USART_FIFOCFG_WAKETX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_WAKETX_SHIFT)) & USART_FIFOCFG_WAKETX_MASK)
-#define USART_FIFOCFG_WAKERX_MASK (0x8000U)
-#define USART_FIFOCFG_WAKERX_SHIFT (15U)
-/*! WAKERX - Wake-up for receive FIFO level. This allows the device to be woken from reduced power
- * modes (up to power-down, as long as the peripheral function works in that power mode) without
- * enabling the TXLVL interrupt. Only DMA wakes up, processes data, and goes back to sleep. The
- * CPU will remain stopped until woken by another cause, such as DMA completion. See Hardware
- * Wake-up control register.
- * 0b0..Only enabled interrupts will wake up the device form reduced power modes.
- * 0b1..A device wake-up for DMA will occur if the receive FIFO level reaches the value specified by RXLVL in
- * FIFOTRIG, even when the RXLVL interrupt is not enabled.
- */
-#define USART_FIFOCFG_WAKERX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_WAKERX_SHIFT)) & USART_FIFOCFG_WAKERX_MASK)
-#define USART_FIFOCFG_EMPTYTX_MASK (0x10000U)
-#define USART_FIFOCFG_EMPTYTX_SHIFT (16U)
-/*! EMPTYTX - Empty command for the transmit FIFO. When a 1 is written to this bit, the TX FIFO is emptied.
- */
-#define USART_FIFOCFG_EMPTYTX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_EMPTYTX_SHIFT)) & USART_FIFOCFG_EMPTYTX_MASK)
-#define USART_FIFOCFG_EMPTYRX_MASK (0x20000U)
-#define USART_FIFOCFG_EMPTYRX_SHIFT (17U)
-/*! EMPTYRX - Empty command for the receive FIFO. When a 1 is written to this bit, the RX FIFO is emptied.
- */
-#define USART_FIFOCFG_EMPTYRX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_EMPTYRX_SHIFT)) & USART_FIFOCFG_EMPTYRX_MASK)
-/*! @} */
-
-/*! @name FIFOSTAT - FIFO status register. */
-/*! @{ */
-#define USART_FIFOSTAT_TXERR_MASK (0x1U)
-#define USART_FIFOSTAT_TXERR_SHIFT (0U)
-/*! TXERR - TX FIFO error. Will be set if a transmit FIFO error occurs. This could be an overflow
- * caused by pushing data into a full FIFO, or by an underflow if the FIFO is empty when data is
- * needed. Cleared by writing a 1 to this bit.
- */
-#define USART_FIFOSTAT_TXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_TXERR_SHIFT)) & USART_FIFOSTAT_TXERR_MASK)
-#define USART_FIFOSTAT_RXERR_MASK (0x2U)
-#define USART_FIFOSTAT_RXERR_SHIFT (1U)
-/*! RXERR - RX FIFO error. Will be set if a receive FIFO overflow occurs, caused by software or DMA
- * not emptying the FIFO fast enough. Cleared by writing a 1 to this bit.
- */
-#define USART_FIFOSTAT_RXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_RXERR_SHIFT)) & USART_FIFOSTAT_RXERR_MASK)
-#define USART_FIFOSTAT_PERINT_MASK (0x8U)
-#define USART_FIFOSTAT_PERINT_SHIFT (3U)
-/*! PERINT - Peripheral interrupt. When 1, this indicates that the peripheral function has asserted
- * an interrupt. The details can be found by reading the peripheral's STAT register.
- */
-#define USART_FIFOSTAT_PERINT(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_PERINT_SHIFT)) & USART_FIFOSTAT_PERINT_MASK)
-#define USART_FIFOSTAT_TXEMPTY_MASK (0x10U)
-#define USART_FIFOSTAT_TXEMPTY_SHIFT (4U)
-/*! TXEMPTY - Transmit FIFO empty. When 1, the transmit FIFO is empty. The peripheral may still be processing the last piece of data.
- */
-#define USART_FIFOSTAT_TXEMPTY(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_TXEMPTY_SHIFT)) & USART_FIFOSTAT_TXEMPTY_MASK)
-#define USART_FIFOSTAT_TXNOTFULL_MASK (0x20U)
-#define USART_FIFOSTAT_TXNOTFULL_SHIFT (5U)
-/*! TXNOTFULL - Transmit FIFO not full. When 1, the transmit FIFO is not full, so more data can be
- * written. When 0, the transmit FIFO is full and another write would cause it to overflow.
- */
-#define USART_FIFOSTAT_TXNOTFULL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_TXNOTFULL_SHIFT)) & USART_FIFOSTAT_TXNOTFULL_MASK)
-#define USART_FIFOSTAT_RXNOTEMPTY_MASK (0x40U)
-#define USART_FIFOSTAT_RXNOTEMPTY_SHIFT (6U)
-/*! RXNOTEMPTY - Receive FIFO not empty. When 1, the receive FIFO is not empty, so data can be read. When 0, the receive FIFO is empty.
- */
-#define USART_FIFOSTAT_RXNOTEMPTY(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_RXNOTEMPTY_SHIFT)) & USART_FIFOSTAT_RXNOTEMPTY_MASK)
-#define USART_FIFOSTAT_RXFULL_MASK (0x80U)
-#define USART_FIFOSTAT_RXFULL_SHIFT (7U)
-/*! RXFULL - Receive FIFO full. When 1, the receive FIFO is full. Data needs to be read out to
- * prevent the peripheral from causing an overflow.
- */
-#define USART_FIFOSTAT_RXFULL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_RXFULL_SHIFT)) & USART_FIFOSTAT_RXFULL_MASK)
-#define USART_FIFOSTAT_TXLVL_MASK (0x1F00U)
-#define USART_FIFOSTAT_TXLVL_SHIFT (8U)
-/*! TXLVL - Transmit FIFO current level. A 0 means the TX FIFO is currently empty, and the TXEMPTY
- * and TXNOTFULL flags will be 1. Other values tell how much data is actually in the TX FIFO at
- * the point where the read occurs. If the TX FIFO is full, the TXEMPTY and TXNOTFULL flags will be
- * 0.
- */
-#define USART_FIFOSTAT_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_TXLVL_SHIFT)) & USART_FIFOSTAT_TXLVL_MASK)
-#define USART_FIFOSTAT_RXLVL_MASK (0x1F0000U)
-#define USART_FIFOSTAT_RXLVL_SHIFT (16U)
-/*! RXLVL - Receive FIFO current level. A 0 means the RX FIFO is currently empty, and the RXFULL and
- * RXNOTEMPTY flags will be 0. Other values tell how much data is actually in the RX FIFO at the
- * point where the read occurs. If the RX FIFO is full, the RXFULL and RXNOTEMPTY flags will be
- * 1.
- */
-#define USART_FIFOSTAT_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_RXLVL_SHIFT)) & USART_FIFOSTAT_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOTRIG - FIFO trigger settings for interrupt and DMA request. */
-/*! @{ */
-#define USART_FIFOTRIG_TXLVLENA_MASK (0x1U)
-#define USART_FIFOTRIG_TXLVLENA_SHIFT (0U)
-/*! TXLVLENA - Transmit FIFO level trigger enable. This trigger will become an interrupt if enabled
- * in FIFOINTENSET, or a DMA trigger if DMATX in FIFOCFG is set.
- * 0b0..Transmit FIFO level does not generate a FIFO level trigger.
- * 0b1..An trigger will be generated if the transmit FIFO level reaches the value specified by the TXLVL field in this register.
- */
-#define USART_FIFOTRIG_TXLVLENA(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOTRIG_TXLVLENA_SHIFT)) & USART_FIFOTRIG_TXLVLENA_MASK)
-#define USART_FIFOTRIG_RXLVLENA_MASK (0x2U)
-#define USART_FIFOTRIG_RXLVLENA_SHIFT (1U)
-/*! RXLVLENA - Receive FIFO level trigger enable. This trigger will become an interrupt if enabled
- * in FIFOINTENSET, or a DMA trigger if DMARX in FIFOCFG is set.
- * 0b0..Receive FIFO level does not generate a FIFO level trigger.
- * 0b1..An trigger will be generated if the receive FIFO level reaches the value specified by the RXLVL field in this register.
- */
-#define USART_FIFOTRIG_RXLVLENA(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOTRIG_RXLVLENA_SHIFT)) & USART_FIFOTRIG_RXLVLENA_MASK)
-#define USART_FIFOTRIG_TXLVL_MASK (0xF00U)
-#define USART_FIFOTRIG_TXLVL_SHIFT (8U)
-/*! TXLVL - Transmit FIFO level trigger point. This field is used only when TXLVLENA = 1. If enabled
- * to do so, the FIFO level can wake up the device just enough to perform DMA, then return to
- * the reduced power mode. See Hardware Wake-up control register. 0 = trigger when the TX FIFO
- * becomes empty. 1 = trigger when the TX FIFO level decreases to one entry. 15 = trigger when the TX
- * FIFO level decreases to 15 entries (is no longer full).
- */
-#define USART_FIFOTRIG_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOTRIG_TXLVL_SHIFT)) & USART_FIFOTRIG_TXLVL_MASK)
-#define USART_FIFOTRIG_RXLVL_MASK (0xF0000U)
-#define USART_FIFOTRIG_RXLVL_SHIFT (16U)
-/*! RXLVL - Receive FIFO level trigger point. The RX FIFO level is checked when a new piece of data
- * is received. This field is used only when RXLVLENA = 1. If enabled to do so, the FIFO level
- * can wake up the device just enough to perform DMA, then return to the reduced power mode. See
- * Hardware Wake-up control register. 0 = trigger when the RX FIFO has received one entry (is no
- * longer empty). 1 = trigger when the RX FIFO has received two entries. 15 = trigger when the RX
- * FIFO has received 16 entries (has become full).
- */
-#define USART_FIFOTRIG_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOTRIG_RXLVL_SHIFT)) & USART_FIFOTRIG_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTENSET - FIFO interrupt enable set (enable) and read register. */
-/*! @{ */
-#define USART_FIFOINTENSET_TXERR_MASK (0x1U)
-#define USART_FIFOINTENSET_TXERR_SHIFT (0U)
-/*! TXERR - Determines whether an interrupt occurs when a transmit error occurs, based on the TXERR flag in the FIFOSTAT register.
- * 0b0..No interrupt will be generated for a transmit error.
- * 0b1..An interrupt will be generated when a transmit error occurs.
- */
-#define USART_FIFOINTENSET_TXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENSET_TXERR_SHIFT)) & USART_FIFOINTENSET_TXERR_MASK)
-#define USART_FIFOINTENSET_RXERR_MASK (0x2U)
-#define USART_FIFOINTENSET_RXERR_SHIFT (1U)
-/*! RXERR - Determines whether an interrupt occurs when a receive error occurs, based on the RXERR flag in the FIFOSTAT register.
- * 0b0..No interrupt will be generated for a receive error.
- * 0b1..An interrupt will be generated when a receive error occurs.
- */
-#define USART_FIFOINTENSET_RXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENSET_RXERR_SHIFT)) & USART_FIFOINTENSET_RXERR_MASK)
-#define USART_FIFOINTENSET_TXLVL_MASK (0x4U)
-#define USART_FIFOINTENSET_TXLVL_SHIFT (2U)
-/*! TXLVL - Determines whether an interrupt occurs when a the transmit FIFO reaches the level
- * specified by the TXLVL field in the FIFOTRIG register.
- * 0b0..No interrupt will be generated based on the TX FIFO level.
- * 0b1..If TXLVLENA in the FIFOTRIG register = 1, an interrupt will be generated when the TX FIFO level decreases
- * to the level specified by TXLVL in the FIFOTRIG register.
- */
-#define USART_FIFOINTENSET_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENSET_TXLVL_SHIFT)) & USART_FIFOINTENSET_TXLVL_MASK)
-#define USART_FIFOINTENSET_RXLVL_MASK (0x8U)
-#define USART_FIFOINTENSET_RXLVL_SHIFT (3U)
-/*! RXLVL - Determines whether an interrupt occurs when a the receive FIFO reaches the level
- * specified by the TXLVL field in the FIFOTRIG register.
- * 0b0..No interrupt will be generated based on the RX FIFO level.
- * 0b1..If RXLVLENA in the FIFOTRIG register = 1, an interrupt will be generated when the when the RX FIFO level
- * increases to the level specified by RXLVL in the FIFOTRIG register.
- */
-#define USART_FIFOINTENSET_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENSET_RXLVL_SHIFT)) & USART_FIFOINTENSET_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTENCLR - FIFO interrupt enable clear (disable) and read register. */
-/*! @{ */
-#define USART_FIFOINTENCLR_TXERR_MASK (0x1U)
-#define USART_FIFOINTENCLR_TXERR_SHIFT (0U)
-/*! TXERR - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define USART_FIFOINTENCLR_TXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENCLR_TXERR_SHIFT)) & USART_FIFOINTENCLR_TXERR_MASK)
-#define USART_FIFOINTENCLR_RXERR_MASK (0x2U)
-#define USART_FIFOINTENCLR_RXERR_SHIFT (1U)
-/*! RXERR - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define USART_FIFOINTENCLR_RXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENCLR_RXERR_SHIFT)) & USART_FIFOINTENCLR_RXERR_MASK)
-#define USART_FIFOINTENCLR_TXLVL_MASK (0x4U)
-#define USART_FIFOINTENCLR_TXLVL_SHIFT (2U)
-/*! TXLVL - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define USART_FIFOINTENCLR_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENCLR_TXLVL_SHIFT)) & USART_FIFOINTENCLR_TXLVL_MASK)
-#define USART_FIFOINTENCLR_RXLVL_MASK (0x8U)
-#define USART_FIFOINTENCLR_RXLVL_SHIFT (3U)
-/*! RXLVL - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define USART_FIFOINTENCLR_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENCLR_RXLVL_SHIFT)) & USART_FIFOINTENCLR_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTSTAT - FIFO interrupt status register. */
-/*! @{ */
-#define USART_FIFOINTSTAT_TXERR_MASK (0x1U)
-#define USART_FIFOINTSTAT_TXERR_SHIFT (0U)
-/*! TXERR - TX FIFO error.
- */
-#define USART_FIFOINTSTAT_TXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTSTAT_TXERR_SHIFT)) & USART_FIFOINTSTAT_TXERR_MASK)
-#define USART_FIFOINTSTAT_RXERR_MASK (0x2U)
-#define USART_FIFOINTSTAT_RXERR_SHIFT (1U)
-/*! RXERR - RX FIFO error.
- */
-#define USART_FIFOINTSTAT_RXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTSTAT_RXERR_SHIFT)) & USART_FIFOINTSTAT_RXERR_MASK)
-#define USART_FIFOINTSTAT_TXLVL_MASK (0x4U)
-#define USART_FIFOINTSTAT_TXLVL_SHIFT (2U)
-/*! TXLVL - Transmit FIFO level interrupt.
- */
-#define USART_FIFOINTSTAT_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTSTAT_TXLVL_SHIFT)) & USART_FIFOINTSTAT_TXLVL_MASK)
-#define USART_FIFOINTSTAT_RXLVL_MASK (0x8U)
-#define USART_FIFOINTSTAT_RXLVL_SHIFT (3U)
-/*! RXLVL - Receive FIFO level interrupt.
- */
-#define USART_FIFOINTSTAT_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTSTAT_RXLVL_SHIFT)) & USART_FIFOINTSTAT_RXLVL_MASK)
-#define USART_FIFOINTSTAT_PERINT_MASK (0x10U)
-#define USART_FIFOINTSTAT_PERINT_SHIFT (4U)
-/*! PERINT - Peripheral interrupt.
- */
-#define USART_FIFOINTSTAT_PERINT(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTSTAT_PERINT_SHIFT)) & USART_FIFOINTSTAT_PERINT_MASK)
-/*! @} */
-
-/*! @name FIFOWR - FIFO write data. */
-/*! @{ */
-#define USART_FIFOWR_TXDATA_MASK (0x1FFU)
-#define USART_FIFOWR_TXDATA_SHIFT (0U)
-/*! TXDATA - Transmit data to the FIFO.
- */
-#define USART_FIFOWR_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOWR_TXDATA_SHIFT)) & USART_FIFOWR_TXDATA_MASK)
-/*! @} */
-
-/*! @name FIFORD - FIFO read data. */
-/*! @{ */
-#define USART_FIFORD_RXDATA_MASK (0x1FFU)
-#define USART_FIFORD_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO. The number of bits used depends on the DATALEN and PARITYSEL settings.
- */
-#define USART_FIFORD_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORD_RXDATA_SHIFT)) & USART_FIFORD_RXDATA_MASK)
-#define USART_FIFORD_FRAMERR_MASK (0x2000U)
-#define USART_FIFORD_FRAMERR_SHIFT (13U)
-/*! FRAMERR - Framing Error status flag. This bit reflects the status for the data it is read along
- * with from the FIFO, and indicates that the character was received with a missing stop bit at
- * the expected location. This could be an indication of a baud rate or configuration mismatch
- * with the transmitting source.
- */
-#define USART_FIFORD_FRAMERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORD_FRAMERR_SHIFT)) & USART_FIFORD_FRAMERR_MASK)
-#define USART_FIFORD_PARITYERR_MASK (0x4000U)
-#define USART_FIFORD_PARITYERR_SHIFT (14U)
-/*! PARITYERR - Parity Error status flag. This bit reflects the status for the data it is read along
- * with from the FIFO. This bit will be set when a parity error is detected in a received
- * character.
- */
-#define USART_FIFORD_PARITYERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORD_PARITYERR_SHIFT)) & USART_FIFORD_PARITYERR_MASK)
-#define USART_FIFORD_RXNOISE_MASK (0x8000U)
-#define USART_FIFORD_RXNOISE_SHIFT (15U)
-/*! RXNOISE - Received Noise flag. See description of the RxNoiseInt bit in Table 354.
- */
-#define USART_FIFORD_RXNOISE(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORD_RXNOISE_SHIFT)) & USART_FIFORD_RXNOISE_MASK)
-/*! @} */
-
-/*! @name FIFORDNOPOP - FIFO data read with no FIFO pop. */
-/*! @{ */
-#define USART_FIFORDNOPOP_RXDATA_MASK (0x1FFU)
-#define USART_FIFORDNOPOP_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO. The number of bits used depends on the DATALEN and PARITYSEL settings.
- */
-#define USART_FIFORDNOPOP_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORDNOPOP_RXDATA_SHIFT)) & USART_FIFORDNOPOP_RXDATA_MASK)
-#define USART_FIFORDNOPOP_FRAMERR_MASK (0x2000U)
-#define USART_FIFORDNOPOP_FRAMERR_SHIFT (13U)
-/*! FRAMERR - Framing Error status flag. This bit reflects the status for the data it is read along
- * with from the FIFO, and indicates that the character was received with a missing stop bit at
- * the expected location. This could be an indication of a baud rate or configuration mismatch
- * with the transmitting source.
- */
-#define USART_FIFORDNOPOP_FRAMERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORDNOPOP_FRAMERR_SHIFT)) & USART_FIFORDNOPOP_FRAMERR_MASK)
-#define USART_FIFORDNOPOP_PARITYERR_MASK (0x4000U)
-#define USART_FIFORDNOPOP_PARITYERR_SHIFT (14U)
-/*! PARITYERR - Parity Error status flag. This bit reflects the status for the data it is read along
- * with from the FIFO. This bit will be set when a parity error is detected in a received
- * character.
- */
-#define USART_FIFORDNOPOP_PARITYERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORDNOPOP_PARITYERR_SHIFT)) & USART_FIFORDNOPOP_PARITYERR_MASK)
-#define USART_FIFORDNOPOP_RXNOISE_MASK (0x8000U)
-#define USART_FIFORDNOPOP_RXNOISE_SHIFT (15U)
-/*! RXNOISE - Received Noise flag. See description of the RxNoiseInt bit in Table 354.
- */
-#define USART_FIFORDNOPOP_RXNOISE(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORDNOPOP_RXNOISE_SHIFT)) & USART_FIFORDNOPOP_RXNOISE_MASK)
-/*! @} */
-
-/*! @name ID - Peripheral identification register. */
-/*! @{ */
-#define USART_ID_APERTURE_MASK (0xFFU)
-#define USART_ID_APERTURE_SHIFT (0U)
-/*! APERTURE - Aperture: encoded as (aperture size/4K) -1, so 0x00 means a 4K aperture.
- */
-#define USART_ID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << USART_ID_APERTURE_SHIFT)) & USART_ID_APERTURE_MASK)
-#define USART_ID_MINOR_REV_MASK (0xF00U)
-#define USART_ID_MINOR_REV_SHIFT (8U)
-/*! MINOR_REV - Minor revision of module implementation.
- */
-#define USART_ID_MINOR_REV(x) (((uint32_t)(((uint32_t)(x)) << USART_ID_MINOR_REV_SHIFT)) & USART_ID_MINOR_REV_MASK)
-#define USART_ID_MAJOR_REV_MASK (0xF000U)
-#define USART_ID_MAJOR_REV_SHIFT (12U)
-/*! MAJOR_REV - Major revision of module implementation.
- */
-#define USART_ID_MAJOR_REV(x) (((uint32_t)(((uint32_t)(x)) << USART_ID_MAJOR_REV_SHIFT)) & USART_ID_MAJOR_REV_MASK)
-#define USART_ID_ID_MASK (0xFFFF0000U)
-#define USART_ID_ID_SHIFT (16U)
-/*! ID - Module identifier for the selected function.
- */
-#define USART_ID_ID(x) (((uint32_t)(((uint32_t)(x)) << USART_ID_ID_SHIFT)) & USART_ID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group USART_Register_Masks */
-
-
-/* USART - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral USART0 base address */
- #define USART0_BASE (0x50086000u)
- /** Peripheral USART0 base address */
- #define USART0_BASE_NS (0x40086000u)
- /** Peripheral USART0 base pointer */
- #define USART0 ((USART_Type *)USART0_BASE)
- /** Peripheral USART0 base pointer */
- #define USART0_NS ((USART_Type *)USART0_BASE_NS)
- /** Peripheral USART1 base address */
- #define USART1_BASE (0x50087000u)
- /** Peripheral USART1 base address */
- #define USART1_BASE_NS (0x40087000u)
- /** Peripheral USART1 base pointer */
- #define USART1 ((USART_Type *)USART1_BASE)
- /** Peripheral USART1 base pointer */
- #define USART1_NS ((USART_Type *)USART1_BASE_NS)
- /** Peripheral USART2 base address */
- #define USART2_BASE (0x50088000u)
- /** Peripheral USART2 base address */
- #define USART2_BASE_NS (0x40088000u)
- /** Peripheral USART2 base pointer */
- #define USART2 ((USART_Type *)USART2_BASE)
- /** Peripheral USART2 base pointer */
- #define USART2_NS ((USART_Type *)USART2_BASE_NS)
- /** Peripheral USART3 base address */
- #define USART3_BASE (0x50089000u)
- /** Peripheral USART3 base address */
- #define USART3_BASE_NS (0x40089000u)
- /** Peripheral USART3 base pointer */
- #define USART3 ((USART_Type *)USART3_BASE)
- /** Peripheral USART3 base pointer */
- #define USART3_NS ((USART_Type *)USART3_BASE_NS)
- /** Peripheral USART4 base address */
- #define USART4_BASE (0x5008A000u)
- /** Peripheral USART4 base address */
- #define USART4_BASE_NS (0x4008A000u)
- /** Peripheral USART4 base pointer */
- #define USART4 ((USART_Type *)USART4_BASE)
- /** Peripheral USART4 base pointer */
- #define USART4_NS ((USART_Type *)USART4_BASE_NS)
- /** Peripheral USART5 base address */
- #define USART5_BASE (0x50096000u)
- /** Peripheral USART5 base address */
- #define USART5_BASE_NS (0x40096000u)
- /** Peripheral USART5 base pointer */
- #define USART5 ((USART_Type *)USART5_BASE)
- /** Peripheral USART5 base pointer */
- #define USART5_NS ((USART_Type *)USART5_BASE_NS)
- /** Peripheral USART6 base address */
- #define USART6_BASE (0x50097000u)
- /** Peripheral USART6 base address */
- #define USART6_BASE_NS (0x40097000u)
- /** Peripheral USART6 base pointer */
- #define USART6 ((USART_Type *)USART6_BASE)
- /** Peripheral USART6 base pointer */
- #define USART6_NS ((USART_Type *)USART6_BASE_NS)
- /** Peripheral USART7 base address */
- #define USART7_BASE (0x50098000u)
- /** Peripheral USART7 base address */
- #define USART7_BASE_NS (0x40098000u)
- /** Peripheral USART7 base pointer */
- #define USART7 ((USART_Type *)USART7_BASE)
- /** Peripheral USART7 base pointer */
- #define USART7_NS ((USART_Type *)USART7_BASE_NS)
- /** Array initializer of USART peripheral base addresses */
- #define USART_BASE_ADDRS { USART0_BASE, USART1_BASE, USART2_BASE, USART3_BASE, USART4_BASE, USART5_BASE, USART6_BASE, USART7_BASE }
- /** Array initializer of USART peripheral base pointers */
- #define USART_BASE_PTRS { USART0, USART1, USART2, USART3, USART4, USART5, USART6, USART7 }
- /** Array initializer of USART peripheral base addresses */
- #define USART_BASE_ADDRS_NS { USART0_BASE_NS, USART1_BASE_NS, USART2_BASE_NS, USART3_BASE_NS, USART4_BASE_NS, USART5_BASE_NS, USART6_BASE_NS, USART7_BASE_NS }
- /** Array initializer of USART peripheral base pointers */
- #define USART_BASE_PTRS_NS { USART0_NS, USART1_NS, USART2_NS, USART3_NS, USART4_NS, USART5_NS, USART6_NS, USART7_NS }
-#else
- /** Peripheral USART0 base address */
- #define USART0_BASE (0x40086000u)
- /** Peripheral USART0 base pointer */
- #define USART0 ((USART_Type *)USART0_BASE)
- /** Peripheral USART1 base address */
- #define USART1_BASE (0x40087000u)
- /** Peripheral USART1 base pointer */
- #define USART1 ((USART_Type *)USART1_BASE)
- /** Peripheral USART2 base address */
- #define USART2_BASE (0x40088000u)
- /** Peripheral USART2 base pointer */
- #define USART2 ((USART_Type *)USART2_BASE)
- /** Peripheral USART3 base address */
- #define USART3_BASE (0x40089000u)
- /** Peripheral USART3 base pointer */
- #define USART3 ((USART_Type *)USART3_BASE)
- /** Peripheral USART4 base address */
- #define USART4_BASE (0x4008A000u)
- /** Peripheral USART4 base pointer */
- #define USART4 ((USART_Type *)USART4_BASE)
- /** Peripheral USART5 base address */
- #define USART5_BASE (0x40096000u)
- /** Peripheral USART5 base pointer */
- #define USART5 ((USART_Type *)USART5_BASE)
- /** Peripheral USART6 base address */
- #define USART6_BASE (0x40097000u)
- /** Peripheral USART6 base pointer */
- #define USART6 ((USART_Type *)USART6_BASE)
- /** Peripheral USART7 base address */
- #define USART7_BASE (0x40098000u)
- /** Peripheral USART7 base pointer */
- #define USART7 ((USART_Type *)USART7_BASE)
- /** Array initializer of USART peripheral base addresses */
- #define USART_BASE_ADDRS { USART0_BASE, USART1_BASE, USART2_BASE, USART3_BASE, USART4_BASE, USART5_BASE, USART6_BASE, USART7_BASE }
- /** Array initializer of USART peripheral base pointers */
- #define USART_BASE_PTRS { USART0, USART1, USART2, USART3, USART4, USART5, USART6, USART7 }
-#endif
-/** Interrupt vectors for the USART peripheral type */
-#define USART_IRQS { FLEXCOMM0_IRQn, FLEXCOMM1_IRQn, FLEXCOMM2_IRQn, FLEXCOMM3_IRQn, FLEXCOMM4_IRQn, FLEXCOMM5_IRQn, FLEXCOMM6_IRQn, FLEXCOMM7_IRQn }
-
-/*!
- * @}
- */ /* end of group USART_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- USB Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USB_Peripheral_Access_Layer USB Peripheral Access Layer
- * @{
- */
-
-/** USB - Register Layout Typedef */
-typedef struct {
- __IO uint32_t DEVCMDSTAT; /**< USB Device Command/Status register, offset: 0x0 */
- __IO uint32_t INFO; /**< USB Info register, offset: 0x4 */
- __IO uint32_t EPLISTSTART; /**< USB EP Command/Status List start address, offset: 0x8 */
- __IO uint32_t DATABUFSTART; /**< USB Data buffer start address, offset: 0xC */
- __IO uint32_t LPM; /**< USB Link Power Management register, offset: 0x10 */
- __IO uint32_t EPSKIP; /**< USB Endpoint skip, offset: 0x14 */
- __IO uint32_t EPINUSE; /**< USB Endpoint Buffer in use, offset: 0x18 */
- __IO uint32_t EPBUFCFG; /**< USB Endpoint Buffer Configuration register, offset: 0x1C */
- __IO uint32_t INTSTAT; /**< USB interrupt status register, offset: 0x20 */
- __IO uint32_t INTEN; /**< USB interrupt enable register, offset: 0x24 */
- __IO uint32_t INTSETSTAT; /**< USB set interrupt status register, offset: 0x28 */
- uint8_t RESERVED_0[8];
- __IO uint32_t EPTOGGLE; /**< USB Endpoint toggle register, offset: 0x34 */
-} USB_Type;
-
-/* ----------------------------------------------------------------------------
- -- USB Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USB_Register_Masks USB Register Masks
- * @{
- */
-
-/*! @name DEVCMDSTAT - USB Device Command/Status register */
-/*! @{ */
-#define USB_DEVCMDSTAT_DEV_ADDR_MASK (0x7FU)
-#define USB_DEVCMDSTAT_DEV_ADDR_SHIFT (0U)
-/*! DEV_ADDR - USB device address. After bus reset, the address is reset to 0x00. If the enable bit
- * is set, the device will respond on packets for function address DEV_ADDR. When receiving a
- * SetAddress Control Request from the USB host, software must program the new address before
- * completing the status phase of the SetAddress Control Request.
- */
-#define USB_DEVCMDSTAT_DEV_ADDR(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DEV_ADDR_SHIFT)) & USB_DEVCMDSTAT_DEV_ADDR_MASK)
-#define USB_DEVCMDSTAT_DEV_EN_MASK (0x80U)
-#define USB_DEVCMDSTAT_DEV_EN_SHIFT (7U)
-/*! DEV_EN - USB device enable. If this bit is set, the HW will start responding on packets for function address DEV_ADDR.
- */
-#define USB_DEVCMDSTAT_DEV_EN(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DEV_EN_SHIFT)) & USB_DEVCMDSTAT_DEV_EN_MASK)
-#define USB_DEVCMDSTAT_SETUP_MASK (0x100U)
-#define USB_DEVCMDSTAT_SETUP_SHIFT (8U)
-/*! SETUP - SETUP token received. If a SETUP token is received and acknowledged by the device, this
- * bit is set. As long as this bit is set all received IN and OUT tokens will be NAKed by HW. SW
- * must clear this bit by writing a one. If this bit is zero, HW will handle the tokens to the
- * CTRL EP0 as indicated by the CTRL EP0 IN and OUT data information programmed by SW.
- */
-#define USB_DEVCMDSTAT_SETUP(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_SETUP_SHIFT)) & USB_DEVCMDSTAT_SETUP_MASK)
-#define USB_DEVCMDSTAT_FORCE_NEEDCLK_MASK (0x200U)
-#define USB_DEVCMDSTAT_FORCE_NEEDCLK_SHIFT (9U)
-/*! FORCE_NEEDCLK - Forces the NEEDCLK output to always be on:
- * 0b0..USB_NEEDCLK has normal function.
- * 0b1..USB_NEEDCLK always 1. Clock will not be stopped in case of suspend.
- */
-#define USB_DEVCMDSTAT_FORCE_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_FORCE_NEEDCLK_SHIFT)) & USB_DEVCMDSTAT_FORCE_NEEDCLK_MASK)
-#define USB_DEVCMDSTAT_LPM_SUP_MASK (0x800U)
-#define USB_DEVCMDSTAT_LPM_SUP_SHIFT (11U)
-/*! LPM_SUP - LPM Supported:
- * 0b0..LPM not supported.
- * 0b1..LPM supported.
- */
-#define USB_DEVCMDSTAT_LPM_SUP(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_LPM_SUP_SHIFT)) & USB_DEVCMDSTAT_LPM_SUP_MASK)
-#define USB_DEVCMDSTAT_INTONNAK_AO_MASK (0x1000U)
-#define USB_DEVCMDSTAT_INTONNAK_AO_SHIFT (12U)
-/*! INTONNAK_AO - Interrupt on NAK for interrupt and bulk OUT EP
- * 0b0..Only acknowledged packets generate an interrupt
- * 0b1..Both acknowledged and NAKed packets generate interrupts.
- */
-#define USB_DEVCMDSTAT_INTONNAK_AO(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_INTONNAK_AO_SHIFT)) & USB_DEVCMDSTAT_INTONNAK_AO_MASK)
-#define USB_DEVCMDSTAT_INTONNAK_AI_MASK (0x2000U)
-#define USB_DEVCMDSTAT_INTONNAK_AI_SHIFT (13U)
-/*! INTONNAK_AI - Interrupt on NAK for interrupt and bulk IN EP
- * 0b0..Only acknowledged packets generate an interrupt
- * 0b1..Both acknowledged and NAKed packets generate interrupts.
- */
-#define USB_DEVCMDSTAT_INTONNAK_AI(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_INTONNAK_AI_SHIFT)) & USB_DEVCMDSTAT_INTONNAK_AI_MASK)
-#define USB_DEVCMDSTAT_INTONNAK_CO_MASK (0x4000U)
-#define USB_DEVCMDSTAT_INTONNAK_CO_SHIFT (14U)
-/*! INTONNAK_CO - Interrupt on NAK for control OUT EP
- * 0b0..Only acknowledged packets generate an interrupt
- * 0b1..Both acknowledged and NAKed packets generate interrupts.
- */
-#define USB_DEVCMDSTAT_INTONNAK_CO(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_INTONNAK_CO_SHIFT)) & USB_DEVCMDSTAT_INTONNAK_CO_MASK)
-#define USB_DEVCMDSTAT_INTONNAK_CI_MASK (0x8000U)
-#define USB_DEVCMDSTAT_INTONNAK_CI_SHIFT (15U)
-/*! INTONNAK_CI - Interrupt on NAK for control IN EP
- * 0b0..Only acknowledged packets generate an interrupt
- * 0b1..Both acknowledged and NAKed packets generate interrupts.
- */
-#define USB_DEVCMDSTAT_INTONNAK_CI(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_INTONNAK_CI_SHIFT)) & USB_DEVCMDSTAT_INTONNAK_CI_MASK)
-#define USB_DEVCMDSTAT_DCON_MASK (0x10000U)
-#define USB_DEVCMDSTAT_DCON_SHIFT (16U)
-/*! DCON - Device status - connect. The connect bit must be set by SW to indicate that the device
- * must signal a connect. The pull-up resistor on USB_DP will be enabled when this bit is set and
- * the VBUSDEBOUNCED bit is one.
- */
-#define USB_DEVCMDSTAT_DCON(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DCON_SHIFT)) & USB_DEVCMDSTAT_DCON_MASK)
-#define USB_DEVCMDSTAT_DSUS_MASK (0x20000U)
-#define USB_DEVCMDSTAT_DSUS_SHIFT (17U)
-/*! DSUS - Device status - suspend. The suspend bit indicates the current suspend state. It is set
- * to 1 when the device hasn't seen any activity on its upstream port for more than 3
- * milliseconds. It is reset to 0 on any activity. When the device is suspended (Suspend bit DSUS = 1) and
- * the software writes a 0 to it, the device will generate a remote wake-up. This will only happen
- * when the device is connected (Connect bit = 1). When the device is not connected or not
- * suspended, a writing a 0 has no effect. Writing a 1 never has an effect.
- */
-#define USB_DEVCMDSTAT_DSUS(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DSUS_SHIFT)) & USB_DEVCMDSTAT_DSUS_MASK)
-#define USB_DEVCMDSTAT_LPM_SUS_MASK (0x80000U)
-#define USB_DEVCMDSTAT_LPM_SUS_SHIFT (19U)
-/*! LPM_SUS - Device status - LPM Suspend. This bit represents the current LPM suspend state. It is
- * set to 1 by HW when the device has acknowledged the LPM request from the USB host and the
- * Token Retry Time of 10 ms has elapsed. When the device is in the LPM suspended state (LPM suspend
- * bit = 1) and the software writes a zero to this bit, the device will generate a remote
- * walk-up. Software can only write a zero to this bit when the LPM_REWP bit is set to 1. HW resets this
- * bit when it receives a host initiated resume. HW only updates the LPM_SUS bit when the
- * LPM_SUPP bit is equal to one.
- */
-#define USB_DEVCMDSTAT_LPM_SUS(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_LPM_SUS_SHIFT)) & USB_DEVCMDSTAT_LPM_SUS_MASK)
-#define USB_DEVCMDSTAT_LPM_REWP_MASK (0x100000U)
-#define USB_DEVCMDSTAT_LPM_REWP_SHIFT (20U)
-/*! LPM_REWP - LPM Remote Wake-up Enabled by USB host. HW sets this bit to one when the bRemoteWake
- * bit in the LPM extended token is set to 1. HW will reset this bit to 0 when it receives the
- * host initiated LPM resume, when a remote wake-up is sent by the device or when a USB bus reset
- * is received. Software can use this bit to check if the remote wake-up feature is enabled by the
- * host for the LPM transaction.
- */
-#define USB_DEVCMDSTAT_LPM_REWP(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_LPM_REWP_SHIFT)) & USB_DEVCMDSTAT_LPM_REWP_MASK)
-#define USB_DEVCMDSTAT_DCON_C_MASK (0x1000000U)
-#define USB_DEVCMDSTAT_DCON_C_SHIFT (24U)
-/*! DCON_C - Device status - connect change. The Connect Change bit is set when the device's pull-up
- * resistor is disconnected because VBus disappeared. The bit is reset by writing a one to it.
- */
-#define USB_DEVCMDSTAT_DCON_C(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DCON_C_SHIFT)) & USB_DEVCMDSTAT_DCON_C_MASK)
-#define USB_DEVCMDSTAT_DSUS_C_MASK (0x2000000U)
-#define USB_DEVCMDSTAT_DSUS_C_SHIFT (25U)
-/*! DSUS_C - Device status - suspend change. The suspend change bit is set to 1 when the suspend bit
- * toggles. The suspend bit can toggle because: - The device goes in the suspended state - The
- * device is disconnected - The device receives resume signaling on its upstream port. The bit is
- * reset by writing a one to it.
- */
-#define USB_DEVCMDSTAT_DSUS_C(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DSUS_C_SHIFT)) & USB_DEVCMDSTAT_DSUS_C_MASK)
-#define USB_DEVCMDSTAT_DRES_C_MASK (0x4000000U)
-#define USB_DEVCMDSTAT_DRES_C_SHIFT (26U)
-/*! DRES_C - Device status - reset change. This bit is set when the device received a bus reset. On
- * a bus reset the device will automatically go to the default state (unconfigured and responding
- * to address 0). The bit is reset by writing a one to it.
- */
-#define USB_DEVCMDSTAT_DRES_C(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DRES_C_SHIFT)) & USB_DEVCMDSTAT_DRES_C_MASK)
-#define USB_DEVCMDSTAT_VBUSDEBOUNCED_MASK (0x10000000U)
-#define USB_DEVCMDSTAT_VBUSDEBOUNCED_SHIFT (28U)
-/*! VBUSDEBOUNCED - This bit indicates if Vbus is detected or not. The bit raises immediately when
- * Vbus becomes high. It drops to zero if Vbus is low for at least 3 ms. If this bit is high and
- * the DCon bit is set, the HW will enable the pull-up resistor to signal a connect.
- */
-#define USB_DEVCMDSTAT_VBUSDEBOUNCED(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_VBUSDEBOUNCED_SHIFT)) & USB_DEVCMDSTAT_VBUSDEBOUNCED_MASK)
-/*! @} */
-
-/*! @name INFO - USB Info register */
-/*! @{ */
-#define USB_INFO_FRAME_NR_MASK (0x7FFU)
-#define USB_INFO_FRAME_NR_SHIFT (0U)
-/*! FRAME_NR - Frame number. This contains the frame number of the last successfully received SOF.
- * In case no SOF was received by the device at the beginning of a frame, the frame number
- * returned is that of the last successfully received SOF. In case the SOF frame number contained a CRC
- * error, the frame number returned will be the corrupted frame number as received by the device.
- */
-#define USB_INFO_FRAME_NR(x) (((uint32_t)(((uint32_t)(x)) << USB_INFO_FRAME_NR_SHIFT)) & USB_INFO_FRAME_NR_MASK)
-#define USB_INFO_ERR_CODE_MASK (0x7800U)
-#define USB_INFO_ERR_CODE_SHIFT (11U)
-/*! ERR_CODE - The error code which last occurred:
- * 0b0000..No error
- * 0b0001..PID encoding error
- * 0b0010..PID unknown
- * 0b0011..Packet unexpected
- * 0b0100..Token CRC error
- * 0b0101..Data CRC error
- * 0b0110..Time out
- * 0b0111..Babble
- * 0b1000..Truncated EOP
- * 0b1001..Sent/Received NAK
- * 0b1010..Sent Stall
- * 0b1011..Overrun
- * 0b1100..Sent empty packet
- * 0b1101..Bitstuff error
- * 0b1110..Sync error
- * 0b1111..Wrong data toggle
- */
-#define USB_INFO_ERR_CODE(x) (((uint32_t)(((uint32_t)(x)) << USB_INFO_ERR_CODE_SHIFT)) & USB_INFO_ERR_CODE_MASK)
-#define USB_INFO_MINREV_MASK (0xFF0000U)
-#define USB_INFO_MINREV_SHIFT (16U)
-/*! MINREV - Minor Revision.
- */
-#define USB_INFO_MINREV(x) (((uint32_t)(((uint32_t)(x)) << USB_INFO_MINREV_SHIFT)) & USB_INFO_MINREV_MASK)
-#define USB_INFO_MAJREV_MASK (0xFF000000U)
-#define USB_INFO_MAJREV_SHIFT (24U)
-/*! MAJREV - Major Revision.
- */
-#define USB_INFO_MAJREV(x) (((uint32_t)(((uint32_t)(x)) << USB_INFO_MAJREV_SHIFT)) & USB_INFO_MAJREV_MASK)
-/*! @} */
-
-/*! @name EPLISTSTART - USB EP Command/Status List start address */
-/*! @{ */
-#define USB_EPLISTSTART_EP_LIST_MASK (0xFFFFFF00U)
-#define USB_EPLISTSTART_EP_LIST_SHIFT (8U)
-/*! EP_LIST - Start address of the USB EP Command/Status List.
- */
-#define USB_EPLISTSTART_EP_LIST(x) (((uint32_t)(((uint32_t)(x)) << USB_EPLISTSTART_EP_LIST_SHIFT)) & USB_EPLISTSTART_EP_LIST_MASK)
-/*! @} */
-
-/*! @name DATABUFSTART - USB Data buffer start address */
-/*! @{ */
-#define USB_DATABUFSTART_DA_BUF_MASK (0xFFC00000U)
-#define USB_DATABUFSTART_DA_BUF_SHIFT (22U)
-/*! DA_BUF - Start address of the buffer pointer page where all endpoint data buffers are located.
- */
-#define USB_DATABUFSTART_DA_BUF(x) (((uint32_t)(((uint32_t)(x)) << USB_DATABUFSTART_DA_BUF_SHIFT)) & USB_DATABUFSTART_DA_BUF_MASK)
-/*! @} */
-
-/*! @name LPM - USB Link Power Management register */
-/*! @{ */
-#define USB_LPM_HIRD_HW_MASK (0xFU)
-#define USB_LPM_HIRD_HW_SHIFT (0U)
-/*! HIRD_HW - Host Initiated Resume Duration - HW. This is the HIRD value from the last received LPM token
- */
-#define USB_LPM_HIRD_HW(x) (((uint32_t)(((uint32_t)(x)) << USB_LPM_HIRD_HW_SHIFT)) & USB_LPM_HIRD_HW_MASK)
-#define USB_LPM_HIRD_SW_MASK (0xF0U)
-#define USB_LPM_HIRD_SW_SHIFT (4U)
-/*! HIRD_SW - Host Initiated Resume Duration - SW. This is the time duration required by the USB
- * device system to come out of LPM initiated suspend after receiving the host initiated LPM resume.
- */
-#define USB_LPM_HIRD_SW(x) (((uint32_t)(((uint32_t)(x)) << USB_LPM_HIRD_SW_SHIFT)) & USB_LPM_HIRD_SW_MASK)
-#define USB_LPM_DATA_PENDING_MASK (0x100U)
-#define USB_LPM_DATA_PENDING_SHIFT (8U)
-/*! DATA_PENDING - As long as this bit is set to one and LPM supported bit is set to one, HW will
- * return a NYET handshake on every LPM token it receives. If LPM supported bit is set to one and
- * this bit is zero, HW will return an ACK handshake on every LPM token it receives. If SW has
- * still data pending and LPM is supported, it must set this bit to 1.
- */
-#define USB_LPM_DATA_PENDING(x) (((uint32_t)(((uint32_t)(x)) << USB_LPM_DATA_PENDING_SHIFT)) & USB_LPM_DATA_PENDING_MASK)
-/*! @} */
-
-/*! @name EPSKIP - USB Endpoint skip */
-/*! @{ */
-#define USB_EPSKIP_SKIP_MASK (0x3FFU)
-#define USB_EPSKIP_SKIP_SHIFT (0U)
-/*! SKIP - Endpoint skip: Writing 1 to one of these bits, will indicate to HW that it must
- * deactivate the buffer assigned to this endpoint and return control back to software. When HW has
- * deactivated the endpoint, it will clear this bit, but it will not modify the EPINUSE bit. An
- * interrupt will be generated when the Active bit goes from 1 to 0. Note: In case of double-buffering,
- * HW will only clear the Active bit of the buffer indicated by the EPINUSE bit.
- */
-#define USB_EPSKIP_SKIP(x) (((uint32_t)(((uint32_t)(x)) << USB_EPSKIP_SKIP_SHIFT)) & USB_EPSKIP_SKIP_MASK)
-/*! @} */
-
-/*! @name EPINUSE - USB Endpoint Buffer in use */
-/*! @{ */
-#define USB_EPINUSE_BUF_MASK (0x3FCU)
-#define USB_EPINUSE_BUF_SHIFT (2U)
-/*! BUF - Buffer in use: This register has one bit per physical endpoint. 0: HW is accessing buffer
- * 0. 1: HW is accessing buffer 1.
- */
-#define USB_EPINUSE_BUF(x) (((uint32_t)(((uint32_t)(x)) << USB_EPINUSE_BUF_SHIFT)) & USB_EPINUSE_BUF_MASK)
-/*! @} */
-
-/*! @name EPBUFCFG - USB Endpoint Buffer Configuration register */
-/*! @{ */
-#define USB_EPBUFCFG_BUF_SB_MASK (0x3FCU)
-#define USB_EPBUFCFG_BUF_SB_SHIFT (2U)
-/*! BUF_SB - Buffer usage: This register has one bit per physical endpoint. 0: Single-buffer. 1:
- * Double-buffer. If the bit is set to single-buffer (0), it will not toggle the corresponding
- * EPINUSE bit when it clears the active bit. If the bit is set to double-buffer (1), HW will toggle
- * the EPINUSE bit when it clears the Active bit for the buffer.
- */
-#define USB_EPBUFCFG_BUF_SB(x) (((uint32_t)(((uint32_t)(x)) << USB_EPBUFCFG_BUF_SB_SHIFT)) & USB_EPBUFCFG_BUF_SB_MASK)
-/*! @} */
-
-/*! @name INTSTAT - USB interrupt status register */
-/*! @{ */
-#define USB_INTSTAT_EP0OUT_MASK (0x1U)
-#define USB_INTSTAT_EP0OUT_SHIFT (0U)
-/*! EP0OUT - Interrupt status register bit for the Control EP0 OUT direction. This bit will be set
- * if NBytes transitions to zero or the skip bit is set by software or a SETUP packet is
- * successfully received for the control EP0. If the IntOnNAK_CO is set, this bit will also be set when a
- * NAK is transmitted for the Control EP0 OUT direction. Software can clear this bit by writing a
- * one to it.
- */
-#define USB_INTSTAT_EP0OUT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP0OUT_SHIFT)) & USB_INTSTAT_EP0OUT_MASK)
-#define USB_INTSTAT_EP0IN_MASK (0x2U)
-#define USB_INTSTAT_EP0IN_SHIFT (1U)
-/*! EP0IN - Interrupt status register bit for the Control EP0 IN direction. This bit will be set if
- * NBytes transitions to zero or the skip bit is set by software. If the IntOnNAK_CI is set, this
- * bit will also be set when a NAK is transmitted for the Control EP0 IN direction. Software can
- * clear this bit by writing a one to it.
- */
-#define USB_INTSTAT_EP0IN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP0IN_SHIFT)) & USB_INTSTAT_EP0IN_MASK)
-#define USB_INTSTAT_EP1OUT_MASK (0x4U)
-#define USB_INTSTAT_EP1OUT_SHIFT (2U)
-/*! EP1OUT - Interrupt status register bit for the EP1 OUT direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes
- * transitions to zero or the skip bit is set by software. If the IntOnNAK_AO is set, this bit will also be
- * set when a NAK is transmitted for the EP1 OUT direction. Software can clear this bit by
- * writing a one to it.
- */
-#define USB_INTSTAT_EP1OUT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP1OUT_SHIFT)) & USB_INTSTAT_EP1OUT_MASK)
-#define USB_INTSTAT_EP1IN_MASK (0x8U)
-#define USB_INTSTAT_EP1IN_SHIFT (3U)
-/*! EP1IN - Interrupt status register bit for the EP1 IN direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes transitions
- * to zero or the skip bit is set by software. If the IntOnNAK_AI is set, this bit will also be
- * set when a NAK is transmitted for the EP1 IN direction. Software can clear this bit by writing
- * a one to it.
- */
-#define USB_INTSTAT_EP1IN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP1IN_SHIFT)) & USB_INTSTAT_EP1IN_MASK)
-#define USB_INTSTAT_EP2OUT_MASK (0x10U)
-#define USB_INTSTAT_EP2OUT_SHIFT (4U)
-/*! EP2OUT - Interrupt status register bit for the EP2 OUT direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes
- * transitions to zero or the skip bit is set by software. If the IntOnNAK_AO is set, this bit will also be
- * set when a NAK is transmitted for the EP2 OUT direction. Software can clear this bit by
- * writing a one to it.
- */
-#define USB_INTSTAT_EP2OUT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP2OUT_SHIFT)) & USB_INTSTAT_EP2OUT_MASK)
-#define USB_INTSTAT_EP2IN_MASK (0x20U)
-#define USB_INTSTAT_EP2IN_SHIFT (5U)
-/*! EP2IN - Interrupt status register bit for the EP2 IN direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes transitions
- * to zero or the skip bit is set by software. If the IntOnNAK_AI is set, this bit will also be
- * set when a NAK is transmitted for the EP2 IN direction. Software can clear this bit by writing
- * a one to it.
- */
-#define USB_INTSTAT_EP2IN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP2IN_SHIFT)) & USB_INTSTAT_EP2IN_MASK)
-#define USB_INTSTAT_EP3OUT_MASK (0x40U)
-#define USB_INTSTAT_EP3OUT_SHIFT (6U)
-/*! EP3OUT - Interrupt status register bit for the EP3 OUT direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes
- * transitions to zero or the skip bit is set by software. If the IntOnNAK_AO is set, this bit will also be
- * set when a NAK is transmitted for the EP3 OUT direction. Software can clear this bit by
- * writing a one to it.
- */
-#define USB_INTSTAT_EP3OUT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP3OUT_SHIFT)) & USB_INTSTAT_EP3OUT_MASK)
-#define USB_INTSTAT_EP3IN_MASK (0x80U)
-#define USB_INTSTAT_EP3IN_SHIFT (7U)
-/*! EP3IN - Interrupt status register bit for the EP3 IN direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes transitions
- * to zero or the skip bit is set by software. If the IntOnNAK_AI is set, this bit will also be
- * set when a NAK is transmitted for the EP3 IN direction. Software can clear this bit by writing
- * a one to it.
- */
-#define USB_INTSTAT_EP3IN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP3IN_SHIFT)) & USB_INTSTAT_EP3IN_MASK)
-#define USB_INTSTAT_EP4OUT_MASK (0x100U)
-#define USB_INTSTAT_EP4OUT_SHIFT (8U)
-/*! EP4OUT - Interrupt status register bit for the EP4 OUT direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes
- * transitions to zero or the skip bit is set by software. If the IntOnNAK_AO is set, this bit will also be
- * set when a NAK is transmitted for the EP4 OUT direction. Software can clear this bit by
- * writing a one to it.
- */
-#define USB_INTSTAT_EP4OUT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP4OUT_SHIFT)) & USB_INTSTAT_EP4OUT_MASK)
-#define USB_INTSTAT_EP4IN_MASK (0x200U)
-#define USB_INTSTAT_EP4IN_SHIFT (9U)
-/*! EP4IN - Interrupt status register bit for the EP4 IN direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes transitions
- * to zero or the skip bit is set by software. If the IntOnNAK_AI is set, this bit will also be
- * set when a NAK is transmitted for the EP4 IN direction. Software can clear this bit by writing
- * a one to it.
- */
-#define USB_INTSTAT_EP4IN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP4IN_SHIFT)) & USB_INTSTAT_EP4IN_MASK)
-#define USB_INTSTAT_FRAME_INT_MASK (0x40000000U)
-#define USB_INTSTAT_FRAME_INT_SHIFT (30U)
-/*! FRAME_INT - Frame interrupt. This bit is set to one every millisecond when the VbusDebounced bit
- * and the DCON bit are set. This bit can be used by software when handling isochronous
- * endpoints. Software can clear this bit by writing a one to it.
- */
-#define USB_INTSTAT_FRAME_INT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_FRAME_INT_SHIFT)) & USB_INTSTAT_FRAME_INT_MASK)
-#define USB_INTSTAT_DEV_INT_MASK (0x80000000U)
-#define USB_INTSTAT_DEV_INT_SHIFT (31U)
-/*! DEV_INT - Device status interrupt. This bit is set by HW when one of the bits in the Device
- * Status Change register are set. Software can clear this bit by writing a one to it.
- */
-#define USB_INTSTAT_DEV_INT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_DEV_INT_SHIFT)) & USB_INTSTAT_DEV_INT_MASK)
-/*! @} */
-
-/*! @name INTEN - USB interrupt enable register */
-/*! @{ */
-#define USB_INTEN_EP_INT_EN_MASK (0x3FFU)
-#define USB_INTEN_EP_INT_EN_SHIFT (0U)
-/*! EP_INT_EN - If this bit is set and the corresponding USB interrupt status bit is set, a HW
- * interrupt is generated on the interrupt line indicated by the corresponding USB interrupt routing
- * bit.
- */
-#define USB_INTEN_EP_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTEN_EP_INT_EN_SHIFT)) & USB_INTEN_EP_INT_EN_MASK)
-#define USB_INTEN_FRAME_INT_EN_MASK (0x40000000U)
-#define USB_INTEN_FRAME_INT_EN_SHIFT (30U)
-/*! FRAME_INT_EN - If this bit is set and the corresponding USB interrupt status bit is set, a HW
- * interrupt is generated on the interrupt line indicated by the corresponding USB interrupt
- * routing bit.
- */
-#define USB_INTEN_FRAME_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTEN_FRAME_INT_EN_SHIFT)) & USB_INTEN_FRAME_INT_EN_MASK)
-#define USB_INTEN_DEV_INT_EN_MASK (0x80000000U)
-#define USB_INTEN_DEV_INT_EN_SHIFT (31U)
-/*! DEV_INT_EN - If this bit is set and the corresponding USB interrupt status bit is set, a HW
- * interrupt is generated on the interrupt line indicated by the corresponding USB interrupt routing
- * bit.
- */
-#define USB_INTEN_DEV_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTEN_DEV_INT_EN_SHIFT)) & USB_INTEN_DEV_INT_EN_MASK)
-/*! @} */
-
-/*! @name INTSETSTAT - USB set interrupt status register */
-/*! @{ */
-#define USB_INTSETSTAT_EP_SET_INT_MASK (0x3FFU)
-#define USB_INTSETSTAT_EP_SET_INT_SHIFT (0U)
-/*! EP_SET_INT - If software writes a one to one of these bits, the corresponding USB interrupt
- * status bit is set. When this register is read, the same value as the USB interrupt status register
- * is returned.
- */
-#define USB_INTSETSTAT_EP_SET_INT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSETSTAT_EP_SET_INT_SHIFT)) & USB_INTSETSTAT_EP_SET_INT_MASK)
-#define USB_INTSETSTAT_FRAME_SET_INT_MASK (0x40000000U)
-#define USB_INTSETSTAT_FRAME_SET_INT_SHIFT (30U)
-/*! FRAME_SET_INT - If software writes a one to one of these bits, the corresponding USB interrupt
- * status bit is set. When this register is read, the same value as the USB interrupt status
- * register is returned.
- */
-#define USB_INTSETSTAT_FRAME_SET_INT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSETSTAT_FRAME_SET_INT_SHIFT)) & USB_INTSETSTAT_FRAME_SET_INT_MASK)
-#define USB_INTSETSTAT_DEV_SET_INT_MASK (0x80000000U)
-#define USB_INTSETSTAT_DEV_SET_INT_SHIFT (31U)
-/*! DEV_SET_INT - If software writes a one to one of these bits, the corresponding USB interrupt
- * status bit is set. When this register is read, the same value as the USB interrupt status
- * register is returned.
- */
-#define USB_INTSETSTAT_DEV_SET_INT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSETSTAT_DEV_SET_INT_SHIFT)) & USB_INTSETSTAT_DEV_SET_INT_MASK)
-/*! @} */
-
-/*! @name EPTOGGLE - USB Endpoint toggle register */
-/*! @{ */
-#define USB_EPTOGGLE_TOGGLE_MASK (0x3FFU)
-#define USB_EPTOGGLE_TOGGLE_SHIFT (0U)
-/*! TOGGLE - Endpoint data toggle: This field indicates the current value of the data toggle for the corresponding endpoint.
- */
-#define USB_EPTOGGLE_TOGGLE(x) (((uint32_t)(((uint32_t)(x)) << USB_EPTOGGLE_TOGGLE_SHIFT)) & USB_EPTOGGLE_TOGGLE_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group USB_Register_Masks */
-
-
-/* USB - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral USB0 base address */
- #define USB0_BASE (0x50084000u)
- /** Peripheral USB0 base address */
- #define USB0_BASE_NS (0x40084000u)
- /** Peripheral USB0 base pointer */
- #define USB0 ((USB_Type *)USB0_BASE)
- /** Peripheral USB0 base pointer */
- #define USB0_NS ((USB_Type *)USB0_BASE_NS)
- /** Array initializer of USB peripheral base addresses */
- #define USB_BASE_ADDRS { USB0_BASE }
- /** Array initializer of USB peripheral base pointers */
- #define USB_BASE_PTRS { USB0 }
- /** Array initializer of USB peripheral base addresses */
- #define USB_BASE_ADDRS_NS { USB0_BASE_NS }
- /** Array initializer of USB peripheral base pointers */
- #define USB_BASE_PTRS_NS { USB0_NS }
-#else
- /** Peripheral USB0 base address */
- #define USB0_BASE (0x40084000u)
- /** Peripheral USB0 base pointer */
- #define USB0 ((USB_Type *)USB0_BASE)
- /** Array initializer of USB peripheral base addresses */
- #define USB_BASE_ADDRS { USB0_BASE }
- /** Array initializer of USB peripheral base pointers */
- #define USB_BASE_PTRS { USB0 }
-#endif
-/** Interrupt vectors for the USB peripheral type */
-#define USB_IRQS { USB0_IRQn }
-#define USB_NEEDCLK_IRQS { USB0_NEEDCLK_IRQn }
-
-/*!
- * @}
- */ /* end of group USB_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- USBFSH Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBFSH_Peripheral_Access_Layer USBFSH Peripheral Access Layer
- * @{
- */
-
-/** USBFSH - Register Layout Typedef */
-typedef struct {
- __I uint32_t HCREVISION; /**< BCD representation of the version of the HCI specification that is implemented by the Host Controller (HC), offset: 0x0 */
- __IO uint32_t HCCONTROL; /**< Defines the operating modes of the HC, offset: 0x4 */
- __IO uint32_t HCCOMMANDSTATUS; /**< This register is used to receive the commands from the Host Controller Driver (HCD), offset: 0x8 */
- __IO uint32_t HCINTERRUPTSTATUS; /**< Indicates the status on various events that cause hardware interrupts by setting the appropriate bits, offset: 0xC */
- __IO uint32_t HCINTERRUPTENABLE; /**< Controls the bits in the HcInterruptStatus register and indicates which events will generate a hardware interrupt, offset: 0x10 */
- __IO uint32_t HCINTERRUPTDISABLE; /**< The bits in this register are used to disable corresponding bits in the HCInterruptStatus register and in turn disable that event leading to hardware interrupt, offset: 0x14 */
- __IO uint32_t HCHCCA; /**< Contains the physical address of the host controller communication area, offset: 0x18 */
- __I uint32_t HCPERIODCURRENTED; /**< Contains the physical address of the current isochronous or interrupt endpoint descriptor, offset: 0x1C */
- __IO uint32_t HCCONTROLHEADED; /**< Contains the physical address of the first endpoint descriptor of the control list, offset: 0x20 */
- __IO uint32_t HCCONTROLCURRENTED; /**< Contains the physical address of the current endpoint descriptor of the control list, offset: 0x24 */
- __IO uint32_t HCBULKHEADED; /**< Contains the physical address of the first endpoint descriptor of the bulk list, offset: 0x28 */
- __IO uint32_t HCBULKCURRENTED; /**< Contains the physical address of the current endpoint descriptor of the bulk list, offset: 0x2C */
- __I uint32_t HCDONEHEAD; /**< Contains the physical address of the last transfer descriptor added to the 'Done' queue, offset: 0x30 */
- __IO uint32_t HCFMINTERVAL; /**< Defines the bit time interval in a frame and the full speed maximum packet size which would not cause an overrun, offset: 0x34 */
- __I uint32_t HCFMREMAINING; /**< A 14-bit counter showing the bit time remaining in the current frame, offset: 0x38 */
- __I uint32_t HCFMNUMBER; /**< Contains a 16-bit counter and provides the timing reference among events happening in the HC and the HCD, offset: 0x3C */
- __IO uint32_t HCPERIODICSTART; /**< Contains a programmable 14-bit value which determines the earliest time HC should start processing a periodic list, offset: 0x40 */
- __IO uint32_t HCLSTHRESHOLD; /**< Contains 11-bit value which is used by the HC to determine whether to commit to transfer a maximum of 8-byte LS packet before EOF, offset: 0x44 */
- __IO uint32_t HCRHDESCRIPTORA; /**< First of the two registers which describes the characteristics of the root hub, offset: 0x48 */
- __IO uint32_t HCRHDESCRIPTORB; /**< Second of the two registers which describes the characteristics of the Root Hub, offset: 0x4C */
- __IO uint32_t HCRHSTATUS; /**< This register is divided into two parts, offset: 0x50 */
- __IO uint32_t HCRHPORTSTATUS; /**< Controls and reports the port events on a per-port basis, offset: 0x54 */
- uint8_t RESERVED_0[4];
- __IO uint32_t PORTMODE; /**< Controls the port if it is attached to the host block or the device block, offset: 0x5C */
-} USBFSH_Type;
-
-/* ----------------------------------------------------------------------------
- -- USBFSH Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBFSH_Register_Masks USBFSH Register Masks
- * @{
- */
-
-/*! @name HCREVISION - BCD representation of the version of the HCI specification that is implemented by the Host Controller (HC) */
-/*! @{ */
-#define USBFSH_HCREVISION_REV_MASK (0xFFU)
-#define USBFSH_HCREVISION_REV_SHIFT (0U)
-/*! REV - Revision.
- */
-#define USBFSH_HCREVISION_REV(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCREVISION_REV_SHIFT)) & USBFSH_HCREVISION_REV_MASK)
-/*! @} */
-
-/*! @name HCCONTROL - Defines the operating modes of the HC */
-/*! @{ */
-#define USBFSH_HCCONTROL_CBSR_MASK (0x3U)
-#define USBFSH_HCCONTROL_CBSR_SHIFT (0U)
-/*! CBSR - ControlBulkServiceRatio.
- */
-#define USBFSH_HCCONTROL_CBSR(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_CBSR_SHIFT)) & USBFSH_HCCONTROL_CBSR_MASK)
-#define USBFSH_HCCONTROL_PLE_MASK (0x4U)
-#define USBFSH_HCCONTROL_PLE_SHIFT (2U)
-/*! PLE - PeriodicListEnable.
- */
-#define USBFSH_HCCONTROL_PLE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_PLE_SHIFT)) & USBFSH_HCCONTROL_PLE_MASK)
-#define USBFSH_HCCONTROL_IE_MASK (0x8U)
-#define USBFSH_HCCONTROL_IE_SHIFT (3U)
-/*! IE - IsochronousEnable.
- */
-#define USBFSH_HCCONTROL_IE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_IE_SHIFT)) & USBFSH_HCCONTROL_IE_MASK)
-#define USBFSH_HCCONTROL_CLE_MASK (0x10U)
-#define USBFSH_HCCONTROL_CLE_SHIFT (4U)
-/*! CLE - ControlListEnable.
- */
-#define USBFSH_HCCONTROL_CLE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_CLE_SHIFT)) & USBFSH_HCCONTROL_CLE_MASK)
-#define USBFSH_HCCONTROL_BLE_MASK (0x20U)
-#define USBFSH_HCCONTROL_BLE_SHIFT (5U)
-/*! BLE - BulkListEnable This bit is set to enable the processing of the Bulk list in the next Frame.
- */
-#define USBFSH_HCCONTROL_BLE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_BLE_SHIFT)) & USBFSH_HCCONTROL_BLE_MASK)
-#define USBFSH_HCCONTROL_HCFS_MASK (0xC0U)
-#define USBFSH_HCCONTROL_HCFS_SHIFT (6U)
-/*! HCFS - HostControllerFunctionalState for USB 00b: USBRESET 01b: USBRESUME 10b: USBOPERATIONAL
- * 11b: USBSUSPEND A transition to USBOPERATIONAL from another state causes SOFgeneration to begin
- * 1 ms later.
- */
-#define USBFSH_HCCONTROL_HCFS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_HCFS_SHIFT)) & USBFSH_HCCONTROL_HCFS_MASK)
-#define USBFSH_HCCONTROL_IR_MASK (0x100U)
-#define USBFSH_HCCONTROL_IR_SHIFT (8U)
-/*! IR - InterruptRouting This bit determines the routing of interrupts generated by events registered in HcInterruptStatus.
- */
-#define USBFSH_HCCONTROL_IR(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_IR_SHIFT)) & USBFSH_HCCONTROL_IR_MASK)
-#define USBFSH_HCCONTROL_RWC_MASK (0x200U)
-#define USBFSH_HCCONTROL_RWC_SHIFT (9U)
-/*! RWC - RemoteWakeupConnected This bit indicates whether HC supports remote wake-up signaling.
- */
-#define USBFSH_HCCONTROL_RWC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_RWC_SHIFT)) & USBFSH_HCCONTROL_RWC_MASK)
-#define USBFSH_HCCONTROL_RWE_MASK (0x400U)
-#define USBFSH_HCCONTROL_RWE_SHIFT (10U)
-/*! RWE - RemoteWakeupEnable This bit is used by HCD to enable or disable the remote wake-up feature
- * upon the detection of upstream resume signaling.
- */
-#define USBFSH_HCCONTROL_RWE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_RWE_SHIFT)) & USBFSH_HCCONTROL_RWE_MASK)
-/*! @} */
-
-/*! @name HCCOMMANDSTATUS - This register is used to receive the commands from the Host Controller Driver (HCD) */
-/*! @{ */
-#define USBFSH_HCCOMMANDSTATUS_HCR_MASK (0x1U)
-#define USBFSH_HCCOMMANDSTATUS_HCR_SHIFT (0U)
-/*! HCR - HostControllerReset This bit is set by HCD to initiate a software reset of HC.
- */
-#define USBFSH_HCCOMMANDSTATUS_HCR(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCOMMANDSTATUS_HCR_SHIFT)) & USBFSH_HCCOMMANDSTATUS_HCR_MASK)
-#define USBFSH_HCCOMMANDSTATUS_CLF_MASK (0x2U)
-#define USBFSH_HCCOMMANDSTATUS_CLF_SHIFT (1U)
-/*! CLF - ControlListFilled This bit is used to indicate whether there are any TDs on the Control list.
- */
-#define USBFSH_HCCOMMANDSTATUS_CLF(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCOMMANDSTATUS_CLF_SHIFT)) & USBFSH_HCCOMMANDSTATUS_CLF_MASK)
-#define USBFSH_HCCOMMANDSTATUS_BLF_MASK (0x4U)
-#define USBFSH_HCCOMMANDSTATUS_BLF_SHIFT (2U)
-/*! BLF - BulkListFilled This bit is used to indicate whether there are any TDs on the Bulk list.
- */
-#define USBFSH_HCCOMMANDSTATUS_BLF(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCOMMANDSTATUS_BLF_SHIFT)) & USBFSH_HCCOMMANDSTATUS_BLF_MASK)
-#define USBFSH_HCCOMMANDSTATUS_OCR_MASK (0x8U)
-#define USBFSH_HCCOMMANDSTATUS_OCR_SHIFT (3U)
-/*! OCR - OwnershipChangeRequest This bit is set by an OS HCD to request a change of control of the HC.
- */
-#define USBFSH_HCCOMMANDSTATUS_OCR(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCOMMANDSTATUS_OCR_SHIFT)) & USBFSH_HCCOMMANDSTATUS_OCR_MASK)
-#define USBFSH_HCCOMMANDSTATUS_SOC_MASK (0xC0U)
-#define USBFSH_HCCOMMANDSTATUS_SOC_SHIFT (6U)
-/*! SOC - SchedulingOverrunCount These bits are incremented on each scheduling overrun error.
- */
-#define USBFSH_HCCOMMANDSTATUS_SOC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCOMMANDSTATUS_SOC_SHIFT)) & USBFSH_HCCOMMANDSTATUS_SOC_MASK)
-/*! @} */
-
-/*! @name HCINTERRUPTSTATUS - Indicates the status on various events that cause hardware interrupts by setting the appropriate bits */
-/*! @{ */
-#define USBFSH_HCINTERRUPTSTATUS_SO_MASK (0x1U)
-#define USBFSH_HCINTERRUPTSTATUS_SO_SHIFT (0U)
-/*! SO - SchedulingOverrun This bit is set when the USB schedule for the current Frame overruns and
- * after the update of HccaFrameNumber.
- */
-#define USBFSH_HCINTERRUPTSTATUS_SO(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_SO_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_SO_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_WDH_MASK (0x2U)
-#define USBFSH_HCINTERRUPTSTATUS_WDH_SHIFT (1U)
-/*! WDH - WritebackDoneHead This bit is set immediately after HC has written HcDoneHead to HccaDoneHead.
- */
-#define USBFSH_HCINTERRUPTSTATUS_WDH(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_WDH_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_WDH_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_SF_MASK (0x4U)
-#define USBFSH_HCINTERRUPTSTATUS_SF_SHIFT (2U)
-/*! SF - StartofFrame This bit is set by HC at each start of a frame and after the update of HccaFrameNumber.
- */
-#define USBFSH_HCINTERRUPTSTATUS_SF(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_SF_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_SF_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_RD_MASK (0x8U)
-#define USBFSH_HCINTERRUPTSTATUS_RD_SHIFT (3U)
-/*! RD - ResumeDetected This bit is set when HC detects that a device on the USB is asserting resume signaling.
- */
-#define USBFSH_HCINTERRUPTSTATUS_RD(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_RD_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_RD_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_UE_MASK (0x10U)
-#define USBFSH_HCINTERRUPTSTATUS_UE_SHIFT (4U)
-/*! UE - UnrecoverableError This bit is set when HC detects a system error not related to USB.
- */
-#define USBFSH_HCINTERRUPTSTATUS_UE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_UE_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_UE_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_FNO_MASK (0x20U)
-#define USBFSH_HCINTERRUPTSTATUS_FNO_SHIFT (5U)
-/*! FNO - FrameNumberOverflow This bit is set when the MSb of HcFmNumber (bit 15) changes value,
- * from 0 to 1 or from 1 to 0, and after HccaFrameNumber has been updated.
- */
-#define USBFSH_HCINTERRUPTSTATUS_FNO(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_FNO_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_FNO_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_RHSC_MASK (0x40U)
-#define USBFSH_HCINTERRUPTSTATUS_RHSC_SHIFT (6U)
-/*! RHSC - RootHubStatusChange This bit is set when the content of HcRhStatus or the content of any
- * of HcRhPortStatus[NumberofDownstreamPort] has changed.
- */
-#define USBFSH_HCINTERRUPTSTATUS_RHSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_RHSC_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_RHSC_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_OC_MASK (0xFFFFFC00U)
-#define USBFSH_HCINTERRUPTSTATUS_OC_SHIFT (10U)
-/*! OC - OwnershipChange This bit is set by HC when HCD sets the OwnershipChangeRequest field in HcCommandStatus.
- */
-#define USBFSH_HCINTERRUPTSTATUS_OC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_OC_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_OC_MASK)
-/*! @} */
-
-/*! @name HCINTERRUPTENABLE - Controls the bits in the HcInterruptStatus register and indicates which events will generate a hardware interrupt */
-/*! @{ */
-#define USBFSH_HCINTERRUPTENABLE_SO_MASK (0x1U)
-#define USBFSH_HCINTERRUPTENABLE_SO_SHIFT (0U)
-/*! SO - Scheduling Overrun interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_SO(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_SO_SHIFT)) & USBFSH_HCINTERRUPTENABLE_SO_MASK)
-#define USBFSH_HCINTERRUPTENABLE_WDH_MASK (0x2U)
-#define USBFSH_HCINTERRUPTENABLE_WDH_SHIFT (1U)
-/*! WDH - HcDoneHead Writeback interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_WDH(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_WDH_SHIFT)) & USBFSH_HCINTERRUPTENABLE_WDH_MASK)
-#define USBFSH_HCINTERRUPTENABLE_SF_MASK (0x4U)
-#define USBFSH_HCINTERRUPTENABLE_SF_SHIFT (2U)
-/*! SF - Start of Frame interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_SF(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_SF_SHIFT)) & USBFSH_HCINTERRUPTENABLE_SF_MASK)
-#define USBFSH_HCINTERRUPTENABLE_RD_MASK (0x8U)
-#define USBFSH_HCINTERRUPTENABLE_RD_SHIFT (3U)
-/*! RD - Resume Detect interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_RD(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_RD_SHIFT)) & USBFSH_HCINTERRUPTENABLE_RD_MASK)
-#define USBFSH_HCINTERRUPTENABLE_UE_MASK (0x10U)
-#define USBFSH_HCINTERRUPTENABLE_UE_SHIFT (4U)
-/*! UE - Unrecoverable Error interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_UE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_UE_SHIFT)) & USBFSH_HCINTERRUPTENABLE_UE_MASK)
-#define USBFSH_HCINTERRUPTENABLE_FNO_MASK (0x20U)
-#define USBFSH_HCINTERRUPTENABLE_FNO_SHIFT (5U)
-/*! FNO - Frame Number Overflow interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_FNO(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_FNO_SHIFT)) & USBFSH_HCINTERRUPTENABLE_FNO_MASK)
-#define USBFSH_HCINTERRUPTENABLE_RHSC_MASK (0x40U)
-#define USBFSH_HCINTERRUPTENABLE_RHSC_SHIFT (6U)
-/*! RHSC - Root Hub Status Change interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_RHSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_RHSC_SHIFT)) & USBFSH_HCINTERRUPTENABLE_RHSC_MASK)
-#define USBFSH_HCINTERRUPTENABLE_OC_MASK (0x40000000U)
-#define USBFSH_HCINTERRUPTENABLE_OC_SHIFT (30U)
-/*! OC - Ownership Change interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_OC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_OC_SHIFT)) & USBFSH_HCINTERRUPTENABLE_OC_MASK)
-#define USBFSH_HCINTERRUPTENABLE_MIE_MASK (0x80000000U)
-#define USBFSH_HCINTERRUPTENABLE_MIE_SHIFT (31U)
-/*! MIE - Master Interrupt Enable.
- */
-#define USBFSH_HCINTERRUPTENABLE_MIE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_MIE_SHIFT)) & USBFSH_HCINTERRUPTENABLE_MIE_MASK)
-/*! @} */
-
-/*! @name HCINTERRUPTDISABLE - The bits in this register are used to disable corresponding bits in the HCInterruptStatus register and in turn disable that event leading to hardware interrupt */
-/*! @{ */
-#define USBFSH_HCINTERRUPTDISABLE_SO_MASK (0x1U)
-#define USBFSH_HCINTERRUPTDISABLE_SO_SHIFT (0U)
-/*! SO - Scheduling Overrun interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_SO(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_SO_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_SO_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_WDH_MASK (0x2U)
-#define USBFSH_HCINTERRUPTDISABLE_WDH_SHIFT (1U)
-/*! WDH - HcDoneHead Writeback interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_WDH(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_WDH_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_WDH_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_SF_MASK (0x4U)
-#define USBFSH_HCINTERRUPTDISABLE_SF_SHIFT (2U)
-/*! SF - Start of Frame interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_SF(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_SF_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_SF_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_RD_MASK (0x8U)
-#define USBFSH_HCINTERRUPTDISABLE_RD_SHIFT (3U)
-/*! RD - Resume Detect interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_RD(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_RD_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_RD_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_UE_MASK (0x10U)
-#define USBFSH_HCINTERRUPTDISABLE_UE_SHIFT (4U)
-/*! UE - Unrecoverable Error interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_UE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_UE_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_UE_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_FNO_MASK (0x20U)
-#define USBFSH_HCINTERRUPTDISABLE_FNO_SHIFT (5U)
-/*! FNO - Frame Number Overflow interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_FNO(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_FNO_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_FNO_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_RHSC_MASK (0x40U)
-#define USBFSH_HCINTERRUPTDISABLE_RHSC_SHIFT (6U)
-/*! RHSC - Root Hub Status Change interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_RHSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_RHSC_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_RHSC_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_OC_MASK (0x40000000U)
-#define USBFSH_HCINTERRUPTDISABLE_OC_SHIFT (30U)
-/*! OC - Ownership Change interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_OC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_OC_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_OC_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_MIE_MASK (0x80000000U)
-#define USBFSH_HCINTERRUPTDISABLE_MIE_SHIFT (31U)
-/*! MIE - A 0 written to this field is ignored by HC.
- */
-#define USBFSH_HCINTERRUPTDISABLE_MIE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_MIE_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_MIE_MASK)
-/*! @} */
-
-/*! @name HCHCCA - Contains the physical address of the host controller communication area */
-/*! @{ */
-#define USBFSH_HCHCCA_HCCA_MASK (0xFFFFFF00U)
-#define USBFSH_HCHCCA_HCCA_SHIFT (8U)
-/*! HCCA - Base address of the Host Controller Communication Area.
- */
-#define USBFSH_HCHCCA_HCCA(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCHCCA_HCCA_SHIFT)) & USBFSH_HCHCCA_HCCA_MASK)
-/*! @} */
-
-/*! @name HCPERIODCURRENTED - Contains the physical address of the current isochronous or interrupt endpoint descriptor */
-/*! @{ */
-#define USBFSH_HCPERIODCURRENTED_PCED_MASK (0xFFFFFFF0U)
-#define USBFSH_HCPERIODCURRENTED_PCED_SHIFT (4U)
-/*! PCED - The content of this register is updated by HC after a periodic ED is processed.
- */
-#define USBFSH_HCPERIODCURRENTED_PCED(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCPERIODCURRENTED_PCED_SHIFT)) & USBFSH_HCPERIODCURRENTED_PCED_MASK)
-/*! @} */
-
-/*! @name HCCONTROLHEADED - Contains the physical address of the first endpoint descriptor of the control list */
-/*! @{ */
-#define USBFSH_HCCONTROLHEADED_CHED_MASK (0xFFFFFFF0U)
-#define USBFSH_HCCONTROLHEADED_CHED_SHIFT (4U)
-/*! CHED - HC traverses the Control list starting with the HcControlHeadED pointer.
- */
-#define USBFSH_HCCONTROLHEADED_CHED(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROLHEADED_CHED_SHIFT)) & USBFSH_HCCONTROLHEADED_CHED_MASK)
-/*! @} */
-
-/*! @name HCCONTROLCURRENTED - Contains the physical address of the current endpoint descriptor of the control list */
-/*! @{ */
-#define USBFSH_HCCONTROLCURRENTED_CCED_MASK (0xFFFFFFF0U)
-#define USBFSH_HCCONTROLCURRENTED_CCED_SHIFT (4U)
-/*! CCED - ControlCurrentED.
- */
-#define USBFSH_HCCONTROLCURRENTED_CCED(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROLCURRENTED_CCED_SHIFT)) & USBFSH_HCCONTROLCURRENTED_CCED_MASK)
-/*! @} */
-
-/*! @name HCBULKHEADED - Contains the physical address of the first endpoint descriptor of the bulk list */
-/*! @{ */
-#define USBFSH_HCBULKHEADED_BHED_MASK (0xFFFFFFF0U)
-#define USBFSH_HCBULKHEADED_BHED_SHIFT (4U)
-/*! BHED - BulkHeadED HC traverses the bulk list starting with the HcBulkHeadED pointer.
- */
-#define USBFSH_HCBULKHEADED_BHED(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCBULKHEADED_BHED_SHIFT)) & USBFSH_HCBULKHEADED_BHED_MASK)
-/*! @} */
-
-/*! @name HCBULKCURRENTED - Contains the physical address of the current endpoint descriptor of the bulk list */
-/*! @{ */
-#define USBFSH_HCBULKCURRENTED_BCED_MASK (0xFFFFFFF0U)
-#define USBFSH_HCBULKCURRENTED_BCED_SHIFT (4U)
-/*! BCED - BulkCurrentED This is advanced to the next ED after the HC has served the current one.
- */
-#define USBFSH_HCBULKCURRENTED_BCED(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCBULKCURRENTED_BCED_SHIFT)) & USBFSH_HCBULKCURRENTED_BCED_MASK)
-/*! @} */
-
-/*! @name HCDONEHEAD - Contains the physical address of the last transfer descriptor added to the 'Done' queue */
-/*! @{ */
-#define USBFSH_HCDONEHEAD_DH_MASK (0xFFFFFFF0U)
-#define USBFSH_HCDONEHEAD_DH_SHIFT (4U)
-/*! DH - DoneHead When a TD is completed, HC writes the content of HcDoneHead to the NextTD field of the TD.
- */
-#define USBFSH_HCDONEHEAD_DH(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCDONEHEAD_DH_SHIFT)) & USBFSH_HCDONEHEAD_DH_MASK)
-/*! @} */
-
-/*! @name HCFMINTERVAL - Defines the bit time interval in a frame and the full speed maximum packet size which would not cause an overrun */
-/*! @{ */
-#define USBFSH_HCFMINTERVAL_FI_MASK (0x3FFFU)
-#define USBFSH_HCFMINTERVAL_FI_SHIFT (0U)
-/*! FI - FrameInterval This specifies the interval between two consecutive SOFs in bit times.
- */
-#define USBFSH_HCFMINTERVAL_FI(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCFMINTERVAL_FI_SHIFT)) & USBFSH_HCFMINTERVAL_FI_MASK)
-#define USBFSH_HCFMINTERVAL_FSMPS_MASK (0x7FFF0000U)
-#define USBFSH_HCFMINTERVAL_FSMPS_SHIFT (16U)
-/*! FSMPS - FSLargestDataPacket This field specifies a value which is loaded into the Largest Data
- * Packet Counter at the beginning of each frame.
- */
-#define USBFSH_HCFMINTERVAL_FSMPS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCFMINTERVAL_FSMPS_SHIFT)) & USBFSH_HCFMINTERVAL_FSMPS_MASK)
-#define USBFSH_HCFMINTERVAL_FIT_MASK (0x80000000U)
-#define USBFSH_HCFMINTERVAL_FIT_SHIFT (31U)
-/*! FIT - FrameIntervalToggle HCD toggles this bit whenever it loads a new value to FrameInterval.
- */
-#define USBFSH_HCFMINTERVAL_FIT(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCFMINTERVAL_FIT_SHIFT)) & USBFSH_HCFMINTERVAL_FIT_MASK)
-/*! @} */
-
-/*! @name HCFMREMAINING - A 14-bit counter showing the bit time remaining in the current frame */
-/*! @{ */
-#define USBFSH_HCFMREMAINING_FR_MASK (0x3FFFU)
-#define USBFSH_HCFMREMAINING_FR_SHIFT (0U)
-/*! FR - FrameRemaining This counter is decremented at each bit time.
- */
-#define USBFSH_HCFMREMAINING_FR(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCFMREMAINING_FR_SHIFT)) & USBFSH_HCFMREMAINING_FR_MASK)
-#define USBFSH_HCFMREMAINING_FRT_MASK (0x80000000U)
-#define USBFSH_HCFMREMAINING_FRT_SHIFT (31U)
-/*! FRT - FrameRemainingToggle This bit is loaded from the FrameIntervalToggle field of HcFmInterval
- * whenever FrameRemaining reaches 0.
- */
-#define USBFSH_HCFMREMAINING_FRT(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCFMREMAINING_FRT_SHIFT)) & USBFSH_HCFMREMAINING_FRT_MASK)
-/*! @} */
-
-/*! @name HCFMNUMBER - Contains a 16-bit counter and provides the timing reference among events happening in the HC and the HCD */
-/*! @{ */
-#define USBFSH_HCFMNUMBER_FN_MASK (0xFFFFU)
-#define USBFSH_HCFMNUMBER_FN_SHIFT (0U)
-/*! FN - FrameNumber This is incremented when HcFmRemaining is re-loaded.
- */
-#define USBFSH_HCFMNUMBER_FN(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCFMNUMBER_FN_SHIFT)) & USBFSH_HCFMNUMBER_FN_MASK)
-/*! @} */
-
-/*! @name HCPERIODICSTART - Contains a programmable 14-bit value which determines the earliest time HC should start processing a periodic list */
-/*! @{ */
-#define USBFSH_HCPERIODICSTART_PS_MASK (0x3FFFU)
-#define USBFSH_HCPERIODICSTART_PS_SHIFT (0U)
-/*! PS - PeriodicStart After a hardware reset, this field is cleared and then set by HCD during the HC initialization.
- */
-#define USBFSH_HCPERIODICSTART_PS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCPERIODICSTART_PS_SHIFT)) & USBFSH_HCPERIODICSTART_PS_MASK)
-/*! @} */
-
-/*! @name HCLSTHRESHOLD - Contains 11-bit value which is used by the HC to determine whether to commit to transfer a maximum of 8-byte LS packet before EOF */
-/*! @{ */
-#define USBFSH_HCLSTHRESHOLD_LST_MASK (0xFFFU)
-#define USBFSH_HCLSTHRESHOLD_LST_SHIFT (0U)
-/*! LST - LSThreshold This field contains a value which is compared to the FrameRemaining field
- * prior to initiating a Low Speed transaction.
- */
-#define USBFSH_HCLSTHRESHOLD_LST(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCLSTHRESHOLD_LST_SHIFT)) & USBFSH_HCLSTHRESHOLD_LST_MASK)
-/*! @} */
-
-/*! @name HCRHDESCRIPTORA - First of the two registers which describes the characteristics of the root hub */
-/*! @{ */
-#define USBFSH_HCRHDESCRIPTORA_NDP_MASK (0xFFU)
-#define USBFSH_HCRHDESCRIPTORA_NDP_SHIFT (0U)
-/*! NDP - NumberDownstreamPorts These bits specify the number of downstream ports supported by the root hub.
- */
-#define USBFSH_HCRHDESCRIPTORA_NDP(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_NDP_SHIFT)) & USBFSH_HCRHDESCRIPTORA_NDP_MASK)
-#define USBFSH_HCRHDESCRIPTORA_PSM_MASK (0x100U)
-#define USBFSH_HCRHDESCRIPTORA_PSM_SHIFT (8U)
-/*! PSM - PowerSwitchingMode This bit is used to specify how the power switching of the root hub ports is controlled.
- */
-#define USBFSH_HCRHDESCRIPTORA_PSM(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_PSM_SHIFT)) & USBFSH_HCRHDESCRIPTORA_PSM_MASK)
-#define USBFSH_HCRHDESCRIPTORA_NPS_MASK (0x200U)
-#define USBFSH_HCRHDESCRIPTORA_NPS_SHIFT (9U)
-/*! NPS - NoPowerSwitching These bits are used to specify whether power switching is supported or port are always powered.
- */
-#define USBFSH_HCRHDESCRIPTORA_NPS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_NPS_SHIFT)) & USBFSH_HCRHDESCRIPTORA_NPS_MASK)
-#define USBFSH_HCRHDESCRIPTORA_DT_MASK (0x400U)
-#define USBFSH_HCRHDESCRIPTORA_DT_SHIFT (10U)
-/*! DT - DeviceType This bit specifies that the root hub is not a compound device.
- */
-#define USBFSH_HCRHDESCRIPTORA_DT(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_DT_SHIFT)) & USBFSH_HCRHDESCRIPTORA_DT_MASK)
-#define USBFSH_HCRHDESCRIPTORA_OCPM_MASK (0x800U)
-#define USBFSH_HCRHDESCRIPTORA_OCPM_SHIFT (11U)
-/*! OCPM - OverCurrentProtectionMode This bit describes how the overcurrent status for the root hub ports are reported.
- */
-#define USBFSH_HCRHDESCRIPTORA_OCPM(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_OCPM_SHIFT)) & USBFSH_HCRHDESCRIPTORA_OCPM_MASK)
-#define USBFSH_HCRHDESCRIPTORA_NOCP_MASK (0x1000U)
-#define USBFSH_HCRHDESCRIPTORA_NOCP_SHIFT (12U)
-/*! NOCP - NoOverCurrentProtection This bit describes how the overcurrent status for the root hub ports are reported.
- */
-#define USBFSH_HCRHDESCRIPTORA_NOCP(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_NOCP_SHIFT)) & USBFSH_HCRHDESCRIPTORA_NOCP_MASK)
-#define USBFSH_HCRHDESCRIPTORA_POTPGT_MASK (0xFF000000U)
-#define USBFSH_HCRHDESCRIPTORA_POTPGT_SHIFT (24U)
-/*! POTPGT - PowerOnToPowerGoodTime This byte specifies the duration the HCD has to wait before
- * accessing a powered-on port of the root hub.
- */
-#define USBFSH_HCRHDESCRIPTORA_POTPGT(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_POTPGT_SHIFT)) & USBFSH_HCRHDESCRIPTORA_POTPGT_MASK)
-/*! @} */
-
-/*! @name HCRHDESCRIPTORB - Second of the two registers which describes the characteristics of the Root Hub */
-/*! @{ */
-#define USBFSH_HCRHDESCRIPTORB_DR_MASK (0xFFFFU)
-#define USBFSH_HCRHDESCRIPTORB_DR_SHIFT (0U)
-/*! DR - DeviceRemovable Each bit is dedicated to a port of the Root Hub.
- */
-#define USBFSH_HCRHDESCRIPTORB_DR(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORB_DR_SHIFT)) & USBFSH_HCRHDESCRIPTORB_DR_MASK)
-#define USBFSH_HCRHDESCRIPTORB_PPCM_MASK (0xFFFF0000U)
-#define USBFSH_HCRHDESCRIPTORB_PPCM_SHIFT (16U)
-/*! PPCM - PortPowerControlMask Each bit indicates if a port is affected by a global power control
- * command when PowerSwitchingMode is set.
- */
-#define USBFSH_HCRHDESCRIPTORB_PPCM(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORB_PPCM_SHIFT)) & USBFSH_HCRHDESCRIPTORB_PPCM_MASK)
-/*! @} */
-
-/*! @name HCRHSTATUS - This register is divided into two parts */
-/*! @{ */
-#define USBFSH_HCRHSTATUS_LPS_MASK (0x1U)
-#define USBFSH_HCRHSTATUS_LPS_SHIFT (0U)
-/*! LPS - (read) LocalPowerStatus The Root Hub does not support the local power status feature;
- * thus, this bit is always read as 0.
- */
-#define USBFSH_HCRHSTATUS_LPS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHSTATUS_LPS_SHIFT)) & USBFSH_HCRHSTATUS_LPS_MASK)
-#define USBFSH_HCRHSTATUS_OCI_MASK (0x2U)
-#define USBFSH_HCRHSTATUS_OCI_SHIFT (1U)
-/*! OCI - OverCurrentIndicator This bit reports overcurrent conditions when the global reporting is implemented.
- */
-#define USBFSH_HCRHSTATUS_OCI(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHSTATUS_OCI_SHIFT)) & USBFSH_HCRHSTATUS_OCI_MASK)
-#define USBFSH_HCRHSTATUS_DRWE_MASK (0x8000U)
-#define USBFSH_HCRHSTATUS_DRWE_SHIFT (15U)
-/*! DRWE - (read) DeviceRemoteWakeupEnable This bit enables a ConnectStatusChange bit as a resume
- * event, causing a USBSUSPEND to USBRESUME state transition and setting the ResumeDetected
- * interrupt.
- */
-#define USBFSH_HCRHSTATUS_DRWE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHSTATUS_DRWE_SHIFT)) & USBFSH_HCRHSTATUS_DRWE_MASK)
-#define USBFSH_HCRHSTATUS_LPSC_MASK (0x10000U)
-#define USBFSH_HCRHSTATUS_LPSC_SHIFT (16U)
-/*! LPSC - (read) LocalPowerStatusChange The root hub does not support the local power status feature.
- */
-#define USBFSH_HCRHSTATUS_LPSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHSTATUS_LPSC_SHIFT)) & USBFSH_HCRHSTATUS_LPSC_MASK)
-#define USBFSH_HCRHSTATUS_OCIC_MASK (0x20000U)
-#define USBFSH_HCRHSTATUS_OCIC_SHIFT (17U)
-/*! OCIC - OverCurrentIndicatorChange This bit is set by hardware when a change has occurred to the OCI field of this register.
- */
-#define USBFSH_HCRHSTATUS_OCIC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHSTATUS_OCIC_SHIFT)) & USBFSH_HCRHSTATUS_OCIC_MASK)
-#define USBFSH_HCRHSTATUS_CRWE_MASK (0x80000000U)
-#define USBFSH_HCRHSTATUS_CRWE_SHIFT (31U)
-/*! CRWE - (write) ClearRemoteWakeupEnable Writing a 1 clears DeviceRemoveWakeupEnable.
- */
-#define USBFSH_HCRHSTATUS_CRWE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHSTATUS_CRWE_SHIFT)) & USBFSH_HCRHSTATUS_CRWE_MASK)
-/*! @} */
-
-/*! @name HCRHPORTSTATUS - Controls and reports the port events on a per-port basis */
-/*! @{ */
-#define USBFSH_HCRHPORTSTATUS_CCS_MASK (0x1U)
-#define USBFSH_HCRHPORTSTATUS_CCS_SHIFT (0U)
-/*! CCS - (read) CurrentConnectStatus This bit reflects the current state of the downstream port.
- */
-#define USBFSH_HCRHPORTSTATUS_CCS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_CCS_SHIFT)) & USBFSH_HCRHPORTSTATUS_CCS_MASK)
-#define USBFSH_HCRHPORTSTATUS_PES_MASK (0x2U)
-#define USBFSH_HCRHPORTSTATUS_PES_SHIFT (1U)
-/*! PES - (read) PortEnableStatus This bit indicates whether the port is enabled or disabled.
- */
-#define USBFSH_HCRHPORTSTATUS_PES(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PES_SHIFT)) & USBFSH_HCRHPORTSTATUS_PES_MASK)
-#define USBFSH_HCRHPORTSTATUS_PSS_MASK (0x4U)
-#define USBFSH_HCRHPORTSTATUS_PSS_SHIFT (2U)
-/*! PSS - (read) PortSuspendStatus This bit indicates the port is suspended or in the resume sequence.
- */
-#define USBFSH_HCRHPORTSTATUS_PSS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PSS_SHIFT)) & USBFSH_HCRHPORTSTATUS_PSS_MASK)
-#define USBFSH_HCRHPORTSTATUS_POCI_MASK (0x8U)
-#define USBFSH_HCRHPORTSTATUS_POCI_SHIFT (3U)
-/*! POCI - (read) PortOverCurrentIndicator This bit is only valid when the Root Hub is configured in
- * such a way that overcurrent conditions are reported on a per-port basis.
- */
-#define USBFSH_HCRHPORTSTATUS_POCI(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_POCI_SHIFT)) & USBFSH_HCRHPORTSTATUS_POCI_MASK)
-#define USBFSH_HCRHPORTSTATUS_PRS_MASK (0x10U)
-#define USBFSH_HCRHPORTSTATUS_PRS_SHIFT (4U)
-/*! PRS - (read) PortResetStatus When this bit is set by a write to SetPortReset, port reset signaling is asserted.
- */
-#define USBFSH_HCRHPORTSTATUS_PRS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PRS_SHIFT)) & USBFSH_HCRHPORTSTATUS_PRS_MASK)
-#define USBFSH_HCRHPORTSTATUS_PPS_MASK (0x100U)
-#define USBFSH_HCRHPORTSTATUS_PPS_SHIFT (8U)
-/*! PPS - (read) PortPowerStatus This bit reflects the porta's power status, regardless of the type
- * of power switching implemented.
- */
-#define USBFSH_HCRHPORTSTATUS_PPS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PPS_SHIFT)) & USBFSH_HCRHPORTSTATUS_PPS_MASK)
-#define USBFSH_HCRHPORTSTATUS_LSDA_MASK (0x200U)
-#define USBFSH_HCRHPORTSTATUS_LSDA_SHIFT (9U)
-/*! LSDA - (read) LowSpeedDeviceAttached This bit indicates the speed of the device attached to this port.
- */
-#define USBFSH_HCRHPORTSTATUS_LSDA(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_LSDA_SHIFT)) & USBFSH_HCRHPORTSTATUS_LSDA_MASK)
-#define USBFSH_HCRHPORTSTATUS_CSC_MASK (0x10000U)
-#define USBFSH_HCRHPORTSTATUS_CSC_SHIFT (16U)
-/*! CSC - ConnectStatusChange This bit is set whenever a connect or disconnect event occurs.
- */
-#define USBFSH_HCRHPORTSTATUS_CSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_CSC_SHIFT)) & USBFSH_HCRHPORTSTATUS_CSC_MASK)
-#define USBFSH_HCRHPORTSTATUS_PESC_MASK (0x20000U)
-#define USBFSH_HCRHPORTSTATUS_PESC_SHIFT (17U)
-/*! PESC - PortEnableStatusChange This bit is set when hardware events cause the PortEnableStatus bit to be cleared.
- */
-#define USBFSH_HCRHPORTSTATUS_PESC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PESC_SHIFT)) & USBFSH_HCRHPORTSTATUS_PESC_MASK)
-#define USBFSH_HCRHPORTSTATUS_PSSC_MASK (0x40000U)
-#define USBFSH_HCRHPORTSTATUS_PSSC_SHIFT (18U)
-/*! PSSC - PortSuspendStatusChange This bit is set when the full resume sequence is completed.
- */
-#define USBFSH_HCRHPORTSTATUS_PSSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PSSC_SHIFT)) & USBFSH_HCRHPORTSTATUS_PSSC_MASK)
-#define USBFSH_HCRHPORTSTATUS_OCIC_MASK (0x80000U)
-#define USBFSH_HCRHPORTSTATUS_OCIC_SHIFT (19U)
-/*! OCIC - PortOverCurrentIndicatorChange This bit is valid only if overcurrent conditions are reported on a per-port basis.
- */
-#define USBFSH_HCRHPORTSTATUS_OCIC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_OCIC_SHIFT)) & USBFSH_HCRHPORTSTATUS_OCIC_MASK)
-#define USBFSH_HCRHPORTSTATUS_PRSC_MASK (0x100000U)
-#define USBFSH_HCRHPORTSTATUS_PRSC_SHIFT (20U)
-/*! PRSC - PortResetStatusChange This bit is set at the end of the 10 ms port reset signal.
- */
-#define USBFSH_HCRHPORTSTATUS_PRSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PRSC_SHIFT)) & USBFSH_HCRHPORTSTATUS_PRSC_MASK)
-/*! @} */
-
-/*! @name PORTMODE - Controls the port if it is attached to the host block or the device block */
-/*! @{ */
-#define USBFSH_PORTMODE_ID_MASK (0x1U)
-#define USBFSH_PORTMODE_ID_SHIFT (0U)
-/*! ID - Port ID pin value.
- */
-#define USBFSH_PORTMODE_ID(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_PORTMODE_ID_SHIFT)) & USBFSH_PORTMODE_ID_MASK)
-#define USBFSH_PORTMODE_ID_EN_MASK (0x100U)
-#define USBFSH_PORTMODE_ID_EN_SHIFT (8U)
-/*! ID_EN - Port ID pin pull-up enable.
- */
-#define USBFSH_PORTMODE_ID_EN(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_PORTMODE_ID_EN_SHIFT)) & USBFSH_PORTMODE_ID_EN_MASK)
-#define USBFSH_PORTMODE_DEV_ENABLE_MASK (0x10000U)
-#define USBFSH_PORTMODE_DEV_ENABLE_SHIFT (16U)
-/*! DEV_ENABLE - 1: device 0: host.
- */
-#define USBFSH_PORTMODE_DEV_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_PORTMODE_DEV_ENABLE_SHIFT)) & USBFSH_PORTMODE_DEV_ENABLE_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group USBFSH_Register_Masks */
-
-
-/* USBFSH - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral USBFSH base address */
- #define USBFSH_BASE (0x500A2000u)
- /** Peripheral USBFSH base address */
- #define USBFSH_BASE_NS (0x400A2000u)
- /** Peripheral USBFSH base pointer */
- #define USBFSH ((USBFSH_Type *)USBFSH_BASE)
- /** Peripheral USBFSH base pointer */
- #define USBFSH_NS ((USBFSH_Type *)USBFSH_BASE_NS)
- /** Array initializer of USBFSH peripheral base addresses */
- #define USBFSH_BASE_ADDRS { USBFSH_BASE }
- /** Array initializer of USBFSH peripheral base pointers */
- #define USBFSH_BASE_PTRS { USBFSH }
- /** Array initializer of USBFSH peripheral base addresses */
- #define USBFSH_BASE_ADDRS_NS { USBFSH_BASE_NS }
- /** Array initializer of USBFSH peripheral base pointers */
- #define USBFSH_BASE_PTRS_NS { USBFSH_NS }
-#else
- /** Peripheral USBFSH base address */
- #define USBFSH_BASE (0x400A2000u)
- /** Peripheral USBFSH base pointer */
- #define USBFSH ((USBFSH_Type *)USBFSH_BASE)
- /** Array initializer of USBFSH peripheral base addresses */
- #define USBFSH_BASE_ADDRS { USBFSH_BASE }
- /** Array initializer of USBFSH peripheral base pointers */
- #define USBFSH_BASE_PTRS { USBFSH }
-#endif
-/** Interrupt vectors for the USBFSH peripheral type */
-#define USBFSH_IRQS { USB0_IRQn }
-#define USBFSH_NEEDCLK_IRQS { USB0_NEEDCLK_IRQn }
-
-/*!
- * @}
- */ /* end of group USBFSH_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- USBHSD Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBHSD_Peripheral_Access_Layer USBHSD Peripheral Access Layer
- * @{
- */
-
-/** USBHSD - Register Layout Typedef */
-typedef struct {
- __IO uint32_t DEVCMDSTAT; /**< USB Device Command/Status register, offset: 0x0 */
- __I uint32_t INFO; /**< USB Info register, offset: 0x4 */
- __IO uint32_t EPLISTSTART; /**< USB EP Command/Status List start address, offset: 0x8 */
- __IO uint32_t DATABUFSTART; /**< USB Data buffer start address, offset: 0xC */
- __IO uint32_t LPM; /**< USB Link Power Management register, offset: 0x10 */
- __IO uint32_t EPSKIP; /**< USB Endpoint skip, offset: 0x14 */
- __IO uint32_t EPINUSE; /**< USB Endpoint Buffer in use, offset: 0x18 */
- __IO uint32_t EPBUFCFG; /**< USB Endpoint Buffer Configuration register, offset: 0x1C */
- __IO uint32_t INTSTAT; /**< USB interrupt status register, offset: 0x20 */
- __IO uint32_t INTEN; /**< USB interrupt enable register, offset: 0x24 */
- __IO uint32_t INTSETSTAT; /**< USB set interrupt status register, offset: 0x28 */
- uint8_t RESERVED_0[8];
- __I uint32_t EPTOGGLE; /**< USB Endpoint toggle register, offset: 0x34 */
-} USBHSD_Type;
-
-/* ----------------------------------------------------------------------------
- -- USBHSD Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBHSD_Register_Masks USBHSD Register Masks
- * @{
- */
-
-/*! @name DEVCMDSTAT - USB Device Command/Status register */
-/*! @{ */
-#define USBHSD_DEVCMDSTAT_DEV_ADDR_MASK (0x7FU)
-#define USBHSD_DEVCMDSTAT_DEV_ADDR_SHIFT (0U)
-/*! DEV_ADDR - USB device address.
- */
-#define USBHSD_DEVCMDSTAT_DEV_ADDR(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DEV_ADDR_SHIFT)) & USBHSD_DEVCMDSTAT_DEV_ADDR_MASK)
-#define USBHSD_DEVCMDSTAT_DEV_EN_MASK (0x80U)
-#define USBHSD_DEVCMDSTAT_DEV_EN_SHIFT (7U)
-/*! DEV_EN - USB device enable.
- */
-#define USBHSD_DEVCMDSTAT_DEV_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DEV_EN_SHIFT)) & USBHSD_DEVCMDSTAT_DEV_EN_MASK)
-#define USBHSD_DEVCMDSTAT_SETUP_MASK (0x100U)
-#define USBHSD_DEVCMDSTAT_SETUP_SHIFT (8U)
-/*! SETUP - SETUP token received.
- */
-#define USBHSD_DEVCMDSTAT_SETUP(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_SETUP_SHIFT)) & USBHSD_DEVCMDSTAT_SETUP_MASK)
-#define USBHSD_DEVCMDSTAT_FORCE_NEEDCLK_MASK (0x200U)
-#define USBHSD_DEVCMDSTAT_FORCE_NEEDCLK_SHIFT (9U)
-/*! FORCE_NEEDCLK - Forces the NEEDCLK output to always be on:.
- */
-#define USBHSD_DEVCMDSTAT_FORCE_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_FORCE_NEEDCLK_SHIFT)) & USBHSD_DEVCMDSTAT_FORCE_NEEDCLK_MASK)
-#define USBHSD_DEVCMDSTAT_LPM_SUP_MASK (0x800U)
-#define USBHSD_DEVCMDSTAT_LPM_SUP_SHIFT (11U)
-/*! LPM_SUP - LPM Supported:.
- */
-#define USBHSD_DEVCMDSTAT_LPM_SUP(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_LPM_SUP_SHIFT)) & USBHSD_DEVCMDSTAT_LPM_SUP_MASK)
-#define USBHSD_DEVCMDSTAT_INTONNAK_AO_MASK (0x1000U)
-#define USBHSD_DEVCMDSTAT_INTONNAK_AO_SHIFT (12U)
-/*! INTONNAK_AO - Interrupt on NAK for interrupt and bulk OUT EP:.
- */
-#define USBHSD_DEVCMDSTAT_INTONNAK_AO(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_INTONNAK_AO_SHIFT)) & USBHSD_DEVCMDSTAT_INTONNAK_AO_MASK)
-#define USBHSD_DEVCMDSTAT_INTONNAK_AI_MASK (0x2000U)
-#define USBHSD_DEVCMDSTAT_INTONNAK_AI_SHIFT (13U)
-/*! INTONNAK_AI - Interrupt on NAK for interrupt and bulk IN EP:.
- */
-#define USBHSD_DEVCMDSTAT_INTONNAK_AI(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_INTONNAK_AI_SHIFT)) & USBHSD_DEVCMDSTAT_INTONNAK_AI_MASK)
-#define USBHSD_DEVCMDSTAT_INTONNAK_CO_MASK (0x4000U)
-#define USBHSD_DEVCMDSTAT_INTONNAK_CO_SHIFT (14U)
-/*! INTONNAK_CO - Interrupt on NAK for control OUT EP:.
- */
-#define USBHSD_DEVCMDSTAT_INTONNAK_CO(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_INTONNAK_CO_SHIFT)) & USBHSD_DEVCMDSTAT_INTONNAK_CO_MASK)
-#define USBHSD_DEVCMDSTAT_INTONNAK_CI_MASK (0x8000U)
-#define USBHSD_DEVCMDSTAT_INTONNAK_CI_SHIFT (15U)
-/*! INTONNAK_CI - Interrupt on NAK for control IN EP:.
- */
-#define USBHSD_DEVCMDSTAT_INTONNAK_CI(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_INTONNAK_CI_SHIFT)) & USBHSD_DEVCMDSTAT_INTONNAK_CI_MASK)
-#define USBHSD_DEVCMDSTAT_DCON_MASK (0x10000U)
-#define USBHSD_DEVCMDSTAT_DCON_SHIFT (16U)
-/*! DCON - Device status - connect.
- */
-#define USBHSD_DEVCMDSTAT_DCON(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DCON_SHIFT)) & USBHSD_DEVCMDSTAT_DCON_MASK)
-#define USBHSD_DEVCMDSTAT_DSUS_MASK (0x20000U)
-#define USBHSD_DEVCMDSTAT_DSUS_SHIFT (17U)
-/*! DSUS - Device status - suspend.
- */
-#define USBHSD_DEVCMDSTAT_DSUS(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DSUS_SHIFT)) & USBHSD_DEVCMDSTAT_DSUS_MASK)
-#define USBHSD_DEVCMDSTAT_LPM_SUS_MASK (0x80000U)
-#define USBHSD_DEVCMDSTAT_LPM_SUS_SHIFT (19U)
-/*! LPM_SUS - Device status - LPM Suspend.
- */
-#define USBHSD_DEVCMDSTAT_LPM_SUS(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_LPM_SUS_SHIFT)) & USBHSD_DEVCMDSTAT_LPM_SUS_MASK)
-#define USBHSD_DEVCMDSTAT_LPM_REWP_MASK (0x100000U)
-#define USBHSD_DEVCMDSTAT_LPM_REWP_SHIFT (20U)
-/*! LPM_REWP - LPM Remote Wake-up Enabled by USB host.
- */
-#define USBHSD_DEVCMDSTAT_LPM_REWP(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_LPM_REWP_SHIFT)) & USBHSD_DEVCMDSTAT_LPM_REWP_MASK)
-#define USBHSD_DEVCMDSTAT_Speed_MASK (0xC00000U)
-#define USBHSD_DEVCMDSTAT_Speed_SHIFT (22U)
-/*! Speed - This field indicates the speed at which the device operates: 00b: reserved 01b:
- * full-speed 10b: high-speed 11b: super-speed (reserved for future use).
- */
-#define USBHSD_DEVCMDSTAT_Speed(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_Speed_SHIFT)) & USBHSD_DEVCMDSTAT_Speed_MASK)
-#define USBHSD_DEVCMDSTAT_DCON_C_MASK (0x1000000U)
-#define USBHSD_DEVCMDSTAT_DCON_C_SHIFT (24U)
-/*! DCON_C - Device status - connect change.
- */
-#define USBHSD_DEVCMDSTAT_DCON_C(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DCON_C_SHIFT)) & USBHSD_DEVCMDSTAT_DCON_C_MASK)
-#define USBHSD_DEVCMDSTAT_DSUS_C_MASK (0x2000000U)
-#define USBHSD_DEVCMDSTAT_DSUS_C_SHIFT (25U)
-/*! DSUS_C - Device status - suspend change.
- */
-#define USBHSD_DEVCMDSTAT_DSUS_C(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DSUS_C_SHIFT)) & USBHSD_DEVCMDSTAT_DSUS_C_MASK)
-#define USBHSD_DEVCMDSTAT_DRES_C_MASK (0x4000000U)
-#define USBHSD_DEVCMDSTAT_DRES_C_SHIFT (26U)
-/*! DRES_C - Device status - reset change.
- */
-#define USBHSD_DEVCMDSTAT_DRES_C(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DRES_C_SHIFT)) & USBHSD_DEVCMDSTAT_DRES_C_MASK)
-#define USBHSD_DEVCMDSTAT_VBUS_DEBOUNCED_MASK (0x10000000U)
-#define USBHSD_DEVCMDSTAT_VBUS_DEBOUNCED_SHIFT (28U)
-/*! VBUS_DEBOUNCED - This bit indicates if VBUS is detected or not.
- */
-#define USBHSD_DEVCMDSTAT_VBUS_DEBOUNCED(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_VBUS_DEBOUNCED_SHIFT)) & USBHSD_DEVCMDSTAT_VBUS_DEBOUNCED_MASK)
-#define USBHSD_DEVCMDSTAT_PHY_TEST_MODE_MASK (0xE0000000U)
-#define USBHSD_DEVCMDSTAT_PHY_TEST_MODE_SHIFT (29U)
-/*! PHY_TEST_MODE - This field is written by firmware to put the PHY into a test mode as defined by the USB2.0 specification
- */
-#define USBHSD_DEVCMDSTAT_PHY_TEST_MODE(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_PHY_TEST_MODE_SHIFT)) & USBHSD_DEVCMDSTAT_PHY_TEST_MODE_MASK)
-/*! @} */
-
-/*! @name INFO - USB Info register */
-/*! @{ */
-#define USBHSD_INFO_FRAME_NR_MASK (0x7FFU)
-#define USBHSD_INFO_FRAME_NR_SHIFT (0U)
-/*! FRAME_NR - Frame number.
- */
-#define USBHSD_INFO_FRAME_NR(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INFO_FRAME_NR_SHIFT)) & USBHSD_INFO_FRAME_NR_MASK)
-#define USBHSD_INFO_ERR_CODE_MASK (0x7800U)
-#define USBHSD_INFO_ERR_CODE_SHIFT (11U)
-/*! ERR_CODE - The error code which last occurred:.
- */
-#define USBHSD_INFO_ERR_CODE(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INFO_ERR_CODE_SHIFT)) & USBHSD_INFO_ERR_CODE_MASK)
-#define USBHSD_INFO_MINREV_MASK (0xFF0000U)
-#define USBHSD_INFO_MINREV_SHIFT (16U)
-/*! MINREV - Minor revision.
- */
-#define USBHSD_INFO_MINREV(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INFO_MINREV_SHIFT)) & USBHSD_INFO_MINREV_MASK)
-#define USBHSD_INFO_MAJREV_MASK (0xFF000000U)
-#define USBHSD_INFO_MAJREV_SHIFT (24U)
-/*! MAJREV - Major revision.
- */
-#define USBHSD_INFO_MAJREV(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INFO_MAJREV_SHIFT)) & USBHSD_INFO_MAJREV_MASK)
-/*! @} */
-
-/*! @name EPLISTSTART - USB EP Command/Status List start address */
-/*! @{ */
-#define USBHSD_EPLISTSTART_EP_LIST_PRG_MASK (0xFFF00U)
-#define USBHSD_EPLISTSTART_EP_LIST_PRG_SHIFT (8U)
-/*! EP_LIST_PRG - Programmable portion of the USB EP Command/Status List address.
- */
-#define USBHSD_EPLISTSTART_EP_LIST_PRG(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_EPLISTSTART_EP_LIST_PRG_SHIFT)) & USBHSD_EPLISTSTART_EP_LIST_PRG_MASK)
-#define USBHSD_EPLISTSTART_EP_LIST_FIXED_MASK (0xFFF00000U)
-#define USBHSD_EPLISTSTART_EP_LIST_FIXED_SHIFT (20U)
-/*! EP_LIST_FIXED - Fixed portion of USB EP Command/Status List address.
- */
-#define USBHSD_EPLISTSTART_EP_LIST_FIXED(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_EPLISTSTART_EP_LIST_FIXED_SHIFT)) & USBHSD_EPLISTSTART_EP_LIST_FIXED_MASK)
-/*! @} */
-
-/*! @name DATABUFSTART - USB Data buffer start address */
-/*! @{ */
-#define USBHSD_DATABUFSTART_DA_BUF_MASK (0xFFFFFFFFU)
-#define USBHSD_DATABUFSTART_DA_BUF_SHIFT (0U)
-/*! DA_BUF - Start address of the memory page where all endpoint data buffers are located.
- */
-#define USBHSD_DATABUFSTART_DA_BUF(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DATABUFSTART_DA_BUF_SHIFT)) & USBHSD_DATABUFSTART_DA_BUF_MASK)
-/*! @} */
-
-/*! @name LPM - USB Link Power Management register */
-/*! @{ */
-#define USBHSD_LPM_HIRD_HW_MASK (0xFU)
-#define USBHSD_LPM_HIRD_HW_SHIFT (0U)
-/*! HIRD_HW - Host Initiated Resume Duration - HW.
- */
-#define USBHSD_LPM_HIRD_HW(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_LPM_HIRD_HW_SHIFT)) & USBHSD_LPM_HIRD_HW_MASK)
-#define USBHSD_LPM_HIRD_SW_MASK (0xF0U)
-#define USBHSD_LPM_HIRD_SW_SHIFT (4U)
-/*! HIRD_SW - Host Initiated Resume Duration - SW.
- */
-#define USBHSD_LPM_HIRD_SW(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_LPM_HIRD_SW_SHIFT)) & USBHSD_LPM_HIRD_SW_MASK)
-#define USBHSD_LPM_DATA_PENDING_MASK (0x100U)
-#define USBHSD_LPM_DATA_PENDING_SHIFT (8U)
-/*! DATA_PENDING - As long as this bit is set to one and LPM supported bit is set to one, HW will
- * return a NYET handshake on every LPM token it receives.
- */
-#define USBHSD_LPM_DATA_PENDING(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_LPM_DATA_PENDING_SHIFT)) & USBHSD_LPM_DATA_PENDING_MASK)
-/*! @} */
-
-/*! @name EPSKIP - USB Endpoint skip */
-/*! @{ */
-#define USBHSD_EPSKIP_SKIP_MASK (0xFFFU)
-#define USBHSD_EPSKIP_SKIP_SHIFT (0U)
-/*! SKIP - Endpoint skip: Writing 1 to one of these bits, will indicate to HW that it must
- * deactivate the buffer assigned to this endpoint and return control back to software.
- */
-#define USBHSD_EPSKIP_SKIP(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_EPSKIP_SKIP_SHIFT)) & USBHSD_EPSKIP_SKIP_MASK)
-/*! @} */
-
-/*! @name EPINUSE - USB Endpoint Buffer in use */
-/*! @{ */
-#define USBHSD_EPINUSE_BUF_MASK (0xFFCU)
-#define USBHSD_EPINUSE_BUF_SHIFT (2U)
-/*! BUF - Buffer in use: This register has one bit per physical endpoint.
- */
-#define USBHSD_EPINUSE_BUF(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_EPINUSE_BUF_SHIFT)) & USBHSD_EPINUSE_BUF_MASK)
-/*! @} */
-
-/*! @name EPBUFCFG - USB Endpoint Buffer Configuration register */
-/*! @{ */
-#define USBHSD_EPBUFCFG_BUF_SB_MASK (0xFFCU)
-#define USBHSD_EPBUFCFG_BUF_SB_SHIFT (2U)
-/*! BUF_SB - Buffer usage: This register has one bit per physical endpoint.
- */
-#define USBHSD_EPBUFCFG_BUF_SB(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_EPBUFCFG_BUF_SB_SHIFT)) & USBHSD_EPBUFCFG_BUF_SB_MASK)
-/*! @} */
-
-/*! @name INTSTAT - USB interrupt status register */
-/*! @{ */
-#define USBHSD_INTSTAT_EP0OUT_MASK (0x1U)
-#define USBHSD_INTSTAT_EP0OUT_SHIFT (0U)
-/*! EP0OUT - Interrupt status register bit for the Control EP0 OUT direction.
- */
-#define USBHSD_INTSTAT_EP0OUT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP0OUT_SHIFT)) & USBHSD_INTSTAT_EP0OUT_MASK)
-#define USBHSD_INTSTAT_EP0IN_MASK (0x2U)
-#define USBHSD_INTSTAT_EP0IN_SHIFT (1U)
-/*! EP0IN - Interrupt status register bit for the Control EP0 IN direction.
- */
-#define USBHSD_INTSTAT_EP0IN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP0IN_SHIFT)) & USBHSD_INTSTAT_EP0IN_MASK)
-#define USBHSD_INTSTAT_EP1OUT_MASK (0x4U)
-#define USBHSD_INTSTAT_EP1OUT_SHIFT (2U)
-/*! EP1OUT - Interrupt status register bit for the EP1 OUT direction.
- */
-#define USBHSD_INTSTAT_EP1OUT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP1OUT_SHIFT)) & USBHSD_INTSTAT_EP1OUT_MASK)
-#define USBHSD_INTSTAT_EP1IN_MASK (0x8U)
-#define USBHSD_INTSTAT_EP1IN_SHIFT (3U)
-/*! EP1IN - Interrupt status register bit for the EP1 IN direction.
- */
-#define USBHSD_INTSTAT_EP1IN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP1IN_SHIFT)) & USBHSD_INTSTAT_EP1IN_MASK)
-#define USBHSD_INTSTAT_EP2OUT_MASK (0x10U)
-#define USBHSD_INTSTAT_EP2OUT_SHIFT (4U)
-/*! EP2OUT - Interrupt status register bit for the EP2 OUT direction.
- */
-#define USBHSD_INTSTAT_EP2OUT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP2OUT_SHIFT)) & USBHSD_INTSTAT_EP2OUT_MASK)
-#define USBHSD_INTSTAT_EP2IN_MASK (0x20U)
-#define USBHSD_INTSTAT_EP2IN_SHIFT (5U)
-/*! EP2IN - Interrupt status register bit for the EP2 IN direction.
- */
-#define USBHSD_INTSTAT_EP2IN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP2IN_SHIFT)) & USBHSD_INTSTAT_EP2IN_MASK)
-#define USBHSD_INTSTAT_EP3OUT_MASK (0x40U)
-#define USBHSD_INTSTAT_EP3OUT_SHIFT (6U)
-/*! EP3OUT - Interrupt status register bit for the EP3 OUT direction.
- */
-#define USBHSD_INTSTAT_EP3OUT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP3OUT_SHIFT)) & USBHSD_INTSTAT_EP3OUT_MASK)
-#define USBHSD_INTSTAT_EP3IN_MASK (0x80U)
-#define USBHSD_INTSTAT_EP3IN_SHIFT (7U)
-/*! EP3IN - Interrupt status register bit for the EP3 IN direction.
- */
-#define USBHSD_INTSTAT_EP3IN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP3IN_SHIFT)) & USBHSD_INTSTAT_EP3IN_MASK)
-#define USBHSD_INTSTAT_EP4OUT_MASK (0x100U)
-#define USBHSD_INTSTAT_EP4OUT_SHIFT (8U)
-/*! EP4OUT - Interrupt status register bit for the EP4 OUT direction.
- */
-#define USBHSD_INTSTAT_EP4OUT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP4OUT_SHIFT)) & USBHSD_INTSTAT_EP4OUT_MASK)
-#define USBHSD_INTSTAT_EP4IN_MASK (0x200U)
-#define USBHSD_INTSTAT_EP4IN_SHIFT (9U)
-/*! EP4IN - Interrupt status register bit for the EP4 IN direction.
- */
-#define USBHSD_INTSTAT_EP4IN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP4IN_SHIFT)) & USBHSD_INTSTAT_EP4IN_MASK)
-#define USBHSD_INTSTAT_EP5OUT_MASK (0x400U)
-#define USBHSD_INTSTAT_EP5OUT_SHIFT (10U)
-/*! EP5OUT - Interrupt status register bit for the EP5 OUT direction.
- */
-#define USBHSD_INTSTAT_EP5OUT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP5OUT_SHIFT)) & USBHSD_INTSTAT_EP5OUT_MASK)
-#define USBHSD_INTSTAT_EP5IN_MASK (0x800U)
-#define USBHSD_INTSTAT_EP5IN_SHIFT (11U)
-/*! EP5IN - Interrupt status register bit for the EP5 IN direction.
- */
-#define USBHSD_INTSTAT_EP5IN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP5IN_SHIFT)) & USBHSD_INTSTAT_EP5IN_MASK)
-#define USBHSD_INTSTAT_FRAME_INT_MASK (0x40000000U)
-#define USBHSD_INTSTAT_FRAME_INT_SHIFT (30U)
-/*! FRAME_INT - Frame interrupt.
- */
-#define USBHSD_INTSTAT_FRAME_INT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_FRAME_INT_SHIFT)) & USBHSD_INTSTAT_FRAME_INT_MASK)
-#define USBHSD_INTSTAT_DEV_INT_MASK (0x80000000U)
-#define USBHSD_INTSTAT_DEV_INT_SHIFT (31U)
-/*! DEV_INT - Device status interrupt.
- */
-#define USBHSD_INTSTAT_DEV_INT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_DEV_INT_SHIFT)) & USBHSD_INTSTAT_DEV_INT_MASK)
-/*! @} */
-
-/*! @name INTEN - USB interrupt enable register */
-/*! @{ */
-#define USBHSD_INTEN_EP_INT_EN_MASK (0xFFFU)
-#define USBHSD_INTEN_EP_INT_EN_SHIFT (0U)
-/*! EP_INT_EN - If this bit is set and the corresponding USB interrupt status bit is set, a HW
- * interrupt is generated on the interrupt line.
- */
-#define USBHSD_INTEN_EP_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTEN_EP_INT_EN_SHIFT)) & USBHSD_INTEN_EP_INT_EN_MASK)
-#define USBHSD_INTEN_FRAME_INT_EN_MASK (0x40000000U)
-#define USBHSD_INTEN_FRAME_INT_EN_SHIFT (30U)
-/*! FRAME_INT_EN - If this bit is set and the corresponding USB interrupt status bit is set, a HW
- * interrupt is generated on the interrupt line.
- */
-#define USBHSD_INTEN_FRAME_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTEN_FRAME_INT_EN_SHIFT)) & USBHSD_INTEN_FRAME_INT_EN_MASK)
-#define USBHSD_INTEN_DEV_INT_EN_MASK (0x80000000U)
-#define USBHSD_INTEN_DEV_INT_EN_SHIFT (31U)
-/*! DEV_INT_EN - If this bit is set and the corresponding USB interrupt status bit is set, a HW
- * interrupt is generated on the interrupt line.
- */
-#define USBHSD_INTEN_DEV_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTEN_DEV_INT_EN_SHIFT)) & USBHSD_INTEN_DEV_INT_EN_MASK)
-/*! @} */
-
-/*! @name INTSETSTAT - USB set interrupt status register */
-/*! @{ */
-#define USBHSD_INTSETSTAT_EP_SET_INT_MASK (0xFFFU)
-#define USBHSD_INTSETSTAT_EP_SET_INT_SHIFT (0U)
-/*! EP_SET_INT - If software writes a one to one of these bits, the corresponding USB interrupt status bit is set.
- */
-#define USBHSD_INTSETSTAT_EP_SET_INT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSETSTAT_EP_SET_INT_SHIFT)) & USBHSD_INTSETSTAT_EP_SET_INT_MASK)
-#define USBHSD_INTSETSTAT_FRAME_SET_INT_MASK (0x40000000U)
-#define USBHSD_INTSETSTAT_FRAME_SET_INT_SHIFT (30U)
-/*! FRAME_SET_INT - If software writes a one to one of these bits, the corresponding USB interrupt status bit is set.
- */
-#define USBHSD_INTSETSTAT_FRAME_SET_INT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSETSTAT_FRAME_SET_INT_SHIFT)) & USBHSD_INTSETSTAT_FRAME_SET_INT_MASK)
-#define USBHSD_INTSETSTAT_DEV_SET_INT_MASK (0x80000000U)
-#define USBHSD_INTSETSTAT_DEV_SET_INT_SHIFT (31U)
-/*! DEV_SET_INT - If software writes a one to one of these bits, the corresponding USB interrupt status bit is set.
- */
-#define USBHSD_INTSETSTAT_DEV_SET_INT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSETSTAT_DEV_SET_INT_SHIFT)) & USBHSD_INTSETSTAT_DEV_SET_INT_MASK)
-/*! @} */
-
-/*! @name EPTOGGLE - USB Endpoint toggle register */
-/*! @{ */
-#define USBHSD_EPTOGGLE_TOGGLE_MASK (0x3FFFFFFFU)
-#define USBHSD_EPTOGGLE_TOGGLE_SHIFT (0U)
-/*! TOGGLE - Endpoint data toggle: This field indicates the current value of the data toggle for the corresponding endpoint.
- */
-#define USBHSD_EPTOGGLE_TOGGLE(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_EPTOGGLE_TOGGLE_SHIFT)) & USBHSD_EPTOGGLE_TOGGLE_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group USBHSD_Register_Masks */
-
-
-/* USBHSD - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral USBHSD base address */
- #define USBHSD_BASE (0x50094000u)
- /** Peripheral USBHSD base address */
- #define USBHSD_BASE_NS (0x40094000u)
- /** Peripheral USBHSD base pointer */
- #define USBHSD ((USBHSD_Type *)USBHSD_BASE)
- /** Peripheral USBHSD base pointer */
- #define USBHSD_NS ((USBHSD_Type *)USBHSD_BASE_NS)
- /** Array initializer of USBHSD peripheral base addresses */
- #define USBHSD_BASE_ADDRS { USBHSD_BASE }
- /** Array initializer of USBHSD peripheral base pointers */
- #define USBHSD_BASE_PTRS { USBHSD }
- /** Array initializer of USBHSD peripheral base addresses */
- #define USBHSD_BASE_ADDRS_NS { USBHSD_BASE_NS }
- /** Array initializer of USBHSD peripheral base pointers */
- #define USBHSD_BASE_PTRS_NS { USBHSD_NS }
-#else
- /** Peripheral USBHSD base address */
- #define USBHSD_BASE (0x40094000u)
- /** Peripheral USBHSD base pointer */
- #define USBHSD ((USBHSD_Type *)USBHSD_BASE)
- /** Array initializer of USBHSD peripheral base addresses */
- #define USBHSD_BASE_ADDRS { USBHSD_BASE }
- /** Array initializer of USBHSD peripheral base pointers */
- #define USBHSD_BASE_PTRS { USBHSD }
-#endif
-/** Interrupt vectors for the USBHSD peripheral type */
-#define USBHSD_IRQS { USB1_IRQn }
-#define USBHSD_NEEDCLK_IRQS { USB1_NEEDCLK_IRQn }
-
-/*!
- * @}
- */ /* end of group USBHSD_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- USBHSH Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBHSH_Peripheral_Access_Layer USBHSH Peripheral Access Layer
- * @{
- */
-
-/** USBHSH - Register Layout Typedef */
-typedef struct {
- __I uint32_t CAPLENGTH_CHIPID; /**< This register contains the offset value towards the start of the operational register space and the version number of the IP block, offset: 0x0 */
- __I uint32_t HCSPARAMS; /**< Host Controller Structural Parameters, offset: 0x4 */
- uint8_t RESERVED_0[4];
- __IO uint32_t FLADJ_FRINDEX; /**< Frame Length Adjustment, offset: 0xC */
- __IO uint32_t ATLPTD; /**< Memory base address where ATL PTD0 is stored, offset: 0x10 */
- __IO uint32_t ISOPTD; /**< Memory base address where ISO PTD0 is stored, offset: 0x14 */
- __IO uint32_t INTPTD; /**< Memory base address where INT PTD0 is stored, offset: 0x18 */
- __IO uint32_t DATAPAYLOAD; /**< Memory base address that indicates the start of the data payload buffers, offset: 0x1C */
- __IO uint32_t USBCMD; /**< USB Command register, offset: 0x20 */
- __IO uint32_t USBSTS; /**< USB Interrupt Status register, offset: 0x24 */
- __IO uint32_t USBINTR; /**< USB Interrupt Enable register, offset: 0x28 */
- __IO uint32_t PORTSC1; /**< Port Status and Control register, offset: 0x2C */
- __IO uint32_t ATLPTDD; /**< Done map for each ATL PTD, offset: 0x30 */
- __IO uint32_t ATLPTDS; /**< Skip map for each ATL PTD, offset: 0x34 */
- __IO uint32_t ISOPTDD; /**< Done map for each ISO PTD, offset: 0x38 */
- __IO uint32_t ISOPTDS; /**< Skip map for each ISO PTD, offset: 0x3C */
- __IO uint32_t INTPTDD; /**< Done map for each INT PTD, offset: 0x40 */
- __IO uint32_t INTPTDS; /**< Skip map for each INT PTD, offset: 0x44 */
- __IO uint32_t LASTPTD; /**< Marks the last PTD in the list for ISO, INT and ATL, offset: 0x48 */
- uint8_t RESERVED_1[4];
- __IO uint32_t PORTMODE; /**< Controls the port if it is attached to the host block or the device block, offset: 0x50 */
-} USBHSH_Type;
-
-/* ----------------------------------------------------------------------------
- -- USBHSH Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBHSH_Register_Masks USBHSH Register Masks
- * @{
- */
-
-/*! @name CAPLENGTH_CHIPID - This register contains the offset value towards the start of the operational register space and the version number of the IP block */
-/*! @{ */
-#define USBHSH_CAPLENGTH_CHIPID_CAPLENGTH_MASK (0xFFU)
-#define USBHSH_CAPLENGTH_CHIPID_CAPLENGTH_SHIFT (0U)
-/*! CAPLENGTH - Capability Length: This is used as an offset.
- */
-#define USBHSH_CAPLENGTH_CHIPID_CAPLENGTH(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_CAPLENGTH_CHIPID_CAPLENGTH_SHIFT)) & USBHSH_CAPLENGTH_CHIPID_CAPLENGTH_MASK)
-#define USBHSH_CAPLENGTH_CHIPID_CHIPID_MASK (0xFFFF0000U)
-#define USBHSH_CAPLENGTH_CHIPID_CHIPID_SHIFT (16U)
-/*! CHIPID - Chip identification: indicates major and minor revision of the IP: [31:24] = Major
- * revision [23:16] = Minor revision Major revisions used: 0x01: USB2.
- */
-#define USBHSH_CAPLENGTH_CHIPID_CHIPID(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_CAPLENGTH_CHIPID_CHIPID_SHIFT)) & USBHSH_CAPLENGTH_CHIPID_CHIPID_MASK)
-/*! @} */
-
-/*! @name HCSPARAMS - Host Controller Structural Parameters */
-/*! @{ */
-#define USBHSH_HCSPARAMS_N_PORTS_MASK (0xFU)
-#define USBHSH_HCSPARAMS_N_PORTS_SHIFT (0U)
-/*! N_PORTS - This register specifies the number of physical downstream ports implemented on this host controller.
- */
-#define USBHSH_HCSPARAMS_N_PORTS(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_HCSPARAMS_N_PORTS_SHIFT)) & USBHSH_HCSPARAMS_N_PORTS_MASK)
-#define USBHSH_HCSPARAMS_PPC_MASK (0x10U)
-#define USBHSH_HCSPARAMS_PPC_SHIFT (4U)
-/*! PPC - This field indicates whether the host controller implementation includes port power control.
- */
-#define USBHSH_HCSPARAMS_PPC(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_HCSPARAMS_PPC_SHIFT)) & USBHSH_HCSPARAMS_PPC_MASK)
-#define USBHSH_HCSPARAMS_P_INDICATOR_MASK (0x10000U)
-#define USBHSH_HCSPARAMS_P_INDICATOR_SHIFT (16U)
-/*! P_INDICATOR - This bit indicates whether the ports support port indicator control.
- */
-#define USBHSH_HCSPARAMS_P_INDICATOR(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_HCSPARAMS_P_INDICATOR_SHIFT)) & USBHSH_HCSPARAMS_P_INDICATOR_MASK)
-/*! @} */
-
-/*! @name FLADJ_FRINDEX - Frame Length Adjustment */
-/*! @{ */
-#define USBHSH_FLADJ_FRINDEX_FLADJ_MASK (0x3FU)
-#define USBHSH_FLADJ_FRINDEX_FLADJ_SHIFT (0U)
-/*! FLADJ - Frame Length Timing Value.
- */
-#define USBHSH_FLADJ_FRINDEX_FLADJ(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_FLADJ_FRINDEX_FLADJ_SHIFT)) & USBHSH_FLADJ_FRINDEX_FLADJ_MASK)
-#define USBHSH_FLADJ_FRINDEX_FRINDEX_MASK (0x3FFF0000U)
-#define USBHSH_FLADJ_FRINDEX_FRINDEX_SHIFT (16U)
-/*! FRINDEX - Frame Index: Bits 29 to16 in this register are used for the frame number field in the SOF packet.
- */
-#define USBHSH_FLADJ_FRINDEX_FRINDEX(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_FLADJ_FRINDEX_FRINDEX_SHIFT)) & USBHSH_FLADJ_FRINDEX_FRINDEX_MASK)
-/*! @} */
-
-/*! @name ATLPTD - Memory base address where ATL PTD0 is stored */
-/*! @{ */
-#define USBHSH_ATLPTD_ATL_CUR_MASK (0x1F0U)
-#define USBHSH_ATLPTD_ATL_CUR_SHIFT (4U)
-/*! ATL_CUR - This indicates the current PTD that is used by the hardware when it is processing the ATL list.
- */
-#define USBHSH_ATLPTD_ATL_CUR(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ATLPTD_ATL_CUR_SHIFT)) & USBHSH_ATLPTD_ATL_CUR_MASK)
-#define USBHSH_ATLPTD_ATL_BASE_MASK (0xFFFFFE00U)
-#define USBHSH_ATLPTD_ATL_BASE_SHIFT (9U)
-/*! ATL_BASE - Base address to be used by the hardware to find the start of the ATL list.
- */
-#define USBHSH_ATLPTD_ATL_BASE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ATLPTD_ATL_BASE_SHIFT)) & USBHSH_ATLPTD_ATL_BASE_MASK)
-/*! @} */
-
-/*! @name ISOPTD - Memory base address where ISO PTD0 is stored */
-/*! @{ */
-#define USBHSH_ISOPTD_ISO_FIRST_MASK (0x3E0U)
-#define USBHSH_ISOPTD_ISO_FIRST_SHIFT (5U)
-/*! ISO_FIRST - This indicates the first PTD that is used by the hardware when it is processing the ISO list.
- */
-#define USBHSH_ISOPTD_ISO_FIRST(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ISOPTD_ISO_FIRST_SHIFT)) & USBHSH_ISOPTD_ISO_FIRST_MASK)
-#define USBHSH_ISOPTD_ISO_BASE_MASK (0xFFFFFC00U)
-#define USBHSH_ISOPTD_ISO_BASE_SHIFT (10U)
-/*! ISO_BASE - Base address to be used by the hardware to find the start of the ISO list.
- */
-#define USBHSH_ISOPTD_ISO_BASE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ISOPTD_ISO_BASE_SHIFT)) & USBHSH_ISOPTD_ISO_BASE_MASK)
-/*! @} */
-
-/*! @name INTPTD - Memory base address where INT PTD0 is stored */
-/*! @{ */
-#define USBHSH_INTPTD_INT_FIRST_MASK (0x3E0U)
-#define USBHSH_INTPTD_INT_FIRST_SHIFT (5U)
-/*! INT_FIRST - This indicates the first PTD that is used by the hardware when it is processing the INT list.
- */
-#define USBHSH_INTPTD_INT_FIRST(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_INTPTD_INT_FIRST_SHIFT)) & USBHSH_INTPTD_INT_FIRST_MASK)
-#define USBHSH_INTPTD_INT_BASE_MASK (0xFFFFFC00U)
-#define USBHSH_INTPTD_INT_BASE_SHIFT (10U)
-/*! INT_BASE - Base address to be used by the hardware to find the start of the INT list.
- */
-#define USBHSH_INTPTD_INT_BASE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_INTPTD_INT_BASE_SHIFT)) & USBHSH_INTPTD_INT_BASE_MASK)
-/*! @} */
-
-/*! @name DATAPAYLOAD - Memory base address that indicates the start of the data payload buffers */
-/*! @{ */
-#define USBHSH_DATAPAYLOAD_DAT_BASE_MASK (0xFFFF0000U)
-#define USBHSH_DATAPAYLOAD_DAT_BASE_SHIFT (16U)
-/*! DAT_BASE - Base address to be used by the hardware to find the start of the data payload section.
- */
-#define USBHSH_DATAPAYLOAD_DAT_BASE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_DATAPAYLOAD_DAT_BASE_SHIFT)) & USBHSH_DATAPAYLOAD_DAT_BASE_MASK)
-/*! @} */
-
-/*! @name USBCMD - USB Command register */
-/*! @{ */
-#define USBHSH_USBCMD_RS_MASK (0x1U)
-#define USBHSH_USBCMD_RS_SHIFT (0U)
-/*! RS - Run/Stop: 1b = Run.
- */
-#define USBHSH_USBCMD_RS(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_RS_SHIFT)) & USBHSH_USBCMD_RS_MASK)
-#define USBHSH_USBCMD_HCRESET_MASK (0x2U)
-#define USBHSH_USBCMD_HCRESET_SHIFT (1U)
-/*! HCRESET - Host Controller Reset: This control bit is used by the software to reset the host controller.
- */
-#define USBHSH_USBCMD_HCRESET(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_HCRESET_SHIFT)) & USBHSH_USBCMD_HCRESET_MASK)
-#define USBHSH_USBCMD_FLS_MASK (0xCU)
-#define USBHSH_USBCMD_FLS_SHIFT (2U)
-/*! FLS - Frame List Size: This field specifies the size of the frame list.
- */
-#define USBHSH_USBCMD_FLS(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_FLS_SHIFT)) & USBHSH_USBCMD_FLS_MASK)
-#define USBHSH_USBCMD_LHCR_MASK (0x80U)
-#define USBHSH_USBCMD_LHCR_SHIFT (7U)
-/*! LHCR - Light Host Controller Reset: This bit allows the driver software to reset the host
- * controller without affecting the state of the ports.
- */
-#define USBHSH_USBCMD_LHCR(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_LHCR_SHIFT)) & USBHSH_USBCMD_LHCR_MASK)
-#define USBHSH_USBCMD_ATL_EN_MASK (0x100U)
-#define USBHSH_USBCMD_ATL_EN_SHIFT (8U)
-/*! ATL_EN - ATL List enabled.
- */
-#define USBHSH_USBCMD_ATL_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_ATL_EN_SHIFT)) & USBHSH_USBCMD_ATL_EN_MASK)
-#define USBHSH_USBCMD_ISO_EN_MASK (0x200U)
-#define USBHSH_USBCMD_ISO_EN_SHIFT (9U)
-/*! ISO_EN - ISO List enabled.
- */
-#define USBHSH_USBCMD_ISO_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_ISO_EN_SHIFT)) & USBHSH_USBCMD_ISO_EN_MASK)
-#define USBHSH_USBCMD_INT_EN_MASK (0x400U)
-#define USBHSH_USBCMD_INT_EN_SHIFT (10U)
-/*! INT_EN - INT List enabled.
- */
-#define USBHSH_USBCMD_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_INT_EN_SHIFT)) & USBHSH_USBCMD_INT_EN_MASK)
-/*! @} */
-
-/*! @name USBSTS - USB Interrupt Status register */
-/*! @{ */
-#define USBHSH_USBSTS_PCD_MASK (0x4U)
-#define USBHSH_USBSTS_PCD_SHIFT (2U)
-/*! PCD - Port Change Detect: The host controller sets this bit to logic 1 when any port has a
- * change bit transition from a 0 to a one or a Force Port Resume bit transition from a 0 to a 1 as a
- * result of a J-K transition detected on a suspended port.
- */
-#define USBHSH_USBSTS_PCD(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBSTS_PCD_SHIFT)) & USBHSH_USBSTS_PCD_MASK)
-#define USBHSH_USBSTS_FLR_MASK (0x8U)
-#define USBHSH_USBSTS_FLR_SHIFT (3U)
-/*! FLR - Frame List Rollover: The host controller sets this bit to logic 1 when the frame list
- * index rolls over its maximum value to 0.
- */
-#define USBHSH_USBSTS_FLR(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBSTS_FLR_SHIFT)) & USBHSH_USBSTS_FLR_MASK)
-#define USBHSH_USBSTS_ATL_IRQ_MASK (0x10000U)
-#define USBHSH_USBSTS_ATL_IRQ_SHIFT (16U)
-/*! ATL_IRQ - ATL IRQ: Indicates that an ATL PTD (with I-bit set) was completed.
- */
-#define USBHSH_USBSTS_ATL_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBSTS_ATL_IRQ_SHIFT)) & USBHSH_USBSTS_ATL_IRQ_MASK)
-#define USBHSH_USBSTS_ISO_IRQ_MASK (0x20000U)
-#define USBHSH_USBSTS_ISO_IRQ_SHIFT (17U)
-/*! ISO_IRQ - ISO IRQ: Indicates that an ISO PTD (with I-bit set) was completed.
- */
-#define USBHSH_USBSTS_ISO_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBSTS_ISO_IRQ_SHIFT)) & USBHSH_USBSTS_ISO_IRQ_MASK)
-#define USBHSH_USBSTS_INT_IRQ_MASK (0x40000U)
-#define USBHSH_USBSTS_INT_IRQ_SHIFT (18U)
-/*! INT_IRQ - INT IRQ: Indicates that an INT PTD (with I-bit set) was completed.
- */
-#define USBHSH_USBSTS_INT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBSTS_INT_IRQ_SHIFT)) & USBHSH_USBSTS_INT_IRQ_MASK)
-#define USBHSH_USBSTS_SOF_IRQ_MASK (0x80000U)
-#define USBHSH_USBSTS_SOF_IRQ_SHIFT (19U)
-/*! SOF_IRQ - SOF interrupt: Every time when the host sends a Start of Frame token on the USB bus, this bit is set.
- */
-#define USBHSH_USBSTS_SOF_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBSTS_SOF_IRQ_SHIFT)) & USBHSH_USBSTS_SOF_IRQ_MASK)
-/*! @} */
-
-/*! @name USBINTR - USB Interrupt Enable register */
-/*! @{ */
-#define USBHSH_USBINTR_PCDE_MASK (0x4U)
-#define USBHSH_USBINTR_PCDE_SHIFT (2U)
-/*! PCDE - Port Change Detect Interrupt Enable: 1: enable 0: disable.
- */
-#define USBHSH_USBINTR_PCDE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBINTR_PCDE_SHIFT)) & USBHSH_USBINTR_PCDE_MASK)
-#define USBHSH_USBINTR_FLRE_MASK (0x8U)
-#define USBHSH_USBINTR_FLRE_SHIFT (3U)
-/*! FLRE - Frame List Rollover Interrupt Enable: 1: enable 0: disable.
- */
-#define USBHSH_USBINTR_FLRE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBINTR_FLRE_SHIFT)) & USBHSH_USBINTR_FLRE_MASK)
-#define USBHSH_USBINTR_ATL_IRQ_E_MASK (0x10000U)
-#define USBHSH_USBINTR_ATL_IRQ_E_SHIFT (16U)
-/*! ATL_IRQ_E - ATL IRQ Enable bit: 1: enable 0: disable.
- */
-#define USBHSH_USBINTR_ATL_IRQ_E(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBINTR_ATL_IRQ_E_SHIFT)) & USBHSH_USBINTR_ATL_IRQ_E_MASK)
-#define USBHSH_USBINTR_ISO_IRQ_E_MASK (0x20000U)
-#define USBHSH_USBINTR_ISO_IRQ_E_SHIFT (17U)
-/*! ISO_IRQ_E - ISO IRQ Enable bit: 1: enable 0: disable.
- */
-#define USBHSH_USBINTR_ISO_IRQ_E(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBINTR_ISO_IRQ_E_SHIFT)) & USBHSH_USBINTR_ISO_IRQ_E_MASK)
-#define USBHSH_USBINTR_INT_IRQ_E_MASK (0x40000U)
-#define USBHSH_USBINTR_INT_IRQ_E_SHIFT (18U)
-/*! INT_IRQ_E - INT IRQ Enable bit: 1: enable 0: disable.
- */
-#define USBHSH_USBINTR_INT_IRQ_E(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBINTR_INT_IRQ_E_SHIFT)) & USBHSH_USBINTR_INT_IRQ_E_MASK)
-#define USBHSH_USBINTR_SOF_E_MASK (0x80000U)
-#define USBHSH_USBINTR_SOF_E_SHIFT (19U)
-/*! SOF_E - SOF Interrupt Enable bit: 1: enable 0: disable.
- */
-#define USBHSH_USBINTR_SOF_E(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBINTR_SOF_E_SHIFT)) & USBHSH_USBINTR_SOF_E_MASK)
-/*! @} */
-
-/*! @name PORTSC1 - Port Status and Control register */
-/*! @{ */
-#define USBHSH_PORTSC1_CCS_MASK (0x1U)
-#define USBHSH_PORTSC1_CCS_SHIFT (0U)
-/*! CCS - Current Connect Status: Logic 1 indicates a device is present on the port.
- */
-#define USBHSH_PORTSC1_CCS(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_CCS_SHIFT)) & USBHSH_PORTSC1_CCS_MASK)
-#define USBHSH_PORTSC1_CSC_MASK (0x2U)
-#define USBHSH_PORTSC1_CSC_SHIFT (1U)
-/*! CSC - Connect Status Change: Logic 1 means that the value of CCS has changed.
- */
-#define USBHSH_PORTSC1_CSC(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_CSC_SHIFT)) & USBHSH_PORTSC1_CSC_MASK)
-#define USBHSH_PORTSC1_PED_MASK (0x4U)
-#define USBHSH_PORTSC1_PED_SHIFT (2U)
-/*! PED - Port Enabled/Disabled.
- */
-#define USBHSH_PORTSC1_PED(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PED_SHIFT)) & USBHSH_PORTSC1_PED_MASK)
-#define USBHSH_PORTSC1_PEDC_MASK (0x8U)
-#define USBHSH_PORTSC1_PEDC_SHIFT (3U)
-/*! PEDC - Port Enabled/Disabled Change: Logic 1 means that the value of PED has changed.
- */
-#define USBHSH_PORTSC1_PEDC(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PEDC_SHIFT)) & USBHSH_PORTSC1_PEDC_MASK)
-#define USBHSH_PORTSC1_OCA_MASK (0x10U)
-#define USBHSH_PORTSC1_OCA_SHIFT (4U)
-/*! OCA - Over-current active: Logic 1 means that this port has an over-current condition.
- */
-#define USBHSH_PORTSC1_OCA(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_OCA_SHIFT)) & USBHSH_PORTSC1_OCA_MASK)
-#define USBHSH_PORTSC1_OCC_MASK (0x20U)
-#define USBHSH_PORTSC1_OCC_SHIFT (5U)
-/*! OCC - Over-current change: Logic 1 means that the value of OCA has changed.
- */
-#define USBHSH_PORTSC1_OCC(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_OCC_SHIFT)) & USBHSH_PORTSC1_OCC_MASK)
-#define USBHSH_PORTSC1_FPR_MASK (0x40U)
-#define USBHSH_PORTSC1_FPR_SHIFT (6U)
-/*! FPR - Force Port Resume: Logic 1 means resume (K-state) detected or driven on the port.
- */
-#define USBHSH_PORTSC1_FPR(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_FPR_SHIFT)) & USBHSH_PORTSC1_FPR_MASK)
-#define USBHSH_PORTSC1_SUSP_MASK (0x80U)
-#define USBHSH_PORTSC1_SUSP_SHIFT (7U)
-/*! SUSP - Suspend: Logic 1 means port is in the suspend state.
- */
-#define USBHSH_PORTSC1_SUSP(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_SUSP_SHIFT)) & USBHSH_PORTSC1_SUSP_MASK)
-#define USBHSH_PORTSC1_PR_MASK (0x100U)
-#define USBHSH_PORTSC1_PR_SHIFT (8U)
-/*! PR - Port Reset: Logic 1 means the port is in the reset state.
- */
-#define USBHSH_PORTSC1_PR(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PR_SHIFT)) & USBHSH_PORTSC1_PR_MASK)
-#define USBHSH_PORTSC1_LS_MASK (0xC00U)
-#define USBHSH_PORTSC1_LS_SHIFT (10U)
-/*! LS - Line Status: This field reflects the current logical levels of the DP (bit 11) and DM (bit 10) signal lines.
- */
-#define USBHSH_PORTSC1_LS(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_LS_SHIFT)) & USBHSH_PORTSC1_LS_MASK)
-#define USBHSH_PORTSC1_PP_MASK (0x1000U)
-#define USBHSH_PORTSC1_PP_SHIFT (12U)
-/*! PP - Port Power: The function of this bit depends on the value of the Port Power Control (PPC) bit in the HCSPARAMS register.
- */
-#define USBHSH_PORTSC1_PP(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PP_SHIFT)) & USBHSH_PORTSC1_PP_MASK)
-#define USBHSH_PORTSC1_PIC_MASK (0xC000U)
-#define USBHSH_PORTSC1_PIC_SHIFT (14U)
-/*! PIC - Port Indicator Control : Writing to this field has no effect if the P_INDICATOR bit in the
- * HCSPARAMS register is logic 0.
- */
-#define USBHSH_PORTSC1_PIC(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PIC_SHIFT)) & USBHSH_PORTSC1_PIC_MASK)
-#define USBHSH_PORTSC1_PTC_MASK (0xF0000U)
-#define USBHSH_PORTSC1_PTC_SHIFT (16U)
-/*! PTC - Port Test Control: A non-zero value indicates that the port is operating in the test mode as indicated by the value.
- */
-#define USBHSH_PORTSC1_PTC(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PTC_SHIFT)) & USBHSH_PORTSC1_PTC_MASK)
-#define USBHSH_PORTSC1_PSPD_MASK (0x300000U)
-#define USBHSH_PORTSC1_PSPD_SHIFT (20U)
-/*! PSPD - Port Speed: 00b: Low-speed 01b: Full-speed 10b: High-speed 11b: Reserved.
- */
-#define USBHSH_PORTSC1_PSPD(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PSPD_SHIFT)) & USBHSH_PORTSC1_PSPD_MASK)
-#define USBHSH_PORTSC1_WOO_MASK (0x400000U)
-#define USBHSH_PORTSC1_WOO_SHIFT (22U)
-/*! WOO - Wake on overcurrent enable: Writing this bit to a one enables the port to be sensitive to
- * overcurrent conditions as wake-up events.
- */
-#define USBHSH_PORTSC1_WOO(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_WOO_SHIFT)) & USBHSH_PORTSC1_WOO_MASK)
-/*! @} */
-
-/*! @name ATLPTDD - Done map for each ATL PTD */
-/*! @{ */
-#define USBHSH_ATLPTDD_ATL_DONE_MASK (0xFFFFFFFFU)
-#define USBHSH_ATLPTDD_ATL_DONE_SHIFT (0U)
-/*! ATL_DONE - The bit corresponding to a certain PTD will be set to logic 1 as soon as that PTD execution is completed.
- */
-#define USBHSH_ATLPTDD_ATL_DONE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ATLPTDD_ATL_DONE_SHIFT)) & USBHSH_ATLPTDD_ATL_DONE_MASK)
-/*! @} */
-
-/*! @name ATLPTDS - Skip map for each ATL PTD */
-/*! @{ */
-#define USBHSH_ATLPTDS_ATL_SKIP_MASK (0xFFFFFFFFU)
-#define USBHSH_ATLPTDS_ATL_SKIP_SHIFT (0U)
-/*! ATL_SKIP - When a bit in the PTD Skip Map is set to logic 1, the corresponding PTD will be
- * skipped, independent of the V bit setting.
- */
-#define USBHSH_ATLPTDS_ATL_SKIP(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ATLPTDS_ATL_SKIP_SHIFT)) & USBHSH_ATLPTDS_ATL_SKIP_MASK)
-/*! @} */
-
-/*! @name ISOPTDD - Done map for each ISO PTD */
-/*! @{ */
-#define USBHSH_ISOPTDD_ISO_DONE_MASK (0xFFFFFFFFU)
-#define USBHSH_ISOPTDD_ISO_DONE_SHIFT (0U)
-/*! ISO_DONE - The bit corresponding to a certain PTD will be set to logic 1 as soon as that PTD execution is completed.
- */
-#define USBHSH_ISOPTDD_ISO_DONE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ISOPTDD_ISO_DONE_SHIFT)) & USBHSH_ISOPTDD_ISO_DONE_MASK)
-/*! @} */
-
-/*! @name ISOPTDS - Skip map for each ISO PTD */
-/*! @{ */
-#define USBHSH_ISOPTDS_ISO_SKIP_MASK (0xFFFFFFFFU)
-#define USBHSH_ISOPTDS_ISO_SKIP_SHIFT (0U)
-/*! ISO_SKIP - The bit corresponding to a certain PTD will be set to logic 1 as soon as that PTD execution is completed.
- */
-#define USBHSH_ISOPTDS_ISO_SKIP(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ISOPTDS_ISO_SKIP_SHIFT)) & USBHSH_ISOPTDS_ISO_SKIP_MASK)
-/*! @} */
-
-/*! @name INTPTDD - Done map for each INT PTD */
-/*! @{ */
-#define USBHSH_INTPTDD_INT_DONE_MASK (0xFFFFFFFFU)
-#define USBHSH_INTPTDD_INT_DONE_SHIFT (0U)
-/*! INT_DONE - The bit corresponding to a certain PTD will be set to logic 1 as soon as that PTD execution is completed.
- */
-#define USBHSH_INTPTDD_INT_DONE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_INTPTDD_INT_DONE_SHIFT)) & USBHSH_INTPTDD_INT_DONE_MASK)
-/*! @} */
-
-/*! @name INTPTDS - Skip map for each INT PTD */
-/*! @{ */
-#define USBHSH_INTPTDS_INT_SKIP_MASK (0xFFFFFFFFU)
-#define USBHSH_INTPTDS_INT_SKIP_SHIFT (0U)
-/*! INT_SKIP - When a bit in the PTD Skip Map is set to logic 1, the corresponding PTD will be
- * skipped, independent of the V bit setting.
- */
-#define USBHSH_INTPTDS_INT_SKIP(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_INTPTDS_INT_SKIP_SHIFT)) & USBHSH_INTPTDS_INT_SKIP_MASK)
-/*! @} */
-
-/*! @name LASTPTD - Marks the last PTD in the list for ISO, INT and ATL */
-/*! @{ */
-#define USBHSH_LASTPTD_ATL_LAST_MASK (0x1FU)
-#define USBHSH_LASTPTD_ATL_LAST_SHIFT (0U)
-/*! ATL_LAST - If hardware has reached this PTD and the J bit is not set, it will go to PTD0 as the next PTD to be processed.
- */
-#define USBHSH_LASTPTD_ATL_LAST(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_LASTPTD_ATL_LAST_SHIFT)) & USBHSH_LASTPTD_ATL_LAST_MASK)
-#define USBHSH_LASTPTD_ISO_LAST_MASK (0x1F00U)
-#define USBHSH_LASTPTD_ISO_LAST_SHIFT (8U)
-/*! ISO_LAST - This indicates the last PTD in the ISO list.
- */
-#define USBHSH_LASTPTD_ISO_LAST(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_LASTPTD_ISO_LAST_SHIFT)) & USBHSH_LASTPTD_ISO_LAST_MASK)
-#define USBHSH_LASTPTD_INT_LAST_MASK (0x1F0000U)
-#define USBHSH_LASTPTD_INT_LAST_SHIFT (16U)
-/*! INT_LAST - This indicates the last PTD in the INT list.
- */
-#define USBHSH_LASTPTD_INT_LAST(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_LASTPTD_INT_LAST_SHIFT)) & USBHSH_LASTPTD_INT_LAST_MASK)
-/*! @} */
-
-/*! @name PORTMODE - Controls the port if it is attached to the host block or the device block */
-/*! @{ */
-#define USBHSH_PORTMODE_DEV_ENABLE_MASK (0x10000U)
-#define USBHSH_PORTMODE_DEV_ENABLE_SHIFT (16U)
-/*! DEV_ENABLE - If this bit is set to one, one of the ports will behave as a USB device.
- */
-#define USBHSH_PORTMODE_DEV_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTMODE_DEV_ENABLE_SHIFT)) & USBHSH_PORTMODE_DEV_ENABLE_MASK)
-#define USBHSH_PORTMODE_SW_CTRL_PDCOM_MASK (0x40000U)
-#define USBHSH_PORTMODE_SW_CTRL_PDCOM_SHIFT (18U)
-/*! SW_CTRL_PDCOM - This bit indicates if the PHY power-down input is controlled by software or by hardware.
- */
-#define USBHSH_PORTMODE_SW_CTRL_PDCOM(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTMODE_SW_CTRL_PDCOM_SHIFT)) & USBHSH_PORTMODE_SW_CTRL_PDCOM_MASK)
-#define USBHSH_PORTMODE_SW_PDCOM_MASK (0x80000U)
-#define USBHSH_PORTMODE_SW_PDCOM_SHIFT (19U)
-/*! SW_PDCOM - This bit is only used when SW_CTRL_PDCOM is set to 1b.
- */
-#define USBHSH_PORTMODE_SW_PDCOM(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTMODE_SW_PDCOM_SHIFT)) & USBHSH_PORTMODE_SW_PDCOM_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group USBHSH_Register_Masks */
-
-
-/* USBHSH - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral USBHSH base address */
- #define USBHSH_BASE (0x500A3000u)
- /** Peripheral USBHSH base address */
- #define USBHSH_BASE_NS (0x400A3000u)
- /** Peripheral USBHSH base pointer */
- #define USBHSH ((USBHSH_Type *)USBHSH_BASE)
- /** Peripheral USBHSH base pointer */
- #define USBHSH_NS ((USBHSH_Type *)USBHSH_BASE_NS)
- /** Array initializer of USBHSH peripheral base addresses */
- #define USBHSH_BASE_ADDRS { USBHSH_BASE }
- /** Array initializer of USBHSH peripheral base pointers */
- #define USBHSH_BASE_PTRS { USBHSH }
- /** Array initializer of USBHSH peripheral base addresses */
- #define USBHSH_BASE_ADDRS_NS { USBHSH_BASE_NS }
- /** Array initializer of USBHSH peripheral base pointers */
- #define USBHSH_BASE_PTRS_NS { USBHSH_NS }
-#else
- /** Peripheral USBHSH base address */
- #define USBHSH_BASE (0x400A3000u)
- /** Peripheral USBHSH base pointer */
- #define USBHSH ((USBHSH_Type *)USBHSH_BASE)
- /** Array initializer of USBHSH peripheral base addresses */
- #define USBHSH_BASE_ADDRS { USBHSH_BASE }
- /** Array initializer of USBHSH peripheral base pointers */
- #define USBHSH_BASE_PTRS { USBHSH }
-#endif
-/** Interrupt vectors for the USBHSH peripheral type */
-#define USBHSH_IRQS { USB1_IRQn }
-#define USBHSH_NEEDCLK_IRQS { USB1_NEEDCLK_IRQn }
-
-/*!
- * @}
- */ /* end of group USBHSH_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- USBPHY Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBPHY_Peripheral_Access_Layer USBPHY Peripheral Access Layer
- * @{
- */
-
-/** USBPHY - Register Layout Typedef */
-typedef struct {
- __IO uint32_t PWD; /**< USB PHY Power-Down Register, offset: 0x0 */
- __IO uint32_t PWD_SET; /**< USB PHY Power-Down Register, offset: 0x4 */
- __IO uint32_t PWD_CLR; /**< USB PHY Power-Down Register, offset: 0x8 */
- __IO uint32_t PWD_TOG; /**< USB PHY Power-Down Register, offset: 0xC */
- __IO uint32_t TX; /**< USB PHY Transmitter Control Register, offset: 0x10 */
- __IO uint32_t TX_SET; /**< USB PHY Transmitter Control Register, offset: 0x14 */
- __IO uint32_t TX_CLR; /**< USB PHY Transmitter Control Register, offset: 0x18 */
- __IO uint32_t TX_TOG; /**< USB PHY Transmitter Control Register, offset: 0x1C */
- __IO uint32_t RX; /**< USB PHY Receiver Control Register, offset: 0x20 */
- __IO uint32_t RX_SET; /**< USB PHY Receiver Control Register, offset: 0x24 */
- __IO uint32_t RX_CLR; /**< USB PHY Receiver Control Register, offset: 0x28 */
- __IO uint32_t RX_TOG; /**< USB PHY Receiver Control Register, offset: 0x2C */
- __IO uint32_t CTRL; /**< USB PHY General Control Register, offset: 0x30 */
- __IO uint32_t CTRL_SET; /**< USB PHY General Control Register, offset: 0x34 */
- __IO uint32_t CTRL_CLR; /**< USB PHY General Control Register, offset: 0x38 */
- __IO uint32_t CTRL_TOG; /**< USB PHY General Control Register, offset: 0x3C */
- __I uint32_t STATUS; /**< USB PHY Status Register, offset: 0x40 */
- uint8_t RESERVED_0[92];
- __IO uint32_t PLL_SIC; /**< USB PHY PLL Control/Status Register, offset: 0xA0 */
- __IO uint32_t PLL_SIC_SET; /**< USB PHY PLL Control/Status Register, offset: 0xA4 */
- __IO uint32_t PLL_SIC_CLR; /**< USB PHY PLL Control/Status Register, offset: 0xA8 */
- __IO uint32_t PLL_SIC_TOG; /**< USB PHY PLL Control/Status Register, offset: 0xAC */
- uint8_t RESERVED_1[16];
- __IO uint32_t USB1_VBUS_DETECT; /**< USB PHY VBUS Detect Control Register, offset: 0xC0 */
- __IO uint32_t USB1_VBUS_DETECT_SET; /**< USB PHY VBUS Detect Control Register, offset: 0xC4 */
- __IO uint32_t USB1_VBUS_DETECT_CLR; /**< USB PHY VBUS Detect Control Register, offset: 0xC8 */
- __IO uint32_t USB1_VBUS_DETECT_TOG; /**< USB PHY VBUS Detect Control Register, offset: 0xCC */
- uint8_t RESERVED_2[48];
- __IO uint32_t ANACTRLr; /**< USB PHY Analog Control Register, offset: 0x100 */
- __IO uint32_t ANACTRL_SET; /**< USB PHY Analog Control Register, offset: 0x104 */
- __IO uint32_t ANACTRL_CLR; /**< USB PHY Analog Control Register, offset: 0x108 */
- __IO uint32_t ANACTRL_TOG; /**< USB PHY Analog Control Register, offset: 0x10C */
-} USBPHY_Type;
-
-/* ----------------------------------------------------------------------------
- -- USBPHY Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBPHY_Register_Masks USBPHY Register Masks
- * @{
- */
-
-/*! @name PWD - USB PHY Power-Down Register */
-/*! @{ */
-#define USBPHY_PWD_TXPWDFS_MASK (0x400U)
-#define USBPHY_PWD_TXPWDFS_SHIFT (10U)
-/*! TXPWDFS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the
- */
-#define USBPHY_PWD_TXPWDFS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TXPWDFS_SHIFT)) & USBPHY_PWD_TXPWDFS_MASK)
-#define USBPHY_PWD_TXPWDIBIAS_MASK (0x800U)
-#define USBPHY_PWD_TXPWDIBIAS_SHIFT (11U)
-/*! TXPWDIBIAS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the
- */
-#define USBPHY_PWD_TXPWDIBIAS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TXPWDIBIAS_SHIFT)) & USBPHY_PWD_TXPWDIBIAS_MASK)
-#define USBPHY_PWD_TXPWDV2I_MASK (0x1000U)
-#define USBPHY_PWD_TXPWDV2I_SHIFT (12U)
-/*! TXPWDV2I
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY transmit V-to-I converter and the current mirror
- */
-#define USBPHY_PWD_TXPWDV2I(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TXPWDV2I_SHIFT)) & USBPHY_PWD_TXPWDV2I_MASK)
-#define USBPHY_PWD_RXPWDENV_MASK (0x20000U)
-#define USBPHY_PWD_RXPWDENV_SHIFT (17U)
-/*! RXPWDENV
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed receiver envelope detector (squelch signal)
- */
-#define USBPHY_PWD_RXPWDENV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_RXPWDENV_SHIFT)) & USBPHY_PWD_RXPWDENV_MASK)
-#define USBPHY_PWD_RXPWD1PT1_MASK (0x40000U)
-#define USBPHY_PWD_RXPWD1PT1_SHIFT (18U)
-/*! RXPWD1PT1
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed differential receiver.
- */
-#define USBPHY_PWD_RXPWD1PT1(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_RXPWD1PT1_SHIFT)) & USBPHY_PWD_RXPWD1PT1_MASK)
-#define USBPHY_PWD_RXPWDDIFF_MASK (0x80000U)
-#define USBPHY_PWD_RXPWDDIFF_SHIFT (19U)
-/*! RXPWDDIFF
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed differential receive
- */
-#define USBPHY_PWD_RXPWDDIFF(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_RXPWDDIFF_SHIFT)) & USBPHY_PWD_RXPWDDIFF_MASK)
-#define USBPHY_PWD_RXPWDRX_MASK (0x100000U)
-#define USBPHY_PWD_RXPWDRX_SHIFT (20U)
-/*! RXPWDRX
- * 0b0..Normal operation.
- * 0b1..Power-down the entire USB PHY receiver block except for the full-speed differential receiver
- */
-#define USBPHY_PWD_RXPWDRX(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_RXPWDRX_SHIFT)) & USBPHY_PWD_RXPWDRX_MASK)
-/*! @} */
-
-/*! @name PWD_SET - USB PHY Power-Down Register */
-/*! @{ */
-#define USBPHY_PWD_SET_TXPWDFS_MASK (0x400U)
-#define USBPHY_PWD_SET_TXPWDFS_SHIFT (10U)
-/*! TXPWDFS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the
- */
-#define USBPHY_PWD_SET_TXPWDFS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_TXPWDFS_SHIFT)) & USBPHY_PWD_SET_TXPWDFS_MASK)
-#define USBPHY_PWD_SET_TXPWDIBIAS_MASK (0x800U)
-#define USBPHY_PWD_SET_TXPWDIBIAS_SHIFT (11U)
-/*! TXPWDIBIAS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the
- */
-#define USBPHY_PWD_SET_TXPWDIBIAS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_TXPWDIBIAS_SHIFT)) & USBPHY_PWD_SET_TXPWDIBIAS_MASK)
-#define USBPHY_PWD_SET_TXPWDV2I_MASK (0x1000U)
-#define USBPHY_PWD_SET_TXPWDV2I_SHIFT (12U)
-/*! TXPWDV2I
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY transmit V-to-I converter and the current mirror
- */
-#define USBPHY_PWD_SET_TXPWDV2I(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_TXPWDV2I_SHIFT)) & USBPHY_PWD_SET_TXPWDV2I_MASK)
-#define USBPHY_PWD_SET_RXPWDENV_MASK (0x20000U)
-#define USBPHY_PWD_SET_RXPWDENV_SHIFT (17U)
-/*! RXPWDENV
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed receiver envelope detector (squelch signal)
- */
-#define USBPHY_PWD_SET_RXPWDENV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_RXPWDENV_SHIFT)) & USBPHY_PWD_SET_RXPWDENV_MASK)
-#define USBPHY_PWD_SET_RXPWD1PT1_MASK (0x40000U)
-#define USBPHY_PWD_SET_RXPWD1PT1_SHIFT (18U)
-/*! RXPWD1PT1
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed differential receiver.
- */
-#define USBPHY_PWD_SET_RXPWD1PT1(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_RXPWD1PT1_SHIFT)) & USBPHY_PWD_SET_RXPWD1PT1_MASK)
-#define USBPHY_PWD_SET_RXPWDDIFF_MASK (0x80000U)
-#define USBPHY_PWD_SET_RXPWDDIFF_SHIFT (19U)
-/*! RXPWDDIFF
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed differential receive
- */
-#define USBPHY_PWD_SET_RXPWDDIFF(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_RXPWDDIFF_SHIFT)) & USBPHY_PWD_SET_RXPWDDIFF_MASK)
-#define USBPHY_PWD_SET_RXPWDRX_MASK (0x100000U)
-#define USBPHY_PWD_SET_RXPWDRX_SHIFT (20U)
-/*! RXPWDRX
- * 0b0..Normal operation.
- * 0b1..Power-down the entire USB PHY receiver block except for the full-speed differential receiver
- */
-#define USBPHY_PWD_SET_RXPWDRX(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_RXPWDRX_SHIFT)) & USBPHY_PWD_SET_RXPWDRX_MASK)
-/*! @} */
-
-/*! @name PWD_CLR - USB PHY Power-Down Register */
-/*! @{ */
-#define USBPHY_PWD_CLR_TXPWDFS_MASK (0x400U)
-#define USBPHY_PWD_CLR_TXPWDFS_SHIFT (10U)
-/*! TXPWDFS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the
- */
-#define USBPHY_PWD_CLR_TXPWDFS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_TXPWDFS_SHIFT)) & USBPHY_PWD_CLR_TXPWDFS_MASK)
-#define USBPHY_PWD_CLR_TXPWDIBIAS_MASK (0x800U)
-#define USBPHY_PWD_CLR_TXPWDIBIAS_SHIFT (11U)
-/*! TXPWDIBIAS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the
- */
-#define USBPHY_PWD_CLR_TXPWDIBIAS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_TXPWDIBIAS_SHIFT)) & USBPHY_PWD_CLR_TXPWDIBIAS_MASK)
-#define USBPHY_PWD_CLR_TXPWDV2I_MASK (0x1000U)
-#define USBPHY_PWD_CLR_TXPWDV2I_SHIFT (12U)
-/*! TXPWDV2I
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY transmit V-to-I converter and the current mirror
- */
-#define USBPHY_PWD_CLR_TXPWDV2I(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_TXPWDV2I_SHIFT)) & USBPHY_PWD_CLR_TXPWDV2I_MASK)
-#define USBPHY_PWD_CLR_RXPWDENV_MASK (0x20000U)
-#define USBPHY_PWD_CLR_RXPWDENV_SHIFT (17U)
-/*! RXPWDENV
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed receiver envelope detector (squelch signal)
- */
-#define USBPHY_PWD_CLR_RXPWDENV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_RXPWDENV_SHIFT)) & USBPHY_PWD_CLR_RXPWDENV_MASK)
-#define USBPHY_PWD_CLR_RXPWD1PT1_MASK (0x40000U)
-#define USBPHY_PWD_CLR_RXPWD1PT1_SHIFT (18U)
-/*! RXPWD1PT1
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed differential receiver.
- */
-#define USBPHY_PWD_CLR_RXPWD1PT1(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_RXPWD1PT1_SHIFT)) & USBPHY_PWD_CLR_RXPWD1PT1_MASK)
-#define USBPHY_PWD_CLR_RXPWDDIFF_MASK (0x80000U)
-#define USBPHY_PWD_CLR_RXPWDDIFF_SHIFT (19U)
-/*! RXPWDDIFF
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed differential receive
- */
-#define USBPHY_PWD_CLR_RXPWDDIFF(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_RXPWDDIFF_SHIFT)) & USBPHY_PWD_CLR_RXPWDDIFF_MASK)
-#define USBPHY_PWD_CLR_RXPWDRX_MASK (0x100000U)
-#define USBPHY_PWD_CLR_RXPWDRX_SHIFT (20U)
-/*! RXPWDRX
- * 0b0..Normal operation.
- * 0b1..Power-down the entire USB PHY receiver block except for the full-speed differential receiver
- */
-#define USBPHY_PWD_CLR_RXPWDRX(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_RXPWDRX_SHIFT)) & USBPHY_PWD_CLR_RXPWDRX_MASK)
-/*! @} */
-
-/*! @name PWD_TOG - USB PHY Power-Down Register */
-/*! @{ */
-#define USBPHY_PWD_TOG_TXPWDFS_MASK (0x400U)
-#define USBPHY_PWD_TOG_TXPWDFS_SHIFT (10U)
-/*! TXPWDFS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the
- */
-#define USBPHY_PWD_TOG_TXPWDFS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_TXPWDFS_SHIFT)) & USBPHY_PWD_TOG_TXPWDFS_MASK)
-#define USBPHY_PWD_TOG_TXPWDIBIAS_MASK (0x800U)
-#define USBPHY_PWD_TOG_TXPWDIBIAS_SHIFT (11U)
-/*! TXPWDIBIAS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the
- */
-#define USBPHY_PWD_TOG_TXPWDIBIAS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_TXPWDIBIAS_SHIFT)) & USBPHY_PWD_TOG_TXPWDIBIAS_MASK)
-#define USBPHY_PWD_TOG_TXPWDV2I_MASK (0x1000U)
-#define USBPHY_PWD_TOG_TXPWDV2I_SHIFT (12U)
-/*! TXPWDV2I
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY transmit V-to-I converter and the current mirror
- */
-#define USBPHY_PWD_TOG_TXPWDV2I(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_TXPWDV2I_SHIFT)) & USBPHY_PWD_TOG_TXPWDV2I_MASK)
-#define USBPHY_PWD_TOG_RXPWDENV_MASK (0x20000U)
-#define USBPHY_PWD_TOG_RXPWDENV_SHIFT (17U)
-/*! RXPWDENV
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed receiver envelope detector (squelch signal)
- */
-#define USBPHY_PWD_TOG_RXPWDENV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_RXPWDENV_SHIFT)) & USBPHY_PWD_TOG_RXPWDENV_MASK)
-#define USBPHY_PWD_TOG_RXPWD1PT1_MASK (0x40000U)
-#define USBPHY_PWD_TOG_RXPWD1PT1_SHIFT (18U)
-/*! RXPWD1PT1
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed differential receiver.
- */
-#define USBPHY_PWD_TOG_RXPWD1PT1(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_RXPWD1PT1_SHIFT)) & USBPHY_PWD_TOG_RXPWD1PT1_MASK)
-#define USBPHY_PWD_TOG_RXPWDDIFF_MASK (0x80000U)
-#define USBPHY_PWD_TOG_RXPWDDIFF_SHIFT (19U)
-/*! RXPWDDIFF
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed differential receive
- */
-#define USBPHY_PWD_TOG_RXPWDDIFF(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_RXPWDDIFF_SHIFT)) & USBPHY_PWD_TOG_RXPWDDIFF_MASK)
-#define USBPHY_PWD_TOG_RXPWDRX_MASK (0x100000U)
-#define USBPHY_PWD_TOG_RXPWDRX_SHIFT (20U)
-/*! RXPWDRX
- * 0b0..Normal operation.
- * 0b1..Power-down the entire USB PHY receiver block except for the full-speed differential receiver
- */
-#define USBPHY_PWD_TOG_RXPWDRX(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_RXPWDRX_SHIFT)) & USBPHY_PWD_TOG_RXPWDRX_MASK)
-/*! @} */
-
-/*! @name TX - USB PHY Transmitter Control Register */
-/*! @{ */
-#define USBPHY_TX_D_CAL_MASK (0xFU)
-#define USBPHY_TX_D_CAL_SHIFT (0U)
-/*! D_CAL
- * 0b0000..Maximum current, approximately 19% above nominal.
- * 0b0111..Nominal
- * 0b1111..Minimum current, approximately 19% below nominal.
- */
-#define USBPHY_TX_D_CAL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_D_CAL_SHIFT)) & USBPHY_TX_D_CAL_MASK)
-#define USBPHY_TX_TXCAL45DM_MASK (0xF00U)
-#define USBPHY_TX_TXCAL45DM_SHIFT (8U)
-#define USBPHY_TX_TXCAL45DM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TXCAL45DM_SHIFT)) & USBPHY_TX_TXCAL45DM_MASK)
-#define USBPHY_TX_TXENCAL45DN_MASK (0x2000U)
-#define USBPHY_TX_TXENCAL45DN_SHIFT (13U)
-#define USBPHY_TX_TXENCAL45DN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TXENCAL45DN_SHIFT)) & USBPHY_TX_TXENCAL45DN_MASK)
-#define USBPHY_TX_TXCAL45DP_MASK (0xF0000U)
-#define USBPHY_TX_TXCAL45DP_SHIFT (16U)
-#define USBPHY_TX_TXCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TXCAL45DP_SHIFT)) & USBPHY_TX_TXCAL45DP_MASK)
-#define USBPHY_TX_TXENCAL45DP_MASK (0x200000U)
-#define USBPHY_TX_TXENCAL45DP_SHIFT (21U)
-#define USBPHY_TX_TXENCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TXENCAL45DP_SHIFT)) & USBPHY_TX_TXENCAL45DP_MASK)
-/*! @} */
-
-/*! @name TX_SET - USB PHY Transmitter Control Register */
-/*! @{ */
-#define USBPHY_TX_SET_D_CAL_MASK (0xFU)
-#define USBPHY_TX_SET_D_CAL_SHIFT (0U)
-/*! D_CAL
- * 0b0000..Maximum current, approximately 19% above nominal.
- * 0b0111..Nominal
- * 0b1111..Minimum current, approximately 19% below nominal.
- */
-#define USBPHY_TX_SET_D_CAL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_SET_D_CAL_SHIFT)) & USBPHY_TX_SET_D_CAL_MASK)
-#define USBPHY_TX_SET_TXCAL45DM_MASK (0xF00U)
-#define USBPHY_TX_SET_TXCAL45DM_SHIFT (8U)
-#define USBPHY_TX_SET_TXCAL45DM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_SET_TXCAL45DM_SHIFT)) & USBPHY_TX_SET_TXCAL45DM_MASK)
-#define USBPHY_TX_SET_TXENCAL45DN_MASK (0x2000U)
-#define USBPHY_TX_SET_TXENCAL45DN_SHIFT (13U)
-#define USBPHY_TX_SET_TXENCAL45DN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_SET_TXENCAL45DN_SHIFT)) & USBPHY_TX_SET_TXENCAL45DN_MASK)
-#define USBPHY_TX_SET_TXCAL45DP_MASK (0xF0000U)
-#define USBPHY_TX_SET_TXCAL45DP_SHIFT (16U)
-#define USBPHY_TX_SET_TXCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_SET_TXCAL45DP_SHIFT)) & USBPHY_TX_SET_TXCAL45DP_MASK)
-#define USBPHY_TX_SET_TXENCAL45DP_MASK (0x200000U)
-#define USBPHY_TX_SET_TXENCAL45DP_SHIFT (21U)
-#define USBPHY_TX_SET_TXENCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_SET_TXENCAL45DP_SHIFT)) & USBPHY_TX_SET_TXENCAL45DP_MASK)
-/*! @} */
-
-/*! @name TX_CLR - USB PHY Transmitter Control Register */
-/*! @{ */
-#define USBPHY_TX_CLR_D_CAL_MASK (0xFU)
-#define USBPHY_TX_CLR_D_CAL_SHIFT (0U)
-/*! D_CAL
- * 0b0000..Maximum current, approximately 19% above nominal.
- * 0b0111..Nominal
- * 0b1111..Minimum current, approximately 19% below nominal.
- */
-#define USBPHY_TX_CLR_D_CAL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_CLR_D_CAL_SHIFT)) & USBPHY_TX_CLR_D_CAL_MASK)
-#define USBPHY_TX_CLR_TXCAL45DM_MASK (0xF00U)
-#define USBPHY_TX_CLR_TXCAL45DM_SHIFT (8U)
-#define USBPHY_TX_CLR_TXCAL45DM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_CLR_TXCAL45DM_SHIFT)) & USBPHY_TX_CLR_TXCAL45DM_MASK)
-#define USBPHY_TX_CLR_TXENCAL45DN_MASK (0x2000U)
-#define USBPHY_TX_CLR_TXENCAL45DN_SHIFT (13U)
-#define USBPHY_TX_CLR_TXENCAL45DN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_CLR_TXENCAL45DN_SHIFT)) & USBPHY_TX_CLR_TXENCAL45DN_MASK)
-#define USBPHY_TX_CLR_TXCAL45DP_MASK (0xF0000U)
-#define USBPHY_TX_CLR_TXCAL45DP_SHIFT (16U)
-#define USBPHY_TX_CLR_TXCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_CLR_TXCAL45DP_SHIFT)) & USBPHY_TX_CLR_TXCAL45DP_MASK)
-#define USBPHY_TX_CLR_TXENCAL45DP_MASK (0x200000U)
-#define USBPHY_TX_CLR_TXENCAL45DP_SHIFT (21U)
-#define USBPHY_TX_CLR_TXENCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_CLR_TXENCAL45DP_SHIFT)) & USBPHY_TX_CLR_TXENCAL45DP_MASK)
-/*! @} */
-
-/*! @name TX_TOG - USB PHY Transmitter Control Register */
-/*! @{ */
-#define USBPHY_TX_TOG_D_CAL_MASK (0xFU)
-#define USBPHY_TX_TOG_D_CAL_SHIFT (0U)
-/*! D_CAL
- * 0b0000..Maximum current, approximately 19% above nominal.
- * 0b0111..Nominal
- * 0b1111..Minimum current, approximately 19% below nominal.
- */
-#define USBPHY_TX_TOG_D_CAL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TOG_D_CAL_SHIFT)) & USBPHY_TX_TOG_D_CAL_MASK)
-#define USBPHY_TX_TOG_TXCAL45DM_MASK (0xF00U)
-#define USBPHY_TX_TOG_TXCAL45DM_SHIFT (8U)
-#define USBPHY_TX_TOG_TXCAL45DM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TOG_TXCAL45DM_SHIFT)) & USBPHY_TX_TOG_TXCAL45DM_MASK)
-#define USBPHY_TX_TOG_TXENCAL45DN_MASK (0x2000U)
-#define USBPHY_TX_TOG_TXENCAL45DN_SHIFT (13U)
-#define USBPHY_TX_TOG_TXENCAL45DN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TOG_TXENCAL45DN_SHIFT)) & USBPHY_TX_TOG_TXENCAL45DN_MASK)
-#define USBPHY_TX_TOG_TXCAL45DP_MASK (0xF0000U)
-#define USBPHY_TX_TOG_TXCAL45DP_SHIFT (16U)
-#define USBPHY_TX_TOG_TXCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TOG_TXCAL45DP_SHIFT)) & USBPHY_TX_TOG_TXCAL45DP_MASK)
-#define USBPHY_TX_TOG_TXENCAL45DP_MASK (0x200000U)
-#define USBPHY_TX_TOG_TXENCAL45DP_SHIFT (21U)
-#define USBPHY_TX_TOG_TXENCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TOG_TXENCAL45DP_SHIFT)) & USBPHY_TX_TOG_TXENCAL45DP_MASK)
-/*! @} */
-
-/*! @name RX - USB PHY Receiver Control Register */
-/*! @{ */
-#define USBPHY_RX_ENVADJ_MASK (0x7U)
-#define USBPHY_RX_ENVADJ_SHIFT (0U)
-/*! ENVADJ
- * 0b000..Trip-Level Voltage is 0.1000 V
- * 0b001..Trip-Level Voltage is 0.1125 V
- * 0b010..Trip-Level Voltage is 0.1250 V
- * 0b011..Trip-Level Voltage is 0.0875 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_ENVADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_ENVADJ_SHIFT)) & USBPHY_RX_ENVADJ_MASK)
-#define USBPHY_RX_DISCONADJ_MASK (0x70U)
-#define USBPHY_RX_DISCONADJ_SHIFT (4U)
-/*! DISCONADJ
- * 0b000..Trip-Level Voltage is 0.56875 V
- * 0b001..Trip-Level Voltage is 0.55000 V
- * 0b010..Trip-Level Voltage is 0.58125 V
- * 0b011..Trip-Level Voltage is 0.60000 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_DISCONADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_DISCONADJ_SHIFT)) & USBPHY_RX_DISCONADJ_MASK)
-#define USBPHY_RX_RXDBYPASS_MASK (0x400000U)
-#define USBPHY_RX_RXDBYPASS_SHIFT (22U)
-/*! RXDBYPASS
- * 0b0..Normal operation.
- * 0b1..Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver
- */
-#define USBPHY_RX_RXDBYPASS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_RXDBYPASS_SHIFT)) & USBPHY_RX_RXDBYPASS_MASK)
-/*! @} */
-
-/*! @name RX_SET - USB PHY Receiver Control Register */
-/*! @{ */
-#define USBPHY_RX_SET_ENVADJ_MASK (0x7U)
-#define USBPHY_RX_SET_ENVADJ_SHIFT (0U)
-/*! ENVADJ
- * 0b000..Trip-Level Voltage is 0.1000 V
- * 0b001..Trip-Level Voltage is 0.1125 V
- * 0b010..Trip-Level Voltage is 0.1250 V
- * 0b011..Trip-Level Voltage is 0.0875 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_SET_ENVADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_SET_ENVADJ_SHIFT)) & USBPHY_RX_SET_ENVADJ_MASK)
-#define USBPHY_RX_SET_DISCONADJ_MASK (0x70U)
-#define USBPHY_RX_SET_DISCONADJ_SHIFT (4U)
-/*! DISCONADJ
- * 0b000..Trip-Level Voltage is 0.56875 V
- * 0b001..Trip-Level Voltage is 0.55000 V
- * 0b010..Trip-Level Voltage is 0.58125 V
- * 0b011..Trip-Level Voltage is 0.60000 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_SET_DISCONADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_SET_DISCONADJ_SHIFT)) & USBPHY_RX_SET_DISCONADJ_MASK)
-#define USBPHY_RX_SET_RXDBYPASS_MASK (0x400000U)
-#define USBPHY_RX_SET_RXDBYPASS_SHIFT (22U)
-/*! RXDBYPASS
- * 0b0..Normal operation.
- * 0b1..Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver
- */
-#define USBPHY_RX_SET_RXDBYPASS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_SET_RXDBYPASS_SHIFT)) & USBPHY_RX_SET_RXDBYPASS_MASK)
-/*! @} */
-
-/*! @name RX_CLR - USB PHY Receiver Control Register */
-/*! @{ */
-#define USBPHY_RX_CLR_ENVADJ_MASK (0x7U)
-#define USBPHY_RX_CLR_ENVADJ_SHIFT (0U)
-/*! ENVADJ
- * 0b000..Trip-Level Voltage is 0.1000 V
- * 0b001..Trip-Level Voltage is 0.1125 V
- * 0b010..Trip-Level Voltage is 0.1250 V
- * 0b011..Trip-Level Voltage is 0.0875 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_CLR_ENVADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_CLR_ENVADJ_SHIFT)) & USBPHY_RX_CLR_ENVADJ_MASK)
-#define USBPHY_RX_CLR_DISCONADJ_MASK (0x70U)
-#define USBPHY_RX_CLR_DISCONADJ_SHIFT (4U)
-/*! DISCONADJ
- * 0b000..Trip-Level Voltage is 0.56875 V
- * 0b001..Trip-Level Voltage is 0.55000 V
- * 0b010..Trip-Level Voltage is 0.58125 V
- * 0b011..Trip-Level Voltage is 0.60000 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_CLR_DISCONADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_CLR_DISCONADJ_SHIFT)) & USBPHY_RX_CLR_DISCONADJ_MASK)
-#define USBPHY_RX_CLR_RXDBYPASS_MASK (0x400000U)
-#define USBPHY_RX_CLR_RXDBYPASS_SHIFT (22U)
-/*! RXDBYPASS
- * 0b0..Normal operation.
- * 0b1..Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver
- */
-#define USBPHY_RX_CLR_RXDBYPASS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_CLR_RXDBYPASS_SHIFT)) & USBPHY_RX_CLR_RXDBYPASS_MASK)
-/*! @} */
-
-/*! @name RX_TOG - USB PHY Receiver Control Register */
-/*! @{ */
-#define USBPHY_RX_TOG_ENVADJ_MASK (0x7U)
-#define USBPHY_RX_TOG_ENVADJ_SHIFT (0U)
-/*! ENVADJ
- * 0b000..Trip-Level Voltage is 0.1000 V
- * 0b001..Trip-Level Voltage is 0.1125 V
- * 0b010..Trip-Level Voltage is 0.1250 V
- * 0b011..Trip-Level Voltage is 0.0875 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_TOG_ENVADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_TOG_ENVADJ_SHIFT)) & USBPHY_RX_TOG_ENVADJ_MASK)
-#define USBPHY_RX_TOG_DISCONADJ_MASK (0x70U)
-#define USBPHY_RX_TOG_DISCONADJ_SHIFT (4U)
-/*! DISCONADJ
- * 0b000..Trip-Level Voltage is 0.56875 V
- * 0b001..Trip-Level Voltage is 0.55000 V
- * 0b010..Trip-Level Voltage is 0.58125 V
- * 0b011..Trip-Level Voltage is 0.60000 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_TOG_DISCONADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_TOG_DISCONADJ_SHIFT)) & USBPHY_RX_TOG_DISCONADJ_MASK)
-#define USBPHY_RX_TOG_RXDBYPASS_MASK (0x400000U)
-#define USBPHY_RX_TOG_RXDBYPASS_SHIFT (22U)
-/*! RXDBYPASS
- * 0b0..Normal operation.
- * 0b1..Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver
- */
-#define USBPHY_RX_TOG_RXDBYPASS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_TOG_RXDBYPASS_SHIFT)) & USBPHY_RX_TOG_RXDBYPASS_MASK)
-/*! @} */
-
-/*! @name CTRL - USB PHY General Control Register */
-/*! @{ */
-#define USBPHY_CTRL_ENHOSTDISCONDETECT_MASK (0x2U)
-#define USBPHY_CTRL_ENHOSTDISCONDETECT_SHIFT (1U)
-#define USBPHY_CTRL_ENHOSTDISCONDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENHOSTDISCONDETECT_SHIFT)) & USBPHY_CTRL_ENHOSTDISCONDETECT_MASK)
-#define USBPHY_CTRL_ENIRQHOSTDISCON_MASK (0x4U)
-#define USBPHY_CTRL_ENIRQHOSTDISCON_SHIFT (2U)
-#define USBPHY_CTRL_ENIRQHOSTDISCON(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENIRQHOSTDISCON_SHIFT)) & USBPHY_CTRL_ENIRQHOSTDISCON_MASK)
-#define USBPHY_CTRL_HOSTDISCONDETECT_IRQ_MASK (0x8U)
-#define USBPHY_CTRL_HOSTDISCONDETECT_IRQ_SHIFT (3U)
-#define USBPHY_CTRL_HOSTDISCONDETECT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_HOSTDISCONDETECT_IRQ_SHIFT)) & USBPHY_CTRL_HOSTDISCONDETECT_IRQ_MASK)
-#define USBPHY_CTRL_ENDEVPLUGINDET_MASK (0x10U)
-#define USBPHY_CTRL_ENDEVPLUGINDET_SHIFT (4U)
-/*! ENDEVPLUGINDET
- * 0b0..Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)
- * 0b1..Enables 200kohm pullup resistors on USB_DP and USB_DM pins
- */
-#define USBPHY_CTRL_ENDEVPLUGINDET(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENDEVPLUGINDET_SHIFT)) & USBPHY_CTRL_ENDEVPLUGINDET_MASK)
-#define USBPHY_CTRL_DEVPLUGIN_POLARITY_MASK (0x20U)
-#define USBPHY_CTRL_DEVPLUGIN_POLARITY_SHIFT (5U)
-#define USBPHY_CTRL_DEVPLUGIN_POLARITY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_DEVPLUGIN_POLARITY_SHIFT)) & USBPHY_CTRL_DEVPLUGIN_POLARITY_MASK)
-#define USBPHY_CTRL_RESUMEIRQSTICKY_MASK (0x100U)
-#define USBPHY_CTRL_RESUMEIRQSTICKY_SHIFT (8U)
-#define USBPHY_CTRL_RESUMEIRQSTICKY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_RESUMEIRQSTICKY_SHIFT)) & USBPHY_CTRL_RESUMEIRQSTICKY_MASK)
-#define USBPHY_CTRL_ENIRQRESUMEDETECT_MASK (0x200U)
-#define USBPHY_CTRL_ENIRQRESUMEDETECT_SHIFT (9U)
-#define USBPHY_CTRL_ENIRQRESUMEDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENIRQRESUMEDETECT_SHIFT)) & USBPHY_CTRL_ENIRQRESUMEDETECT_MASK)
-#define USBPHY_CTRL_RESUME_IRQ_MASK (0x400U)
-#define USBPHY_CTRL_RESUME_IRQ_SHIFT (10U)
-#define USBPHY_CTRL_RESUME_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_RESUME_IRQ_SHIFT)) & USBPHY_CTRL_RESUME_IRQ_MASK)
-#define USBPHY_CTRL_DEVPLUGIN_IRQ_MASK (0x1000U)
-#define USBPHY_CTRL_DEVPLUGIN_IRQ_SHIFT (12U)
-#define USBPHY_CTRL_DEVPLUGIN_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_DEVPLUGIN_IRQ_SHIFT)) & USBPHY_CTRL_DEVPLUGIN_IRQ_MASK)
-#define USBPHY_CTRL_ENUTMILEVEL2_MASK (0x4000U)
-#define USBPHY_CTRL_ENUTMILEVEL2_SHIFT (14U)
-#define USBPHY_CTRL_ENUTMILEVEL2(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENUTMILEVEL2_SHIFT)) & USBPHY_CTRL_ENUTMILEVEL2_MASK)
-#define USBPHY_CTRL_ENUTMILEVEL3_MASK (0x8000U)
-#define USBPHY_CTRL_ENUTMILEVEL3_SHIFT (15U)
-#define USBPHY_CTRL_ENUTMILEVEL3(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENUTMILEVEL3_SHIFT)) & USBPHY_CTRL_ENUTMILEVEL3_MASK)
-#define USBPHY_CTRL_ENIRQWAKEUP_MASK (0x10000U)
-#define USBPHY_CTRL_ENIRQWAKEUP_SHIFT (16U)
-#define USBPHY_CTRL_ENIRQWAKEUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENIRQWAKEUP_SHIFT)) & USBPHY_CTRL_ENIRQWAKEUP_MASK)
-#define USBPHY_CTRL_WAKEUP_IRQ_MASK (0x20000U)
-#define USBPHY_CTRL_WAKEUP_IRQ_SHIFT (17U)
-#define USBPHY_CTRL_WAKEUP_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_WAKEUP_IRQ_SHIFT)) & USBPHY_CTRL_WAKEUP_IRQ_MASK)
-#define USBPHY_CTRL_AUTORESUME_EN_MASK (0x40000U)
-#define USBPHY_CTRL_AUTORESUME_EN_SHIFT (18U)
-#define USBPHY_CTRL_AUTORESUME_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_AUTORESUME_EN_SHIFT)) & USBPHY_CTRL_AUTORESUME_EN_MASK)
-#define USBPHY_CTRL_ENAUTOCLR_CLKGATE_MASK (0x80000U)
-#define USBPHY_CTRL_ENAUTOCLR_CLKGATE_SHIFT (19U)
-#define USBPHY_CTRL_ENAUTOCLR_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENAUTOCLR_CLKGATE_SHIFT)) & USBPHY_CTRL_ENAUTOCLR_CLKGATE_MASK)
-#define USBPHY_CTRL_ENAUTOCLR_PHY_PWD_MASK (0x100000U)
-#define USBPHY_CTRL_ENAUTOCLR_PHY_PWD_SHIFT (20U)
-#define USBPHY_CTRL_ENAUTOCLR_PHY_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENAUTOCLR_PHY_PWD_SHIFT)) & USBPHY_CTRL_ENAUTOCLR_PHY_PWD_MASK)
-#define USBPHY_CTRL_ENDPDMCHG_WKUP_MASK (0x200000U)
-#define USBPHY_CTRL_ENDPDMCHG_WKUP_SHIFT (21U)
-#define USBPHY_CTRL_ENDPDMCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENDPDMCHG_WKUP_SHIFT)) & USBPHY_CTRL_ENDPDMCHG_WKUP_MASK)
-#define USBPHY_CTRL_ENVBUSCHG_WKUP_MASK (0x800000U)
-#define USBPHY_CTRL_ENVBUSCHG_WKUP_SHIFT (23U)
-#define USBPHY_CTRL_ENVBUSCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENVBUSCHG_WKUP_SHIFT)) & USBPHY_CTRL_ENVBUSCHG_WKUP_MASK)
-#define USBPHY_CTRL_ENAUTOCLR_USBCLKGATE_MASK (0x2000000U)
-#define USBPHY_CTRL_ENAUTOCLR_USBCLKGATE_SHIFT (25U)
-#define USBPHY_CTRL_ENAUTOCLR_USBCLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENAUTOCLR_USBCLKGATE_SHIFT)) & USBPHY_CTRL_ENAUTOCLR_USBCLKGATE_MASK)
-#define USBPHY_CTRL_ENAUTOSET_USBCLKS_MASK (0x4000000U)
-#define USBPHY_CTRL_ENAUTOSET_USBCLKS_SHIFT (26U)
-#define USBPHY_CTRL_ENAUTOSET_USBCLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENAUTOSET_USBCLKS_SHIFT)) & USBPHY_CTRL_ENAUTOSET_USBCLKS_MASK)
-#define USBPHY_CTRL_HOST_FORCE_LS_SE0_MASK (0x10000000U)
-#define USBPHY_CTRL_HOST_FORCE_LS_SE0_SHIFT (28U)
-#define USBPHY_CTRL_HOST_FORCE_LS_SE0(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_HOST_FORCE_LS_SE0_SHIFT)) & USBPHY_CTRL_HOST_FORCE_LS_SE0_MASK)
-#define USBPHY_CTRL_UTMI_SUSPENDM_MASK (0x20000000U)
-#define USBPHY_CTRL_UTMI_SUSPENDM_SHIFT (29U)
-#define USBPHY_CTRL_UTMI_SUSPENDM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_UTMI_SUSPENDM_SHIFT)) & USBPHY_CTRL_UTMI_SUSPENDM_MASK)
-#define USBPHY_CTRL_CLKGATE_MASK (0x40000000U)
-#define USBPHY_CTRL_CLKGATE_SHIFT (30U)
-#define USBPHY_CTRL_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLKGATE_SHIFT)) & USBPHY_CTRL_CLKGATE_MASK)
-#define USBPHY_CTRL_SFTRST_MASK (0x80000000U)
-#define USBPHY_CTRL_SFTRST_SHIFT (31U)
-#define USBPHY_CTRL_SFTRST(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SFTRST_SHIFT)) & USBPHY_CTRL_SFTRST_MASK)
-/*! @} */
-
-/*! @name CTRL_SET - USB PHY General Control Register */
-/*! @{ */
-#define USBPHY_CTRL_SET_ENHOSTDISCONDETECT_MASK (0x2U)
-#define USBPHY_CTRL_SET_ENHOSTDISCONDETECT_SHIFT (1U)
-#define USBPHY_CTRL_SET_ENHOSTDISCONDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENHOSTDISCONDETECT_SHIFT)) & USBPHY_CTRL_SET_ENHOSTDISCONDETECT_MASK)
-#define USBPHY_CTRL_SET_ENIRQHOSTDISCON_MASK (0x4U)
-#define USBPHY_CTRL_SET_ENIRQHOSTDISCON_SHIFT (2U)
-#define USBPHY_CTRL_SET_ENIRQHOSTDISCON(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENIRQHOSTDISCON_SHIFT)) & USBPHY_CTRL_SET_ENIRQHOSTDISCON_MASK)
-#define USBPHY_CTRL_SET_HOSTDISCONDETECT_IRQ_MASK (0x8U)
-#define USBPHY_CTRL_SET_HOSTDISCONDETECT_IRQ_SHIFT (3U)
-#define USBPHY_CTRL_SET_HOSTDISCONDETECT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_HOSTDISCONDETECT_IRQ_SHIFT)) & USBPHY_CTRL_SET_HOSTDISCONDETECT_IRQ_MASK)
-#define USBPHY_CTRL_SET_ENDEVPLUGINDET_MASK (0x10U)
-#define USBPHY_CTRL_SET_ENDEVPLUGINDET_SHIFT (4U)
-/*! ENDEVPLUGINDET
- * 0b0..Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)
- * 0b1..Enables 200kohm pullup resistors on USB_DP and USB_DM pins
- */
-#define USBPHY_CTRL_SET_ENDEVPLUGINDET(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENDEVPLUGINDET_SHIFT)) & USBPHY_CTRL_SET_ENDEVPLUGINDET_MASK)
-#define USBPHY_CTRL_SET_DEVPLUGIN_POLARITY_MASK (0x20U)
-#define USBPHY_CTRL_SET_DEVPLUGIN_POLARITY_SHIFT (5U)
-#define USBPHY_CTRL_SET_DEVPLUGIN_POLARITY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_DEVPLUGIN_POLARITY_SHIFT)) & USBPHY_CTRL_SET_DEVPLUGIN_POLARITY_MASK)
-#define USBPHY_CTRL_SET_RESUMEIRQSTICKY_MASK (0x100U)
-#define USBPHY_CTRL_SET_RESUMEIRQSTICKY_SHIFT (8U)
-#define USBPHY_CTRL_SET_RESUMEIRQSTICKY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_RESUMEIRQSTICKY_SHIFT)) & USBPHY_CTRL_SET_RESUMEIRQSTICKY_MASK)
-#define USBPHY_CTRL_SET_ENIRQRESUMEDETECT_MASK (0x200U)
-#define USBPHY_CTRL_SET_ENIRQRESUMEDETECT_SHIFT (9U)
-#define USBPHY_CTRL_SET_ENIRQRESUMEDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENIRQRESUMEDETECT_SHIFT)) & USBPHY_CTRL_SET_ENIRQRESUMEDETECT_MASK)
-#define USBPHY_CTRL_SET_RESUME_IRQ_MASK (0x400U)
-#define USBPHY_CTRL_SET_RESUME_IRQ_SHIFT (10U)
-#define USBPHY_CTRL_SET_RESUME_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_RESUME_IRQ_SHIFT)) & USBPHY_CTRL_SET_RESUME_IRQ_MASK)
-#define USBPHY_CTRL_SET_DEVPLUGIN_IRQ_MASK (0x1000U)
-#define USBPHY_CTRL_SET_DEVPLUGIN_IRQ_SHIFT (12U)
-#define USBPHY_CTRL_SET_DEVPLUGIN_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_DEVPLUGIN_IRQ_SHIFT)) & USBPHY_CTRL_SET_DEVPLUGIN_IRQ_MASK)
-#define USBPHY_CTRL_SET_ENUTMILEVEL2_MASK (0x4000U)
-#define USBPHY_CTRL_SET_ENUTMILEVEL2_SHIFT (14U)
-#define USBPHY_CTRL_SET_ENUTMILEVEL2(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENUTMILEVEL2_SHIFT)) & USBPHY_CTRL_SET_ENUTMILEVEL2_MASK)
-#define USBPHY_CTRL_SET_ENUTMILEVEL3_MASK (0x8000U)
-#define USBPHY_CTRL_SET_ENUTMILEVEL3_SHIFT (15U)
-#define USBPHY_CTRL_SET_ENUTMILEVEL3(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENUTMILEVEL3_SHIFT)) & USBPHY_CTRL_SET_ENUTMILEVEL3_MASK)
-#define USBPHY_CTRL_SET_ENIRQWAKEUP_MASK (0x10000U)
-#define USBPHY_CTRL_SET_ENIRQWAKEUP_SHIFT (16U)
-#define USBPHY_CTRL_SET_ENIRQWAKEUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENIRQWAKEUP_SHIFT)) & USBPHY_CTRL_SET_ENIRQWAKEUP_MASK)
-#define USBPHY_CTRL_SET_WAKEUP_IRQ_MASK (0x20000U)
-#define USBPHY_CTRL_SET_WAKEUP_IRQ_SHIFT (17U)
-#define USBPHY_CTRL_SET_WAKEUP_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_WAKEUP_IRQ_SHIFT)) & USBPHY_CTRL_SET_WAKEUP_IRQ_MASK)
-#define USBPHY_CTRL_SET_AUTORESUME_EN_MASK (0x40000U)
-#define USBPHY_CTRL_SET_AUTORESUME_EN_SHIFT (18U)
-#define USBPHY_CTRL_SET_AUTORESUME_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_AUTORESUME_EN_SHIFT)) & USBPHY_CTRL_SET_AUTORESUME_EN_MASK)
-#define USBPHY_CTRL_SET_ENAUTOCLR_CLKGATE_MASK (0x80000U)
-#define USBPHY_CTRL_SET_ENAUTOCLR_CLKGATE_SHIFT (19U)
-#define USBPHY_CTRL_SET_ENAUTOCLR_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENAUTOCLR_CLKGATE_SHIFT)) & USBPHY_CTRL_SET_ENAUTOCLR_CLKGATE_MASK)
-#define USBPHY_CTRL_SET_ENAUTOCLR_PHY_PWD_MASK (0x100000U)
-#define USBPHY_CTRL_SET_ENAUTOCLR_PHY_PWD_SHIFT (20U)
-#define USBPHY_CTRL_SET_ENAUTOCLR_PHY_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENAUTOCLR_PHY_PWD_SHIFT)) & USBPHY_CTRL_SET_ENAUTOCLR_PHY_PWD_MASK)
-#define USBPHY_CTRL_SET_ENDPDMCHG_WKUP_MASK (0x200000U)
-#define USBPHY_CTRL_SET_ENDPDMCHG_WKUP_SHIFT (21U)
-#define USBPHY_CTRL_SET_ENDPDMCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENDPDMCHG_WKUP_SHIFT)) & USBPHY_CTRL_SET_ENDPDMCHG_WKUP_MASK)
-#define USBPHY_CTRL_SET_ENVBUSCHG_WKUP_MASK (0x800000U)
-#define USBPHY_CTRL_SET_ENVBUSCHG_WKUP_SHIFT (23U)
-#define USBPHY_CTRL_SET_ENVBUSCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENVBUSCHG_WKUP_SHIFT)) & USBPHY_CTRL_SET_ENVBUSCHG_WKUP_MASK)
-#define USBPHY_CTRL_SET_ENAUTOCLR_USBCLKGATE_MASK (0x2000000U)
-#define USBPHY_CTRL_SET_ENAUTOCLR_USBCLKGATE_SHIFT (25U)
-#define USBPHY_CTRL_SET_ENAUTOCLR_USBCLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENAUTOCLR_USBCLKGATE_SHIFT)) & USBPHY_CTRL_SET_ENAUTOCLR_USBCLKGATE_MASK)
-#define USBPHY_CTRL_SET_ENAUTOSET_USBCLKS_MASK (0x4000000U)
-#define USBPHY_CTRL_SET_ENAUTOSET_USBCLKS_SHIFT (26U)
-#define USBPHY_CTRL_SET_ENAUTOSET_USBCLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENAUTOSET_USBCLKS_SHIFT)) & USBPHY_CTRL_SET_ENAUTOSET_USBCLKS_MASK)
-#define USBPHY_CTRL_SET_HOST_FORCE_LS_SE0_MASK (0x10000000U)
-#define USBPHY_CTRL_SET_HOST_FORCE_LS_SE0_SHIFT (28U)
-#define USBPHY_CTRL_SET_HOST_FORCE_LS_SE0(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_HOST_FORCE_LS_SE0_SHIFT)) & USBPHY_CTRL_SET_HOST_FORCE_LS_SE0_MASK)
-#define USBPHY_CTRL_SET_UTMI_SUSPENDM_MASK (0x20000000U)
-#define USBPHY_CTRL_SET_UTMI_SUSPENDM_SHIFT (29U)
-#define USBPHY_CTRL_SET_UTMI_SUSPENDM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_UTMI_SUSPENDM_SHIFT)) & USBPHY_CTRL_SET_UTMI_SUSPENDM_MASK)
-#define USBPHY_CTRL_SET_CLKGATE_MASK (0x40000000U)
-#define USBPHY_CTRL_SET_CLKGATE_SHIFT (30U)
-#define USBPHY_CTRL_SET_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_CLKGATE_SHIFT)) & USBPHY_CTRL_SET_CLKGATE_MASK)
-#define USBPHY_CTRL_SET_SFTRST_MASK (0x80000000U)
-#define USBPHY_CTRL_SET_SFTRST_SHIFT (31U)
-#define USBPHY_CTRL_SET_SFTRST(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_SFTRST_SHIFT)) & USBPHY_CTRL_SET_SFTRST_MASK)
-/*! @} */
-
-/*! @name CTRL_CLR - USB PHY General Control Register */
-/*! @{ */
-#define USBPHY_CTRL_CLR_ENHOSTDISCONDETECT_MASK (0x2U)
-#define USBPHY_CTRL_CLR_ENHOSTDISCONDETECT_SHIFT (1U)
-#define USBPHY_CTRL_CLR_ENHOSTDISCONDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENHOSTDISCONDETECT_SHIFT)) & USBPHY_CTRL_CLR_ENHOSTDISCONDETECT_MASK)
-#define USBPHY_CTRL_CLR_ENIRQHOSTDISCON_MASK (0x4U)
-#define USBPHY_CTRL_CLR_ENIRQHOSTDISCON_SHIFT (2U)
-#define USBPHY_CTRL_CLR_ENIRQHOSTDISCON(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENIRQHOSTDISCON_SHIFT)) & USBPHY_CTRL_CLR_ENIRQHOSTDISCON_MASK)
-#define USBPHY_CTRL_CLR_HOSTDISCONDETECT_IRQ_MASK (0x8U)
-#define USBPHY_CTRL_CLR_HOSTDISCONDETECT_IRQ_SHIFT (3U)
-#define USBPHY_CTRL_CLR_HOSTDISCONDETECT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_HOSTDISCONDETECT_IRQ_SHIFT)) & USBPHY_CTRL_CLR_HOSTDISCONDETECT_IRQ_MASK)
-#define USBPHY_CTRL_CLR_ENDEVPLUGINDET_MASK (0x10U)
-#define USBPHY_CTRL_CLR_ENDEVPLUGINDET_SHIFT (4U)
-/*! ENDEVPLUGINDET
- * 0b0..Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)
- * 0b1..Enables 200kohm pullup resistors on USB_DP and USB_DM pins
- */
-#define USBPHY_CTRL_CLR_ENDEVPLUGINDET(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENDEVPLUGINDET_SHIFT)) & USBPHY_CTRL_CLR_ENDEVPLUGINDET_MASK)
-#define USBPHY_CTRL_CLR_DEVPLUGIN_POLARITY_MASK (0x20U)
-#define USBPHY_CTRL_CLR_DEVPLUGIN_POLARITY_SHIFT (5U)
-#define USBPHY_CTRL_CLR_DEVPLUGIN_POLARITY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_DEVPLUGIN_POLARITY_SHIFT)) & USBPHY_CTRL_CLR_DEVPLUGIN_POLARITY_MASK)
-#define USBPHY_CTRL_CLR_RESUMEIRQSTICKY_MASK (0x100U)
-#define USBPHY_CTRL_CLR_RESUMEIRQSTICKY_SHIFT (8U)
-#define USBPHY_CTRL_CLR_RESUMEIRQSTICKY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_RESUMEIRQSTICKY_SHIFT)) & USBPHY_CTRL_CLR_RESUMEIRQSTICKY_MASK)
-#define USBPHY_CTRL_CLR_ENIRQRESUMEDETECT_MASK (0x200U)
-#define USBPHY_CTRL_CLR_ENIRQRESUMEDETECT_SHIFT (9U)
-#define USBPHY_CTRL_CLR_ENIRQRESUMEDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENIRQRESUMEDETECT_SHIFT)) & USBPHY_CTRL_CLR_ENIRQRESUMEDETECT_MASK)
-#define USBPHY_CTRL_CLR_RESUME_IRQ_MASK (0x400U)
-#define USBPHY_CTRL_CLR_RESUME_IRQ_SHIFT (10U)
-#define USBPHY_CTRL_CLR_RESUME_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_RESUME_IRQ_SHIFT)) & USBPHY_CTRL_CLR_RESUME_IRQ_MASK)
-#define USBPHY_CTRL_CLR_DEVPLUGIN_IRQ_MASK (0x1000U)
-#define USBPHY_CTRL_CLR_DEVPLUGIN_IRQ_SHIFT (12U)
-#define USBPHY_CTRL_CLR_DEVPLUGIN_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_DEVPLUGIN_IRQ_SHIFT)) & USBPHY_CTRL_CLR_DEVPLUGIN_IRQ_MASK)
-#define USBPHY_CTRL_CLR_ENUTMILEVEL2_MASK (0x4000U)
-#define USBPHY_CTRL_CLR_ENUTMILEVEL2_SHIFT (14U)
-#define USBPHY_CTRL_CLR_ENUTMILEVEL2(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENUTMILEVEL2_SHIFT)) & USBPHY_CTRL_CLR_ENUTMILEVEL2_MASK)
-#define USBPHY_CTRL_CLR_ENUTMILEVEL3_MASK (0x8000U)
-#define USBPHY_CTRL_CLR_ENUTMILEVEL3_SHIFT (15U)
-#define USBPHY_CTRL_CLR_ENUTMILEVEL3(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENUTMILEVEL3_SHIFT)) & USBPHY_CTRL_CLR_ENUTMILEVEL3_MASK)
-#define USBPHY_CTRL_CLR_ENIRQWAKEUP_MASK (0x10000U)
-#define USBPHY_CTRL_CLR_ENIRQWAKEUP_SHIFT (16U)
-#define USBPHY_CTRL_CLR_ENIRQWAKEUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENIRQWAKEUP_SHIFT)) & USBPHY_CTRL_CLR_ENIRQWAKEUP_MASK)
-#define USBPHY_CTRL_CLR_WAKEUP_IRQ_MASK (0x20000U)
-#define USBPHY_CTRL_CLR_WAKEUP_IRQ_SHIFT (17U)
-#define USBPHY_CTRL_CLR_WAKEUP_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_WAKEUP_IRQ_SHIFT)) & USBPHY_CTRL_CLR_WAKEUP_IRQ_MASK)
-#define USBPHY_CTRL_CLR_AUTORESUME_EN_MASK (0x40000U)
-#define USBPHY_CTRL_CLR_AUTORESUME_EN_SHIFT (18U)
-#define USBPHY_CTRL_CLR_AUTORESUME_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_AUTORESUME_EN_SHIFT)) & USBPHY_CTRL_CLR_AUTORESUME_EN_MASK)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_CLKGATE_MASK (0x80000U)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_CLKGATE_SHIFT (19U)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENAUTOCLR_CLKGATE_SHIFT)) & USBPHY_CTRL_CLR_ENAUTOCLR_CLKGATE_MASK)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_PHY_PWD_MASK (0x100000U)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_PHY_PWD_SHIFT (20U)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_PHY_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENAUTOCLR_PHY_PWD_SHIFT)) & USBPHY_CTRL_CLR_ENAUTOCLR_PHY_PWD_MASK)
-#define USBPHY_CTRL_CLR_ENDPDMCHG_WKUP_MASK (0x200000U)
-#define USBPHY_CTRL_CLR_ENDPDMCHG_WKUP_SHIFT (21U)
-#define USBPHY_CTRL_CLR_ENDPDMCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENDPDMCHG_WKUP_SHIFT)) & USBPHY_CTRL_CLR_ENDPDMCHG_WKUP_MASK)
-#define USBPHY_CTRL_CLR_ENVBUSCHG_WKUP_MASK (0x800000U)
-#define USBPHY_CTRL_CLR_ENVBUSCHG_WKUP_SHIFT (23U)
-#define USBPHY_CTRL_CLR_ENVBUSCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENVBUSCHG_WKUP_SHIFT)) & USBPHY_CTRL_CLR_ENVBUSCHG_WKUP_MASK)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_USBCLKGATE_MASK (0x2000000U)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_USBCLKGATE_SHIFT (25U)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_USBCLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENAUTOCLR_USBCLKGATE_SHIFT)) & USBPHY_CTRL_CLR_ENAUTOCLR_USBCLKGATE_MASK)
-#define USBPHY_CTRL_CLR_ENAUTOSET_USBCLKS_MASK (0x4000000U)
-#define USBPHY_CTRL_CLR_ENAUTOSET_USBCLKS_SHIFT (26U)
-#define USBPHY_CTRL_CLR_ENAUTOSET_USBCLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENAUTOSET_USBCLKS_SHIFT)) & USBPHY_CTRL_CLR_ENAUTOSET_USBCLKS_MASK)
-#define USBPHY_CTRL_CLR_HOST_FORCE_LS_SE0_MASK (0x10000000U)
-#define USBPHY_CTRL_CLR_HOST_FORCE_LS_SE0_SHIFT (28U)
-#define USBPHY_CTRL_CLR_HOST_FORCE_LS_SE0(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_HOST_FORCE_LS_SE0_SHIFT)) & USBPHY_CTRL_CLR_HOST_FORCE_LS_SE0_MASK)
-#define USBPHY_CTRL_CLR_UTMI_SUSPENDM_MASK (0x20000000U)
-#define USBPHY_CTRL_CLR_UTMI_SUSPENDM_SHIFT (29U)
-#define USBPHY_CTRL_CLR_UTMI_SUSPENDM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_UTMI_SUSPENDM_SHIFT)) & USBPHY_CTRL_CLR_UTMI_SUSPENDM_MASK)
-#define USBPHY_CTRL_CLR_CLKGATE_MASK (0x40000000U)
-#define USBPHY_CTRL_CLR_CLKGATE_SHIFT (30U)
-#define USBPHY_CTRL_CLR_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_CLKGATE_SHIFT)) & USBPHY_CTRL_CLR_CLKGATE_MASK)
-#define USBPHY_CTRL_CLR_SFTRST_MASK (0x80000000U)
-#define USBPHY_CTRL_CLR_SFTRST_SHIFT (31U)
-#define USBPHY_CTRL_CLR_SFTRST(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_SFTRST_SHIFT)) & USBPHY_CTRL_CLR_SFTRST_MASK)
-/*! @} */
-
-/*! @name CTRL_TOG - USB PHY General Control Register */
-/*! @{ */
-#define USBPHY_CTRL_TOG_ENHOSTDISCONDETECT_MASK (0x2U)
-#define USBPHY_CTRL_TOG_ENHOSTDISCONDETECT_SHIFT (1U)
-#define USBPHY_CTRL_TOG_ENHOSTDISCONDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENHOSTDISCONDETECT_SHIFT)) & USBPHY_CTRL_TOG_ENHOSTDISCONDETECT_MASK)
-#define USBPHY_CTRL_TOG_ENIRQHOSTDISCON_MASK (0x4U)
-#define USBPHY_CTRL_TOG_ENIRQHOSTDISCON_SHIFT (2U)
-#define USBPHY_CTRL_TOG_ENIRQHOSTDISCON(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENIRQHOSTDISCON_SHIFT)) & USBPHY_CTRL_TOG_ENIRQHOSTDISCON_MASK)
-#define USBPHY_CTRL_TOG_HOSTDISCONDETECT_IRQ_MASK (0x8U)
-#define USBPHY_CTRL_TOG_HOSTDISCONDETECT_IRQ_SHIFT (3U)
-#define USBPHY_CTRL_TOG_HOSTDISCONDETECT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_HOSTDISCONDETECT_IRQ_SHIFT)) & USBPHY_CTRL_TOG_HOSTDISCONDETECT_IRQ_MASK)
-#define USBPHY_CTRL_TOG_ENDEVPLUGINDET_MASK (0x10U)
-#define USBPHY_CTRL_TOG_ENDEVPLUGINDET_SHIFT (4U)
-/*! ENDEVPLUGINDET
- * 0b0..Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)
- * 0b1..Enables 200kohm pullup resistors on USB_DP and USB_DM pins
- */
-#define USBPHY_CTRL_TOG_ENDEVPLUGINDET(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENDEVPLUGINDET_SHIFT)) & USBPHY_CTRL_TOG_ENDEVPLUGINDET_MASK)
-#define USBPHY_CTRL_TOG_DEVPLUGIN_POLARITY_MASK (0x20U)
-#define USBPHY_CTRL_TOG_DEVPLUGIN_POLARITY_SHIFT (5U)
-#define USBPHY_CTRL_TOG_DEVPLUGIN_POLARITY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_DEVPLUGIN_POLARITY_SHIFT)) & USBPHY_CTRL_TOG_DEVPLUGIN_POLARITY_MASK)
-#define USBPHY_CTRL_TOG_RESUMEIRQSTICKY_MASK (0x100U)
-#define USBPHY_CTRL_TOG_RESUMEIRQSTICKY_SHIFT (8U)
-#define USBPHY_CTRL_TOG_RESUMEIRQSTICKY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_RESUMEIRQSTICKY_SHIFT)) & USBPHY_CTRL_TOG_RESUMEIRQSTICKY_MASK)
-#define USBPHY_CTRL_TOG_ENIRQRESUMEDETECT_MASK (0x200U)
-#define USBPHY_CTRL_TOG_ENIRQRESUMEDETECT_SHIFT (9U)
-#define USBPHY_CTRL_TOG_ENIRQRESUMEDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENIRQRESUMEDETECT_SHIFT)) & USBPHY_CTRL_TOG_ENIRQRESUMEDETECT_MASK)
-#define USBPHY_CTRL_TOG_RESUME_IRQ_MASK (0x400U)
-#define USBPHY_CTRL_TOG_RESUME_IRQ_SHIFT (10U)
-#define USBPHY_CTRL_TOG_RESUME_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_RESUME_IRQ_SHIFT)) & USBPHY_CTRL_TOG_RESUME_IRQ_MASK)
-#define USBPHY_CTRL_TOG_DEVPLUGIN_IRQ_MASK (0x1000U)
-#define USBPHY_CTRL_TOG_DEVPLUGIN_IRQ_SHIFT (12U)
-#define USBPHY_CTRL_TOG_DEVPLUGIN_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_DEVPLUGIN_IRQ_SHIFT)) & USBPHY_CTRL_TOG_DEVPLUGIN_IRQ_MASK)
-#define USBPHY_CTRL_TOG_ENUTMILEVEL2_MASK (0x4000U)
-#define USBPHY_CTRL_TOG_ENUTMILEVEL2_SHIFT (14U)
-#define USBPHY_CTRL_TOG_ENUTMILEVEL2(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENUTMILEVEL2_SHIFT)) & USBPHY_CTRL_TOG_ENUTMILEVEL2_MASK)
-#define USBPHY_CTRL_TOG_ENUTMILEVEL3_MASK (0x8000U)
-#define USBPHY_CTRL_TOG_ENUTMILEVEL3_SHIFT (15U)
-#define USBPHY_CTRL_TOG_ENUTMILEVEL3(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENUTMILEVEL3_SHIFT)) & USBPHY_CTRL_TOG_ENUTMILEVEL3_MASK)
-#define USBPHY_CTRL_TOG_ENIRQWAKEUP_MASK (0x10000U)
-#define USBPHY_CTRL_TOG_ENIRQWAKEUP_SHIFT (16U)
-#define USBPHY_CTRL_TOG_ENIRQWAKEUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENIRQWAKEUP_SHIFT)) & USBPHY_CTRL_TOG_ENIRQWAKEUP_MASK)
-#define USBPHY_CTRL_TOG_WAKEUP_IRQ_MASK (0x20000U)
-#define USBPHY_CTRL_TOG_WAKEUP_IRQ_SHIFT (17U)
-#define USBPHY_CTRL_TOG_WAKEUP_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_WAKEUP_IRQ_SHIFT)) & USBPHY_CTRL_TOG_WAKEUP_IRQ_MASK)
-#define USBPHY_CTRL_TOG_AUTORESUME_EN_MASK (0x40000U)
-#define USBPHY_CTRL_TOG_AUTORESUME_EN_SHIFT (18U)
-#define USBPHY_CTRL_TOG_AUTORESUME_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_AUTORESUME_EN_SHIFT)) & USBPHY_CTRL_TOG_AUTORESUME_EN_MASK)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_CLKGATE_MASK (0x80000U)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_CLKGATE_SHIFT (19U)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENAUTOCLR_CLKGATE_SHIFT)) & USBPHY_CTRL_TOG_ENAUTOCLR_CLKGATE_MASK)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_PHY_PWD_MASK (0x100000U)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_PHY_PWD_SHIFT (20U)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_PHY_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENAUTOCLR_PHY_PWD_SHIFT)) & USBPHY_CTRL_TOG_ENAUTOCLR_PHY_PWD_MASK)
-#define USBPHY_CTRL_TOG_ENDPDMCHG_WKUP_MASK (0x200000U)
-#define USBPHY_CTRL_TOG_ENDPDMCHG_WKUP_SHIFT (21U)
-#define USBPHY_CTRL_TOG_ENDPDMCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENDPDMCHG_WKUP_SHIFT)) & USBPHY_CTRL_TOG_ENDPDMCHG_WKUP_MASK)
-#define USBPHY_CTRL_TOG_ENVBUSCHG_WKUP_MASK (0x800000U)
-#define USBPHY_CTRL_TOG_ENVBUSCHG_WKUP_SHIFT (23U)
-#define USBPHY_CTRL_TOG_ENVBUSCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENVBUSCHG_WKUP_SHIFT)) & USBPHY_CTRL_TOG_ENVBUSCHG_WKUP_MASK)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_USBCLKGATE_MASK (0x2000000U)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_USBCLKGATE_SHIFT (25U)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_USBCLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENAUTOCLR_USBCLKGATE_SHIFT)) & USBPHY_CTRL_TOG_ENAUTOCLR_USBCLKGATE_MASK)
-#define USBPHY_CTRL_TOG_ENAUTOSET_USBCLKS_MASK (0x4000000U)
-#define USBPHY_CTRL_TOG_ENAUTOSET_USBCLKS_SHIFT (26U)
-#define USBPHY_CTRL_TOG_ENAUTOSET_USBCLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENAUTOSET_USBCLKS_SHIFT)) & USBPHY_CTRL_TOG_ENAUTOSET_USBCLKS_MASK)
-#define USBPHY_CTRL_TOG_HOST_FORCE_LS_SE0_MASK (0x10000000U)
-#define USBPHY_CTRL_TOG_HOST_FORCE_LS_SE0_SHIFT (28U)
-#define USBPHY_CTRL_TOG_HOST_FORCE_LS_SE0(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_HOST_FORCE_LS_SE0_SHIFT)) & USBPHY_CTRL_TOG_HOST_FORCE_LS_SE0_MASK)
-#define USBPHY_CTRL_TOG_UTMI_SUSPENDM_MASK (0x20000000U)
-#define USBPHY_CTRL_TOG_UTMI_SUSPENDM_SHIFT (29U)
-#define USBPHY_CTRL_TOG_UTMI_SUSPENDM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_UTMI_SUSPENDM_SHIFT)) & USBPHY_CTRL_TOG_UTMI_SUSPENDM_MASK)
-#define USBPHY_CTRL_TOG_CLKGATE_MASK (0x40000000U)
-#define USBPHY_CTRL_TOG_CLKGATE_SHIFT (30U)
-#define USBPHY_CTRL_TOG_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_CLKGATE_SHIFT)) & USBPHY_CTRL_TOG_CLKGATE_MASK)
-#define USBPHY_CTRL_TOG_SFTRST_MASK (0x80000000U)
-#define USBPHY_CTRL_TOG_SFTRST_SHIFT (31U)
-#define USBPHY_CTRL_TOG_SFTRST(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_SFTRST_SHIFT)) & USBPHY_CTRL_TOG_SFTRST_MASK)
-/*! @} */
-
-/*! @name STATUS - USB PHY Status Register */
-/*! @{ */
-#define USBPHY_STATUS_OK_STATUS_3V_MASK (0x1U)
-#define USBPHY_STATUS_OK_STATUS_3V_SHIFT (0U)
-#define USBPHY_STATUS_OK_STATUS_3V(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_STATUS_OK_STATUS_3V_SHIFT)) & USBPHY_STATUS_OK_STATUS_3V_MASK)
-#define USBPHY_STATUS_HOSTDISCONDETECT_STATUS_MASK (0x8U)
-#define USBPHY_STATUS_HOSTDISCONDETECT_STATUS_SHIFT (3U)
-/*! HOSTDISCONDETECT_STATUS
- * 0b0..USB cable disconnect has not been detected at the local host
- * 0b1..USB cable disconnect has been detected at the local host
- */
-#define USBPHY_STATUS_HOSTDISCONDETECT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_STATUS_HOSTDISCONDETECT_STATUS_SHIFT)) & USBPHY_STATUS_HOSTDISCONDETECT_STATUS_MASK)
-#define USBPHY_STATUS_DEVPLUGIN_STATUS_MASK (0x40U)
-#define USBPHY_STATUS_DEVPLUGIN_STATUS_SHIFT (6U)
-/*! DEVPLUGIN_STATUS
- * 0b0..No attachment to a USB host is detected
- * 0b1..Cable attachment to a USB host is detected
- */
-#define USBPHY_STATUS_DEVPLUGIN_STATUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_STATUS_DEVPLUGIN_STATUS_SHIFT)) & USBPHY_STATUS_DEVPLUGIN_STATUS_MASK)
-#define USBPHY_STATUS_RESUME_STATUS_MASK (0x400U)
-#define USBPHY_STATUS_RESUME_STATUS_SHIFT (10U)
-#define USBPHY_STATUS_RESUME_STATUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_STATUS_RESUME_STATUS_SHIFT)) & USBPHY_STATUS_RESUME_STATUS_MASK)
-/*! @} */
-
-/*! @name PLL_SIC - USB PHY PLL Control/Status Register */
-/*! @{ */
-#define USBPHY_PLL_SIC_PLL_EN_USB_CLKS_MASK (0x40U)
-#define USBPHY_PLL_SIC_PLL_EN_USB_CLKS_SHIFT (6U)
-#define USBPHY_PLL_SIC_PLL_EN_USB_CLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_EN_USB_CLKS_SHIFT)) & USBPHY_PLL_SIC_PLL_EN_USB_CLKS_MASK)
-#define USBPHY_PLL_SIC_PLL_POWER_MASK (0x1000U)
-#define USBPHY_PLL_SIC_PLL_POWER_SHIFT (12U)
-#define USBPHY_PLL_SIC_PLL_POWER(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_POWER_SHIFT)) & USBPHY_PLL_SIC_PLL_POWER_MASK)
-#define USBPHY_PLL_SIC_PLL_ENABLE_MASK (0x2000U)
-#define USBPHY_PLL_SIC_PLL_ENABLE_SHIFT (13U)
-#define USBPHY_PLL_SIC_PLL_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_ENABLE_SHIFT)) & USBPHY_PLL_SIC_PLL_ENABLE_MASK)
-#define USBPHY_PLL_SIC_REFBIAS_PWD_SEL_MASK (0x80000U)
-#define USBPHY_PLL_SIC_REFBIAS_PWD_SEL_SHIFT (19U)
-/*! REFBIAS_PWD_SEL
- * 0b0..Selects PLL_POWER to control the reference bias
- * 0b1..Selects REFBIAS_PWD to control the reference bias
- */
-#define USBPHY_PLL_SIC_REFBIAS_PWD_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_REFBIAS_PWD_SEL_SHIFT)) & USBPHY_PLL_SIC_REFBIAS_PWD_SEL_MASK)
-#define USBPHY_PLL_SIC_REFBIAS_PWD_MASK (0x100000U)
-#define USBPHY_PLL_SIC_REFBIAS_PWD_SHIFT (20U)
-#define USBPHY_PLL_SIC_REFBIAS_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_REFBIAS_PWD_SHIFT)) & USBPHY_PLL_SIC_REFBIAS_PWD_MASK)
-#define USBPHY_PLL_SIC_PLL_REG_ENABLE_MASK (0x200000U)
-#define USBPHY_PLL_SIC_PLL_REG_ENABLE_SHIFT (21U)
-#define USBPHY_PLL_SIC_PLL_REG_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_REG_ENABLE_SHIFT)) & USBPHY_PLL_SIC_PLL_REG_ENABLE_MASK)
-#define USBPHY_PLL_SIC_PLL_DIV_SEL_MASK (0x1C00000U)
-#define USBPHY_PLL_SIC_PLL_DIV_SEL_SHIFT (22U)
-/*! PLL_DIV_SEL
- * 0b000..Divide by 13
- * 0b001..Divide by 15
- * 0b010..Divide by 16
- * 0b011..Divide by 20
- * 0b100..Divide by 22
- * 0b101..Divide by 25
- * 0b110..Divide by 30
- * 0b111..Divide by 240
- */
-#define USBPHY_PLL_SIC_PLL_DIV_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_DIV_SEL_SHIFT)) & USBPHY_PLL_SIC_PLL_DIV_SEL_MASK)
-#define USBPHY_PLL_SIC_PLL_PREDIV_MASK (0x40000000U)
-#define USBPHY_PLL_SIC_PLL_PREDIV_SHIFT (30U)
-#define USBPHY_PLL_SIC_PLL_PREDIV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_PREDIV_SHIFT)) & USBPHY_PLL_SIC_PLL_PREDIV_MASK)
-#define USBPHY_PLL_SIC_PLL_LOCK_MASK (0x80000000U)
-#define USBPHY_PLL_SIC_PLL_LOCK_SHIFT (31U)
-/*! PLL_LOCK
- * 0b0..PLL is not currently locked
- * 0b1..PLL is currently locked
- */
-#define USBPHY_PLL_SIC_PLL_LOCK(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_LOCK_SHIFT)) & USBPHY_PLL_SIC_PLL_LOCK_MASK)
-/*! @} */
-
-/*! @name PLL_SIC_SET - USB PHY PLL Control/Status Register */
-/*! @{ */
-#define USBPHY_PLL_SIC_SET_PLL_EN_USB_CLKS_MASK (0x40U)
-#define USBPHY_PLL_SIC_SET_PLL_EN_USB_CLKS_SHIFT (6U)
-#define USBPHY_PLL_SIC_SET_PLL_EN_USB_CLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_EN_USB_CLKS_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_EN_USB_CLKS_MASK)
-#define USBPHY_PLL_SIC_SET_PLL_POWER_MASK (0x1000U)
-#define USBPHY_PLL_SIC_SET_PLL_POWER_SHIFT (12U)
-#define USBPHY_PLL_SIC_SET_PLL_POWER(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_POWER_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_POWER_MASK)
-#define USBPHY_PLL_SIC_SET_PLL_ENABLE_MASK (0x2000U)
-#define USBPHY_PLL_SIC_SET_PLL_ENABLE_SHIFT (13U)
-#define USBPHY_PLL_SIC_SET_PLL_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_ENABLE_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_ENABLE_MASK)
-#define USBPHY_PLL_SIC_SET_REFBIAS_PWD_SEL_MASK (0x80000U)
-#define USBPHY_PLL_SIC_SET_REFBIAS_PWD_SEL_SHIFT (19U)
-/*! REFBIAS_PWD_SEL
- * 0b0..Selects PLL_POWER to control the reference bias
- * 0b1..Selects REFBIAS_PWD to control the reference bias
- */
-#define USBPHY_PLL_SIC_SET_REFBIAS_PWD_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_REFBIAS_PWD_SEL_SHIFT)) & USBPHY_PLL_SIC_SET_REFBIAS_PWD_SEL_MASK)
-#define USBPHY_PLL_SIC_SET_REFBIAS_PWD_MASK (0x100000U)
-#define USBPHY_PLL_SIC_SET_REFBIAS_PWD_SHIFT (20U)
-#define USBPHY_PLL_SIC_SET_REFBIAS_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_REFBIAS_PWD_SHIFT)) & USBPHY_PLL_SIC_SET_REFBIAS_PWD_MASK)
-#define USBPHY_PLL_SIC_SET_PLL_REG_ENABLE_MASK (0x200000U)
-#define USBPHY_PLL_SIC_SET_PLL_REG_ENABLE_SHIFT (21U)
-#define USBPHY_PLL_SIC_SET_PLL_REG_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_REG_ENABLE_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_REG_ENABLE_MASK)
-#define USBPHY_PLL_SIC_SET_PLL_DIV_SEL_MASK (0x1C00000U)
-#define USBPHY_PLL_SIC_SET_PLL_DIV_SEL_SHIFT (22U)
-/*! PLL_DIV_SEL
- * 0b000..Divide by 13
- * 0b001..Divide by 15
- * 0b010..Divide by 16
- * 0b011..Divide by 20
- * 0b100..Divide by 22
- * 0b101..Divide by 25
- * 0b110..Divide by 30
- * 0b111..Divide by 240
- */
-#define USBPHY_PLL_SIC_SET_PLL_DIV_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_DIV_SEL_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_DIV_SEL_MASK)
-#define USBPHY_PLL_SIC_SET_PLL_PREDIV_MASK (0x40000000U)
-#define USBPHY_PLL_SIC_SET_PLL_PREDIV_SHIFT (30U)
-#define USBPHY_PLL_SIC_SET_PLL_PREDIV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_PREDIV_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_PREDIV_MASK)
-#define USBPHY_PLL_SIC_SET_PLL_LOCK_MASK (0x80000000U)
-#define USBPHY_PLL_SIC_SET_PLL_LOCK_SHIFT (31U)
-/*! PLL_LOCK
- * 0b0..PLL is not currently locked
- * 0b1..PLL is currently locked
- */
-#define USBPHY_PLL_SIC_SET_PLL_LOCK(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_LOCK_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_LOCK_MASK)
-/*! @} */
-
-/*! @name PLL_SIC_CLR - USB PHY PLL Control/Status Register */
-/*! @{ */
-#define USBPHY_PLL_SIC_CLR_PLL_EN_USB_CLKS_MASK (0x40U)
-#define USBPHY_PLL_SIC_CLR_PLL_EN_USB_CLKS_SHIFT (6U)
-#define USBPHY_PLL_SIC_CLR_PLL_EN_USB_CLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_EN_USB_CLKS_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_EN_USB_CLKS_MASK)
-#define USBPHY_PLL_SIC_CLR_PLL_POWER_MASK (0x1000U)
-#define USBPHY_PLL_SIC_CLR_PLL_POWER_SHIFT (12U)
-#define USBPHY_PLL_SIC_CLR_PLL_POWER(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_POWER_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_POWER_MASK)
-#define USBPHY_PLL_SIC_CLR_PLL_ENABLE_MASK (0x2000U)
-#define USBPHY_PLL_SIC_CLR_PLL_ENABLE_SHIFT (13U)
-#define USBPHY_PLL_SIC_CLR_PLL_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_ENABLE_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_ENABLE_MASK)
-#define USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SEL_MASK (0x80000U)
-#define USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SEL_SHIFT (19U)
-/*! REFBIAS_PWD_SEL
- * 0b0..Selects PLL_POWER to control the reference bias
- * 0b1..Selects REFBIAS_PWD to control the reference bias
- */
-#define USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SEL_SHIFT)) & USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SEL_MASK)
-#define USBPHY_PLL_SIC_CLR_REFBIAS_PWD_MASK (0x100000U)
-#define USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SHIFT (20U)
-#define USBPHY_PLL_SIC_CLR_REFBIAS_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SHIFT)) & USBPHY_PLL_SIC_CLR_REFBIAS_PWD_MASK)
-#define USBPHY_PLL_SIC_CLR_PLL_REG_ENABLE_MASK (0x200000U)
-#define USBPHY_PLL_SIC_CLR_PLL_REG_ENABLE_SHIFT (21U)
-#define USBPHY_PLL_SIC_CLR_PLL_REG_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_REG_ENABLE_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_REG_ENABLE_MASK)
-#define USBPHY_PLL_SIC_CLR_PLL_DIV_SEL_MASK (0x1C00000U)
-#define USBPHY_PLL_SIC_CLR_PLL_DIV_SEL_SHIFT (22U)
-/*! PLL_DIV_SEL
- * 0b000..Divide by 13
- * 0b001..Divide by 15
- * 0b010..Divide by 16
- * 0b011..Divide by 20
- * 0b100..Divide by 22
- * 0b101..Divide by 25
- * 0b110..Divide by 30
- * 0b111..Divide by 240
- */
-#define USBPHY_PLL_SIC_CLR_PLL_DIV_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_DIV_SEL_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_DIV_SEL_MASK)
-#define USBPHY_PLL_SIC_CLR_PLL_PREDIV_MASK (0x40000000U)
-#define USBPHY_PLL_SIC_CLR_PLL_PREDIV_SHIFT (30U)
-#define USBPHY_PLL_SIC_CLR_PLL_PREDIV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_PREDIV_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_PREDIV_MASK)
-#define USBPHY_PLL_SIC_CLR_PLL_LOCK_MASK (0x80000000U)
-#define USBPHY_PLL_SIC_CLR_PLL_LOCK_SHIFT (31U)
-/*! PLL_LOCK
- * 0b0..PLL is not currently locked
- * 0b1..PLL is currently locked
- */
-#define USBPHY_PLL_SIC_CLR_PLL_LOCK(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_LOCK_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_LOCK_MASK)
-/*! @} */
-
-/*! @name PLL_SIC_TOG - USB PHY PLL Control/Status Register */
-/*! @{ */
-#define USBPHY_PLL_SIC_TOG_PLL_EN_USB_CLKS_MASK (0x40U)
-#define USBPHY_PLL_SIC_TOG_PLL_EN_USB_CLKS_SHIFT (6U)
-#define USBPHY_PLL_SIC_TOG_PLL_EN_USB_CLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_EN_USB_CLKS_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_EN_USB_CLKS_MASK)
-#define USBPHY_PLL_SIC_TOG_PLL_POWER_MASK (0x1000U)
-#define USBPHY_PLL_SIC_TOG_PLL_POWER_SHIFT (12U)
-#define USBPHY_PLL_SIC_TOG_PLL_POWER(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_POWER_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_POWER_MASK)
-#define USBPHY_PLL_SIC_TOG_PLL_ENABLE_MASK (0x2000U)
-#define USBPHY_PLL_SIC_TOG_PLL_ENABLE_SHIFT (13U)
-#define USBPHY_PLL_SIC_TOG_PLL_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_ENABLE_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_ENABLE_MASK)
-#define USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SEL_MASK (0x80000U)
-#define USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SEL_SHIFT (19U)
-/*! REFBIAS_PWD_SEL
- * 0b0..Selects PLL_POWER to control the reference bias
- * 0b1..Selects REFBIAS_PWD to control the reference bias
- */
-#define USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SEL_SHIFT)) & USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SEL_MASK)
-#define USBPHY_PLL_SIC_TOG_REFBIAS_PWD_MASK (0x100000U)
-#define USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SHIFT (20U)
-#define USBPHY_PLL_SIC_TOG_REFBIAS_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SHIFT)) & USBPHY_PLL_SIC_TOG_REFBIAS_PWD_MASK)
-#define USBPHY_PLL_SIC_TOG_PLL_REG_ENABLE_MASK (0x200000U)
-#define USBPHY_PLL_SIC_TOG_PLL_REG_ENABLE_SHIFT (21U)
-#define USBPHY_PLL_SIC_TOG_PLL_REG_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_REG_ENABLE_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_REG_ENABLE_MASK)
-#define USBPHY_PLL_SIC_TOG_PLL_DIV_SEL_MASK (0x1C00000U)
-#define USBPHY_PLL_SIC_TOG_PLL_DIV_SEL_SHIFT (22U)
-/*! PLL_DIV_SEL
- * 0b000..Divide by 13
- * 0b001..Divide by 15
- * 0b010..Divide by 16
- * 0b011..Divide by 20
- * 0b100..Divide by 22
- * 0b101..Divide by 25
- * 0b110..Divide by 30
- * 0b111..Divide by 240
- */
-#define USBPHY_PLL_SIC_TOG_PLL_DIV_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_DIV_SEL_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_DIV_SEL_MASK)
-#define USBPHY_PLL_SIC_TOG_PLL_PREDIV_MASK (0x40000000U)
-#define USBPHY_PLL_SIC_TOG_PLL_PREDIV_SHIFT (30U)
-#define USBPHY_PLL_SIC_TOG_PLL_PREDIV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_PREDIV_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_PREDIV_MASK)
-#define USBPHY_PLL_SIC_TOG_PLL_LOCK_MASK (0x80000000U)
-#define USBPHY_PLL_SIC_TOG_PLL_LOCK_SHIFT (31U)
-/*! PLL_LOCK
- * 0b0..PLL is not currently locked
- * 0b1..PLL is currently locked
- */
-#define USBPHY_PLL_SIC_TOG_PLL_LOCK(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_LOCK_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_LOCK_MASK)
-/*! @} */
-
-/*! @name USB1_VBUS_DETECT - USB PHY VBUS Detect Control Register */
-/*! @{ */
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_THRESH_MASK (0x7U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_THRESH_SHIFT (0U)
-/*! VBUSVALID_THRESH
- * 0b000..4.0V
- * 0b001..4.1V
- * 0b010..4.2V
- * 0b011..4.3V
- * 0b100..4.4V(Default)
- * 0b101..4.5V
- * 0b110..4.6V
- * 0b111..4.7V
- */
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_THRESH(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUSVALID_THRESH_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUSVALID_THRESH_MASK)
-#define USBPHY_USB1_VBUS_DETECT_VBUS_OVERRIDE_EN_MASK (0x8U)
-#define USBPHY_USB1_VBUS_DETECT_VBUS_OVERRIDE_EN_SHIFT (3U)
-/*! VBUS_OVERRIDE_EN
- * 0b0..Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)
- * 0b1..Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND
- */
-#define USBPHY_USB1_VBUS_DETECT_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SESSEND_OVERRIDE_MASK (0x10U)
-#define USBPHY_USB1_VBUS_DETECT_SESSEND_OVERRIDE_SHIFT (4U)
-#define USBPHY_USB1_VBUS_DETECT_SESSEND_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SESSEND_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SESSEND_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_BVALID_OVERRIDE_MASK (0x20U)
-#define USBPHY_USB1_VBUS_DETECT_BVALID_OVERRIDE_SHIFT (5U)
-#define USBPHY_USB1_VBUS_DETECT_BVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_BVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_BVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_AVALID_OVERRIDE_MASK (0x40U)
-#define USBPHY_USB1_VBUS_DETECT_AVALID_OVERRIDE_SHIFT (6U)
-#define USBPHY_USB1_VBUS_DETECT_AVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_AVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_AVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_OVERRIDE_MASK (0x80U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_OVERRIDE_SHIFT (7U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUSVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUSVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_SEL_MASK (0x100U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_SEL_SHIFT (8U)
-/*! VBUSVALID_SEL
- * 0b0..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b1..Use the VBUS_VALID_3V detector results for signal reported to the USB controller
- */
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUSVALID_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUSVALID_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_VBUS_SOURCE_SEL_MASK (0x600U)
-#define USBPHY_USB1_VBUS_DETECT_VBUS_SOURCE_SEL_SHIFT (9U)
-/*! VBUS_SOURCE_SEL
- * 0b00..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b01..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b10..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b11..Reserved, do not use
- */
-#define USBPHY_USB1_VBUS_DETECT_VBUS_SOURCE_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUS_SOURCE_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUS_SOURCE_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_EN_MASK (0x800U)
-#define USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_EN_SHIFT (11U)
-#define USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_MASK (0x1000U)
-#define USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_SHIFT (12U)
-#define USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_EXT_ID_OVERRIDE_EN_MASK (0x2000U)
-#define USBPHY_USB1_VBUS_DETECT_EXT_ID_OVERRIDE_EN_SHIFT (13U)
-/*! EXT_ID_OVERRIDE_EN
- * 0b0..Select the Muxed value chosen using ID_OVERRIDE_EN.
- * 0b1..Select the external ID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_EXT_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_EXT_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_EXT_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_EXT_VBUS_OVERRIDE_EN_MASK (0x4000U)
-#define USBPHY_USB1_VBUS_DETECT_EXT_VBUS_OVERRIDE_EN_SHIFT (14U)
-/*! EXT_VBUS_OVERRIDE_EN
- * 0b0..Select the Muxed value chosen using VBUS_OVERRIDE_EN.
- * 0b1..Select the external VBUS VALID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_EXT_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_EXT_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_EXT_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_MASK (0x40000U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_SHIFT (18U)
-/*! VBUSVALID_TO_SESSVALID
- * 0b0..Use the VBUS_VALID comparator for VBUS_VALID results
- * 0b1..Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V.
- */
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_MASK)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_5VDETECT_MASK (0x80000U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_5VDETECT_SHIFT (19U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_5VDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUSVALID_5VDETECT_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUSVALID_5VDETECT_MASK)
-#define USBPHY_USB1_VBUS_DETECT_PWRUP_CMPS_MASK (0x700000U)
-#define USBPHY_USB1_VBUS_DETECT_PWRUP_CMPS_SHIFT (20U)
-/*! PWRUP_CMPS
- * 0b000..Powers down the VBUS_VALID comparator
- * 0b111..Enables the VBUS_VALID comparator (default)
- */
-#define USBPHY_USB1_VBUS_DETECT_PWRUP_CMPS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_PWRUP_CMPS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_PWRUP_CMPS_MASK)
-#define USBPHY_USB1_VBUS_DETECT_DISCHARGE_VBUS_MASK (0x4000000U)
-#define USBPHY_USB1_VBUS_DETECT_DISCHARGE_VBUS_SHIFT (26U)
-/*! DISCHARGE_VBUS
- * 0b0..VBUS discharge resistor is disabled (Default)
- * 0b1..VBUS discharge resistor is enabled
- */
-#define USBPHY_USB1_VBUS_DETECT_DISCHARGE_VBUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_DISCHARGE_VBUS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_DISCHARGE_VBUS_MASK)
-/*! @} */
-
-/*! @name USB1_VBUS_DETECT_SET - USB PHY VBUS Detect Control Register */
-/*! @{ */
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_THRESH_MASK (0x7U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_THRESH_SHIFT (0U)
-/*! VBUSVALID_THRESH
- * 0b000..4.0V
- * 0b001..4.1V
- * 0b010..4.2V
- * 0b011..4.3V
- * 0b100..4.4V(Default)
- * 0b101..4.5V
- * 0b110..4.6V
- * 0b111..4.7V
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_THRESH(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_THRESH_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_THRESH_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUS_OVERRIDE_EN_MASK (0x8U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUS_OVERRIDE_EN_SHIFT (3U)
-/*! VBUS_OVERRIDE_EN
- * 0b0..Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)
- * 0b1..Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_SESSEND_OVERRIDE_MASK (0x10U)
-#define USBPHY_USB1_VBUS_DETECT_SET_SESSEND_OVERRIDE_SHIFT (4U)
-#define USBPHY_USB1_VBUS_DETECT_SET_SESSEND_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_SESSEND_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_SESSEND_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_BVALID_OVERRIDE_MASK (0x20U)
-#define USBPHY_USB1_VBUS_DETECT_SET_BVALID_OVERRIDE_SHIFT (5U)
-#define USBPHY_USB1_VBUS_DETECT_SET_BVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_BVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_BVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_AVALID_OVERRIDE_MASK (0x40U)
-#define USBPHY_USB1_VBUS_DETECT_SET_AVALID_OVERRIDE_SHIFT (6U)
-#define USBPHY_USB1_VBUS_DETECT_SET_AVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_AVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_AVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_OVERRIDE_MASK (0x80U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_OVERRIDE_SHIFT (7U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_SEL_MASK (0x100U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_SEL_SHIFT (8U)
-/*! VBUSVALID_SEL
- * 0b0..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b1..Use the VBUS_VALID_3V detector results for signal reported to the USB controller
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUS_SOURCE_SEL_MASK (0x600U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUS_SOURCE_SEL_SHIFT (9U)
-/*! VBUS_SOURCE_SEL
- * 0b00..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b01..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b10..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b11..Reserved, do not use
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUS_SOURCE_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUS_SOURCE_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUS_SOURCE_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_EN_MASK (0x800U)
-#define USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_EN_SHIFT (11U)
-#define USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_MASK (0x1000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_SHIFT (12U)
-#define USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_EXT_ID_OVERRIDE_EN_MASK (0x2000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_EXT_ID_OVERRIDE_EN_SHIFT (13U)
-/*! EXT_ID_OVERRIDE_EN
- * 0b0..Select the Muxed value chosen using ID_OVERRIDE_EN.
- * 0b1..Select the external ID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_EXT_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_EXT_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_EXT_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_EXT_VBUS_OVERRIDE_EN_MASK (0x4000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_EXT_VBUS_OVERRIDE_EN_SHIFT (14U)
-/*! EXT_VBUS_OVERRIDE_EN
- * 0b0..Select the Muxed value chosen using VBUS_OVERRIDE_EN.
- * 0b1..Select the external VBUS VALID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_EXT_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_EXT_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_EXT_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_TO_SESSVALID_MASK (0x40000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_TO_SESSVALID_SHIFT (18U)
-/*! VBUSVALID_TO_SESSVALID
- * 0b0..Use the VBUS_VALID comparator for VBUS_VALID results
- * 0b1..Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V.
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_TO_SESSVALID(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_TO_SESSVALID_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_TO_SESSVALID_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_5VDETECT_MASK (0x80000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_5VDETECT_SHIFT (19U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_5VDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_5VDETECT_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_5VDETECT_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_PWRUP_CMPS_MASK (0x700000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_PWRUP_CMPS_SHIFT (20U)
-/*! PWRUP_CMPS
- * 0b000..Powers down the VBUS_VALID comparator
- * 0b111..Enables the VBUS_VALID comparator (default)
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_PWRUP_CMPS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_PWRUP_CMPS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_PWRUP_CMPS_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_DISCHARGE_VBUS_MASK (0x4000000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_DISCHARGE_VBUS_SHIFT (26U)
-/*! DISCHARGE_VBUS
- * 0b0..VBUS discharge resistor is disabled (Default)
- * 0b1..VBUS discharge resistor is enabled
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_DISCHARGE_VBUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_DISCHARGE_VBUS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_DISCHARGE_VBUS_MASK)
-/*! @} */
-
-/*! @name USB1_VBUS_DETECT_CLR - USB PHY VBUS Detect Control Register */
-/*! @{ */
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_THRESH_MASK (0x7U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_THRESH_SHIFT (0U)
-/*! VBUSVALID_THRESH
- * 0b000..4.0V
- * 0b001..4.1V
- * 0b010..4.2V
- * 0b011..4.3V
- * 0b100..4.4V(Default)
- * 0b101..4.5V
- * 0b110..4.6V
- * 0b111..4.7V
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_THRESH(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_THRESH_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_THRESH_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUS_OVERRIDE_EN_MASK (0x8U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUS_OVERRIDE_EN_SHIFT (3U)
-/*! VBUS_OVERRIDE_EN
- * 0b0..Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)
- * 0b1..Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_SESSEND_OVERRIDE_MASK (0x10U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_SESSEND_OVERRIDE_SHIFT (4U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_SESSEND_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_SESSEND_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_SESSEND_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_BVALID_OVERRIDE_MASK (0x20U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_BVALID_OVERRIDE_SHIFT (5U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_BVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_BVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_BVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_AVALID_OVERRIDE_MASK (0x40U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_AVALID_OVERRIDE_SHIFT (6U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_AVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_AVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_AVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_OVERRIDE_MASK (0x80U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_OVERRIDE_SHIFT (7U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_SEL_MASK (0x100U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_SEL_SHIFT (8U)
-/*! VBUSVALID_SEL
- * 0b0..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b1..Use the VBUS_VALID_3V detector results for signal reported to the USB controller
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUS_SOURCE_SEL_MASK (0x600U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUS_SOURCE_SEL_SHIFT (9U)
-/*! VBUS_SOURCE_SEL
- * 0b00..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b01..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b10..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b11..Reserved, do not use
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUS_SOURCE_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUS_SOURCE_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUS_SOURCE_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_EN_MASK (0x800U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_EN_SHIFT (11U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_MASK (0x1000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_SHIFT (12U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_EXT_ID_OVERRIDE_EN_MASK (0x2000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_EXT_ID_OVERRIDE_EN_SHIFT (13U)
-/*! EXT_ID_OVERRIDE_EN
- * 0b0..Select the Muxed value chosen using ID_OVERRIDE_EN.
- * 0b1..Select the external ID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_EXT_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_EXT_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_EXT_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_EXT_VBUS_OVERRIDE_EN_MASK (0x4000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_EXT_VBUS_OVERRIDE_EN_SHIFT (14U)
-/*! EXT_VBUS_OVERRIDE_EN
- * 0b0..Select the muxed value chosen using VBUS_OVERRIDE_EN.
- * 0b1..Select the external VBUS VALID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_EXT_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_EXT_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_EXT_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_TO_SESSVALID_MASK (0x40000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_TO_SESSVALID_SHIFT (18U)
-/*! VBUSVALID_TO_SESSVALID
- * 0b0..Use the VBUS_VALID comparator for VBUS_VALID results
- * 0b1..Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V.
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_TO_SESSVALID(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_TO_SESSVALID_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_TO_SESSVALID_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_5VDETECT_MASK (0x80000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_5VDETECT_SHIFT (19U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_5VDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_5VDETECT_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_5VDETECT_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_PWRUP_CMPS_MASK (0x700000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_PWRUP_CMPS_SHIFT (20U)
-/*! PWRUP_CMPS
- * 0b000..Powers down the VBUS_VALID comparator
- * 0b111..Enables the VBUS_VALID comparator (default)
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_PWRUP_CMPS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_PWRUP_CMPS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_PWRUP_CMPS_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_DISCHARGE_VBUS_MASK (0x4000000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_DISCHARGE_VBUS_SHIFT (26U)
-/*! DISCHARGE_VBUS
- * 0b0..VBUS discharge resistor is disabled (Default)
- * 0b1..VBUS discharge resistor is enabled
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_DISCHARGE_VBUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_DISCHARGE_VBUS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_DISCHARGE_VBUS_MASK)
-/*! @} */
-
-/*! @name USB1_VBUS_DETECT_TOG - USB PHY VBUS Detect Control Register */
-/*! @{ */
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_THRESH_MASK (0x7U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_THRESH_SHIFT (0U)
-/*! VBUSVALID_THRESH
- * 0b000..4.0V
- * 0b001..4.1V
- * 0b010..4.2V
- * 0b011..4.3V
- * 0b100..4.4V(Default)
- * 0b101..4.5V
- * 0b110..4.6V
- * 0b111..4.7V
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_THRESH(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_THRESH_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_THRESH_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUS_OVERRIDE_EN_MASK (0x8U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUS_OVERRIDE_EN_SHIFT (3U)
-/*! VBUS_OVERRIDE_EN
- * 0b0..Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)
- * 0b1..Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_SESSEND_OVERRIDE_MASK (0x10U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_SESSEND_OVERRIDE_SHIFT (4U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_SESSEND_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_SESSEND_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_SESSEND_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_BVALID_OVERRIDE_MASK (0x20U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_BVALID_OVERRIDE_SHIFT (5U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_BVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_BVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_BVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_AVALID_OVERRIDE_MASK (0x40U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_AVALID_OVERRIDE_SHIFT (6U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_AVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_AVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_AVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_OVERRIDE_MASK (0x80U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_OVERRIDE_SHIFT (7U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_SEL_MASK (0x100U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_SEL_SHIFT (8U)
-/*! VBUSVALID_SEL
- * 0b0..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b1..Use the VBUS_VALID_3V detector results for signal reported to the USB controller
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUS_SOURCE_SEL_MASK (0x600U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUS_SOURCE_SEL_SHIFT (9U)
-/*! VBUS_SOURCE_SEL
- * 0b00..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b01..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b10..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b11..Reserved, do not use
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUS_SOURCE_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUS_SOURCE_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUS_SOURCE_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_EN_MASK (0x800U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_EN_SHIFT (11U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_MASK (0x1000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_SHIFT (12U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_EXT_ID_OVERRIDE_EN_MASK (0x2000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_EXT_ID_OVERRIDE_EN_SHIFT (13U)
-/*! EXT_ID_OVERRIDE_EN
- * 0b0..Select the muxed value chosen using ID_OVERRIDE_EN.
- * 0b1..Select the external ID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_EXT_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_EXT_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_EXT_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_EXT_VBUS_OVERRIDE_EN_MASK (0x4000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_EXT_VBUS_OVERRIDE_EN_SHIFT (14U)
-/*! EXT_VBUS_OVERRIDE_EN
- * 0b0..Select the Muxed value chosen using VBUS_OVERRIDE_EN.
- * 0b1..Select the external VBUS VALID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_EXT_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_EXT_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_EXT_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_TO_SESSVALID_MASK (0x40000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_TO_SESSVALID_SHIFT (18U)
-/*! VBUSVALID_TO_SESSVALID
- * 0b0..Use the VBUS_VALID comparator for VBUS_VALID results
- * 0b1..Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V.
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_TO_SESSVALID(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_TO_SESSVALID_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_TO_SESSVALID_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_5VDETECT_MASK (0x80000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_5VDETECT_SHIFT (19U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_5VDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_5VDETECT_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_5VDETECT_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_PWRUP_CMPS_MASK (0x700000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_PWRUP_CMPS_SHIFT (20U)
-/*! PWRUP_CMPS
- * 0b000..Powers down the VBUS_VALID comparator
- * 0b111..Enables the VBUS_VALID comparator (default)
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_PWRUP_CMPS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_PWRUP_CMPS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_PWRUP_CMPS_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_DISCHARGE_VBUS_MASK (0x4000000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_DISCHARGE_VBUS_SHIFT (26U)
-/*! DISCHARGE_VBUS
- * 0b0..VBUS discharge resistor is disabled (Default)
- * 0b1..VBUS discharge resistor is enabled
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_DISCHARGE_VBUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_DISCHARGE_VBUS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_DISCHARGE_VBUS_MASK)
-/*! @} */
-
-/*! @name ANACTRL - USB PHY Analog Control Register */
-/*! @{ */
-#define USBPHY_ANACTRL_LVI_EN_MASK (0x2U)
-#define USBPHY_ANACTRL_LVI_EN_SHIFT (1U)
-#define USBPHY_ANACTRL_LVI_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_LVI_EN_SHIFT)) & USBPHY_ANACTRL_LVI_EN_MASK)
-#define USBPHY_ANACTRL_PFD_CLK_SEL_MASK (0xCU)
-#define USBPHY_ANACTRL_PFD_CLK_SEL_SHIFT (2U)
-#define USBPHY_ANACTRL_PFD_CLK_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_PFD_CLK_SEL_SHIFT)) & USBPHY_ANACTRL_PFD_CLK_SEL_MASK)
-#define USBPHY_ANACTRL_DEV_PULLDOWN_MASK (0x400U)
-#define USBPHY_ANACTRL_DEV_PULLDOWN_SHIFT (10U)
-/*! DEV_PULLDOWN
- * 0b0..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode.
- * 0b1..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode.
- */
-#define USBPHY_ANACTRL_DEV_PULLDOWN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_DEV_PULLDOWN_SHIFT)) & USBPHY_ANACTRL_DEV_PULLDOWN_MASK)
-/*! @} */
-
-/*! @name ANACTRL_SET - USB PHY Analog Control Register */
-/*! @{ */
-#define USBPHY_ANACTRL_SET_LVI_EN_MASK (0x2U)
-#define USBPHY_ANACTRL_SET_LVI_EN_SHIFT (1U)
-#define USBPHY_ANACTRL_SET_LVI_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_SET_LVI_EN_SHIFT)) & USBPHY_ANACTRL_SET_LVI_EN_MASK)
-#define USBPHY_ANACTRL_SET_PFD_CLK_SEL_MASK (0xCU)
-#define USBPHY_ANACTRL_SET_PFD_CLK_SEL_SHIFT (2U)
-#define USBPHY_ANACTRL_SET_PFD_CLK_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_SET_PFD_CLK_SEL_SHIFT)) & USBPHY_ANACTRL_SET_PFD_CLK_SEL_MASK)
-#define USBPHY_ANACTRL_SET_DEV_PULLDOWN_MASK (0x400U)
-#define USBPHY_ANACTRL_SET_DEV_PULLDOWN_SHIFT (10U)
-/*! DEV_PULLDOWN
- * 0b0..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode.
- * 0b1..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode.
- */
-#define USBPHY_ANACTRL_SET_DEV_PULLDOWN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_SET_DEV_PULLDOWN_SHIFT)) & USBPHY_ANACTRL_SET_DEV_PULLDOWN_MASK)
-/*! @} */
-
-/*! @name ANACTRL_CLR - USB PHY Analog Control Register */
-/*! @{ */
-#define USBPHY_ANACTRL_CLR_LVI_EN_MASK (0x2U)
-#define USBPHY_ANACTRL_CLR_LVI_EN_SHIFT (1U)
-#define USBPHY_ANACTRL_CLR_LVI_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_CLR_LVI_EN_SHIFT)) & USBPHY_ANACTRL_CLR_LVI_EN_MASK)
-#define USBPHY_ANACTRL_CLR_PFD_CLK_SEL_MASK (0xCU)
-#define USBPHY_ANACTRL_CLR_PFD_CLK_SEL_SHIFT (2U)
-#define USBPHY_ANACTRL_CLR_PFD_CLK_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_CLR_PFD_CLK_SEL_SHIFT)) & USBPHY_ANACTRL_CLR_PFD_CLK_SEL_MASK)
-#define USBPHY_ANACTRL_CLR_DEV_PULLDOWN_MASK (0x400U)
-#define USBPHY_ANACTRL_CLR_DEV_PULLDOWN_SHIFT (10U)
-/*! DEV_PULLDOWN
- * 0b0..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode.
- * 0b1..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode.
- */
-#define USBPHY_ANACTRL_CLR_DEV_PULLDOWN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_CLR_DEV_PULLDOWN_SHIFT)) & USBPHY_ANACTRL_CLR_DEV_PULLDOWN_MASK)
-/*! @} */
-
-/*! @name ANACTRL_TOG - USB PHY Analog Control Register */
-/*! @{ */
-#define USBPHY_ANACTRL_TOG_LVI_EN_MASK (0x2U)
-#define USBPHY_ANACTRL_TOG_LVI_EN_SHIFT (1U)
-#define USBPHY_ANACTRL_TOG_LVI_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_TOG_LVI_EN_SHIFT)) & USBPHY_ANACTRL_TOG_LVI_EN_MASK)
-#define USBPHY_ANACTRL_TOG_PFD_CLK_SEL_MASK (0xCU)
-#define USBPHY_ANACTRL_TOG_PFD_CLK_SEL_SHIFT (2U)
-#define USBPHY_ANACTRL_TOG_PFD_CLK_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_TOG_PFD_CLK_SEL_SHIFT)) & USBPHY_ANACTRL_TOG_PFD_CLK_SEL_MASK)
-#define USBPHY_ANACTRL_TOG_DEV_PULLDOWN_MASK (0x400U)
-#define USBPHY_ANACTRL_TOG_DEV_PULLDOWN_SHIFT (10U)
-/*! DEV_PULLDOWN
- * 0b0..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode.
- * 0b1..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode.
- */
-#define USBPHY_ANACTRL_TOG_DEV_PULLDOWN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_TOG_DEV_PULLDOWN_SHIFT)) & USBPHY_ANACTRL_TOG_DEV_PULLDOWN_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group USBPHY_Register_Masks */
-
-
-/* USBPHY - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral USBPHY base address */
- #define USBPHY_BASE (0x50038000u)
- /** Peripheral USBPHY base address */
- #define USBPHY_BASE_NS (0x40038000u)
- /** Peripheral USBPHY base pointer */
- #define USBPHY ((USBPHY_Type *)USBPHY_BASE)
- /** Peripheral USBPHY base pointer */
- #define USBPHY_NS ((USBPHY_Type *)USBPHY_BASE_NS)
- /** Array initializer of USBPHY peripheral base addresses */
- #define USBPHY_BASE_ADDRS { USBPHY_BASE }
- /** Array initializer of USBPHY peripheral base pointers */
- #define USBPHY_BASE_PTRS { USBPHY }
- /** Array initializer of USBPHY peripheral base addresses */
- #define USBPHY_BASE_ADDRS_NS { USBPHY_BASE_NS }
- /** Array initializer of USBPHY peripheral base pointers */
- #define USBPHY_BASE_PTRS_NS { USBPHY_NS }
-#else
- /** Peripheral USBPHY base address */
- #define USBPHY_BASE (0x40038000u)
- /** Peripheral USBPHY base pointer */
- #define USBPHY ((USBPHY_Type *)USBPHY_BASE)
- /** Array initializer of USBPHY peripheral base addresses */
- #define USBPHY_BASE_ADDRS { USBPHY_BASE }
- /** Array initializer of USBPHY peripheral base pointers */
- #define USBPHY_BASE_PTRS { USBPHY }
-#endif
-/** Interrupt vectors for the USBPHY peripheral type */
-#define USBPHY_IRQS { USB1_PHY_IRQn }
-
-/*!
- * @}
- */ /* end of group USBPHY_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- UTICK Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup UTICK_Peripheral_Access_Layer UTICK Peripheral Access Layer
- * @{
- */
-
-/** UTICK - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< Control register., offset: 0x0 */
- __IO uint32_t STAT; /**< Status register., offset: 0x4 */
- __IO uint32_t CFG; /**< Capture configuration register., offset: 0x8 */
- __O uint32_t CAPCLR; /**< Capture clear register., offset: 0xC */
- __I uint32_t CAP[4]; /**< Capture register ., array offset: 0x10, array step: 0x4 */
-} UTICK_Type;
-
-/* ----------------------------------------------------------------------------
- -- UTICK Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup UTICK_Register_Masks UTICK Register Masks
- * @{
- */
-
-/*! @name CTRL - Control register. */
-/*! @{ */
-#define UTICK_CTRL_DELAYVAL_MASK (0x7FFFFFFFU)
-#define UTICK_CTRL_DELAYVAL_SHIFT (0U)
-/*! DELAYVAL - Tick interval value. The delay will be equal to DELAYVAL + 1 periods of the timer
- * clock. The minimum usable value is 1, for a delay of 2 timer clocks. A value of 0 stops the timer.
- */
-#define UTICK_CTRL_DELAYVAL(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CTRL_DELAYVAL_SHIFT)) & UTICK_CTRL_DELAYVAL_MASK)
-#define UTICK_CTRL_REPEAT_MASK (0x80000000U)
-#define UTICK_CTRL_REPEAT_SHIFT (31U)
-/*! REPEAT - Repeat delay. 0 = One-time delay. 1 = Delay repeats continuously.
- */
-#define UTICK_CTRL_REPEAT(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CTRL_REPEAT_SHIFT)) & UTICK_CTRL_REPEAT_MASK)
-/*! @} */
-
-/*! @name STAT - Status register. */
-/*! @{ */
-#define UTICK_STAT_INTR_MASK (0x1U)
-#define UTICK_STAT_INTR_SHIFT (0U)
-/*! INTR - Interrupt flag. 0 = No interrupt is pending. 1 = An interrupt is pending. A write of any
- * value to this register clears this flag.
- */
-#define UTICK_STAT_INTR(x) (((uint32_t)(((uint32_t)(x)) << UTICK_STAT_INTR_SHIFT)) & UTICK_STAT_INTR_MASK)
-#define UTICK_STAT_ACTIVE_MASK (0x2U)
-#define UTICK_STAT_ACTIVE_SHIFT (1U)
-/*! ACTIVE - Active flag. 0 = The Micro-Tick Timer is stopped. 1 = The Micro-Tick Timer is currently active.
- */
-#define UTICK_STAT_ACTIVE(x) (((uint32_t)(((uint32_t)(x)) << UTICK_STAT_ACTIVE_SHIFT)) & UTICK_STAT_ACTIVE_MASK)
-/*! @} */
-
-/*! @name CFG - Capture configuration register. */
-/*! @{ */
-#define UTICK_CFG_CAPEN0_MASK (0x1U)
-#define UTICK_CFG_CAPEN0_SHIFT (0U)
-/*! CAPEN0 - Enable Capture 0. 1 = Enabled, 0 = Disabled.
- */
-#define UTICK_CFG_CAPEN0(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPEN0_SHIFT)) & UTICK_CFG_CAPEN0_MASK)
-#define UTICK_CFG_CAPEN1_MASK (0x2U)
-#define UTICK_CFG_CAPEN1_SHIFT (1U)
-/*! CAPEN1 - Enable Capture 1. 1 = Enabled, 0 = Disabled.
- */
-#define UTICK_CFG_CAPEN1(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPEN1_SHIFT)) & UTICK_CFG_CAPEN1_MASK)
-#define UTICK_CFG_CAPEN2_MASK (0x4U)
-#define UTICK_CFG_CAPEN2_SHIFT (2U)
-/*! CAPEN2 - Enable Capture 2. 1 = Enabled, 0 = Disabled.
- */
-#define UTICK_CFG_CAPEN2(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPEN2_SHIFT)) & UTICK_CFG_CAPEN2_MASK)
-#define UTICK_CFG_CAPEN3_MASK (0x8U)
-#define UTICK_CFG_CAPEN3_SHIFT (3U)
-/*! CAPEN3 - Enable Capture 3. 1 = Enabled, 0 = Disabled.
- */
-#define UTICK_CFG_CAPEN3(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPEN3_SHIFT)) & UTICK_CFG_CAPEN3_MASK)
-#define UTICK_CFG_CAPPOL0_MASK (0x100U)
-#define UTICK_CFG_CAPPOL0_SHIFT (8U)
-/*! CAPPOL0 - Capture Polarity 0. 0 = Positive edge capture, 1 = Negative edge capture.
- */
-#define UTICK_CFG_CAPPOL0(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPPOL0_SHIFT)) & UTICK_CFG_CAPPOL0_MASK)
-#define UTICK_CFG_CAPPOL1_MASK (0x200U)
-#define UTICK_CFG_CAPPOL1_SHIFT (9U)
-/*! CAPPOL1 - Capture Polarity 1. 0 = Positive edge capture, 1 = Negative edge capture.
- */
-#define UTICK_CFG_CAPPOL1(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPPOL1_SHIFT)) & UTICK_CFG_CAPPOL1_MASK)
-#define UTICK_CFG_CAPPOL2_MASK (0x400U)
-#define UTICK_CFG_CAPPOL2_SHIFT (10U)
-/*! CAPPOL2 - Capture Polarity 2. 0 = Positive edge capture, 1 = Negative edge capture.
- */
-#define UTICK_CFG_CAPPOL2(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPPOL2_SHIFT)) & UTICK_CFG_CAPPOL2_MASK)
-#define UTICK_CFG_CAPPOL3_MASK (0x800U)
-#define UTICK_CFG_CAPPOL3_SHIFT (11U)
-/*! CAPPOL3 - Capture Polarity 3. 0 = Positive edge capture, 1 = Negative edge capture.
- */
-#define UTICK_CFG_CAPPOL3(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPPOL3_SHIFT)) & UTICK_CFG_CAPPOL3_MASK)
-/*! @} */
-
-/*! @name CAPCLR - Capture clear register. */
-/*! @{ */
-#define UTICK_CAPCLR_CAPCLR0_MASK (0x1U)
-#define UTICK_CAPCLR_CAPCLR0_SHIFT (0U)
-/*! CAPCLR0 - Clear capture 0. Writing 1 to this bit clears the CAP0 register value.
- */
-#define UTICK_CAPCLR_CAPCLR0(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CAPCLR_CAPCLR0_SHIFT)) & UTICK_CAPCLR_CAPCLR0_MASK)
-#define UTICK_CAPCLR_CAPCLR1_MASK (0x2U)
-#define UTICK_CAPCLR_CAPCLR1_SHIFT (1U)
-/*! CAPCLR1 - Clear capture 1. Writing 1 to this bit clears the CAP1 register value.
- */
-#define UTICK_CAPCLR_CAPCLR1(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CAPCLR_CAPCLR1_SHIFT)) & UTICK_CAPCLR_CAPCLR1_MASK)
-#define UTICK_CAPCLR_CAPCLR2_MASK (0x4U)
-#define UTICK_CAPCLR_CAPCLR2_SHIFT (2U)
-/*! CAPCLR2 - Clear capture 2. Writing 1 to this bit clears the CAP2 register value.
- */
-#define UTICK_CAPCLR_CAPCLR2(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CAPCLR_CAPCLR2_SHIFT)) & UTICK_CAPCLR_CAPCLR2_MASK)
-#define UTICK_CAPCLR_CAPCLR3_MASK (0x8U)
-#define UTICK_CAPCLR_CAPCLR3_SHIFT (3U)
-/*! CAPCLR3 - Clear capture 3. Writing 1 to this bit clears the CAP3 register value.
- */
-#define UTICK_CAPCLR_CAPCLR3(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CAPCLR_CAPCLR3_SHIFT)) & UTICK_CAPCLR_CAPCLR3_MASK)
-/*! @} */
-
-/*! @name CAP - Capture register . */
-/*! @{ */
-#define UTICK_CAP_CAP_VALUE_MASK (0x7FFFFFFFU)
-#define UTICK_CAP_CAP_VALUE_SHIFT (0U)
-/*! CAP_VALUE - Capture value for the related capture event (UTICK_CAPn. Note: the value is 1 lower
- * than the actual value of the Micro-tick Timer at the moment of the capture event.
- */
-#define UTICK_CAP_CAP_VALUE(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CAP_CAP_VALUE_SHIFT)) & UTICK_CAP_CAP_VALUE_MASK)
-#define UTICK_CAP_VALID_MASK (0x80000000U)
-#define UTICK_CAP_VALID_SHIFT (31U)
-/*! VALID - Capture Valid. When 1, a value has been captured based on a transition of the related
- * UTICK_CAPn pin. Cleared by writing to the related bit in the CAPCLR register.
- */
-#define UTICK_CAP_VALID(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CAP_VALID_SHIFT)) & UTICK_CAP_VALID_MASK)
-/*! @} */
-
-/* The count of UTICK_CAP */
-#define UTICK_CAP_COUNT (4U)
-
-
-/*!
- * @}
- */ /* end of group UTICK_Register_Masks */
-
-
-/* UTICK - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral UTICK0 base address */
- #define UTICK0_BASE (0x5000E000u)
- /** Peripheral UTICK0 base address */
- #define UTICK0_BASE_NS (0x4000E000u)
- /** Peripheral UTICK0 base pointer */
- #define UTICK0 ((UTICK_Type *)UTICK0_BASE)
- /** Peripheral UTICK0 base pointer */
- #define UTICK0_NS ((UTICK_Type *)UTICK0_BASE_NS)
- /** Array initializer of UTICK peripheral base addresses */
- #define UTICK_BASE_ADDRS { UTICK0_BASE }
- /** Array initializer of UTICK peripheral base pointers */
- #define UTICK_BASE_PTRS { UTICK0 }
- /** Array initializer of UTICK peripheral base addresses */
- #define UTICK_BASE_ADDRS_NS { UTICK0_BASE_NS }
- /** Array initializer of UTICK peripheral base pointers */
- #define UTICK_BASE_PTRS_NS { UTICK0_NS }
-#else
- /** Peripheral UTICK0 base address */
- #define UTICK0_BASE (0x4000E000u)
- /** Peripheral UTICK0 base pointer */
- #define UTICK0 ((UTICK_Type *)UTICK0_BASE)
- /** Array initializer of UTICK peripheral base addresses */
- #define UTICK_BASE_ADDRS { UTICK0_BASE }
- /** Array initializer of UTICK peripheral base pointers */
- #define UTICK_BASE_PTRS { UTICK0 }
-#endif
-/** Interrupt vectors for the UTICK peripheral type */
-#define UTICK_IRQS { UTICK0_IRQn }
-
-/*!
- * @}
- */ /* end of group UTICK_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- WWDT Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup WWDT_Peripheral_Access_Layer WWDT Peripheral Access Layer
- * @{
- */
-
-/** WWDT - Register Layout Typedef */
-typedef struct {
- __IO uint32_t MOD; /**< Watchdog mode register. This register contains the basic mode and status of the Watchdog Timer., offset: 0x0 */
- __IO uint32_t TC; /**< Watchdog timer constant register. This 24-bit register determines the time-out value., offset: 0x4 */
- __O uint32_t FEED; /**< Watchdog feed sequence register. Writing 0xAA followed by 0x55 to this register reloads the Watchdog timer with the value contained in TC., offset: 0x8 */
- __I uint32_t TV; /**< Watchdog timer value register. This 24-bit register reads out the current value of the Watchdog timer., offset: 0xC */
- uint8_t RESERVED_0[4];
- __IO uint32_t WARNINT; /**< Watchdog Warning Interrupt compare value., offset: 0x14 */
- __IO uint32_t WINDOW; /**< Watchdog Window compare value., offset: 0x18 */
-} WWDT_Type;
-
-/* ----------------------------------------------------------------------------
- -- WWDT Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup WWDT_Register_Masks WWDT Register Masks
- * @{
- */
-
-/*! @name MOD - Watchdog mode register. This register contains the basic mode and status of the Watchdog Timer. */
-/*! @{ */
-#define WWDT_MOD_WDEN_MASK (0x1U)
-#define WWDT_MOD_WDEN_SHIFT (0U)
-/*! WDEN - Watchdog enable bit. Once this bit is set to one and a watchdog feed is performed, the
- * watchdog timer will run permanently.
- * 0b0..Stop. The watchdog timer is stopped.
- * 0b1..Run. The watchdog timer is running.
- */
-#define WWDT_MOD_WDEN(x) (((uint32_t)(((uint32_t)(x)) << WWDT_MOD_WDEN_SHIFT)) & WWDT_MOD_WDEN_MASK)
-#define WWDT_MOD_WDRESET_MASK (0x2U)
-#define WWDT_MOD_WDRESET_SHIFT (1U)
-/*! WDRESET - Watchdog reset enable bit. Once this bit has been written with a 1 it cannot be re-written with a 0.
- * 0b0..Interrupt. A watchdog time-out will not cause a chip reset.
- * 0b1..Reset. A watchdog time-out will cause a chip reset.
- */
-#define WWDT_MOD_WDRESET(x) (((uint32_t)(((uint32_t)(x)) << WWDT_MOD_WDRESET_SHIFT)) & WWDT_MOD_WDRESET_MASK)
-#define WWDT_MOD_WDTOF_MASK (0x4U)
-#define WWDT_MOD_WDTOF_SHIFT (2U)
-/*! WDTOF - Watchdog time-out flag. Set when the watchdog timer times out, by a feed error, or by
- * events associated with WDPROTECT. Cleared by software writing a 0 to this bit position. Causes a
- * chip reset if WDRESET = 1.
- */
-#define WWDT_MOD_WDTOF(x) (((uint32_t)(((uint32_t)(x)) << WWDT_MOD_WDTOF_SHIFT)) & WWDT_MOD_WDTOF_MASK)
-#define WWDT_MOD_WDINT_MASK (0x8U)
-#define WWDT_MOD_WDINT_SHIFT (3U)
-/*! WDINT - Warning interrupt flag. Set when the timer is at or below the value in WDWARNINT.
- * Cleared by software writing a 1 to this bit position. Note that this bit cannot be cleared while the
- * WARNINT value is equal to the value of the TV register. This can occur if the value of
- * WARNINT is 0 and the WDRESET bit is 0 when TV decrements to 0.
- */
-#define WWDT_MOD_WDINT(x) (((uint32_t)(((uint32_t)(x)) << WWDT_MOD_WDINT_SHIFT)) & WWDT_MOD_WDINT_MASK)
-#define WWDT_MOD_WDPROTECT_MASK (0x10U)
-#define WWDT_MOD_WDPROTECT_SHIFT (4U)
-/*! WDPROTECT - Watchdog update mode. This bit can be set once by software and is only cleared by a reset.
- * 0b0..Flexible. The watchdog time-out value (TC) can be changed at any time.
- * 0b1..Threshold. The watchdog time-out value (TC) can be changed only after the counter is below the value of WDWARNINT and WDWINDOW.
- */
-#define WWDT_MOD_WDPROTECT(x) (((uint32_t)(((uint32_t)(x)) << WWDT_MOD_WDPROTECT_SHIFT)) & WWDT_MOD_WDPROTECT_MASK)
-/*! @} */
-
-/*! @name TC - Watchdog timer constant register. This 24-bit register determines the time-out value. */
-/*! @{ */
-#define WWDT_TC_COUNT_MASK (0xFFFFFFU)
-#define WWDT_TC_COUNT_SHIFT (0U)
-/*! COUNT - Watchdog time-out value.
- */
-#define WWDT_TC_COUNT(x) (((uint32_t)(((uint32_t)(x)) << WWDT_TC_COUNT_SHIFT)) & WWDT_TC_COUNT_MASK)
-/*! @} */
-
-/*! @name FEED - Watchdog feed sequence register. Writing 0xAA followed by 0x55 to this register reloads the Watchdog timer with the value contained in TC. */
-/*! @{ */
-#define WWDT_FEED_FEED_MASK (0xFFU)
-#define WWDT_FEED_FEED_SHIFT (0U)
-/*! FEED - Feed value should be 0xAA followed by 0x55.
- */
-#define WWDT_FEED_FEED(x) (((uint32_t)(((uint32_t)(x)) << WWDT_FEED_FEED_SHIFT)) & WWDT_FEED_FEED_MASK)
-/*! @} */
-
-/*! @name TV - Watchdog timer value register. This 24-bit register reads out the current value of the Watchdog timer. */
-/*! @{ */
-#define WWDT_TV_COUNT_MASK (0xFFFFFFU)
-#define WWDT_TV_COUNT_SHIFT (0U)
-/*! COUNT - Counter timer value.
- */
-#define WWDT_TV_COUNT(x) (((uint32_t)(((uint32_t)(x)) << WWDT_TV_COUNT_SHIFT)) & WWDT_TV_COUNT_MASK)
-/*! @} */
-
-/*! @name WARNINT - Watchdog Warning Interrupt compare value. */
-/*! @{ */
-#define WWDT_WARNINT_WARNINT_MASK (0x3FFU)
-#define WWDT_WARNINT_WARNINT_SHIFT (0U)
-/*! WARNINT - Watchdog warning interrupt compare value.
- */
-#define WWDT_WARNINT_WARNINT(x) (((uint32_t)(((uint32_t)(x)) << WWDT_WARNINT_WARNINT_SHIFT)) & WWDT_WARNINT_WARNINT_MASK)
-/*! @} */
-
-/*! @name WINDOW - Watchdog Window compare value. */
-/*! @{ */
-#define WWDT_WINDOW_WINDOW_MASK (0xFFFFFFU)
-#define WWDT_WINDOW_WINDOW_SHIFT (0U)
-/*! WINDOW - Watchdog window value.
- */
-#define WWDT_WINDOW_WINDOW(x) (((uint32_t)(((uint32_t)(x)) << WWDT_WINDOW_WINDOW_SHIFT)) & WWDT_WINDOW_WINDOW_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group WWDT_Register_Masks */
-
-
-/* WWDT - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral WWDT base address */
- #define WWDT_BASE (0x5000C000u)
- /** Peripheral WWDT base address */
- #define WWDT_BASE_NS (0x4000C000u)
- /** Peripheral WWDT base pointer */
- #define WWDT ((WWDT_Type *)WWDT_BASE)
- /** Peripheral WWDT base pointer */
- #define WWDT_NS ((WWDT_Type *)WWDT_BASE_NS)
- /** Array initializer of WWDT peripheral base addresses */
- #define WWDT_BASE_ADDRS { WWDT_BASE }
- /** Array initializer of WWDT peripheral base pointers */
- #define WWDT_BASE_PTRS { WWDT }
- /** Array initializer of WWDT peripheral base addresses */
- #define WWDT_BASE_ADDRS_NS { WWDT_BASE_NS }
- /** Array initializer of WWDT peripheral base pointers */
- #define WWDT_BASE_PTRS_NS { WWDT_NS }
-#else
- /** Peripheral WWDT base address */
- #define WWDT_BASE (0x4000C000u)
- /** Peripheral WWDT base pointer */
- #define WWDT ((WWDT_Type *)WWDT_BASE)
- /** Array initializer of WWDT peripheral base addresses */
- #define WWDT_BASE_ADDRS { WWDT_BASE }
- /** Array initializer of WWDT peripheral base pointers */
- #define WWDT_BASE_PTRS { WWDT }
-#endif
-/** Interrupt vectors for the WWDT peripheral type */
-#define WWDT_IRQS { WDT_BOD_IRQn }
-
-/*!
- * @}
- */ /* end of group WWDT_Peripheral_Access_Layer */
-
-
-/*
-** End of section using anonymous unions
-*/
-
-#if defined(__ARMCC_VERSION)
- #if (__ARMCC_VERSION >= 6010050)
- #pragma clang diagnostic pop
- #else
- #pragma pop
- #endif
-#elif defined(__GNUC__)
- /* leave anonymous unions enabled */
-#elif defined(__IAR_SYSTEMS_ICC__)
- #pragma language=default
-#else
- #error Not supported compiler type
-#endif
-
-/*!
- * @}
- */ /* end of group Peripheral_access_layer */
-
-
-/* ----------------------------------------------------------------------------
- -- Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK).
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup Bit_Field_Generic_Macros Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK).
- * @{
- */
-
-#if defined(__ARMCC_VERSION)
- #if (__ARMCC_VERSION >= 6010050)
- #pragma clang system_header
- #endif
-#elif defined(__IAR_SYSTEMS_ICC__)
- #pragma system_include
-#endif
-
-/**
- * @brief Mask and left-shift a bit field value for use in a register bit range.
- * @param field Name of the register bit field.
- * @param value Value of the bit field.
- * @return Masked and shifted value.
- */
-#define NXP_VAL2FLD(field, value) (((value) << (field ## _SHIFT)) & (field ## _MASK))
-/**
- * @brief Mask and right-shift a register value to extract a bit field value.
- * @param field Name of the register bit field.
- * @param value Value of the register.
- * @return Masked and shifted bit field value.
- */
-#define NXP_FLD2VAL(field, value) (((value) & (field ## _MASK)) >> (field ## _SHIFT))
-
-/*!
- * @}
- */ /* end of group Bit_Field_Generic_Macros */
-
-
-/* ----------------------------------------------------------------------------
- -- SDK Compatibility
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SDK_Compatibility_Symbols SDK Compatibility
- * @{
- */
-
-/** High Speed SPI (Flexcomm 8) interrupt name */
-#define LSPI_HS_IRQn FLEXCOMM8_IRQn
-
-/*!
- * @brief Get the chip value.
- *
- * @return chip version, 0x0: A0 version chip, 0x1: A1 version chip, 0xFF: invalid version.
- */
-static inline uint32_t Chip_GetVersion(void)
-{
- uint32_t deviceRevision;
-
- deviceRevision = SYSCON->DIEID & SYSCON_DIEID_REV_ID_MASK;
-
- if(0UL == deviceRevision) /* A0 device revision is 0 */
- {
- return 0x0;
- }
- else if(1UL == deviceRevision) /* A1 device revision is 1 */
- {
- return 0x1;
- }
- else
- {
- return 0xFF;
- }
-}
-
-
-/*!
- * @}
- */ /* end of group SDK_Compatibility_Symbols */
-
-
-#endif /* _LPC55S69_CM33_CORE0_H_ */
-
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core0_features.h b/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core0_features.h
deleted file mode 100755
index 23b053769a..0000000000
--- a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core0_features.h
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
-** ###################################################################
-** Version: rev. 1.1, 2019-05-16
-** Build: b200317
-**
-** Abstract:
-** Chip specific module features.
-**
-** Copyright 2016 Freescale Semiconductor, Inc.
-** Copyright 2016-2020 NXP
-** All rights reserved.
-**
-** SPDX-License-Identifier: BSD-3-Clause
-**
-** http: www.nxp.com
-** mail: support@nxp.com
-**
-** Revisions:
-** - rev. 1.0 (2018-08-22)
-** Initial version based on v0.2UM
-** - rev. 1.1 (2019-05-16)
-** Initial A1 version based on v1.3UM
-**
-** ###################################################################
-*/
-
-#ifndef _LPC55S69_cm33_core0_FEATURES_H_
-#define _LPC55S69_cm33_core0_FEATURES_H_
-
-/* SOC module features */
-
-/* @brief CASPER availability on the SoC. */
-#define FSL_FEATURE_SOC_CASPER_COUNT (1)
-/* @brief CRC availability on the SoC. */
-#define FSL_FEATURE_SOC_CRC_COUNT (1)
-/* @brief CTIMER availability on the SoC. */
-#define FSL_FEATURE_SOC_CTIMER_COUNT (5)
-/* @brief DMA availability on the SoC. */
-#define FSL_FEATURE_SOC_DMA_COUNT (2)
-/* @brief FLASH availability on the SoC. */
-#define FSL_FEATURE_SOC_FLASH_COUNT (1)
-/* @brief FLEXCOMM availability on the SoC. */
-#define FSL_FEATURE_SOC_FLEXCOMM_COUNT (9)
-/* @brief GINT availability on the SoC. */
-#define FSL_FEATURE_SOC_GINT_COUNT (2)
-/* @brief GPIO availability on the SoC. */
-#define FSL_FEATURE_SOC_GPIO_COUNT (1)
-/* @brief SECGPIO availability on the SoC. */
-#define FSL_FEATURE_SOC_SECGPIO_COUNT (1)
-/* @brief HASHCRYPT availability on the SoC. */
-#define FSL_FEATURE_SOC_HASHCRYPT_COUNT (1)
-/* @brief I2C availability on the SoC. */
-#define FSL_FEATURE_SOC_I2C_COUNT (8)
-/* @brief I2S availability on the SoC. */
-#define FSL_FEATURE_SOC_I2S_COUNT (8)
-/* @brief INPUTMUX availability on the SoC. */
-#define FSL_FEATURE_SOC_INPUTMUX_COUNT (1)
-/* @brief IOCON availability on the SoC. */
-#define FSL_FEATURE_SOC_IOCON_COUNT (1)
-/* @brief LPADC availability on the SoC. */
-#define FSL_FEATURE_SOC_LPADC_COUNT (1)
-/* @brief MAILBOX availability on the SoC. */
-#define FSL_FEATURE_SOC_MAILBOX_COUNT (1)
-/* @brief MRT availability on the SoC. */
-#define FSL_FEATURE_SOC_MRT_COUNT (1)
-/* @brief OSTIMER availability on the SoC. */
-#define FSL_FEATURE_SOC_OSTIMER_COUNT (1)
-/* @brief PINT availability on the SoC. */
-#define FSL_FEATURE_SOC_PINT_COUNT (1)
-/* @brief SECPINT availability on the SoC. */
-#define FSL_FEATURE_SOC_SECPINT_COUNT (1)
-/* @brief PMC availability on the SoC. */
-#define FSL_FEATURE_SOC_PMC_COUNT (1)
-/* @brief POWERQUAD availability on the SoC. */
-#define FSL_FEATURE_SOC_POWERQUAD_COUNT (1)
-/* @brief PUF availability on the SoC. */
-#define FSL_FEATURE_SOC_PUF_COUNT (1)
-/* @brief LPC_RNG1 availability on the SoC. */
-#define FSL_FEATURE_SOC_LPC_RNG1_COUNT (1)
-/* @brief RTC availability on the SoC. */
-#define FSL_FEATURE_SOC_RTC_COUNT (1)
-/* @brief SCT availability on the SoC. */
-#define FSL_FEATURE_SOC_SCT_COUNT (1)
-/* @brief SDIF availability on the SoC. */
-#define FSL_FEATURE_SOC_SDIF_COUNT (1)
-/* @brief SPI availability on the SoC. */
-#define FSL_FEATURE_SOC_SPI_COUNT (9)
-/* @brief SYSCON availability on the SoC. */
-#define FSL_FEATURE_SOC_SYSCON_COUNT (1)
-/* @brief SYSCTL1 availability on the SoC. */
-#define FSL_FEATURE_SOC_SYSCTL1_COUNT (1)
-/* @brief USART availability on the SoC. */
-#define FSL_FEATURE_SOC_USART_COUNT (8)
-/* @brief USB availability on the SoC. */
-#define FSL_FEATURE_SOC_USB_COUNT (1)
-/* @brief USBFSH availability on the SoC. */
-#define FSL_FEATURE_SOC_USBFSH_COUNT (1)
-/* @brief USBHSD availability on the SoC. */
-#define FSL_FEATURE_SOC_USBHSD_COUNT (1)
-/* @brief USBHSH availability on the SoC. */
-#define FSL_FEATURE_SOC_USBHSH_COUNT (1)
-/* @brief USBPHY availability on the SoC. */
-#define FSL_FEATURE_SOC_USBPHY_COUNT (1)
-/* @brief UTICK availability on the SoC. */
-#define FSL_FEATURE_SOC_UTICK_COUNT (1)
-/* @brief WWDT availability on the SoC. */
-#define FSL_FEATURE_SOC_WWDT_COUNT (1)
-
-/* LPADC module features */
-
-/* @brief FIFO availability on the SoC. */
-#define FSL_FEATURE_LPADC_FIFO_COUNT (2)
-/* @brief Has subsequent trigger priority (bitfield CFG[TPRICTRL]). */
-#define FSL_FEATURE_LPADC_HAS_CFG_SUBSEQUENT_PRIORITY (1)
-/* @brief Has differential mode (bitfield CMDLn[DIFF]). */
-#define FSL_FEATURE_LPADC_HAS_CMDL_DIFF (0)
-/* @brief Has channel scale (bitfield CMDLn[CSCALE]). */
-#define FSL_FEATURE_LPADC_HAS_CMDL_CSCALE (0)
-/* @brief Has conversion type select (bitfield CMDLn[CTYPE]). */
-#define FSL_FEATURE_LPADC_HAS_CMDL_CTYPE (1)
-/* @brief Has conversion resolution select (bitfield CMDLn[MODE]). */
-#define FSL_FEATURE_LPADC_HAS_CMDL_MODE (1)
-/* @brief Has compare function enable (bitfield CMDHn[CMPEN]). */
-#define FSL_FEATURE_LPADC_HAS_CMDH_CMPEN (1)
-/* @brief Has Wait for trigger assertion before execution (bitfield CMDHn[WAIT_TRIG]). */
-#define FSL_FEATURE_LPADC_HAS_CMDH_WAIT_TRIG (1)
-/* @brief Has offset calibration (bitfield CTRL[CALOFS]). */
-#define FSL_FEATURE_LPADC_HAS_CTRL_CALOFS (1)
-/* @brief Has gain calibration (bitfield CTRL[CAL_REQ]). */
-#define FSL_FEATURE_LPADC_HAS_CTRL_CAL_REQ (1)
-/* @brief Has calibration average (bitfield CTRL[CAL_AVGS]). */
-#define FSL_FEATURE_LPADC_HAS_CTRL_CAL_AVGS (1)
-/* @brief Has internal clock (bitfield CFG[ADCKEN]). */
-#define FSL_FEATURE_LPADC_HAS_CFG_ADCKEN (0)
-/* @brief Enable support for low voltage reference on option 1 reference (bitfield CFG[VREF1RNG]). */
-#define FSL_FEATURE_LPADC_HAS_CFG_VREF1RNG (0)
-/* @brief Has calibration (bitfield CFG[CALOFS]). */
-#define FSL_FEATURE_LPADC_HAS_CFG_CALOFS (0)
-/* @brief Has offset trim (register OFSTRIM). */
-#define FSL_FEATURE_LPADC_HAS_OFSTRIM (1)
-/* @brief Has internal temperature sensor. */
-#define FSL_FEATURE_LPADC_HAS_INTERNAL_TEMP_SENSOR (1)
-/* @brief Temperature sensor parameter A (slope). */
-#define FSL_FEATURE_LPADC_TEMP_PARAMETER_A (744.6f)
-/* @brief Temperature sensor parameter B (offset). */
-#define FSL_FEATURE_LPADC_TEMP_PARAMETER_B (313.7f)
-/* @brief Temperature sensor parameter Alpha. */
-#define FSL_FEATURE_LPADC_TEMP_PARAMETER_ALPHA (11.5f)
-
-/* CASPER module features */
-
-/* @brief Base address of the CASPER dedicated RAM */
-#define FSL_FEATURE_CASPER_RAM_BASE_ADDRESS (0x04000000)
-/* @brief Interleaving of the CASPER dedicated RAM */
-#define FSL_FEATURE_CASPER_RAM_IS_INTERLEAVED (1)
-/* @brief CASPER dedicated RAM offset */
-#define FSL_FEATURE_CASPER_RAM_OFFSET (0xE)
-
-/* DMA module features */
-
-/* @brief Number of channels */
-#define FSL_FEATURE_DMA_NUMBER_OF_CHANNELS (23)
-/* @brief Align size of DMA descriptor */
-#define FSL_FEATURE_DMA_DESCRIPTOR_ALIGN_SIZE (512)
-/* @brief DMA head link descriptor table align size */
-#define FSL_FEATURE_DMA_LINK_DESCRIPTOR_ALIGN_SIZE (16U)
-
-/* FLEXCOMM module features */
-
-/* @brief FLEXCOMM0 USART INDEX 0 */
-#define FSL_FEATURE_FLEXCOMM0_USART_INDEX (0)
-/* @brief FLEXCOMM0 SPI INDEX 0 */
-#define FSL_FEATURE_FLEXCOMM0_SPI_INDEX (0)
-/* @brief FLEXCOMM0 I2C INDEX 0 */
-#define FSL_FEATURE_FLEXCOMM0_I2C_INDEX (0)
-/* @brief FLEXCOMM0 I2S INDEX 0 */
-#define FSL_FEATURE_FLEXCOMM0_I2S_INDEX (0)
-/* @brief FLEXCOMM1 USART INDEX 1 */
-#define FSL_FEATURE_FLEXCOMM1_USART_INDEX (1)
-/* @brief FLEXCOMM1 SPI INDEX 1 */
-#define FSL_FEATURE_FLEXCOMM1_SPI_INDEX (1)
-/* @brief FLEXCOMM1 I2C INDEX 1 */
-#define FSL_FEATURE_FLEXCOMM1_I2C_INDEX (1)
-/* @brief FLEXCOMM1 I2S INDEX 1 */
-#define FSL_FEATURE_FLEXCOMM1_I2S_INDEX (1)
-/* @brief FLEXCOMM2 USART INDEX 2 */
-#define FSL_FEATURE_FLEXCOMM2_USART_INDEX (2)
-/* @brief FLEXCOMM2 SPI INDEX 2 */
-#define FSL_FEATURE_FLEXCOMM2_SPI_INDEX (2)
-/* @brief FLEXCOMM2 I2C INDEX 2 */
-#define FSL_FEATURE_FLEXCOMM2_I2C_INDEX (2)
-/* @brief FLEXCOMM2 I2S INDEX 2 */
-#define FSL_FEATURE_FLEXCOMM2_I2S_INDEX (2)
-/* @brief FLEXCOMM3 USART INDEX 3 */
-#define FSL_FEATURE_FLEXCOMM3_USART_INDEX (3)
-/* @brief FLEXCOMM3 SPI INDEX 3 */
-#define FSL_FEATURE_FLEXCOMM3_SPI_INDEX (3)
-/* @brief FLEXCOMM3 I2C INDEX 3 */
-#define FSL_FEATURE_FLEXCOMM3_I2C_INDEX (3)
-/* @brief FLEXCOMM3 I2S INDEX 3 */
-#define FSL_FEATURE_FLEXCOMM3_I2S_INDEX (3)
-/* @brief FLEXCOMM4 USART INDEX 4 */
-#define FSL_FEATURE_FLEXCOMM4_USART_INDEX (4)
-/* @brief FLEXCOMM4 SPI INDEX 4 */
-#define FSL_FEATURE_FLEXCOMM4_SPI_INDEX (4)
-/* @brief FLEXCOMM4 I2C INDEX 4 */
-#define FSL_FEATURE_FLEXCOMM4_I2C_INDEX (4)
-/* @brief FLEXCOMM4 I2S INDEX 4 */
-#define FSL_FEATURE_FLEXCOMM4_I2S_INDEX (4)
-/* @brief FLEXCOMM5 USART INDEX 5 */
-#define FSL_FEATURE_FLEXCOMM5_USART_INDEX (5)
-/* @brief FLEXCOMM5 SPI INDEX 5 */
-#define FSL_FEATURE_FLEXCOMM5_SPI_INDEX (5)
-/* @brief FLEXCOMM5 I2C INDEX 5 */
-#define FSL_FEATURE_FLEXCOMM5_I2C_INDEX (5)
-/* @brief FLEXCOMM5 I2S INDEX 5 */
-#define FSL_FEATURE_FLEXCOMM5_I2S_INDEX (5)
-/* @brief FLEXCOMM6 USART INDEX 6 */
-#define FSL_FEATURE_FLEXCOMM6_USART_INDEX (6)
-/* @brief FLEXCOMM6 SPI INDEX 6 */
-#define FSL_FEATURE_FLEXCOMM6_SPI_INDEX (6)
-/* @brief FLEXCOMM6 I2C INDEX 6 */
-#define FSL_FEATURE_FLEXCOMM6_I2C_INDEX (6)
-/* @brief FLEXCOMM6 I2S INDEX 6 */
-#define FSL_FEATURE_FLEXCOMM6_I2S_INDEX (6)
-/* @brief FLEXCOMM7 USART INDEX 7 */
-#define FSL_FEATURE_FLEXCOMM7_USART_INDEX (7)
-/* @brief FLEXCOMM7 SPI INDEX 7 */
-#define FSL_FEATURE_FLEXCOMM7_SPI_INDEX (7)
-/* @brief FLEXCOMM7 I2C INDEX 7 */
-#define FSL_FEATURE_FLEXCOMM7_I2C_INDEX (7)
-/* @brief FLEXCOMM7 I2S INDEX 7 */
-#define FSL_FEATURE_FLEXCOMM7_I2S_INDEX (7)
-/* @brief FLEXCOMM8 SPI(HS_SPI) INDEX 8 */
-#define FSL_FEATURE_FLEXCOMM8_SPI_INDEX (8)
-/* @brief I2S has DMIC interconnection */
-#define FSL_FEATURE_FLEXCOMM_INSTANCE_I2S_HAS_DMIC_INTERCONNECTIONn(x) (0)
-
-/* HASHCRYPT module features */
-
-/* @brief the address of alias offset */
-#define FSL_FEATURE_HASHCRYPT_ALIAS_OFFSET (0x00000000)
-
-/* I2S module features */
-
-/* @brief I2S support dual channel transfer. */
-#define FSL_FEATURE_I2S_SUPPORT_SECONDARY_CHANNEL (0)
-/* @brief I2S has DMIC interconnection. */
-#define FSL_FEATURE_FLEXCOMM_I2S_HAS_DMIC_INTERCONNECTION (0)
-
-/* IOCON module features */
-
-/* @brief Func bit field width */
-#define FSL_FEATURE_IOCON_FUNC_FIELD_WIDTH (4)
-
-/* MAILBOX module features */
-
-/* @brief Mailbox side for current core */
-#define FSL_FEATURE_MAILBOX_SIDE_A (1)
-
-/* MRT module features */
-
-/* @brief number of channels. */
-#define FSL_FEATURE_MRT_NUMBER_OF_CHANNELS (4)
-
-/* PINT module features */
-
-/* @brief Number of connected outputs */
-#define FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS (8)
-
-/* PLU module features */
-
-/* @brief Has WAKEINT_CTRL register. */
-#define FSL_FEATURE_PLU_HAS_WAKEINT_CTRL_REG (1)
-
-/* POWERLIB module features */
-
-/* @brief Powerlib API is different with other LPC series devices. */
-#define FSL_FEATURE_POWERLIB_EXTEND (1)
-
-/* POWERQUAD module features */
-
-/* @brief Sine and Cossine fix errata */
-#define FSL_FEATURE_POWERQUAD_SIN_COS_FIX_ERRATA (1)
-
-/* PUF module features */
-
-/* @brief Number of PUF key slots available on device. */
-#define FSL_FEATURE_PUF_HAS_KEYSLOTS (4)
-/* @brief the shift status value */
-#define FSL_FEATURE_PUF_HAS_SHIFT_STATUS (1)
-
-/* SCT module features */
-
-/* @brief Number of events */
-#define FSL_FEATURE_SCT_NUMBER_OF_EVENTS (16)
-/* @brief Number of states */
-#define FSL_FEATURE_SCT_NUMBER_OF_STATES (32)
-/* @brief Number of match capture */
-#define FSL_FEATURE_SCT_NUMBER_OF_MATCH_CAPTURE (16)
-/* @brief Number of outputs */
-#define FSL_FEATURE_SCT_NUMBER_OF_OUTPUTS (10)
-
-/* SDIF module features */
-
-/* @brief FIFO depth, every location is a WORD */
-#define FSL_FEATURE_SDIF_FIFO_DEPTH_64_32BITS (64)
-/* @brief Max DMA buffer size */
-#define FSL_FEATURE_SDIF_INTERNAL_DMA_MAX_BUFFER_SIZE (4096)
-/* @brief Max source clock in HZ */
-#define FSL_FEATURE_SDIF_MAX_SOURCE_CLOCK (52000000)
-/* @brief support 2 cards */
-#define FSL_FEATURE_SDIF_ONE_INSTANCE_SUPPORT_TWO_CARD (1)
-
-/* SECPINT module features */
-
-/* @brief Number of connected outputs */
-#define FSL_FEATURE_SECPINT_NUMBER_OF_CONNECTED_OUTPUTS (2)
-
-/* SYSCON module features */
-
-/* @brief Flash page size in bytes */
-#define FSL_FEATURE_SYSCON_FLASH_PAGE_SIZE_BYTES (512)
-/* @brief Flash sector size in bytes */
-#define FSL_FEATURE_SYSCON_FLASH_SECTOR_SIZE_BYTES (32768)
-/* @brief Flash size in bytes */
-#define FSL_FEATURE_SYSCON_FLASH_SIZE_BYTES (622592)
-/* @brief Has Power Down mode */
-#define FSL_FEATURE_SYSCON_HAS_POWERDOWN_MODE (1)
-/* @brief CCM_ANALOG availability on the SoC. */
-#define FSL_FEATURE_SOC_CCM_ANALOG_COUNT (1)
-/* @brief Starter register discontinuous. */
-#define FSL_FEATURE_SYSCON_STARTER_DISCONTINUOUS (1)
-
-/* USB module features */
-
-/* @brief Size of the USB dedicated RAM */
-#define FSL_FEATURE_USB_USB_RAM (0x00004000)
-/* @brief Base address of the USB dedicated RAM */
-#define FSL_FEATURE_USB_USB_RAM_BASE_ADDRESS (0x40100000)
-/* @brief USB version */
-#define FSL_FEATURE_USB_VERSION (200)
-/* @brief Number of the endpoint in USB FS */
-#define FSL_FEATURE_USB_EP_NUM (5)
-
-/* USBFSH module features */
-
-/* @brief Size of the USB dedicated RAM */
-#define FSL_FEATURE_USBFSH_USB_RAM (0x00004000)
-/* @brief Base address of the USB dedicated RAM */
-#define FSL_FEATURE_USBFSH_USB_RAM_BASE_ADDRESS (0x40100000)
-/* @brief USBFSH version */
-#define FSL_FEATURE_USBFSH_VERSION (200)
-
-/* USBHSD module features */
-
-/* @brief Size of the USB dedicated RAM */
-#define FSL_FEATURE_USBHSD_USB_RAM (0x00004000)
-/* @brief Base address of the USB dedicated RAM */
-#define FSL_FEATURE_USBHSD_USB_RAM_BASE_ADDRESS (0x40100000)
-/* @brief USBHSD version */
-#define FSL_FEATURE_USBHSD_VERSION (300)
-/* @brief Number of the endpoint in USB HS */
-#define FSL_FEATURE_USBHSD_EP_NUM (6)
-
-/* USBHSH module features */
-
-/* @brief Size of the USB dedicated RAM */
-#define FSL_FEATURE_USBHSH_USB_RAM (0x00004000)
-/* @brief Base address of the USB dedicated RAM */
-#define FSL_FEATURE_USBHSH_USB_RAM_BASE_ADDRESS (0x40100000)
-/* @brief USBHSH version */
-#define FSL_FEATURE_USBHSH_VERSION (300)
-
-/* UTICK module features */
-
-/* @brief UTICK does not support PD configure. */
-#define FSL_FEATURE_UTICK_HAS_NO_PDCFG (1)
-
-/* WWDT module features */
-
-/* @brief WWDT does not support oscillator lock. */
-#define FSL_FEATURE_WWDT_HAS_NO_OSCILLATOR_LOCK (1)
-/* @brief WWDT does not support power down configure */
-#define FSL_FEATURE_WWDT_HAS_NO_PDCFG (1)
-
-#endif /* _LPC55S69_cm33_core0_FEATURES_H_ */
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core1.h b/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core1.h
deleted file mode 100755
index ffc471a1a8..0000000000
--- a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core1.h
+++ /dev/null
@@ -1,27477 +0,0 @@
-/*
-** ###################################################################
-** Processors: LPC55S69JBD100_cm33_core1
-** LPC55S69JBD64_cm33_core1
-** LPC55S69JEV98_cm33_core1
-**
-** Compilers: GNU C Compiler
-** IAR ANSI C/C++ Compiler for ARM
-** Keil ARM C/C++ Compiler
-** MCUXpresso Compiler
-**
-** Reference manual: LPC55S6x/LPC55S2x/LPC552x User manual(UM11126) Rev.1.3 16 May 2019
-** Version: rev. 1.1, 2019-05-16
-** Build: b200311
-**
-** Abstract:
-** CMSIS Peripheral Access Layer for LPC55S69_cm33_core1
-**
-** Copyright 1997-2016 Freescale Semiconductor, Inc.
-** Copyright 2016-2020 NXP
-** All rights reserved.
-**
-** SPDX-License-Identifier: BSD-3-Clause
-**
-** http: www.nxp.com
-** mail: support@nxp.com
-**
-** Revisions:
-** - rev. 1.0 (2018-08-22)
-** Initial version based on v0.2UM
-** - rev. 1.1 (2019-05-16)
-** Initial A1 version based on v1.3UM
-**
-** ###################################################################
-*/
-
-/*!
- * @file LPC55S69_cm33_core1.h
- * @version 1.1
- * @date 2019-05-16
- * @brief CMSIS Peripheral Access Layer for LPC55S69_cm33_core1
- *
- * CMSIS Peripheral Access Layer for LPC55S69_cm33_core1
- */
-
-#ifndef _LPC55S69_CM33_CORE1_H_
-#define _LPC55S69_CM33_CORE1_H_ /**< Symbol preventing repeated inclusion */
-
-/** Memory map major version (memory maps with equal major version number are
- * compatible) */
-#define MCU_MEM_MAP_VERSION 0x0100U
-/** Memory map minor version */
-#define MCU_MEM_MAP_VERSION_MINOR 0x0001U
-
-
-/* ----------------------------------------------------------------------------
- -- Interrupt vector numbers
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup Interrupt_vector_numbers Interrupt vector numbers
- * @{
- */
-
-/** Interrupt Number Definitions */
-#define NUMBER_OF_INT_VECTORS 76 /**< Number of interrupts in the Vector table */
-
-typedef enum IRQn {
- /* Auxiliary constants */
- NotAvail_IRQn = -128, /**< Not available device specific interrupt */
-
- /* Core interrupts */
- NonMaskableInt_IRQn = -14, /**< Non Maskable Interrupt */
- HardFault_IRQn = -13, /**< Cortex-M33 SV Hard Fault Interrupt */
- MemoryManagement_IRQn = -12, /**< Cortex-M33 Memory Management Interrupt */
- BusFault_IRQn = -11, /**< Cortex-M33 Bus Fault Interrupt */
- UsageFault_IRQn = -10, /**< Cortex-M33 Usage Fault Interrupt */
- SecureFault_IRQn = -9, /**< Cortex-M33 Secure Fault Interrupt */
- SVCall_IRQn = -5, /**< Cortex-M33 SV Call Interrupt */
- DebugMonitor_IRQn = -4, /**< Cortex-M33 Debug Monitor Interrupt */
- PendSV_IRQn = -2, /**< Cortex-M33 Pend SV Interrupt */
- SysTick_IRQn = -1, /**< Cortex-M33 System Tick Interrupt */
-
- /* Device specific interrupts */
- WDT_BOD_IRQn = 0, /**< Windowed watchdog timer, Brownout detect, Flash interrupt */
- DMA0_IRQn = 1, /**< DMA0 controller */
- GINT0_IRQn = 2, /**< GPIO group 0 */
- GINT1_IRQn = 3, /**< GPIO group 1 */
- PIN_INT0_IRQn = 4, /**< Pin interrupt 0 or pattern match engine slice 0 */
- PIN_INT1_IRQn = 5, /**< Pin interrupt 1or pattern match engine slice 1 */
- PIN_INT2_IRQn = 6, /**< Pin interrupt 2 or pattern match engine slice 2 */
- PIN_INT3_IRQn = 7, /**< Pin interrupt 3 or pattern match engine slice 3 */
- UTICK0_IRQn = 8, /**< Micro-tick Timer */
- MRT0_IRQn = 9, /**< Multi-rate timer */
- CTIMER0_IRQn = 10, /**< Standard counter/timer CTIMER0 */
- CTIMER1_IRQn = 11, /**< Standard counter/timer CTIMER1 */
- SCT0_IRQn = 12, /**< SCTimer/PWM */
- CTIMER3_IRQn = 13, /**< Standard counter/timer CTIMER3 */
- FLEXCOMM0_IRQn = 14, /**< Flexcomm Interface 0 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM1_IRQn = 15, /**< Flexcomm Interface 1 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM2_IRQn = 16, /**< Flexcomm Interface 2 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM3_IRQn = 17, /**< Flexcomm Interface 3 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM4_IRQn = 18, /**< Flexcomm Interface 4 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM5_IRQn = 19, /**< Flexcomm Interface 5 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM6_IRQn = 20, /**< Flexcomm Interface 6 (USART, SPI, I2C, I2S, FLEXCOMM) */
- FLEXCOMM7_IRQn = 21, /**< Flexcomm Interface 7 (USART, SPI, I2C, I2S, FLEXCOMM) */
- ADC0_IRQn = 22, /**< ADC0 */
- Reserved39_IRQn = 23, /**< Reserved interrupt */
- ACMP_IRQn = 24, /**< ACMP interrupts */
- Reserved41_IRQn = 25, /**< Reserved interrupt */
- Reserved42_IRQn = 26, /**< Reserved interrupt */
- USB0_NEEDCLK_IRQn = 27, /**< USB Activity Wake-up Interrupt */
- USB0_IRQn = 28, /**< USB device */
- RTC_IRQn = 29, /**< RTC alarm and wake-up interrupts */
- Reserved46_IRQn = 30, /**< Reserved interrupt */
- MAILBOX_IRQn = 31, /**< WAKEUP,Mailbox interrupt (present on selected devices) */
- PIN_INT4_IRQn = 32, /**< Pin interrupt 4 or pattern match engine slice 4 int */
- PIN_INT5_IRQn = 33, /**< Pin interrupt 5 or pattern match engine slice 5 int */
- PIN_INT6_IRQn = 34, /**< Pin interrupt 6 or pattern match engine slice 6 int */
- PIN_INT7_IRQn = 35, /**< Pin interrupt 7 or pattern match engine slice 7 int */
- CTIMER2_IRQn = 36, /**< Standard counter/timer CTIMER2 */
- CTIMER4_IRQn = 37, /**< Standard counter/timer CTIMER4 */
- OS_EVENT_IRQn = 38, /**< OSEVTIMER0 and OSEVTIMER0_WAKEUP interrupts */
- Reserved55_IRQn = 39, /**< Reserved interrupt */
- Reserved56_IRQn = 40, /**< Reserved interrupt */
- Reserved57_IRQn = 41, /**< Reserved interrupt */
- SDIO_IRQn = 42, /**< SD/MMC */
- Reserved59_IRQn = 43, /**< Reserved interrupt */
- Reserved60_IRQn = 44, /**< Reserved interrupt */
- Reserved61_IRQn = 45, /**< Reserved interrupt */
- USB1_PHY_IRQn = 46, /**< USB1_PHY */
- USB1_IRQn = 47, /**< USB1 interrupt */
- USB1_NEEDCLK_IRQn = 48, /**< USB1 activity */
- SEC_HYPERVISOR_CALL_IRQn = 49, /**< SEC_HYPERVISOR_CALL interrupt */
- SEC_GPIO_INT0_IRQ0_IRQn = 50, /**< SEC_GPIO_INT0_IRQ0 interrupt */
- SEC_GPIO_INT0_IRQ1_IRQn = 51, /**< SEC_GPIO_INT0_IRQ1 interrupt */
- PLU_IRQn = 52, /**< PLU interrupt */
- SEC_VIO_IRQn = 53, /**< SEC_VIO interrupt */
- HASHCRYPT_IRQn = 54, /**< HASHCRYPT interrupt */
- CASER_IRQn = 55, /**< CASPER interrupt */
- PUF_IRQn = 56, /**< PUF interrupt */
- PQ_IRQn = 57, /**< PQ interrupt */
- DMA1_IRQn = 58, /**< DMA1 interrupt */
- FLEXCOMM8_IRQn = 59 /**< Flexcomm Interface 8 (SPI, , FLEXCOMM) */
-} IRQn_Type;
-
-/*!
- * @}
- */ /* end of group Interrupt_vector_numbers */
-
-
-/* ----------------------------------------------------------------------------
- -- Cortex M33 Core Configuration
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup Cortex_Core_Configuration Cortex M33 Core Configuration
- * @{
- */
-
-#define __MPU_PRESENT 0 /**< Defines if an MPU is present or not */
-#define __NVIC_PRIO_BITS 3 /**< Number of priority bits implemented in the NVIC */
-#define __Vendor_SysTickConfig 0 /**< Vendor specific implementation of SysTickConfig is defined */
-#define __FPU_PRESENT 0 /**< Defines if an FPU is present or not */
-#define __DSP_PRESENT 0 /**< Defines if Armv8-M Mainline core supports DSP instructions */
-#define __SAUREGION_PRESENT 0 /**< Defines if an SAU is present or not */
-
-#include "core_cm33.h" /* Core Peripheral Access Layer */
-#include "system_LPC55S69_cm33_core1.h" /* Device specific configuration file */
-
-/*!
- * @}
- */ /* end of group Cortex_Core_Configuration */
-
-
-/* ----------------------------------------------------------------------------
- -- Mapping Information
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup Mapping_Information Mapping Information
- * @{
- */
-
-/** Mapping Information */
-/*!
- * @addtogroup dma_request
- * @{
- */
-
-/*******************************************************************************
- * Definitions
- ******************************************************************************/
-
-/*!
- * @brief Structure for the DMA hardware request
- *
- * Defines the structure for the DMA hardware request collections. The user can configure the
- * hardware request to trigger the DMA transfer accordingly. The index
- * of the hardware request varies according to the to SoC.
- */
-typedef enum _dma_request_source
-{
- kDma0RequestHashCrypt = 0U, /**< HashCrypt */
- kDma1RequestHashCrypt = 0U, /**< HashCrypt */
- kDma0RequestNoDMARequest1 = 1U, /**< No DMA request 1 */
- kDma1RequestNoDMARequest1 = 1U, /**< No DMA request 1 */
- kDma0RequestFlexcomm8Rx = 2U, /**< Flexcomm Interface 8 RX */
- kDma1RequestFlexcomm8Rx = 2U, /**< Flexcomm Interface 8 RX */
- kDma0RequestFlexcomm8Tx = 3U, /**< Flexcomm Interface 8 TX */
- kDma1RequestFlexcomm8Tx = 3U, /**< Flexcomm Interface 8 TX */
- kDma0RequestFlexcomm0Rx = 4U, /**< Flexcomm Interface 0 RX/I2C Slave */
- kDma1RequestFlexcomm0Rx = 4U, /**< Flexcomm Interface 0 RX/I2C Slave */
- kDma0RequestFlexcomm0Tx = 5U, /**< Flexcomm Interface 0 TX/I2C Master */
- kDma1RequestFlexcomm0Tx = 5U, /**< Flexcomm Interface 0 TX/I2C Master */
- kDma0RequestFlexcomm1Rx = 6U, /**< Flexcomm Interface 1 RX/I2C Slave */
- kDma1RequestFlexcomm1Rx = 6U, /**< Flexcomm Interface 1 RX/I2C Slave */
- kDma0RequestFlexcomm1Tx = 7U, /**< Flexcomm Interface 1 TX/I2C Master */
- kDma1RequestFlexcomm1Tx = 7U, /**< Flexcomm Interface 1 TX/I2C Master */
- kDma0RequestFlexcomm3Rx = 8U, /**< Flexcomm Interface 3 RX/I2C Slave */
- kDma1RequestFlexcomm3Rx = 8U, /**< Flexcomm Interface 3 RX/I2C Slave */
- kDma0RequestFlexcomm3Tx = 9U, /**< Flexcomm Interface 3 TX/I2C Master */
- kDma1RequestFlexcomm3Tx = 9U, /**< Flexcomm Interface 3 TX/I2C Master */
- kDma0RequestFlexcomm2Rx = 10U, /**< Flexcomm Interface 2 RX/I2C Slave */
- kDma0RequestFlexcomm2Tx = 11U, /**< Flexcomm Interface 2 TX/I2C Master */
- kDma0RequestFlexcomm4Rx = 12U, /**< Flexcomm Interface 4 RX/I2C Slave */
- kDma0RequestFlexcomm4Tx = 13U, /**< Flexcomm Interface 4 TX/I2C Master */
- kDma0RequestFlexcomm5Rx = 14U, /**< Flexcomm Interface 5 RX/I2C Slave */
- kDma0RequestFlexcomm5Tx = 15U, /**< Flexcomm Interface 5 TX/I2C Master */
- kDma0RequestFlexcomm6Rx = 16U, /**< Flexcomm Interface 6 RX/I2C Slave */
- kDma0RequestFlexcomm6Tx = 17U, /**< Flexcomm Interface 6 TX/I2C Master */
- kDma0RequestFlexcomm7Rx = 18U, /**< Flexcomm Interface 7 RX/I2C Slave */
- kDma0RequestFlexcomm7Tx = 19U, /**< Flexcomm Interface 7 TX/I2C Master */
- kDma0RequestNoDMARequest20 = 20U, /**< No DMA request 20 */
- kDma0RequestADC0FIFO0 = 21U, /**< ADC0 FIFO 0 */
- kDma0RequestADC0FIFO1 = 22U, /**< ADC0 FIFO 1 */
-} dma_request_source_t;
-
-/* @} */
-
-
-/*!
- * @}
- */ /* end of group Mapping_Information */
-
-
-/* ----------------------------------------------------------------------------
- -- Device Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup Peripheral_access_layer Device Peripheral Access Layer
- * @{
- */
-
-
-/*
-** Start of section using anonymous unions
-*/
-
-#if defined(__ARMCC_VERSION)
- #if (__ARMCC_VERSION >= 6010050)
- #pragma clang diagnostic push
- #else
- #pragma push
- #pragma anon_unions
- #endif
-#elif defined(__GNUC__)
- /* anonymous unions are enabled by default */
-#elif defined(__IAR_SYSTEMS_ICC__)
- #pragma language=extended
-#else
- #error Not supported compiler type
-#endif
-
-/* ----------------------------------------------------------------------------
- -- ADC Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup ADC_Peripheral_Access_Layer ADC Peripheral Access Layer
- * @{
- */
-
-/** ADC - Register Layout Typedef */
-typedef struct {
- __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */
- __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */
- uint8_t RESERVED_0[8];
- __IO uint32_t CTRL; /**< ADC Control Register, offset: 0x10 */
- __IO uint32_t STAT; /**< ADC Status Register, offset: 0x14 */
- __IO uint32_t IE; /**< Interrupt Enable Register, offset: 0x18 */
- __IO uint32_t DE; /**< DMA Enable Register, offset: 0x1C */
- __IO uint32_t CFG; /**< ADC Configuration Register, offset: 0x20 */
- __IO uint32_t PAUSE; /**< ADC Pause Register, offset: 0x24 */
- uint8_t RESERVED_1[12];
- __O uint32_t SWTRIG; /**< Software Trigger Register, offset: 0x34 */
- __IO uint32_t TSTAT; /**< Trigger Status Register, offset: 0x38 */
- uint8_t RESERVED_2[4];
- __IO uint32_t OFSTRIM; /**< ADC Offset Trim Register, offset: 0x40 */
- uint8_t RESERVED_3[92];
- __IO uint32_t TCTRL[16]; /**< Trigger Control Register, array offset: 0xA0, array step: 0x4 */
- __IO uint32_t FCTRL[2]; /**< FIFO Control Register, array offset: 0xE0, array step: 0x4 */
- uint8_t RESERVED_4[8];
- __I uint32_t GCC[2]; /**< Gain Calibration Control, array offset: 0xF0, array step: 0x4 */
- __IO uint32_t GCR[2]; /**< Gain Calculation Result, array offset: 0xF8, array step: 0x4 */
- struct { /* offset: 0x100, array step: 0x8 */
- __IO uint32_t CMDL; /**< ADC Command Low Buffer Register, array offset: 0x100, array step: 0x8 */
- __IO uint32_t CMDH; /**< ADC Command High Buffer Register, array offset: 0x104, array step: 0x8 */
- } CMD[15];
- uint8_t RESERVED_5[136];
- __IO uint32_t CV[4]; /**< Compare Value Register, array offset: 0x200, array step: 0x4 */
- uint8_t RESERVED_6[240];
- __I uint32_t RESFIFO[2]; /**< ADC Data Result FIFO Register, array offset: 0x300, array step: 0x4 */
- uint8_t RESERVED_7[248];
- __IO uint32_t CAL_GAR[33]; /**< Calibration General A-Side Registers, array offset: 0x400, array step: 0x4 */
- uint8_t RESERVED_8[124];
- __IO uint32_t CAL_GBR[33]; /**< Calibration General B-Side Registers, array offset: 0x500, array step: 0x4 */
- uint8_t RESERVED_9[2680];
- __IO uint32_t TST; /**< ADC Test Register, offset: 0xFFC */
-} ADC_Type;
-
-/* ----------------------------------------------------------------------------
- -- ADC Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup ADC_Register_Masks ADC Register Masks
- * @{
- */
-
-/*! @name VERID - Version ID Register */
-/*! @{ */
-#define ADC_VERID_RES_MASK (0x1U)
-#define ADC_VERID_RES_SHIFT (0U)
-/*! RES - Resolution
- * 0b0..Up to 13-bit differential/12-bit single ended resolution supported.
- * 0b1..Up to 16-bit differential/16-bit single ended resolution supported.
- */
-#define ADC_VERID_RES(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_RES_SHIFT)) & ADC_VERID_RES_MASK)
-#define ADC_VERID_DIFFEN_MASK (0x2U)
-#define ADC_VERID_DIFFEN_SHIFT (1U)
-/*! DIFFEN - Differential Supported
- * 0b0..Differential operation not supported.
- * 0b1..Differential operation supported. CMDLa[CTYPE] controls fields implemented.
- */
-#define ADC_VERID_DIFFEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_DIFFEN_SHIFT)) & ADC_VERID_DIFFEN_MASK)
-#define ADC_VERID_MVI_MASK (0x8U)
-#define ADC_VERID_MVI_SHIFT (3U)
-/*! MVI - Multi Vref Implemented
- * 0b0..Single voltage reference high (VREFH) input supported.
- * 0b1..Multiple voltage reference high (VREFH) inputs supported.
- */
-#define ADC_VERID_MVI(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_MVI_SHIFT)) & ADC_VERID_MVI_MASK)
-#define ADC_VERID_CSW_MASK (0x70U)
-#define ADC_VERID_CSW_SHIFT (4U)
-/*! CSW - Channel Scale Width
- * 0b000..Channel scaling not supported.
- * 0b001..Channel scaling supported. 1-bit CSCALE control field.
- * 0b110..Channel scaling supported. 6-bit CSCALE control field.
- */
-#define ADC_VERID_CSW(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_CSW_SHIFT)) & ADC_VERID_CSW_MASK)
-#define ADC_VERID_VR1RNGI_MASK (0x100U)
-#define ADC_VERID_VR1RNGI_SHIFT (8U)
-/*! VR1RNGI - Voltage Reference 1 Range Control Bit Implemented
- * 0b0..Range control not required. CFG[VREF1RNG] is not implemented.
- * 0b1..Range control required. CFG[VREF1RNG] is implemented.
- */
-#define ADC_VERID_VR1RNGI(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_VR1RNGI_SHIFT)) & ADC_VERID_VR1RNGI_MASK)
-#define ADC_VERID_IADCKI_MASK (0x200U)
-#define ADC_VERID_IADCKI_SHIFT (9U)
-/*! IADCKI - Internal ADC Clock implemented
- * 0b0..Internal clock source not implemented.
- * 0b1..Internal clock source (and CFG[ADCKEN]) implemented.
- */
-#define ADC_VERID_IADCKI(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_IADCKI_SHIFT)) & ADC_VERID_IADCKI_MASK)
-#define ADC_VERID_CALOFSI_MASK (0x400U)
-#define ADC_VERID_CALOFSI_SHIFT (10U)
-/*! CALOFSI - Calibration Function Implemented
- * 0b0..Calibration Not Implemented.
- * 0b1..Calibration Implemented.
- */
-#define ADC_VERID_CALOFSI(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_CALOFSI_SHIFT)) & ADC_VERID_CALOFSI_MASK)
-#define ADC_VERID_NUM_SEC_MASK (0x800U)
-#define ADC_VERID_NUM_SEC_SHIFT (11U)
-/*! NUM_SEC - Number of Single Ended Outputs Supported
- * 0b0..This design supports one single ended conversion at a time.
- * 0b1..This design supports two simultanious single ended conversions.
- */
-#define ADC_VERID_NUM_SEC(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_NUM_SEC_SHIFT)) & ADC_VERID_NUM_SEC_MASK)
-#define ADC_VERID_NUM_FIFO_MASK (0x7000U)
-#define ADC_VERID_NUM_FIFO_SHIFT (12U)
-/*! NUM_FIFO - Number of FIFOs
- * 0b000..N/A
- * 0b001..This design supports one result FIFO.
- * 0b010..This design supports two result FIFOs.
- * 0b011..This design supports three result FIFOs.
- * 0b100..This design supports four result FIFOs.
- */
-#define ADC_VERID_NUM_FIFO(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_NUM_FIFO_SHIFT)) & ADC_VERID_NUM_FIFO_MASK)
-#define ADC_VERID_MINOR_MASK (0xFF0000U)
-#define ADC_VERID_MINOR_SHIFT (16U)
-/*! MINOR - Minor Version Number
- */
-#define ADC_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_MINOR_SHIFT)) & ADC_VERID_MINOR_MASK)
-#define ADC_VERID_MAJOR_MASK (0xFF000000U)
-#define ADC_VERID_MAJOR_SHIFT (24U)
-/*! MAJOR - Major Version Number
- */
-#define ADC_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_MAJOR_SHIFT)) & ADC_VERID_MAJOR_MASK)
-/*! @} */
-
-/*! @name PARAM - Parameter Register */
-/*! @{ */
-#define ADC_PARAM_TRIG_NUM_MASK (0xFFU)
-#define ADC_PARAM_TRIG_NUM_SHIFT (0U)
-/*! TRIG_NUM - Trigger Number
- */
-#define ADC_PARAM_TRIG_NUM(x) (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_TRIG_NUM_SHIFT)) & ADC_PARAM_TRIG_NUM_MASK)
-#define ADC_PARAM_FIFOSIZE_MASK (0xFF00U)
-#define ADC_PARAM_FIFOSIZE_SHIFT (8U)
-/*! FIFOSIZE - Result FIFO Depth
- * 0b00000001..Result FIFO depth = 1 dataword.
- * 0b00000100..Result FIFO depth = 4 datawords.
- * 0b00001000..Result FIFO depth = 8 datawords.
- * 0b00010000..Result FIFO depth = 16 datawords.
- * 0b00100000..Result FIFO depth = 32 datawords.
- * 0b01000000..Result FIFO depth = 64 datawords.
- */
-#define ADC_PARAM_FIFOSIZE(x) (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_FIFOSIZE_SHIFT)) & ADC_PARAM_FIFOSIZE_MASK)
-#define ADC_PARAM_CV_NUM_MASK (0xFF0000U)
-#define ADC_PARAM_CV_NUM_SHIFT (16U)
-/*! CV_NUM - Compare Value Number
- */
-#define ADC_PARAM_CV_NUM(x) (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_CV_NUM_SHIFT)) & ADC_PARAM_CV_NUM_MASK)
-#define ADC_PARAM_CMD_NUM_MASK (0xFF000000U)
-#define ADC_PARAM_CMD_NUM_SHIFT (24U)
-/*! CMD_NUM - Command Buffer Number
- */
-#define ADC_PARAM_CMD_NUM(x) (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_CMD_NUM_SHIFT)) & ADC_PARAM_CMD_NUM_MASK)
-/*! @} */
-
-/*! @name CTRL - ADC Control Register */
-/*! @{ */
-#define ADC_CTRL_ADCEN_MASK (0x1U)
-#define ADC_CTRL_ADCEN_SHIFT (0U)
-/*! ADCEN - ADC Enable
- * 0b0..ADC is disabled.
- * 0b1..ADC is enabled.
- */
-#define ADC_CTRL_ADCEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_ADCEN_SHIFT)) & ADC_CTRL_ADCEN_MASK)
-#define ADC_CTRL_RST_MASK (0x2U)
-#define ADC_CTRL_RST_SHIFT (1U)
-/*! RST - Software Reset
- * 0b0..ADC logic is not reset.
- * 0b1..ADC logic is reset.
- */
-#define ADC_CTRL_RST(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_RST_SHIFT)) & ADC_CTRL_RST_MASK)
-#define ADC_CTRL_DOZEN_MASK (0x4U)
-#define ADC_CTRL_DOZEN_SHIFT (2U)
-/*! DOZEN - Doze Enable
- * 0b0..ADC is enabled in Doze mode.
- * 0b1..ADC is disabled in Doze mode.
- */
-#define ADC_CTRL_DOZEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_DOZEN_SHIFT)) & ADC_CTRL_DOZEN_MASK)
-#define ADC_CTRL_CAL_REQ_MASK (0x8U)
-#define ADC_CTRL_CAL_REQ_SHIFT (3U)
-/*! CAL_REQ - Auto-Calibration Request
- * 0b0..No request for auto-calibration has been made.
- * 0b1..A request for auto-calibration has been made
- */
-#define ADC_CTRL_CAL_REQ(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_CAL_REQ_SHIFT)) & ADC_CTRL_CAL_REQ_MASK)
-#define ADC_CTRL_CALOFS_MASK (0x10U)
-#define ADC_CTRL_CALOFS_SHIFT (4U)
-/*! CALOFS - Configure for offset calibration function
- * 0b0..Calibration function disabled
- * 0b1..Request for offset calibration function
- */
-#define ADC_CTRL_CALOFS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_CALOFS_SHIFT)) & ADC_CTRL_CALOFS_MASK)
-#define ADC_CTRL_RSTFIFO0_MASK (0x100U)
-#define ADC_CTRL_RSTFIFO0_SHIFT (8U)
-/*! RSTFIFO0 - Reset FIFO 0
- * 0b0..No effect.
- * 0b1..FIFO 0 is reset.
- */
-#define ADC_CTRL_RSTFIFO0(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_RSTFIFO0_SHIFT)) & ADC_CTRL_RSTFIFO0_MASK)
-#define ADC_CTRL_RSTFIFO1_MASK (0x200U)
-#define ADC_CTRL_RSTFIFO1_SHIFT (9U)
-/*! RSTFIFO1 - Reset FIFO 1
- * 0b0..No effect.
- * 0b1..FIFO 1 is reset.
- */
-#define ADC_CTRL_RSTFIFO1(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_RSTFIFO1_SHIFT)) & ADC_CTRL_RSTFIFO1_MASK)
-#define ADC_CTRL_CAL_AVGS_MASK (0x70000U)
-#define ADC_CTRL_CAL_AVGS_SHIFT (16U)
-/*! CAL_AVGS - Auto-Calibration Averages
- * 0b000..Single conversion.
- * 0b001..2 conversions averaged.
- * 0b010..4 conversions averaged.
- * 0b011..8 conversions averaged.
- * 0b100..16 conversions averaged.
- * 0b101..32 conversions averaged.
- * 0b110..64 conversions averaged.
- * 0b111..128 conversions averaged.
- */
-#define ADC_CTRL_CAL_AVGS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_CAL_AVGS_SHIFT)) & ADC_CTRL_CAL_AVGS_MASK)
-/*! @} */
-
-/*! @name STAT - ADC Status Register */
-/*! @{ */
-#define ADC_STAT_RDY0_MASK (0x1U)
-#define ADC_STAT_RDY0_SHIFT (0U)
-/*! RDY0 - Result FIFO 0 Ready Flag
- * 0b0..Result FIFO 0 data level not above watermark level.
- * 0b1..Result FIFO 0 holding data above watermark level.
- */
-#define ADC_STAT_RDY0(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_RDY0_SHIFT)) & ADC_STAT_RDY0_MASK)
-#define ADC_STAT_FOF0_MASK (0x2U)
-#define ADC_STAT_FOF0_SHIFT (1U)
-/*! FOF0 - Result FIFO 0 Overflow Flag
- * 0b0..No result FIFO 0 overflow has occurred since the last time the flag was cleared.
- * 0b1..At least one result FIFO 0 overflow has occurred since the last time the flag was cleared.
- */
-#define ADC_STAT_FOF0(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_FOF0_SHIFT)) & ADC_STAT_FOF0_MASK)
-#define ADC_STAT_RDY1_MASK (0x4U)
-#define ADC_STAT_RDY1_SHIFT (2U)
-/*! RDY1 - Result FIFO1 Ready Flag
- * 0b0..Result FIFO1 data level not above watermark level.
- * 0b1..Result FIFO1 holding data above watermark level.
- */
-#define ADC_STAT_RDY1(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_RDY1_SHIFT)) & ADC_STAT_RDY1_MASK)
-#define ADC_STAT_FOF1_MASK (0x8U)
-#define ADC_STAT_FOF1_SHIFT (3U)
-/*! FOF1 - Result FIFO1 Overflow Flag
- * 0b0..No result FIFO1 overflow has occurred since the last time the flag was cleared.
- * 0b1..At least one result FIFO1 overflow has occurred since the last time the flag was cleared.
- */
-#define ADC_STAT_FOF1(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_FOF1_SHIFT)) & ADC_STAT_FOF1_MASK)
-#define ADC_STAT_TEXC_INT_MASK (0x100U)
-#define ADC_STAT_TEXC_INT_SHIFT (8U)
-/*! TEXC_INT - Interrupt Flag For High Priority Trigger Exception
- * 0b0..No trigger exceptions have occurred.
- * 0b1..A trigger exception has occurred and is pending acknowledgement.
- */
-#define ADC_STAT_TEXC_INT(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_TEXC_INT_SHIFT)) & ADC_STAT_TEXC_INT_MASK)
-#define ADC_STAT_TCOMP_INT_MASK (0x200U)
-#define ADC_STAT_TCOMP_INT_SHIFT (9U)
-/*! TCOMP_INT - Interrupt Flag For Trigger Completion
- * 0b0..Either IE[TCOMP_IE] is set to 0, or no trigger sequences have run to completion.
- * 0b1..Trigger sequence has been completed and all data is stored in the associated FIFO.
- */
-#define ADC_STAT_TCOMP_INT(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_TCOMP_INT_SHIFT)) & ADC_STAT_TCOMP_INT_MASK)
-#define ADC_STAT_CAL_RDY_MASK (0x400U)
-#define ADC_STAT_CAL_RDY_SHIFT (10U)
-/*! CAL_RDY - Calibration Ready
- * 0b0..Calibration is incomplete or hasn't been ran.
- * 0b1..The ADC is calibrated.
- */
-#define ADC_STAT_CAL_RDY(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_CAL_RDY_SHIFT)) & ADC_STAT_CAL_RDY_MASK)
-#define ADC_STAT_ADC_ACTIVE_MASK (0x800U)
-#define ADC_STAT_ADC_ACTIVE_SHIFT (11U)
-/*! ADC_ACTIVE - ADC Active
- * 0b0..The ADC is IDLE. There are no pending triggers to service and no active commands are being processed.
- * 0b1..The ADC is processing a conversion, running through the power up delay, or servicing a trigger.
- */
-#define ADC_STAT_ADC_ACTIVE(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_ADC_ACTIVE_SHIFT)) & ADC_STAT_ADC_ACTIVE_MASK)
-#define ADC_STAT_TRGACT_MASK (0xF0000U)
-#define ADC_STAT_TRGACT_SHIFT (16U)
-/*! TRGACT - Trigger Active
- * 0b0000..Command (sequence) associated with Trigger 0 currently being executed.
- * 0b0001..Command (sequence) associated with Trigger 1 currently being executed.
- * 0b0010..Command (sequence) associated with Trigger 2 currently being executed.
- * 0b0011-0b1111..Command (sequence) from the associated Trigger number is currently being executed.
- */
-#define ADC_STAT_TRGACT(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_TRGACT_SHIFT)) & ADC_STAT_TRGACT_MASK)
-#define ADC_STAT_CMDACT_MASK (0xF000000U)
-#define ADC_STAT_CMDACT_SHIFT (24U)
-/*! CMDACT - Command Active
- * 0b0000..No command is currently in progress.
- * 0b0001..Command 1 currently being executed.
- * 0b0010..Command 2 currently being executed.
- * 0b0011-0b1111..Associated command number is currently being executed.
- */
-#define ADC_STAT_CMDACT(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_CMDACT_SHIFT)) & ADC_STAT_CMDACT_MASK)
-/*! @} */
-
-/*! @name IE - Interrupt Enable Register */
-/*! @{ */
-#define ADC_IE_FWMIE0_MASK (0x1U)
-#define ADC_IE_FWMIE0_SHIFT (0U)
-/*! FWMIE0 - FIFO 0 Watermark Interrupt Enable
- * 0b0..FIFO 0 watermark interrupts are not enabled.
- * 0b1..FIFO 0 watermark interrupts are enabled.
- */
-#define ADC_IE_FWMIE0(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_FWMIE0_SHIFT)) & ADC_IE_FWMIE0_MASK)
-#define ADC_IE_FOFIE0_MASK (0x2U)
-#define ADC_IE_FOFIE0_SHIFT (1U)
-/*! FOFIE0 - Result FIFO 0 Overflow Interrupt Enable
- * 0b0..FIFO 0 overflow interrupts are not enabled.
- * 0b1..FIFO 0 overflow interrupts are enabled.
- */
-#define ADC_IE_FOFIE0(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_FOFIE0_SHIFT)) & ADC_IE_FOFIE0_MASK)
-#define ADC_IE_FWMIE1_MASK (0x4U)
-#define ADC_IE_FWMIE1_SHIFT (2U)
-/*! FWMIE1 - FIFO1 Watermark Interrupt Enable
- * 0b0..FIFO1 watermark interrupts are not enabled.
- * 0b1..FIFO1 watermark interrupts are enabled.
- */
-#define ADC_IE_FWMIE1(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_FWMIE1_SHIFT)) & ADC_IE_FWMIE1_MASK)
-#define ADC_IE_FOFIE1_MASK (0x8U)
-#define ADC_IE_FOFIE1_SHIFT (3U)
-/*! FOFIE1 - Result FIFO1 Overflow Interrupt Enable
- * 0b0..No result FIFO1 overflow has occurred since the last time the flag was cleared.
- * 0b1..At least one result FIFO1 overflow has occurred since the last time the flag was cleared.
- */
-#define ADC_IE_FOFIE1(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_FOFIE1_SHIFT)) & ADC_IE_FOFIE1_MASK)
-#define ADC_IE_TEXC_IE_MASK (0x100U)
-#define ADC_IE_TEXC_IE_SHIFT (8U)
-/*! TEXC_IE - Trigger Exception Interrupt Enable
- * 0b0..Trigger exception interrupts are disabled.
- * 0b1..Trigger exception interrupts are enabled.
- */
-#define ADC_IE_TEXC_IE(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_TEXC_IE_SHIFT)) & ADC_IE_TEXC_IE_MASK)
-#define ADC_IE_TCOMP_IE_MASK (0xFFFF0000U)
-#define ADC_IE_TCOMP_IE_SHIFT (16U)
-/*! TCOMP_IE - Trigger Completion Interrupt Enable
- * 0b0000000000000000..Trigger completion interrupts are disabled.
- * 0b0000000000000001..Trigger completion interrupts are enabled for trigger source 0 only.
- * 0b0000000000000010..Trigger completion interrupts are enabled for trigger source 1 only.
- * 0b0000000000000011-0b1111111111111110..Associated trigger completion interrupts are enabled.
- * 0b1111111111111111..Trigger completion interrupts are enabled for every trigger source.
- */
-#define ADC_IE_TCOMP_IE(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_TCOMP_IE_SHIFT)) & ADC_IE_TCOMP_IE_MASK)
-/*! @} */
-
-/*! @name DE - DMA Enable Register */
-/*! @{ */
-#define ADC_DE_FWMDE0_MASK (0x1U)
-#define ADC_DE_FWMDE0_SHIFT (0U)
-/*! FWMDE0 - FIFO 0 Watermark DMA Enable
- * 0b0..DMA request disabled.
- * 0b1..DMA request enabled.
- */
-#define ADC_DE_FWMDE0(x) (((uint32_t)(((uint32_t)(x)) << ADC_DE_FWMDE0_SHIFT)) & ADC_DE_FWMDE0_MASK)
-#define ADC_DE_FWMDE1_MASK (0x2U)
-#define ADC_DE_FWMDE1_SHIFT (1U)
-/*! FWMDE1 - FIFO1 Watermark DMA Enable
- * 0b0..DMA request disabled.
- * 0b1..DMA request enabled.
- */
-#define ADC_DE_FWMDE1(x) (((uint32_t)(((uint32_t)(x)) << ADC_DE_FWMDE1_SHIFT)) & ADC_DE_FWMDE1_MASK)
-/*! @} */
-
-/*! @name CFG - ADC Configuration Register */
-/*! @{ */
-#define ADC_CFG_TPRICTRL_MASK (0x3U)
-#define ADC_CFG_TPRICTRL_SHIFT (0U)
-/*! TPRICTRL - ADC trigger priority control
- * 0b00..If a higher priority trigger is detected during command processing, the current conversion is aborted
- * and the new command specified by the trigger is started.
- * 0b01..If a higher priority trigger is received during command processing, the current command is stopped after
- * after completing the current conversion. If averaging is enabled, the averaging loop will be completed.
- * However, CMDHa[LOOP] will be ignored and the higher priority trigger will be serviced.
- * 0b10..If a higher priority trigger is received during command processing, the current command will be
- * completed (averaging, looping, compare) before servicing the higher priority trigger.
- * 0b11..RESERVED
- */
-#define ADC_CFG_TPRICTRL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_TPRICTRL_SHIFT)) & ADC_CFG_TPRICTRL_MASK)
-#define ADC_CFG_PWRSEL_MASK (0x30U)
-#define ADC_CFG_PWRSEL_SHIFT (4U)
-/*! PWRSEL - Power Configuration Select
- * 0b00..Lowest power setting.
- * 0b01..Higher power setting than 0b0.
- * 0b10..Higher power setting than 0b1.
- * 0b11..Highest power setting.
- */
-#define ADC_CFG_PWRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_PWRSEL_SHIFT)) & ADC_CFG_PWRSEL_MASK)
-#define ADC_CFG_REFSEL_MASK (0xC0U)
-#define ADC_CFG_REFSEL_SHIFT (6U)
-/*! REFSEL - Voltage Reference Selection
- * 0b00..(Default) Option 1 setting.
- * 0b01..Option 2 setting.
- * 0b10..Option 3 setting.
- * 0b11..Reserved
- */
-#define ADC_CFG_REFSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_REFSEL_SHIFT)) & ADC_CFG_REFSEL_MASK)
-#define ADC_CFG_TRES_MASK (0x100U)
-#define ADC_CFG_TRES_SHIFT (8U)
-/*! TRES - Trigger Resume Enable
- * 0b0..Trigger sequences interrupted by a high priority trigger exception will not be automatically resumed or restarted.
- * 0b1..Trigger sequences interrupted by a high priority trigger exception will be automatically resumed or restarted.
- */
-#define ADC_CFG_TRES(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_TRES_SHIFT)) & ADC_CFG_TRES_MASK)
-#define ADC_CFG_TCMDRES_MASK (0x200U)
-#define ADC_CFG_TCMDRES_SHIFT (9U)
-/*! TCMDRES - Trigger Command Resume
- * 0b0..Trigger sequences interrupted by a high priority trigger exception will be automatically restarted.
- * 0b1..Trigger sequences interrupted by a high priority trigger exception will be resumed from the command executing before the exception.
- */
-#define ADC_CFG_TCMDRES(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_TCMDRES_SHIFT)) & ADC_CFG_TCMDRES_MASK)
-#define ADC_CFG_HPT_EXDI_MASK (0x400U)
-#define ADC_CFG_HPT_EXDI_SHIFT (10U)
-/*! HPT_EXDI - High Priority Trigger Exception Disable
- * 0b0..High priority trigger exceptions are enabled.
- * 0b1..High priority trigger exceptions are disabled.
- */
-#define ADC_CFG_HPT_EXDI(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_HPT_EXDI_SHIFT)) & ADC_CFG_HPT_EXDI_MASK)
-#define ADC_CFG_PUDLY_MASK (0xFF0000U)
-#define ADC_CFG_PUDLY_SHIFT (16U)
-/*! PUDLY - Power Up Delay
- */
-#define ADC_CFG_PUDLY(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_PUDLY_SHIFT)) & ADC_CFG_PUDLY_MASK)
-#define ADC_CFG_PWREN_MASK (0x10000000U)
-#define ADC_CFG_PWREN_SHIFT (28U)
-/*! PWREN - ADC Analog Pre-Enable
- * 0b0..ADC analog circuits are only enabled while conversions are active. Performance is affected due to analog startup delays.
- * 0b1..ADC analog circuits are pre-enabled and ready to execute conversions without startup delays (at the cost
- * of higher DC current consumption). A single power up delay (CFG[PUDLY]) is executed immediately once PWREN
- * is set, and any detected trigger does not begin ADC operation until the power up delay time has passed.
- * After this initial delay expires the analog will remain pre-enabled, and no additional delays will be
- * executed.
- */
-#define ADC_CFG_PWREN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_PWREN_SHIFT)) & ADC_CFG_PWREN_MASK)
-/*! @} */
-
-/*! @name PAUSE - ADC Pause Register */
-/*! @{ */
-#define ADC_PAUSE_PAUSEDLY_MASK (0x1FFU)
-#define ADC_PAUSE_PAUSEDLY_SHIFT (0U)
-/*! PAUSEDLY - Pause Delay
- */
-#define ADC_PAUSE_PAUSEDLY(x) (((uint32_t)(((uint32_t)(x)) << ADC_PAUSE_PAUSEDLY_SHIFT)) & ADC_PAUSE_PAUSEDLY_MASK)
-#define ADC_PAUSE_PAUSEEN_MASK (0x80000000U)
-#define ADC_PAUSE_PAUSEEN_SHIFT (31U)
-/*! PAUSEEN - PAUSE Option Enable
- * 0b0..Pause operation disabled
- * 0b1..Pause operation enabled
- */
-#define ADC_PAUSE_PAUSEEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_PAUSE_PAUSEEN_SHIFT)) & ADC_PAUSE_PAUSEEN_MASK)
-/*! @} */
-
-/*! @name SWTRIG - Software Trigger Register */
-/*! @{ */
-#define ADC_SWTRIG_SWT0_MASK (0x1U)
-#define ADC_SWTRIG_SWT0_SHIFT (0U)
-/*! SWT0 - Software trigger 0 event
- * 0b0..No trigger 0 event generated.
- * 0b1..Trigger 0 event generated.
- */
-#define ADC_SWTRIG_SWT0(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT0_SHIFT)) & ADC_SWTRIG_SWT0_MASK)
-#define ADC_SWTRIG_SWT1_MASK (0x2U)
-#define ADC_SWTRIG_SWT1_SHIFT (1U)
-/*! SWT1 - Software trigger 1 event
- * 0b0..No trigger 1 event generated.
- * 0b1..Trigger 1 event generated.
- */
-#define ADC_SWTRIG_SWT1(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT1_SHIFT)) & ADC_SWTRIG_SWT1_MASK)
-#define ADC_SWTRIG_SWT2_MASK (0x4U)
-#define ADC_SWTRIG_SWT2_SHIFT (2U)
-/*! SWT2 - Software trigger 2 event
- * 0b0..No trigger 2 event generated.
- * 0b1..Trigger 2 event generated.
- */
-#define ADC_SWTRIG_SWT2(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT2_SHIFT)) & ADC_SWTRIG_SWT2_MASK)
-#define ADC_SWTRIG_SWT3_MASK (0x8U)
-#define ADC_SWTRIG_SWT3_SHIFT (3U)
-/*! SWT3 - Software trigger 3 event
- * 0b0..No trigger 3 event generated.
- * 0b1..Trigger 3 event generated.
- */
-#define ADC_SWTRIG_SWT3(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT3_SHIFT)) & ADC_SWTRIG_SWT3_MASK)
-#define ADC_SWTRIG_SWT4_MASK (0x10U)
-#define ADC_SWTRIG_SWT4_SHIFT (4U)
-/*! SWT4 - Software trigger 4 event
- * 0b0..No trigger 4 event generated.
- * 0b1..Trigger 4 event generated.
- */
-#define ADC_SWTRIG_SWT4(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT4_SHIFT)) & ADC_SWTRIG_SWT4_MASK)
-#define ADC_SWTRIG_SWT5_MASK (0x20U)
-#define ADC_SWTRIG_SWT5_SHIFT (5U)
-/*! SWT5 - Software trigger 5 event
- * 0b0..No trigger 5 event generated.
- * 0b1..Trigger 5 event generated.
- */
-#define ADC_SWTRIG_SWT5(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT5_SHIFT)) & ADC_SWTRIG_SWT5_MASK)
-#define ADC_SWTRIG_SWT6_MASK (0x40U)
-#define ADC_SWTRIG_SWT6_SHIFT (6U)
-/*! SWT6 - Software trigger 6 event
- * 0b0..No trigger 6 event generated.
- * 0b1..Trigger 6 event generated.
- */
-#define ADC_SWTRIG_SWT6(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT6_SHIFT)) & ADC_SWTRIG_SWT6_MASK)
-#define ADC_SWTRIG_SWT7_MASK (0x80U)
-#define ADC_SWTRIG_SWT7_SHIFT (7U)
-/*! SWT7 - Software trigger 7 event
- * 0b0..No trigger 7 event generated.
- * 0b1..Trigger 7 event generated.
- */
-#define ADC_SWTRIG_SWT7(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT7_SHIFT)) & ADC_SWTRIG_SWT7_MASK)
-#define ADC_SWTRIG_SWT8_MASK (0x100U)
-#define ADC_SWTRIG_SWT8_SHIFT (8U)
-/*! SWT8 - Software trigger 8 event
- * 0b0..No trigger 8 event generated.
- * 0b1..Trigger 8 event generated.
- */
-#define ADC_SWTRIG_SWT8(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT8_SHIFT)) & ADC_SWTRIG_SWT8_MASK)
-#define ADC_SWTRIG_SWT9_MASK (0x200U)
-#define ADC_SWTRIG_SWT9_SHIFT (9U)
-/*! SWT9 - Software trigger 9 event
- * 0b0..No trigger 9 event generated.
- * 0b1..Trigger 9 event generated.
- */
-#define ADC_SWTRIG_SWT9(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT9_SHIFT)) & ADC_SWTRIG_SWT9_MASK)
-#define ADC_SWTRIG_SWT10_MASK (0x400U)
-#define ADC_SWTRIG_SWT10_SHIFT (10U)
-/*! SWT10 - Software trigger 10 event
- * 0b0..No trigger 10 event generated.
- * 0b1..Trigger 10 event generated.
- */
-#define ADC_SWTRIG_SWT10(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT10_SHIFT)) & ADC_SWTRIG_SWT10_MASK)
-#define ADC_SWTRIG_SWT11_MASK (0x800U)
-#define ADC_SWTRIG_SWT11_SHIFT (11U)
-/*! SWT11 - Software trigger 11 event
- * 0b0..No trigger 11 event generated.
- * 0b1..Trigger 11 event generated.
- */
-#define ADC_SWTRIG_SWT11(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT11_SHIFT)) & ADC_SWTRIG_SWT11_MASK)
-#define ADC_SWTRIG_SWT12_MASK (0x1000U)
-#define ADC_SWTRIG_SWT12_SHIFT (12U)
-/*! SWT12 - Software trigger 12 event
- * 0b0..No trigger 12 event generated.
- * 0b1..Trigger 12 event generated.
- */
-#define ADC_SWTRIG_SWT12(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT12_SHIFT)) & ADC_SWTRIG_SWT12_MASK)
-#define ADC_SWTRIG_SWT13_MASK (0x2000U)
-#define ADC_SWTRIG_SWT13_SHIFT (13U)
-/*! SWT13 - Software trigger 13 event
- * 0b0..No trigger 13 event generated.
- * 0b1..Trigger 13 event generated.
- */
-#define ADC_SWTRIG_SWT13(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT13_SHIFT)) & ADC_SWTRIG_SWT13_MASK)
-#define ADC_SWTRIG_SWT14_MASK (0x4000U)
-#define ADC_SWTRIG_SWT14_SHIFT (14U)
-/*! SWT14 - Software trigger 14 event
- * 0b0..No trigger 14 event generated.
- * 0b1..Trigger 14 event generated.
- */
-#define ADC_SWTRIG_SWT14(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT14_SHIFT)) & ADC_SWTRIG_SWT14_MASK)
-#define ADC_SWTRIG_SWT15_MASK (0x8000U)
-#define ADC_SWTRIG_SWT15_SHIFT (15U)
-/*! SWT15 - Software trigger 15 event
- * 0b0..No trigger 15 event generated.
- * 0b1..Trigger 15 event generated.
- */
-#define ADC_SWTRIG_SWT15(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT15_SHIFT)) & ADC_SWTRIG_SWT15_MASK)
-/*! @} */
-
-/*! @name TSTAT - Trigger Status Register */
-/*! @{ */
-#define ADC_TSTAT_TEXC_NUM_MASK (0xFFFFU)
-#define ADC_TSTAT_TEXC_NUM_SHIFT (0U)
-/*! TEXC_NUM - Trigger Exception Number
- * 0b0000000000000000..No triggers have been interrupted by a high priority exception. Or CFG[TRES] = 1.
- * 0b0000000000000001..Trigger 0 has been interrupted by a high priority exception.
- * 0b0000000000000010..Trigger 1 has been interrupted by a high priority exception.
- * 0b0000000000000011-0b1111111111111110..Associated trigger sequence has interrupted by a high priority exception.
- * 0b1111111111111111..Every trigger sequence has been interrupted by a high priority exception.
- */
-#define ADC_TSTAT_TEXC_NUM(x) (((uint32_t)(((uint32_t)(x)) << ADC_TSTAT_TEXC_NUM_SHIFT)) & ADC_TSTAT_TEXC_NUM_MASK)
-#define ADC_TSTAT_TCOMP_FLAG_MASK (0xFFFF0000U)
-#define ADC_TSTAT_TCOMP_FLAG_SHIFT (16U)
-/*! TCOMP_FLAG - Trigger Completion Flag
- * 0b0000000000000000..No triggers have been completed. Trigger completion interrupts are disabled.
- * 0b0000000000000001..Trigger 0 has been completed and triger 0 has enabled completion interrupts.
- * 0b0000000000000010..Trigger 1 has been completed and triger 1 has enabled completion interrupts.
- * 0b0000000000000011-0b1111111111111110..Associated trigger sequence has completed and has enabled completion interrupts.
- * 0b1111111111111111..Every trigger sequence has been completed and every trigger has enabled completion interrupts.
- */
-#define ADC_TSTAT_TCOMP_FLAG(x) (((uint32_t)(((uint32_t)(x)) << ADC_TSTAT_TCOMP_FLAG_SHIFT)) & ADC_TSTAT_TCOMP_FLAG_MASK)
-/*! @} */
-
-/*! @name OFSTRIM - ADC Offset Trim Register */
-/*! @{ */
-#define ADC_OFSTRIM_OFSTRIM_A_MASK (0x1FU)
-#define ADC_OFSTRIM_OFSTRIM_A_SHIFT (0U)
-/*! OFSTRIM_A - Trim for offset
- */
-#define ADC_OFSTRIM_OFSTRIM_A(x) (((uint32_t)(((uint32_t)(x)) << ADC_OFSTRIM_OFSTRIM_A_SHIFT)) & ADC_OFSTRIM_OFSTRIM_A_MASK)
-#define ADC_OFSTRIM_OFSTRIM_B_MASK (0x1F0000U)
-#define ADC_OFSTRIM_OFSTRIM_B_SHIFT (16U)
-/*! OFSTRIM_B - Trim for offset
- */
-#define ADC_OFSTRIM_OFSTRIM_B(x) (((uint32_t)(((uint32_t)(x)) << ADC_OFSTRIM_OFSTRIM_B_SHIFT)) & ADC_OFSTRIM_OFSTRIM_B_MASK)
-/*! @} */
-
-/*! @name TCTRL - Trigger Control Register */
-/*! @{ */
-#define ADC_TCTRL_HTEN_MASK (0x1U)
-#define ADC_TCTRL_HTEN_SHIFT (0U)
-/*! HTEN - Trigger enable
- * 0b0..Hardware trigger source disabled
- * 0b1..Hardware trigger source enabled
- */
-#define ADC_TCTRL_HTEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_HTEN_SHIFT)) & ADC_TCTRL_HTEN_MASK)
-#define ADC_TCTRL_FIFO_SEL_A_MASK (0x2U)
-#define ADC_TCTRL_FIFO_SEL_A_SHIFT (1U)
-/*! FIFO_SEL_A - SAR Result Destination For Channel A
- * 0b0..Result written to FIFO 0
- * 0b1..Result written to FIFO 1
- */
-#define ADC_TCTRL_FIFO_SEL_A(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_FIFO_SEL_A_SHIFT)) & ADC_TCTRL_FIFO_SEL_A_MASK)
-#define ADC_TCTRL_FIFO_SEL_B_MASK (0x4U)
-#define ADC_TCTRL_FIFO_SEL_B_SHIFT (2U)
-/*! FIFO_SEL_B - SAR Result Destination For Channel B
- * 0b0..Result written to FIFO 0
- * 0b1..Result written to FIFO 1
- */
-#define ADC_TCTRL_FIFO_SEL_B(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_FIFO_SEL_B_SHIFT)) & ADC_TCTRL_FIFO_SEL_B_MASK)
-#define ADC_TCTRL_TPRI_MASK (0xF00U)
-#define ADC_TCTRL_TPRI_SHIFT (8U)
-/*! TPRI - Trigger priority setting
- * 0b0000..Set to highest priority, Level 1
- * 0b0001-0b1110..Set to corresponding priority level
- * 0b1111..Set to lowest priority, Level 16
- */
-#define ADC_TCTRL_TPRI(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_TPRI_SHIFT)) & ADC_TCTRL_TPRI_MASK)
-#define ADC_TCTRL_RSYNC_MASK (0x8000U)
-#define ADC_TCTRL_RSYNC_SHIFT (15U)
-/*! RSYNC - Trigger Resync
- */
-#define ADC_TCTRL_RSYNC(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_RSYNC_SHIFT)) & ADC_TCTRL_RSYNC_MASK)
-#define ADC_TCTRL_TDLY_MASK (0xF0000U)
-#define ADC_TCTRL_TDLY_SHIFT (16U)
-/*! TDLY - Trigger delay select
- */
-#define ADC_TCTRL_TDLY(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_TDLY_SHIFT)) & ADC_TCTRL_TDLY_MASK)
-#define ADC_TCTRL_TCMD_MASK (0xF000000U)
-#define ADC_TCTRL_TCMD_SHIFT (24U)
-/*! TCMD - Trigger command select
- * 0b0000..Not a valid selection from the command buffer. Trigger event is ignored.
- * 0b0001..CMD1 is executed
- * 0b0010-0b1110..Corresponding CMD is executed
- * 0b1111..CMD15 is executed
- */
-#define ADC_TCTRL_TCMD(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_TCMD_SHIFT)) & ADC_TCTRL_TCMD_MASK)
-/*! @} */
-
-/* The count of ADC_TCTRL */
-#define ADC_TCTRL_COUNT (16U)
-
-/*! @name FCTRL - FIFO Control Register */
-/*! @{ */
-#define ADC_FCTRL_FCOUNT_MASK (0x1FU)
-#define ADC_FCTRL_FCOUNT_SHIFT (0U)
-/*! FCOUNT - Result FIFO counter
- */
-#define ADC_FCTRL_FCOUNT(x) (((uint32_t)(((uint32_t)(x)) << ADC_FCTRL_FCOUNT_SHIFT)) & ADC_FCTRL_FCOUNT_MASK)
-#define ADC_FCTRL_FWMARK_MASK (0xF0000U)
-#define ADC_FCTRL_FWMARK_SHIFT (16U)
-/*! FWMARK - Watermark level selection
- */
-#define ADC_FCTRL_FWMARK(x) (((uint32_t)(((uint32_t)(x)) << ADC_FCTRL_FWMARK_SHIFT)) & ADC_FCTRL_FWMARK_MASK)
-/*! @} */
-
-/* The count of ADC_FCTRL */
-#define ADC_FCTRL_COUNT (2U)
-
-/*! @name GCC - Gain Calibration Control */
-/*! @{ */
-#define ADC_GCC_GAIN_CAL_MASK (0xFFFFU)
-#define ADC_GCC_GAIN_CAL_SHIFT (0U)
-/*! GAIN_CAL - Gain Calibration Value
- */
-#define ADC_GCC_GAIN_CAL(x) (((uint32_t)(((uint32_t)(x)) << ADC_GCC_GAIN_CAL_SHIFT)) & ADC_GCC_GAIN_CAL_MASK)
-#define ADC_GCC_RDY_MASK (0x1000000U)
-#define ADC_GCC_RDY_SHIFT (24U)
-/*! RDY - Gain Calibration Value Valid
- * 0b0..The gain calibration value is invalid. Run the auto-calibration routine for this value to be written.
- * 0b1..The gain calibration value is valid. It should be used to update the GCRa[GCALR] register field.
- */
-#define ADC_GCC_RDY(x) (((uint32_t)(((uint32_t)(x)) << ADC_GCC_RDY_SHIFT)) & ADC_GCC_RDY_MASK)
-/*! @} */
-
-/* The count of ADC_GCC */
-#define ADC_GCC_COUNT (2U)
-
-/*! @name GCR - Gain Calculation Result */
-/*! @{ */
-#define ADC_GCR_GCALR_MASK (0xFFFFU)
-#define ADC_GCR_GCALR_SHIFT (0U)
-/*! GCALR - Gain Calculation Result
- */
-#define ADC_GCR_GCALR(x) (((uint32_t)(((uint32_t)(x)) << ADC_GCR_GCALR_SHIFT)) & ADC_GCR_GCALR_MASK)
-#define ADC_GCR_RDY_MASK (0x1000000U)
-#define ADC_GCR_RDY_SHIFT (24U)
-/*! RDY - Gain Calculation Ready
- * 0b0..The gain offset calculation value is invalid.
- * 0b1..The gain calibration value is valid.
- */
-#define ADC_GCR_RDY(x) (((uint32_t)(((uint32_t)(x)) << ADC_GCR_RDY_SHIFT)) & ADC_GCR_RDY_MASK)
-/*! @} */
-
-/* The count of ADC_GCR */
-#define ADC_GCR_COUNT (2U)
-
-/*! @name CMDL - ADC Command Low Buffer Register */
-/*! @{ */
-#define ADC_CMDL_ADCH_MASK (0x1FU)
-#define ADC_CMDL_ADCH_SHIFT (0U)
-/*! ADCH - Input channel select
- * 0b00000..Select CH0A or CH0B or CH0A/CH0B pair.
- * 0b00001..Select CH1A or CH1B or CH1A/CH1B pair.
- * 0b00010..Select CH2A or CH2B or CH2A/CH2B pair.
- * 0b00011..Select CH3A or CH3B or CH3A/CH3B pair.
- * 0b00100-0b11101..Select corresponding channel CHnA or CHnB or CHnA/CHnB pair.
- * 0b11110..Select CH30A or CH30B or CH30A/CH30B pair.
- * 0b11111..Select CH31A or CH31B or CH31A/CH31B pair.
- */
-#define ADC_CMDL_ADCH(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDL_ADCH_SHIFT)) & ADC_CMDL_ADCH_MASK)
-#define ADC_CMDL_CTYPE_MASK (0x60U)
-#define ADC_CMDL_CTYPE_SHIFT (5U)
-/*! CTYPE - Conversion Type
- * 0b00..Single-Ended Mode. Only A side channel is converted.
- * 0b01..Single-Ended Mode. Only B side channel is converted.
- * 0b10..Differential Mode. A-B.
- * 0b11..Dual-Single-Ended Mode. Both A side and B side channels are converted independently.
- */
-#define ADC_CMDL_CTYPE(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDL_CTYPE_SHIFT)) & ADC_CMDL_CTYPE_MASK)
-#define ADC_CMDL_MODE_MASK (0x80U)
-#define ADC_CMDL_MODE_SHIFT (7U)
-/*! MODE - Select resolution of conversions
- * 0b0..Standard resolution. Single-ended 12-bit conversion; Differential 13-bit conversion with 2's complement output.
- * 0b1..High resolution. Single-ended 16-bit conversion; Differential 16-bit conversion with 2's complement output.
- */
-#define ADC_CMDL_MODE(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDL_MODE_SHIFT)) & ADC_CMDL_MODE_MASK)
-/*! @} */
-
-/* The count of ADC_CMDL */
-#define ADC_CMDL_COUNT (15U)
-
-/*! @name CMDH - ADC Command High Buffer Register */
-/*! @{ */
-#define ADC_CMDH_CMPEN_MASK (0x3U)
-#define ADC_CMDH_CMPEN_SHIFT (0U)
-/*! CMPEN - Compare Function Enable
- * 0b00..Compare disabled.
- * 0b01..Reserved
- * 0b10..Compare enabled. Store on true.
- * 0b11..Compare enabled. Repeat channel acquisition (sample/convert/compare) until true.
- */
-#define ADC_CMDH_CMPEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_CMPEN_SHIFT)) & ADC_CMDH_CMPEN_MASK)
-#define ADC_CMDH_WAIT_TRIG_MASK (0x4U)
-#define ADC_CMDH_WAIT_TRIG_SHIFT (2U)
-/*! WAIT_TRIG - Wait for trigger assertion before execution.
- * 0b0..This command will be automatically executed.
- * 0b1..The active trigger must be asserted again before executing this command.
- */
-#define ADC_CMDH_WAIT_TRIG(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_WAIT_TRIG_SHIFT)) & ADC_CMDH_WAIT_TRIG_MASK)
-#define ADC_CMDH_LWI_MASK (0x80U)
-#define ADC_CMDH_LWI_SHIFT (7U)
-/*! LWI - Loop with Increment
- * 0b0..Auto channel increment disabled
- * 0b1..Auto channel increment enabled
- */
-#define ADC_CMDH_LWI(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_LWI_SHIFT)) & ADC_CMDH_LWI_MASK)
-#define ADC_CMDH_STS_MASK (0x700U)
-#define ADC_CMDH_STS_SHIFT (8U)
-/*! STS - Sample Time Select
- * 0b000..Minimum sample time of 3 ADCK cycles.
- * 0b001..3 + 21 ADCK cycles; 5 ADCK cycles total sample time.
- * 0b010..3 + 22 ADCK cycles; 7 ADCK cycles total sample time.
- * 0b011..3 + 23 ADCK cycles; 11 ADCK cycles total sample time.
- * 0b100..3 + 24 ADCK cycles; 19 ADCK cycles total sample time.
- * 0b101..3 + 25 ADCK cycles; 35 ADCK cycles total sample time.
- * 0b110..3 + 26 ADCK cycles; 67 ADCK cycles total sample time.
- * 0b111..3 + 27 ADCK cycles; 131 ADCK cycles total sample time.
- */
-#define ADC_CMDH_STS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_STS_SHIFT)) & ADC_CMDH_STS_MASK)
-#define ADC_CMDH_AVGS_MASK (0x7000U)
-#define ADC_CMDH_AVGS_SHIFT (12U)
-/*! AVGS - Hardware Average Select
- * 0b000..Single conversion.
- * 0b001..2 conversions averaged.
- * 0b010..4 conversions averaged.
- * 0b011..8 conversions averaged.
- * 0b100..16 conversions averaged.
- * 0b101..32 conversions averaged.
- * 0b110..64 conversions averaged.
- * 0b111..128 conversions averaged.
- */
-#define ADC_CMDH_AVGS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_AVGS_SHIFT)) & ADC_CMDH_AVGS_MASK)
-#define ADC_CMDH_LOOP_MASK (0xF0000U)
-#define ADC_CMDH_LOOP_SHIFT (16U)
-/*! LOOP - Loop Count Select
- * 0b0000..Looping not enabled. Command executes 1 time.
- * 0b0001..Loop 1 time. Command executes 2 times.
- * 0b0010..Loop 2 times. Command executes 3 times.
- * 0b0011-0b1110..Loop corresponding number of times. Command executes LOOP+1 times.
- * 0b1111..Loop 15 times. Command executes 16 times.
- */
-#define ADC_CMDH_LOOP(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_LOOP_SHIFT)) & ADC_CMDH_LOOP_MASK)
-#define ADC_CMDH_NEXT_MASK (0xF000000U)
-#define ADC_CMDH_NEXT_SHIFT (24U)
-/*! NEXT - Next Command Select
- * 0b0000..No next command defined. Terminate conversions at completion of current command. If lower priority
- * trigger pending, begin command associated with lower priority trigger.
- * 0b0001..Select CMD1 command buffer register as next command.
- * 0b0010-0b1110..Select corresponding CMD command buffer register as next command
- * 0b1111..Select CMD15 command buffer register as next command.
- */
-#define ADC_CMDH_NEXT(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_NEXT_SHIFT)) & ADC_CMDH_NEXT_MASK)
-/*! @} */
-
-/* The count of ADC_CMDH */
-#define ADC_CMDH_COUNT (15U)
-
-/*! @name CV - Compare Value Register */
-/*! @{ */
-#define ADC_CV_CVL_MASK (0xFFFFU)
-#define ADC_CV_CVL_SHIFT (0U)
-/*! CVL - Compare Value Low.
- */
-#define ADC_CV_CVL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CV_CVL_SHIFT)) & ADC_CV_CVL_MASK)
-#define ADC_CV_CVH_MASK (0xFFFF0000U)
-#define ADC_CV_CVH_SHIFT (16U)
-/*! CVH - Compare Value High.
- */
-#define ADC_CV_CVH(x) (((uint32_t)(((uint32_t)(x)) << ADC_CV_CVH_SHIFT)) & ADC_CV_CVH_MASK)
-/*! @} */
-
-/* The count of ADC_CV */
-#define ADC_CV_COUNT (4U)
-
-/*! @name RESFIFO - ADC Data Result FIFO Register */
-/*! @{ */
-#define ADC_RESFIFO_D_MASK (0xFFFFU)
-#define ADC_RESFIFO_D_SHIFT (0U)
-/*! D - Data result
- */
-#define ADC_RESFIFO_D(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_D_SHIFT)) & ADC_RESFIFO_D_MASK)
-#define ADC_RESFIFO_TSRC_MASK (0xF0000U)
-#define ADC_RESFIFO_TSRC_SHIFT (16U)
-/*! TSRC - Trigger Source
- * 0b0000..Trigger source 0 initiated this conversion.
- * 0b0001..Trigger source 1 initiated this conversion.
- * 0b0010-0b1110..Corresponding trigger source initiated this conversion.
- * 0b1111..Trigger source 15 initiated this conversion.
- */
-#define ADC_RESFIFO_TSRC(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_TSRC_SHIFT)) & ADC_RESFIFO_TSRC_MASK)
-#define ADC_RESFIFO_LOOPCNT_MASK (0xF00000U)
-#define ADC_RESFIFO_LOOPCNT_SHIFT (20U)
-/*! LOOPCNT - Loop count value
- * 0b0000..Result is from initial conversion in command.
- * 0b0001..Result is from second conversion in command.
- * 0b0010-0b1110..Result is from LOOPCNT+1 conversion in command.
- * 0b1111..Result is from 16th conversion in command.
- */
-#define ADC_RESFIFO_LOOPCNT(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_LOOPCNT_SHIFT)) & ADC_RESFIFO_LOOPCNT_MASK)
-#define ADC_RESFIFO_CMDSRC_MASK (0xF000000U)
-#define ADC_RESFIFO_CMDSRC_SHIFT (24U)
-/*! CMDSRC - Command Buffer Source
- * 0b0000..Not a valid value CMDSRC value for a dataword in RESFIFO. 0x0 is only found in initial FIFO state
- * prior to an ADC conversion result dataword being stored to a RESFIFO buffer.
- * 0b0001..CMD1 buffer used as control settings for this conversion.
- * 0b0010-0b1110..Corresponding command buffer used as control settings for this conversion.
- * 0b1111..CMD15 buffer used as control settings for this conversion.
- */
-#define ADC_RESFIFO_CMDSRC(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_CMDSRC_SHIFT)) & ADC_RESFIFO_CMDSRC_MASK)
-#define ADC_RESFIFO_VALID_MASK (0x80000000U)
-#define ADC_RESFIFO_VALID_SHIFT (31U)
-/*! VALID - FIFO entry is valid
- * 0b0..FIFO is empty. Discard any read from RESFIFO.
- * 0b1..FIFO record read from RESFIFO is valid.
- */
-#define ADC_RESFIFO_VALID(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_VALID_SHIFT)) & ADC_RESFIFO_VALID_MASK)
-/*! @} */
-
-/* The count of ADC_RESFIFO */
-#define ADC_RESFIFO_COUNT (2U)
-
-/*! @name CAL_GAR - Calibration General A-Side Registers */
-/*! @{ */
-#define ADC_CAL_GAR_CAL_GAR_VAL_MASK (0xFFFFU)
-#define ADC_CAL_GAR_CAL_GAR_VAL_SHIFT (0U)
-/*! CAL_GAR_VAL - Calibration General A Side Register Element
- */
-#define ADC_CAL_GAR_CAL_GAR_VAL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CAL_GAR_CAL_GAR_VAL_SHIFT)) & ADC_CAL_GAR_CAL_GAR_VAL_MASK)
-/*! @} */
-
-/* The count of ADC_CAL_GAR */
-#define ADC_CAL_GAR_COUNT (33U)
-
-/*! @name CAL_GBR - Calibration General B-Side Registers */
-/*! @{ */
-#define ADC_CAL_GBR_CAL_GBR_VAL_MASK (0xFFFFU)
-#define ADC_CAL_GBR_CAL_GBR_VAL_SHIFT (0U)
-/*! CAL_GBR_VAL - Calibration General B Side Register Element
- */
-#define ADC_CAL_GBR_CAL_GBR_VAL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CAL_GBR_CAL_GBR_VAL_SHIFT)) & ADC_CAL_GBR_CAL_GBR_VAL_MASK)
-/*! @} */
-
-/* The count of ADC_CAL_GBR */
-#define ADC_CAL_GBR_COUNT (33U)
-
-/*! @name TST - ADC Test Register */
-/*! @{ */
-#define ADC_TST_CST_LONG_MASK (0x1U)
-#define ADC_TST_CST_LONG_SHIFT (0U)
-/*! CST_LONG - Calibration Sample Time Long
- * 0b0..Normal sample time. Minimum sample time of 3 ADCK cycles.
- * 0b1..Increased sample time. 67 ADCK cycles total sample time.
- */
-#define ADC_TST_CST_LONG(x) (((uint32_t)(((uint32_t)(x)) << ADC_TST_CST_LONG_SHIFT)) & ADC_TST_CST_LONG_MASK)
-#define ADC_TST_FOFFM_MASK (0x100U)
-#define ADC_TST_FOFFM_SHIFT (8U)
-/*! FOFFM - Force M-side positive offset
- * 0b0..Normal operation. No forced offset.
- * 0b1..Test configuration. Forced positive offset on MDAC.
- */
-#define ADC_TST_FOFFM(x) (((uint32_t)(((uint32_t)(x)) << ADC_TST_FOFFM_SHIFT)) & ADC_TST_FOFFM_MASK)
-#define ADC_TST_FOFFP_MASK (0x200U)
-#define ADC_TST_FOFFP_SHIFT (9U)
-/*! FOFFP - Force P-side positive offset
- * 0b0..Normal operation. No forced offset.
- * 0b1..Test configuration. Forced positive offset on PDAC.
- */
-#define ADC_TST_FOFFP(x) (((uint32_t)(((uint32_t)(x)) << ADC_TST_FOFFP_SHIFT)) & ADC_TST_FOFFP_MASK)
-#define ADC_TST_FOFFM2_MASK (0x400U)
-#define ADC_TST_FOFFM2_SHIFT (10U)
-/*! FOFFM2 - Force M-side negative offset
- * 0b0..Normal operation. No forced offset.
- * 0b1..Test configuration. Forced negative offset on MDAC.
- */
-#define ADC_TST_FOFFM2(x) (((uint32_t)(((uint32_t)(x)) << ADC_TST_FOFFM2_SHIFT)) & ADC_TST_FOFFM2_MASK)
-#define ADC_TST_FOFFP2_MASK (0x800U)
-#define ADC_TST_FOFFP2_SHIFT (11U)
-/*! FOFFP2 - Force P-side negative offset
- * 0b0..Normal operation. No forced offset.
- * 0b1..Test configuration. Forced negative offset on PDAC.
- */
-#define ADC_TST_FOFFP2(x) (((uint32_t)(((uint32_t)(x)) << ADC_TST_FOFFP2_SHIFT)) & ADC_TST_FOFFP2_MASK)
-#define ADC_TST_TESTEN_MASK (0x800000U)
-#define ADC_TST_TESTEN_SHIFT (23U)
-/*! TESTEN - Enable test configuration
- * 0b0..Normal operation. Test configuration not enabled.
- * 0b1..Hardware BIST Test in progress.
- */
-#define ADC_TST_TESTEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_TST_TESTEN_SHIFT)) & ADC_TST_TESTEN_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group ADC_Register_Masks */
-
-
-/* ADC - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral ADC0 base address */
- #define ADC0_BASE (0x500A0000u)
- /** Peripheral ADC0 base address */
- #define ADC0_BASE_NS (0x400A0000u)
- /** Peripheral ADC0 base pointer */
- #define ADC0 ((ADC_Type *)ADC0_BASE)
- /** Peripheral ADC0 base pointer */
- #define ADC0_NS ((ADC_Type *)ADC0_BASE_NS)
- /** Array initializer of ADC peripheral base addresses */
- #define ADC_BASE_ADDRS { ADC0_BASE }
- /** Array initializer of ADC peripheral base pointers */
- #define ADC_BASE_PTRS { ADC0 }
- /** Array initializer of ADC peripheral base addresses */
- #define ADC_BASE_ADDRS_NS { ADC0_BASE_NS }
- /** Array initializer of ADC peripheral base pointers */
- #define ADC_BASE_PTRS_NS { ADC0_NS }
-#else
- /** Peripheral ADC0 base address */
- #define ADC0_BASE (0x400A0000u)
- /** Peripheral ADC0 base pointer */
- #define ADC0 ((ADC_Type *)ADC0_BASE)
- /** Array initializer of ADC peripheral base addresses */
- #define ADC_BASE_ADDRS { ADC0_BASE }
- /** Array initializer of ADC peripheral base pointers */
- #define ADC_BASE_PTRS { ADC0 }
-#endif
-/** Interrupt vectors for the ADC peripheral type */
-#define ADC_IRQS { ADC0_IRQn }
-
-/*!
- * @}
- */ /* end of group ADC_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- AHB_SECURE_CTRL Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup AHB_SECURE_CTRL_Peripheral_Access_Layer AHB_SECURE_CTRL Peripheral Access Layer
- * @{
- */
-
-/** AHB_SECURE_CTRL - Register Layout Typedef */
-typedef struct {
- struct { /* offset: 0x0, array step: 0x30 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for Flash and ROM slaves., array offset: 0x0, array step: 0x30 */
- uint8_t RESERVED_0[12];
- __IO uint32_t SEC_CTRL_FLASH_MEM_RULE[3]; /**< Security access rules for FLASH sector 0 to sector 20. Each Flash sector is 32 Kbytes. There are 20 FLASH sectors in total., array offset: 0x10, array step: index*0x30, index2*0x4 */
- uint8_t RESERVED_1[4];
- __IO uint32_t SEC_CTRL_ROM_MEM_RULE[4]; /**< Security access rules for ROM sector 0 to sector 31. Each ROM sector is 4 Kbytes. There are 32 ROM sectors in total., array offset: 0x20, array step: index*0x30, index2*0x4 */
- } SEC_CTRL_FLASH_ROM[1];
- struct { /* offset: 0x30, array step: 0x14 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for RAMX slaves., array offset: 0x30, array step: 0x14 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[1]; /**< Security access rules for RAMX slaves., array offset: 0x40, array step: index*0x14, index2*0x4 */
- } SEC_CTRL_RAMX[1];
- uint8_t RESERVED_0[12];
- struct { /* offset: 0x50, array step: 0x18 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for RAM0 slaves., array offset: 0x50, array step: 0x18 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[2]; /**< Security access rules for RAM0 slaves., array offset: 0x60, array step: index*0x18, index2*0x4 */
- } SEC_CTRL_RAM0[1];
- uint8_t RESERVED_1[8];
- struct { /* offset: 0x70, array step: 0x18 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for RAM1 slaves., array offset: 0x70, array step: 0x18 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[2]; /**< Security access rules for RAM1 slaves., array offset: 0x80, array step: index*0x18, index2*0x4 */
- } SEC_CTRL_RAM1[1];
- uint8_t RESERVED_2[8];
- struct { /* offset: 0x90, array step: 0x18 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for RAM2 slaves., array offset: 0x90, array step: 0x18 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[2]; /**< Security access rules for RAM2 slaves., array offset: 0xA0, array step: index*0x18, index2*0x4 */
- } SEC_CTRL_RAM2[1];
- uint8_t RESERVED_3[8];
- struct { /* offset: 0xB0, array step: 0x18 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for RAM3 slaves., array offset: 0xB0, array step: 0x18 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[2]; /**< Security access rules for RAM3 slaves., array offset: 0xC0, array step: index*0x18, index2*0x4 */
- } SEC_CTRL_RAM3[1];
- uint8_t RESERVED_4[8];
- struct { /* offset: 0xD0, array step: 0x14 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for RAM4 slaves., array offset: 0xD0, array step: 0x14 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[1]; /**< Security access rules for RAM4 slaves., array offset: 0xE0, array step: index*0x14, index2*0x4 */
- } SEC_CTRL_RAM4[1];
- uint8_t RESERVED_5[12];
- struct { /* offset: 0xF0, array step: 0x30 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for both APB Bridges slaves., array offset: 0xF0, array step: 0x30 */
- uint8_t RESERVED_0[12];
- __IO uint32_t SEC_CTRL_APB_BRIDGE0_MEM_CTRL0; /**< Security access rules for APB Bridge 0 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 0 sectors in total., array offset: 0x100, array step: 0x30 */
- __IO uint32_t SEC_CTRL_APB_BRIDGE0_MEM_CTRL1; /**< Security access rules for APB Bridge 0 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 0 sectors in total., array offset: 0x104, array step: 0x30 */
- __IO uint32_t SEC_CTRL_APB_BRIDGE0_MEM_CTRL2; /**< Security access rules for APB Bridge 0 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 0 sectors in total., array offset: 0x108, array step: 0x30 */
- uint8_t RESERVED_1[4];
- __IO uint32_t SEC_CTRL_APB_BRIDGE1_MEM_CTRL0; /**< Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total., array offset: 0x110, array step: 0x30 */
- __IO uint32_t SEC_CTRL_APB_BRIDGE1_MEM_CTRL1; /**< Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total., array offset: 0x114, array step: 0x30 */
- __IO uint32_t SEC_CTRL_APB_BRIDGE1_MEM_CTRL2; /**< Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total., array offset: 0x118, array step: 0x30 */
- __IO uint32_t SEC_CTRL_APB_BRIDGE1_MEM_CTRL3; /**< Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total., array offset: 0x11C, array step: 0x30 */
- } SEC_CTRL_APB_BRIDGE[1];
- __IO uint32_t SEC_CTRL_AHB_PORT8_SLAVE0_RULE; /**< Security access rules for AHB peripherals., offset: 0x120 */
- __IO uint32_t SEC_CTRL_AHB_PORT8_SLAVE1_RULE; /**< Security access rules for AHB peripherals., offset: 0x124 */
- uint8_t RESERVED_6[8];
- __IO uint32_t SEC_CTRL_AHB_PORT9_SLAVE0_RULE; /**< Security access rules for AHB peripherals., offset: 0x130 */
- __IO uint32_t SEC_CTRL_AHB_PORT9_SLAVE1_RULE; /**< Security access rules for AHB peripherals., offset: 0x134 */
- uint8_t RESERVED_7[8];
- struct { /* offset: 0x140, array step: 0x14 */
- __IO uint32_t SLAVE0_RULE; /**< Security access rules for AHB peripherals., array offset: 0x140, array step: 0x14 */
- __IO uint32_t SLAVE1_RULE; /**< Security access rules for AHB peripherals., array offset: 0x144, array step: 0x14 */
- uint8_t RESERVED_0[8];
- __IO uint32_t SEC_CTRL_AHB_SEC_CTRL_MEM_RULE[1]; /**< Security access rules for AHB_SEC_CTRL_AHB., array offset: 0x150, array step: index*0x14, index2*0x4 */
- } SEC_CTRL_AHB_PORT10[1];
- uint8_t RESERVED_8[12];
- struct { /* offset: 0x160, array step: 0x14 */
- __IO uint32_t SLAVE_RULE; /**< Security access rules for USB High speed RAM slaves., array offset: 0x160, array step: 0x14 */
- uint8_t RESERVED_0[12];
- __IO uint32_t MEM_RULE[1]; /**< Security access rules for RAM_USB_HS., array offset: 0x170, array step: index*0x14, index2*0x4 */
- } SEC_CTRL_USB_HS[1];
- uint8_t RESERVED_9[3212];
- __I uint32_t SEC_VIO_ADDR[12]; /**< most recent security violation address for AHB port n, array offset: 0xE00, array step: 0x4 */
- uint8_t RESERVED_10[80];
- __I uint32_t SEC_VIO_MISC_INFO[12]; /**< most recent security violation miscellaneous information for AHB port n, array offset: 0xE80, array step: 0x4 */
- uint8_t RESERVED_11[80];
- __IO uint32_t SEC_VIO_INFO_VALID; /**< security violation address/information registers valid flags, offset: 0xF00 */
- uint8_t RESERVED_12[124];
- __IO uint32_t SEC_GPIO_MASK0; /**< Secure GPIO mask for port 0 pins., offset: 0xF80 */
- __IO uint32_t SEC_GPIO_MASK1; /**< Secure GPIO mask for port 1 pins., offset: 0xF84 */
- uint8_t RESERVED_13[8];
- __IO uint32_t SEC_CPU_INT_MASK0; /**< Secure Interrupt mask for CPU1, offset: 0xF90 */
- __IO uint32_t SEC_CPU_INT_MASK1; /**< Secure Interrupt mask for CPU1, offset: 0xF94 */
- uint8_t RESERVED_14[36];
- __IO uint32_t SEC_MASK_LOCK; /**< Security General Purpose register access control., offset: 0xFBC */
- uint8_t RESERVED_15[16];
- __IO uint32_t MASTER_SEC_LEVEL; /**< master secure level register, offset: 0xFD0 */
- __IO uint32_t MASTER_SEC_ANTI_POL_REG; /**< master secure level anti-pole register, offset: 0xFD4 */
- uint8_t RESERVED_16[20];
- __IO uint32_t CPU0_LOCK_REG; /**< Miscalleneous control signals for in Cortex M33 (CPU0), offset: 0xFEC */
- __IO uint32_t CPU1_LOCK_REG; /**< Miscalleneous control signals for in micro-Cortex M33 (CPU1), offset: 0xFF0 */
- uint8_t RESERVED_17[4];
- __IO uint32_t MISC_CTRL_DP_REG; /**< secure control duplicate register, offset: 0xFF8 */
- __IO uint32_t MISC_CTRL_REG; /**< secure control register, offset: 0xFFC */
-} AHB_SECURE_CTRL_Type;
-
-/* ----------------------------------------------------------------------------
- -- AHB_SECURE_CTRL Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup AHB_SECURE_CTRL_Register_Masks AHB_SECURE_CTRL Register Masks
- * @{
- */
-
-/*! @name SEC_CTRL_FLASH_ROM_SLAVE_RULE - Security access rules for Flash and ROM slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_FLASH_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_FLASH_RULE_SHIFT (0U)
-/*! FLASH_RULE - Security access rules for the whole FLASH : 0x0000_0000 - 0x0009_FFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_FLASH_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_FLASH_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_FLASH_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_ROM_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_ROM_RULE_SHIFT (4U)
-/*! ROM_RULE - Security access rules for the whole ROM : 0x0300_0000 - 0x0301_FFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_ROM_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_ROM_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_ROM_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_ROM_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_FLASH_MEM_RULE - Security access rules for FLASH sector 0 to sector 20. Each Flash sector is 32 Kbytes. There are 20 FLASH sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_FLASH_MEM_RULE_COUNT2 (3U)
-
-/*! @name SEC_CTRL_ROM_MEM_RULE - Security access rules for ROM sector 0 to sector 31. Each ROM sector is 4 Kbytes. There are 32 ROM sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_ROM_MEM_RULE_COUNT2 (4U)
-
-/*! @name SEC_CTRL_RAMX_SLAVE_RULE - Security access rules for RAMX slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE_RAMX_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE_RAMX_RULE_SHIFT (0U)
-/*! RAMX_RULE - Security access rules for the whole RAMX : 0x0400_0000 - 0x0400_7FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE_RAMX_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE_RAMX_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE_RAMX_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_RAMX_MEM_RULE - Security access rules for RAMX slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAMX_MEM_RULE_COUNT2 (1U)
-
-/*! @name SEC_CTRL_RAM0_SLAVE_RULE - Security access rules for RAM0 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE_RAM0_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE_RAM0_RULE_SHIFT (0U)
-/*! RAM0_RULE - Security access rules for the whole RAM0 : 0x2000_0000 - 0x2000_FFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE_RAM0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE_RAM0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE_RAM0_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_RAM0_MEM_RULE - Security access rules for RAM0 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM0_MEM_RULE_COUNT2 (2U)
-
-/*! @name SEC_CTRL_RAM1_SLAVE_RULE - Security access rules for RAM1 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE_RAM1_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE_RAM1_RULE_SHIFT (0U)
-/*! RAM1_RULE - Security access rules for the whole RAM1 : 0x2001_0000 - 0x2001_FFFF" name="0
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE_RAM1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE_RAM1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE_RAM1_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_RAM1_MEM_RULE - Security access rules for RAM1 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM1_MEM_RULE_COUNT2 (2U)
-
-/*! @name SEC_CTRL_RAM2_SLAVE_RULE - Security access rules for RAM2 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE_RAM2_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE_RAM2_RULE_SHIFT (0U)
-/*! RAM2_RULE - Security access rules for the whole RAM2 : 0x2002_0000 - 0x2002_FFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE_RAM2_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE_RAM2_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE_RAM2_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_RAM2_MEM_RULE - Security access rules for RAM2 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM2_MEM_RULE_COUNT2 (2U)
-
-/*! @name SEC_CTRL_RAM3_SLAVE_RULE - Security access rules for RAM3 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE_RAM3_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE_RAM3_RULE_SHIFT (0U)
-/*! RAM3_RULE - Security access rules for the whole RAM3: 0x2003_0000 - 0x2003_FFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE_RAM3_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE_RAM3_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE_RAM3_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_RAM3_MEM_RULE - Security access rules for RAM3 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE3_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE4_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE4_SHIFT (16U)
-/*! RULE4 - secure control rule4. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE4_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE4_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE5_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE5_SHIFT (20U)
-/*! RULE5 - secure control rule5. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE5_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE5_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE6_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE6_SHIFT (24U)
-/*! RULE6 - secure control rule6. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE6_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE6_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE7_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE7_SHIFT (28U)
-/*! RULE7 - secure control rule7. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE7_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_RULE7_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM3_MEM_RULE_COUNT2 (2U)
-
-/*! @name SEC_CTRL_RAM4_SLAVE_RULE - Security access rules for RAM4 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE_RAM4_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE_RAM4_RULE_SHIFT (0U)
-/*! RAM4_RULE - Security access rules for the whole RAM4 : 0x2004_0000 - 0x2004_3FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE_RAM4_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE_RAM4_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE_RAM4_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_RAM4_MEM_RULE - Security access rules for RAM4 slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE0_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE0_SHIFT (0U)
-/*! RULE0 - secure control rule0. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE0_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE0_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE1_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE1_SHIFT (4U)
-/*! RULE1 - secure control rule1. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE1_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE1_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE2_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE2_SHIFT (8U)
-/*! RULE2 - secure control rule2. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE2_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE2_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE3_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE3_SHIFT (12U)
-/*! RULE3 - secure control rule3. it can be set when check_reg's write_lock is '0'
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE3_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_RULE3_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_RAM4_MEM_RULE_COUNT2 (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE_SLAVE_RULE - Security access rules for both APB Bridges slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE0_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE0_RULE_SHIFT (0U)
-/*! APBBRIDGE0_RULE - Security access rules for the whole APB Bridge 0
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE1_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE1_RULE_SHIFT (4U)
-/*! APBBRIDGE1_RULE - Security access rules for the whole APB Bridge 1
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_APBBRIDGE1_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE0_MEM_CTRL0 - Security access rules for APB Bridge 0 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 0 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SYSCON_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SYSCON_RULE_SHIFT (0U)
-/*! SYSCON_RULE - System Configuration
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SYSCON_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SYSCON_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SYSCON_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_IOCON_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_IOCON_RULE_SHIFT (4U)
-/*! IOCON_RULE - I/O Configuration
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_IOCON_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_IOCON_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_IOCON_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT0_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT0_RULE_SHIFT (8U)
-/*! GINT0_RULE - GPIO input Interrupt 0
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT1_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT1_RULE_SHIFT (12U)
-/*! GINT1_RULE - GPIO input Interrupt 1
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT1_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_PINT_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_PINT_RULE_SHIFT (16U)
-/*! PINT_RULE - Pin Interrupt and Pattern match
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_PINT_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_PINT_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_PINT_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SEC_PINT_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SEC_PINT_RULE_SHIFT (20U)
-/*! SEC_PINT_RULE - Secure Pin Interrupt and Pattern match
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SEC_PINT_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SEC_PINT_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SEC_PINT_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_INPUTMUX_RULE_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_INPUTMUX_RULE_SHIFT (24U)
-/*! INPUTMUX_RULE - Peripheral input multiplexing
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_INPUTMUX_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_INPUTMUX_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_INPUTMUX_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE0_MEM_CTRL1 - Security access rules for APB Bridge 0 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 0 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER0_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER0_RULE_SHIFT (0U)
-/*! CTIMER0_RULE - Standard counter/Timer 0
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER1_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER1_RULE_SHIFT (4U)
-/*! CTIMER1_RULE - Standard counter/Timer 1
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER1_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_WWDT_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_WWDT_RULE_SHIFT (16U)
-/*! WWDT_RULE - Windiwed wtachdog Timer
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_WWDT_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_WWDT_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_WWDT_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_MRT_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_MRT_RULE_SHIFT (20U)
-/*! MRT_RULE - Multi-rate Timer
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_MRT_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_MRT_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_MRT_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_UTICK_RULE_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_UTICK_RULE_SHIFT (24U)
-/*! UTICK_RULE - Micro-Timer
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_UTICK_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_UTICK_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_UTICK_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE0_MEM_CTRL2 - Security access rules for APB Bridge 0 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 0 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2_ANACTRL_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2_ANACTRL_RULE_SHIFT (12U)
-/*! ANACTRL_RULE - Analog Modules controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2_ANACTRL_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2_ANACTRL_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2_ANACTRL_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE1_MEM_CTRL0 - Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_PMC_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_PMC_RULE_SHIFT (0U)
-/*! PMC_RULE - Power Management Controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_PMC_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_PMC_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_PMC_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_SYSCTRL_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_SYSCTRL_RULE_SHIFT (12U)
-/*! SYSCTRL_RULE - System Controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_SYSCTRL_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_SYSCTRL_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_SYSCTRL_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE1_MEM_CTRL1 - Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER2_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER2_RULE_SHIFT (0U)
-/*! CTIMER2_RULE - Standard counter/Timer 2
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER2_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER2_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER2_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER3_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER3_RULE_SHIFT (4U)
-/*! CTIMER3_RULE - Standard counter/Timer 3
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER3_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER3_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER3_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER4_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER4_RULE_SHIFT (8U)
-/*! CTIMER4_RULE - Standard counter/Timer 4
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER4_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER4_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER4_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_RTC_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_RTC_RULE_SHIFT (16U)
-/*! RTC_RULE - Real Time Counter
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_RTC_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_RTC_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_RTC_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_OSEVENT_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_OSEVENT_RULE_SHIFT (20U)
-/*! OSEVENT_RULE - OS Event Timer
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_OSEVENT_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_OSEVENT_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_OSEVENT_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE1_MEM_CTRL2 - Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_FLASH_CTRL_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_FLASH_CTRL_RULE_SHIFT (16U)
-/*! FLASH_CTRL_RULE - Flash Controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_FLASH_CTRL_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_FLASH_CTRL_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_FLASH_CTRL_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_PRINCE_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_PRINCE_RULE_SHIFT (20U)
-/*! PRINCE_RULE - Prince
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_PRINCE_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_PRINCE_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_PRINCE_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_COUNT (1U)
-
-/*! @name SEC_CTRL_APB_BRIDGE1_MEM_CTRL3 - Security access rules for APB Bridge 1 peripherals. Each APB bridge sector is 4 Kbytes. There are 32 APB Bridge 1 sectors in total. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_USBHPHY_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_USBHPHY_RULE_SHIFT (0U)
-/*! USBHPHY_RULE - USB High Speed Phy controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_USBHPHY_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_USBHPHY_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_USBHPHY_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_RNG_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_RNG_RULE_SHIFT (8U)
-/*! RNG_RULE - True Random Number Generator
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_RNG_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_RNG_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_RNG_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PUF_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PUF_RULE_SHIFT (12U)
-/*! PUF_RULE - PUF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PUF_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PUF_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PUF_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PLU_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PLU_RULE_SHIFT (20U)
-/*! PLU_RULE - Programmable Look-Up logic
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PLU_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PLU_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PLU_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3 */
-#define AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_COUNT (1U)
-
-/*! @name SEC_CTRL_AHB_PORT8_SLAVE0_RULE - Security access rules for AHB peripherals. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_DMA0_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_DMA0_RULE_SHIFT (8U)
-/*! DMA0_RULE - DMA Controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_DMA0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_DMA0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_DMA0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FS_USB_DEV_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FS_USB_DEV_RULE_SHIFT (16U)
-/*! FS_USB_DEV_RULE - USB Full-speed device
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FS_USB_DEV_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FS_USB_DEV_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FS_USB_DEV_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_SCT_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_SCT_RULE_SHIFT (20U)
-/*! SCT_RULE - SCTimer
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_SCT_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_SCT_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_SCT_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM0_RULE_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM0_RULE_SHIFT (24U)
-/*! FLEXCOMM0_RULE - Flexcomm interface 0
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM1_RULE_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM1_RULE_SHIFT (28U)
-/*! FLEXCOMM1_RULE - Flexcomm interface 1
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM1_RULE_MASK)
-/*! @} */
-
-/*! @name SEC_CTRL_AHB_PORT8_SLAVE1_RULE - Security access rules for AHB peripherals. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM2_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM2_RULE_SHIFT (0U)
-/*! FLEXCOMM2_RULE - Flexcomm interface 2
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM2_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM2_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM2_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM3_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM3_RULE_SHIFT (4U)
-/*! FLEXCOMM3_RULE - Flexcomm interface 3
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM3_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM3_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM3_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM4_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM4_RULE_SHIFT (8U)
-/*! FLEXCOMM4_RULE - Flexcomm interface 4
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM4_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM4_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM4_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_MAILBOX_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_MAILBOX_RULE_SHIFT (12U)
-/*! MAILBOX_RULE - Inter CPU communication Mailbox
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_MAILBOX_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_MAILBOX_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_MAILBOX_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_GPIO0_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_GPIO0_RULE_SHIFT (16U)
-/*! GPIO0_RULE - High Speed GPIO
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_GPIO0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_GPIO0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_GPIO0_RULE_MASK)
-/*! @} */
-
-/*! @name SEC_CTRL_AHB_PORT9_SLAVE0_RULE - Security access rules for AHB peripherals. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_USB_HS_DEV_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_USB_HS_DEV_RULE_SHIFT (16U)
-/*! USB_HS_DEV_RULE - USB high Speed device registers
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_USB_HS_DEV_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_USB_HS_DEV_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_USB_HS_DEV_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_CRC_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_CRC_RULE_SHIFT (20U)
-/*! CRC_RULE - CRC engine
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_CRC_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_CRC_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_CRC_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM5_RULE_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM5_RULE_SHIFT (24U)
-/*! FLEXCOMM5_RULE - Flexcomm interface 5
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM5_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM5_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM5_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM6_RULE_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM6_RULE_SHIFT (28U)
-/*! FLEXCOMM6_RULE - Flexcomm interface 6
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM6_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM6_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM6_RULE_MASK)
-/*! @} */
-
-/*! @name SEC_CTRL_AHB_PORT9_SLAVE1_RULE - Security access rules for AHB peripherals. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_FLEXCOMM7_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_FLEXCOMM7_RULE_SHIFT (0U)
-/*! FLEXCOMM7_RULE - Flexcomm interface 7
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_FLEXCOMM7_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_FLEXCOMM7_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_FLEXCOMM7_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_SDIO_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_SDIO_RULE_SHIFT (12U)
-/*! SDIO_RULE - SDMMC card interface
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_SDIO_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_SDIO_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_SDIO_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_DBG_MAILBOX_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_DBG_MAILBOX_RULE_SHIFT (16U)
-/*! DBG_MAILBOX_RULE - Debug mailbox (aka ISP-AP)
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_DBG_MAILBOX_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_DBG_MAILBOX_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_DBG_MAILBOX_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_HS_LSPI_RULE_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_HS_LSPI_RULE_SHIFT (28U)
-/*! HS_LSPI_RULE - High Speed SPI
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_HS_LSPI_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_HS_LSPI_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_HS_LSPI_RULE_MASK)
-/*! @} */
-
-/*! @name SEC_CTRL_AHB_PORT10_SLAVE0_RULE - Security access rules for AHB peripherals. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_ADC_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_ADC_RULE_SHIFT (0U)
-/*! ADC_RULE - ADC
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_ADC_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_ADC_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_ADC_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_FS_HOST_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_FS_HOST_RULE_SHIFT (8U)
-/*! USB_FS_HOST_RULE - USB Full Speed Host registers.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_FS_HOST_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_FS_HOST_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_FS_HOST_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_HS_HOST_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_HS_HOST_RULE_SHIFT (12U)
-/*! USB_HS_HOST_RULE - USB High speed host registers
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_HS_HOST_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_HS_HOST_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_HS_HOST_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_HASH_RULE_MASK (0x30000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_HASH_RULE_SHIFT (16U)
-/*! HASH_RULE - SHA-2 crypto registers
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_HASH_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_HASH_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_HASH_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_CASPER_RULE_MASK (0x300000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_CASPER_RULE_SHIFT (20U)
-/*! CASPER_RULE - RSA/ECC crypto accelerator
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_CASPER_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_CASPER_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_CASPER_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_PQ_RULE_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_PQ_RULE_SHIFT (24U)
-/*! PQ_RULE - Power Quad (CPU0 processor hardware accelerator)
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_PQ_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_PQ_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_PQ_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_DMA1_RULE_MASK (0x30000000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_DMA1_RULE_SHIFT (28U)
-/*! DMA1_RULE - DMA Controller (Secure)
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_DMA1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_DMA1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_DMA1_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_AHB_PORT10_SLAVE1_RULE - Security access rules for AHB peripherals. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_GPIO1_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_GPIO1_RULE_SHIFT (0U)
-/*! GPIO1_RULE - Secure High Speed GPIO
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_GPIO1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_GPIO1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_GPIO1_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_AHB_SEC_CTRL_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_AHB_SEC_CTRL_RULE_SHIFT (4U)
-/*! AHB_SEC_CTRL_RULE - AHB Secure Controller
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_AHB_SEC_CTRL_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_AHB_SEC_CTRL_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_AHB_SEC_CTRL_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_AHB_SEC_CTRL_MEM_RULE - Security access rules for AHB_SEC_CTRL_AHB. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_0_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_0_RULE_SHIFT (0U)
-/*! AHB_SEC_CTRL_SECT_0_RULE - Address space: 0x400A_0000 - 0x400A_CFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_1_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_1_RULE_SHIFT (4U)
-/*! AHB_SEC_CTRL_SECT_1_RULE - Address space: 0x400A_D000 - 0x400A_DFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_1_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_2_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_2_RULE_SHIFT (8U)
-/*! AHB_SEC_CTRL_SECT_2_RULE - Address space: 0x400A_E000 - 0x400A_EFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_2_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_2_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_2_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_3_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_3_RULE_SHIFT (12U)
-/*! AHB_SEC_CTRL_SECT_3_RULE - Address space: 0x400A_F000 - 0x400A_FFFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_3_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_3_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_AHB_SEC_CTRL_SECT_3_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_AHB_SEC_CTRL_MEM_RULE_COUNT2 (1U)
-
-/*! @name SEC_CTRL_USB_HS_SLAVE_RULE - Security access rules for USB High speed RAM slaves. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE_RAM_USB_HS_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE_RAM_USB_HS_RULE_SHIFT (0U)
-/*! RAM_USB_HS_RULE - Security access rules for the whole USB High Speed RAM : 0x4010_0000 - 0x4010_3FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE_RAM_USB_HS_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE_RAM_USB_HS_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE_RAM_USB_HS_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE_COUNT (1U)
-
-/*! @name SEC_CTRL_USB_HS_MEM_RULE - Security access rules for RAM_USB_HS. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_0_RULE_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_0_RULE_SHIFT (0U)
-/*! SRAM_SECT_0_RULE - Address space: 0x4010_0000 - 0x4010_0FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_0_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_0_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_0_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_1_RULE_MASK (0x30U)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_1_RULE_SHIFT (4U)
-/*! SRAM_SECT_1_RULE - Address space: 0x4010_1000 - 0x4010_1FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_1_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_1_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_1_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_2_RULE_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_2_RULE_SHIFT (8U)
-/*! SRAM_SECT_2_RULE - Address space: 0x4010_2000 - 0x4010_2FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_2_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_2_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_2_RULE_MASK)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_3_RULE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_3_RULE_SHIFT (12U)
-/*! SRAM_SECT_3_RULE - Address space: 0x4010_3000 - 0x4010_3FFF
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_3_RULE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_3_RULE_SHIFT)) & AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_3_RULE_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_COUNT (1U)
-
-/* The count of AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE */
-#define AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_COUNT2 (1U)
-
-/*! @name SEC_VIO_ADDR - most recent security violation address for AHB port n */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_VIO_ADDR_SEC_VIO_ADDR_MASK (0xFFFFFFFFU)
-#define AHB_SECURE_CTRL_SEC_VIO_ADDR_SEC_VIO_ADDR_SHIFT (0U)
-/*! SEC_VIO_ADDR - security violation address for AHB port
- */
-#define AHB_SECURE_CTRL_SEC_VIO_ADDR_SEC_VIO_ADDR(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_ADDR_SEC_VIO_ADDR_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_ADDR_SEC_VIO_ADDR_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_VIO_ADDR */
-#define AHB_SECURE_CTRL_SEC_VIO_ADDR_COUNT (12U)
-
-/*! @name SEC_VIO_MISC_INFO - most recent security violation miscellaneous information for AHB port n */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_WRITE_MASK (0x1U)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_WRITE_SHIFT (0U)
-/*! SEC_VIO_INFO_WRITE - security violation access read/write indicator.
- * 0b0..Read access.
- * 0b1..Write access.
- */
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_WRITE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_WRITE_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_WRITE_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_DATA_ACCESS_MASK (0x2U)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_DATA_ACCESS_SHIFT (1U)
-/*! SEC_VIO_INFO_DATA_ACCESS - security violation access data/code indicator.
- * 0b0..Code access.
- * 0b1..Data access.
- */
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_DATA_ACCESS(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_DATA_ACCESS_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_DATA_ACCESS_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SEC_LEVEL_MASK (0xF0U)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SEC_LEVEL_SHIFT (4U)
-/*! SEC_VIO_INFO_MASTER_SEC_LEVEL - bit [5:4]: master sec level and privilege level bit [7:6]: anti-pol value for master sec level and privilege level
- */
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SEC_LEVEL(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SEC_LEVEL_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SEC_LEVEL_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_MASK (0xF00U)
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SHIFT (8U)
-/*! SEC_VIO_INFO_MASTER - security violation master number
- * 0b0000..CPU0 Code.
- * 0b0001..CPU0 System.
- * 0b0010..CPU1 Data.
- * 0b0011..CPU1 System.
- * 0b0100..USB-HS Device.
- * 0b0101..SDMA0.
- * 0b1000..SDIO.
- * 0b1001..PowerQuad.
- * 0b1010..HASH.
- * 0b1011..USB-FS Host.
- * 0b1100..SDMA1.
- */
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_SEC_VIO_INFO_MASTER_MASK)
-/*! @} */
-
-/* The count of AHB_SECURE_CTRL_SEC_VIO_MISC_INFO */
-#define AHB_SECURE_CTRL_SEC_VIO_MISC_INFO_COUNT (12U)
-
-/*! @name SEC_VIO_INFO_VALID - security violation address/information registers valid flags */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID0_MASK (0x1U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID0_SHIFT (0U)
-/*! VIO_INFO_VALID0 - violation information valid flag for AHB port 0. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID0_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID0_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID1_MASK (0x2U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID1_SHIFT (1U)
-/*! VIO_INFO_VALID1 - violation information valid flag for AHB port 1. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID1_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID1_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID2_MASK (0x4U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID2_SHIFT (2U)
-/*! VIO_INFO_VALID2 - violation information valid flag for AHB port 2. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID2_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID2_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID3_MASK (0x8U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID3_SHIFT (3U)
-/*! VIO_INFO_VALID3 - violation information valid flag for AHB port 3. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID3_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID3_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID4_MASK (0x10U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID4_SHIFT (4U)
-/*! VIO_INFO_VALID4 - violation information valid flag for AHB port 4. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID4_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID4_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID5_MASK (0x20U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID5_SHIFT (5U)
-/*! VIO_INFO_VALID5 - violation information valid flag for AHB port 5. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID5_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID5_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID6_MASK (0x40U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID6_SHIFT (6U)
-/*! VIO_INFO_VALID6 - violation information valid flag for AHB port 6. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID6_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID6_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID7_MASK (0x80U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID7_SHIFT (7U)
-/*! VIO_INFO_VALID7 - violation information valid flag for AHB port 7. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID7_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID7_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID8_MASK (0x100U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID8_SHIFT (8U)
-/*! VIO_INFO_VALID8 - violation information valid flag for AHB port 8. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID8(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID8_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID8_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID9_MASK (0x200U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID9_SHIFT (9U)
-/*! VIO_INFO_VALID9 - violation information valid flag for AHB port 9. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID9(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID9_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID9_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID10_MASK (0x400U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID10_SHIFT (10U)
-/*! VIO_INFO_VALID10 - violation information valid flag for AHB port 10. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID10(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID10_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID10_MASK)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID11_MASK (0x800U)
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID11_SHIFT (11U)
-/*! VIO_INFO_VALID11 - violation information valid flag for AHB port 11. Write 1 to clear.
- * 0b0..Not valid.
- * 0b1..Valid (violation occurred).
- */
-#define AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID11(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID11_SHIFT)) & AHB_SECURE_CTRL_SEC_VIO_INFO_VALID_VIO_INFO_VALID11_MASK)
-/*! @} */
-
-/*! @name SEC_GPIO_MASK0 - Secure GPIO mask for port 0 pins. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN0_SEC_MASK_MASK (0x1U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN0_SEC_MASK_SHIFT (0U)
-/*! PIO0_PIN0_SEC_MASK - Secure mask for pin P0_0
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN0_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN0_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN0_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN1_SEC_MASK_MASK (0x2U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN1_SEC_MASK_SHIFT (1U)
-/*! PIO0_PIN1_SEC_MASK - Secure mask for pin P0_1
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN1_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN1_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN1_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN2_SEC_MASK_MASK (0x4U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN2_SEC_MASK_SHIFT (2U)
-/*! PIO0_PIN2_SEC_MASK - Secure mask for pin P0_2
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN2_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN2_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN2_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN3_SEC_MASK_MASK (0x8U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN3_SEC_MASK_SHIFT (3U)
-/*! PIO0_PIN3_SEC_MASK - Secure mask for pin P0_3
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN3_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN3_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN3_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN4_SEC_MASK_MASK (0x10U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN4_SEC_MASK_SHIFT (4U)
-/*! PIO0_PIN4_SEC_MASK - Secure mask for pin P0_4
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN4_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN4_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN4_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN5_SEC_MASK_MASK (0x20U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN5_SEC_MASK_SHIFT (5U)
-/*! PIO0_PIN5_SEC_MASK - Secure mask for pin P0_5
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN5_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN5_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN5_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN6_SEC_MASK_MASK (0x40U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN6_SEC_MASK_SHIFT (6U)
-/*! PIO0_PIN6_SEC_MASK - Secure mask for pin P0_6
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN6_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN6_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN6_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN7_SEC_MASK_MASK (0x80U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN7_SEC_MASK_SHIFT (7U)
-/*! PIO0_PIN7_SEC_MASK - Secure mask for pin P0_7
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN7_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN7_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN7_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN8_SEC_MASK_MASK (0x100U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN8_SEC_MASK_SHIFT (8U)
-/*! PIO0_PIN8_SEC_MASK - Secure mask for pin P0_8
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN8_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN8_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN8_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN9_SEC_MASK_MASK (0x200U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN9_SEC_MASK_SHIFT (9U)
-/*! PIO0_PIN9_SEC_MASK - Secure mask for pin P0_9
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN9_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN9_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN9_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN10_SEC_MASK_MASK (0x400U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN10_SEC_MASK_SHIFT (10U)
-/*! PIO0_PIN10_SEC_MASK - Secure mask for pin P0_10
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN10_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN10_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN10_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN11_SEC_MASK_MASK (0x800U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN11_SEC_MASK_SHIFT (11U)
-/*! PIO0_PIN11_SEC_MASK - Secure mask for pin P0_11
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN11_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN11_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN11_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN12_SEC_MASK_MASK (0x1000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN12_SEC_MASK_SHIFT (12U)
-/*! PIO0_PIN12_SEC_MASK - Secure mask for pin P0_12
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN12_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN12_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN12_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN13_SEC_MASK_MASK (0x2000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN13_SEC_MASK_SHIFT (13U)
-/*! PIO0_PIN13_SEC_MASK - Secure mask for pin P0_13
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN13_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN13_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN13_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN14_SEC_MASK_MASK (0x4000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN14_SEC_MASK_SHIFT (14U)
-/*! PIO0_PIN14_SEC_MASK - Secure mask for pin P0_14
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN14_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN14_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN14_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN15_SEC_MASK_MASK (0x8000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN15_SEC_MASK_SHIFT (15U)
-/*! PIO0_PIN15_SEC_MASK - Secure mask for pin P0_15
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN15_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN15_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN15_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN16_SEC_MASK_MASK (0x10000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN16_SEC_MASK_SHIFT (16U)
-/*! PIO0_PIN16_SEC_MASK - Secure mask for pin P0_16
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN16_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN16_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN16_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN17_SEC_MASK_MASK (0x20000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN17_SEC_MASK_SHIFT (17U)
-/*! PIO0_PIN17_SEC_MASK - Secure mask for pin P0_17
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN17_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN17_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN17_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN18_SEC_MASK_MASK (0x40000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN18_SEC_MASK_SHIFT (18U)
-/*! PIO0_PIN18_SEC_MASK - Secure mask for pin P0_18
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN18_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN18_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN18_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN19_SEC_MASK_MASK (0x80000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN19_SEC_MASK_SHIFT (19U)
-/*! PIO0_PIN19_SEC_MASK - Secure mask for pin P0_19
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN19_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN19_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN19_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN20_SEC_MASK_MASK (0x100000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN20_SEC_MASK_SHIFT (20U)
-/*! PIO0_PIN20_SEC_MASK - Secure mask for pin P0_20
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN20_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN20_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN20_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN21_SEC_MASK_MASK (0x200000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN21_SEC_MASK_SHIFT (21U)
-/*! PIO0_PIN21_SEC_MASK - Secure mask for pin P0_21
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN21_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN21_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN21_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN22_SEC_MASK_MASK (0x400000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN22_SEC_MASK_SHIFT (22U)
-/*! PIO0_PIN22_SEC_MASK - Secure mask for pin P0_22
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN22_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN22_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN22_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN23_SEC_MASK_MASK (0x800000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN23_SEC_MASK_SHIFT (23U)
-/*! PIO0_PIN23_SEC_MASK - Secure mask for pin P0_23
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN23_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN23_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN23_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN24_SEC_MASK_MASK (0x1000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN24_SEC_MASK_SHIFT (24U)
-/*! PIO0_PIN24_SEC_MASK - Secure mask for pin P0_24
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN24_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN24_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN24_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN25_SEC_MASK_MASK (0x2000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN25_SEC_MASK_SHIFT (25U)
-/*! PIO0_PIN25_SEC_MASK - Secure mask for pin P0_25
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN25_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN25_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN25_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN26_SEC_MASK_MASK (0x4000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN26_SEC_MASK_SHIFT (26U)
-/*! PIO0_PIN26_SEC_MASK - Secure mask for pin P0_26
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN26_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN26_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN26_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN27_SEC_MASK_MASK (0x8000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN27_SEC_MASK_SHIFT (27U)
-/*! PIO0_PIN27_SEC_MASK - Secure mask for pin P0_27
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN27_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN27_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN27_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN28_SEC_MASK_MASK (0x10000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN28_SEC_MASK_SHIFT (28U)
-/*! PIO0_PIN28_SEC_MASK - Secure mask for pin P0_28
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN28_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN28_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN28_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN29_SEC_MASK_MASK (0x20000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN29_SEC_MASK_SHIFT (29U)
-/*! PIO0_PIN29_SEC_MASK - Secure mask for pin P0_29
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN29_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN29_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN29_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN30_SEC_MASK_MASK (0x40000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN30_SEC_MASK_SHIFT (30U)
-/*! PIO0_PIN30_SEC_MASK - Secure mask for pin P0_30
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN30_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN30_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN30_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN31_SEC_MASK_MASK (0x80000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN31_SEC_MASK_SHIFT (31U)
-/*! PIO0_PIN31_SEC_MASK - Secure mask for pin P0_31
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN31_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN31_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK0_PIO0_PIN31_SEC_MASK_MASK)
-/*! @} */
-
-/*! @name SEC_GPIO_MASK1 - Secure GPIO mask for port 1 pins. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN0_SEC_MASK_MASK (0x1U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN0_SEC_MASK_SHIFT (0U)
-/*! PIO1_PIN0_SEC_MASK - Secure mask for pin P1_0
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN0_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN0_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN0_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN1_SEC_MASK_MASK (0x2U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN1_SEC_MASK_SHIFT (1U)
-/*! PIO1_PIN1_SEC_MASK - Secure mask for pin P1_1
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN1_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN1_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN1_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN2_SEC_MASK_MASK (0x4U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN2_SEC_MASK_SHIFT (2U)
-/*! PIO1_PIN2_SEC_MASK - Secure mask for pin P1_2
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN2_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN2_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN2_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN3_SEC_MASK_MASK (0x8U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN3_SEC_MASK_SHIFT (3U)
-/*! PIO1_PIN3_SEC_MASK - Secure mask for pin P1_3
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN3_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN3_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN3_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN4_SEC_MASK_MASK (0x10U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN4_SEC_MASK_SHIFT (4U)
-/*! PIO1_PIN4_SEC_MASK - Secure mask for pin P1_4
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN4_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN4_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN4_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN5_SEC_MASK_MASK (0x20U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN5_SEC_MASK_SHIFT (5U)
-/*! PIO1_PIN5_SEC_MASK - Secure mask for pin P1_5
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN5_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN5_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN5_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN6_SEC_MASK_MASK (0x40U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN6_SEC_MASK_SHIFT (6U)
-/*! PIO1_PIN6_SEC_MASK - Secure mask for pin P1_6
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN6_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN6_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN6_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN7_SEC_MASK_MASK (0x80U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN7_SEC_MASK_SHIFT (7U)
-/*! PIO1_PIN7_SEC_MASK - Secure mask for pin P1_7
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN7_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN7_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN7_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN8_SEC_MASK_MASK (0x100U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN8_SEC_MASK_SHIFT (8U)
-/*! PIO1_PIN8_SEC_MASK - Secure mask for pin P1_8
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN8_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN8_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN8_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN9_SEC_MASK_MASK (0x200U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN9_SEC_MASK_SHIFT (9U)
-/*! PIO1_PIN9_SEC_MASK - Secure mask for pin P1_9
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN9_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN9_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN9_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN10_SEC_MASK_MASK (0x400U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN10_SEC_MASK_SHIFT (10U)
-/*! PIO1_PIN10_SEC_MASK - Secure mask for pin P1_10
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN10_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN10_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN10_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN11_SEC_MASK_MASK (0x800U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN11_SEC_MASK_SHIFT (11U)
-/*! PIO1_PIN11_SEC_MASK - Secure mask for pin P1_11
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN11_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN11_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN11_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN12_SEC_MASK_MASK (0x1000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN12_SEC_MASK_SHIFT (12U)
-/*! PIO1_PIN12_SEC_MASK - Secure mask for pin P1_12
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN12_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN12_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN12_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN13_SEC_MASK_MASK (0x2000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN13_SEC_MASK_SHIFT (13U)
-/*! PIO1_PIN13_SEC_MASK - Secure mask for pin P1_13
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN13_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN13_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN13_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN14_SEC_MASK_MASK (0x4000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN14_SEC_MASK_SHIFT (14U)
-/*! PIO1_PIN14_SEC_MASK - Secure mask for pin P1_14
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN14_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN14_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN14_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN15_SEC_MASK_MASK (0x8000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN15_SEC_MASK_SHIFT (15U)
-/*! PIO1_PIN15_SEC_MASK - Secure mask for pin P1_15
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN15_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN15_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN15_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN16_SEC_MASK_MASK (0x10000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN16_SEC_MASK_SHIFT (16U)
-/*! PIO1_PIN16_SEC_MASK - Secure mask for pin P1_16
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN16_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN16_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN16_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN17_SEC_MASK_MASK (0x20000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN17_SEC_MASK_SHIFT (17U)
-/*! PIO1_PIN17_SEC_MASK - Secure mask for pin P1_17
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN17_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN17_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN17_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN18_SEC_MASK_MASK (0x40000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN18_SEC_MASK_SHIFT (18U)
-/*! PIO1_PIN18_SEC_MASK - Secure mask for pin P1_18
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN18_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN18_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN18_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN19_SEC_MASK_MASK (0x80000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN19_SEC_MASK_SHIFT (19U)
-/*! PIO1_PIN19_SEC_MASK - Secure mask for pin P1_19
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN19_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN19_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN19_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN20_SEC_MASK_MASK (0x100000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN20_SEC_MASK_SHIFT (20U)
-/*! PIO1_PIN20_SEC_MASK - Secure mask for pin P1_20
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN20_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN20_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN20_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN21_SEC_MASK_MASK (0x200000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN21_SEC_MASK_SHIFT (21U)
-/*! PIO1_PIN21_SEC_MASK - Secure mask for pin P1_21
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN21_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN21_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN21_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN22_SEC_MASK_MASK (0x400000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN22_SEC_MASK_SHIFT (22U)
-/*! PIO1_PIN22_SEC_MASK - Secure mask for pin P1_22
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN22_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN22_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN22_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN23_SEC_MASK_MASK (0x800000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN23_SEC_MASK_SHIFT (23U)
-/*! PIO1_PIN23_SEC_MASK - Secure mask for pin P1_23
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN23_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN23_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN23_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN24_SEC_MASK_MASK (0x1000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN24_SEC_MASK_SHIFT (24U)
-/*! PIO1_PIN24_SEC_MASK - Secure mask for pin P1_24
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN24_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN24_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN24_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN25_SEC_MASK_MASK (0x2000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN25_SEC_MASK_SHIFT (25U)
-/*! PIO1_PIN25_SEC_MASK - Secure mask for pin P1_25
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN25_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN25_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN25_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN26_SEC_MASK_MASK (0x4000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN26_SEC_MASK_SHIFT (26U)
-/*! PIO1_PIN26_SEC_MASK - Secure mask for pin P1_26
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN26_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN26_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN26_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN27_SEC_MASK_MASK (0x8000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN27_SEC_MASK_SHIFT (27U)
-/*! PIO1_PIN27_SEC_MASK - Secure mask for pin P1_27
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN27_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN27_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN27_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN28_SEC_MASK_MASK (0x10000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN28_SEC_MASK_SHIFT (28U)
-/*! PIO1_PIN28_SEC_MASK - Secure mask for pin P1_28
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN28_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN28_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN28_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN29_SEC_MASK_MASK (0x20000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN29_SEC_MASK_SHIFT (29U)
-/*! PIO1_PIN29_SEC_MASK - Secure mask for pin P1_29
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN29_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN29_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN29_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN30_SEC_MASK_MASK (0x40000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN30_SEC_MASK_SHIFT (30U)
-/*! PIO1_PIN30_SEC_MASK - Secure mask for pin P1_30
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN30_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN30_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN30_SEC_MASK_MASK)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN31_SEC_MASK_MASK (0x80000000U)
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN31_SEC_MASK_SHIFT (31U)
-/*! PIO1_PIN31_SEC_MASK - Secure mask for pin P1_31
- * 0b1..Pin state is readable by non-secure world.
- * 0b0..Pin state is blocked to non-secure world.
- */
-#define AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN31_SEC_MASK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN31_SEC_MASK_SHIFT)) & AHB_SECURE_CTRL_SEC_GPIO_MASK1_PIO1_PIN31_SEC_MASK_MASK)
-/*! @} */
-
-/*! @name SEC_CPU_INT_MASK0 - Secure Interrupt mask for CPU1 */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SYS_IRQ_MASK (0x1U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SYS_IRQ_SHIFT (0U)
-/*! SYS_IRQ - Watchdog Timer, Brown Out Detectors and Flash Controller interrupts
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SYS_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SYS_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SYS_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SDMA0_IRQ_MASK (0x2U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SDMA0_IRQ_SHIFT (1U)
-/*! SDMA0_IRQ - System DMA 0 (non-secure) interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SDMA0_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SDMA0_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SDMA0_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT0_IRQ_MASK (0x4U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT0_IRQ_SHIFT (2U)
-/*! GPIO_GLOBALINT0_IRQ - GPIO Group 0 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT0_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT0_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT0_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT1_IRQ_MASK (0x8U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT1_IRQ_SHIFT (3U)
-/*! GPIO_GLOBALINT1_IRQ - GPIO Group 1 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT1_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT1_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_GLOBALINT1_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ0_MASK (0x10U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ0_SHIFT (4U)
-/*! GPIO_INT0_IRQ0 - Pin interrupt 0 or pattern match engine slice 0 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ0_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ0_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ1_MASK (0x20U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ1_SHIFT (5U)
-/*! GPIO_INT0_IRQ1 - Pin interrupt 1 or pattern match engine slice 1 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ1_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ1_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ2_MASK (0x40U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ2_SHIFT (6U)
-/*! GPIO_INT0_IRQ2 - Pin interrupt 2 or pattern match engine slice 2 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ2_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ2_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ3_MASK (0x80U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ3_SHIFT (7U)
-/*! GPIO_INT0_IRQ3 - Pin interrupt 3 or pattern match engine slice 3 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ3_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_GPIO_INT0_IRQ3_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_UTICK_IRQ_MASK (0x100U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_UTICK_IRQ_SHIFT (8U)
-/*! UTICK_IRQ - Micro Tick Timer interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_UTICK_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_UTICK_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_UTICK_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MRT_IRQ_MASK (0x200U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MRT_IRQ_SHIFT (9U)
-/*! MRT_IRQ - Multi-Rate Timer interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MRT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MRT_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MRT_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER0_IRQ_MASK (0x400U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER0_IRQ_SHIFT (10U)
-/*! CTIMER0_IRQ - Standard counter/timer 0 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER0_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER0_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER0_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER1_IRQ_MASK (0x800U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER1_IRQ_SHIFT (11U)
-/*! CTIMER1_IRQ - Standard counter/timer 1 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER1_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER1_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER1_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SCT_IRQ_MASK (0x1000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SCT_IRQ_SHIFT (12U)
-/*! SCT_IRQ - SCTimer/PWM interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SCT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SCT_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_SCT_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER3_IRQ_MASK (0x2000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER3_IRQ_SHIFT (13U)
-/*! CTIMER3_IRQ - Standard counter/timer 3 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER3_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER3_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_CTIMER3_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM0_IRQ_MASK (0x4000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM0_IRQ_SHIFT (14U)
-/*! FLEXCOMM0_IRQ - Flexcomm 0 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM0_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM0_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM0_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM1_IRQ_MASK (0x8000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM1_IRQ_SHIFT (15U)
-/*! FLEXCOMM1_IRQ - Flexcomm 1 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM1_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM1_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM1_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM2_IRQ_MASK (0x10000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM2_IRQ_SHIFT (16U)
-/*! FLEXCOMM2_IRQ - Flexcomm 2 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM2_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM2_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM2_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM3_IRQ_MASK (0x20000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM3_IRQ_SHIFT (17U)
-/*! FLEXCOMM3_IRQ - Flexcomm 3 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM3_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM3_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM3_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM4_IRQ_MASK (0x40000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM4_IRQ_SHIFT (18U)
-/*! FLEXCOMM4_IRQ - Flexcomm 4 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM4_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM4_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM4_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM5_IRQ_MASK (0x80000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM5_IRQ_SHIFT (19U)
-/*! FLEXCOMM5_IRQ - Flexcomm 5 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM5_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM5_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM5_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM6_IRQ_MASK (0x100000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM6_IRQ_SHIFT (20U)
-/*! FLEXCOMM6_IRQ - Flexcomm 6 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM6_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM6_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM6_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM7_IRQ_MASK (0x200000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM7_IRQ_SHIFT (21U)
-/*! FLEXCOMM7_IRQ - Flexcomm 7 interrupt (USART, SPI, I2C, I2S).
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM7_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM7_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_FLEXCOMM7_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ADC_IRQ_MASK (0x400000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ADC_IRQ_SHIFT (22U)
-/*! ADC_IRQ - General Purpose ADC interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ADC_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ADC_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ADC_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED0_MASK (0x800000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED0_SHIFT (23U)
-/*! RESERVED0 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED0_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED0_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ACMP_IRQ_MASK (0x1000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ACMP_IRQ_SHIFT (24U)
-/*! ACMP_IRQ - Analog Comparator interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ACMP_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ACMP_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_ACMP_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED1_MASK (0x2000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED1_SHIFT (25U)
-/*! RESERVED1 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED1_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED1_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED2_MASK (0x4000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED2_SHIFT (26U)
-/*! RESERVED2 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED2_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED2_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_NEEDCLK_MASK (0x8000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_NEEDCLK_SHIFT (27U)
-/*! USB0_NEEDCLK - USB Full Speed Controller Clock request interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_NEEDCLK_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_NEEDCLK_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_IRQ_MASK (0x10000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_IRQ_SHIFT (28U)
-/*! USB0_IRQ - USB Full Speed Controller interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_USB0_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RTC_IRQ_MASK (0x20000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RTC_IRQ_SHIFT (29U)
-/*! RTC_IRQ - RTC_LITE0_ALARM_IRQ, RTC_LITE0_WAKEUP_IRQ
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RTC_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RTC_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RTC_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED3_MASK (0x40000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED3_SHIFT (30U)
-/*! RESERVED3 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED3_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_RESERVED3_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MAILBOX_IRQ_MASK (0x80000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MAILBOX_IRQ_SHIFT (31U)
-/*! MAILBOX_IRQ - Mailbox interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MAILBOX_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MAILBOX_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK0_MAILBOX_IRQ_MASK)
-/*! @} */
-
-/*! @name SEC_CPU_INT_MASK1 - Secure Interrupt mask for CPU1 */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ4_MASK (0x1U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ4_SHIFT (0U)
-/*! GPIO_INT0_IRQ4 - Pin interrupt 4 or pattern match engine slice 4 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ4_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ4_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ5_MASK (0x2U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ5_SHIFT (1U)
-/*! GPIO_INT0_IRQ5 - Pin interrupt 5 or pattern match engine slice 5 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ5_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ5_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ6_MASK (0x4U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ6_SHIFT (2U)
-/*! GPIO_INT0_IRQ6 - Pin interrupt 6 or pattern match engine slice 6 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ6(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ6_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ6_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ7_MASK (0x8U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ7_SHIFT (3U)
-/*! GPIO_INT0_IRQ7 - Pin interrupt 7 or pattern match engine slice 7 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ7(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ7_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_GPIO_INT0_IRQ7_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER2_IRQ_MASK (0x10U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER2_IRQ_SHIFT (4U)
-/*! CTIMER2_IRQ - Standard counter/timer 2 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER2_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER2_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER2_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER4_IRQ_MASK (0x20U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER4_IRQ_SHIFT (5U)
-/*! CTIMER4_IRQ - Standard counter/timer 4 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER4_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER4_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CTIMER4_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_OS_EVENT_TIMER_IRQ_MASK (0x40U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_OS_EVENT_TIMER_IRQ_SHIFT (6U)
-/*! OS_EVENT_TIMER_IRQ - OS Event Timer and OS Event Timer Wakeup interrupts
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_OS_EVENT_TIMER_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_OS_EVENT_TIMER_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_OS_EVENT_TIMER_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED0_MASK (0x80U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED0_SHIFT (7U)
-/*! RESERVED0 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED0_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED0_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED1_MASK (0x100U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED1_SHIFT (8U)
-/*! RESERVED1 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED1_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED1_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED2_MASK (0x200U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED2_SHIFT (9U)
-/*! RESERVED2 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED2(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED2_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED2_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDIO_IRQ_MASK (0x400U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDIO_IRQ_SHIFT (10U)
-/*! SDIO_IRQ - SDIO Controller interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDIO_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDIO_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDIO_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED3_MASK (0x800U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED3_SHIFT (11U)
-/*! RESERVED3 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED3(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED3_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED3_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED4_MASK (0x1000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED4_SHIFT (12U)
-/*! RESERVED4 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED4(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED4_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED4_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED5_MASK (0x2000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED5_SHIFT (13U)
-/*! RESERVED5 - Reserved. Read value is undefined, only zero should be written.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED5(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED5_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_RESERVED5_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_PHY_IRQ_MASK (0x4000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_PHY_IRQ_SHIFT (14U)
-/*! USB1_PHY_IRQ - USB High Speed PHY Controller interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_PHY_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_PHY_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_PHY_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_IRQ_MASK (0x8000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_IRQ_SHIFT (15U)
-/*! USB1_IRQ - USB High Speed Controller interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_NEEDCLK_MASK (0x10000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_NEEDCLK_SHIFT (16U)
-/*! USB1_NEEDCLK - USB High Speed Controller Clock request interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_NEEDCLK_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_USB1_NEEDCLK_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_HYPERVISOR_CALL_IRQ_MASK (0x20000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_HYPERVISOR_CALL_IRQ_SHIFT (17U)
-/*! SEC_HYPERVISOR_CALL_IRQ - Secure fault Hyper Visor call interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_HYPERVISOR_CALL_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_HYPERVISOR_CALL_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_HYPERVISOR_CALL_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ0_MASK (0x40000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ0_SHIFT (18U)
-/*! SEC_GPIO_INT0_IRQ0 - Secure Pin interrupt 0 or pattern match engine slice 0 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ0_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ0_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ1_MASK (0x80000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ1_SHIFT (19U)
-/*! SEC_GPIO_INT0_IRQ1 - Secure Pin interrupt 1 or pattern match engine slice 1 interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ1_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_GPIO_INT0_IRQ1_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PLU_IRQ_MASK (0x100000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PLU_IRQ_SHIFT (20U)
-/*! PLU_IRQ - Programmable Look-Up Controller interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PLU_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PLU_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PLU_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_VIO_IRQ_MASK (0x200000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_VIO_IRQ_SHIFT (21U)
-/*! SEC_VIO_IRQ - Security Violation interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_VIO_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_VIO_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SEC_VIO_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SHA_IRQ_MASK (0x400000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SHA_IRQ_SHIFT (22U)
-/*! SHA_IRQ - HASH-AES interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SHA_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SHA_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SHA_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CASPER_IRQ_MASK (0x800000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CASPER_IRQ_SHIFT (23U)
-/*! CASPER_IRQ - CASPER interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CASPER_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CASPER_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_CASPER_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PUFKEY_IRQ_MASK (0x1000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PUFKEY_IRQ_SHIFT (24U)
-/*! PUFKEY_IRQ - PUF interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PUFKEY_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PUFKEY_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PUFKEY_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PQ_IRQ_MASK (0x2000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PQ_IRQ_SHIFT (25U)
-/*! PQ_IRQ - Power Quad interrupt.
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PQ_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PQ_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_PQ_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDMA1_IRQ_MASK (0x4000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDMA1_IRQ_SHIFT (26U)
-/*! SDMA1_IRQ - System DMA 1 (Secure) interrupt
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDMA1_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDMA1_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_SDMA1_IRQ_MASK)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_LSPI_HS_IRQ_MASK (0x8000000U)
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_LSPI_HS_IRQ_SHIFT (27U)
-/*! LSPI_HS_IRQ - High Speed SPI interrupt
- * 0b0..
- * 0b1..
- */
-#define AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_LSPI_HS_IRQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_LSPI_HS_IRQ_SHIFT)) & AHB_SECURE_CTRL_SEC_CPU_INT_MASK1_LSPI_HS_IRQ_MASK)
-/*! @} */
-
-/*! @name SEC_MASK_LOCK - Security General Purpose register access control. */
-/*! @{ */
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK0_LOCK_MASK (0x3U)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK0_LOCK_SHIFT (0U)
-/*! SEC_GPIO_MASK0_LOCK - SEC_GPIO_MASK0 register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK0_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK0_LOCK_SHIFT)) & AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK0_LOCK_MASK)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK1_LOCK_MASK (0xCU)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK1_LOCK_SHIFT (2U)
-/*! SEC_GPIO_MASK1_LOCK - SEC_GPIO_MASK1 register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK1_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK1_LOCK_SHIFT)) & AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_GPIO_MASK1_LOCK_MASK)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK0_LOCK_MASK (0x300U)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK0_LOCK_SHIFT (8U)
-/*! SEC_CPU1_INT_MASK0_LOCK - SEC_CPU_INT_MASK0 register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK0_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK0_LOCK_SHIFT)) & AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK0_LOCK_MASK)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK1_LOCK_MASK (0xC00U)
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK1_LOCK_SHIFT (10U)
-/*! SEC_CPU1_INT_MASK1_LOCK - SEC_CPU_INT_MASK1 register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK1_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK1_LOCK_SHIFT)) & AHB_SECURE_CTRL_SEC_MASK_LOCK_SEC_CPU1_INT_MASK1_LOCK_MASK)
-/*! @} */
-
-/*! @name MASTER_SEC_LEVEL - master secure level register */
-/*! @{ */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1C_MASK (0x30U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1C_SHIFT (4U)
-/*! CPU1C - Micro-Cortex M33 (CPU1) Code bus.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1C(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1C_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1C_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1S_MASK (0xC0U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1S_SHIFT (6U)
-/*! CPU1S - Micro-Cortex M33 (CPU1) System bus.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1S(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1S_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_CPU1S_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSD_MASK (0x300U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSD_SHIFT (8U)
-/*! USBFSD - USB Full Speed Device.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSD(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSD_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSD_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA0_MASK (0xC00U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA0_SHIFT (10U)
-/*! SDMA0 - System DMA 0.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA0_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA0_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDIO_MASK (0x30000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDIO_SHIFT (16U)
-/*! SDIO - SDIO.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDIO(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDIO_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDIO_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_PQ_MASK (0xC0000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_PQ_SHIFT (18U)
-/*! PQ - Power Quad.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_PQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_PQ_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_PQ_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_HASH_MASK (0x300000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_HASH_SHIFT (20U)
-/*! HASH - Hash.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_HASH(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_HASH_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_HASH_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSH_MASK (0xC00000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSH_SHIFT (22U)
-/*! USBFSH - USB Full speed Host.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSH(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSH_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_USBFSH_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA1_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA1_SHIFT (24U)
-/*! SDMA1 - System DMA 1 security level.
- * 0b00..Non-secure and Non-priviledge user access allowed.
- * 0b01..Non-secure and Privilege access allowed.
- * 0b10..Secure and Non-priviledge user access allowed.
- * 0b11..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA1_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_SDMA1_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_MASTER_SEC_LEVEL_LOCK_MASK (0xC0000000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_MASTER_SEC_LEVEL_LOCK_SHIFT (30U)
-/*! MASTER_SEC_LEVEL_LOCK - MASTER_SEC_LEVEL write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_LEVEL_MASTER_SEC_LEVEL_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_LEVEL_MASTER_SEC_LEVEL_LOCK_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_LEVEL_MASTER_SEC_LEVEL_LOCK_MASK)
-/*! @} */
-
-/*! @name MASTER_SEC_ANTI_POL_REG - master secure level anti-pole register */
-/*! @{ */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1C_MASK (0x30U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1C_SHIFT (4U)
-/*! CPU1C - Micro-Cortex M33 (CPU1) Code bus. Must be equal to NOT(MASTER_SEC_LEVEL.CPU1C)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1C(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1C_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1C_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1S_MASK (0xC0U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1S_SHIFT (6U)
-/*! CPU1S - Micro-Cortex M33 (CPU1) System bus. Must be equal to NOT(MASTER_SEC_LEVEL.CPU1S)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1S(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1S_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_CPU1S_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSD_MASK (0x300U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSD_SHIFT (8U)
-/*! USBFSD - USB Full Speed Device. Must be equal to NOT(MASTER_SEC_LEVEL.USBFSD)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSD(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSD_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSD_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA0_MASK (0xC00U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA0_SHIFT (10U)
-/*! SDMA0 - System DMA 0. Must be equal to NOT(MASTER_SEC_LEVEL.SDMA0)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA0(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA0_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA0_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDIO_MASK (0x30000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDIO_SHIFT (16U)
-/*! SDIO - SDIO. Must be equal to NOT(MASTER_SEC_LEVEL.SDIO)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDIO(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDIO_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDIO_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_PQ_MASK (0xC0000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_PQ_SHIFT (18U)
-/*! PQ - Power Quad. Must be equal to NOT(MASTER_SEC_LEVEL.PQ)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_PQ(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_PQ_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_PQ_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_HASH_MASK (0x300000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_HASH_SHIFT (20U)
-/*! HASH - Hash. Must be equal to NOT(MASTER_SEC_LEVEL.HASH)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_HASH(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_HASH_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_HASH_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSH_MASK (0xC00000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSH_SHIFT (22U)
-/*! USBFSH - USB Full speed Host. Must be equal to NOT(MASTER_SEC_LEVEL.USBFSH)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSH(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSH_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_USBFSH_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA1_MASK (0x3000000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA1_SHIFT (24U)
-/*! SDMA1 - System DMA 1 security level. Must be equal to NOT(MASTER_SEC_LEVEL.SDMA1)
- * 0b11..Non-secure and Non-priviledge user access allowed.
- * 0b10..Non-secure and Privilege access allowed.
- * 0b01..Secure and Non-priviledge user access allowed.
- * 0b00..Secure and Priviledge user access allowed.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA1(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA1_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_SDMA1_MASK)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_MASTER_SEC_LEVEL_ANTIPOL_LOCK_MASK (0xC0000000U)
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_MASTER_SEC_LEVEL_ANTIPOL_LOCK_SHIFT (30U)
-/*! MASTER_SEC_LEVEL_ANTIPOL_LOCK - MASTER_SEC_ANTI_POL_REG register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_MASTER_SEC_LEVEL_ANTIPOL_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_MASTER_SEC_LEVEL_ANTIPOL_LOCK_SHIFT)) & AHB_SECURE_CTRL_MASTER_SEC_ANTI_POL_REG_MASTER_SEC_LEVEL_ANTIPOL_LOCK_MASK)
-/*! @} */
-
-/*! @name CPU0_LOCK_REG - Miscalleneous control signals for in Cortex M33 (CPU0) */
-/*! @{ */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_VTOR_MASK (0x3U)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_VTOR_SHIFT (0U)
-/*! LOCK_NS_VTOR - Cortex M33 (CPU0) VTOR_NS register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_VTOR(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_VTOR_SHIFT)) & AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_VTOR_MASK)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_MPU_MASK (0xCU)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_MPU_SHIFT (2U)
-/*! LOCK_NS_MPU - Cortex M33 (CPU0) non-secure MPU register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_MPU(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_MPU_SHIFT)) & AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_NS_MPU_MASK)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_VTAIRCR_MASK (0x30U)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_VTAIRCR_SHIFT (4U)
-/*! LOCK_S_VTAIRCR - Cortex M33 (CPU0) VTOR_S, AIRCR.PRIS, IRCR.BFHFNMINS registers write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_VTAIRCR(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_VTAIRCR_SHIFT)) & AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_VTAIRCR_MASK)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_MPU_MASK (0xC0U)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_MPU_SHIFT (6U)
-/*! LOCK_S_MPU - Cortex M33 (CPU0) Secure MPU registers write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_MPU(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_MPU_SHIFT)) & AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_S_MPU_MASK)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_SAU_MASK (0x300U)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_SAU_SHIFT (8U)
-/*! LOCK_SAU - Cortex M33 (CPU0) SAU registers write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_SAU(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_SAU_SHIFT)) & AHB_SECURE_CTRL_CPU0_LOCK_REG_LOCK_SAU_MASK)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_CPU0_LOCK_REG_LOCK_MASK (0xC0000000U)
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_CPU0_LOCK_REG_LOCK_SHIFT (30U)
-/*! CPU0_LOCK_REG_LOCK - CPU0_LOCK_REG write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU0_LOCK_REG_CPU0_LOCK_REG_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU0_LOCK_REG_CPU0_LOCK_REG_LOCK_SHIFT)) & AHB_SECURE_CTRL_CPU0_LOCK_REG_CPU0_LOCK_REG_LOCK_MASK)
-/*! @} */
-
-/*! @name CPU1_LOCK_REG - Miscalleneous control signals for in micro-Cortex M33 (CPU1) */
-/*! @{ */
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_VTOR_MASK (0x3U)
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_VTOR_SHIFT (0U)
-/*! LOCK_NS_VTOR - micro-Cortex M33 (CPU1) VTOR_NS register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_VTOR(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_VTOR_SHIFT)) & AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_VTOR_MASK)
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_MPU_MASK (0xCU)
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_MPU_SHIFT (2U)
-/*! LOCK_NS_MPU - micro-Cortex M33 (CPU1) non-secure MPU register write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_MPU(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_MPU_SHIFT)) & AHB_SECURE_CTRL_CPU1_LOCK_REG_LOCK_NS_MPU_MASK)
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_CPU1_LOCK_REG_LOCK_MASK (0xC0000000U)
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_CPU1_LOCK_REG_LOCK_SHIFT (30U)
-/*! CPU1_LOCK_REG_LOCK - CPU1_LOCK_REG write-lock.
- * 0b10..Writable.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_CPU1_LOCK_REG_CPU1_LOCK_REG_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_CPU1_LOCK_REG_CPU1_LOCK_REG_LOCK_SHIFT)) & AHB_SECURE_CTRL_CPU1_LOCK_REG_CPU1_LOCK_REG_LOCK_MASK)
-/*! @} */
-
-/*! @name MISC_CTRL_DP_REG - secure control duplicate register */
-/*! @{ */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_WRITE_LOCK_MASK (0x3U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_WRITE_LOCK_SHIFT (0U)
-/*! WRITE_LOCK - Write lock.
- * 0b10..Secure control registers can be written.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_WRITE_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_WRITE_LOCK_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_WRITE_LOCK_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_SECURE_CHECKING_MASK (0xCU)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_SECURE_CHECKING_SHIFT (2U)
-/*! ENABLE_SECURE_CHECKING - Enable secure check for AHB matrix.
- * 0b10..Disable check.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_SECURE_CHECKING(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_SECURE_CHECKING_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_SECURE_CHECKING_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_S_PRIV_CHECK_MASK (0x30U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_S_PRIV_CHECK_SHIFT (4U)
-/*! ENABLE_S_PRIV_CHECK - Enable secure privilege check for AHB matrix.
- * 0b10..Disable check.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_S_PRIV_CHECK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_S_PRIV_CHECK_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_S_PRIV_CHECK_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_NS_PRIV_CHECK_MASK (0xC0U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_NS_PRIV_CHECK_SHIFT (6U)
-/*! ENABLE_NS_PRIV_CHECK - Enable non-secure privilege check for AHB matrix.
- * 0b10..Disable check.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_NS_PRIV_CHECK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_NS_PRIV_CHECK_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_NS_PRIV_CHECK_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_VIOLATION_ABORT_MASK (0x300U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_VIOLATION_ABORT_SHIFT (8U)
-/*! DISABLE_VIOLATION_ABORT - Disable secure violation abort.
- * 0b10..Enable abort fort secure checker.
- * 0b01..Disable abort fort secure checker.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_VIOLATION_ABORT(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_VIOLATION_ABORT_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_VIOLATION_ABORT_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_MASK (0xC00U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_SHIFT (10U)
-/*! DISABLE_SIMPLE_MASTER_STRICT_MODE - Disable simple master strict mode.
- * 0b10..Simple master in strict mode.
- * 0b01..Simple master in tier mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SMART_MASTER_STRICT_MODE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SMART_MASTER_STRICT_MODE_SHIFT (12U)
-/*! DISABLE_SMART_MASTER_STRICT_MODE - Disable smart master strict mode.
- * 0b10..Smart master in strict mode.
- * 0b01..Smart master in tier mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SMART_MASTER_STRICT_MODE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SMART_MASTER_STRICT_MODE_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_DISABLE_SMART_MASTER_STRICT_MODE_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_IDAU_ALL_NS_MASK (0xC000U)
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_IDAU_ALL_NS_SHIFT (14U)
-/*! IDAU_ALL_NS - Disable IDAU.
- * 0b10..IDAU is enabled.
- * 0b01..IDAU is disable.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_DP_REG_IDAU_ALL_NS(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_DP_REG_IDAU_ALL_NS_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_DP_REG_IDAU_ALL_NS_MASK)
-/*! @} */
-
-/*! @name MISC_CTRL_REG - secure control register */
-/*! @{ */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_WRITE_LOCK_MASK (0x3U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_WRITE_LOCK_SHIFT (0U)
-/*! WRITE_LOCK - Write lock.
- * 0b10..Secure control registers can be written.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_WRITE_LOCK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_WRITE_LOCK_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_WRITE_LOCK_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_SECURE_CHECKING_MASK (0xCU)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_SECURE_CHECKING_SHIFT (2U)
-/*! ENABLE_SECURE_CHECKING - Enable secure check for AHB matrix.
- * 0b10..Disable check.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_SECURE_CHECKING(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_SECURE_CHECKING_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_SECURE_CHECKING_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_S_PRIV_CHECK_MASK (0x30U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_S_PRIV_CHECK_SHIFT (4U)
-/*! ENABLE_S_PRIV_CHECK - Enable secure privilege check for AHB matrix.
- * 0b10..Disable check.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_S_PRIV_CHECK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_S_PRIV_CHECK_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_S_PRIV_CHECK_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_NS_PRIV_CHECK_MASK (0xC0U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_NS_PRIV_CHECK_SHIFT (6U)
-/*! ENABLE_NS_PRIV_CHECK - Enable non-secure privilege check for AHB matrix.
- * 0b10..Disable check.
- * 0b01..Restricted mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_NS_PRIV_CHECK(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_NS_PRIV_CHECK_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_NS_PRIV_CHECK_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_VIOLATION_ABORT_MASK (0x300U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_VIOLATION_ABORT_SHIFT (8U)
-/*! DISABLE_VIOLATION_ABORT - Disable secure violation abort.
- * 0b10..Enable abort fort secure checker.
- * 0b01..Disable abort fort secure checker.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_VIOLATION_ABORT(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_VIOLATION_ABORT_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_VIOLATION_ABORT_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_MASK (0xC00U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_SHIFT (10U)
-/*! DISABLE_SIMPLE_MASTER_STRICT_MODE - Disable simple master strict mode.
- * 0b10..Simple master in strict mode.
- * 0b01..Simple master in tier mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SIMPLE_MASTER_STRICT_MODE_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SMART_MASTER_STRICT_MODE_MASK (0x3000U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SMART_MASTER_STRICT_MODE_SHIFT (12U)
-/*! DISABLE_SMART_MASTER_STRICT_MODE - Disable smart master strict mode.
- * 0b10..Smart master in strict mode.
- * 0b01..Smart master in tier mode.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SMART_MASTER_STRICT_MODE(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SMART_MASTER_STRICT_MODE_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_DISABLE_SMART_MASTER_STRICT_MODE_MASK)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_IDAU_ALL_NS_MASK (0xC000U)
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_IDAU_ALL_NS_SHIFT (14U)
-/*! IDAU_ALL_NS - Disable IDAU.
- * 0b10..IDAU is enabled.
- * 0b01..IDAU is disable.
- */
-#define AHB_SECURE_CTRL_MISC_CTRL_REG_IDAU_ALL_NS(x) (((uint32_t)(((uint32_t)(x)) << AHB_SECURE_CTRL_MISC_CTRL_REG_IDAU_ALL_NS_SHIFT)) & AHB_SECURE_CTRL_MISC_CTRL_REG_IDAU_ALL_NS_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group AHB_SECURE_CTRL_Register_Masks */
-
-
-/* AHB_SECURE_CTRL - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral AHB_SECURE_CTRL base address */
- #define AHB_SECURE_CTRL_BASE (0x500AC000u)
- /** Peripheral AHB_SECURE_CTRL base address */
- #define AHB_SECURE_CTRL_BASE_NS (0x400AC000u)
- /** Peripheral AHB_SECURE_CTRL base pointer */
- #define AHB_SECURE_CTRL ((AHB_SECURE_CTRL_Type *)AHB_SECURE_CTRL_BASE)
- /** Peripheral AHB_SECURE_CTRL base pointer */
- #define AHB_SECURE_CTRL_NS ((AHB_SECURE_CTRL_Type *)AHB_SECURE_CTRL_BASE_NS)
- /** Array initializer of AHB_SECURE_CTRL peripheral base addresses */
- #define AHB_SECURE_CTRL_BASE_ADDRS { AHB_SECURE_CTRL_BASE }
- /** Array initializer of AHB_SECURE_CTRL peripheral base pointers */
- #define AHB_SECURE_CTRL_BASE_PTRS { AHB_SECURE_CTRL }
- /** Array initializer of AHB_SECURE_CTRL peripheral base addresses */
- #define AHB_SECURE_CTRL_BASE_ADDRS_NS { AHB_SECURE_CTRL_BASE_NS }
- /** Array initializer of AHB_SECURE_CTRL peripheral base pointers */
- #define AHB_SECURE_CTRL_BASE_PTRS_NS { AHB_SECURE_CTRL_NS }
-#else
- /** Peripheral AHB_SECURE_CTRL base address */
- #define AHB_SECURE_CTRL_BASE (0x400AC000u)
- /** Peripheral AHB_SECURE_CTRL base pointer */
- #define AHB_SECURE_CTRL ((AHB_SECURE_CTRL_Type *)AHB_SECURE_CTRL_BASE)
- /** Array initializer of AHB_SECURE_CTRL peripheral base addresses */
- #define AHB_SECURE_CTRL_BASE_ADDRS { AHB_SECURE_CTRL_BASE }
- /** Array initializer of AHB_SECURE_CTRL peripheral base pointers */
- #define AHB_SECURE_CTRL_BASE_PTRS { AHB_SECURE_CTRL }
-#endif
-
-/*!
- * @}
- */ /* end of group AHB_SECURE_CTRL_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- ANACTRL Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup ANACTRL_Peripheral_Access_Layer ANACTRL Peripheral Access Layer
- * @{
- */
-
-/** ANACTRL - Register Layout Typedef */
-typedef struct {
- uint8_t RESERVED_0[4];
- __I uint32_t ANALOG_CTRL_STATUS; /**< Analog Macroblock Identity registers, Flash Status registers, offset: 0x4 */
- uint8_t RESERVED_1[4];
- __IO uint32_t FREQ_ME_CTRL; /**< Frequency Measure function control register, offset: 0xC */
- __IO uint32_t FRO192M_CTRL; /**< 192MHz Free Running OScillator (FRO) Control register, offset: 0x10 */
- __I uint32_t FRO192M_STATUS; /**< 192MHz Free Running OScillator (FRO) Status register, offset: 0x14 */
- uint8_t RESERVED_2[8];
- __IO uint32_t XO32M_CTRL; /**< High speed Crystal Oscillator Control register, offset: 0x20 */
- __I uint32_t XO32M_STATUS; /**< High speed Crystal Oscillator Status register, offset: 0x24 */
- uint8_t RESERVED_3[8];
- __IO uint32_t BOD_DCDC_INT_CTRL; /**< Brown Out Detectors (BoDs) & DCDC interrupts generation control register, offset: 0x30 */
- __I uint32_t BOD_DCDC_INT_STATUS; /**< BoDs & DCDC interrupts status register, offset: 0x34 */
- uint8_t RESERVED_4[8];
- __IO uint32_t RINGO0_CTRL; /**< First Ring Oscillator module control register., offset: 0x40 */
- __IO uint32_t RINGO1_CTRL; /**< Second Ring Oscillator module control register., offset: 0x44 */
- __IO uint32_t RINGO2_CTRL; /**< Third Ring Oscillator module control register., offset: 0x48 */
- uint8_t RESERVED_5[180];
- __IO uint32_t USBHS_PHY_CTRL; /**< USB High Speed Phy Control, offset: 0x100 */
-} ANACTRL_Type;
-
-/* ----------------------------------------------------------------------------
- -- ANACTRL Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup ANACTRL_Register_Masks ANACTRL Register Masks
- * @{
- */
-
-/*! @name ANALOG_CTRL_STATUS - Analog Macroblock Identity registers, Flash Status registers */
-/*! @{ */
-#define ANACTRL_ANALOG_CTRL_STATUS_FLASH_PWRDWN_MASK (0x1000U)
-#define ANACTRL_ANALOG_CTRL_STATUS_FLASH_PWRDWN_SHIFT (12U)
-/*! FLASH_PWRDWN - Flash Power Down status.
- * 0b0..Flash is not in power down mode.
- * 0b1..Flash is in power down mode.
- */
-#define ANACTRL_ANALOG_CTRL_STATUS_FLASH_PWRDWN(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_ANALOG_CTRL_STATUS_FLASH_PWRDWN_SHIFT)) & ANACTRL_ANALOG_CTRL_STATUS_FLASH_PWRDWN_MASK)
-#define ANACTRL_ANALOG_CTRL_STATUS_FLASH_INIT_ERROR_MASK (0x2000U)
-#define ANACTRL_ANALOG_CTRL_STATUS_FLASH_INIT_ERROR_SHIFT (13U)
-/*! FLASH_INIT_ERROR - Flash initialization error status.
- * 0b0..No error.
- * 0b1..At least one error occured during flash initialization..
- */
-#define ANACTRL_ANALOG_CTRL_STATUS_FLASH_INIT_ERROR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_ANALOG_CTRL_STATUS_FLASH_INIT_ERROR_SHIFT)) & ANACTRL_ANALOG_CTRL_STATUS_FLASH_INIT_ERROR_MASK)
-/*! @} */
-
-/*! @name FREQ_ME_CTRL - Frequency Measure function control register */
-/*! @{ */
-#define ANACTRL_FREQ_ME_CTRL_CAPVAL_SCALE_MASK (0x7FFFFFFFU)
-#define ANACTRL_FREQ_ME_CTRL_CAPVAL_SCALE_SHIFT (0U)
-/*! CAPVAL_SCALE - Frequency measure result /Frequency measur scale
- */
-#define ANACTRL_FREQ_ME_CTRL_CAPVAL_SCALE(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FREQ_ME_CTRL_CAPVAL_SCALE_SHIFT)) & ANACTRL_FREQ_ME_CTRL_CAPVAL_SCALE_MASK)
-#define ANACTRL_FREQ_ME_CTRL_PROG_MASK (0x80000000U)
-#define ANACTRL_FREQ_ME_CTRL_PROG_SHIFT (31U)
-/*! PROG - Set this bit to one to initiate a frequency measurement cycle. Hardware clears this bit
- * when the measurement cycle has completed and there is valid capture data in the CAPVAL field
- * (bits 30:0).
- */
-#define ANACTRL_FREQ_ME_CTRL_PROG(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FREQ_ME_CTRL_PROG_SHIFT)) & ANACTRL_FREQ_ME_CTRL_PROG_MASK)
-/*! @} */
-
-/*! @name FRO192M_CTRL - 192MHz Free Running OScillator (FRO) Control register */
-/*! @{ */
-#define ANACTRL_FRO192M_CTRL_ENA_12MHZCLK_MASK (0x4000U)
-#define ANACTRL_FRO192M_CTRL_ENA_12MHZCLK_SHIFT (14U)
-/*! ENA_12MHZCLK - 12 MHz clock control.
- * 0b0..12 MHz clock is disabled.
- * 0b1..12 MHz clock is enabled.
- */
-#define ANACTRL_FRO192M_CTRL_ENA_12MHZCLK(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_CTRL_ENA_12MHZCLK_SHIFT)) & ANACTRL_FRO192M_CTRL_ENA_12MHZCLK_MASK)
-#define ANACTRL_FRO192M_CTRL_ENA_48MHZCLK_MASK (0x8000U)
-#define ANACTRL_FRO192M_CTRL_ENA_48MHZCLK_SHIFT (15U)
-/*! ENA_48MHZCLK - 48 MHz clock control.
- * 0b0..Reserved.
- * 0b1..48 MHz clock is enabled.
- */
-#define ANACTRL_FRO192M_CTRL_ENA_48MHZCLK(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_CTRL_ENA_48MHZCLK_SHIFT)) & ANACTRL_FRO192M_CTRL_ENA_48MHZCLK_MASK)
-#define ANACTRL_FRO192M_CTRL_DAC_TRIM_MASK (0xFF0000U)
-#define ANACTRL_FRO192M_CTRL_DAC_TRIM_SHIFT (16U)
-/*! DAC_TRIM - Frequency trim.
- */
-#define ANACTRL_FRO192M_CTRL_DAC_TRIM(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_CTRL_DAC_TRIM_SHIFT)) & ANACTRL_FRO192M_CTRL_DAC_TRIM_MASK)
-#define ANACTRL_FRO192M_CTRL_USBCLKADJ_MASK (0x1000000U)
-#define ANACTRL_FRO192M_CTRL_USBCLKADJ_SHIFT (24U)
-/*! USBCLKADJ - If this bit is set and the USB peripheral is enabled into full speed device mode,
- * the USB block will provide FRO clock adjustments to lock it to the host clock using the SOF
- * packets.
- */
-#define ANACTRL_FRO192M_CTRL_USBCLKADJ(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_CTRL_USBCLKADJ_SHIFT)) & ANACTRL_FRO192M_CTRL_USBCLKADJ_MASK)
-#define ANACTRL_FRO192M_CTRL_USBMODCHG_MASK (0x2000000U)
-#define ANACTRL_FRO192M_CTRL_USBMODCHG_SHIFT (25U)
-/*! USBMODCHG - If it reads as 1 when reading the DAC_TRIM field and USBCLKADJ=1, it should be re-read until it is 0.
- */
-#define ANACTRL_FRO192M_CTRL_USBMODCHG(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_CTRL_USBMODCHG_SHIFT)) & ANACTRL_FRO192M_CTRL_USBMODCHG_MASK)
-#define ANACTRL_FRO192M_CTRL_ENA_96MHZCLK_MASK (0x40000000U)
-#define ANACTRL_FRO192M_CTRL_ENA_96MHZCLK_SHIFT (30U)
-/*! ENA_96MHZCLK - 96 MHz clock control.
- * 0b0..96 MHz clock is disabled.
- * 0b1..96 MHz clock is enabled.
- */
-#define ANACTRL_FRO192M_CTRL_ENA_96MHZCLK(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_CTRL_ENA_96MHZCLK_SHIFT)) & ANACTRL_FRO192M_CTRL_ENA_96MHZCLK_MASK)
-/*! @} */
-
-/*! @name FRO192M_STATUS - 192MHz Free Running OScillator (FRO) Status register */
-/*! @{ */
-#define ANACTRL_FRO192M_STATUS_CLK_VALID_MASK (0x1U)
-#define ANACTRL_FRO192M_STATUS_CLK_VALID_SHIFT (0U)
-/*! CLK_VALID - Output clock valid signal. Indicates that CCO clock has settled.
- * 0b0..No output clock present (None of 12 MHz, 48 MHz or 96 MHz clock is available).
- * 0b1..Clock is present (12 MHz, 48 MHz or 96 MHz can be output if they are enable respectively by
- * FRO192M_CTRL.ENA_12MHZCLK/ENA_48MHZCLK/ENA_96MHZCLK).
- */
-#define ANACTRL_FRO192M_STATUS_CLK_VALID(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_STATUS_CLK_VALID_SHIFT)) & ANACTRL_FRO192M_STATUS_CLK_VALID_MASK)
-#define ANACTRL_FRO192M_STATUS_ATB_VCTRL_MASK (0x2U)
-#define ANACTRL_FRO192M_STATUS_ATB_VCTRL_SHIFT (1U)
-/*! ATB_VCTRL - CCO threshold voltage detector output (signal vcco_ok). Once the CCO voltage crosses
- * the threshold voltage of a SLVT transistor, this output signal will go high. It is also
- * possible to observe the clk_valid signal.
- */
-#define ANACTRL_FRO192M_STATUS_ATB_VCTRL(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_FRO192M_STATUS_ATB_VCTRL_SHIFT)) & ANACTRL_FRO192M_STATUS_ATB_VCTRL_MASK)
-/*! @} */
-
-/*! @name XO32M_CTRL - High speed Crystal Oscillator Control register */
-/*! @{ */
-#define ANACTRL_XO32M_CTRL_ACBUF_PASS_ENABLE_MASK (0x400000U)
-#define ANACTRL_XO32M_CTRL_ACBUF_PASS_ENABLE_SHIFT (22U)
-/*! ACBUF_PASS_ENABLE - Bypass enable of XO AC buffer enable in pll and top level.
- * 0b0..XO AC buffer bypass is disabled.
- * 0b1..XO AC buffer bypass is enabled.
- */
-#define ANACTRL_XO32M_CTRL_ACBUF_PASS_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_XO32M_CTRL_ACBUF_PASS_ENABLE_SHIFT)) & ANACTRL_XO32M_CTRL_ACBUF_PASS_ENABLE_MASK)
-#define ANACTRL_XO32M_CTRL_ENABLE_PLL_USB_OUT_MASK (0x800000U)
-#define ANACTRL_XO32M_CTRL_ENABLE_PLL_USB_OUT_SHIFT (23U)
-/*! ENABLE_PLL_USB_OUT - Enable High speed Crystal oscillator output to USB HS PLL.
- * 0b0..High speed Crystal oscillator output to USB HS PLL is disabled.
- * 0b1..High speed Crystal oscillator output to USB HS PLL is enabled.
- */
-#define ANACTRL_XO32M_CTRL_ENABLE_PLL_USB_OUT(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_XO32M_CTRL_ENABLE_PLL_USB_OUT_SHIFT)) & ANACTRL_XO32M_CTRL_ENABLE_PLL_USB_OUT_MASK)
-#define ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT_MASK (0x1000000U)
-#define ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT_SHIFT (24U)
-/*! ENABLE_SYSTEM_CLK_OUT - Enable XO 32 MHz output to CPU system.
- * 0b0..High speed Crystal oscillator output to CPU system is disabled.
- * 0b1..High speed Crystal oscillator output to CPU system is enabled.
- */
-#define ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT_SHIFT)) & ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT_MASK)
-/*! @} */
-
-/*! @name XO32M_STATUS - High speed Crystal Oscillator Status register */
-/*! @{ */
-#define ANACTRL_XO32M_STATUS_XO_READY_MASK (0x1U)
-#define ANACTRL_XO32M_STATUS_XO_READY_SHIFT (0U)
-/*! XO_READY - Indicates XO out frequency statibilty.
- * 0b0..XO output frequency is not yet stable.
- * 0b1..XO output frequency is stable.
- */
-#define ANACTRL_XO32M_STATUS_XO_READY(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_XO32M_STATUS_XO_READY_SHIFT)) & ANACTRL_XO32M_STATUS_XO_READY_MASK)
-/*! @} */
-
-/*! @name BOD_DCDC_INT_CTRL - Brown Out Detectors (BoDs) & DCDC interrupts generation control register */
-/*! @{ */
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_ENABLE_MASK (0x1U)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_ENABLE_SHIFT (0U)
-/*! BODVBAT_INT_ENABLE - BOD VBAT interrupt control.
- * 0b0..BOD VBAT interrupt is disabled.
- * 0b1..BOD VBAT interrupt is enabled.
- */
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_ENABLE_SHIFT)) & ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_ENABLE_MASK)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_CLEAR_MASK (0x2U)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_CLEAR_SHIFT (1U)
-/*! BODVBAT_INT_CLEAR - BOD VBAT interrupt clear.1: Clear the interrupt. Self-cleared bit.
- */
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_CLEAR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_CLEAR_SHIFT)) & ANACTRL_BOD_DCDC_INT_CTRL_BODVBAT_INT_CLEAR_MASK)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_ENABLE_MASK (0x4U)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_ENABLE_SHIFT (2U)
-/*! BODCORE_INT_ENABLE - BOD CORE interrupt control.
- * 0b0..BOD CORE interrupt is disabled.
- * 0b1..BOD CORE interrupt is enabled.
- */
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_ENABLE_SHIFT)) & ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_ENABLE_MASK)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_CLEAR_MASK (0x8U)
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_CLEAR_SHIFT (3U)
-/*! BODCORE_INT_CLEAR - BOD CORE interrupt clear.1: Clear the interrupt. Self-cleared bit.
- */
-#define ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_CLEAR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_CLEAR_SHIFT)) & ANACTRL_BOD_DCDC_INT_CTRL_BODCORE_INT_CLEAR_MASK)
-#define ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_ENABLE_MASK (0x10U)
-#define ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_ENABLE_SHIFT (4U)
-/*! DCDC_INT_ENABLE - DCDC interrupt control.
- * 0b0..DCDC interrupt is disabled.
- * 0b1..DCDC interrupt is enabled.
- */
-#define ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_ENABLE_SHIFT)) & ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_ENABLE_MASK)
-#define ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_CLEAR_MASK (0x20U)
-#define ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_CLEAR_SHIFT (5U)
-/*! DCDC_INT_CLEAR - DCDC interrupt clear.1: Clear the interrupt. Self-cleared bit.
- */
-#define ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_CLEAR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_CLEAR_SHIFT)) & ANACTRL_BOD_DCDC_INT_CTRL_DCDC_INT_CLEAR_MASK)
-/*! @} */
-
-/*! @name BOD_DCDC_INT_STATUS - BoDs & DCDC interrupts status register */
-/*! @{ */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_STATUS_MASK (0x1U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_STATUS_SHIFT (0U)
-/*! BODVBAT_STATUS - BOD VBAT Interrupt status before Interrupt Enable.
- * 0b0..No interrupt pending..
- * 0b1..Interrupt pending..
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_STATUS_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_STATUS_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_INT_STATUS_MASK (0x2U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_INT_STATUS_SHIFT (1U)
-/*! BODVBAT_INT_STATUS - BOD VBAT Interrupt status after Interrupt Enable.
- * 0b0..No interrupt pending..
- * 0b1..Interrupt pending..
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_INT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_INT_STATUS_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_INT_STATUS_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_VAL_MASK (0x4U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_VAL_SHIFT (2U)
-/*! BODVBAT_VAL - Current value of BOD VBAT power status output.
- * 0b0..VBAT voltage level is below the threshold.
- * 0b1..VBAT voltage level is above the threshold.
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_VAL(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_VAL_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_BODVBAT_VAL_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_STATUS_MASK (0x8U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_STATUS_SHIFT (3U)
-/*! BODCORE_STATUS - BOD CORE Interrupt status before Interrupt Enable.
- * 0b0..No interrupt pending..
- * 0b1..Interrupt pending..
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_STATUS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_STATUS_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_STATUS_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_INT_STATUS_MASK (0x10U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_INT_STATUS_SHIFT (4U)
-/*! BODCORE_INT_STATUS - BOD CORE Interrupt status after Interrupt Enable.
- * 0b0..No interrupt pending..
- * 0b1..Interrupt pending..
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_INT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_INT_STATUS_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_INT_STATUS_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_VAL_MASK (0x20U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_VAL_SHIFT (5U)
-/*! BODCORE_VAL - Current value of BOD CORE power status output.
- * 0b0..CORE voltage level is below the threshold.
- * 0b1..CORE voltage level is above the threshold.
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_VAL(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_VAL_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_BODCORE_VAL_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_STATUS_MASK (0x40U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_STATUS_SHIFT (6U)
-/*! DCDC_STATUS - DCDC Interrupt status before Interrupt Enable.
- * 0b0..No interrupt pending..
- * 0b1..Interrupt pending..
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_STATUS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_DCDC_STATUS_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_DCDC_STATUS_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_INT_STATUS_MASK (0x80U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_INT_STATUS_SHIFT (7U)
-/*! DCDC_INT_STATUS - DCDC Interrupt status after Interrupt Enable.
- * 0b0..No interrupt pending..
- * 0b1..Interrupt pending..
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_INT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_DCDC_INT_STATUS_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_DCDC_INT_STATUS_MASK)
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_VAL_MASK (0x100U)
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_VAL_SHIFT (8U)
-/*! DCDC_VAL - Current value of DCDC power status output.
- * 0b0..DCDC output Voltage is below the targeted regulation level.
- * 0b1..DCDC output Voltage is above the targeted regulation level.
- */
-#define ANACTRL_BOD_DCDC_INT_STATUS_DCDC_VAL(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_BOD_DCDC_INT_STATUS_DCDC_VAL_SHIFT)) & ANACTRL_BOD_DCDC_INT_STATUS_DCDC_VAL_MASK)
-/*! @} */
-
-/*! @name RINGO0_CTRL - First Ring Oscillator module control register. */
-/*! @{ */
-#define ANACTRL_RINGO0_CTRL_SL_MASK (0x1U)
-#define ANACTRL_RINGO0_CTRL_SL_SHIFT (0U)
-/*! SL - Select short or long ringo (for all ringos types).
- * 0b0..Select short ringo (few elements).
- * 0b1..Select long ringo (many elements).
- */
-#define ANACTRL_RINGO0_CTRL_SL(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_SL_SHIFT)) & ANACTRL_RINGO0_CTRL_SL_MASK)
-#define ANACTRL_RINGO0_CTRL_FS_MASK (0x2U)
-#define ANACTRL_RINGO0_CTRL_FS_SHIFT (1U)
-/*! FS - Ringo frequency output divider.
- * 0b0..High frequency output (frequency lower than 100 MHz).
- * 0b1..Low frequency output (frequency lower than 10 MHz).
- */
-#define ANACTRL_RINGO0_CTRL_FS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_FS_SHIFT)) & ANACTRL_RINGO0_CTRL_FS_MASK)
-#define ANACTRL_RINGO0_CTRL_SWN_SWP_MASK (0xCU)
-#define ANACTRL_RINGO0_CTRL_SWN_SWP_SHIFT (2U)
-/*! SWN_SWP - PN-Ringos (P-Transistor and N-Transistor processing) control.
- * 0b00..Normal mode.
- * 0b01..P-Monitor mode. Measure with weak P transistor.
- * 0b10..P-Monitor mode. Measure with weak N transistor.
- * 0b11..Don't use.
- */
-#define ANACTRL_RINGO0_CTRL_SWN_SWP(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_SWN_SWP_SHIFT)) & ANACTRL_RINGO0_CTRL_SWN_SWP_MASK)
-#define ANACTRL_RINGO0_CTRL_PD_MASK (0x10U)
-#define ANACTRL_RINGO0_CTRL_PD_SHIFT (4U)
-/*! PD - Ringo module Power control.
- * 0b0..The Ringo module is enabled.
- * 0b1..The Ringo module is disabled.
- */
-#define ANACTRL_RINGO0_CTRL_PD(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_PD_SHIFT)) & ANACTRL_RINGO0_CTRL_PD_MASK)
-#define ANACTRL_RINGO0_CTRL_E_ND0_MASK (0x20U)
-#define ANACTRL_RINGO0_CTRL_E_ND0_SHIFT (5U)
-/*! E_ND0 - First NAND2-based ringo control.
- * 0b0..First NAND2-based ringo is disabled.
- * 0b1..First NAND2-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_ND0(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_ND0_SHIFT)) & ANACTRL_RINGO0_CTRL_E_ND0_MASK)
-#define ANACTRL_RINGO0_CTRL_E_ND1_MASK (0x40U)
-#define ANACTRL_RINGO0_CTRL_E_ND1_SHIFT (6U)
-/*! E_ND1 - Second NAND2-based ringo control.
- * 0b0..Second NAND2-based ringo is disabled.
- * 0b1..Second NAND2-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_ND1(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_ND1_SHIFT)) & ANACTRL_RINGO0_CTRL_E_ND1_MASK)
-#define ANACTRL_RINGO0_CTRL_E_NR0_MASK (0x80U)
-#define ANACTRL_RINGO0_CTRL_E_NR0_SHIFT (7U)
-/*! E_NR0 - First NOR2-based ringo control.
- * 0b0..First NOR2-based ringo is disabled.
- * 0b1..First NOR2-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_NR0(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_NR0_SHIFT)) & ANACTRL_RINGO0_CTRL_E_NR0_MASK)
-#define ANACTRL_RINGO0_CTRL_E_NR1_MASK (0x100U)
-#define ANACTRL_RINGO0_CTRL_E_NR1_SHIFT (8U)
-/*! E_NR1 - Second NOR2-based ringo control.
- * 0b0..Second NORD2-based ringo is disabled.
- * 0b1..Second NORD2-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_NR1(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_NR1_SHIFT)) & ANACTRL_RINGO0_CTRL_E_NR1_MASK)
-#define ANACTRL_RINGO0_CTRL_E_IV0_MASK (0x200U)
-#define ANACTRL_RINGO0_CTRL_E_IV0_SHIFT (9U)
-/*! E_IV0 - First Inverter-based ringo control.
- * 0b0..First INV-based ringo is disabled.
- * 0b1..First INV-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_IV0(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_IV0_SHIFT)) & ANACTRL_RINGO0_CTRL_E_IV0_MASK)
-#define ANACTRL_RINGO0_CTRL_E_IV1_MASK (0x400U)
-#define ANACTRL_RINGO0_CTRL_E_IV1_SHIFT (10U)
-/*! E_IV1 - Second Inverter-based ringo control.
- * 0b0..Second INV-based ringo is disabled.
- * 0b1..Second INV-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_IV1(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_IV1_SHIFT)) & ANACTRL_RINGO0_CTRL_E_IV1_MASK)
-#define ANACTRL_RINGO0_CTRL_E_PN0_MASK (0x800U)
-#define ANACTRL_RINGO0_CTRL_E_PN0_SHIFT (11U)
-/*! E_PN0 - First PN (P-Transistor and N-Transistor processing) monitor control.
- * 0b0..First PN-based ringo is disabled.
- * 0b1..First PN-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_PN0(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_PN0_SHIFT)) & ANACTRL_RINGO0_CTRL_E_PN0_MASK)
-#define ANACTRL_RINGO0_CTRL_E_PN1_MASK (0x1000U)
-#define ANACTRL_RINGO0_CTRL_E_PN1_SHIFT (12U)
-/*! E_PN1 - Second PN (P-Transistor and N-Transistor processing) monitor control.
- * 0b0..Second PN-based ringo is disabled.
- * 0b1..Second PN-based ringo is enabled.
- */
-#define ANACTRL_RINGO0_CTRL_E_PN1(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_E_PN1_SHIFT)) & ANACTRL_RINGO0_CTRL_E_PN1_MASK)
-#define ANACTRL_RINGO0_CTRL_DIVISOR_MASK (0xF0000U)
-#define ANACTRL_RINGO0_CTRL_DIVISOR_SHIFT (16U)
-/*! DIVISOR - Ringo out Clock divider value. Frequency Output = Frequency input / (DIViSOR+1). (minimum = Frequency input / 16)
- */
-#define ANACTRL_RINGO0_CTRL_DIVISOR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_DIVISOR_SHIFT)) & ANACTRL_RINGO0_CTRL_DIVISOR_MASK)
-#define ANACTRL_RINGO0_CTRL_DIV_UPDATE_REQ_MASK (0x80000000U)
-#define ANACTRL_RINGO0_CTRL_DIV_UPDATE_REQ_SHIFT (31U)
-/*! DIV_UPDATE_REQ - Ringo clock out Divider status flag. Set when a change is made to the divider
- * value, cleared when the change is complete.
- */
-#define ANACTRL_RINGO0_CTRL_DIV_UPDATE_REQ(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO0_CTRL_DIV_UPDATE_REQ_SHIFT)) & ANACTRL_RINGO0_CTRL_DIV_UPDATE_REQ_MASK)
-/*! @} */
-
-/*! @name RINGO1_CTRL - Second Ring Oscillator module control register. */
-/*! @{ */
-#define ANACTRL_RINGO1_CTRL_S_MASK (0x1U)
-#define ANACTRL_RINGO1_CTRL_S_SHIFT (0U)
-/*! S - Select short or long ringo (for all ringos types).
- * 0b0..Select short ringo (few elements).
- * 0b1..Select long ringo (many elements).
- */
-#define ANACTRL_RINGO1_CTRL_S(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_S_SHIFT)) & ANACTRL_RINGO1_CTRL_S_MASK)
-#define ANACTRL_RINGO1_CTRL_FS_MASK (0x2U)
-#define ANACTRL_RINGO1_CTRL_FS_SHIFT (1U)
-/*! FS - Ringo frequency output divider.
- * 0b0..High frequency output (frequency lower than 100 MHz).
- * 0b1..Low frequency output (frequency lower than 10 MHz).
- */
-#define ANACTRL_RINGO1_CTRL_FS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_FS_SHIFT)) & ANACTRL_RINGO1_CTRL_FS_MASK)
-#define ANACTRL_RINGO1_CTRL_PD_MASK (0x4U)
-#define ANACTRL_RINGO1_CTRL_PD_SHIFT (2U)
-/*! PD - Ringo module Power control.
- * 0b0..The Ringo module is enabled.
- * 0b1..The Ringo module is disabled.
- */
-#define ANACTRL_RINGO1_CTRL_PD(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_PD_SHIFT)) & ANACTRL_RINGO1_CTRL_PD_MASK)
-#define ANACTRL_RINGO1_CTRL_E_R24_MASK (0x8U)
-#define ANACTRL_RINGO1_CTRL_E_R24_SHIFT (3U)
-/*! E_R24 - .
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO1_CTRL_E_R24(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_E_R24_SHIFT)) & ANACTRL_RINGO1_CTRL_E_R24_MASK)
-#define ANACTRL_RINGO1_CTRL_E_R35_MASK (0x10U)
-#define ANACTRL_RINGO1_CTRL_E_R35_SHIFT (4U)
-/*! E_R35 - .
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO1_CTRL_E_R35(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_E_R35_SHIFT)) & ANACTRL_RINGO1_CTRL_E_R35_MASK)
-#define ANACTRL_RINGO1_CTRL_E_M2_MASK (0x20U)
-#define ANACTRL_RINGO1_CTRL_E_M2_SHIFT (5U)
-/*! E_M2 - Metal 2 (M2) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO1_CTRL_E_M2(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_E_M2_SHIFT)) & ANACTRL_RINGO1_CTRL_E_M2_MASK)
-#define ANACTRL_RINGO1_CTRL_E_M3_MASK (0x40U)
-#define ANACTRL_RINGO1_CTRL_E_M3_SHIFT (6U)
-/*! E_M3 - Metal 3 (M3) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO1_CTRL_E_M3(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_E_M3_SHIFT)) & ANACTRL_RINGO1_CTRL_E_M3_MASK)
-#define ANACTRL_RINGO1_CTRL_E_M4_MASK (0x80U)
-#define ANACTRL_RINGO1_CTRL_E_M4_SHIFT (7U)
-/*! E_M4 - Metal 4 (M4) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO1_CTRL_E_M4(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_E_M4_SHIFT)) & ANACTRL_RINGO1_CTRL_E_M4_MASK)
-#define ANACTRL_RINGO1_CTRL_E_M5_MASK (0x100U)
-#define ANACTRL_RINGO1_CTRL_E_M5_SHIFT (8U)
-/*! E_M5 - Metal 5 (M5) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO1_CTRL_E_M5(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_E_M5_SHIFT)) & ANACTRL_RINGO1_CTRL_E_M5_MASK)
-#define ANACTRL_RINGO1_CTRL_DIVISOR_MASK (0xF0000U)
-#define ANACTRL_RINGO1_CTRL_DIVISOR_SHIFT (16U)
-/*! DIVISOR - Ringo out Clock divider value. Frequency Output = Frequency input / (DIViSOR+1). (minimum = Frequency input / 16)
- */
-#define ANACTRL_RINGO1_CTRL_DIVISOR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_DIVISOR_SHIFT)) & ANACTRL_RINGO1_CTRL_DIVISOR_MASK)
-#define ANACTRL_RINGO1_CTRL_DIV_UPDATE_REQ_MASK (0x80000000U)
-#define ANACTRL_RINGO1_CTRL_DIV_UPDATE_REQ_SHIFT (31U)
-/*! DIV_UPDATE_REQ - Ringo clock out Divider status flag. Set when a change is made to the divider
- * value, cleared when the change is complete.
- */
-#define ANACTRL_RINGO1_CTRL_DIV_UPDATE_REQ(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO1_CTRL_DIV_UPDATE_REQ_SHIFT)) & ANACTRL_RINGO1_CTRL_DIV_UPDATE_REQ_MASK)
-/*! @} */
-
-/*! @name RINGO2_CTRL - Third Ring Oscillator module control register. */
-/*! @{ */
-#define ANACTRL_RINGO2_CTRL_S_MASK (0x1U)
-#define ANACTRL_RINGO2_CTRL_S_SHIFT (0U)
-/*! S - Select short or long ringo (for all ringos types).
- * 0b0..Select short ringo (few elements).
- * 0b1..Select long ringo (many elements).
- */
-#define ANACTRL_RINGO2_CTRL_S(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_S_SHIFT)) & ANACTRL_RINGO2_CTRL_S_MASK)
-#define ANACTRL_RINGO2_CTRL_FS_MASK (0x2U)
-#define ANACTRL_RINGO2_CTRL_FS_SHIFT (1U)
-/*! FS - Ringo frequency output divider.
- * 0b0..High frequency output (frequency lower than 100 MHz).
- * 0b1..Low frequency output (frequency lower than 10 MHz).
- */
-#define ANACTRL_RINGO2_CTRL_FS(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_FS_SHIFT)) & ANACTRL_RINGO2_CTRL_FS_MASK)
-#define ANACTRL_RINGO2_CTRL_PD_MASK (0x4U)
-#define ANACTRL_RINGO2_CTRL_PD_SHIFT (2U)
-/*! PD - Ringo module Power control.
- * 0b0..The Ringo module is enabled.
- * 0b1..The Ringo module is disabled.
- */
-#define ANACTRL_RINGO2_CTRL_PD(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_PD_SHIFT)) & ANACTRL_RINGO2_CTRL_PD_MASK)
-#define ANACTRL_RINGO2_CTRL_E_R24_MASK (0x8U)
-#define ANACTRL_RINGO2_CTRL_E_R24_SHIFT (3U)
-/*! E_R24 - .
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO2_CTRL_E_R24(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_E_R24_SHIFT)) & ANACTRL_RINGO2_CTRL_E_R24_MASK)
-#define ANACTRL_RINGO2_CTRL_E_R35_MASK (0x10U)
-#define ANACTRL_RINGO2_CTRL_E_R35_SHIFT (4U)
-/*! E_R35 - .
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO2_CTRL_E_R35(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_E_R35_SHIFT)) & ANACTRL_RINGO2_CTRL_E_R35_MASK)
-#define ANACTRL_RINGO2_CTRL_E_M2_MASK (0x20U)
-#define ANACTRL_RINGO2_CTRL_E_M2_SHIFT (5U)
-/*! E_M2 - Metal 2 (M2) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO2_CTRL_E_M2(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_E_M2_SHIFT)) & ANACTRL_RINGO2_CTRL_E_M2_MASK)
-#define ANACTRL_RINGO2_CTRL_E_M3_MASK (0x40U)
-#define ANACTRL_RINGO2_CTRL_E_M3_SHIFT (6U)
-/*! E_M3 - Metal 3 (M3) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO2_CTRL_E_M3(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_E_M3_SHIFT)) & ANACTRL_RINGO2_CTRL_E_M3_MASK)
-#define ANACTRL_RINGO2_CTRL_E_M4_MASK (0x80U)
-#define ANACTRL_RINGO2_CTRL_E_M4_SHIFT (7U)
-/*! E_M4 - Metal 4 (M4) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO2_CTRL_E_M4(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_E_M4_SHIFT)) & ANACTRL_RINGO2_CTRL_E_M4_MASK)
-#define ANACTRL_RINGO2_CTRL_E_M5_MASK (0x100U)
-#define ANACTRL_RINGO2_CTRL_E_M5_SHIFT (8U)
-/*! E_M5 - Metal 5 (M5) monitor control.
- * 0b0..Ringo is disabled.
- * 0b1..Ringo is enabled.
- */
-#define ANACTRL_RINGO2_CTRL_E_M5(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_E_M5_SHIFT)) & ANACTRL_RINGO2_CTRL_E_M5_MASK)
-#define ANACTRL_RINGO2_CTRL_DIVISOR_MASK (0xF0000U)
-#define ANACTRL_RINGO2_CTRL_DIVISOR_SHIFT (16U)
-/*! DIVISOR - Ringo out Clock divider value. Frequency Output = Frequency input / (DIViSOR+1). (minimum = Frequency input / 16)
- */
-#define ANACTRL_RINGO2_CTRL_DIVISOR(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_DIVISOR_SHIFT)) & ANACTRL_RINGO2_CTRL_DIVISOR_MASK)
-#define ANACTRL_RINGO2_CTRL_DIV_UPDATE_REQ_MASK (0x80000000U)
-#define ANACTRL_RINGO2_CTRL_DIV_UPDATE_REQ_SHIFT (31U)
-/*! DIV_UPDATE_REQ - Ringo clock out Divider status flag. Set when a change is made to the divider
- * value, cleared when the change is complete.
- */
-#define ANACTRL_RINGO2_CTRL_DIV_UPDATE_REQ(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_RINGO2_CTRL_DIV_UPDATE_REQ_SHIFT)) & ANACTRL_RINGO2_CTRL_DIV_UPDATE_REQ_MASK)
-/*! @} */
-
-/*! @name USBHS_PHY_CTRL - USB High Speed Phy Control */
-/*! @{ */
-#define ANACTRL_USBHS_PHY_CTRL_usb_vbusvalid_ext_MASK (0x1U)
-#define ANACTRL_USBHS_PHY_CTRL_usb_vbusvalid_ext_SHIFT (0U)
-/*! usb_vbusvalid_ext - Override value for Vbus if using external detectors.
- */
-#define ANACTRL_USBHS_PHY_CTRL_usb_vbusvalid_ext(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_USBHS_PHY_CTRL_usb_vbusvalid_ext_SHIFT)) & ANACTRL_USBHS_PHY_CTRL_usb_vbusvalid_ext_MASK)
-#define ANACTRL_USBHS_PHY_CTRL_usb_id_ext_MASK (0x2U)
-#define ANACTRL_USBHS_PHY_CTRL_usb_id_ext_SHIFT (1U)
-/*! usb_id_ext - Override value for ID if using external detectors.
- */
-#define ANACTRL_USBHS_PHY_CTRL_usb_id_ext(x) (((uint32_t)(((uint32_t)(x)) << ANACTRL_USBHS_PHY_CTRL_usb_id_ext_SHIFT)) & ANACTRL_USBHS_PHY_CTRL_usb_id_ext_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group ANACTRL_Register_Masks */
-
-
-/* ANACTRL - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral ANACTRL base address */
- #define ANACTRL_BASE (0x50013000u)
- /** Peripheral ANACTRL base address */
- #define ANACTRL_BASE_NS (0x40013000u)
- /** Peripheral ANACTRL base pointer */
- #define ANACTRL ((ANACTRL_Type *)ANACTRL_BASE)
- /** Peripheral ANACTRL base pointer */
- #define ANACTRL_NS ((ANACTRL_Type *)ANACTRL_BASE_NS)
- /** Array initializer of ANACTRL peripheral base addresses */
- #define ANACTRL_BASE_ADDRS { ANACTRL_BASE }
- /** Array initializer of ANACTRL peripheral base pointers */
- #define ANACTRL_BASE_PTRS { ANACTRL }
- /** Array initializer of ANACTRL peripheral base addresses */
- #define ANACTRL_BASE_ADDRS_NS { ANACTRL_BASE_NS }
- /** Array initializer of ANACTRL peripheral base pointers */
- #define ANACTRL_BASE_PTRS_NS { ANACTRL_NS }
-#else
- /** Peripheral ANACTRL base address */
- #define ANACTRL_BASE (0x40013000u)
- /** Peripheral ANACTRL base pointer */
- #define ANACTRL ((ANACTRL_Type *)ANACTRL_BASE)
- /** Array initializer of ANACTRL peripheral base addresses */
- #define ANACTRL_BASE_ADDRS { ANACTRL_BASE }
- /** Array initializer of ANACTRL peripheral base pointers */
- #define ANACTRL_BASE_PTRS { ANACTRL }
-#endif
-
-/*!
- * @}
- */ /* end of group ANACTRL_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- CASPER Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup CASPER_Peripheral_Access_Layer CASPER Peripheral Access Layer
- * @{
- */
-
-/** CASPER - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL0; /**< Contains the offsets of AB and CD in the RAM., offset: 0x0 */
- __IO uint32_t CTRL1; /**< Contains the opcode mode, iteration count, and result offset (in RAM) and also launches the accelerator. Note: with CP version: CTRL0 and CRTL1 can be written in one go with MCRR., offset: 0x4 */
- __IO uint32_t LOADER; /**< Contains an optional loader to load into CTRL0/1 in steps to perform a set of operations., offset: 0x8 */
- __IO uint32_t STATUS; /**< Indicates operational status and would contain the carry bit if used., offset: 0xC */
- __IO uint32_t INTENSET; /**< Sets interrupts, offset: 0x10 */
- __IO uint32_t INTENCLR; /**< Clears interrupts, offset: 0x14 */
- __I uint32_t INTSTAT; /**< Interrupt status bits (mask of INTENSET and STATUS), offset: 0x18 */
- uint8_t RESERVED_0[4];
- __IO uint32_t AREG; /**< A register, offset: 0x20 */
- __IO uint32_t BREG; /**< B register, offset: 0x24 */
- __IO uint32_t CREG; /**< C register, offset: 0x28 */
- __IO uint32_t DREG; /**< D register, offset: 0x2C */
- __IO uint32_t RES0; /**< Result register 0, offset: 0x30 */
- __IO uint32_t RES1; /**< Result register 1, offset: 0x34 */
- __IO uint32_t RES2; /**< Result register 2, offset: 0x38 */
- __IO uint32_t RES3; /**< Result register 3, offset: 0x3C */
- uint8_t RESERVED_1[32];
- __IO uint32_t MASK; /**< Optional mask register, offset: 0x60 */
- __IO uint32_t REMASK; /**< Optional re-mask register, offset: 0x64 */
- uint8_t RESERVED_2[24];
- __IO uint32_t LOCK; /**< Security lock register, offset: 0x80 */
-} CASPER_Type;
-
-/* ----------------------------------------------------------------------------
- -- CASPER Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup CASPER_Register_Masks CASPER Register Masks
- * @{
- */
-
-/*! @name CTRL0 - Contains the offsets of AB and CD in the RAM. */
-/*! @{ */
-#define CASPER_CTRL0_ABBPAIR_MASK (0x1U)
-#define CASPER_CTRL0_ABBPAIR_SHIFT (0U)
-/*! ABBPAIR - Which bank-pair the offset ABOFF is within. This must be 0 if only 2-up
- * 0b0..Bank-pair 0 (1st)
- * 0b1..Bank-pair 1 (2nd)
- */
-#define CASPER_CTRL0_ABBPAIR(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL0_ABBPAIR_SHIFT)) & CASPER_CTRL0_ABBPAIR_MASK)
-#define CASPER_CTRL0_ABOFF_MASK (0x4U)
-#define CASPER_CTRL0_ABOFF_SHIFT (2U)
-/*! ABOFF - Word or DWord Offset of AB values, with B at [2]=0 and A at [2]=1 as far as the code
- * sees (normally will be an interleaved bank so only sequential to AHB). Word offset only allowed
- * if 32 bit operation. Ideally not in the same RAM as the CD values if 4-up
- */
-#define CASPER_CTRL0_ABOFF(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL0_ABOFF_SHIFT)) & CASPER_CTRL0_ABOFF_MASK)
-#define CASPER_CTRL0_CDBPAIR_MASK (0x10000U)
-#define CASPER_CTRL0_CDBPAIR_SHIFT (16U)
-/*! CDBPAIR - Which bank-pair the offset CDOFF is within. This must be 0 if only 2-up
- * 0b0..Bank-pair 0 (1st)
- * 0b1..Bank-pair 1 (2nd)
- */
-#define CASPER_CTRL0_CDBPAIR(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL0_CDBPAIR_SHIFT)) & CASPER_CTRL0_CDBPAIR_MASK)
-#define CASPER_CTRL0_CDOFF_MASK (0x1FFC0000U)
-#define CASPER_CTRL0_CDOFF_SHIFT (18U)
-/*! CDOFF - Word or DWord Offset of CD, with D at [2]=0 and C at [2]=1 as far as the code sees
- * (normally will be an interleaved bank so only sequential to AHB). Word offset only allowed if 32
- * bit operation. Ideally not in the same RAM as the AB values
- */
-#define CASPER_CTRL0_CDOFF(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL0_CDOFF_SHIFT)) & CASPER_CTRL0_CDOFF_MASK)
-/*! @} */
-
-/*! @name CTRL1 - Contains the opcode mode, iteration count, and result offset (in RAM) and also launches the accelerator. Note: with CP version: CTRL0 and CRTL1 can be written in one go with MCRR. */
-/*! @{ */
-#define CASPER_CTRL1_ITER_MASK (0xFFU)
-#define CASPER_CTRL1_ITER_SHIFT (0U)
-/*! ITER - Iteration counter. Is number_cycles - 1. write 0 means Does one cycle - does not iterate.
- */
-#define CASPER_CTRL1_ITER(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL1_ITER_SHIFT)) & CASPER_CTRL1_ITER_MASK)
-#define CASPER_CTRL1_MODE_MASK (0xFF00U)
-#define CASPER_CTRL1_MODE_SHIFT (8U)
-/*! MODE - Operation mode to perform. write 0 means Accelerator is inactive. write others means accelerator is active.
- */
-#define CASPER_CTRL1_MODE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL1_MODE_SHIFT)) & CASPER_CTRL1_MODE_MASK)
-#define CASPER_CTRL1_RESBPAIR_MASK (0x10000U)
-#define CASPER_CTRL1_RESBPAIR_SHIFT (16U)
-/*! RESBPAIR - Which bank-pair the offset RESOFF is within. This must be 0 if only 2-up. Ideally
- * this is not the same bank as ABBPAIR (when 4-up supported)
- * 0b0..Bank-pair 0 (1st)
- * 0b1..Bank-pair 1 (2nd)
- */
-#define CASPER_CTRL1_RESBPAIR(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL1_RESBPAIR_SHIFT)) & CASPER_CTRL1_RESBPAIR_MASK)
-#define CASPER_CTRL1_RESOFF_MASK (0x1FFC0000U)
-#define CASPER_CTRL1_RESOFF_SHIFT (18U)
-/*! RESOFF - Word or DWord Offset of result. Word offset only allowed if 32 bit operation. Ideally
- * not in the same RAM as the AB and CD values
- */
-#define CASPER_CTRL1_RESOFF(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL1_RESOFF_SHIFT)) & CASPER_CTRL1_RESOFF_MASK)
-#define CASPER_CTRL1_CSKIP_MASK (0xC0000000U)
-#define CASPER_CTRL1_CSKIP_SHIFT (30U)
-/*! CSKIP - Skip rules on Carry if needed. This operation will be skipped based on Carry value (from previous operation) if not 0:
- * 0b00..No Skip
- * 0b01..Skip if Carry is 1
- * 0b10..Skip if Carry is 0
- * 0b11..Set CTRLOFF to CDOFF and Skip
- */
-#define CASPER_CTRL1_CSKIP(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CTRL1_CSKIP_SHIFT)) & CASPER_CTRL1_CSKIP_MASK)
-/*! @} */
-
-/*! @name LOADER - Contains an optional loader to load into CTRL0/1 in steps to perform a set of operations. */
-/*! @{ */
-#define CASPER_LOADER_COUNT_MASK (0xFFU)
-#define CASPER_LOADER_COUNT_SHIFT (0U)
-/*! COUNT - Number of control pairs to load 0 relative (so 1 means load 1). write 1 means Does one
- * op - does not iterate, write N means N control pairs to load
- */
-#define CASPER_LOADER_COUNT(x) (((uint32_t)(((uint32_t)(x)) << CASPER_LOADER_COUNT_SHIFT)) & CASPER_LOADER_COUNT_MASK)
-#define CASPER_LOADER_CTRLBPAIR_MASK (0x10000U)
-#define CASPER_LOADER_CTRLBPAIR_SHIFT (16U)
-/*! CTRLBPAIR - Which bank-pair the offset CTRLOFF is within. This must be 0 if only 2-up. Does not
- * matter which bank is used as this is loaded when not performing an operation.
- * 0b0..Bank-pair 0 (1st)
- * 0b1..Bank-pair 1 (2nd)
- */
-#define CASPER_LOADER_CTRLBPAIR(x) (((uint32_t)(((uint32_t)(x)) << CASPER_LOADER_CTRLBPAIR_SHIFT)) & CASPER_LOADER_CTRLBPAIR_MASK)
-#define CASPER_LOADER_CTRLOFF_MASK (0x1FFC0000U)
-#define CASPER_LOADER_CTRLOFF_SHIFT (18U)
-/*! CTRLOFF - DWord Offset of CTRL pair to load next.
- */
-#define CASPER_LOADER_CTRLOFF(x) (((uint32_t)(((uint32_t)(x)) << CASPER_LOADER_CTRLOFF_SHIFT)) & CASPER_LOADER_CTRLOFF_MASK)
-/*! @} */
-
-/*! @name STATUS - Indicates operational status and would contain the carry bit if used. */
-/*! @{ */
-#define CASPER_STATUS_DONE_MASK (0x1U)
-#define CASPER_STATUS_DONE_SHIFT (0U)
-/*! DONE - Indicates if the accelerator has finished an operation. Write 1 to clear, or write CTRL1 to clear.
- * 0b0..Busy or just cleared
- * 0b1..Completed last operation
- */
-#define CASPER_STATUS_DONE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_STATUS_DONE_SHIFT)) & CASPER_STATUS_DONE_MASK)
-#define CASPER_STATUS_CARRY_MASK (0x10U)
-#define CASPER_STATUS_CARRY_SHIFT (4U)
-/*! CARRY - Last carry value if operation produced a carry bit
- * 0b0..Carry was 0 or no carry
- * 0b1..Carry was 1
- */
-#define CASPER_STATUS_CARRY(x) (((uint32_t)(((uint32_t)(x)) << CASPER_STATUS_CARRY_SHIFT)) & CASPER_STATUS_CARRY_MASK)
-#define CASPER_STATUS_BUSY_MASK (0x20U)
-#define CASPER_STATUS_BUSY_SHIFT (5U)
-/*! BUSY - Indicates if the accelerator is busy performing an operation
- * 0b0..Not busy - is idle
- * 0b1..Is busy
- */
-#define CASPER_STATUS_BUSY(x) (((uint32_t)(((uint32_t)(x)) << CASPER_STATUS_BUSY_SHIFT)) & CASPER_STATUS_BUSY_MASK)
-/*! @} */
-
-/*! @name INTENSET - Sets interrupts */
-/*! @{ */
-#define CASPER_INTENSET_DONE_MASK (0x1U)
-#define CASPER_INTENSET_DONE_SHIFT (0U)
-/*! DONE - Set if the accelerator should interrupt when done.
- * 0b0..Do not interrupt when done
- * 0b1..Interrupt when done
- */
-#define CASPER_INTENSET_DONE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_INTENSET_DONE_SHIFT)) & CASPER_INTENSET_DONE_MASK)
-/*! @} */
-
-/*! @name INTENCLR - Clears interrupts */
-/*! @{ */
-#define CASPER_INTENCLR_DONE_MASK (0x1U)
-#define CASPER_INTENCLR_DONE_SHIFT (0U)
-/*! DONE - Written to clear an interrupt set with INTENSET.
- * 0b0..If written 0, ignored
- * 0b1..If written 1, do not Interrupt when done
- */
-#define CASPER_INTENCLR_DONE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_INTENCLR_DONE_SHIFT)) & CASPER_INTENCLR_DONE_MASK)
-/*! @} */
-
-/*! @name INTSTAT - Interrupt status bits (mask of INTENSET and STATUS) */
-/*! @{ */
-#define CASPER_INTSTAT_DONE_MASK (0x1U)
-#define CASPER_INTSTAT_DONE_SHIFT (0U)
-/*! DONE - If set, interrupt is caused by accelerator being done.
- * 0b0..Not caused by accelerator being done
- * 0b1..Caused by accelerator being done
- */
-#define CASPER_INTSTAT_DONE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_INTSTAT_DONE_SHIFT)) & CASPER_INTSTAT_DONE_MASK)
-/*! @} */
-
-/*! @name AREG - A register */
-/*! @{ */
-#define CASPER_AREG_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_AREG_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to be fed into Multiplier. Is not normally written or read by application,
- * but is available when accelerator not busy.
- */
-#define CASPER_AREG_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_AREG_REG_VALUE_SHIFT)) & CASPER_AREG_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name BREG - B register */
-/*! @{ */
-#define CASPER_BREG_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_BREG_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to be fed into Multiplier. Is not normally written or read by application,
- * but is available when accelerator not busy.
- */
-#define CASPER_BREG_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_BREG_REG_VALUE_SHIFT)) & CASPER_BREG_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name CREG - C register */
-/*! @{ */
-#define CASPER_CREG_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_CREG_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to be fed into Multiplier. Is not normally written or read by application,
- * but is available when accelerator not busy.
- */
-#define CASPER_CREG_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_CREG_REG_VALUE_SHIFT)) & CASPER_CREG_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name DREG - D register */
-/*! @{ */
-#define CASPER_DREG_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_DREG_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to be fed into Multiplier. Is not normally written or read by application,
- * but is available when accelerator not busy.
- */
-#define CASPER_DREG_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_DREG_REG_VALUE_SHIFT)) & CASPER_DREG_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name RES0 - Result register 0 */
-/*! @{ */
-#define CASPER_RES0_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_RES0_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to hold working result (from multiplier, adder/xor, etc). Is not normally
- * written or read by application, but is available when accelerator not busy.
- */
-#define CASPER_RES0_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_RES0_REG_VALUE_SHIFT)) & CASPER_RES0_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name RES1 - Result register 1 */
-/*! @{ */
-#define CASPER_RES1_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_RES1_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to hold working result (from multiplier, adder/xor, etc). Is not normally
- * written or read by application, but is available when accelerator not busy.
- */
-#define CASPER_RES1_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_RES1_REG_VALUE_SHIFT)) & CASPER_RES1_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name RES2 - Result register 2 */
-/*! @{ */
-#define CASPER_RES2_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_RES2_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to hold working result (from multiplier, adder/xor, etc). Is not normally
- * written or read by application, but is available when accelerator not busy.
- */
-#define CASPER_RES2_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_RES2_REG_VALUE_SHIFT)) & CASPER_RES2_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name RES3 - Result register 3 */
-/*! @{ */
-#define CASPER_RES3_REG_VALUE_MASK (0xFFFFFFFFU)
-#define CASPER_RES3_REG_VALUE_SHIFT (0U)
-/*! REG_VALUE - Register to hold working result (from multiplier, adder/xor, etc). Is not normally
- * written or read by application, but is available when accelerator not busy.
- */
-#define CASPER_RES3_REG_VALUE(x) (((uint32_t)(((uint32_t)(x)) << CASPER_RES3_REG_VALUE_SHIFT)) & CASPER_RES3_REG_VALUE_MASK)
-/*! @} */
-
-/*! @name MASK - Optional mask register */
-/*! @{ */
-#define CASPER_MASK_MASK_MASK (0xFFFFFFFFU)
-#define CASPER_MASK_MASK_SHIFT (0U)
-/*! MASK - Mask to apply as side channel countermeasure. 0: No mask to be used. N: Mask to XOR onto values
- */
-#define CASPER_MASK_MASK(x) (((uint32_t)(((uint32_t)(x)) << CASPER_MASK_MASK_SHIFT)) & CASPER_MASK_MASK_MASK)
-/*! @} */
-
-/*! @name REMASK - Optional re-mask register */
-/*! @{ */
-#define CASPER_REMASK_MASK_MASK (0xFFFFFFFFU)
-#define CASPER_REMASK_MASK_SHIFT (0U)
-/*! MASK - Mask to apply as side channel countermeasure. 0: No mask to be used. N: Mask to XOR onto values
- */
-#define CASPER_REMASK_MASK(x) (((uint32_t)(((uint32_t)(x)) << CASPER_REMASK_MASK_SHIFT)) & CASPER_REMASK_MASK_MASK)
-/*! @} */
-
-/*! @name LOCK - Security lock register */
-/*! @{ */
-#define CASPER_LOCK_LOCK_MASK (0x1U)
-#define CASPER_LOCK_LOCK_SHIFT (0U)
-/*! LOCK - Reads back with security level locked to, or 0. Writes as 0 to unlock, 1 to lock.
- * 0b0..unlock
- * 0b1..Lock to current security level
- */
-#define CASPER_LOCK_LOCK(x) (((uint32_t)(((uint32_t)(x)) << CASPER_LOCK_LOCK_SHIFT)) & CASPER_LOCK_LOCK_MASK)
-#define CASPER_LOCK_KEY_MASK (0x1FFF0U)
-#define CASPER_LOCK_KEY_SHIFT (4U)
-/*! KEY - Must be written as 0x73D to change the register.
- * 0b0011100111101..If set during write, will allow lock or unlock
- */
-#define CASPER_LOCK_KEY(x) (((uint32_t)(((uint32_t)(x)) << CASPER_LOCK_KEY_SHIFT)) & CASPER_LOCK_KEY_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group CASPER_Register_Masks */
-
-
-/* CASPER - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral CASPER base address */
- #define CASPER_BASE (0x500A5000u)
- /** Peripheral CASPER base address */
- #define CASPER_BASE_NS (0x400A5000u)
- /** Peripheral CASPER base pointer */
- #define CASPER ((CASPER_Type *)CASPER_BASE)
- /** Peripheral CASPER base pointer */
- #define CASPER_NS ((CASPER_Type *)CASPER_BASE_NS)
- /** Array initializer of CASPER peripheral base addresses */
- #define CASPER_BASE_ADDRS { CASPER_BASE }
- /** Array initializer of CASPER peripheral base pointers */
- #define CASPER_BASE_PTRS { CASPER }
- /** Array initializer of CASPER peripheral base addresses */
- #define CASPER_BASE_ADDRS_NS { CASPER_BASE_NS }
- /** Array initializer of CASPER peripheral base pointers */
- #define CASPER_BASE_PTRS_NS { CASPER_NS }
-#else
- /** Peripheral CASPER base address */
- #define CASPER_BASE (0x400A5000u)
- /** Peripheral CASPER base pointer */
- #define CASPER ((CASPER_Type *)CASPER_BASE)
- /** Array initializer of CASPER peripheral base addresses */
- #define CASPER_BASE_ADDRS { CASPER_BASE }
- /** Array initializer of CASPER peripheral base pointers */
- #define CASPER_BASE_PTRS { CASPER }
-#endif
-
-/*!
- * @}
- */ /* end of group CASPER_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- CRC Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup CRC_Peripheral_Access_Layer CRC Peripheral Access Layer
- * @{
- */
-
-/** CRC - Register Layout Typedef */
-typedef struct {
- __IO uint32_t MODE; /**< CRC mode register, offset: 0x0 */
- __IO uint32_t SEED; /**< CRC seed register, offset: 0x4 */
- union { /* offset: 0x8 */
- __I uint32_t SUM; /**< CRC checksum register, offset: 0x8 */
- __O uint32_t WR_DATA; /**< CRC data register, offset: 0x8 */
- };
-} CRC_Type;
-
-/* ----------------------------------------------------------------------------
- -- CRC Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup CRC_Register_Masks CRC Register Masks
- * @{
- */
-
-/*! @name MODE - CRC mode register */
-/*! @{ */
-#define CRC_MODE_CRC_POLY_MASK (0x3U)
-#define CRC_MODE_CRC_POLY_SHIFT (0U)
-/*! CRC_POLY - CRC polynomial: 1X = CRC-32 polynomial 01 = CRC-16 polynomial 00 = CRC-CCITT polynomial
- */
-#define CRC_MODE_CRC_POLY(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_CRC_POLY_SHIFT)) & CRC_MODE_CRC_POLY_MASK)
-#define CRC_MODE_BIT_RVS_WR_MASK (0x4U)
-#define CRC_MODE_BIT_RVS_WR_SHIFT (2U)
-/*! BIT_RVS_WR - Data bit order: 1 = Bit order reverse for CRC_WR_DATA (per byte) 0 = No bit order reverse for CRC_WR_DATA (per byte)
- */
-#define CRC_MODE_BIT_RVS_WR(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_BIT_RVS_WR_SHIFT)) & CRC_MODE_BIT_RVS_WR_MASK)
-#define CRC_MODE_CMPL_WR_MASK (0x8U)
-#define CRC_MODE_CMPL_WR_SHIFT (3U)
-/*! CMPL_WR - Data complement: 1 = 1's complement for CRC_WR_DATA 0 = No 1's complement for CRC_WR_DATA
- */
-#define CRC_MODE_CMPL_WR(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_CMPL_WR_SHIFT)) & CRC_MODE_CMPL_WR_MASK)
-#define CRC_MODE_BIT_RVS_SUM_MASK (0x10U)
-#define CRC_MODE_BIT_RVS_SUM_SHIFT (4U)
-/*! BIT_RVS_SUM - CRC sum bit order: 1 = Bit order reverse for CRC_SUM 0 = No bit order reverse for CRC_SUM
- */
-#define CRC_MODE_BIT_RVS_SUM(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_BIT_RVS_SUM_SHIFT)) & CRC_MODE_BIT_RVS_SUM_MASK)
-#define CRC_MODE_CMPL_SUM_MASK (0x20U)
-#define CRC_MODE_CMPL_SUM_SHIFT (5U)
-/*! CMPL_SUM - CRC sum complement: 1 = 1's complement for CRC_SUM 0 = No 1's complement for CRC_SUM
- */
-#define CRC_MODE_CMPL_SUM(x) (((uint32_t)(((uint32_t)(x)) << CRC_MODE_CMPL_SUM_SHIFT)) & CRC_MODE_CMPL_SUM_MASK)
-/*! @} */
-
-/*! @name SEED - CRC seed register */
-/*! @{ */
-#define CRC_SEED_CRC_SEED_MASK (0xFFFFFFFFU)
-#define CRC_SEED_CRC_SEED_SHIFT (0U)
-/*! CRC_SEED - A write access to this register will load CRC seed value to CRC_SUM register with
- * selected bit order and 1's complement pre-processes. A write access to this register will
- * overrule the CRC calculation in progresses.
- */
-#define CRC_SEED_CRC_SEED(x) (((uint32_t)(((uint32_t)(x)) << CRC_SEED_CRC_SEED_SHIFT)) & CRC_SEED_CRC_SEED_MASK)
-/*! @} */
-
-/*! @name SUM - CRC checksum register */
-/*! @{ */
-#define CRC_SUM_CRC_SUM_MASK (0xFFFFFFFFU)
-#define CRC_SUM_CRC_SUM_SHIFT (0U)
-/*! CRC_SUM - The most recent CRC sum can be read through this register with selected bit order and 1's complement post-processes.
- */
-#define CRC_SUM_CRC_SUM(x) (((uint32_t)(((uint32_t)(x)) << CRC_SUM_CRC_SUM_SHIFT)) & CRC_SUM_CRC_SUM_MASK)
-/*! @} */
-
-/*! @name WR_DATA - CRC data register */
-/*! @{ */
-#define CRC_WR_DATA_CRC_WR_DATA_MASK (0xFFFFFFFFU)
-#define CRC_WR_DATA_CRC_WR_DATA_SHIFT (0U)
-/*! CRC_WR_DATA - Data written to this register will be taken to perform CRC calculation with
- * selected bit order and 1's complement pre-process. Any write size 8, 16 or 32-bit are allowed and
- * accept back-to-back transactions.
- */
-#define CRC_WR_DATA_CRC_WR_DATA(x) (((uint32_t)(((uint32_t)(x)) << CRC_WR_DATA_CRC_WR_DATA_SHIFT)) & CRC_WR_DATA_CRC_WR_DATA_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group CRC_Register_Masks */
-
-
-/* CRC - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral CRC_ENGINE base address */
- #define CRC_ENGINE_BASE (0x50095000u)
- /** Peripheral CRC_ENGINE base address */
- #define CRC_ENGINE_BASE_NS (0x40095000u)
- /** Peripheral CRC_ENGINE base pointer */
- #define CRC_ENGINE ((CRC_Type *)CRC_ENGINE_BASE)
- /** Peripheral CRC_ENGINE base pointer */
- #define CRC_ENGINE_NS ((CRC_Type *)CRC_ENGINE_BASE_NS)
- /** Array initializer of CRC peripheral base addresses */
- #define CRC_BASE_ADDRS { CRC_ENGINE_BASE }
- /** Array initializer of CRC peripheral base pointers */
- #define CRC_BASE_PTRS { CRC_ENGINE }
- /** Array initializer of CRC peripheral base addresses */
- #define CRC_BASE_ADDRS_NS { CRC_ENGINE_BASE_NS }
- /** Array initializer of CRC peripheral base pointers */
- #define CRC_BASE_PTRS_NS { CRC_ENGINE_NS }
-#else
- /** Peripheral CRC_ENGINE base address */
- #define CRC_ENGINE_BASE (0x40095000u)
- /** Peripheral CRC_ENGINE base pointer */
- #define CRC_ENGINE ((CRC_Type *)CRC_ENGINE_BASE)
- /** Array initializer of CRC peripheral base addresses */
- #define CRC_BASE_ADDRS { CRC_ENGINE_BASE }
- /** Array initializer of CRC peripheral base pointers */
- #define CRC_BASE_PTRS { CRC_ENGINE }
-#endif
-
-/*!
- * @}
- */ /* end of group CRC_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- CTIMER Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup CTIMER_Peripheral_Access_Layer CTIMER Peripheral Access Layer
- * @{
- */
-
-/** CTIMER - Register Layout Typedef */
-typedef struct {
- __IO uint32_t IR; /**< Interrupt Register. The IR can be written to clear interrupts. The IR can be read to identify which of eight possible interrupt sources are pending., offset: 0x0 */
- __IO uint32_t TCR; /**< Timer Control Register. The TCR is used to control the Timer Counter functions. The Timer Counter can be disabled or reset through the TCR., offset: 0x4 */
- __IO uint32_t TC; /**< Timer Counter, offset: 0x8 */
- __IO uint32_t PR; /**< Prescale Register, offset: 0xC */
- __IO uint32_t PC; /**< Prescale Counter, offset: 0x10 */
- __IO uint32_t MCR; /**< Match Control Register, offset: 0x14 */
- __IO uint32_t MR[4]; /**< Match Register . MR can be enabled through the MCR to reset the TC, stop both the TC and PC, and/or generate an interrupt every time MR matches the TC., array offset: 0x18, array step: 0x4 */
- __IO uint32_t CCR; /**< Capture Control Register. The CCR controls which edges of the capture inputs are used to load the Capture Registers and whether or not an interrupt is generated when a capture takes place., offset: 0x28 */
- __I uint32_t CR[4]; /**< Capture Register . CR is loaded with the value of TC when there is an event on the CAPn. input., array offset: 0x2C, array step: 0x4 */
- __IO uint32_t EMR; /**< External Match Register. The EMR controls the match function and the external match pins., offset: 0x3C */
- uint8_t RESERVED_0[48];
- __IO uint32_t CTCR; /**< Count Control Register. The CTCR selects between Timer and Counter mode, and in Counter mode selects the signal and edge(s) for counting., offset: 0x70 */
- __IO uint32_t PWMC; /**< PWM Control Register. This register enables PWM mode for the external match pins., offset: 0x74 */
- __IO uint32_t MSR[4]; /**< Match Shadow Register, array offset: 0x78, array step: 0x4 */
-} CTIMER_Type;
-
-/* ----------------------------------------------------------------------------
- -- CTIMER Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup CTIMER_Register_Masks CTIMER Register Masks
- * @{
- */
-
-/*! @name IR - Interrupt Register. The IR can be written to clear interrupts. The IR can be read to identify which of eight possible interrupt sources are pending. */
-/*! @{ */
-#define CTIMER_IR_MR0INT_MASK (0x1U)
-#define CTIMER_IR_MR0INT_SHIFT (0U)
-/*! MR0INT - Interrupt flag for match channel 0.
- */
-#define CTIMER_IR_MR0INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_MR0INT_SHIFT)) & CTIMER_IR_MR0INT_MASK)
-#define CTIMER_IR_MR1INT_MASK (0x2U)
-#define CTIMER_IR_MR1INT_SHIFT (1U)
-/*! MR1INT - Interrupt flag for match channel 1.
- */
-#define CTIMER_IR_MR1INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_MR1INT_SHIFT)) & CTIMER_IR_MR1INT_MASK)
-#define CTIMER_IR_MR2INT_MASK (0x4U)
-#define CTIMER_IR_MR2INT_SHIFT (2U)
-/*! MR2INT - Interrupt flag for match channel 2.
- */
-#define CTIMER_IR_MR2INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_MR2INT_SHIFT)) & CTIMER_IR_MR2INT_MASK)
-#define CTIMER_IR_MR3INT_MASK (0x8U)
-#define CTIMER_IR_MR3INT_SHIFT (3U)
-/*! MR3INT - Interrupt flag for match channel 3.
- */
-#define CTIMER_IR_MR3INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_MR3INT_SHIFT)) & CTIMER_IR_MR3INT_MASK)
-#define CTIMER_IR_CR0INT_MASK (0x10U)
-#define CTIMER_IR_CR0INT_SHIFT (4U)
-/*! CR0INT - Interrupt flag for capture channel 0 event.
- */
-#define CTIMER_IR_CR0INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_CR0INT_SHIFT)) & CTIMER_IR_CR0INT_MASK)
-#define CTIMER_IR_CR1INT_MASK (0x20U)
-#define CTIMER_IR_CR1INT_SHIFT (5U)
-/*! CR1INT - Interrupt flag for capture channel 1 event.
- */
-#define CTIMER_IR_CR1INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_CR1INT_SHIFT)) & CTIMER_IR_CR1INT_MASK)
-#define CTIMER_IR_CR2INT_MASK (0x40U)
-#define CTIMER_IR_CR2INT_SHIFT (6U)
-/*! CR2INT - Interrupt flag for capture channel 2 event.
- */
-#define CTIMER_IR_CR2INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_CR2INT_SHIFT)) & CTIMER_IR_CR2INT_MASK)
-#define CTIMER_IR_CR3INT_MASK (0x80U)
-#define CTIMER_IR_CR3INT_SHIFT (7U)
-/*! CR3INT - Interrupt flag for capture channel 3 event.
- */
-#define CTIMER_IR_CR3INT(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_IR_CR3INT_SHIFT)) & CTIMER_IR_CR3INT_MASK)
-/*! @} */
-
-/*! @name TCR - Timer Control Register. The TCR is used to control the Timer Counter functions. The Timer Counter can be disabled or reset through the TCR. */
-/*! @{ */
-#define CTIMER_TCR_CEN_MASK (0x1U)
-#define CTIMER_TCR_CEN_SHIFT (0U)
-/*! CEN - Counter enable.
- * 0b0..Disabled.The counters are disabled.
- * 0b1..Enabled. The Timer Counter and Prescale Counter are enabled.
- */
-#define CTIMER_TCR_CEN(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_TCR_CEN_SHIFT)) & CTIMER_TCR_CEN_MASK)
-#define CTIMER_TCR_CRST_MASK (0x2U)
-#define CTIMER_TCR_CRST_SHIFT (1U)
-/*! CRST - Counter reset.
- * 0b0..Disabled. Do nothing.
- * 0b1..Enabled. The Timer Counter and the Prescale Counter are synchronously reset on the next positive edge of
- * the APB bus clock. The counters remain reset until TCR[1] is returned to zero.
- */
-#define CTIMER_TCR_CRST(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_TCR_CRST_SHIFT)) & CTIMER_TCR_CRST_MASK)
-/*! @} */
-
-/*! @name TC - Timer Counter */
-/*! @{ */
-#define CTIMER_TC_TCVAL_MASK (0xFFFFFFFFU)
-#define CTIMER_TC_TCVAL_SHIFT (0U)
-/*! TCVAL - Timer counter value.
- */
-#define CTIMER_TC_TCVAL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_TC_TCVAL_SHIFT)) & CTIMER_TC_TCVAL_MASK)
-/*! @} */
-
-/*! @name PR - Prescale Register */
-/*! @{ */
-#define CTIMER_PR_PRVAL_MASK (0xFFFFFFFFU)
-#define CTIMER_PR_PRVAL_SHIFT (0U)
-/*! PRVAL - Prescale counter value.
- */
-#define CTIMER_PR_PRVAL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PR_PRVAL_SHIFT)) & CTIMER_PR_PRVAL_MASK)
-/*! @} */
-
-/*! @name PC - Prescale Counter */
-/*! @{ */
-#define CTIMER_PC_PCVAL_MASK (0xFFFFFFFFU)
-#define CTIMER_PC_PCVAL_SHIFT (0U)
-/*! PCVAL - Prescale counter value.
- */
-#define CTIMER_PC_PCVAL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PC_PCVAL_SHIFT)) & CTIMER_PC_PCVAL_MASK)
-/*! @} */
-
-/*! @name MCR - Match Control Register */
-/*! @{ */
-#define CTIMER_MCR_MR0I_MASK (0x1U)
-#define CTIMER_MCR_MR0I_SHIFT (0U)
-/*! MR0I - Interrupt on MR0: an interrupt is generated when MR0 matches the value in the TC.
- */
-#define CTIMER_MCR_MR0I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR0I_SHIFT)) & CTIMER_MCR_MR0I_MASK)
-#define CTIMER_MCR_MR0R_MASK (0x2U)
-#define CTIMER_MCR_MR0R_SHIFT (1U)
-/*! MR0R - Reset on MR0: the TC will be reset if MR0 matches it.
- */
-#define CTIMER_MCR_MR0R(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR0R_SHIFT)) & CTIMER_MCR_MR0R_MASK)
-#define CTIMER_MCR_MR0S_MASK (0x4U)
-#define CTIMER_MCR_MR0S_SHIFT (2U)
-/*! MR0S - Stop on MR0: the TC and PC will be stopped and TCR[0] will be set to 0 if MR0 matches the TC.
- */
-#define CTIMER_MCR_MR0S(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR0S_SHIFT)) & CTIMER_MCR_MR0S_MASK)
-#define CTIMER_MCR_MR1I_MASK (0x8U)
-#define CTIMER_MCR_MR1I_SHIFT (3U)
-/*! MR1I - Interrupt on MR1: an interrupt is generated when MR1 matches the value in the TC.
- */
-#define CTIMER_MCR_MR1I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR1I_SHIFT)) & CTIMER_MCR_MR1I_MASK)
-#define CTIMER_MCR_MR1R_MASK (0x10U)
-#define CTIMER_MCR_MR1R_SHIFT (4U)
-/*! MR1R - Reset on MR1: the TC will be reset if MR1 matches it.
- */
-#define CTIMER_MCR_MR1R(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR1R_SHIFT)) & CTIMER_MCR_MR1R_MASK)
-#define CTIMER_MCR_MR1S_MASK (0x20U)
-#define CTIMER_MCR_MR1S_SHIFT (5U)
-/*! MR1S - Stop on MR1: the TC and PC will be stopped and TCR[0] will be set to 0 if MR1 matches the TC.
- */
-#define CTIMER_MCR_MR1S(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR1S_SHIFT)) & CTIMER_MCR_MR1S_MASK)
-#define CTIMER_MCR_MR2I_MASK (0x40U)
-#define CTIMER_MCR_MR2I_SHIFT (6U)
-/*! MR2I - Interrupt on MR2: an interrupt is generated when MR2 matches the value in the TC.
- */
-#define CTIMER_MCR_MR2I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR2I_SHIFT)) & CTIMER_MCR_MR2I_MASK)
-#define CTIMER_MCR_MR2R_MASK (0x80U)
-#define CTIMER_MCR_MR2R_SHIFT (7U)
-/*! MR2R - Reset on MR2: the TC will be reset if MR2 matches it.
- */
-#define CTIMER_MCR_MR2R(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR2R_SHIFT)) & CTIMER_MCR_MR2R_MASK)
-#define CTIMER_MCR_MR2S_MASK (0x100U)
-#define CTIMER_MCR_MR2S_SHIFT (8U)
-/*! MR2S - Stop on MR2: the TC and PC will be stopped and TCR[0] will be set to 0 if MR2 matches the TC.
- */
-#define CTIMER_MCR_MR2S(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR2S_SHIFT)) & CTIMER_MCR_MR2S_MASK)
-#define CTIMER_MCR_MR3I_MASK (0x200U)
-#define CTIMER_MCR_MR3I_SHIFT (9U)
-/*! MR3I - Interrupt on MR3: an interrupt is generated when MR3 matches the value in the TC.
- */
-#define CTIMER_MCR_MR3I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR3I_SHIFT)) & CTIMER_MCR_MR3I_MASK)
-#define CTIMER_MCR_MR3R_MASK (0x400U)
-#define CTIMER_MCR_MR3R_SHIFT (10U)
-/*! MR3R - Reset on MR3: the TC will be reset if MR3 matches it.
- */
-#define CTIMER_MCR_MR3R(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR3R_SHIFT)) & CTIMER_MCR_MR3R_MASK)
-#define CTIMER_MCR_MR3S_MASK (0x800U)
-#define CTIMER_MCR_MR3S_SHIFT (11U)
-/*! MR3S - Stop on MR3: the TC and PC will be stopped and TCR[0] will be set to 0 if MR3 matches the TC.
- */
-#define CTIMER_MCR_MR3S(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR3S_SHIFT)) & CTIMER_MCR_MR3S_MASK)
-#define CTIMER_MCR_MR0RL_MASK (0x1000000U)
-#define CTIMER_MCR_MR0RL_SHIFT (24U)
-/*! MR0RL - Reload MR0 with the contents of the Match 0 Shadow Register when the TC is reset to zero
- * (either via a match event or a write to bit 1 of the TCR).
- */
-#define CTIMER_MCR_MR0RL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR0RL_SHIFT)) & CTIMER_MCR_MR0RL_MASK)
-#define CTIMER_MCR_MR1RL_MASK (0x2000000U)
-#define CTIMER_MCR_MR1RL_SHIFT (25U)
-/*! MR1RL - Reload MR1 with the contents of the Match 1 Shadow Register when the TC is reset to zero
- * (either via a match event or a write to bit 1 of the TCR).
- */
-#define CTIMER_MCR_MR1RL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR1RL_SHIFT)) & CTIMER_MCR_MR1RL_MASK)
-#define CTIMER_MCR_MR2RL_MASK (0x4000000U)
-#define CTIMER_MCR_MR2RL_SHIFT (26U)
-/*! MR2RL - Reload MR2 with the contents of the Match 2 Shadow Register when the TC is reset to zero
- * (either via a match event or a write to bit 1 of the TCR).
- */
-#define CTIMER_MCR_MR2RL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR2RL_SHIFT)) & CTIMER_MCR_MR2RL_MASK)
-#define CTIMER_MCR_MR3RL_MASK (0x8000000U)
-#define CTIMER_MCR_MR3RL_SHIFT (27U)
-/*! MR3RL - Reload MR3 with the contents of the Match 3 Shadow Register when the TC is reset to zero
- * (either via a match event or a write to bit 1 of the TCR).
- */
-#define CTIMER_MCR_MR3RL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MCR_MR3RL_SHIFT)) & CTIMER_MCR_MR3RL_MASK)
-/*! @} */
-
-/*! @name MR - Match Register . MR can be enabled through the MCR to reset the TC, stop both the TC and PC, and/or generate an interrupt every time MR matches the TC. */
-/*! @{ */
-#define CTIMER_MR_MATCH_MASK (0xFFFFFFFFU)
-#define CTIMER_MR_MATCH_SHIFT (0U)
-/*! MATCH - Timer counter match value.
- */
-#define CTIMER_MR_MATCH(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MR_MATCH_SHIFT)) & CTIMER_MR_MATCH_MASK)
-/*! @} */
-
-/* The count of CTIMER_MR */
-#define CTIMER_MR_COUNT (4U)
-
-/*! @name CCR - Capture Control Register. The CCR controls which edges of the capture inputs are used to load the Capture Registers and whether or not an interrupt is generated when a capture takes place. */
-/*! @{ */
-#define CTIMER_CCR_CAP0RE_MASK (0x1U)
-#define CTIMER_CCR_CAP0RE_SHIFT (0U)
-/*! CAP0RE - Rising edge of capture channel 0: a sequence of 0 then 1 causes CR0 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP0RE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP0RE_SHIFT)) & CTIMER_CCR_CAP0RE_MASK)
-#define CTIMER_CCR_CAP0FE_MASK (0x2U)
-#define CTIMER_CCR_CAP0FE_SHIFT (1U)
-/*! CAP0FE - Falling edge of capture channel 0: a sequence of 1 then 0 causes CR0 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP0FE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP0FE_SHIFT)) & CTIMER_CCR_CAP0FE_MASK)
-#define CTIMER_CCR_CAP0I_MASK (0x4U)
-#define CTIMER_CCR_CAP0I_SHIFT (2U)
-/*! CAP0I - Generate interrupt on channel 0 capture event: a CR0 load generates an interrupt.
- */
-#define CTIMER_CCR_CAP0I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP0I_SHIFT)) & CTIMER_CCR_CAP0I_MASK)
-#define CTIMER_CCR_CAP1RE_MASK (0x8U)
-#define CTIMER_CCR_CAP1RE_SHIFT (3U)
-/*! CAP1RE - Rising edge of capture channel 1: a sequence of 0 then 1 causes CR1 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP1RE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP1RE_SHIFT)) & CTIMER_CCR_CAP1RE_MASK)
-#define CTIMER_CCR_CAP1FE_MASK (0x10U)
-#define CTIMER_CCR_CAP1FE_SHIFT (4U)
-/*! CAP1FE - Falling edge of capture channel 1: a sequence of 1 then 0 causes CR1 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP1FE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP1FE_SHIFT)) & CTIMER_CCR_CAP1FE_MASK)
-#define CTIMER_CCR_CAP1I_MASK (0x20U)
-#define CTIMER_CCR_CAP1I_SHIFT (5U)
-/*! CAP1I - Generate interrupt on channel 1 capture event: a CR1 load generates an interrupt.
- */
-#define CTIMER_CCR_CAP1I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP1I_SHIFT)) & CTIMER_CCR_CAP1I_MASK)
-#define CTIMER_CCR_CAP2RE_MASK (0x40U)
-#define CTIMER_CCR_CAP2RE_SHIFT (6U)
-/*! CAP2RE - Rising edge of capture channel 2: a sequence of 0 then 1 causes CR2 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP2RE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP2RE_SHIFT)) & CTIMER_CCR_CAP2RE_MASK)
-#define CTIMER_CCR_CAP2FE_MASK (0x80U)
-#define CTIMER_CCR_CAP2FE_SHIFT (7U)
-/*! CAP2FE - Falling edge of capture channel 2: a sequence of 1 then 0 causes CR2 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP2FE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP2FE_SHIFT)) & CTIMER_CCR_CAP2FE_MASK)
-#define CTIMER_CCR_CAP2I_MASK (0x100U)
-#define CTIMER_CCR_CAP2I_SHIFT (8U)
-/*! CAP2I - Generate interrupt on channel 2 capture event: a CR2 load generates an interrupt.
- */
-#define CTIMER_CCR_CAP2I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP2I_SHIFT)) & CTIMER_CCR_CAP2I_MASK)
-#define CTIMER_CCR_CAP3RE_MASK (0x200U)
-#define CTIMER_CCR_CAP3RE_SHIFT (9U)
-/*! CAP3RE - Rising edge of capture channel 3: a sequence of 0 then 1 causes CR3 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP3RE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP3RE_SHIFT)) & CTIMER_CCR_CAP3RE_MASK)
-#define CTIMER_CCR_CAP3FE_MASK (0x400U)
-#define CTIMER_CCR_CAP3FE_SHIFT (10U)
-/*! CAP3FE - Falling edge of capture channel 3: a sequence of 1 then 0 causes CR3 to be loaded with
- * the contents of TC. 0 = disabled. 1 = enabled.
- */
-#define CTIMER_CCR_CAP3FE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP3FE_SHIFT)) & CTIMER_CCR_CAP3FE_MASK)
-#define CTIMER_CCR_CAP3I_MASK (0x800U)
-#define CTIMER_CCR_CAP3I_SHIFT (11U)
-/*! CAP3I - Generate interrupt on channel 3 capture event: a CR3 load generates an interrupt.
- */
-#define CTIMER_CCR_CAP3I(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CCR_CAP3I_SHIFT)) & CTIMER_CCR_CAP3I_MASK)
-/*! @} */
-
-/*! @name CR - Capture Register . CR is loaded with the value of TC when there is an event on the CAPn. input. */
-/*! @{ */
-#define CTIMER_CR_CAP_MASK (0xFFFFFFFFU)
-#define CTIMER_CR_CAP_SHIFT (0U)
-/*! CAP - Timer counter capture value.
- */
-#define CTIMER_CR_CAP(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CR_CAP_SHIFT)) & CTIMER_CR_CAP_MASK)
-/*! @} */
-
-/* The count of CTIMER_CR */
-#define CTIMER_CR_COUNT (4U)
-
-/*! @name EMR - External Match Register. The EMR controls the match function and the external match pins. */
-/*! @{ */
-#define CTIMER_EMR_EM0_MASK (0x1U)
-#define CTIMER_EMR_EM0_SHIFT (0U)
-/*! EM0 - External Match 0. This bit reflects the state of output MAT0, whether or not this output
- * is connected to a pin. When a match occurs between the TC and MR0, this bit can either toggle,
- * go LOW, go HIGH, or do nothing, as selected by EMR[5:4]. This bit is driven to the MAT pins if
- * the match function is selected via IOCON. 0 = LOW. 1 = HIGH.
- */
-#define CTIMER_EMR_EM0(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EM0_SHIFT)) & CTIMER_EMR_EM0_MASK)
-#define CTIMER_EMR_EM1_MASK (0x2U)
-#define CTIMER_EMR_EM1_SHIFT (1U)
-/*! EM1 - External Match 1. This bit reflects the state of output MAT1, whether or not this output
- * is connected to a pin. When a match occurs between the TC and MR1, this bit can either toggle,
- * go LOW, go HIGH, or do nothing, as selected by EMR[7:6]. This bit is driven to the MAT pins if
- * the match function is selected via IOCON. 0 = LOW. 1 = HIGH.
- */
-#define CTIMER_EMR_EM1(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EM1_SHIFT)) & CTIMER_EMR_EM1_MASK)
-#define CTIMER_EMR_EM2_MASK (0x4U)
-#define CTIMER_EMR_EM2_SHIFT (2U)
-/*! EM2 - External Match 2. This bit reflects the state of output MAT2, whether or not this output
- * is connected to a pin. When a match occurs between the TC and MR2, this bit can either toggle,
- * go LOW, go HIGH, or do nothing, as selected by EMR[9:8]. This bit is driven to the MAT pins if
- * the match function is selected via IOCON. 0 = LOW. 1 = HIGH.
- */
-#define CTIMER_EMR_EM2(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EM2_SHIFT)) & CTIMER_EMR_EM2_MASK)
-#define CTIMER_EMR_EM3_MASK (0x8U)
-#define CTIMER_EMR_EM3_SHIFT (3U)
-/*! EM3 - External Match 3. This bit reflects the state of output MAT3, whether or not this output
- * is connected to a pin. When a match occurs between the TC and MR3, this bit can either toggle,
- * go LOW, go HIGH, or do nothing, as selected by MR[11:10]. This bit is driven to the MAT pins
- * if the match function is selected via IOCON. 0 = LOW. 1 = HIGH.
- */
-#define CTIMER_EMR_EM3(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EM3_SHIFT)) & CTIMER_EMR_EM3_MASK)
-#define CTIMER_EMR_EMC0_MASK (0x30U)
-#define CTIMER_EMR_EMC0_SHIFT (4U)
-/*! EMC0 - External Match Control 0. Determines the functionality of External Match 0.
- * 0b00..Do Nothing.
- * 0b01..Clear. Clear the corresponding External Match bit/output to 0 (MAT0 pin is LOW if pinned out).
- * 0b10..Set. Set the corresponding External Match bit/output to 1 (MAT0 pin is HIGH if pinned out).
- * 0b11..Toggle. Toggle the corresponding External Match bit/output.
- */
-#define CTIMER_EMR_EMC0(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EMC0_SHIFT)) & CTIMER_EMR_EMC0_MASK)
-#define CTIMER_EMR_EMC1_MASK (0xC0U)
-#define CTIMER_EMR_EMC1_SHIFT (6U)
-/*! EMC1 - External Match Control 1. Determines the functionality of External Match 1.
- * 0b00..Do Nothing.
- * 0b01..Clear. Clear the corresponding External Match bit/output to 0 (MAT1 pin is LOW if pinned out).
- * 0b10..Set. Set the corresponding External Match bit/output to 1 (MAT1 pin is HIGH if pinned out).
- * 0b11..Toggle. Toggle the corresponding External Match bit/output.
- */
-#define CTIMER_EMR_EMC1(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EMC1_SHIFT)) & CTIMER_EMR_EMC1_MASK)
-#define CTIMER_EMR_EMC2_MASK (0x300U)
-#define CTIMER_EMR_EMC2_SHIFT (8U)
-/*! EMC2 - External Match Control 2. Determines the functionality of External Match 2.
- * 0b00..Do Nothing.
- * 0b01..Clear. Clear the corresponding External Match bit/output to 0 (MAT2 pin is LOW if pinned out).
- * 0b10..Set. Set the corresponding External Match bit/output to 1 (MAT2 pin is HIGH if pinned out).
- * 0b11..Toggle. Toggle the corresponding External Match bit/output.
- */
-#define CTIMER_EMR_EMC2(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EMC2_SHIFT)) & CTIMER_EMR_EMC2_MASK)
-#define CTIMER_EMR_EMC3_MASK (0xC00U)
-#define CTIMER_EMR_EMC3_SHIFT (10U)
-/*! EMC3 - External Match Control 3. Determines the functionality of External Match 3.
- * 0b00..Do Nothing.
- * 0b01..Clear. Clear the corresponding External Match bit/output to 0 (MAT3 pin is LOW if pinned out).
- * 0b10..Set. Set the corresponding External Match bit/output to 1 (MAT3 pin is HIGH if pinned out).
- * 0b11..Toggle. Toggle the corresponding External Match bit/output.
- */
-#define CTIMER_EMR_EMC3(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_EMR_EMC3_SHIFT)) & CTIMER_EMR_EMC3_MASK)
-/*! @} */
-
-/*! @name CTCR - Count Control Register. The CTCR selects between Timer and Counter mode, and in Counter mode selects the signal and edge(s) for counting. */
-/*! @{ */
-#define CTIMER_CTCR_CTMODE_MASK (0x3U)
-#define CTIMER_CTCR_CTMODE_SHIFT (0U)
-/*! CTMODE - Counter/Timer Mode This field selects which rising APB bus clock edges can increment
- * Timer's Prescale Counter (PC), or clear PC and increment Timer Counter (TC). Timer Mode: the TC
- * is incremented when the Prescale Counter matches the Prescale Register.
- * 0b00..Timer Mode. Incremented every rising APB bus clock edge.
- * 0b01..Counter Mode rising edge. TC is incremented on rising edges on the CAP input selected by bits 3:2.
- * 0b10..Counter Mode falling edge. TC is incremented on falling edges on the CAP input selected by bits 3:2.
- * 0b11..Counter Mode dual edge. TC is incremented on both edges on the CAP input selected by bits 3:2.
- */
-#define CTIMER_CTCR_CTMODE(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CTCR_CTMODE_SHIFT)) & CTIMER_CTCR_CTMODE_MASK)
-#define CTIMER_CTCR_CINSEL_MASK (0xCU)
-#define CTIMER_CTCR_CINSEL_SHIFT (2U)
-/*! CINSEL - Count Input Select When bits 1:0 in this register are not 00, these bits select which
- * CAP pin is sampled for clocking. Note: If Counter mode is selected for a particular CAPn input
- * in the CTCR, the 3 bits for that input in the Capture Control Register (CCR) must be
- * programmed as 000. However, capture and/or interrupt can be selected for the other 3 CAPn inputs in the
- * same timer.
- * 0b00..Channel 0. CAPn.0 for CTIMERn
- * 0b01..Channel 1. CAPn.1 for CTIMERn
- * 0b10..Channel 2. CAPn.2 for CTIMERn
- * 0b11..Channel 3. CAPn.3 for CTIMERn
- */
-#define CTIMER_CTCR_CINSEL(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CTCR_CINSEL_SHIFT)) & CTIMER_CTCR_CINSEL_MASK)
-#define CTIMER_CTCR_ENCC_MASK (0x10U)
-#define CTIMER_CTCR_ENCC_SHIFT (4U)
-/*! ENCC - Setting this bit to 1 enables clearing of the timer and the prescaler when the
- * capture-edge event specified in bits 7:5 occurs.
- */
-#define CTIMER_CTCR_ENCC(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CTCR_ENCC_SHIFT)) & CTIMER_CTCR_ENCC_MASK)
-#define CTIMER_CTCR_SELCC_MASK (0xE0U)
-#define CTIMER_CTCR_SELCC_SHIFT (5U)
-/*! SELCC - Edge select. When bit 4 is 1, these bits select which capture input edge will cause the
- * timer and prescaler to be cleared. These bits have no effect when bit 4 is low. Values 0x2 to
- * 0x3 and 0x6 to 0x7 are reserved.
- * 0b000..Channel 0 Rising Edge. Rising edge of the signal on capture channel 0 clears the timer (if bit 4 is set).
- * 0b001..Channel 0 Falling Edge. Falling edge of the signal on capture channel 0 clears the timer (if bit 4 is set).
- * 0b010..Channel 1 Rising Edge. Rising edge of the signal on capture channel 1 clears the timer (if bit 4 is set).
- * 0b011..Channel 1 Falling Edge. Falling edge of the signal on capture channel 1 clears the timer (if bit 4 is set).
- * 0b100..Channel 2 Rising Edge. Rising edge of the signal on capture channel 2 clears the timer (if bit 4 is set).
- * 0b101..Channel 2 Falling Edge. Falling edge of the signal on capture channel 2 clears the timer (if bit 4 is set).
- */
-#define CTIMER_CTCR_SELCC(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_CTCR_SELCC_SHIFT)) & CTIMER_CTCR_SELCC_MASK)
-/*! @} */
-
-/*! @name PWMC - PWM Control Register. This register enables PWM mode for the external match pins. */
-/*! @{ */
-#define CTIMER_PWMC_PWMEN0_MASK (0x1U)
-#define CTIMER_PWMC_PWMEN0_SHIFT (0U)
-/*! PWMEN0 - PWM mode enable for channel0.
- * 0b0..Match. CTIMERn_MAT0 is controlled by EM0.
- * 0b1..PWM. PWM mode is enabled for CTIMERn_MAT0.
- */
-#define CTIMER_PWMC_PWMEN0(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PWMC_PWMEN0_SHIFT)) & CTIMER_PWMC_PWMEN0_MASK)
-#define CTIMER_PWMC_PWMEN1_MASK (0x2U)
-#define CTIMER_PWMC_PWMEN1_SHIFT (1U)
-/*! PWMEN1 - PWM mode enable for channel1.
- * 0b0..Match. CTIMERn_MAT01 is controlled by EM1.
- * 0b1..PWM. PWM mode is enabled for CTIMERn_MAT1.
- */
-#define CTIMER_PWMC_PWMEN1(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PWMC_PWMEN1_SHIFT)) & CTIMER_PWMC_PWMEN1_MASK)
-#define CTIMER_PWMC_PWMEN2_MASK (0x4U)
-#define CTIMER_PWMC_PWMEN2_SHIFT (2U)
-/*! PWMEN2 - PWM mode enable for channel2.
- * 0b0..Match. CTIMERn_MAT2 is controlled by EM2.
- * 0b1..PWM. PWM mode is enabled for CTIMERn_MAT2.
- */
-#define CTIMER_PWMC_PWMEN2(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PWMC_PWMEN2_SHIFT)) & CTIMER_PWMC_PWMEN2_MASK)
-#define CTIMER_PWMC_PWMEN3_MASK (0x8U)
-#define CTIMER_PWMC_PWMEN3_SHIFT (3U)
-/*! PWMEN3 - PWM mode enable for channel3. Note: It is recommended to use match channel 3 to set the PWM cycle.
- * 0b0..Match. CTIMERn_MAT3 is controlled by EM3.
- * 0b1..PWM. PWM mode is enabled for CT132Bn_MAT3.
- */
-#define CTIMER_PWMC_PWMEN3(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_PWMC_PWMEN3_SHIFT)) & CTIMER_PWMC_PWMEN3_MASK)
-/*! @} */
-
-/*! @name MSR - Match Shadow Register */
-/*! @{ */
-#define CTIMER_MSR_SHADOW_MASK (0xFFFFFFFFU)
-#define CTIMER_MSR_SHADOW_SHIFT (0U)
-/*! SHADOW - Timer counter match shadow value.
- */
-#define CTIMER_MSR_SHADOW(x) (((uint32_t)(((uint32_t)(x)) << CTIMER_MSR_SHADOW_SHIFT)) & CTIMER_MSR_SHADOW_MASK)
-/*! @} */
-
-/* The count of CTIMER_MSR */
-#define CTIMER_MSR_COUNT (4U)
-
-
-/*!
- * @}
- */ /* end of group CTIMER_Register_Masks */
-
-
-/* CTIMER - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral CTIMER0 base address */
- #define CTIMER0_BASE (0x50008000u)
- /** Peripheral CTIMER0 base address */
- #define CTIMER0_BASE_NS (0x40008000u)
- /** Peripheral CTIMER0 base pointer */
- #define CTIMER0 ((CTIMER_Type *)CTIMER0_BASE)
- /** Peripheral CTIMER0 base pointer */
- #define CTIMER0_NS ((CTIMER_Type *)CTIMER0_BASE_NS)
- /** Peripheral CTIMER1 base address */
- #define CTIMER1_BASE (0x50009000u)
- /** Peripheral CTIMER1 base address */
- #define CTIMER1_BASE_NS (0x40009000u)
- /** Peripheral CTIMER1 base pointer */
- #define CTIMER1 ((CTIMER_Type *)CTIMER1_BASE)
- /** Peripheral CTIMER1 base pointer */
- #define CTIMER1_NS ((CTIMER_Type *)CTIMER1_BASE_NS)
- /** Peripheral CTIMER2 base address */
- #define CTIMER2_BASE (0x50028000u)
- /** Peripheral CTIMER2 base address */
- #define CTIMER2_BASE_NS (0x40028000u)
- /** Peripheral CTIMER2 base pointer */
- #define CTIMER2 ((CTIMER_Type *)CTIMER2_BASE)
- /** Peripheral CTIMER2 base pointer */
- #define CTIMER2_NS ((CTIMER_Type *)CTIMER2_BASE_NS)
- /** Peripheral CTIMER3 base address */
- #define CTIMER3_BASE (0x50029000u)
- /** Peripheral CTIMER3 base address */
- #define CTIMER3_BASE_NS (0x40029000u)
- /** Peripheral CTIMER3 base pointer */
- #define CTIMER3 ((CTIMER_Type *)CTIMER3_BASE)
- /** Peripheral CTIMER3 base pointer */
- #define CTIMER3_NS ((CTIMER_Type *)CTIMER3_BASE_NS)
- /** Peripheral CTIMER4 base address */
- #define CTIMER4_BASE (0x5002A000u)
- /** Peripheral CTIMER4 base address */
- #define CTIMER4_BASE_NS (0x4002A000u)
- /** Peripheral CTIMER4 base pointer */
- #define CTIMER4 ((CTIMER_Type *)CTIMER4_BASE)
- /** Peripheral CTIMER4 base pointer */
- #define CTIMER4_NS ((CTIMER_Type *)CTIMER4_BASE_NS)
- /** Array initializer of CTIMER peripheral base addresses */
- #define CTIMER_BASE_ADDRS { CTIMER0_BASE, CTIMER1_BASE, CTIMER2_BASE, CTIMER3_BASE, CTIMER4_BASE }
- /** Array initializer of CTIMER peripheral base pointers */
- #define CTIMER_BASE_PTRS { CTIMER0, CTIMER1, CTIMER2, CTIMER3, CTIMER4 }
- /** Array initializer of CTIMER peripheral base addresses */
- #define CTIMER_BASE_ADDRS_NS { CTIMER0_BASE_NS, CTIMER1_BASE_NS, CTIMER2_BASE_NS, CTIMER3_BASE_NS, CTIMER4_BASE_NS }
- /** Array initializer of CTIMER peripheral base pointers */
- #define CTIMER_BASE_PTRS_NS { CTIMER0_NS, CTIMER1_NS, CTIMER2_NS, CTIMER3_NS, CTIMER4_NS }
-#else
- /** Peripheral CTIMER0 base address */
- #define CTIMER0_BASE (0x40008000u)
- /** Peripheral CTIMER0 base pointer */
- #define CTIMER0 ((CTIMER_Type *)CTIMER0_BASE)
- /** Peripheral CTIMER1 base address */
- #define CTIMER1_BASE (0x40009000u)
- /** Peripheral CTIMER1 base pointer */
- #define CTIMER1 ((CTIMER_Type *)CTIMER1_BASE)
- /** Peripheral CTIMER2 base address */
- #define CTIMER2_BASE (0x40028000u)
- /** Peripheral CTIMER2 base pointer */
- #define CTIMER2 ((CTIMER_Type *)CTIMER2_BASE)
- /** Peripheral CTIMER3 base address */
- #define CTIMER3_BASE (0x40029000u)
- /** Peripheral CTIMER3 base pointer */
- #define CTIMER3 ((CTIMER_Type *)CTIMER3_BASE)
- /** Peripheral CTIMER4 base address */
- #define CTIMER4_BASE (0x4002A000u)
- /** Peripheral CTIMER4 base pointer */
- #define CTIMER4 ((CTIMER_Type *)CTIMER4_BASE)
- /** Array initializer of CTIMER peripheral base addresses */
- #define CTIMER_BASE_ADDRS { CTIMER0_BASE, CTIMER1_BASE, CTIMER2_BASE, CTIMER3_BASE, CTIMER4_BASE }
- /** Array initializer of CTIMER peripheral base pointers */
- #define CTIMER_BASE_PTRS { CTIMER0, CTIMER1, CTIMER2, CTIMER3, CTIMER4 }
-#endif
-/** Interrupt vectors for the CTIMER peripheral type */
-#define CTIMER_IRQS { CTIMER0_IRQn, CTIMER1_IRQn, CTIMER2_IRQn, CTIMER3_IRQn, CTIMER4_IRQn }
-
-/*!
- * @}
- */ /* end of group CTIMER_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- DBGMAILBOX Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup DBGMAILBOX_Peripheral_Access_Layer DBGMAILBOX Peripheral Access Layer
- * @{
- */
-
-/** DBGMAILBOX - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CSW; /**< CRC mode register, offset: 0x0 */
- __IO uint32_t REQUEST; /**< CRC seed register, offset: 0x4 */
- __IO uint32_t RETURN; /**< Return value from ROM., offset: 0x8 */
- uint8_t RESERVED_0[240];
- __I uint32_t ID; /**< Identification register, offset: 0xFC */
-} DBGMAILBOX_Type;
-
-/* ----------------------------------------------------------------------------
- -- DBGMAILBOX Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup DBGMAILBOX_Register_Masks DBGMAILBOX Register Masks
- * @{
- */
-
-/*! @name CSW - CRC mode register */
-/*! @{ */
-#define DBGMAILBOX_CSW_RESYNCH_REQ_MASK (0x1U)
-#define DBGMAILBOX_CSW_RESYNCH_REQ_SHIFT (0U)
-/*! RESYNCH_REQ - Debugger will set this bit to 1 to request a resynchronrisation
- */
-#define DBGMAILBOX_CSW_RESYNCH_REQ(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_CSW_RESYNCH_REQ_SHIFT)) & DBGMAILBOX_CSW_RESYNCH_REQ_MASK)
-#define DBGMAILBOX_CSW_REQ_PENDING_MASK (0x2U)
-#define DBGMAILBOX_CSW_REQ_PENDING_SHIFT (1U)
-/*! REQ_PENDING - Request is pending from debugger (i.e unread value in REQUEST)
- */
-#define DBGMAILBOX_CSW_REQ_PENDING(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_CSW_REQ_PENDING_SHIFT)) & DBGMAILBOX_CSW_REQ_PENDING_MASK)
-#define DBGMAILBOX_CSW_DBG_OR_ERR_MASK (0x4U)
-#define DBGMAILBOX_CSW_DBG_OR_ERR_SHIFT (2U)
-/*! DBG_OR_ERR - Debugger overrun error (previous REQUEST overwritten before being picked up by ROM)
- */
-#define DBGMAILBOX_CSW_DBG_OR_ERR(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_CSW_DBG_OR_ERR_SHIFT)) & DBGMAILBOX_CSW_DBG_OR_ERR_MASK)
-#define DBGMAILBOX_CSW_AHB_OR_ERR_MASK (0x8U)
-#define DBGMAILBOX_CSW_AHB_OR_ERR_SHIFT (3U)
-/*! AHB_OR_ERR - AHB overrun Error (Return value overwritten by ROM)
- */
-#define DBGMAILBOX_CSW_AHB_OR_ERR(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_CSW_AHB_OR_ERR_SHIFT)) & DBGMAILBOX_CSW_AHB_OR_ERR_MASK)
-#define DBGMAILBOX_CSW_SOFT_RESET_MASK (0x10U)
-#define DBGMAILBOX_CSW_SOFT_RESET_SHIFT (4U)
-/*! SOFT_RESET - Soft Reset for DM (write-only from AHB, not readable and selfclearing). A write to
- * this bit will cause a soft reset for DM.
- */
-#define DBGMAILBOX_CSW_SOFT_RESET(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_CSW_SOFT_RESET_SHIFT)) & DBGMAILBOX_CSW_SOFT_RESET_MASK)
-#define DBGMAILBOX_CSW_CHIP_RESET_REQ_MASK (0x20U)
-#define DBGMAILBOX_CSW_CHIP_RESET_REQ_SHIFT (5U)
-/*! CHIP_RESET_REQ - Write only bit. Once written will cause the chip to reset (note that the DM is
- * not reset by this reset as it is only resettable by a SOFT reset or a POR/BOD event)
- */
-#define DBGMAILBOX_CSW_CHIP_RESET_REQ(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_CSW_CHIP_RESET_REQ_SHIFT)) & DBGMAILBOX_CSW_CHIP_RESET_REQ_MASK)
-/*! @} */
-
-/*! @name REQUEST - CRC seed register */
-/*! @{ */
-#define DBGMAILBOX_REQUEST_REQ_MASK (0xFFFFFFFFU)
-#define DBGMAILBOX_REQUEST_REQ_SHIFT (0U)
-/*! REQ - Request Value
- */
-#define DBGMAILBOX_REQUEST_REQ(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_REQUEST_REQ_SHIFT)) & DBGMAILBOX_REQUEST_REQ_MASK)
-/*! @} */
-
-/*! @name RETURN - Return value from ROM. */
-/*! @{ */
-#define DBGMAILBOX_RETURN_RET_MASK (0xFFFFFFFFU)
-#define DBGMAILBOX_RETURN_RET_SHIFT (0U)
-/*! RET - The Return value from ROM.
- */
-#define DBGMAILBOX_RETURN_RET(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_RETURN_RET_SHIFT)) & DBGMAILBOX_RETURN_RET_MASK)
-/*! @} */
-
-/*! @name ID - Identification register */
-/*! @{ */
-#define DBGMAILBOX_ID_ID_MASK (0xFFFFFFFFU)
-#define DBGMAILBOX_ID_ID_SHIFT (0U)
-/*! ID - Identification value.
- */
-#define DBGMAILBOX_ID_ID(x) (((uint32_t)(((uint32_t)(x)) << DBGMAILBOX_ID_ID_SHIFT)) & DBGMAILBOX_ID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group DBGMAILBOX_Register_Masks */
-
-
-/* DBGMAILBOX - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral DBGMAILBOX base address */
- #define DBGMAILBOX_BASE (0x5009C000u)
- /** Peripheral DBGMAILBOX base address */
- #define DBGMAILBOX_BASE_NS (0x4009C000u)
- /** Peripheral DBGMAILBOX base pointer */
- #define DBGMAILBOX ((DBGMAILBOX_Type *)DBGMAILBOX_BASE)
- /** Peripheral DBGMAILBOX base pointer */
- #define DBGMAILBOX_NS ((DBGMAILBOX_Type *)DBGMAILBOX_BASE_NS)
- /** Array initializer of DBGMAILBOX peripheral base addresses */
- #define DBGMAILBOX_BASE_ADDRS { DBGMAILBOX_BASE }
- /** Array initializer of DBGMAILBOX peripheral base pointers */
- #define DBGMAILBOX_BASE_PTRS { DBGMAILBOX }
- /** Array initializer of DBGMAILBOX peripheral base addresses */
- #define DBGMAILBOX_BASE_ADDRS_NS { DBGMAILBOX_BASE_NS }
- /** Array initializer of DBGMAILBOX peripheral base pointers */
- #define DBGMAILBOX_BASE_PTRS_NS { DBGMAILBOX_NS }
-#else
- /** Peripheral DBGMAILBOX base address */
- #define DBGMAILBOX_BASE (0x4009C000u)
- /** Peripheral DBGMAILBOX base pointer */
- #define DBGMAILBOX ((DBGMAILBOX_Type *)DBGMAILBOX_BASE)
- /** Array initializer of DBGMAILBOX peripheral base addresses */
- #define DBGMAILBOX_BASE_ADDRS { DBGMAILBOX_BASE }
- /** Array initializer of DBGMAILBOX peripheral base pointers */
- #define DBGMAILBOX_BASE_PTRS { DBGMAILBOX }
-#endif
-
-/*!
- * @}
- */ /* end of group DBGMAILBOX_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- DMA Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup DMA_Peripheral_Access_Layer DMA Peripheral Access Layer
- * @{
- */
-
-/** DMA - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< DMA control., offset: 0x0 */
- __I uint32_t INTSTAT; /**< Interrupt status., offset: 0x4 */
- __IO uint32_t SRAMBASE; /**< SRAM address of the channel configuration table., offset: 0x8 */
- uint8_t RESERVED_0[20];
- struct { /* offset: 0x20, array step: 0x5C */
- __IO uint32_t ENABLESET; /**< Channel Enable read and Set for all DMA channels., array offset: 0x20, array step: 0x5C */
- uint8_t RESERVED_0[4];
- __O uint32_t ENABLECLR; /**< Channel Enable Clear for all DMA channels., array offset: 0x28, array step: 0x5C */
- uint8_t RESERVED_1[4];
- __I uint32_t ACTIVE; /**< Channel Active status for all DMA channels., array offset: 0x30, array step: 0x5C */
- uint8_t RESERVED_2[4];
- __I uint32_t BUSY; /**< Channel Busy status for all DMA channels., array offset: 0x38, array step: 0x5C */
- uint8_t RESERVED_3[4];
- __IO uint32_t ERRINT; /**< Error Interrupt status for all DMA channels., array offset: 0x40, array step: 0x5C */
- uint8_t RESERVED_4[4];
- __IO uint32_t INTENSET; /**< Interrupt Enable read and Set for all DMA channels., array offset: 0x48, array step: 0x5C */
- uint8_t RESERVED_5[4];
- __O uint32_t INTENCLR; /**< Interrupt Enable Clear for all DMA channels., array offset: 0x50, array step: 0x5C */
- uint8_t RESERVED_6[4];
- __IO uint32_t INTA; /**< Interrupt A status for all DMA channels., array offset: 0x58, array step: 0x5C */
- uint8_t RESERVED_7[4];
- __IO uint32_t INTB; /**< Interrupt B status for all DMA channels., array offset: 0x60, array step: 0x5C */
- uint8_t RESERVED_8[4];
- __O uint32_t SETVALID; /**< Set ValidPending control bits for all DMA channels., array offset: 0x68, array step: 0x5C */
- uint8_t RESERVED_9[4];
- __O uint32_t SETTRIG; /**< Set Trigger control bits for all DMA channels., array offset: 0x70, array step: 0x5C */
- uint8_t RESERVED_10[4];
- __O uint32_t ABORT; /**< Channel Abort control for all DMA channels., array offset: 0x78, array step: 0x5C */
- } COMMON[1];
- uint8_t RESERVED_1[900];
- struct { /* offset: 0x400, array step: 0x10 */
- __IO uint32_t CFG; /**< Configuration register for DMA channel ., array offset: 0x400, array step: 0x10 */
- __I uint32_t CTLSTAT; /**< Control and status register for DMA channel ., array offset: 0x404, array step: 0x10 */
- __IO uint32_t XFERCFG; /**< Transfer configuration register for DMA channel ., array offset: 0x408, array step: 0x10 */
- uint8_t RESERVED_0[4];
- } CHANNEL[23];
-} DMA_Type;
-
-/* ----------------------------------------------------------------------------
- -- DMA Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup DMA_Register_Masks DMA Register Masks
- * @{
- */
-
-/*! @name CTRL - DMA control. */
-/*! @{ */
-#define DMA_CTRL_ENABLE_MASK (0x1U)
-#define DMA_CTRL_ENABLE_SHIFT (0U)
-/*! ENABLE - DMA controller master enable.
- * 0b0..Disabled. The DMA controller is disabled. This clears any triggers that were asserted at the point when
- * disabled, but does not prevent re-triggering when the DMA controller is re-enabled.
- * 0b1..Enabled. The DMA controller is enabled.
- */
-#define DMA_CTRL_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << DMA_CTRL_ENABLE_SHIFT)) & DMA_CTRL_ENABLE_MASK)
-/*! @} */
-
-/*! @name INTSTAT - Interrupt status. */
-/*! @{ */
-#define DMA_INTSTAT_ACTIVEINT_MASK (0x2U)
-#define DMA_INTSTAT_ACTIVEINT_SHIFT (1U)
-/*! ACTIVEINT - Summarizes whether any enabled interrupts (other than error interrupts) are pending.
- * 0b0..Not pending. No enabled interrupts are pending.
- * 0b1..Pending. At least one enabled interrupt is pending.
- */
-#define DMA_INTSTAT_ACTIVEINT(x) (((uint32_t)(((uint32_t)(x)) << DMA_INTSTAT_ACTIVEINT_SHIFT)) & DMA_INTSTAT_ACTIVEINT_MASK)
-#define DMA_INTSTAT_ACTIVEERRINT_MASK (0x4U)
-#define DMA_INTSTAT_ACTIVEERRINT_SHIFT (2U)
-/*! ACTIVEERRINT - Summarizes whether any error interrupts are pending.
- * 0b0..Not pending. No error interrupts are pending.
- * 0b1..Pending. At least one error interrupt is pending.
- */
-#define DMA_INTSTAT_ACTIVEERRINT(x) (((uint32_t)(((uint32_t)(x)) << DMA_INTSTAT_ACTIVEERRINT_SHIFT)) & DMA_INTSTAT_ACTIVEERRINT_MASK)
-/*! @} */
-
-/*! @name SRAMBASE - SRAM address of the channel configuration table. */
-/*! @{ */
-#define DMA_SRAMBASE_OFFSET_MASK (0xFFFFFE00U)
-#define DMA_SRAMBASE_OFFSET_SHIFT (9U)
-/*! OFFSET - Address bits 31:9 of the beginning of the DMA descriptor table. For 18 channels, the
- * table must begin on a 512 byte boundary.
- */
-#define DMA_SRAMBASE_OFFSET(x) (((uint32_t)(((uint32_t)(x)) << DMA_SRAMBASE_OFFSET_SHIFT)) & DMA_SRAMBASE_OFFSET_MASK)
-/*! @} */
-
-/*! @name COMMON_ENABLESET - Channel Enable read and Set for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_ENABLESET_ENA_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_ENABLESET_ENA_SHIFT (0U)
-/*! ENA - Enable for DMA channels. Bit n enables or disables DMA channel n. The number of bits =
- * number of DMA channels in this device. Other bits are reserved. 0 = disabled. 1 = enabled.
- */
-#define DMA_COMMON_ENABLESET_ENA(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ENABLESET_ENA_SHIFT)) & DMA_COMMON_ENABLESET_ENA_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_ENABLESET */
-#define DMA_COMMON_ENABLESET_COUNT (1U)
-
-/*! @name COMMON_ENABLECLR - Channel Enable Clear for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_ENABLECLR_CLR_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_ENABLECLR_CLR_SHIFT (0U)
-/*! CLR - Writing ones to this register clears the corresponding bits in ENABLESET0. Bit n clears
- * the channel enable bit n. The number of bits = number of DMA channels in this device. Other bits
- * are reserved.
- */
-#define DMA_COMMON_ENABLECLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ENABLECLR_CLR_SHIFT)) & DMA_COMMON_ENABLECLR_CLR_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_ENABLECLR */
-#define DMA_COMMON_ENABLECLR_COUNT (1U)
-
-/*! @name COMMON_ACTIVE - Channel Active status for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_ACTIVE_ACT_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_ACTIVE_ACT_SHIFT (0U)
-/*! ACT - Active flag for DMA channel n. Bit n corresponds to DMA channel n. The number of bits =
- * number of DMA channels in this device. Other bits are reserved. 0 = not active. 1 = active.
- */
-#define DMA_COMMON_ACTIVE_ACT(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ACTIVE_ACT_SHIFT)) & DMA_COMMON_ACTIVE_ACT_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_ACTIVE */
-#define DMA_COMMON_ACTIVE_COUNT (1U)
-
-/*! @name COMMON_BUSY - Channel Busy status for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_BUSY_BSY_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_BUSY_BSY_SHIFT (0U)
-/*! BSY - Busy flag for DMA channel n. Bit n corresponds to DMA channel n. The number of bits =
- * number of DMA channels in this device. Other bits are reserved. 0 = not busy. 1 = busy.
- */
-#define DMA_COMMON_BUSY_BSY(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_BUSY_BSY_SHIFT)) & DMA_COMMON_BUSY_BSY_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_BUSY */
-#define DMA_COMMON_BUSY_COUNT (1U)
-
-/*! @name COMMON_ERRINT - Error Interrupt status for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_ERRINT_ERR_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_ERRINT_ERR_SHIFT (0U)
-/*! ERR - Error Interrupt flag for DMA channel n. Bit n corresponds to DMA channel n. The number of
- * bits = number of DMA channels in this device. Other bits are reserved. 0 = error interrupt is
- * not active. 1 = error interrupt is active.
- */
-#define DMA_COMMON_ERRINT_ERR(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ERRINT_ERR_SHIFT)) & DMA_COMMON_ERRINT_ERR_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_ERRINT */
-#define DMA_COMMON_ERRINT_COUNT (1U)
-
-/*! @name COMMON_INTENSET - Interrupt Enable read and Set for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_INTENSET_INTEN_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_INTENSET_INTEN_SHIFT (0U)
-/*! INTEN - Interrupt Enable read and set for DMA channel n. Bit n corresponds to DMA channel n. The
- * number of bits = number of DMA channels in this device. Other bits are reserved. 0 =
- * interrupt for DMA channel is disabled. 1 = interrupt for DMA channel is enabled.
- */
-#define DMA_COMMON_INTENSET_INTEN(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_INTENSET_INTEN_SHIFT)) & DMA_COMMON_INTENSET_INTEN_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_INTENSET */
-#define DMA_COMMON_INTENSET_COUNT (1U)
-
-/*! @name COMMON_INTENCLR - Interrupt Enable Clear for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_INTENCLR_CLR_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_INTENCLR_CLR_SHIFT (0U)
-/*! CLR - Writing ones to this register clears corresponding bits in the INTENSET0. Bit n
- * corresponds to DMA channel n. The number of bits = number of DMA channels in this device. Other bits are
- * reserved.
- */
-#define DMA_COMMON_INTENCLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_INTENCLR_CLR_SHIFT)) & DMA_COMMON_INTENCLR_CLR_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_INTENCLR */
-#define DMA_COMMON_INTENCLR_COUNT (1U)
-
-/*! @name COMMON_INTA - Interrupt A status for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_INTA_IA_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_INTA_IA_SHIFT (0U)
-/*! IA - Interrupt A status for DMA channel n. Bit n corresponds to DMA channel n. The number of
- * bits = number of DMA channels in this device. Other bits are reserved. 0 = the DMA channel
- * interrupt A is not active. 1 = the DMA channel interrupt A is active.
- */
-#define DMA_COMMON_INTA_IA(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_INTA_IA_SHIFT)) & DMA_COMMON_INTA_IA_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_INTA */
-#define DMA_COMMON_INTA_COUNT (1U)
-
-/*! @name COMMON_INTB - Interrupt B status for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_INTB_IB_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_INTB_IB_SHIFT (0U)
-/*! IB - Interrupt B status for DMA channel n. Bit n corresponds to DMA channel n. The number of
- * bits = number of DMA channels in this device. Other bits are reserved. 0 = the DMA channel
- * interrupt B is not active. 1 = the DMA channel interrupt B is active.
- */
-#define DMA_COMMON_INTB_IB(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_INTB_IB_SHIFT)) & DMA_COMMON_INTB_IB_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_INTB */
-#define DMA_COMMON_INTB_COUNT (1U)
-
-/*! @name COMMON_SETVALID - Set ValidPending control bits for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_SETVALID_SV_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_SETVALID_SV_SHIFT (0U)
-/*! SV - SETVALID control for DMA channel n. Bit n corresponds to DMA channel n. The number of bits
- * = number of DMA channels in this device. Other bits are reserved. 0 = no effect. 1 = sets the
- * VALIDPENDING control bit for DMA channel n
- */
-#define DMA_COMMON_SETVALID_SV(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_SETVALID_SV_SHIFT)) & DMA_COMMON_SETVALID_SV_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_SETVALID */
-#define DMA_COMMON_SETVALID_COUNT (1U)
-
-/*! @name COMMON_SETTRIG - Set Trigger control bits for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_SETTRIG_TRIG_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_SETTRIG_TRIG_SHIFT (0U)
-/*! TRIG - Set Trigger control bit for DMA channel 0. Bit n corresponds to DMA channel n. The number
- * of bits = number of DMA channels in this device. Other bits are reserved. 0 = no effect. 1 =
- * sets the TRIG bit for DMA channel n.
- */
-#define DMA_COMMON_SETTRIG_TRIG(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_SETTRIG_TRIG_SHIFT)) & DMA_COMMON_SETTRIG_TRIG_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_SETTRIG */
-#define DMA_COMMON_SETTRIG_COUNT (1U)
-
-/*! @name COMMON_ABORT - Channel Abort control for all DMA channels. */
-/*! @{ */
-#define DMA_COMMON_ABORT_ABORTCTRL_MASK (0xFFFFFFFFU)
-#define DMA_COMMON_ABORT_ABORTCTRL_SHIFT (0U)
-/*! ABORTCTRL - Abort control for DMA channel 0. Bit n corresponds to DMA channel n. 0 = no effect.
- * 1 = aborts DMA operations on channel n.
- */
-#define DMA_COMMON_ABORT_ABORTCTRL(x) (((uint32_t)(((uint32_t)(x)) << DMA_COMMON_ABORT_ABORTCTRL_SHIFT)) & DMA_COMMON_ABORT_ABORTCTRL_MASK)
-/*! @} */
-
-/* The count of DMA_COMMON_ABORT */
-#define DMA_COMMON_ABORT_COUNT (1U)
-
-/*! @name CHANNEL_CFG - Configuration register for DMA channel . */
-/*! @{ */
-#define DMA_CHANNEL_CFG_PERIPHREQEN_MASK (0x1U)
-#define DMA_CHANNEL_CFG_PERIPHREQEN_SHIFT (0U)
-/*! PERIPHREQEN - Peripheral request Enable. If a DMA channel is used to perform a memory-to-memory
- * move, any peripheral DMA request associated with that channel can be disabled to prevent any
- * interaction between the peripheral and the DMA controller.
- * 0b0..Disabled. Peripheral DMA requests are disabled.
- * 0b1..Enabled. Peripheral DMA requests are enabled.
- */
-#define DMA_CHANNEL_CFG_PERIPHREQEN(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_PERIPHREQEN_SHIFT)) & DMA_CHANNEL_CFG_PERIPHREQEN_MASK)
-#define DMA_CHANNEL_CFG_HWTRIGEN_MASK (0x2U)
-#define DMA_CHANNEL_CFG_HWTRIGEN_SHIFT (1U)
-/*! HWTRIGEN - Hardware Triggering Enable for this channel.
- * 0b0..Disabled. Hardware triggering is not used.
- * 0b1..Enabled. Use hardware triggering.
- */
-#define DMA_CHANNEL_CFG_HWTRIGEN(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_HWTRIGEN_SHIFT)) & DMA_CHANNEL_CFG_HWTRIGEN_MASK)
-#define DMA_CHANNEL_CFG_TRIGPOL_MASK (0x10U)
-#define DMA_CHANNEL_CFG_TRIGPOL_SHIFT (4U)
-/*! TRIGPOL - Trigger Polarity. Selects the polarity of a hardware trigger for this channel.
- * 0b0..Active low - falling edge. Hardware trigger is active low or falling edge triggered, based on TRIGTYPE.
- * 0b1..Active high - rising edge. Hardware trigger is active high or rising edge triggered, based on TRIGTYPE.
- */
-#define DMA_CHANNEL_CFG_TRIGPOL(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_TRIGPOL_SHIFT)) & DMA_CHANNEL_CFG_TRIGPOL_MASK)
-#define DMA_CHANNEL_CFG_TRIGTYPE_MASK (0x20U)
-#define DMA_CHANNEL_CFG_TRIGTYPE_SHIFT (5U)
-/*! TRIGTYPE - Trigger Type. Selects hardware trigger as edge triggered or level triggered.
- * 0b0..Edge. Hardware trigger is edge triggered. Transfers will be initiated and completed, as specified for a single trigger.
- * 0b1..Level. Hardware trigger is level triggered. Note that when level triggering without burst (BURSTPOWER =
- * 0) is selected, only hardware triggers should be used on that channel. Transfers continue as long as the
- * trigger level is asserted. Once the trigger is de-asserted, the transfer will be paused until the trigger
- * is, again, asserted. However, the transfer will not be paused until any remaining transfers within the
- * current BURSTPOWER length are completed.
- */
-#define DMA_CHANNEL_CFG_TRIGTYPE(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_TRIGTYPE_SHIFT)) & DMA_CHANNEL_CFG_TRIGTYPE_MASK)
-#define DMA_CHANNEL_CFG_TRIGBURST_MASK (0x40U)
-#define DMA_CHANNEL_CFG_TRIGBURST_SHIFT (6U)
-/*! TRIGBURST - Trigger Burst. Selects whether hardware triggers cause a single or burst transfer.
- * 0b0..Single transfer. Hardware trigger causes a single transfer.
- * 0b1..Burst transfer. When the trigger for this channel is set to edge triggered, a hardware trigger causes a
- * burst transfer, as defined by BURSTPOWER. When the trigger for this channel is set to level triggered, a
- * hardware trigger causes transfers to continue as long as the trigger is asserted, unless the transfer is
- * complete.
- */
-#define DMA_CHANNEL_CFG_TRIGBURST(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_TRIGBURST_SHIFT)) & DMA_CHANNEL_CFG_TRIGBURST_MASK)
-#define DMA_CHANNEL_CFG_BURSTPOWER_MASK (0xF00U)
-#define DMA_CHANNEL_CFG_BURSTPOWER_SHIFT (8U)
-/*! BURSTPOWER - Burst Power is used in two ways. It always selects the address wrap size when
- * SRCBURSTWRAP and/or DSTBURSTWRAP modes are selected (see descriptions elsewhere in this register).
- * When the TRIGBURST field elsewhere in this register = 1, Burst Power selects how many
- * transfers are performed for each DMA trigger. This can be used, for example, with peripherals that
- * contain a FIFO that can initiate a DMA operation when the FIFO reaches a certain level. 0000:
- * Burst size = 1 (20). 0001: Burst size = 2 (21). 0010: Burst size = 4 (22). 1010: Burst size =
- * 1024 (210). This corresponds to the maximum supported transfer count. others: not supported. The
- * total transfer length as defined in the XFERCOUNT bits in the XFERCFG register must be an even
- * multiple of the burst size.
- */
-#define DMA_CHANNEL_CFG_BURSTPOWER(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_BURSTPOWER_SHIFT)) & DMA_CHANNEL_CFG_BURSTPOWER_MASK)
-#define DMA_CHANNEL_CFG_SRCBURSTWRAP_MASK (0x4000U)
-#define DMA_CHANNEL_CFG_SRCBURSTWRAP_SHIFT (14U)
-/*! SRCBURSTWRAP - Source Burst Wrap. When enabled, the source data address for the DMA is
- * 'wrapped', meaning that the source address range for each burst will be the same. As an example, this
- * could be used to read several sequential registers from a peripheral for each DMA burst,
- * reading the same registers again for each burst.
- * 0b0..Disabled. Source burst wrapping is not enabled for this DMA channel.
- * 0b1..Enabled. Source burst wrapping is enabled for this DMA channel.
- */
-#define DMA_CHANNEL_CFG_SRCBURSTWRAP(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_SRCBURSTWRAP_SHIFT)) & DMA_CHANNEL_CFG_SRCBURSTWRAP_MASK)
-#define DMA_CHANNEL_CFG_DSTBURSTWRAP_MASK (0x8000U)
-#define DMA_CHANNEL_CFG_DSTBURSTWRAP_SHIFT (15U)
-/*! DSTBURSTWRAP - Destination Burst Wrap. When enabled, the destination data address for the DMA is
- * 'wrapped', meaning that the destination address range for each burst will be the same. As an
- * example, this could be used to write several sequential registers to a peripheral for each DMA
- * burst, writing the same registers again for each burst.
- * 0b0..Disabled. Destination burst wrapping is not enabled for this DMA channel.
- * 0b1..Enabled. Destination burst wrapping is enabled for this DMA channel.
- */
-#define DMA_CHANNEL_CFG_DSTBURSTWRAP(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_DSTBURSTWRAP_SHIFT)) & DMA_CHANNEL_CFG_DSTBURSTWRAP_MASK)
-#define DMA_CHANNEL_CFG_CHPRIORITY_MASK (0x70000U)
-#define DMA_CHANNEL_CFG_CHPRIORITY_SHIFT (16U)
-/*! CHPRIORITY - Priority of this channel when multiple DMA requests are pending. Eight priority
- * levels are supported: 0x0 = highest priority. 0x7 = lowest priority.
- */
-#define DMA_CHANNEL_CFG_CHPRIORITY(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CFG_CHPRIORITY_SHIFT)) & DMA_CHANNEL_CFG_CHPRIORITY_MASK)
-/*! @} */
-
-/* The count of DMA_CHANNEL_CFG */
-#define DMA_CHANNEL_CFG_COUNT (23U)
-
-/*! @name CHANNEL_CTLSTAT - Control and status register for DMA channel . */
-/*! @{ */
-#define DMA_CHANNEL_CTLSTAT_VALIDPENDING_MASK (0x1U)
-#define DMA_CHANNEL_CTLSTAT_VALIDPENDING_SHIFT (0U)
-/*! VALIDPENDING - Valid pending flag for this channel. This bit is set when a 1 is written to the
- * corresponding bit in the related SETVALID register when CFGVALID = 1 for the same channel.
- * 0b0..No effect. No effect on DMA operation.
- * 0b1..Valid pending.
- */
-#define DMA_CHANNEL_CTLSTAT_VALIDPENDING(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CTLSTAT_VALIDPENDING_SHIFT)) & DMA_CHANNEL_CTLSTAT_VALIDPENDING_MASK)
-#define DMA_CHANNEL_CTLSTAT_TRIG_MASK (0x4U)
-#define DMA_CHANNEL_CTLSTAT_TRIG_SHIFT (2U)
-/*! TRIG - Trigger flag. Indicates that the trigger for this channel is currently set. This bit is
- * cleared at the end of an entire transfer or upon reload when CLRTRIG = 1.
- * 0b0..Not triggered. The trigger for this DMA channel is not set. DMA operations will not be carried out.
- * 0b1..Triggered. The trigger for this DMA channel is set. DMA operations will be carried out.
- */
-#define DMA_CHANNEL_CTLSTAT_TRIG(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_CTLSTAT_TRIG_SHIFT)) & DMA_CHANNEL_CTLSTAT_TRIG_MASK)
-/*! @} */
-
-/* The count of DMA_CHANNEL_CTLSTAT */
-#define DMA_CHANNEL_CTLSTAT_COUNT (23U)
-
-/*! @name CHANNEL_XFERCFG - Transfer configuration register for DMA channel . */
-/*! @{ */
-#define DMA_CHANNEL_XFERCFG_CFGVALID_MASK (0x1U)
-#define DMA_CHANNEL_XFERCFG_CFGVALID_SHIFT (0U)
-/*! CFGVALID - Configuration Valid flag. This bit indicates whether the current channel descriptor
- * is valid and can potentially be acted upon, if all other activation criteria are fulfilled.
- * 0b0..Not valid. The channel descriptor is not considered valid until validated by an associated SETVALID0 setting.
- * 0b1..Valid. The current channel descriptor is considered valid.
- */
-#define DMA_CHANNEL_XFERCFG_CFGVALID(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_CFGVALID_SHIFT)) & DMA_CHANNEL_XFERCFG_CFGVALID_MASK)
-#define DMA_CHANNEL_XFERCFG_RELOAD_MASK (0x2U)
-#define DMA_CHANNEL_XFERCFG_RELOAD_SHIFT (1U)
-/*! RELOAD - Indicates whether the channel's control structure will be reloaded when the current
- * descriptor is exhausted. Reloading allows ping-pong and linked transfers.
- * 0b0..Disabled. Do not reload the channels' control structure when the current descriptor is exhausted.
- * 0b1..Enabled. Reload the channels' control structure when the current descriptor is exhausted.
- */
-#define DMA_CHANNEL_XFERCFG_RELOAD(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_RELOAD_SHIFT)) & DMA_CHANNEL_XFERCFG_RELOAD_MASK)
-#define DMA_CHANNEL_XFERCFG_SWTRIG_MASK (0x4U)
-#define DMA_CHANNEL_XFERCFG_SWTRIG_SHIFT (2U)
-/*! SWTRIG - Software Trigger.
- * 0b0..Not set. When written by software, the trigger for this channel is not set. A new trigger, as defined by
- * the HWTRIGEN, TRIGPOL, and TRIGTYPE will be needed to start the channel.
- * 0b1..Set. When written by software, the trigger for this channel is set immediately. This feature should not
- * be used with level triggering when TRIGBURST = 0.
- */
-#define DMA_CHANNEL_XFERCFG_SWTRIG(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_SWTRIG_SHIFT)) & DMA_CHANNEL_XFERCFG_SWTRIG_MASK)
-#define DMA_CHANNEL_XFERCFG_CLRTRIG_MASK (0x8U)
-#define DMA_CHANNEL_XFERCFG_CLRTRIG_SHIFT (3U)
-/*! CLRTRIG - Clear Trigger.
- * 0b0..Not cleared. The trigger is not cleared when this descriptor is exhausted. If there is a reload, the next descriptor will be started.
- * 0b1..Cleared. The trigger is cleared when this descriptor is exhausted
- */
-#define DMA_CHANNEL_XFERCFG_CLRTRIG(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_CLRTRIG_SHIFT)) & DMA_CHANNEL_XFERCFG_CLRTRIG_MASK)
-#define DMA_CHANNEL_XFERCFG_SETINTA_MASK (0x10U)
-#define DMA_CHANNEL_XFERCFG_SETINTA_SHIFT (4U)
-/*! SETINTA - Set Interrupt flag A for this channel. There is no hardware distinction between
- * interrupt A and B. They can be used by software to assist with more complex descriptor usage. By
- * convention, interrupt A may be used when only one interrupt flag is needed.
- * 0b0..No effect.
- * 0b1..Set. The INTA flag for this channel will be set when the current descriptor is exhausted.
- */
-#define DMA_CHANNEL_XFERCFG_SETINTA(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_SETINTA_SHIFT)) & DMA_CHANNEL_XFERCFG_SETINTA_MASK)
-#define DMA_CHANNEL_XFERCFG_SETINTB_MASK (0x20U)
-#define DMA_CHANNEL_XFERCFG_SETINTB_SHIFT (5U)
-/*! SETINTB - Set Interrupt flag B for this channel. There is no hardware distinction between
- * interrupt A and B. They can be used by software to assist with more complex descriptor usage. By
- * convention, interrupt A may be used when only one interrupt flag is needed.
- * 0b0..No effect.
- * 0b1..Set. The INTB flag for this channel will be set when the current descriptor is exhausted.
- */
-#define DMA_CHANNEL_XFERCFG_SETINTB(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_SETINTB_SHIFT)) & DMA_CHANNEL_XFERCFG_SETINTB_MASK)
-#define DMA_CHANNEL_XFERCFG_WIDTH_MASK (0x300U)
-#define DMA_CHANNEL_XFERCFG_WIDTH_SHIFT (8U)
-/*! WIDTH - Transfer width used for this DMA channel.
- * 0b00..8-bit. 8-bit transfers are performed (8-bit source reads and destination writes).
- * 0b01..16-bit. 6-bit transfers are performed (16-bit source reads and destination writes).
- * 0b10..32-bit. 32-bit transfers are performed (32-bit source reads and destination writes).
- * 0b11..Reserved. Reserved setting, do not use.
- */
-#define DMA_CHANNEL_XFERCFG_WIDTH(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_WIDTH_SHIFT)) & DMA_CHANNEL_XFERCFG_WIDTH_MASK)
-#define DMA_CHANNEL_XFERCFG_SRCINC_MASK (0x3000U)
-#define DMA_CHANNEL_XFERCFG_SRCINC_SHIFT (12U)
-/*! SRCINC - Determines whether the source address is incremented for each DMA transfer.
- * 0b00..No increment. The source address is not incremented for each transfer. This is the usual case when the source is a peripheral device.
- * 0b01..1 x width. The source address is incremented by the amount specified by Width for each transfer. This is
- * the usual case when the source is memory.
- * 0b10..2 x width. The source address is incremented by 2 times the amount specified by Width for each transfer.
- * 0b11..4 x width. The source address is incremented by 4 times the amount specified by Width for each transfer.
- */
-#define DMA_CHANNEL_XFERCFG_SRCINC(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_SRCINC_SHIFT)) & DMA_CHANNEL_XFERCFG_SRCINC_MASK)
-#define DMA_CHANNEL_XFERCFG_DSTINC_MASK (0xC000U)
-#define DMA_CHANNEL_XFERCFG_DSTINC_SHIFT (14U)
-/*! DSTINC - Determines whether the destination address is incremented for each DMA transfer.
- * 0b00..No increment. The destination address is not incremented for each transfer. This is the usual case when
- * the destination is a peripheral device.
- * 0b01..1 x width. The destination address is incremented by the amount specified by Width for each transfer.
- * This is the usual case when the destination is memory.
- * 0b10..2 x width. The destination address is incremented by 2 times the amount specified by Width for each transfer.
- * 0b11..4 x width. The destination address is incremented by 4 times the amount specified by Width for each transfer.
- */
-#define DMA_CHANNEL_XFERCFG_DSTINC(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_DSTINC_SHIFT)) & DMA_CHANNEL_XFERCFG_DSTINC_MASK)
-#define DMA_CHANNEL_XFERCFG_XFERCOUNT_MASK (0x3FF0000U)
-#define DMA_CHANNEL_XFERCFG_XFERCOUNT_SHIFT (16U)
-/*! XFERCOUNT - Total number of transfers to be performed, minus 1 encoded. The number of bytes
- * transferred is: (XFERCOUNT + 1) x data width (as defined by the WIDTH field). The DMA controller
- * uses this bit field during transfer to count down. Hence, it cannot be used by software to read
- * back the size of the transfer, for instance, in an interrupt handler. 0x0 = a total of 1
- * transfer will be performed. 0x1 = a total of 2 transfers will be performed. 0x3FF = a total of
- * 1,024 transfers will be performed.
- */
-#define DMA_CHANNEL_XFERCFG_XFERCOUNT(x) (((uint32_t)(((uint32_t)(x)) << DMA_CHANNEL_XFERCFG_XFERCOUNT_SHIFT)) & DMA_CHANNEL_XFERCFG_XFERCOUNT_MASK)
-/*! @} */
-
-/* The count of DMA_CHANNEL_XFERCFG */
-#define DMA_CHANNEL_XFERCFG_COUNT (23U)
-
-
-/*!
- * @}
- */ /* end of group DMA_Register_Masks */
-
-
-/* DMA - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral DMA0 base address */
- #define DMA0_BASE (0x50082000u)
- /** Peripheral DMA0 base address */
- #define DMA0_BASE_NS (0x40082000u)
- /** Peripheral DMA0 base pointer */
- #define DMA0 ((DMA_Type *)DMA0_BASE)
- /** Peripheral DMA0 base pointer */
- #define DMA0_NS ((DMA_Type *)DMA0_BASE_NS)
- /** Peripheral DMA1 base address */
- #define DMA1_BASE (0x500A7000u)
- /** Peripheral DMA1 base address */
- #define DMA1_BASE_NS (0x400A7000u)
- /** Peripheral DMA1 base pointer */
- #define DMA1 ((DMA_Type *)DMA1_BASE)
- /** Peripheral DMA1 base pointer */
- #define DMA1_NS ((DMA_Type *)DMA1_BASE_NS)
- /** Array initializer of DMA peripheral base addresses */
- #define DMA_BASE_ADDRS { DMA0_BASE, DMA1_BASE }
- /** Array initializer of DMA peripheral base pointers */
- #define DMA_BASE_PTRS { DMA0, DMA1 }
- /** Array initializer of DMA peripheral base addresses */
- #define DMA_BASE_ADDRS_NS { DMA0_BASE_NS, DMA1_BASE_NS }
- /** Array initializer of DMA peripheral base pointers */
- #define DMA_BASE_PTRS_NS { DMA0_NS, DMA1_NS }
-#else
- /** Peripheral DMA0 base address */
- #define DMA0_BASE (0x40082000u)
- /** Peripheral DMA0 base pointer */
- #define DMA0 ((DMA_Type *)DMA0_BASE)
- /** Peripheral DMA1 base address */
- #define DMA1_BASE (0x400A7000u)
- /** Peripheral DMA1 base pointer */
- #define DMA1 ((DMA_Type *)DMA1_BASE)
- /** Array initializer of DMA peripheral base addresses */
- #define DMA_BASE_ADDRS { DMA0_BASE, DMA1_BASE }
- /** Array initializer of DMA peripheral base pointers */
- #define DMA_BASE_PTRS { DMA0, DMA1 }
-#endif
-/** Interrupt vectors for the DMA peripheral type */
-#define DMA_IRQS { DMA0_IRQn, DMA1_IRQn }
-
-/*!
- * @}
- */ /* end of group DMA_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- FLASH Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_Peripheral_Access_Layer FLASH Peripheral Access Layer
- * @{
- */
-
-/** FLASH - Register Layout Typedef */
-typedef struct {
- __O uint32_t CMD; /**< command register, offset: 0x0 */
- __O uint32_t EVENT; /**< event register, offset: 0x4 */
- uint8_t RESERVED_0[8];
- __IO uint32_t STARTA; /**< start (or only) address for next flash command, offset: 0x10 */
- __IO uint32_t STOPA; /**< end address for next flash command, if command operates on address ranges, offset: 0x14 */
- uint8_t RESERVED_1[104];
- __IO uint32_t DATAW[4]; /**< data register, word 0-7; Memory data, or command parameter, or command result., array offset: 0x80, array step: 0x4 */
- uint8_t RESERVED_2[3912];
- __O uint32_t INT_CLR_ENABLE; /**< Clear interrupt enable bits, offset: 0xFD8 */
- __O uint32_t INT_SET_ENABLE; /**< Set interrupt enable bits, offset: 0xFDC */
- __I uint32_t INT_STATUS; /**< Interrupt status bits, offset: 0xFE0 */
- __I uint32_t INT_ENABLE; /**< Interrupt enable bits, offset: 0xFE4 */
- __O uint32_t INT_CLR_STATUS; /**< Clear interrupt status bits, offset: 0xFE8 */
- __O uint32_t INT_SET_STATUS; /**< Set interrupt status bits, offset: 0xFEC */
- uint8_t RESERVED_3[12];
- __I uint32_t MODULE_ID; /**< Controller+Memory module identification, offset: 0xFFC */
-} FLASH_Type;
-
-/* ----------------------------------------------------------------------------
- -- FLASH Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_Register_Masks FLASH Register Masks
- * @{
- */
-
-/*! @name CMD - command register */
-/*! @{ */
-#define FLASH_CMD_CMD_MASK (0xFFFFFFFFU)
-#define FLASH_CMD_CMD_SHIFT (0U)
-/*! CMD - command register.
- */
-#define FLASH_CMD_CMD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMD_CMD_SHIFT)) & FLASH_CMD_CMD_MASK)
-/*! @} */
-
-/*! @name EVENT - event register */
-/*! @{ */
-#define FLASH_EVENT_RST_MASK (0x1U)
-#define FLASH_EVENT_RST_SHIFT (0U)
-/*! RST - When bit is set, the controller and flash are reset.
- */
-#define FLASH_EVENT_RST(x) (((uint32_t)(((uint32_t)(x)) << FLASH_EVENT_RST_SHIFT)) & FLASH_EVENT_RST_MASK)
-#define FLASH_EVENT_WAKEUP_MASK (0x2U)
-#define FLASH_EVENT_WAKEUP_SHIFT (1U)
-/*! WAKEUP - When bit is set, the controller wakes up from whatever low power or powerdown mode was active.
- */
-#define FLASH_EVENT_WAKEUP(x) (((uint32_t)(((uint32_t)(x)) << FLASH_EVENT_WAKEUP_SHIFT)) & FLASH_EVENT_WAKEUP_MASK)
-#define FLASH_EVENT_ABORT_MASK (0x4U)
-#define FLASH_EVENT_ABORT_SHIFT (2U)
-/*! ABORT - When bit is set, a running program/erase command is aborted.
- */
-#define FLASH_EVENT_ABORT(x) (((uint32_t)(((uint32_t)(x)) << FLASH_EVENT_ABORT_SHIFT)) & FLASH_EVENT_ABORT_MASK)
-/*! @} */
-
-/*! @name STARTA - start (or only) address for next flash command */
-/*! @{ */
-#define FLASH_STARTA_STARTA_MASK (0x3FFFFU)
-#define FLASH_STARTA_STARTA_SHIFT (0U)
-/*! STARTA - Address / Start address for commands that take an address (range) as a parameter.
- */
-#define FLASH_STARTA_STARTA(x) (((uint32_t)(((uint32_t)(x)) << FLASH_STARTA_STARTA_SHIFT)) & FLASH_STARTA_STARTA_MASK)
-/*! @} */
-
-/*! @name STOPA - end address for next flash command, if command operates on address ranges */
-/*! @{ */
-#define FLASH_STOPA_STOPA_MASK (0x3FFFFU)
-#define FLASH_STOPA_STOPA_SHIFT (0U)
-/*! STOPA - Stop address for commands that take an address range as a parameter (the word specified
- * by STOPA is included in the address range).
- */
-#define FLASH_STOPA_STOPA(x) (((uint32_t)(((uint32_t)(x)) << FLASH_STOPA_STOPA_SHIFT)) & FLASH_STOPA_STOPA_MASK)
-/*! @} */
-
-/*! @name DATAW - data register, word 0-7; Memory data, or command parameter, or command result. */
-/*! @{ */
-#define FLASH_DATAW_DATAW_MASK (0xFFFFFFFFU)
-#define FLASH_DATAW_DATAW_SHIFT (0U)
-#define FLASH_DATAW_DATAW(x) (((uint32_t)(((uint32_t)(x)) << FLASH_DATAW_DATAW_SHIFT)) & FLASH_DATAW_DATAW_MASK)
-/*! @} */
-
-/* The count of FLASH_DATAW */
-#define FLASH_DATAW_COUNT (4U)
-
-/*! @name INT_CLR_ENABLE - Clear interrupt enable bits */
-/*! @{ */
-#define FLASH_INT_CLR_ENABLE_FAIL_MASK (0x1U)
-#define FLASH_INT_CLR_ENABLE_FAIL_SHIFT (0U)
-/*! FAIL - When a CLR_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is cleared.
- */
-#define FLASH_INT_CLR_ENABLE_FAIL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_ENABLE_FAIL_SHIFT)) & FLASH_INT_CLR_ENABLE_FAIL_MASK)
-#define FLASH_INT_CLR_ENABLE_ERR_MASK (0x2U)
-#define FLASH_INT_CLR_ENABLE_ERR_SHIFT (1U)
-/*! ERR - When a CLR_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is cleared.
- */
-#define FLASH_INT_CLR_ENABLE_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_ENABLE_ERR_SHIFT)) & FLASH_INT_CLR_ENABLE_ERR_MASK)
-#define FLASH_INT_CLR_ENABLE_DONE_MASK (0x4U)
-#define FLASH_INT_CLR_ENABLE_DONE_SHIFT (2U)
-/*! DONE - When a CLR_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is cleared.
- */
-#define FLASH_INT_CLR_ENABLE_DONE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_ENABLE_DONE_SHIFT)) & FLASH_INT_CLR_ENABLE_DONE_MASK)
-#define FLASH_INT_CLR_ENABLE_ECC_ERR_MASK (0x8U)
-#define FLASH_INT_CLR_ENABLE_ECC_ERR_SHIFT (3U)
-/*! ECC_ERR - When a CLR_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is cleared.
- */
-#define FLASH_INT_CLR_ENABLE_ECC_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_ENABLE_ECC_ERR_SHIFT)) & FLASH_INT_CLR_ENABLE_ECC_ERR_MASK)
-/*! @} */
-
-/*! @name INT_SET_ENABLE - Set interrupt enable bits */
-/*! @{ */
-#define FLASH_INT_SET_ENABLE_FAIL_MASK (0x1U)
-#define FLASH_INT_SET_ENABLE_FAIL_SHIFT (0U)
-/*! FAIL - When a SET_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is set.
- */
-#define FLASH_INT_SET_ENABLE_FAIL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_ENABLE_FAIL_SHIFT)) & FLASH_INT_SET_ENABLE_FAIL_MASK)
-#define FLASH_INT_SET_ENABLE_ERR_MASK (0x2U)
-#define FLASH_INT_SET_ENABLE_ERR_SHIFT (1U)
-/*! ERR - When a SET_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is set.
- */
-#define FLASH_INT_SET_ENABLE_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_ENABLE_ERR_SHIFT)) & FLASH_INT_SET_ENABLE_ERR_MASK)
-#define FLASH_INT_SET_ENABLE_DONE_MASK (0x4U)
-#define FLASH_INT_SET_ENABLE_DONE_SHIFT (2U)
-/*! DONE - When a SET_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is set.
- */
-#define FLASH_INT_SET_ENABLE_DONE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_ENABLE_DONE_SHIFT)) & FLASH_INT_SET_ENABLE_DONE_MASK)
-#define FLASH_INT_SET_ENABLE_ECC_ERR_MASK (0x8U)
-#define FLASH_INT_SET_ENABLE_ECC_ERR_SHIFT (3U)
-/*! ECC_ERR - When a SET_ENABLE bit is written to 1, the corresponding INT_ENABLE bit is set.
- */
-#define FLASH_INT_SET_ENABLE_ECC_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_ENABLE_ECC_ERR_SHIFT)) & FLASH_INT_SET_ENABLE_ECC_ERR_MASK)
-/*! @} */
-
-/*! @name INT_STATUS - Interrupt status bits */
-/*! @{ */
-#define FLASH_INT_STATUS_FAIL_MASK (0x1U)
-#define FLASH_INT_STATUS_FAIL_SHIFT (0U)
-/*! FAIL - This status bit is set if execution of a (legal) command failed.
- */
-#define FLASH_INT_STATUS_FAIL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_STATUS_FAIL_SHIFT)) & FLASH_INT_STATUS_FAIL_MASK)
-#define FLASH_INT_STATUS_ERR_MASK (0x2U)
-#define FLASH_INT_STATUS_ERR_SHIFT (1U)
-/*! ERR - This status bit is set if execution of an illegal command is detected.
- */
-#define FLASH_INT_STATUS_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_STATUS_ERR_SHIFT)) & FLASH_INT_STATUS_ERR_MASK)
-#define FLASH_INT_STATUS_DONE_MASK (0x4U)
-#define FLASH_INT_STATUS_DONE_SHIFT (2U)
-/*! DONE - This status bit is set at the end of command execution.
- */
-#define FLASH_INT_STATUS_DONE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_STATUS_DONE_SHIFT)) & FLASH_INT_STATUS_DONE_MASK)
-#define FLASH_INT_STATUS_ECC_ERR_MASK (0x8U)
-#define FLASH_INT_STATUS_ECC_ERR_SHIFT (3U)
-/*! ECC_ERR - This status bit is set if, during a memory read operation (either a user-requested
- * read, or a speculative read, or reads performed by a controller command), a correctable or
- * uncorrectable error is detected by ECC decoding logic.
- */
-#define FLASH_INT_STATUS_ECC_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_STATUS_ECC_ERR_SHIFT)) & FLASH_INT_STATUS_ECC_ERR_MASK)
-/*! @} */
-
-/*! @name INT_ENABLE - Interrupt enable bits */
-/*! @{ */
-#define FLASH_INT_ENABLE_FAIL_MASK (0x1U)
-#define FLASH_INT_ENABLE_FAIL_SHIFT (0U)
-/*! FAIL - If an INT_ENABLE bit is set, an interrupt request will be generated if the corresponding INT_STATUS bit is high.
- */
-#define FLASH_INT_ENABLE_FAIL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_ENABLE_FAIL_SHIFT)) & FLASH_INT_ENABLE_FAIL_MASK)
-#define FLASH_INT_ENABLE_ERR_MASK (0x2U)
-#define FLASH_INT_ENABLE_ERR_SHIFT (1U)
-/*! ERR - If an INT_ENABLE bit is set, an interrupt request will be generated if the corresponding INT_STATUS bit is high.
- */
-#define FLASH_INT_ENABLE_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_ENABLE_ERR_SHIFT)) & FLASH_INT_ENABLE_ERR_MASK)
-#define FLASH_INT_ENABLE_DONE_MASK (0x4U)
-#define FLASH_INT_ENABLE_DONE_SHIFT (2U)
-/*! DONE - If an INT_ENABLE bit is set, an interrupt request will be generated if the corresponding INT_STATUS bit is high.
- */
-#define FLASH_INT_ENABLE_DONE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_ENABLE_DONE_SHIFT)) & FLASH_INT_ENABLE_DONE_MASK)
-#define FLASH_INT_ENABLE_ECC_ERR_MASK (0x8U)
-#define FLASH_INT_ENABLE_ECC_ERR_SHIFT (3U)
-/*! ECC_ERR - If an INT_ENABLE bit is set, an interrupt request will be generated if the corresponding INT_STATUS bit is high.
- */
-#define FLASH_INT_ENABLE_ECC_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_ENABLE_ECC_ERR_SHIFT)) & FLASH_INT_ENABLE_ECC_ERR_MASK)
-/*! @} */
-
-/*! @name INT_CLR_STATUS - Clear interrupt status bits */
-/*! @{ */
-#define FLASH_INT_CLR_STATUS_FAIL_MASK (0x1U)
-#define FLASH_INT_CLR_STATUS_FAIL_SHIFT (0U)
-/*! FAIL - When a CLR_STATUS bit is written to 1, the corresponding INT_STATUS bit is cleared.
- */
-#define FLASH_INT_CLR_STATUS_FAIL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_STATUS_FAIL_SHIFT)) & FLASH_INT_CLR_STATUS_FAIL_MASK)
-#define FLASH_INT_CLR_STATUS_ERR_MASK (0x2U)
-#define FLASH_INT_CLR_STATUS_ERR_SHIFT (1U)
-/*! ERR - When a CLR_STATUS bit is written to 1, the corresponding INT_STATUS bit is cleared.
- */
-#define FLASH_INT_CLR_STATUS_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_STATUS_ERR_SHIFT)) & FLASH_INT_CLR_STATUS_ERR_MASK)
-#define FLASH_INT_CLR_STATUS_DONE_MASK (0x4U)
-#define FLASH_INT_CLR_STATUS_DONE_SHIFT (2U)
-/*! DONE - When a CLR_STATUS bit is written to 1, the corresponding INT_STATUS bit is cleared.
- */
-#define FLASH_INT_CLR_STATUS_DONE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_STATUS_DONE_SHIFT)) & FLASH_INT_CLR_STATUS_DONE_MASK)
-#define FLASH_INT_CLR_STATUS_ECC_ERR_MASK (0x8U)
-#define FLASH_INT_CLR_STATUS_ECC_ERR_SHIFT (3U)
-/*! ECC_ERR - When a CLR_STATUS bit is written to 1, the corresponding INT_STATUS bit is cleared.
- */
-#define FLASH_INT_CLR_STATUS_ECC_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_CLR_STATUS_ECC_ERR_SHIFT)) & FLASH_INT_CLR_STATUS_ECC_ERR_MASK)
-/*! @} */
-
-/*! @name INT_SET_STATUS - Set interrupt status bits */
-/*! @{ */
-#define FLASH_INT_SET_STATUS_FAIL_MASK (0x1U)
-#define FLASH_INT_SET_STATUS_FAIL_SHIFT (0U)
-/*! FAIL - When a SET_STATUS bit is written to 1, the corresponding INT_STATUS bit is set.
- */
-#define FLASH_INT_SET_STATUS_FAIL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_STATUS_FAIL_SHIFT)) & FLASH_INT_SET_STATUS_FAIL_MASK)
-#define FLASH_INT_SET_STATUS_ERR_MASK (0x2U)
-#define FLASH_INT_SET_STATUS_ERR_SHIFT (1U)
-/*! ERR - When a SET_STATUS bit is written to 1, the corresponding INT_STATUS bit is set.
- */
-#define FLASH_INT_SET_STATUS_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_STATUS_ERR_SHIFT)) & FLASH_INT_SET_STATUS_ERR_MASK)
-#define FLASH_INT_SET_STATUS_DONE_MASK (0x4U)
-#define FLASH_INT_SET_STATUS_DONE_SHIFT (2U)
-/*! DONE - When a SET_STATUS bit is written to 1, the corresponding INT_STATUS bit is set.
- */
-#define FLASH_INT_SET_STATUS_DONE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_STATUS_DONE_SHIFT)) & FLASH_INT_SET_STATUS_DONE_MASK)
-#define FLASH_INT_SET_STATUS_ECC_ERR_MASK (0x8U)
-#define FLASH_INT_SET_STATUS_ECC_ERR_SHIFT (3U)
-/*! ECC_ERR - When a SET_STATUS bit is written to 1, the corresponding INT_STATUS bit is set.
- */
-#define FLASH_INT_SET_STATUS_ECC_ERR(x) (((uint32_t)(((uint32_t)(x)) << FLASH_INT_SET_STATUS_ECC_ERR_SHIFT)) & FLASH_INT_SET_STATUS_ECC_ERR_MASK)
-/*! @} */
-
-/*! @name MODULE_ID - Controller+Memory module identification */
-/*! @{ */
-#define FLASH_MODULE_ID_APERTURE_MASK (0xFFU)
-#define FLASH_MODULE_ID_APERTURE_SHIFT (0U)
-/*! APERTURE - Aperture i.
- */
-#define FLASH_MODULE_ID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_MODULE_ID_APERTURE_SHIFT)) & FLASH_MODULE_ID_APERTURE_MASK)
-#define FLASH_MODULE_ID_MINOR_REV_MASK (0xF00U)
-#define FLASH_MODULE_ID_MINOR_REV_SHIFT (8U)
-/*! MINOR_REV - Minor revision i.
- */
-#define FLASH_MODULE_ID_MINOR_REV(x) (((uint32_t)(((uint32_t)(x)) << FLASH_MODULE_ID_MINOR_REV_SHIFT)) & FLASH_MODULE_ID_MINOR_REV_MASK)
-#define FLASH_MODULE_ID_MAJOR_REV_MASK (0xF000U)
-#define FLASH_MODULE_ID_MAJOR_REV_SHIFT (12U)
-/*! MAJOR_REV - Major revision i.
- */
-#define FLASH_MODULE_ID_MAJOR_REV(x) (((uint32_t)(((uint32_t)(x)) << FLASH_MODULE_ID_MAJOR_REV_SHIFT)) & FLASH_MODULE_ID_MAJOR_REV_MASK)
-#define FLASH_MODULE_ID_ID_MASK (0xFFFF0000U)
-#define FLASH_MODULE_ID_ID_SHIFT (16U)
-/*! ID - Identifier.
- */
-#define FLASH_MODULE_ID_ID(x) (((uint32_t)(((uint32_t)(x)) << FLASH_MODULE_ID_ID_SHIFT)) & FLASH_MODULE_ID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group FLASH_Register_Masks */
-
-
-/* FLASH - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral FLASH base address */
- #define FLASH_BASE (0x50034000u)
- /** Peripheral FLASH base address */
- #define FLASH_BASE_NS (0x40034000u)
- /** Peripheral FLASH base pointer */
- #define FLASH ((FLASH_Type *)FLASH_BASE)
- /** Peripheral FLASH base pointer */
- #define FLASH_NS ((FLASH_Type *)FLASH_BASE_NS)
- /** Array initializer of FLASH peripheral base addresses */
- #define FLASH_BASE_ADDRS { FLASH_BASE }
- /** Array initializer of FLASH peripheral base pointers */
- #define FLASH_BASE_PTRS { FLASH }
- /** Array initializer of FLASH peripheral base addresses */
- #define FLASH_BASE_ADDRS_NS { FLASH_BASE_NS }
- /** Array initializer of FLASH peripheral base pointers */
- #define FLASH_BASE_PTRS_NS { FLASH_NS }
-#else
- /** Peripheral FLASH base address */
- #define FLASH_BASE (0x40034000u)
- /** Peripheral FLASH base pointer */
- #define FLASH ((FLASH_Type *)FLASH_BASE)
- /** Array initializer of FLASH peripheral base addresses */
- #define FLASH_BASE_ADDRS { FLASH_BASE }
- /** Array initializer of FLASH peripheral base pointers */
- #define FLASH_BASE_PTRS { FLASH }
-#endif
-
-/*!
- * @}
- */ /* end of group FLASH_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- FLASH_CFPA Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_CFPA_Peripheral_Access_Layer FLASH_CFPA Peripheral Access Layer
- * @{
- */
-
-/** FLASH_CFPA - Register Layout Typedef */
-typedef struct {
- __IO uint32_t HEADER; /**< ., offset: 0x0 */
- __IO uint32_t VERSION; /**< ., offset: 0x4 */
- __IO uint32_t S_FW_VERSION; /**< Secure firmware version (Monotonic counter), offset: 0x8 */
- __IO uint32_t NS_FW_VERSION; /**< Non-Secure firmware version (Monotonic counter), offset: 0xC */
- __IO uint32_t IMAGE_KEY_REVOKE; /**< Image key revocation ID (Monotonic counter), offset: 0x10 */
- uint8_t RESERVED_0[4];
- __IO uint32_t ROTKH_REVOKE; /**< ., offset: 0x18 */
- __IO uint32_t VENDOR_USAGE; /**< ., offset: 0x1C */
- __IO uint32_t DCFG_CC_SOCU_PIN; /**< With TZ-M, the part can be sold by level 1 customers (secure code developer) to level-2 customers who develops non-secure code only. - In this scenario, or easy of development, Level-I customer releases the part to always allow non-secure debug. - To allow level-2 customers to further seal the part DCFG_CC_SOCU_NS is used. - ROM will use this word to further restrict the debug access., offset: 0x20 */
- __IO uint32_t DCFG_CC_SOCU_DFLT; /**< With TZ-M, the part can be sold by level 1 customers (secure code developer) to level-2 customers who develops non-secure code only. - In this scenario, or easy of development, Level-I customer releases the part to always allow non-secure debug. - To allow level-2 customers to further seal the part DCFG_CC_SOCU_NS is used. - ROM will use this word to further restrict the debug access., offset: 0x24 */
- __IO uint32_t ENABLE_FA_MODE; /**< Enable FA mode. SET_FA_MODE Command should write 0xC33CA55A to this word to indicate boot ROM to enter FA mode., offset: 0x28 */
- __IO uint32_t CMPA_PROG_IN_PROGRESS; /**< CMPA Page programming on going. This field shall be set to 0x5CC55AA5 in the active CFPA page each time CMPA page programming is going on. It shall always be set to 0x00000000 in the CFPA scratch area., offset: 0x2C */
- union { /* offset: 0x30 */
- __IO uint32_t PRINCE_REGION0_IV_CODE[14]; /**< ., array offset: 0x30, array step: 0x4 */
- struct { /* offset: 0x30 */
- __IO uint32_t PRINCE_REGION0_IV_HEADER0; /**< ., offset: 0x30 */
- __IO uint32_t PRINCE_REGION0_IV_HEADER1; /**< ., offset: 0x34 */
- __IO uint32_t PRINCE_REGION0_IV_BODY[12]; /**< ., array offset: 0x38, array step: 0x4 */
- } PRINCE_REGION0_IV_CODE_CORE;
- };
- union { /* offset: 0x68 */
- __IO uint32_t PRINCE_REGION1_IV_CODE[14]; /**< ., array offset: 0x68, array step: 0x4 */
- struct { /* offset: 0x68 */
- __IO uint32_t PRINCE_REGION1_IV_HEADER0; /**< ., offset: 0x68 */
- __IO uint32_t PRINCE_REGION1_IV_HEADER1; /**< ., offset: 0x6C */
- __IO uint32_t PRINCE_REGION1_IV_BODY[12]; /**< ., array offset: 0x70, array step: 0x4 */
- } PRINCE_REGION1_IV_CODE_CORE;
- };
- union { /* offset: 0xA0 */
- __IO uint32_t PRINCE_REGION2_IV_CODE[14]; /**< ., array offset: 0xA0, array step: 0x4 */
- struct { /* offset: 0xA0 */
- __IO uint32_t PRINCE_REGION2_IV_HEADER0; /**< ., offset: 0xA0 */
- __IO uint32_t PRINCE_REGION2_IV_HEADER1; /**< ., offset: 0xA4 */
- __IO uint32_t PRINCE_REGION2_IV_BODY[12]; /**< ., array offset: 0xA8, array step: 0x4 */
- } PRINCE_REGION2_IV_CODE_CORE;
- };
- uint8_t RESERVED_1[40];
- __IO uint32_t CUSTOMER_DEFINED[56]; /**< Customer Defined (Programable through ROM API), array offset: 0x100, array step: 0x4 */
- __IO uint32_t SHA256_DIGEST[8]; /**< SHA256_DIGEST0 for DIGEST[31:0] SHA256_DIGEST1 for DIGEST[63:32] SHA256_DIGEST2 for DIGEST[95:64] SHA256_DIGEST3 for DIGEST[127:96] SHA256_DIGEST4 for DIGEST[159:128] SHA256_DIGEST5 for DIGEST[191:160] SHA256_DIGEST6 for DIGEST[223:192] SHA256_DIGEST7 for DIGEST[255:224], array offset: 0x1E0, array step: 0x4 */
-} FLASH_CFPA_Type;
-
-/* ----------------------------------------------------------------------------
- -- FLASH_CFPA Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_CFPA_Register_Masks FLASH_CFPA Register Masks
- * @{
- */
-
-/*! @name HEADER - . */
-/*! @{ */
-#define FLASH_CFPA_HEADER_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_HEADER_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_HEADER_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_HEADER_FIELD_SHIFT)) & FLASH_CFPA_HEADER_FIELD_MASK)
-/*! @} */
-
-/*! @name VERSION - . */
-/*! @{ */
-#define FLASH_CFPA_VERSION_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_VERSION_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_VERSION_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_VERSION_FIELD_SHIFT)) & FLASH_CFPA_VERSION_FIELD_MASK)
-/*! @} */
-
-/*! @name S_FW_VERSION - Secure firmware version (Monotonic counter) */
-/*! @{ */
-#define FLASH_CFPA_S_FW_VERSION_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_S_FW_VERSION_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_S_FW_VERSION_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_S_FW_VERSION_FIELD_SHIFT)) & FLASH_CFPA_S_FW_VERSION_FIELD_MASK)
-/*! @} */
-
-/*! @name NS_FW_VERSION - Non-Secure firmware version (Monotonic counter) */
-/*! @{ */
-#define FLASH_CFPA_NS_FW_VERSION_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_NS_FW_VERSION_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_NS_FW_VERSION_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_NS_FW_VERSION_FIELD_SHIFT)) & FLASH_CFPA_NS_FW_VERSION_FIELD_MASK)
-/*! @} */
-
-/*! @name IMAGE_KEY_REVOKE - Image key revocation ID (Monotonic counter) */
-/*! @{ */
-#define FLASH_CFPA_IMAGE_KEY_REVOKE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_IMAGE_KEY_REVOKE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_IMAGE_KEY_REVOKE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_IMAGE_KEY_REVOKE_FIELD_SHIFT)) & FLASH_CFPA_IMAGE_KEY_REVOKE_FIELD_MASK)
-/*! @} */
-
-/*! @name ROTKH_REVOKE - . */
-/*! @{ */
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK0_EN_MASK (0x3U)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK0_EN_SHIFT (0U)
-/*! RoTK0_EN - RoT Key 0 enable. 00 - Invalid 01 - Enabled 10, 11 - Key revoked
- */
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK0_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_ROTKH_REVOKE_RoTK0_EN_SHIFT)) & FLASH_CFPA_ROTKH_REVOKE_RoTK0_EN_MASK)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK1_EN_MASK (0xCU)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK1_EN_SHIFT (2U)
-/*! RoTK1_EN - RoT Key 1 enable. 00 - Invalid 01 - Enabled 10, 11 - Key revoked
- */
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK1_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_ROTKH_REVOKE_RoTK1_EN_SHIFT)) & FLASH_CFPA_ROTKH_REVOKE_RoTK1_EN_MASK)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK2_EN_MASK (0x30U)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK2_EN_SHIFT (4U)
-/*! RoTK2_EN - RoT Key 2 enable. 00 - Invalid 01 - Enabled 10, 11 - Key revoked
- */
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK2_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_ROTKH_REVOKE_RoTK2_EN_SHIFT)) & FLASH_CFPA_ROTKH_REVOKE_RoTK2_EN_MASK)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK3_EN_MASK (0xC0U)
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK3_EN_SHIFT (6U)
-/*! RoTK3_EN - RoT Key 3 enable. 00 - Invalid 01 - Enabled 10, 11 - Key revoked
- */
-#define FLASH_CFPA_ROTKH_REVOKE_RoTK3_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_ROTKH_REVOKE_RoTK3_EN_SHIFT)) & FLASH_CFPA_ROTKH_REVOKE_RoTK3_EN_MASK)
-/*! @} */
-
-/*! @name VENDOR_USAGE - . */
-/*! @{ */
-#define FLASH_CFPA_VENDOR_USAGE_DBG_VENDOR_USAGE_MASK (0xFFFFU)
-#define FLASH_CFPA_VENDOR_USAGE_DBG_VENDOR_USAGE_SHIFT (0U)
-/*! DBG_VENDOR_USAGE - DBG_VENDOR_USAGE.
- */
-#define FLASH_CFPA_VENDOR_USAGE_DBG_VENDOR_USAGE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_VENDOR_USAGE_DBG_VENDOR_USAGE_SHIFT)) & FLASH_CFPA_VENDOR_USAGE_DBG_VENDOR_USAGE_MASK)
-#define FLASH_CFPA_VENDOR_USAGE_INVERSE_VALUE_MASK (0xFFFF0000U)
-#define FLASH_CFPA_VENDOR_USAGE_INVERSE_VALUE_SHIFT (16U)
-/*! INVERSE_VALUE - inverse value of bits [15:0]
- */
-#define FLASH_CFPA_VENDOR_USAGE_INVERSE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_VENDOR_USAGE_INVERSE_VALUE_SHIFT)) & FLASH_CFPA_VENDOR_USAGE_INVERSE_VALUE_MASK)
-/*! @} */
-
-/*! @name DCFG_CC_SOCU_PIN - With TZ-M, the part can be sold by level 1 customers (secure code developer) to level-2 customers who develops non-secure code only. - In this scenario, or easy of development, Level-I customer releases the part to always allow non-secure debug. - To allow level-2 customers to further seal the part DCFG_CC_SOCU_NS is used. - ROM will use this word to further restrict the debug access. */
-/*! @{ */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_NIDEN_MASK (0x1U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_NIDEN_SHIFT (0U)
-/*! NIDEN - Non Secure non-invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_NIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_NIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_DBGEN_MASK (0x2U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_DBGEN_SHIFT (1U)
-/*! DBGEN - Non Secure debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_DBGEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_DBGEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_SPNIDEN_MASK (0x4U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_SPNIDEN_SHIFT (2U)
-/*! SPNIDEN - Secure non-invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_SPNIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_SPNIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_SPNIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_SPIDEN_MASK (0x8U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_SPIDEN_SHIFT (3U)
-/*! SPIDEN - Secure invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_SPIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_SPIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_SPIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_TAPEN_MASK (0x10U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_TAPEN_SHIFT (4U)
-/*! TAPEN - JTAG TAP enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_TAPEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_TAPEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_TAPEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_DBGEN_MASK (0x20U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_DBGEN_SHIFT (5U)
-/*! CPU1_DBGEN - CPU1 (Micro cortex M33) invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_DBGEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_DBGEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_ISP_CMD_EN_MASK (0x40U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_ISP_CMD_EN_SHIFT (6U)
-/*! ISP_CMD_EN - ISP Boot Command enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_ISP_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_ISP_CMD_EN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_ISP_CMD_EN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_FA_CMD_EN_MASK (0x80U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_FA_CMD_EN_SHIFT (7U)
-/*! FA_CMD_EN - FA Command enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_FA_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_FA_CMD_EN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_FA_CMD_EN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_ME_CMD_EN_MASK (0x100U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_ME_CMD_EN_SHIFT (8U)
-/*! ME_CMD_EN - Flash Mass Erase Command enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_ME_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_ME_CMD_EN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_ME_CMD_EN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_NIDEN_MASK (0x200U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_NIDEN_SHIFT (9U)
-/*! CPU1_NIDEN - CPU1 (Micro cortex M33) non-invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_NIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_CPU1_NIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_UUID_CHECK_MASK (0x8000U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_UUID_CHECK_SHIFT (15U)
-/*! UUID_CHECK - Enforce UUID match during Debug authentication.
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_UUID_CHECK(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_UUID_CHECK_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_UUID_CHECK_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_INVERSE_VALUE_MASK (0xFFFF0000U)
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_INVERSE_VALUE_SHIFT (16U)
-/*! INVERSE_VALUE - inverse value of bits [15:0]
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_PIN_INVERSE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_PIN_INVERSE_VALUE_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_PIN_INVERSE_VALUE_MASK)
-/*! @} */
-
-/*! @name DCFG_CC_SOCU_DFLT - With TZ-M, the part can be sold by level 1 customers (secure code developer) to level-2 customers who develops non-secure code only. - In this scenario, or easy of development, Level-I customer releases the part to always allow non-secure debug. - To allow level-2 customers to further seal the part DCFG_CC_SOCU_NS is used. - ROM will use this word to further restrict the debug access. */
-/*! @{ */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_NIDEN_MASK (0x1U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_NIDEN_SHIFT (0U)
-/*! NIDEN - Non Secure non-invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_NIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_NIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_DBGEN_MASK (0x2U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_DBGEN_SHIFT (1U)
-/*! DBGEN - Non Secure debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_DBGEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_DBGEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPNIDEN_MASK (0x4U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPNIDEN_SHIFT (2U)
-/*! SPNIDEN - Secure non-invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPNIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPNIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPNIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPIDEN_MASK (0x8U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPIDEN_SHIFT (3U)
-/*! SPIDEN - Secure invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_SPIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_TAPEN_MASK (0x10U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_TAPEN_SHIFT (4U)
-/*! TAPEN - JTAG TAP fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_TAPEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_TAPEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_TAPEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_DBGEN_MASK (0x20U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_DBGEN_SHIFT (5U)
-/*! CPU1_DBGEN - CPU1 (Micro cortex M33) invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_DBGEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_DBGEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_ISP_CMD_EN_MASK (0x40U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_ISP_CMD_EN_SHIFT (6U)
-/*! ISP_CMD_EN - ISP Boot Command fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_ISP_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_ISP_CMD_EN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_ISP_CMD_EN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_FA_CMD_EN_MASK (0x80U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_FA_CMD_EN_SHIFT (7U)
-/*! FA_CMD_EN - FA Command fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_FA_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_FA_CMD_EN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_FA_CMD_EN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_ME_CMD_EN_MASK (0x100U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_ME_CMD_EN_SHIFT (8U)
-/*! ME_CMD_EN - Flash Mass Erase Command fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_ME_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_ME_CMD_EN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_ME_CMD_EN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_NIDEN_MASK (0x200U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_NIDEN_SHIFT (9U)
-/*! CPU1_NIDEN - CPU1 (Micro cortex M33) non-invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_NIDEN_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_CPU1_NIDEN_MASK)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_INVERSE_VALUE_MASK (0xFFFF0000U)
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_INVERSE_VALUE_SHIFT (16U)
-/*! INVERSE_VALUE - inverse value of bits [15:0]
- */
-#define FLASH_CFPA_DCFG_CC_SOCU_DFLT_INVERSE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_DCFG_CC_SOCU_DFLT_INVERSE_VALUE_SHIFT)) & FLASH_CFPA_DCFG_CC_SOCU_DFLT_INVERSE_VALUE_MASK)
-/*! @} */
-
-/*! @name ENABLE_FA_MODE - Enable FA mode. SET_FA_MODE Command should write 0xC33CA55A to this word to indicate boot ROM to enter FA mode. */
-/*! @{ */
-#define FLASH_CFPA_ENABLE_FA_MODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_ENABLE_FA_MODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_ENABLE_FA_MODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_ENABLE_FA_MODE_FIELD_SHIFT)) & FLASH_CFPA_ENABLE_FA_MODE_FIELD_MASK)
-/*! @} */
-
-/*! @name CMPA_PROG_IN_PROGRESS - CMPA Page programming on going. This field shall be set to 0x5CC55AA5 in the active CFPA page each time CMPA page programming is going on. It shall always be set to 0x00000000 in the CFPA scratch area. */
-/*! @{ */
-#define FLASH_CFPA_CMPA_PROG_IN_PROGRESS_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_CMPA_PROG_IN_PROGRESS_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_CMPA_PROG_IN_PROGRESS_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_CMPA_PROG_IN_PROGRESS_FIELD_SHIFT)) & FLASH_CFPA_CMPA_PROG_IN_PROGRESS_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION0_IV_CODE - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION0_IV_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION0_IV_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION0_IV_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION0_IV_CODE_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION0_IV_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_PRINCE_REGION0_IV_CODE */
-#define FLASH_CFPA_PRINCE_REGION0_IV_CODE_COUNT (14U)
-
-/*! @name PRINCE_REGION0_IV_HEADER0 - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION0_IV_HEADER0_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION0_IV_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION0_IV_HEADER1 - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_TYPE_SHIFT)) & FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_TYPE_MASK)
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_INDEX_SHIFT)) & FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_INDEX_MASK)
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_SIZE_SHIFT)) & FLASH_CFPA_PRINCE_REGION0_IV_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION0_IV_BODY - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION0_IV_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION0_IV_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION0_IV_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION0_IV_BODY_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION0_IV_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_PRINCE_REGION0_IV_BODY */
-#define FLASH_CFPA_PRINCE_REGION0_IV_BODY_COUNT (12U)
-
-/*! @name PRINCE_REGION1_IV_CODE - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION1_IV_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION1_IV_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION1_IV_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION1_IV_CODE_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION1_IV_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_PRINCE_REGION1_IV_CODE */
-#define FLASH_CFPA_PRINCE_REGION1_IV_CODE_COUNT (14U)
-
-/*! @name PRINCE_REGION1_IV_HEADER0 - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION1_IV_HEADER0_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION1_IV_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION1_IV_HEADER1 - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_TYPE_SHIFT)) & FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_TYPE_MASK)
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_INDEX_SHIFT)) & FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_INDEX_MASK)
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_SIZE_SHIFT)) & FLASH_CFPA_PRINCE_REGION1_IV_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION1_IV_BODY - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION1_IV_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION1_IV_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION1_IV_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION1_IV_BODY_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION1_IV_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_PRINCE_REGION1_IV_BODY */
-#define FLASH_CFPA_PRINCE_REGION1_IV_BODY_COUNT (12U)
-
-/*! @name PRINCE_REGION2_IV_CODE - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION2_IV_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION2_IV_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION2_IV_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION2_IV_CODE_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION2_IV_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_PRINCE_REGION2_IV_CODE */
-#define FLASH_CFPA_PRINCE_REGION2_IV_CODE_COUNT (14U)
-
-/*! @name PRINCE_REGION2_IV_HEADER0 - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION2_IV_HEADER0_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION2_IV_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION2_IV_HEADER1 - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_TYPE_SHIFT)) & FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_TYPE_MASK)
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_INDEX_SHIFT)) & FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_INDEX_MASK)
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_SIZE_SHIFT)) & FLASH_CFPA_PRINCE_REGION2_IV_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION2_IV_BODY - . */
-/*! @{ */
-#define FLASH_CFPA_PRINCE_REGION2_IV_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_PRINCE_REGION2_IV_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_PRINCE_REGION2_IV_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_PRINCE_REGION2_IV_BODY_FIELD_SHIFT)) & FLASH_CFPA_PRINCE_REGION2_IV_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_PRINCE_REGION2_IV_BODY */
-#define FLASH_CFPA_PRINCE_REGION2_IV_BODY_COUNT (12U)
-
-/*! @name CUSTOMER_DEFINED - Customer Defined (Programable through ROM API) */
-/*! @{ */
-#define FLASH_CFPA_CUSTOMER_DEFINED_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_CUSTOMER_DEFINED_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_CUSTOMER_DEFINED_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_CUSTOMER_DEFINED_FIELD_SHIFT)) & FLASH_CFPA_CUSTOMER_DEFINED_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_CUSTOMER_DEFINED */
-#define FLASH_CFPA_CUSTOMER_DEFINED_COUNT (56U)
-
-/*! @name SHA256_DIGEST - SHA256_DIGEST0 for DIGEST[31:0] SHA256_DIGEST1 for DIGEST[63:32] SHA256_DIGEST2 for DIGEST[95:64] SHA256_DIGEST3 for DIGEST[127:96] SHA256_DIGEST4 for DIGEST[159:128] SHA256_DIGEST5 for DIGEST[191:160] SHA256_DIGEST6 for DIGEST[223:192] SHA256_DIGEST7 for DIGEST[255:224] */
-/*! @{ */
-#define FLASH_CFPA_SHA256_DIGEST_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CFPA_SHA256_DIGEST_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CFPA_SHA256_DIGEST_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CFPA_SHA256_DIGEST_FIELD_SHIFT)) & FLASH_CFPA_SHA256_DIGEST_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CFPA_SHA256_DIGEST */
-#define FLASH_CFPA_SHA256_DIGEST_COUNT (8U)
-
-
-/*!
- * @}
- */ /* end of group FLASH_CFPA_Register_Masks */
-
-
-/* FLASH_CFPA - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral FLASH_CFPA0 base address */
- #define FLASH_CFPA0_BASE (0x1009E000u)
- /** Peripheral FLASH_CFPA0 base address */
- #define FLASH_CFPA0_BASE_NS (0x9E000u)
- /** Peripheral FLASH_CFPA0 base pointer */
- #define FLASH_CFPA0 ((FLASH_CFPA_Type *)FLASH_CFPA0_BASE)
- /** Peripheral FLASH_CFPA0 base pointer */
- #define FLASH_CFPA0_NS ((FLASH_CFPA_Type *)FLASH_CFPA0_BASE_NS)
- /** Peripheral FLASH_CFPA1 base address */
- #define FLASH_CFPA1_BASE (0x1009E200u)
- /** Peripheral FLASH_CFPA1 base address */
- #define FLASH_CFPA1_BASE_NS (0x9E200u)
- /** Peripheral FLASH_CFPA1 base pointer */
- #define FLASH_CFPA1 ((FLASH_CFPA_Type *)FLASH_CFPA1_BASE)
- /** Peripheral FLASH_CFPA1 base pointer */
- #define FLASH_CFPA1_NS ((FLASH_CFPA_Type *)FLASH_CFPA1_BASE_NS)
- /** Peripheral FLASH_CFPA_SCRATCH base address */
- #define FLASH_CFPA_SCRATCH_BASE (0x1009DE00u)
- /** Peripheral FLASH_CFPA_SCRATCH base address */
- #define FLASH_CFPA_SCRATCH_BASE_NS (0x9DE00u)
- /** Peripheral FLASH_CFPA_SCRATCH base pointer */
- #define FLASH_CFPA_SCRATCH ((FLASH_CFPA_Type *)FLASH_CFPA_SCRATCH_BASE)
- /** Peripheral FLASH_CFPA_SCRATCH base pointer */
- #define FLASH_CFPA_SCRATCH_NS ((FLASH_CFPA_Type *)FLASH_CFPA_SCRATCH_BASE_NS)
- /** Array initializer of FLASH_CFPA peripheral base addresses */
- #define FLASH_CFPA_BASE_ADDRS { FLASH_CFPA0_BASE, FLASH_CFPA1_BASE, FLASH_CFPA_SCRATCH_BASE }
- /** Array initializer of FLASH_CFPA peripheral base pointers */
- #define FLASH_CFPA_BASE_PTRS { FLASH_CFPA0, FLASH_CFPA1, FLASH_CFPA_SCRATCH }
- /** Array initializer of FLASH_CFPA peripheral base addresses */
- #define FLASH_CFPA_BASE_ADDRS_NS { FLASH_CFPA0_BASE_NS, FLASH_CFPA1_BASE_NS, FLASH_CFPA_SCRATCH_BASE_NS }
- /** Array initializer of FLASH_CFPA peripheral base pointers */
- #define FLASH_CFPA_BASE_PTRS_NS { FLASH_CFPA0_NS, FLASH_CFPA1_NS, FLASH_CFPA_SCRATCH_NS }
-#else
- /** Peripheral FLASH_CFPA0 base address */
- #define FLASH_CFPA0_BASE (0x9E000u)
- /** Peripheral FLASH_CFPA0 base pointer */
- #define FLASH_CFPA0 ((FLASH_CFPA_Type *)FLASH_CFPA0_BASE)
- /** Peripheral FLASH_CFPA1 base address */
- #define FLASH_CFPA1_BASE (0x9E200u)
- /** Peripheral FLASH_CFPA1 base pointer */
- #define FLASH_CFPA1 ((FLASH_CFPA_Type *)FLASH_CFPA1_BASE)
- /** Peripheral FLASH_CFPA_SCRATCH base address */
- #define FLASH_CFPA_SCRATCH_BASE (0x9DE00u)
- /** Peripheral FLASH_CFPA_SCRATCH base pointer */
- #define FLASH_CFPA_SCRATCH ((FLASH_CFPA_Type *)FLASH_CFPA_SCRATCH_BASE)
- /** Array initializer of FLASH_CFPA peripheral base addresses */
- #define FLASH_CFPA_BASE_ADDRS { FLASH_CFPA0_BASE, FLASH_CFPA1_BASE, FLASH_CFPA_SCRATCH_BASE }
- /** Array initializer of FLASH_CFPA peripheral base pointers */
- #define FLASH_CFPA_BASE_PTRS { FLASH_CFPA0, FLASH_CFPA1, FLASH_CFPA_SCRATCH }
-#endif
-
-/*!
- * @}
- */ /* end of group FLASH_CFPA_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- FLASH_CMPA Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_CMPA_Peripheral_Access_Layer FLASH_CMPA Peripheral Access Layer
- * @{
- */
-
-/** FLASH_CMPA - Register Layout Typedef */
-typedef struct {
- __IO uint32_t BOOT_CFG; /**< ., offset: 0x0 */
- __IO uint32_t SPI_FLASH_CFG; /**< ., offset: 0x4 */
- __IO uint32_t USB_ID; /**< ., offset: 0x8 */
- __IO uint32_t SDIO_CFG; /**< ., offset: 0xC */
- __IO uint32_t CC_SOCU_PIN; /**< ., offset: 0x10 */
- __IO uint32_t CC_SOCU_DFLT; /**< ., offset: 0x14 */
- __IO uint32_t VENDOR_USAGE; /**< ., offset: 0x18 */
- __IO uint32_t SECURE_BOOT_CFG; /**< ., offset: 0x1C */
- __IO uint32_t PRINCE_BASE_ADDR; /**< ., offset: 0x20 */
- __IO uint32_t PRINCE_SR_0; /**< Region 0, sub-region enable, offset: 0x24 */
- __IO uint32_t PRINCE_SR_1; /**< Region 1, sub-region enable, offset: 0x28 */
- __IO uint32_t PRINCE_SR_2; /**< Region 2, sub-region enable, offset: 0x2C */
- __IO uint32_t XTAL_32KHZ_CAPABANK_TRIM; /**< Xtal 32kHz capabank triming., offset: 0x30 */
- __IO uint32_t XTAL_16MHZ_CAPABANK_TRIM; /**< Xtal 16MHz capabank triming., offset: 0x34 */
- uint8_t RESERVED_0[24];
- __IO uint32_t ROTKH[8]; /**< ROTKH0 for Root of Trust Keys Table hash[255:224] ROTKH1 for Root of Trust Keys Table hash[223:192] ROTKH2 for Root of Trust Keys Table hash[191:160] ROTKH3 for Root of Trust Keys Table hash[159:128] ROTKH4 for Root of Trust Keys Table hash[127:96] ROTKH5 for Root of Trust Keys Table hash[95:64] ROTKH6 for Root of Trust Keys Table hash[63:32] ROTKH7 for Root of Trust Keys Table hash[31:0], array offset: 0x50, array step: 0x4 */
- uint8_t RESERVED_1[144];
- __IO uint32_t CUSTOMER_DEFINED[56]; /**< Customer Defined (Programable through ROM API), array offset: 0x100, array step: 0x4 */
- __IO uint32_t SHA256_DIGEST[8]; /**< SHA256_DIGEST0 for DIGEST[31:0] SHA256_DIGEST1 for DIGEST[63:32] SHA256_DIGEST2 for DIGEST[95:64] SHA256_DIGEST3 for DIGEST[127:96] SHA256_DIGEST4 for DIGEST[159:128] SHA256_DIGEST5 for DIGEST[191:160] SHA256_DIGEST6 for DIGEST[223:192] SHA256_DIGEST7 for DIGEST[255:224], array offset: 0x1E0, array step: 0x4 */
-} FLASH_CMPA_Type;
-
-/* ----------------------------------------------------------------------------
- -- FLASH_CMPA Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_CMPA_Register_Masks FLASH_CMPA Register Masks
- * @{
- */
-
-/*! @name BOOT_CFG - . */
-/*! @{ */
-#define FLASH_CMPA_BOOT_CFG_DEFAULT_ISP_MODE_MASK (0x70U)
-#define FLASH_CMPA_BOOT_CFG_DEFAULT_ISP_MODE_SHIFT (4U)
-/*! DEFAULT_ISP_MODE - Default ISP mode:
- * 0b000..Auto ISP
- * 0b001..USB_HID_MSC
- * 0b010..SPI Slave ISP
- * 0b011..I2C Slave ISP
- * 0b111..Disable ISP fall through
- */
-#define FLASH_CMPA_BOOT_CFG_DEFAULT_ISP_MODE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_BOOT_CFG_DEFAULT_ISP_MODE_SHIFT)) & FLASH_CMPA_BOOT_CFG_DEFAULT_ISP_MODE_MASK)
-#define FLASH_CMPA_BOOT_CFG_BOOT_SPEED_MASK (0x180U)
-#define FLASH_CMPA_BOOT_CFG_BOOT_SPEED_SHIFT (7U)
-/*! BOOT_SPEED - Core clock:
- * 0b00..Defined by NMPA.SYSTEM_SPEED_CODE
- * 0b01..96MHz FRO
- * 0b10..48MHz FRO
- */
-#define FLASH_CMPA_BOOT_CFG_BOOT_SPEED(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_BOOT_CFG_BOOT_SPEED_SHIFT)) & FLASH_CMPA_BOOT_CFG_BOOT_SPEED_MASK)
-#define FLASH_CMPA_BOOT_CFG_BOOT_FAILURE_PIN_MASK (0xFF000000U)
-#define FLASH_CMPA_BOOT_CFG_BOOT_FAILURE_PIN_SHIFT (24U)
-/*! BOOT_FAILURE_PIN - GPIO port and pin number to use for indicating failure reason. The toggle
- * rate of the pin is used to decode the error type. [2:0] - Defines GPIO port [7:3] - Defines GPIO
- * pin
- */
-#define FLASH_CMPA_BOOT_CFG_BOOT_FAILURE_PIN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_BOOT_CFG_BOOT_FAILURE_PIN_SHIFT)) & FLASH_CMPA_BOOT_CFG_BOOT_FAILURE_PIN_MASK)
-/*! @} */
-
-/*! @name SPI_FLASH_CFG - . */
-/*! @{ */
-#define FLASH_CMPA_SPI_FLASH_CFG_SPI_RECOVERY_BOOT_EN_MASK (0x1FU)
-#define FLASH_CMPA_SPI_FLASH_CFG_SPI_RECOVERY_BOOT_EN_SHIFT (0U)
-/*! SPI_RECOVERY_BOOT_EN - SPI flash recovery boot is enabled, if non-zero value is written to this field.
- */
-#define FLASH_CMPA_SPI_FLASH_CFG_SPI_RECOVERY_BOOT_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SPI_FLASH_CFG_SPI_RECOVERY_BOOT_EN_SHIFT)) & FLASH_CMPA_SPI_FLASH_CFG_SPI_RECOVERY_BOOT_EN_MASK)
-/*! @} */
-
-/*! @name USB_ID - . */
-/*! @{ */
-#define FLASH_CMPA_USB_ID_USB_VENDOR_ID_MASK (0xFFFFU)
-#define FLASH_CMPA_USB_ID_USB_VENDOR_ID_SHIFT (0U)
-/*! USB_VENDOR_ID - .
- */
-#define FLASH_CMPA_USB_ID_USB_VENDOR_ID(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_USB_ID_USB_VENDOR_ID_SHIFT)) & FLASH_CMPA_USB_ID_USB_VENDOR_ID_MASK)
-#define FLASH_CMPA_USB_ID_USB_PRODUCT_ID_MASK (0xFFFF0000U)
-#define FLASH_CMPA_USB_ID_USB_PRODUCT_ID_SHIFT (16U)
-/*! USB_PRODUCT_ID - .
- */
-#define FLASH_CMPA_USB_ID_USB_PRODUCT_ID(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_USB_ID_USB_PRODUCT_ID_SHIFT)) & FLASH_CMPA_USB_ID_USB_PRODUCT_ID_MASK)
-/*! @} */
-
-/*! @name SDIO_CFG - . */
-/*! @{ */
-#define FLASH_CMPA_SDIO_CFG_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_SDIO_CFG_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_SDIO_CFG_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SDIO_CFG_FIELD_SHIFT)) & FLASH_CMPA_SDIO_CFG_FIELD_MASK)
-/*! @} */
-
-/*! @name CC_SOCU_PIN - . */
-/*! @{ */
-#define FLASH_CMPA_CC_SOCU_PIN_NIDEN_MASK (0x1U)
-#define FLASH_CMPA_CC_SOCU_PIN_NIDEN_SHIFT (0U)
-/*! NIDEN - Non Secure non-invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_NIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_NIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_DBGEN_MASK (0x2U)
-#define FLASH_CMPA_CC_SOCU_PIN_DBGEN_SHIFT (1U)
-/*! DBGEN - Non Secure debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_DBGEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_DBGEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_SPNIDEN_MASK (0x4U)
-#define FLASH_CMPA_CC_SOCU_PIN_SPNIDEN_SHIFT (2U)
-/*! SPNIDEN - Secure non-invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_SPNIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_SPNIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_SPNIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_SPIDEN_MASK (0x8U)
-#define FLASH_CMPA_CC_SOCU_PIN_SPIDEN_SHIFT (3U)
-/*! SPIDEN - Secure invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_SPIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_SPIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_SPIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_TAPEN_MASK (0x10U)
-#define FLASH_CMPA_CC_SOCU_PIN_TAPEN_SHIFT (4U)
-/*! TAPEN - JTAG TAP enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_TAPEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_TAPEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_TAPEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_CPU1_DBGEN_MASK (0x20U)
-#define FLASH_CMPA_CC_SOCU_PIN_CPU1_DBGEN_SHIFT (5U)
-/*! CPU1_DBGEN - CPU1 (Micro cortex M33) invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_CPU1_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_CPU1_DBGEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_CPU1_DBGEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_ISP_CMD_EN_MASK (0x40U)
-#define FLASH_CMPA_CC_SOCU_PIN_ISP_CMD_EN_SHIFT (6U)
-/*! ISP_CMD_EN - ISP Boot Command enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_ISP_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_ISP_CMD_EN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_ISP_CMD_EN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_FA_CMD_EN_MASK (0x80U)
-#define FLASH_CMPA_CC_SOCU_PIN_FA_CMD_EN_SHIFT (7U)
-/*! FA_CMD_EN - FA Command enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_FA_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_FA_CMD_EN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_FA_CMD_EN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_ME_CMD_EN_MASK (0x100U)
-#define FLASH_CMPA_CC_SOCU_PIN_ME_CMD_EN_SHIFT (8U)
-/*! ME_CMD_EN - Flash Mass Erase Command enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_ME_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_ME_CMD_EN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_ME_CMD_EN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_CPU1_NIDEN_MASK (0x200U)
-#define FLASH_CMPA_CC_SOCU_PIN_CPU1_NIDEN_SHIFT (9U)
-/*! CPU1_NIDEN - CPU1 (Micro cortex M33) non-invasive debug enable
- * 0b0..Use DAP to enable
- * 0b1..Fixed state
- */
-#define FLASH_CMPA_CC_SOCU_PIN_CPU1_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_CPU1_NIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_CPU1_NIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_UUID_CHECK_MASK (0x8000U)
-#define FLASH_CMPA_CC_SOCU_PIN_UUID_CHECK_SHIFT (15U)
-/*! UUID_CHECK - Enforce UUID match during Debug authentication.
- */
-#define FLASH_CMPA_CC_SOCU_PIN_UUID_CHECK(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_UUID_CHECK_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_UUID_CHECK_MASK)
-#define FLASH_CMPA_CC_SOCU_PIN_INVERSE_VALUE_MASK (0xFFFF0000U)
-#define FLASH_CMPA_CC_SOCU_PIN_INVERSE_VALUE_SHIFT (16U)
-/*! INVERSE_VALUE - inverse value of bits [15:0]
- */
-#define FLASH_CMPA_CC_SOCU_PIN_INVERSE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_PIN_INVERSE_VALUE_SHIFT)) & FLASH_CMPA_CC_SOCU_PIN_INVERSE_VALUE_MASK)
-/*! @} */
-
-/*! @name CC_SOCU_DFLT - . */
-/*! @{ */
-#define FLASH_CMPA_CC_SOCU_DFLT_NIDEN_MASK (0x1U)
-#define FLASH_CMPA_CC_SOCU_DFLT_NIDEN_SHIFT (0U)
-/*! NIDEN - Non Secure non-invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_NIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_NIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_DBGEN_MASK (0x2U)
-#define FLASH_CMPA_CC_SOCU_DFLT_DBGEN_SHIFT (1U)
-/*! DBGEN - Non Secure debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_DBGEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_DBGEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_SPNIDEN_MASK (0x4U)
-#define FLASH_CMPA_CC_SOCU_DFLT_SPNIDEN_SHIFT (2U)
-/*! SPNIDEN - Secure non-invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_SPNIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_SPNIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_SPNIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_SPIDEN_MASK (0x8U)
-#define FLASH_CMPA_CC_SOCU_DFLT_SPIDEN_SHIFT (3U)
-/*! SPIDEN - Secure invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_SPIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_SPIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_SPIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_TAPEN_MASK (0x10U)
-#define FLASH_CMPA_CC_SOCU_DFLT_TAPEN_SHIFT (4U)
-/*! TAPEN - JTAG TAP fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_TAPEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_TAPEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_TAPEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_CPU1_DBGEN_MASK (0x20U)
-#define FLASH_CMPA_CC_SOCU_DFLT_CPU1_DBGEN_SHIFT (5U)
-/*! CPU1_DBGEN - CPU1 (Micro cortex M33) invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_CPU1_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_CPU1_DBGEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_CPU1_DBGEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_ISP_CMD_EN_MASK (0x40U)
-#define FLASH_CMPA_CC_SOCU_DFLT_ISP_CMD_EN_SHIFT (6U)
-/*! ISP_CMD_EN - ISP Boot Command fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_ISP_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_ISP_CMD_EN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_ISP_CMD_EN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_FA_CMD_EN_MASK (0x80U)
-#define FLASH_CMPA_CC_SOCU_DFLT_FA_CMD_EN_SHIFT (7U)
-/*! FA_CMD_EN - FA Command fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_FA_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_FA_CMD_EN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_FA_CMD_EN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_ME_CMD_EN_MASK (0x100U)
-#define FLASH_CMPA_CC_SOCU_DFLT_ME_CMD_EN_SHIFT (8U)
-/*! ME_CMD_EN - Flash Mass Erase Command fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_ME_CMD_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_ME_CMD_EN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_ME_CMD_EN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_CPU1_NIDEN_MASK (0x200U)
-#define FLASH_CMPA_CC_SOCU_DFLT_CPU1_NIDEN_SHIFT (9U)
-/*! CPU1_NIDEN - CPU1 (Micro cortex M33) non-invasive debug fixed state
- * 0b0..Disable
- * 0b1..Enable
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_CPU1_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_CPU1_NIDEN_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_CPU1_NIDEN_MASK)
-#define FLASH_CMPA_CC_SOCU_DFLT_INVERSE_VALUE_MASK (0xFFFF0000U)
-#define FLASH_CMPA_CC_SOCU_DFLT_INVERSE_VALUE_SHIFT (16U)
-/*! INVERSE_VALUE - inverse value of bits [15:0]
- */
-#define FLASH_CMPA_CC_SOCU_DFLT_INVERSE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CC_SOCU_DFLT_INVERSE_VALUE_SHIFT)) & FLASH_CMPA_CC_SOCU_DFLT_INVERSE_VALUE_MASK)
-/*! @} */
-
-/*! @name VENDOR_USAGE - . */
-/*! @{ */
-#define FLASH_CMPA_VENDOR_USAGE_VENDOR_USAGE_MASK (0xFFFF0000U)
-#define FLASH_CMPA_VENDOR_USAGE_VENDOR_USAGE_SHIFT (16U)
-/*! VENDOR_USAGE - Upper 16 bits of vendor usage field defined in DAP. Lower 16-bits come from customer field area.
- */
-#define FLASH_CMPA_VENDOR_USAGE_VENDOR_USAGE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_VENDOR_USAGE_VENDOR_USAGE_SHIFT)) & FLASH_CMPA_VENDOR_USAGE_VENDOR_USAGE_MASK)
-/*! @} */
-
-/*! @name SECURE_BOOT_CFG - . */
-/*! @{ */
-#define FLASH_CMPA_SECURE_BOOT_CFG_RSA4K_MASK (0x3U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_RSA4K_SHIFT (0U)
-/*! RSA4K - Use RSA4096 keys only. 00- RSA2048 keys 01, 10, 11 - RSA4096 keys
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_RSA4K(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_RSA4K_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_RSA4K_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_ENC_NXP_CFG_MASK (0xCU)
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_ENC_NXP_CFG_SHIFT (2U)
-/*! DICE_ENC_NXP_CFG - Include NXP area in DICE computation. 00 - not included 01, 10, 11 - included
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_ENC_NXP_CFG(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_DICE_ENC_NXP_CFG_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_DICE_ENC_NXP_CFG_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_CUST_CFG_MASK (0x30U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_CUST_CFG_SHIFT (4U)
-/*! DICE_CUST_CFG - Include Customer factory area (including keys) in DICE computation. 00 - not included 01, 10, 11 - included
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_CUST_CFG(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_DICE_CUST_CFG_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_DICE_CUST_CFG_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_SKIP_DICE_MASK (0xC0U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_SKIP_DICE_SHIFT (6U)
-/*! SKIP_DICE - Skip DICE computation. 00 - Enable DICE 01,10,11 - Disable DICE
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_SKIP_DICE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_SKIP_DICE_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_SKIP_DICE_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_TZM_IMAGE_TYPE_MASK (0x300U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_TZM_IMAGE_TYPE_SHIFT (8U)
-/*! TZM_IMAGE_TYPE - TrustZone-M mode. 00 - TZM mode in image header. 01 - Disable TZ-M. Boots to
- * NonSecure. 10 - TZ-M enable boots to secure mode. 11 - Preset TZM checker from image header.
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_TZM_IMAGE_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_TZM_IMAGE_TYPE_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_TZM_IMAGE_TYPE_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_SET_KEY_MASK (0xC00U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_SET_KEY_SHIFT (10U)
-/*! BLOCK_SET_KEY - Block PUF key code generation. 00 - Enable Key code generation 01, 10, 11 - Disable key code generation
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_SET_KEY(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_SET_KEY_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_SET_KEY_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_ENROLL_MASK (0x3000U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_ENROLL_SHIFT (12U)
-/*! BLOCK_ENROLL - Block PUF enrollement. 00 - Enable enrollment mode 01, 10, 11 - Disable further enrollmnet
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_ENROLL(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_ENROLL_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_BLOCK_ENROLL_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_INC_SEC_EPOCH_MASK (0xC000U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_INC_SEC_EPOCH_SHIFT (14U)
-/*! DICE_INC_SEC_EPOCH - Include security EPOCH in DICE
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_DICE_INC_SEC_EPOCH(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_DICE_INC_SEC_EPOCH_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_DICE_INC_SEC_EPOCH_MASK)
-#define FLASH_CMPA_SECURE_BOOT_CFG_SEC_BOOT_EN_MASK (0xC0000000U)
-#define FLASH_CMPA_SECURE_BOOT_CFG_SEC_BOOT_EN_SHIFT (30U)
-/*! SEC_BOOT_EN - Secure boot enable. 00 - Plain image (internal flash with or without CRC) 01, 10,
- * 11 - Boot signed images. (internal flash, RSA signed)
- */
-#define FLASH_CMPA_SECURE_BOOT_CFG_SEC_BOOT_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SECURE_BOOT_CFG_SEC_BOOT_EN_SHIFT)) & FLASH_CMPA_SECURE_BOOT_CFG_SEC_BOOT_EN_MASK)
-/*! @} */
-
-/*! @name PRINCE_BASE_ADDR - . */
-/*! @{ */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR0_PRG_MASK (0xFU)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR0_PRG_SHIFT (0U)
-/*! ADDR0_PRG - Programmable portion of the base address of region 0.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR0_PRG(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_ADDR0_PRG_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_ADDR0_PRG_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR1_PRG_MASK (0xF0U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR1_PRG_SHIFT (4U)
-/*! ADDR1_PRG - Programmable portion of the base address of region 1.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR1_PRG(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_ADDR1_PRG_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_ADDR1_PRG_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR2_PRG_MASK (0xF00U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR2_PRG_SHIFT (8U)
-/*! ADDR2_PRG - Programmable portion of the base address of region 2.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_ADDR2_PRG(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_ADDR2_PRG_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_ADDR2_PRG_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG0_MASK (0x30000U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG0_SHIFT (16U)
-/*! LOCK_REG0 - Lock PRINCE region0 settings. 00 - Region is not locked. 01, 10, 11 - Region is locked.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG0(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG0_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG0_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG1_MASK (0xC0000U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG1_SHIFT (18U)
-/*! LOCK_REG1 - Lock PRINCE region1 settings. 00 - Region is not locked. 01, 10, 11 - Region is locked.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG1(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG1_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG1_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG2_MASK (0x300000U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG2_SHIFT (20U)
-/*! LOCK_REG2 - Lock PRINCE region2 settings. 00 - Region is not locked. 01, 10, 11 - Region is locked.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG2(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG2_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_LOCK_REG2_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG0_ERASE_CHECK_EN_MASK (0x3000000U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG0_ERASE_CHECK_EN_SHIFT (24U)
-/*! REG0_ERASE_CHECK_EN - For PRINCE region0 enable checking whether all encrypted pages are erased
- * together. 00 - Check is disabled. 01, 10, 11 - Check is enabled.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG0_ERASE_CHECK_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_REG0_ERASE_CHECK_EN_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_REG0_ERASE_CHECK_EN_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG1_ERASE_CHECK_EN_MASK (0xC000000U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG1_ERASE_CHECK_EN_SHIFT (26U)
-/*! REG1_ERASE_CHECK_EN - For PRINCE region1 enable checking whether all encrypted pages are erased
- * together. 00 - Check is disabled. 01, 10, 11 - Check is enabled.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG1_ERASE_CHECK_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_REG1_ERASE_CHECK_EN_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_REG1_ERASE_CHECK_EN_MASK)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG2_ERASE_CHECK_EN_MASK (0x30000000U)
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG2_ERASE_CHECK_EN_SHIFT (28U)
-/*! REG2_ERASE_CHECK_EN - For PRINCE region2 enable checking whether all encrypted pages are erased
- * together. 00 - Check is disabled. 01, 10, 11 - Check is enabled.
- */
-#define FLASH_CMPA_PRINCE_BASE_ADDR_REG2_ERASE_CHECK_EN(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_BASE_ADDR_REG2_ERASE_CHECK_EN_SHIFT)) & FLASH_CMPA_PRINCE_BASE_ADDR_REG2_ERASE_CHECK_EN_MASK)
-/*! @} */
-
-/*! @name PRINCE_SR_0 - Region 0, sub-region enable */
-/*! @{ */
-#define FLASH_CMPA_PRINCE_SR_0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_PRINCE_SR_0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_PRINCE_SR_0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_SR_0_FIELD_SHIFT)) & FLASH_CMPA_PRINCE_SR_0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_SR_1 - Region 1, sub-region enable */
-/*! @{ */
-#define FLASH_CMPA_PRINCE_SR_1_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_PRINCE_SR_1_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_PRINCE_SR_1_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_SR_1_FIELD_SHIFT)) & FLASH_CMPA_PRINCE_SR_1_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_SR_2 - Region 2, sub-region enable */
-/*! @{ */
-#define FLASH_CMPA_PRINCE_SR_2_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_PRINCE_SR_2_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_PRINCE_SR_2_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_PRINCE_SR_2_FIELD_SHIFT)) & FLASH_CMPA_PRINCE_SR_2_FIELD_MASK)
-/*! @} */
-
-/*! @name XTAL_32KHZ_CAPABANK_TRIM - Xtal 32kHz capabank triming. */
-/*! @{ */
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_TRIM_VALID_MASK (0x1U)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_TRIM_VALID_SHIFT (0U)
-/*! TRIM_VALID - 0 : Capa Bank trimmings not valid. Default trimmings value are used. 1 : Capa Bank trimmings valid.
- */
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_TRIM_VALID(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_TRIM_VALID_SHIFT)) & FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_TRIM_VALID_MASK)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_MASK (0x7FEU)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_SHIFT (1U)
-/*! XTAL_LOAD_CAP_IEC_PF_X100 - Load capacitance, pF x 100. For example, 6pF becomes 600.
- */
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_SHIFT)) & FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_MASK)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_MASK (0x1FF800U)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_SHIFT (11U)
-/*! PCB_XIN_PARA_CAP_PF_X100 - PCB XIN parasitic capacitance, pF x 100. For example, 6pF becomes 600.
- */
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_SHIFT)) & FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_MASK)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_MASK (0x7FE00000U)
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_SHIFT (21U)
-/*! PCB_XOUT_PARA_CAP_PF_X100 - PCB XOUT parasitic capacitance, pF x 100. For example, 6pF becomes 600.
- */
-#define FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_SHIFT)) & FLASH_CMPA_XTAL_32KHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_MASK)
-/*! @} */
-
-/*! @name XTAL_16MHZ_CAPABANK_TRIM - Xtal 16MHz capabank triming. */
-/*! @{ */
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_TRIM_VALID_MASK (0x1U)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_TRIM_VALID_SHIFT (0U)
-/*! TRIM_VALID - 0 : Capa Bank trimmings not valid. Default trimmings value are used. 1 : Capa Bank trimmings valid.
- */
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_TRIM_VALID(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_TRIM_VALID_SHIFT)) & FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_TRIM_VALID_MASK)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_MASK (0x7FEU)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_SHIFT (1U)
-/*! XTAL_LOAD_CAP_IEC_PF_X100 - Load capacitance, pF x 100. For example, 6pF becomes 600.
- */
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_SHIFT)) & FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_XTAL_LOAD_CAP_IEC_PF_X100_MASK)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_MASK (0x1FF800U)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_SHIFT (11U)
-/*! PCB_XIN_PARA_CAP_PF_X100 - PCB XIN parasitic capacitance, pF x 100. For example, 6pF becomes 600.
- */
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_SHIFT)) & FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XIN_PARA_CAP_PF_X100_MASK)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_MASK (0x7FE00000U)
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_SHIFT (21U)
-/*! PCB_XOUT_PARA_CAP_PF_X100 - PCB XOUT parasitic capacitance, pF x 100. For example, 6pF becomes 600.
- */
-#define FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_SHIFT)) & FLASH_CMPA_XTAL_16MHZ_CAPABANK_TRIM_PCB_XOUT_PARA_CAP_PF_X100_MASK)
-/*! @} */
-
-/*! @name ROTKH - ROTKH0 for Root of Trust Keys Table hash[255:224] ROTKH1 for Root of Trust Keys Table hash[223:192] ROTKH2 for Root of Trust Keys Table hash[191:160] ROTKH3 for Root of Trust Keys Table hash[159:128] ROTKH4 for Root of Trust Keys Table hash[127:96] ROTKH5 for Root of Trust Keys Table hash[95:64] ROTKH6 for Root of Trust Keys Table hash[63:32] ROTKH7 for Root of Trust Keys Table hash[31:0] */
-/*! @{ */
-#define FLASH_CMPA_ROTKH_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_ROTKH_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_ROTKH_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_ROTKH_FIELD_SHIFT)) & FLASH_CMPA_ROTKH_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CMPA_ROTKH */
-#define FLASH_CMPA_ROTKH_COUNT (8U)
-
-/*! @name CUSTOMER_DEFINED - Customer Defined (Programable through ROM API) */
-/*! @{ */
-#define FLASH_CMPA_CUSTOMER_DEFINED_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_CUSTOMER_DEFINED_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_CUSTOMER_DEFINED_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_CUSTOMER_DEFINED_FIELD_SHIFT)) & FLASH_CMPA_CUSTOMER_DEFINED_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CMPA_CUSTOMER_DEFINED */
-#define FLASH_CMPA_CUSTOMER_DEFINED_COUNT (56U)
-
-/*! @name SHA256_DIGEST - SHA256_DIGEST0 for DIGEST[31:0] SHA256_DIGEST1 for DIGEST[63:32] SHA256_DIGEST2 for DIGEST[95:64] SHA256_DIGEST3 for DIGEST[127:96] SHA256_DIGEST4 for DIGEST[159:128] SHA256_DIGEST5 for DIGEST[191:160] SHA256_DIGEST6 for DIGEST[223:192] SHA256_DIGEST7 for DIGEST[255:224] */
-/*! @{ */
-#define FLASH_CMPA_SHA256_DIGEST_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_CMPA_SHA256_DIGEST_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_CMPA_SHA256_DIGEST_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_CMPA_SHA256_DIGEST_FIELD_SHIFT)) & FLASH_CMPA_SHA256_DIGEST_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_CMPA_SHA256_DIGEST */
-#define FLASH_CMPA_SHA256_DIGEST_COUNT (8U)
-
-
-/*!
- * @}
- */ /* end of group FLASH_CMPA_Register_Masks */
-
-
-/* FLASH_CMPA - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral FLASH_CMPA base address */
- #define FLASH_CMPA_BASE (0x1009E400u)
- /** Peripheral FLASH_CMPA base address */
- #define FLASH_CMPA_BASE_NS (0x9E400u)
- /** Peripheral FLASH_CMPA base pointer */
- #define FLASH_CMPA ((FLASH_CMPA_Type *)FLASH_CMPA_BASE)
- /** Peripheral FLASH_CMPA base pointer */
- #define FLASH_CMPA_NS ((FLASH_CMPA_Type *)FLASH_CMPA_BASE_NS)
- /** Array initializer of FLASH_CMPA peripheral base addresses */
- #define FLASH_CMPA_BASE_ADDRS { FLASH_CMPA_BASE }
- /** Array initializer of FLASH_CMPA peripheral base pointers */
- #define FLASH_CMPA_BASE_PTRS { FLASH_CMPA }
- /** Array initializer of FLASH_CMPA peripheral base addresses */
- #define FLASH_CMPA_BASE_ADDRS_NS { FLASH_CMPA_BASE_NS }
- /** Array initializer of FLASH_CMPA peripheral base pointers */
- #define FLASH_CMPA_BASE_PTRS_NS { FLASH_CMPA_NS }
-#else
- /** Peripheral FLASH_CMPA base address */
- #define FLASH_CMPA_BASE (0x9E400u)
- /** Peripheral FLASH_CMPA base pointer */
- #define FLASH_CMPA ((FLASH_CMPA_Type *)FLASH_CMPA_BASE)
- /** Array initializer of FLASH_CMPA peripheral base addresses */
- #define FLASH_CMPA_BASE_ADDRS { FLASH_CMPA_BASE }
- /** Array initializer of FLASH_CMPA peripheral base pointers */
- #define FLASH_CMPA_BASE_PTRS { FLASH_CMPA }
-#endif
-
-/*!
- * @}
- */ /* end of group FLASH_CMPA_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- FLASH_KEY_STORE Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_KEY_STORE_Peripheral_Access_Layer FLASH_KEY_STORE Peripheral Access Layer
- * @{
- */
-
-/** FLASH_KEY_STORE - Register Layout Typedef */
-typedef struct {
- struct { /* offset: 0x0 */
- __IO uint32_t HEADER; /**< Valid Key Sore Header : 0x95959595, offset: 0x0 */
- __IO uint32_t PUF_DISCHARGE_TIME_IN_MS; /**< puf discharge time in ms., offset: 0x4 */
- } KEY_STORE_HEADER;
- __IO uint32_t ACTIVATION_CODE[298]; /**< ., array offset: 0x8, array step: 0x4 */
- union { /* offset: 0x4B0 */
- __IO uint32_t SBKEY_KEY_CODE[14]; /**< ., array offset: 0x4B0, array step: 0x4 */
- struct { /* offset: 0x4B0 */
- __IO uint32_t SBKEY_HEADER0; /**< ., offset: 0x4B0 */
- __IO uint32_t SBKEY_HEADER1; /**< ., offset: 0x4B4 */
- __IO uint32_t SBKEY_BODY[12]; /**< ., array offset: 0x4B8, array step: 0x4 */
- } SBKEY_KEY_CODE_CORE;
- };
- union { /* offset: 0x4E8 */
- __IO uint32_t USER_KEK_KEY_CODE[14]; /**< ., array offset: 0x4E8, array step: 0x4 */
- struct { /* offset: 0x4E8 */
- __IO uint32_t USER_KEK_HEADER0; /**< ., offset: 0x4E8 */
- __IO uint32_t USER_KEK_HEADER1; /**< ., offset: 0x4EC */
- __IO uint32_t USER_KEK_BODY[12]; /**< ., array offset: 0x4F0, array step: 0x4 */
- } USER_KEK_KEY_CODE_CORE;
- };
- union { /* offset: 0x520 */
- __IO uint32_t UDS_KEY_CODE[14]; /**< ., array offset: 0x520, array step: 0x4 */
- struct { /* offset: 0x520 */
- __IO uint32_t UDS_HEADER0; /**< ., offset: 0x520 */
- __IO uint32_t UDS_HEADER1; /**< ., offset: 0x524 */
- __IO uint32_t UDS_BODY[12]; /**< ., array offset: 0x528, array step: 0x4 */
- } UDS_KEY_CODE_CORE;
- };
- union { /* offset: 0x558 */
- __IO uint32_t PRINCE_REGION0_KEY_CODE[14]; /**< ., array offset: 0x558, array step: 0x4 */
- struct { /* offset: 0x558 */
- __IO uint32_t PRINCE_REGION0_HEADER0; /**< ., offset: 0x558 */
- __IO uint32_t PRINCE_REGION0_HEADER1; /**< ., offset: 0x55C */
- __IO uint32_t PRINCE_REGION0_BODY[12]; /**< ., array offset: 0x560, array step: 0x4 */
- } PRINCE_REGION0_KEY_CODE_CORE;
- };
- union { /* offset: 0x590 */
- __IO uint32_t PRINCE_REGION1_KEY_CODE[14]; /**< ., array offset: 0x590, array step: 0x4 */
- struct { /* offset: 0x590 */
- __IO uint32_t PRINCE_REGION1_HEADER0; /**< ., offset: 0x590 */
- __IO uint32_t PRINCE_REGION1_HEADER1; /**< ., offset: 0x594 */
- __IO uint32_t PRINCE_REGION1_BODY[12]; /**< ., array offset: 0x598, array step: 0x4 */
- } PRINCE_REGION1_KEY_CODE_CORE;
- };
- union { /* offset: 0x5C8 */
- __IO uint32_t PRINCE_REGION2_KEY_CODE[14]; /**< ., array offset: 0x5C8, array step: 0x4 */
- struct { /* offset: 0x5C8 */
- __IO uint32_t PRINCE_REGION2_HEADER0; /**< ., offset: 0x5C8 */
- __IO uint32_t PRINCE_REGION2_HEADER1; /**< ., offset: 0x5CC */
- __IO uint32_t PRINCE_REGION2_BODY[12]; /**< ., array offset: 0x5D0, array step: 0x4 */
- } PRINCE_REGION2_KEY_CODE_CORE;
- };
-} FLASH_KEY_STORE_Type;
-
-/* ----------------------------------------------------------------------------
- -- FLASH_KEY_STORE Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLASH_KEY_STORE_Register_Masks FLASH_KEY_STORE Register Masks
- * @{
- */
-
-/*! @name HEADER - Valid Key Sore Header : 0x95959595 */
-/*! @{ */
-#define FLASH_KEY_STORE_HEADER_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_HEADER_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_HEADER_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_HEADER_FIELD_SHIFT)) & FLASH_KEY_STORE_HEADER_FIELD_MASK)
-/*! @} */
-
-/*! @name PUF_DISCHARGE_TIME_IN_MS - puf discharge time in ms. */
-/*! @{ */
-#define FLASH_KEY_STORE_PUF_DISCHARGE_TIME_IN_MS_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PUF_DISCHARGE_TIME_IN_MS_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PUF_DISCHARGE_TIME_IN_MS_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PUF_DISCHARGE_TIME_IN_MS_FIELD_SHIFT)) & FLASH_KEY_STORE_PUF_DISCHARGE_TIME_IN_MS_FIELD_MASK)
-/*! @} */
-
-/*! @name ACTIVATION_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_ACTIVATION_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_ACTIVATION_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_ACTIVATION_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_ACTIVATION_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_ACTIVATION_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_ACTIVATION_CODE */
-#define FLASH_KEY_STORE_ACTIVATION_CODE_COUNT (298U)
-
-/*! @name SBKEY_KEY_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_SBKEY_KEY_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_SBKEY_KEY_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_SBKEY_KEY_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_SBKEY_KEY_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_SBKEY_KEY_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_SBKEY_KEY_CODE */
-#define FLASH_KEY_STORE_SBKEY_KEY_CODE_COUNT (14U)
-
-/*! @name SBKEY_HEADER0 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_SBKEY_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_SBKEY_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_SBKEY_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_SBKEY_HEADER0_FIELD_SHIFT)) & FLASH_KEY_STORE_SBKEY_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name SBKEY_HEADER1 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_SBKEY_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_KEY_STORE_SBKEY_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_KEY_STORE_SBKEY_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_SBKEY_HEADER1_TYPE_SHIFT)) & FLASH_KEY_STORE_SBKEY_HEADER1_TYPE_MASK)
-#define FLASH_KEY_STORE_SBKEY_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_KEY_STORE_SBKEY_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_KEY_STORE_SBKEY_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_SBKEY_HEADER1_INDEX_SHIFT)) & FLASH_KEY_STORE_SBKEY_HEADER1_INDEX_MASK)
-#define FLASH_KEY_STORE_SBKEY_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_KEY_STORE_SBKEY_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_KEY_STORE_SBKEY_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_SBKEY_HEADER1_SIZE_SHIFT)) & FLASH_KEY_STORE_SBKEY_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name SBKEY_BODY - . */
-/*! @{ */
-#define FLASH_KEY_STORE_SBKEY_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_SBKEY_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_SBKEY_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_SBKEY_BODY_FIELD_SHIFT)) & FLASH_KEY_STORE_SBKEY_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_SBKEY_BODY */
-#define FLASH_KEY_STORE_SBKEY_BODY_COUNT (12U)
-
-/*! @name USER_KEK_KEY_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_USER_KEK_KEY_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_USER_KEK_KEY_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_USER_KEK_KEY_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_USER_KEK_KEY_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_USER_KEK_KEY_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_USER_KEK_KEY_CODE */
-#define FLASH_KEY_STORE_USER_KEK_KEY_CODE_COUNT (14U)
-
-/*! @name USER_KEK_HEADER0 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_USER_KEK_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_USER_KEK_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_USER_KEK_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_USER_KEK_HEADER0_FIELD_SHIFT)) & FLASH_KEY_STORE_USER_KEK_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name USER_KEK_HEADER1 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_USER_KEK_HEADER1_TYPE_SHIFT)) & FLASH_KEY_STORE_USER_KEK_HEADER1_TYPE_MASK)
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_USER_KEK_HEADER1_INDEX_SHIFT)) & FLASH_KEY_STORE_USER_KEK_HEADER1_INDEX_MASK)
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_KEY_STORE_USER_KEK_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_USER_KEK_HEADER1_SIZE_SHIFT)) & FLASH_KEY_STORE_USER_KEK_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name USER_KEK_BODY - . */
-/*! @{ */
-#define FLASH_KEY_STORE_USER_KEK_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_USER_KEK_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_USER_KEK_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_USER_KEK_BODY_FIELD_SHIFT)) & FLASH_KEY_STORE_USER_KEK_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_USER_KEK_BODY */
-#define FLASH_KEY_STORE_USER_KEK_BODY_COUNT (12U)
-
-/*! @name UDS_KEY_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_UDS_KEY_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_UDS_KEY_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_UDS_KEY_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_UDS_KEY_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_UDS_KEY_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_UDS_KEY_CODE */
-#define FLASH_KEY_STORE_UDS_KEY_CODE_COUNT (14U)
-
-/*! @name UDS_HEADER0 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_UDS_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_UDS_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_UDS_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_UDS_HEADER0_FIELD_SHIFT)) & FLASH_KEY_STORE_UDS_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name UDS_HEADER1 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_UDS_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_KEY_STORE_UDS_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_KEY_STORE_UDS_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_UDS_HEADER1_TYPE_SHIFT)) & FLASH_KEY_STORE_UDS_HEADER1_TYPE_MASK)
-#define FLASH_KEY_STORE_UDS_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_KEY_STORE_UDS_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_KEY_STORE_UDS_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_UDS_HEADER1_INDEX_SHIFT)) & FLASH_KEY_STORE_UDS_HEADER1_INDEX_MASK)
-#define FLASH_KEY_STORE_UDS_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_KEY_STORE_UDS_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_KEY_STORE_UDS_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_UDS_HEADER1_SIZE_SHIFT)) & FLASH_KEY_STORE_UDS_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name UDS_BODY - . */
-/*! @{ */
-#define FLASH_KEY_STORE_UDS_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_UDS_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_UDS_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_UDS_BODY_FIELD_SHIFT)) & FLASH_KEY_STORE_UDS_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_UDS_BODY */
-#define FLASH_KEY_STORE_UDS_BODY_COUNT (12U)
-
-/*! @name PRINCE_REGION0_KEY_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE */
-#define FLASH_KEY_STORE_PRINCE_REGION0_KEY_CODE_COUNT (14U)
-
-/*! @name PRINCE_REGION0_HEADER0 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION0_HEADER0_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION0_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION0_HEADER1 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_TYPE_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_TYPE_MASK)
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_INDEX_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_INDEX_MASK)
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_SIZE_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION0_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION0_BODY - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION0_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION0_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION0_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION0_BODY_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION0_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_PRINCE_REGION0_BODY */
-#define FLASH_KEY_STORE_PRINCE_REGION0_BODY_COUNT (12U)
-
-/*! @name PRINCE_REGION1_KEY_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE */
-#define FLASH_KEY_STORE_PRINCE_REGION1_KEY_CODE_COUNT (14U)
-
-/*! @name PRINCE_REGION1_HEADER0 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION1_HEADER0_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION1_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION1_HEADER1 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_TYPE_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_TYPE_MASK)
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_INDEX_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_INDEX_MASK)
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_SIZE_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION1_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION1_BODY - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION1_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION1_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION1_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION1_BODY_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION1_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_PRINCE_REGION1_BODY */
-#define FLASH_KEY_STORE_PRINCE_REGION1_BODY_COUNT (12U)
-
-/*! @name PRINCE_REGION2_KEY_CODE - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE */
-#define FLASH_KEY_STORE_PRINCE_REGION2_KEY_CODE_COUNT (14U)
-
-/*! @name PRINCE_REGION2_HEADER0 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER0_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER0_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER0_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION2_HEADER0_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION2_HEADER0_FIELD_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION2_HEADER1 - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_TYPE_MASK (0x3U)
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_TYPE_SHIFT (0U)
-/*! TYPE - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_TYPE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_TYPE_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_TYPE_MASK)
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_INDEX_MASK (0xF00U)
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_INDEX_SHIFT (8U)
-/*! INDEX - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_INDEX(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_INDEX_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_INDEX_MASK)
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_SIZE_MASK (0x3F000000U)
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_SIZE_SHIFT (24U)
-/*! SIZE - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_SIZE(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_SIZE_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION2_HEADER1_SIZE_MASK)
-/*! @} */
-
-/*! @name PRINCE_REGION2_BODY - . */
-/*! @{ */
-#define FLASH_KEY_STORE_PRINCE_REGION2_BODY_FIELD_MASK (0xFFFFFFFFU)
-#define FLASH_KEY_STORE_PRINCE_REGION2_BODY_FIELD_SHIFT (0U)
-/*! FIELD - .
- */
-#define FLASH_KEY_STORE_PRINCE_REGION2_BODY_FIELD(x) (((uint32_t)(((uint32_t)(x)) << FLASH_KEY_STORE_PRINCE_REGION2_BODY_FIELD_SHIFT)) & FLASH_KEY_STORE_PRINCE_REGION2_BODY_FIELD_MASK)
-/*! @} */
-
-/* The count of FLASH_KEY_STORE_PRINCE_REGION2_BODY */
-#define FLASH_KEY_STORE_PRINCE_REGION2_BODY_COUNT (12U)
-
-
-/*!
- * @}
- */ /* end of group FLASH_KEY_STORE_Register_Masks */
-
-
-/* FLASH_KEY_STORE - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral FLASH_KEY_STORE base address */
- #define FLASH_KEY_STORE_BASE (0x1009E600u)
- /** Peripheral FLASH_KEY_STORE base address */
- #define FLASH_KEY_STORE_BASE_NS (0x9E600u)
- /** Peripheral FLASH_KEY_STORE base pointer */
- #define FLASH_KEY_STORE ((FLASH_KEY_STORE_Type *)FLASH_KEY_STORE_BASE)
- /** Peripheral FLASH_KEY_STORE base pointer */
- #define FLASH_KEY_STORE_NS ((FLASH_KEY_STORE_Type *)FLASH_KEY_STORE_BASE_NS)
- /** Array initializer of FLASH_KEY_STORE peripheral base addresses */
- #define FLASH_KEY_STORE_BASE_ADDRS { FLASH_KEY_STORE_BASE }
- /** Array initializer of FLASH_KEY_STORE peripheral base pointers */
- #define FLASH_KEY_STORE_BASE_PTRS { FLASH_KEY_STORE }
- /** Array initializer of FLASH_KEY_STORE peripheral base addresses */
- #define FLASH_KEY_STORE_BASE_ADDRS_NS { FLASH_KEY_STORE_BASE_NS }
- /** Array initializer of FLASH_KEY_STORE peripheral base pointers */
- #define FLASH_KEY_STORE_BASE_PTRS_NS { FLASH_KEY_STORE_NS }
-#else
- /** Peripheral FLASH_KEY_STORE base address */
- #define FLASH_KEY_STORE_BASE (0x9E600u)
- /** Peripheral FLASH_KEY_STORE base pointer */
- #define FLASH_KEY_STORE ((FLASH_KEY_STORE_Type *)FLASH_KEY_STORE_BASE)
- /** Array initializer of FLASH_KEY_STORE peripheral base addresses */
- #define FLASH_KEY_STORE_BASE_ADDRS { FLASH_KEY_STORE_BASE }
- /** Array initializer of FLASH_KEY_STORE peripheral base pointers */
- #define FLASH_KEY_STORE_BASE_PTRS { FLASH_KEY_STORE }
-#endif
-
-/*!
- * @}
- */ /* end of group FLASH_KEY_STORE_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- FLEXCOMM Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLEXCOMM_Peripheral_Access_Layer FLEXCOMM Peripheral Access Layer
- * @{
- */
-
-/** FLEXCOMM - Register Layout Typedef */
-typedef struct {
- uint8_t RESERVED_0[4088];
- __IO uint32_t PSELID; /**< Peripheral Select and Flexcomm ID register., offset: 0xFF8 */
- __I uint32_t PID; /**< Peripheral identification register., offset: 0xFFC */
-} FLEXCOMM_Type;
-
-/* ----------------------------------------------------------------------------
- -- FLEXCOMM Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup FLEXCOMM_Register_Masks FLEXCOMM Register Masks
- * @{
- */
-
-/*! @name PSELID - Peripheral Select and Flexcomm ID register. */
-/*! @{ */
-#define FLEXCOMM_PSELID_PERSEL_MASK (0x7U)
-#define FLEXCOMM_PSELID_PERSEL_SHIFT (0U)
-/*! PERSEL - Peripheral Select. This field is writable by software.
- * 0b000..No peripheral selected.
- * 0b001..USART function selected.
- * 0b010..SPI function selected.
- * 0b011..I2C function selected.
- * 0b100..I2S transmit function selected.
- * 0b101..I2S receive function selected.
- * 0b110..Reserved
- * 0b111..Reserved
- */
-#define FLEXCOMM_PSELID_PERSEL(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_PERSEL_SHIFT)) & FLEXCOMM_PSELID_PERSEL_MASK)
-#define FLEXCOMM_PSELID_LOCK_MASK (0x8U)
-#define FLEXCOMM_PSELID_LOCK_SHIFT (3U)
-/*! LOCK - Lock the peripheral select. This field is writable by software.
- * 0b0..Peripheral select can be changed by software.
- * 0b1..Peripheral select is locked and cannot be changed until this Flexcomm or the entire device is reset.
- */
-#define FLEXCOMM_PSELID_LOCK(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_LOCK_SHIFT)) & FLEXCOMM_PSELID_LOCK_MASK)
-#define FLEXCOMM_PSELID_USARTPRESENT_MASK (0x10U)
-#define FLEXCOMM_PSELID_USARTPRESENT_SHIFT (4U)
-/*! USARTPRESENT - USART present indicator. This field is Read-only.
- * 0b0..This Flexcomm does not include the USART function.
- * 0b1..This Flexcomm includes the USART function.
- */
-#define FLEXCOMM_PSELID_USARTPRESENT(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_USARTPRESENT_SHIFT)) & FLEXCOMM_PSELID_USARTPRESENT_MASK)
-#define FLEXCOMM_PSELID_SPIPRESENT_MASK (0x20U)
-#define FLEXCOMM_PSELID_SPIPRESENT_SHIFT (5U)
-/*! SPIPRESENT - SPI present indicator. This field is Read-only.
- * 0b0..This Flexcomm does not include the SPI function.
- * 0b1..This Flexcomm includes the SPI function.
- */
-#define FLEXCOMM_PSELID_SPIPRESENT(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_SPIPRESENT_SHIFT)) & FLEXCOMM_PSELID_SPIPRESENT_MASK)
-#define FLEXCOMM_PSELID_I2CPRESENT_MASK (0x40U)
-#define FLEXCOMM_PSELID_I2CPRESENT_SHIFT (6U)
-/*! I2CPRESENT - I2C present indicator. This field is Read-only.
- * 0b0..This Flexcomm does not include the I2C function.
- * 0b1..This Flexcomm includes the I2C function.
- */
-#define FLEXCOMM_PSELID_I2CPRESENT(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_I2CPRESENT_SHIFT)) & FLEXCOMM_PSELID_I2CPRESENT_MASK)
-#define FLEXCOMM_PSELID_I2SPRESENT_MASK (0x80U)
-#define FLEXCOMM_PSELID_I2SPRESENT_SHIFT (7U)
-/*! I2SPRESENT - I 2S present indicator. This field is Read-only.
- * 0b0..This Flexcomm does not include the I2S function.
- * 0b1..This Flexcomm includes the I2S function.
- */
-#define FLEXCOMM_PSELID_I2SPRESENT(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_I2SPRESENT_SHIFT)) & FLEXCOMM_PSELID_I2SPRESENT_MASK)
-#define FLEXCOMM_PSELID_ID_MASK (0xFFFFF000U)
-#define FLEXCOMM_PSELID_ID_SHIFT (12U)
-/*! ID - Flexcomm ID.
- */
-#define FLEXCOMM_PSELID_ID(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PSELID_ID_SHIFT)) & FLEXCOMM_PSELID_ID_MASK)
-/*! @} */
-
-/*! @name PID - Peripheral identification register. */
-/*! @{ */
-#define FLEXCOMM_PID_APERTURE_MASK (0xFFU)
-#define FLEXCOMM_PID_APERTURE_SHIFT (0U)
-/*! APERTURE - size aperture for the register port on the bus (APB or AHB).
- */
-#define FLEXCOMM_PID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PID_APERTURE_SHIFT)) & FLEXCOMM_PID_APERTURE_MASK)
-#define FLEXCOMM_PID_MINOR_REV_MASK (0xF00U)
-#define FLEXCOMM_PID_MINOR_REV_SHIFT (8U)
-/*! MINOR_REV - Minor revision of module implementation.
- */
-#define FLEXCOMM_PID_MINOR_REV(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PID_MINOR_REV_SHIFT)) & FLEXCOMM_PID_MINOR_REV_MASK)
-#define FLEXCOMM_PID_MAJOR_REV_MASK (0xF000U)
-#define FLEXCOMM_PID_MAJOR_REV_SHIFT (12U)
-/*! MAJOR_REV - Major revision of module implementation.
- */
-#define FLEXCOMM_PID_MAJOR_REV(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PID_MAJOR_REV_SHIFT)) & FLEXCOMM_PID_MAJOR_REV_MASK)
-#define FLEXCOMM_PID_ID_MASK (0xFFFF0000U)
-#define FLEXCOMM_PID_ID_SHIFT (16U)
-/*! ID - Module identifier for the selected function.
- */
-#define FLEXCOMM_PID_ID(x) (((uint32_t)(((uint32_t)(x)) << FLEXCOMM_PID_ID_SHIFT)) & FLEXCOMM_PID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group FLEXCOMM_Register_Masks */
-
-
-/* FLEXCOMM - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral FLEXCOMM0 base address */
- #define FLEXCOMM0_BASE (0x50086000u)
- /** Peripheral FLEXCOMM0 base address */
- #define FLEXCOMM0_BASE_NS (0x40086000u)
- /** Peripheral FLEXCOMM0 base pointer */
- #define FLEXCOMM0 ((FLEXCOMM_Type *)FLEXCOMM0_BASE)
- /** Peripheral FLEXCOMM0 base pointer */
- #define FLEXCOMM0_NS ((FLEXCOMM_Type *)FLEXCOMM0_BASE_NS)
- /** Peripheral FLEXCOMM1 base address */
- #define FLEXCOMM1_BASE (0x50087000u)
- /** Peripheral FLEXCOMM1 base address */
- #define FLEXCOMM1_BASE_NS (0x40087000u)
- /** Peripheral FLEXCOMM1 base pointer */
- #define FLEXCOMM1 ((FLEXCOMM_Type *)FLEXCOMM1_BASE)
- /** Peripheral FLEXCOMM1 base pointer */
- #define FLEXCOMM1_NS ((FLEXCOMM_Type *)FLEXCOMM1_BASE_NS)
- /** Peripheral FLEXCOMM2 base address */
- #define FLEXCOMM2_BASE (0x50088000u)
- /** Peripheral FLEXCOMM2 base address */
- #define FLEXCOMM2_BASE_NS (0x40088000u)
- /** Peripheral FLEXCOMM2 base pointer */
- #define FLEXCOMM2 ((FLEXCOMM_Type *)FLEXCOMM2_BASE)
- /** Peripheral FLEXCOMM2 base pointer */
- #define FLEXCOMM2_NS ((FLEXCOMM_Type *)FLEXCOMM2_BASE_NS)
- /** Peripheral FLEXCOMM3 base address */
- #define FLEXCOMM3_BASE (0x50089000u)
- /** Peripheral FLEXCOMM3 base address */
- #define FLEXCOMM3_BASE_NS (0x40089000u)
- /** Peripheral FLEXCOMM3 base pointer */
- #define FLEXCOMM3 ((FLEXCOMM_Type *)FLEXCOMM3_BASE)
- /** Peripheral FLEXCOMM3 base pointer */
- #define FLEXCOMM3_NS ((FLEXCOMM_Type *)FLEXCOMM3_BASE_NS)
- /** Peripheral FLEXCOMM4 base address */
- #define FLEXCOMM4_BASE (0x5008A000u)
- /** Peripheral FLEXCOMM4 base address */
- #define FLEXCOMM4_BASE_NS (0x4008A000u)
- /** Peripheral FLEXCOMM4 base pointer */
- #define FLEXCOMM4 ((FLEXCOMM_Type *)FLEXCOMM4_BASE)
- /** Peripheral FLEXCOMM4 base pointer */
- #define FLEXCOMM4_NS ((FLEXCOMM_Type *)FLEXCOMM4_BASE_NS)
- /** Peripheral FLEXCOMM5 base address */
- #define FLEXCOMM5_BASE (0x50096000u)
- /** Peripheral FLEXCOMM5 base address */
- #define FLEXCOMM5_BASE_NS (0x40096000u)
- /** Peripheral FLEXCOMM5 base pointer */
- #define FLEXCOMM5 ((FLEXCOMM_Type *)FLEXCOMM5_BASE)
- /** Peripheral FLEXCOMM5 base pointer */
- #define FLEXCOMM5_NS ((FLEXCOMM_Type *)FLEXCOMM5_BASE_NS)
- /** Peripheral FLEXCOMM6 base address */
- #define FLEXCOMM6_BASE (0x50097000u)
- /** Peripheral FLEXCOMM6 base address */
- #define FLEXCOMM6_BASE_NS (0x40097000u)
- /** Peripheral FLEXCOMM6 base pointer */
- #define FLEXCOMM6 ((FLEXCOMM_Type *)FLEXCOMM6_BASE)
- /** Peripheral FLEXCOMM6 base pointer */
- #define FLEXCOMM6_NS ((FLEXCOMM_Type *)FLEXCOMM6_BASE_NS)
- /** Peripheral FLEXCOMM7 base address */
- #define FLEXCOMM7_BASE (0x50098000u)
- /** Peripheral FLEXCOMM7 base address */
- #define FLEXCOMM7_BASE_NS (0x40098000u)
- /** Peripheral FLEXCOMM7 base pointer */
- #define FLEXCOMM7 ((FLEXCOMM_Type *)FLEXCOMM7_BASE)
- /** Peripheral FLEXCOMM7 base pointer */
- #define FLEXCOMM7_NS ((FLEXCOMM_Type *)FLEXCOMM7_BASE_NS)
- /** Peripheral FLEXCOMM8 base address */
- #define FLEXCOMM8_BASE (0x5009F000u)
- /** Peripheral FLEXCOMM8 base address */
- #define FLEXCOMM8_BASE_NS (0x4009F000u)
- /** Peripheral FLEXCOMM8 base pointer */
- #define FLEXCOMM8 ((FLEXCOMM_Type *)FLEXCOMM8_BASE)
- /** Peripheral FLEXCOMM8 base pointer */
- #define FLEXCOMM8_NS ((FLEXCOMM_Type *)FLEXCOMM8_BASE_NS)
- /** Array initializer of FLEXCOMM peripheral base addresses */
- #define FLEXCOMM_BASE_ADDRS { FLEXCOMM0_BASE, FLEXCOMM1_BASE, FLEXCOMM2_BASE, FLEXCOMM3_BASE, FLEXCOMM4_BASE, FLEXCOMM5_BASE, FLEXCOMM6_BASE, FLEXCOMM7_BASE, FLEXCOMM8_BASE }
- /** Array initializer of FLEXCOMM peripheral base pointers */
- #define FLEXCOMM_BASE_PTRS { FLEXCOMM0, FLEXCOMM1, FLEXCOMM2, FLEXCOMM3, FLEXCOMM4, FLEXCOMM5, FLEXCOMM6, FLEXCOMM7, FLEXCOMM8 }
- /** Array initializer of FLEXCOMM peripheral base addresses */
- #define FLEXCOMM_BASE_ADDRS_NS { FLEXCOMM0_BASE_NS, FLEXCOMM1_BASE_NS, FLEXCOMM2_BASE_NS, FLEXCOMM3_BASE_NS, FLEXCOMM4_BASE_NS, FLEXCOMM5_BASE_NS, FLEXCOMM6_BASE_NS, FLEXCOMM7_BASE_NS, FLEXCOMM8_BASE_NS }
- /** Array initializer of FLEXCOMM peripheral base pointers */
- #define FLEXCOMM_BASE_PTRS_NS { FLEXCOMM0_NS, FLEXCOMM1_NS, FLEXCOMM2_NS, FLEXCOMM3_NS, FLEXCOMM4_NS, FLEXCOMM5_NS, FLEXCOMM6_NS, FLEXCOMM7_NS, FLEXCOMM8_NS }
-#else
- /** Peripheral FLEXCOMM0 base address */
- #define FLEXCOMM0_BASE (0x40086000u)
- /** Peripheral FLEXCOMM0 base pointer */
- #define FLEXCOMM0 ((FLEXCOMM_Type *)FLEXCOMM0_BASE)
- /** Peripheral FLEXCOMM1 base address */
- #define FLEXCOMM1_BASE (0x40087000u)
- /** Peripheral FLEXCOMM1 base pointer */
- #define FLEXCOMM1 ((FLEXCOMM_Type *)FLEXCOMM1_BASE)
- /** Peripheral FLEXCOMM2 base address */
- #define FLEXCOMM2_BASE (0x40088000u)
- /** Peripheral FLEXCOMM2 base pointer */
- #define FLEXCOMM2 ((FLEXCOMM_Type *)FLEXCOMM2_BASE)
- /** Peripheral FLEXCOMM3 base address */
- #define FLEXCOMM3_BASE (0x40089000u)
- /** Peripheral FLEXCOMM3 base pointer */
- #define FLEXCOMM3 ((FLEXCOMM_Type *)FLEXCOMM3_BASE)
- /** Peripheral FLEXCOMM4 base address */
- #define FLEXCOMM4_BASE (0x4008A000u)
- /** Peripheral FLEXCOMM4 base pointer */
- #define FLEXCOMM4 ((FLEXCOMM_Type *)FLEXCOMM4_BASE)
- /** Peripheral FLEXCOMM5 base address */
- #define FLEXCOMM5_BASE (0x40096000u)
- /** Peripheral FLEXCOMM5 base pointer */
- #define FLEXCOMM5 ((FLEXCOMM_Type *)FLEXCOMM5_BASE)
- /** Peripheral FLEXCOMM6 base address */
- #define FLEXCOMM6_BASE (0x40097000u)
- /** Peripheral FLEXCOMM6 base pointer */
- #define FLEXCOMM6 ((FLEXCOMM_Type *)FLEXCOMM6_BASE)
- /** Peripheral FLEXCOMM7 base address */
- #define FLEXCOMM7_BASE (0x40098000u)
- /** Peripheral FLEXCOMM7 base pointer */
- #define FLEXCOMM7 ((FLEXCOMM_Type *)FLEXCOMM7_BASE)
- /** Peripheral FLEXCOMM8 base address */
- #define FLEXCOMM8_BASE (0x4009F000u)
- /** Peripheral FLEXCOMM8 base pointer */
- #define FLEXCOMM8 ((FLEXCOMM_Type *)FLEXCOMM8_BASE)
- /** Array initializer of FLEXCOMM peripheral base addresses */
- #define FLEXCOMM_BASE_ADDRS { FLEXCOMM0_BASE, FLEXCOMM1_BASE, FLEXCOMM2_BASE, FLEXCOMM3_BASE, FLEXCOMM4_BASE, FLEXCOMM5_BASE, FLEXCOMM6_BASE, FLEXCOMM7_BASE, FLEXCOMM8_BASE }
- /** Array initializer of FLEXCOMM peripheral base pointers */
- #define FLEXCOMM_BASE_PTRS { FLEXCOMM0, FLEXCOMM1, FLEXCOMM2, FLEXCOMM3, FLEXCOMM4, FLEXCOMM5, FLEXCOMM6, FLEXCOMM7, FLEXCOMM8 }
-#endif
-/** Interrupt vectors for the FLEXCOMM peripheral type */
-#define FLEXCOMM_IRQS { FLEXCOMM0_IRQn, FLEXCOMM1_IRQn, FLEXCOMM2_IRQn, FLEXCOMM3_IRQn, FLEXCOMM4_IRQn, FLEXCOMM5_IRQn, FLEXCOMM6_IRQn, FLEXCOMM7_IRQn, FLEXCOMM8_IRQn }
-
-/*!
- * @}
- */ /* end of group FLEXCOMM_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- GINT Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup GINT_Peripheral_Access_Layer GINT Peripheral Access Layer
- * @{
- */
-
-/** GINT - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< GPIO grouped interrupt control register, offset: 0x0 */
- uint8_t RESERVED_0[28];
- __IO uint32_t PORT_POL[2]; /**< GPIO grouped interrupt port 0 polarity register, array offset: 0x20, array step: 0x4 */
- uint8_t RESERVED_1[24];
- __IO uint32_t PORT_ENA[2]; /**< GPIO grouped interrupt port 0 enable register, array offset: 0x40, array step: 0x4 */
-} GINT_Type;
-
-/* ----------------------------------------------------------------------------
- -- GINT Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup GINT_Register_Masks GINT Register Masks
- * @{
- */
-
-/*! @name CTRL - GPIO grouped interrupt control register */
-/*! @{ */
-#define GINT_CTRL_INT_MASK (0x1U)
-#define GINT_CTRL_INT_SHIFT (0U)
-/*! INT - Group interrupt status. This bit is cleared by writing a one to it. Writing zero has no effect.
- * 0b0..No request. No interrupt request is pending.
- * 0b1..Request active. Interrupt request is active.
- */
-#define GINT_CTRL_INT(x) (((uint32_t)(((uint32_t)(x)) << GINT_CTRL_INT_SHIFT)) & GINT_CTRL_INT_MASK)
-#define GINT_CTRL_COMB_MASK (0x2U)
-#define GINT_CTRL_COMB_SHIFT (1U)
-/*! COMB - Combine enabled inputs for group interrupt
- * 0b0..Or. OR functionality: A grouped interrupt is generated when any one of the enabled inputs is active (based on its programmed polarity).
- * 0b1..And. AND functionality: An interrupt is generated when all enabled bits are active (based on their programmed polarity).
- */
-#define GINT_CTRL_COMB(x) (((uint32_t)(((uint32_t)(x)) << GINT_CTRL_COMB_SHIFT)) & GINT_CTRL_COMB_MASK)
-#define GINT_CTRL_TRIG_MASK (0x4U)
-#define GINT_CTRL_TRIG_SHIFT (2U)
-/*! TRIG - Group interrupt trigger
- * 0b0..Edge-triggered.
- * 0b1..Level-triggered.
- */
-#define GINT_CTRL_TRIG(x) (((uint32_t)(((uint32_t)(x)) << GINT_CTRL_TRIG_SHIFT)) & GINT_CTRL_TRIG_MASK)
-/*! @} */
-
-/*! @name PORT_POL - GPIO grouped interrupt port 0 polarity register */
-/*! @{ */
-#define GINT_PORT_POL_POL_MASK (0xFFFFFFFFU)
-#define GINT_PORT_POL_POL_SHIFT (0U)
-/*! POL - Configure pin polarity of port m pins for group interrupt. Bit n corresponds to pin PIOm_n
- * of port m. 0 = the pin is active LOW. If the level on this pin is LOW, the pin contributes to
- * the group interrupt. 1 = the pin is active HIGH. If the level on this pin is HIGH, the pin
- * contributes to the group interrupt.
- */
-#define GINT_PORT_POL_POL(x) (((uint32_t)(((uint32_t)(x)) << GINT_PORT_POL_POL_SHIFT)) & GINT_PORT_POL_POL_MASK)
-/*! @} */
-
-/* The count of GINT_PORT_POL */
-#define GINT_PORT_POL_COUNT (2U)
-
-/*! @name PORT_ENA - GPIO grouped interrupt port 0 enable register */
-/*! @{ */
-#define GINT_PORT_ENA_ENA_MASK (0xFFFFFFFFU)
-#define GINT_PORT_ENA_ENA_SHIFT (0U)
-/*! ENA - Enable port 0 pin for group interrupt. Bit n corresponds to pin Pm_n of port m. 0 = the
- * port 0 pin is disabled and does not contribute to the grouped interrupt. 1 = the port 0 pin is
- * enabled and contributes to the grouped interrupt.
- */
-#define GINT_PORT_ENA_ENA(x) (((uint32_t)(((uint32_t)(x)) << GINT_PORT_ENA_ENA_SHIFT)) & GINT_PORT_ENA_ENA_MASK)
-/*! @} */
-
-/* The count of GINT_PORT_ENA */
-#define GINT_PORT_ENA_COUNT (2U)
-
-
-/*!
- * @}
- */ /* end of group GINT_Register_Masks */
-
-
-/* GINT - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral GINT0 base address */
- #define GINT0_BASE (0x50002000u)
- /** Peripheral GINT0 base address */
- #define GINT0_BASE_NS (0x40002000u)
- /** Peripheral GINT0 base pointer */
- #define GINT0 ((GINT_Type *)GINT0_BASE)
- /** Peripheral GINT0 base pointer */
- #define GINT0_NS ((GINT_Type *)GINT0_BASE_NS)
- /** Peripheral GINT1 base address */
- #define GINT1_BASE (0x50003000u)
- /** Peripheral GINT1 base address */
- #define GINT1_BASE_NS (0x40003000u)
- /** Peripheral GINT1 base pointer */
- #define GINT1 ((GINT_Type *)GINT1_BASE)
- /** Peripheral GINT1 base pointer */
- #define GINT1_NS ((GINT_Type *)GINT1_BASE_NS)
- /** Array initializer of GINT peripheral base addresses */
- #define GINT_BASE_ADDRS { GINT0_BASE, GINT1_BASE }
- /** Array initializer of GINT peripheral base pointers */
- #define GINT_BASE_PTRS { GINT0, GINT1 }
- /** Array initializer of GINT peripheral base addresses */
- #define GINT_BASE_ADDRS_NS { GINT0_BASE_NS, GINT1_BASE_NS }
- /** Array initializer of GINT peripheral base pointers */
- #define GINT_BASE_PTRS_NS { GINT0_NS, GINT1_NS }
-#else
- /** Peripheral GINT0 base address */
- #define GINT0_BASE (0x40002000u)
- /** Peripheral GINT0 base pointer */
- #define GINT0 ((GINT_Type *)GINT0_BASE)
- /** Peripheral GINT1 base address */
- #define GINT1_BASE (0x40003000u)
- /** Peripheral GINT1 base pointer */
- #define GINT1 ((GINT_Type *)GINT1_BASE)
- /** Array initializer of GINT peripheral base addresses */
- #define GINT_BASE_ADDRS { GINT0_BASE, GINT1_BASE }
- /** Array initializer of GINT peripheral base pointers */
- #define GINT_BASE_PTRS { GINT0, GINT1 }
-#endif
-/** Interrupt vectors for the GINT peripheral type */
-#define GINT_IRQS { GINT0_IRQn, GINT1_IRQn }
-
-/*!
- * @}
- */ /* end of group GINT_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- GPIO Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup GPIO_Peripheral_Access_Layer GPIO Peripheral Access Layer
- * @{
- */
-
-/** GPIO - Register Layout Typedef */
-typedef struct {
- __IO uint8_t B[2][32]; /**< Byte pin registers for all port GPIO pins, array offset: 0x0, array step: index*0x20, index2*0x1 */
- uint8_t RESERVED_0[4032];
- __IO uint32_t W[2][32]; /**< Word pin registers for all port GPIO pins, array offset: 0x1000, array step: index*0x80, index2*0x4 */
- uint8_t RESERVED_1[3840];
- __IO uint32_t DIR[2]; /**< Direction registers for all port GPIO pins, array offset: 0x2000, array step: 0x4 */
- uint8_t RESERVED_2[120];
- __IO uint32_t MASK[2]; /**< Mask register for all port GPIO pins, array offset: 0x2080, array step: 0x4 */
- uint8_t RESERVED_3[120];
- __IO uint32_t PIN[2]; /**< Port pin register for all port GPIO pins, array offset: 0x2100, array step: 0x4 */
- uint8_t RESERVED_4[120];
- __IO uint32_t MPIN[2]; /**< Masked port register for all port GPIO pins, array offset: 0x2180, array step: 0x4 */
- uint8_t RESERVED_5[120];
- __IO uint32_t SET[2]; /**< Write: Set register for port. Read: output bits for port, array offset: 0x2200, array step: 0x4 */
- uint8_t RESERVED_6[120];
- __O uint32_t CLR[2]; /**< Clear port for all port GPIO pins, array offset: 0x2280, array step: 0x4 */
- uint8_t RESERVED_7[120];
- __O uint32_t NOT[2]; /**< Toggle port for all port GPIO pins, array offset: 0x2300, array step: 0x4 */
- uint8_t RESERVED_8[120];
- __O uint32_t DIRSET[2]; /**< Set pin direction bits for port, array offset: 0x2380, array step: 0x4 */
- uint8_t RESERVED_9[120];
- __O uint32_t DIRCLR[2]; /**< Clear pin direction bits for port, array offset: 0x2400, array step: 0x4 */
- uint8_t RESERVED_10[120];
- __O uint32_t DIRNOT[2]; /**< Toggle pin direction bits for port, array offset: 0x2480, array step: 0x4 */
-} GPIO_Type;
-
-/* ----------------------------------------------------------------------------
- -- GPIO Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup GPIO_Register_Masks GPIO Register Masks
- * @{
- */
-
-/*! @name B - Byte pin registers for all port GPIO pins */
-/*! @{ */
-#define GPIO_B_PBYTE_MASK (0x1U)
-#define GPIO_B_PBYTE_SHIFT (0U)
-/*! PBYTE - Read: state of the pin PIOm_n, regardless of direction, masking, or alternate function,
- * except that pins configured as analog I/O always read as 0. One register for each port pin.
- * Supported pins depends on the specific device and package. Write: loads the pin's output bit.
- * One register for each port pin. Supported pins depends on the specific device and package.
- */
-#define GPIO_B_PBYTE(x) (((uint8_t)(((uint8_t)(x)) << GPIO_B_PBYTE_SHIFT)) & GPIO_B_PBYTE_MASK)
-/*! @} */
-
-/* The count of GPIO_B */
-#define GPIO_B_COUNT (2U)
-
-/* The count of GPIO_B */
-#define GPIO_B_COUNT2 (32U)
-
-/*! @name W - Word pin registers for all port GPIO pins */
-/*! @{ */
-#define GPIO_W_PWORD_MASK (0xFFFFFFFFU)
-#define GPIO_W_PWORD_SHIFT (0U)
-/*! PWORD - Read 0: pin PIOm_n is LOW. Write 0: clear output bit. Read 0xFFFF FFFF: pin PIOm_n is
- * HIGH. Write any value 0x0000 0001 to 0xFFFF FFFF: set output bit. Only 0 or 0xFFFF FFFF can be
- * read. Writing any value other than 0 will set the output bit. One register for each port pin.
- * Supported pins depends on the specific device and package.
- */
-#define GPIO_W_PWORD(x) (((uint32_t)(((uint32_t)(x)) << GPIO_W_PWORD_SHIFT)) & GPIO_W_PWORD_MASK)
-/*! @} */
-
-/* The count of GPIO_W */
-#define GPIO_W_COUNT (2U)
-
-/* The count of GPIO_W */
-#define GPIO_W_COUNT2 (32U)
-
-/*! @name DIR - Direction registers for all port GPIO pins */
-/*! @{ */
-#define GPIO_DIR_DIRP_MASK (0xFFFFFFFFU)
-#define GPIO_DIR_DIRP_SHIFT (0U)
-/*! DIRP - Selects pin direction for pin PIOm_n (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported
- * pins depends on the specific device and package. 0 = input. 1 = output.
- */
-#define GPIO_DIR_DIRP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_DIR_DIRP_SHIFT)) & GPIO_DIR_DIRP_MASK)
-/*! @} */
-
-/* The count of GPIO_DIR */
-#define GPIO_DIR_COUNT (2U)
-
-/*! @name MASK - Mask register for all port GPIO pins */
-/*! @{ */
-#define GPIO_MASK_MASKP_MASK (0xFFFFFFFFU)
-#define GPIO_MASK_MASKP_SHIFT (0U)
-/*! MASKP - Controls which bits corresponding to PIOm_n are active in the MPORT register (bit 0 =
- * PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on the specific device and package.0 =
- * Read MPORT: pin state; write MPORT: load output bit. 1 = Read MPORT: 0; write MPORT: output bit
- * not affected.
- */
-#define GPIO_MASK_MASKP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_MASK_MASKP_SHIFT)) & GPIO_MASK_MASKP_MASK)
-/*! @} */
-
-/* The count of GPIO_MASK */
-#define GPIO_MASK_COUNT (2U)
-
-/*! @name PIN - Port pin register for all port GPIO pins */
-/*! @{ */
-#define GPIO_PIN_PORT_MASK (0xFFFFFFFFU)
-#define GPIO_PIN_PORT_SHIFT (0U)
-/*! PORT - Reads pin states or loads output bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported
- * pins depends on the specific device and package. 0 = Read: pin is low; write: clear output bit.
- * 1 = Read: pin is high; write: set output bit.
- */
-#define GPIO_PIN_PORT(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PIN_PORT_SHIFT)) & GPIO_PIN_PORT_MASK)
-/*! @} */
-
-/* The count of GPIO_PIN */
-#define GPIO_PIN_COUNT (2U)
-
-/*! @name MPIN - Masked port register for all port GPIO pins */
-/*! @{ */
-#define GPIO_MPIN_MPORTP_MASK (0xFFFFFFFFU)
-#define GPIO_MPIN_MPORTP_SHIFT (0U)
-/*! MPORTP - Masked port register (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on
- * the specific device and package. 0 = Read: pin is LOW and/or the corresponding bit in the MASK
- * register is 1; write: clear output bit if the corresponding bit in the MASK register is 0. 1
- * = Read: pin is HIGH and the corresponding bit in the MASK register is 0; write: set output bit
- * if the corresponding bit in the MASK register is 0.
- */
-#define GPIO_MPIN_MPORTP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_MPIN_MPORTP_SHIFT)) & GPIO_MPIN_MPORTP_MASK)
-/*! @} */
-
-/* The count of GPIO_MPIN */
-#define GPIO_MPIN_COUNT (2U)
-
-/*! @name SET - Write: Set register for port. Read: output bits for port */
-/*! @{ */
-#define GPIO_SET_SETP_MASK (0xFFFFFFFFU)
-#define GPIO_SET_SETP_SHIFT (0U)
-/*! SETP - Read or set output bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on
- * the specific device and package. 0 = Read: output bit: write: no operation. 1 = Read: output
- * bit; write: set output bit.
- */
-#define GPIO_SET_SETP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_SET_SETP_SHIFT)) & GPIO_SET_SETP_MASK)
-/*! @} */
-
-/* The count of GPIO_SET */
-#define GPIO_SET_COUNT (2U)
-
-/*! @name CLR - Clear port for all port GPIO pins */
-/*! @{ */
-#define GPIO_CLR_CLRP_MASK (0xFFFFFFFFU)
-#define GPIO_CLR_CLRP_SHIFT (0U)
-/*! CLRP - Clear output bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on the
- * specific device and package. 0 = No operation. 1 = Clear output bit.
- */
-#define GPIO_CLR_CLRP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_CLR_CLRP_SHIFT)) & GPIO_CLR_CLRP_MASK)
-/*! @} */
-
-/* The count of GPIO_CLR */
-#define GPIO_CLR_COUNT (2U)
-
-/*! @name NOT - Toggle port for all port GPIO pins */
-/*! @{ */
-#define GPIO_NOT_NOTP_MASK (0xFFFFFFFFU)
-#define GPIO_NOT_NOTP_SHIFT (0U)
-/*! NOTP - Toggle output bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on the
- * specific device and package. 0 = no operation. 1 = Toggle output bit.
- */
-#define GPIO_NOT_NOTP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_NOT_NOTP_SHIFT)) & GPIO_NOT_NOTP_MASK)
-/*! @} */
-
-/* The count of GPIO_NOT */
-#define GPIO_NOT_COUNT (2U)
-
-/*! @name DIRSET - Set pin direction bits for port */
-/*! @{ */
-#define GPIO_DIRSET_DIRSETP_MASK (0xFFFFFFFFU)
-#define GPIO_DIRSET_DIRSETP_SHIFT (0U)
-/*! DIRSETP - Set direction bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on
- * the specific device and package. 0 = No operation. 1 = Set direction bit.
- */
-#define GPIO_DIRSET_DIRSETP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_DIRSET_DIRSETP_SHIFT)) & GPIO_DIRSET_DIRSETP_MASK)
-/*! @} */
-
-/* The count of GPIO_DIRSET */
-#define GPIO_DIRSET_COUNT (2U)
-
-/*! @name DIRCLR - Clear pin direction bits for port */
-/*! @{ */
-#define GPIO_DIRCLR_DIRCLRP_MASK (0xFFFFFFFFU)
-#define GPIO_DIRCLR_DIRCLRP_SHIFT (0U)
-/*! DIRCLRP - Clear direction bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends on
- * the specific device and package. 0 = No operation. 1 = Clear direction bit.
- */
-#define GPIO_DIRCLR_DIRCLRP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_DIRCLR_DIRCLRP_SHIFT)) & GPIO_DIRCLR_DIRCLRP_MASK)
-/*! @} */
-
-/* The count of GPIO_DIRCLR */
-#define GPIO_DIRCLR_COUNT (2U)
-
-/*! @name DIRNOT - Toggle pin direction bits for port */
-/*! @{ */
-#define GPIO_DIRNOT_DIRNOTP_MASK (0xFFFFFFFFU)
-#define GPIO_DIRNOT_DIRNOTP_SHIFT (0U)
-/*! DIRNOTP - Toggle direction bits (bit 0 = PIOn_0, bit 1 = PIOn_1, etc.). Supported pins depends
- * on the specific device and package. 0 = no operation. 1 = Toggle direction bit.
- */
-#define GPIO_DIRNOT_DIRNOTP(x) (((uint32_t)(((uint32_t)(x)) << GPIO_DIRNOT_DIRNOTP_SHIFT)) & GPIO_DIRNOT_DIRNOTP_MASK)
-/*! @} */
-
-/* The count of GPIO_DIRNOT */
-#define GPIO_DIRNOT_COUNT (2U)
-
-
-/*!
- * @}
- */ /* end of group GPIO_Register_Masks */
-
-
-/* GPIO - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral GPIO base address */
- #define GPIO_BASE (0x5008C000u)
- /** Peripheral GPIO base address */
- #define GPIO_BASE_NS (0x4008C000u)
- /** Peripheral GPIO base pointer */
- #define GPIO ((GPIO_Type *)GPIO_BASE)
- /** Peripheral GPIO base pointer */
- #define GPIO_NS ((GPIO_Type *)GPIO_BASE_NS)
- /** Peripheral SECGPIO base address */
- #define SECGPIO_BASE (0x500A8000u)
- /** Peripheral SECGPIO base address */
- #define SECGPIO_BASE_NS (0x400A8000u)
- /** Peripheral SECGPIO base pointer */
- #define SECGPIO ((GPIO_Type *)SECGPIO_BASE)
- /** Peripheral SECGPIO base pointer */
- #define SECGPIO_NS ((GPIO_Type *)SECGPIO_BASE_NS)
- /** Array initializer of GPIO peripheral base addresses */
- #define GPIO_BASE_ADDRS { GPIO_BASE, SECGPIO_BASE }
- /** Array initializer of GPIO peripheral base pointers */
- #define GPIO_BASE_PTRS { GPIO, SECGPIO }
- /** Array initializer of GPIO peripheral base addresses */
- #define GPIO_BASE_ADDRS_NS { GPIO_BASE_NS, SECGPIO_BASE_NS }
- /** Array initializer of GPIO peripheral base pointers */
- #define GPIO_BASE_PTRS_NS { GPIO_NS, SECGPIO_NS }
-#else
- /** Peripheral GPIO base address */
- #define GPIO_BASE (0x4008C000u)
- /** Peripheral GPIO base pointer */
- #define GPIO ((GPIO_Type *)GPIO_BASE)
- /** Peripheral SECGPIO base address */
- #define SECGPIO_BASE (0x400A8000u)
- /** Peripheral SECGPIO base pointer */
- #define SECGPIO ((GPIO_Type *)SECGPIO_BASE)
- /** Array initializer of GPIO peripheral base addresses */
- #define GPIO_BASE_ADDRS { GPIO_BASE, SECGPIO_BASE }
- /** Array initializer of GPIO peripheral base pointers */
- #define GPIO_BASE_PTRS { GPIO, SECGPIO }
-#endif
-
-/*!
- * @}
- */ /* end of group GPIO_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- HASHCRYPT Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup HASHCRYPT_Peripheral_Access_Layer HASHCRYPT Peripheral Access Layer
- * @{
- */
-
-/** HASHCRYPT - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< Control register to enable and operate Hash and Crypto, offset: 0x0 */
- __IO uint32_t STATUS; /**< Indicates status of Hash peripheral., offset: 0x4 */
- __IO uint32_t INTENSET; /**< Write 1 to enable interrupts; reads back with which are set., offset: 0x8 */
- __IO uint32_t INTENCLR; /**< Write 1 to clear interrupts., offset: 0xC */
- __IO uint32_t MEMCTRL; /**< Setup Master to access memory (if available), offset: 0x10 */
- __IO uint32_t MEMADDR; /**< Address to start memory access from (if available)., offset: 0x14 */
- uint8_t RESERVED_0[8];
- __O uint32_t INDATA; /**< Input of 16 words at a time to load up buffer., offset: 0x20 */
- __O uint32_t ALIAS[7]; /**< , array offset: 0x24, array step: 0x4 */
- __I uint32_t DIGEST0[8]; /**< , array offset: 0x40, array step: 0x4 */
- uint8_t RESERVED_1[32];
- __IO uint32_t CRYPTCFG; /**< Crypto settings for AES and Salsa and ChaCha, offset: 0x80 */
- __I uint32_t CONFIG; /**< Returns the configuration of this block in this chip - indicates what services are available., offset: 0x84 */
- uint8_t RESERVED_2[4];
- __IO uint32_t LOCK; /**< Lock register allows locking to the current security level or unlocking by the lock holding level., offset: 0x8C */
- __O uint32_t MASK[4]; /**< , array offset: 0x90, array step: 0x4 */
-} HASHCRYPT_Type;
-
-/* ----------------------------------------------------------------------------
- -- HASHCRYPT Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup HASHCRYPT_Register_Masks HASHCRYPT Register Masks
- * @{
- */
-
-/*! @name CTRL - Control register to enable and operate Hash and Crypto */
-/*! @{ */
-#define HASHCRYPT_CTRL_MODE_MASK (0x7U)
-#define HASHCRYPT_CTRL_MODE_SHIFT (0U)
-/*! Mode - The operational mode to use, or 0 if none. Note that the CONFIG register will indicate if
- * specific modes beyond SHA1 and SHA2-256 are available.
- * 0b000..Disabled
- * 0b001..SHA1 is enabled
- * 0b010..SHA2-256 is enabled
- * 0b100..AES if available (see also CRYPTCFG register for more controls)
- * 0b101..ICB-AES if available (see also CRYPTCFG register for more controls)
- */
-#define HASHCRYPT_CTRL_MODE(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CTRL_MODE_SHIFT)) & HASHCRYPT_CTRL_MODE_MASK)
-#define HASHCRYPT_CTRL_NEW_HASH_MASK (0x10U)
-#define HASHCRYPT_CTRL_NEW_HASH_SHIFT (4U)
-/*! New_Hash - Written with 1 when starting a new Hash/Crypto. It self clears. Note that the WAITING
- * Status bit will clear for a cycle during the initialization from New=1.
- * 0b1..Starts a new Hash/Crypto and initializes the Digest/Result.
- */
-#define HASHCRYPT_CTRL_NEW_HASH(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CTRL_NEW_HASH_SHIFT)) & HASHCRYPT_CTRL_NEW_HASH_MASK)
-#define HASHCRYPT_CTRL_DMA_I_MASK (0x100U)
-#define HASHCRYPT_CTRL_DMA_I_SHIFT (8U)
-/*! DMA_I - Written with 1 to use DMA to fill INDATA. If Hash, will request from DMA for 16 words
- * and then will process the Hash. If Cryptographic, it will load as many words as needed,
- * including key if not already loaded. It will then request again. Normal model is that the DMA
- * interrupts the processor when its length expires. Note that if the processor will write the key and
- * optionally IV, it should not enable this until it has done so. Otherwise, the DMA will be
- * expected to load those for the 1st block (when needed).
- * 0b0..DMA is not used. Processor writes the necessary words when WAITING is set (interrupts), unless AHB Master is used.
- * 0b1..DMA will push in the data.
- */
-#define HASHCRYPT_CTRL_DMA_I(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CTRL_DMA_I_SHIFT)) & HASHCRYPT_CTRL_DMA_I_MASK)
-#define HASHCRYPT_CTRL_DMA_O_MASK (0x200U)
-#define HASHCRYPT_CTRL_DMA_O_SHIFT (9U)
-/*! DMA_O - Written to 1 to use DMA to drain the digest/output. If both DMA_I and DMA_O are set, the
- * DMA has to know to switch direction and the locations. This can be used for crypto uses.
- * 0b0..DMA is not used. Processor reads the digest/output in response to DIGEST interrupt.
- */
-#define HASHCRYPT_CTRL_DMA_O(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CTRL_DMA_O_SHIFT)) & HASHCRYPT_CTRL_DMA_O_MASK)
-#define HASHCRYPT_CTRL_HASHSWPB_MASK (0x1000U)
-#define HASHCRYPT_CTRL_HASHSWPB_SHIFT (12U)
-/*! HASHSWPB - If 1, will swap bytes in the word for SHA hashing. The default is byte order (so LSB
- * is 1st byte) but this allows swapping to MSB is 1st such as is shown in SHS spec. For
- * cryptographic swapping, see the CRYPTCFG register.
- */
-#define HASHCRYPT_CTRL_HASHSWPB(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CTRL_HASHSWPB_SHIFT)) & HASHCRYPT_CTRL_HASHSWPB_MASK)
-/*! @} */
-
-/*! @name STATUS - Indicates status of Hash peripheral. */
-/*! @{ */
-#define HASHCRYPT_STATUS_WAITING_MASK (0x1U)
-#define HASHCRYPT_STATUS_WAITING_SHIFT (0U)
-/*! WAITING - If 1, the block is waiting for more data to process.
- * 0b0..Not waiting for data - may be disabled or may be busy. Note that for cryptographic uses, this is not set
- * if IsLast is set nor will it set until at least 1 word is read of the output.
- * 0b1..Waiting for data to be written in (16 words)
- */
-#define HASHCRYPT_STATUS_WAITING(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_STATUS_WAITING_SHIFT)) & HASHCRYPT_STATUS_WAITING_MASK)
-#define HASHCRYPT_STATUS_DIGEST_MASK (0x2U)
-#define HASHCRYPT_STATUS_DIGEST_SHIFT (1U)
-/*! DIGEST - For Hash, if 1 then a DIGEST is ready and waiting and there is no active next block
- * already started. For Cryptographic uses, this will be set for each block processed, indicating
- * OUTDATA (and OUTDATA2 if larger output) contains the next value to read out. This is cleared
- * when any data is written, when New is written, for Cryptographic uses when the last word is read
- * out, or when the block is disabled.
- * 0b0..No Digest is ready
- * 0b1..Digest is ready. Application may read it or may write more data
- */
-#define HASHCRYPT_STATUS_DIGEST(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_STATUS_DIGEST_SHIFT)) & HASHCRYPT_STATUS_DIGEST_MASK)
-#define HASHCRYPT_STATUS_ERROR_MASK (0x4U)
-#define HASHCRYPT_STATUS_ERROR_SHIFT (2U)
-/*! ERROR - If 1, an error occurred. For normal uses, this is due to an attempted overrun: INDATA
- * was written when it was not appropriate. For Master cases, this is an AHB bus error; the COUNT
- * field will indicate which block it was on.
- * 0b0..No error.
- * 0b1..An error occurred since last cleared (written 1 to clear).
- */
-#define HASHCRYPT_STATUS_ERROR(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_STATUS_ERROR_SHIFT)) & HASHCRYPT_STATUS_ERROR_MASK)
-#define HASHCRYPT_STATUS_NEEDKEY_MASK (0x10U)
-#define HASHCRYPT_STATUS_NEEDKEY_SHIFT (4U)
-/*! NEEDKEY - Indicates the block wants the key to be written in (set along with WAITING)
- * 0b0..No Key is needed and writes will not be treated as Key
- * 0b1..Key is needed and INDATA/ALIAS will be accepted as Key. Will also set WAITING.
- */
-#define HASHCRYPT_STATUS_NEEDKEY(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_STATUS_NEEDKEY_SHIFT)) & HASHCRYPT_STATUS_NEEDKEY_MASK)
-#define HASHCRYPT_STATUS_NEEDIV_MASK (0x20U)
-#define HASHCRYPT_STATUS_NEEDIV_SHIFT (5U)
-/*! NEEDIV - Indicates the block wants an IV/NONE to be written in (set along with WAITING)
- * 0b0..No IV/Nonce is needed, either because written already or because not needed.
- * 0b1..IV/Nonce is needed and INDATA/ALIAS will be accepted as IV/Nonce. Will also set WAITING.
- */
-#define HASHCRYPT_STATUS_NEEDIV(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_STATUS_NEEDIV_SHIFT)) & HASHCRYPT_STATUS_NEEDIV_MASK)
-#define HASHCRYPT_STATUS_ICBIDX_MASK (0x3F0000U)
-#define HASHCRYPT_STATUS_ICBIDX_SHIFT (16U)
-/*! ICBIDX - If ICB-AES is selected, then reads as the ICB index count based on ICBSTRM (from
- * CRYPTCFG). That is, if 3 bits of ICBSTRM, then this will count from 0 to 7 and then back to 0. On 0,
- * it has to compute the full ICB, quicker when not 0.
- */
-#define HASHCRYPT_STATUS_ICBIDX(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_STATUS_ICBIDX_SHIFT)) & HASHCRYPT_STATUS_ICBIDX_MASK)
-/*! @} */
-
-/*! @name INTENSET - Write 1 to enable interrupts; reads back with which are set. */
-/*! @{ */
-#define HASHCRYPT_INTENSET_WAITING_MASK (0x1U)
-#define HASHCRYPT_INTENSET_WAITING_SHIFT (0U)
-/*! WAITING - Indicates if should interrupt when waiting for data input.
- * 0b0..Will not interrupt when waiting.
- * 0b1..Will interrupt when waiting
- */
-#define HASHCRYPT_INTENSET_WAITING(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INTENSET_WAITING_SHIFT)) & HASHCRYPT_INTENSET_WAITING_MASK)
-#define HASHCRYPT_INTENSET_DIGEST_MASK (0x2U)
-#define HASHCRYPT_INTENSET_DIGEST_SHIFT (1U)
-/*! DIGEST - Indicates if should interrupt when Digest (or Outdata) is ready (completed a hash/crypto or completed a full sequence).
- * 0b0..Will not interrupt when Digest is ready
- * 0b1..Will interrupt when Digest is ready. Interrupt cleared by writing more data, starting a new Hash, or disabling (done).
- */
-#define HASHCRYPT_INTENSET_DIGEST(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INTENSET_DIGEST_SHIFT)) & HASHCRYPT_INTENSET_DIGEST_MASK)
-#define HASHCRYPT_INTENSET_ERROR_MASK (0x4U)
-#define HASHCRYPT_INTENSET_ERROR_SHIFT (2U)
-/*! ERROR - Indicates if should interrupt on an ERROR (as defined in Status)
- * 0b0..Will not interrupt on Error.
- * 0b1..Will interrupt on Error (until cleared).
- */
-#define HASHCRYPT_INTENSET_ERROR(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INTENSET_ERROR_SHIFT)) & HASHCRYPT_INTENSET_ERROR_MASK)
-/*! @} */
-
-/*! @name INTENCLR - Write 1 to clear interrupts. */
-/*! @{ */
-#define HASHCRYPT_INTENCLR_WAITING_MASK (0x1U)
-#define HASHCRYPT_INTENCLR_WAITING_SHIFT (0U)
-/*! WAITING - Write 1 to clear mask.
- */
-#define HASHCRYPT_INTENCLR_WAITING(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INTENCLR_WAITING_SHIFT)) & HASHCRYPT_INTENCLR_WAITING_MASK)
-#define HASHCRYPT_INTENCLR_DIGEST_MASK (0x2U)
-#define HASHCRYPT_INTENCLR_DIGEST_SHIFT (1U)
-/*! DIGEST - Write 1 to clear mask.
- */
-#define HASHCRYPT_INTENCLR_DIGEST(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INTENCLR_DIGEST_SHIFT)) & HASHCRYPT_INTENCLR_DIGEST_MASK)
-#define HASHCRYPT_INTENCLR_ERROR_MASK (0x4U)
-#define HASHCRYPT_INTENCLR_ERROR_SHIFT (2U)
-/*! ERROR - Write 1 to clear mask.
- */
-#define HASHCRYPT_INTENCLR_ERROR(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INTENCLR_ERROR_SHIFT)) & HASHCRYPT_INTENCLR_ERROR_MASK)
-/*! @} */
-
-/*! @name MEMCTRL - Setup Master to access memory (if available) */
-/*! @{ */
-#define HASHCRYPT_MEMCTRL_MASTER_MASK (0x1U)
-#define HASHCRYPT_MEMCTRL_MASTER_SHIFT (0U)
-/*! MASTER - Enables mastering.
- * 0b0..Mastering is not used and the normal DMA or Interrupt based model is used with INDATA.
- * 0b1..Mastering is enabled and DMA and INDATA should not be used.
- */
-#define HASHCRYPT_MEMCTRL_MASTER(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_MEMCTRL_MASTER_SHIFT)) & HASHCRYPT_MEMCTRL_MASTER_MASK)
-#define HASHCRYPT_MEMCTRL_COUNT_MASK (0x7FF0000U)
-#define HASHCRYPT_MEMCTRL_COUNT_SHIFT (16U)
-/*! COUNT - Number of 512-bit (128-bit if AES, except 1st block which may include key and IV) blocks
- * to copy starting at MEMADDR. This register will decrement after each block is copied, ending
- * in 0. For Hash, the DIGEST interrupt will occur when it reaches 0. Fro AES, the DIGEST/OUTDATA
- * interrupt will occur on ever block. If a bus error occurs, it will stop with this field set
- * to the block that failed. 0:Done - nothing to process. 1 to 2K: Number of 512-bit (or 128bit)
- * blocks to hash.
- */
-#define HASHCRYPT_MEMCTRL_COUNT(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_MEMCTRL_COUNT_SHIFT)) & HASHCRYPT_MEMCTRL_COUNT_MASK)
-/*! @} */
-
-/*! @name MEMADDR - Address to start memory access from (if available). */
-/*! @{ */
-#define HASHCRYPT_MEMADDR_BASE_MASK (0xFFFFFFFFU)
-#define HASHCRYPT_MEMADDR_BASE_SHIFT (0U)
-/*! BASE - Address base to start copying from, word aligned (so bits 1:0 must be 0). This field will
- * advance as it processes the words. If it fails with a bus error, the register will contain
- * the failing word. N:Address in Flash or RAM space; RAM only as mapped in this part. May also be
- * able to address SPIFI.
- */
-#define HASHCRYPT_MEMADDR_BASE(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_MEMADDR_BASE_SHIFT)) & HASHCRYPT_MEMADDR_BASE_MASK)
-/*! @} */
-
-/*! @name INDATA - Input of 16 words at a time to load up buffer. */
-/*! @{ */
-#define HASHCRYPT_INDATA_DATA_MASK (0xFFFFFFFFU)
-#define HASHCRYPT_INDATA_DATA_SHIFT (0U)
-/*! DATA - Write next word in little-endian form. The hash requires big endian word data, but this
- * block swaps the bytes automatically. That is, SHA assumes the data coming in is treated as
- * bytes (e.g. "abcd") and since the ARM core will treat "abcd" as a word as 0x64636261, the block
- * will swap the word to restore into big endian.
- */
-#define HASHCRYPT_INDATA_DATA(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_INDATA_DATA_SHIFT)) & HASHCRYPT_INDATA_DATA_MASK)
-/*! @} */
-
-/*! @name ALIAS - */
-/*! @{ */
-#define HASHCRYPT_ALIAS_DATA_MASK (0xFFFFFFFFU)
-#define HASHCRYPT_ALIAS_DATA_SHIFT (0U)
-/*! DATA - Write next word in little-endian form. The hash requires big endian word data, but this
- * block swaps the bytes automatically. That is, SHA assumes the data coming in is treated as
- * bytes (e.g. "abcd") and since the ARM core will treat "abcd" as a word as 0x64636261, the block
- * will swap the word to restore into big endian.
- */
-#define HASHCRYPT_ALIAS_DATA(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_ALIAS_DATA_SHIFT)) & HASHCRYPT_ALIAS_DATA_MASK)
-/*! @} */
-
-/* The count of HASHCRYPT_ALIAS */
-#define HASHCRYPT_ALIAS_COUNT (7U)
-
-/*! @name DIGEST0 - */
-/*! @{ */
-#define HASHCRYPT_DIGEST0_DIGEST_MASK (0xFFFFFFFFU)
-#define HASHCRYPT_DIGEST0_DIGEST_SHIFT (0U)
-/*! DIGEST - One word of the Digest or output. Note that only 1st 4 are populated for AES and 1st 5 are populated for SHA1.
- */
-#define HASHCRYPT_DIGEST0_DIGEST(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_DIGEST0_DIGEST_SHIFT)) & HASHCRYPT_DIGEST0_DIGEST_MASK)
-/*! @} */
-
-/* The count of HASHCRYPT_DIGEST0 */
-#define HASHCRYPT_DIGEST0_COUNT (8U)
-
-/*! @name CRYPTCFG - Crypto settings for AES and Salsa and ChaCha */
-/*! @{ */
-#define HASHCRYPT_CRYPTCFG_MSW1ST_OUT_MASK (0x1U)
-#define HASHCRYPT_CRYPTCFG_MSW1ST_OUT_SHIFT (0U)
-/*! MSW1ST_OUT - If 1, OUTDATA0 will be read Most significant word 1st for AES. Else it will be read
- * in normal little endian - Least significant word 1st. Note: only if allowed by configuration.
- */
-#define HASHCRYPT_CRYPTCFG_MSW1ST_OUT(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_MSW1ST_OUT_SHIFT)) & HASHCRYPT_CRYPTCFG_MSW1ST_OUT_MASK)
-#define HASHCRYPT_CRYPTCFG_SWAPKEY_MASK (0x2U)
-#define HASHCRYPT_CRYPTCFG_SWAPKEY_SHIFT (1U)
-/*! SWAPKEY - If 1, will Swap the key input (bytes in each word).
- */
-#define HASHCRYPT_CRYPTCFG_SWAPKEY(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_SWAPKEY_SHIFT)) & HASHCRYPT_CRYPTCFG_SWAPKEY_MASK)
-#define HASHCRYPT_CRYPTCFG_SWAPDAT_MASK (0x4U)
-#define HASHCRYPT_CRYPTCFG_SWAPDAT_SHIFT (2U)
-/*! SWAPDAT - If 1, will SWAP the data and IV inputs (bytes in each word).
- */
-#define HASHCRYPT_CRYPTCFG_SWAPDAT(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_SWAPDAT_SHIFT)) & HASHCRYPT_CRYPTCFG_SWAPDAT_MASK)
-#define HASHCRYPT_CRYPTCFG_MSW1ST_MASK (0x8U)
-#define HASHCRYPT_CRYPTCFG_MSW1ST_SHIFT (3U)
-/*! MSW1ST - If 1, load of key, IV, and data is MSW 1st for AES. Else, the words are little endian.
- * Note: only if allowed by configuration.
- */
-#define HASHCRYPT_CRYPTCFG_MSW1ST(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_MSW1ST_SHIFT)) & HASHCRYPT_CRYPTCFG_MSW1ST_MASK)
-#define HASHCRYPT_CRYPTCFG_AESMODE_MASK (0x30U)
-#define HASHCRYPT_CRYPTCFG_AESMODE_SHIFT (4U)
-/*! AESMODE - AES Cipher mode to use if plain AES
- * 0b00..ECB - used as is
- * 0b01..CBC mode (see details on IV/nonce)
- * 0b10..CTR mode (see details on IV/nonce). See also AESCTRPOS.
- * 0b11..reserved
- */
-#define HASHCRYPT_CRYPTCFG_AESMODE(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_AESMODE_SHIFT)) & HASHCRYPT_CRYPTCFG_AESMODE_MASK)
-#define HASHCRYPT_CRYPTCFG_AESDECRYPT_MASK (0x40U)
-#define HASHCRYPT_CRYPTCFG_AESDECRYPT_SHIFT (6U)
-/*! AESDECRYPT - AES ECB direction. Only encryption used if CTR mode or manual modes such as CFB
- * 0b0..Encrypt
- * 0b1..Decrypt
- */
-#define HASHCRYPT_CRYPTCFG_AESDECRYPT(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_AESDECRYPT_SHIFT)) & HASHCRYPT_CRYPTCFG_AESDECRYPT_MASK)
-#define HASHCRYPT_CRYPTCFG_AESSECRET_MASK (0x80U)
-#define HASHCRYPT_CRYPTCFG_AESSECRET_SHIFT (7U)
-/*! AESSECRET - Selects the Hidden Secret key vs. User key, if provided. If security levels are
- * used, only the highest level is permitted to select this.
- * 0b0..User key provided in normal way
- * 0b1..Secret key provided in hidden way by HW
- */
-#define HASHCRYPT_CRYPTCFG_AESSECRET(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_AESSECRET_SHIFT)) & HASHCRYPT_CRYPTCFG_AESSECRET_MASK)
-#define HASHCRYPT_CRYPTCFG_AESKEYSZ_MASK (0x300U)
-#define HASHCRYPT_CRYPTCFG_AESKEYSZ_SHIFT (8U)
-/*! AESKEYSZ - Sets the AES key size
- * 0b00..128 bit key
- * 0b01..192 bit key
- * 0b10..256 bit key
- * 0b11..reserved
- */
-#define HASHCRYPT_CRYPTCFG_AESKEYSZ(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_AESKEYSZ_SHIFT)) & HASHCRYPT_CRYPTCFG_AESKEYSZ_MASK)
-#define HASHCRYPT_CRYPTCFG_AESCTRPOS_MASK (0x1C00U)
-#define HASHCRYPT_CRYPTCFG_AESCTRPOS_SHIFT (10U)
-/*! AESCTRPOS - Halfword position of 16b counter in IV if AESMODE is CTR (position is fixed for
- * Salsa and ChaCha). Only supports 16b counter, so application must control any additional bytes if
- * using more. The 16-bit counter is read from the IV and incremented by 1 each time. Any other
- * use CTR should use ECB directly and do its own XOR and so on.
- */
-#define HASHCRYPT_CRYPTCFG_AESCTRPOS(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_AESCTRPOS_SHIFT)) & HASHCRYPT_CRYPTCFG_AESCTRPOS_MASK)
-#define HASHCRYPT_CRYPTCFG_STREAMLAST_MASK (0x10000U)
-#define HASHCRYPT_CRYPTCFG_STREAMLAST_SHIFT (16U)
-/*! STREAMLAST - Is 1 if last stream block. If not 1, then the engine will compute the next "hash".
- */
-#define HASHCRYPT_CRYPTCFG_STREAMLAST(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_STREAMLAST_SHIFT)) & HASHCRYPT_CRYPTCFG_STREAMLAST_MASK)
-#define HASHCRYPT_CRYPTCFG_ICBSZ_MASK (0x300000U)
-#define HASHCRYPT_CRYPTCFG_ICBSZ_SHIFT (20U)
-/*! ICBSZ - This sets the ICB size between 32 and 128 bits, using the following rules. Note that the
- * counter is assumed to occupy the low order bits of the IV.
- * 0b00..32 bits of the IV/ctr are used (from 127:96)
- * 0b01..64 bits of the IV/ctr are used (from 127:64)
- * 0b10..96 bits of the IV/ctr are used (from 127:32)
- * 0b11..All 128 bits of the IV/ctr are used
- */
-#define HASHCRYPT_CRYPTCFG_ICBSZ(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_ICBSZ_SHIFT)) & HASHCRYPT_CRYPTCFG_ICBSZ_MASK)
-#define HASHCRYPT_CRYPTCFG_ICBSTRM_MASK (0xC00000U)
-#define HASHCRYPT_CRYPTCFG_ICBSTRM_SHIFT (22U)
-/*! ICBSTRM - The size of the ICB-AES stream that can be pushed before needing to compute a new
- * IV/ctr (counter start). This optimizes the performance of the stream of blocks after the 1st.
- * 0b00..8 blocks
- * 0b01..16 blocks
- * 0b10..32 blocks
- * 0b11..64 blocks
- */
-#define HASHCRYPT_CRYPTCFG_ICBSTRM(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CRYPTCFG_ICBSTRM_SHIFT)) & HASHCRYPT_CRYPTCFG_ICBSTRM_MASK)
-/*! @} */
-
-/*! @name CONFIG - Returns the configuration of this block in this chip - indicates what services are available. */
-/*! @{ */
-#define HASHCRYPT_CONFIG_DUAL_MASK (0x1U)
-#define HASHCRYPT_CONFIG_DUAL_SHIFT (0U)
-/*! DUAL - 1 if 2 x 512 bit buffers, 0 if only 1 x 512 bit
- */
-#define HASHCRYPT_CONFIG_DUAL(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_DUAL_SHIFT)) & HASHCRYPT_CONFIG_DUAL_MASK)
-#define HASHCRYPT_CONFIG_DMA_MASK (0x2U)
-#define HASHCRYPT_CONFIG_DMA_SHIFT (1U)
-/*! DMA - 1 if DMA is connected
- */
-#define HASHCRYPT_CONFIG_DMA(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_DMA_SHIFT)) & HASHCRYPT_CONFIG_DMA_MASK)
-#define HASHCRYPT_CONFIG_AHB_MASK (0x8U)
-#define HASHCRYPT_CONFIG_AHB_SHIFT (3U)
-/*! AHB - 1 if AHB Master is enabled
- */
-#define HASHCRYPT_CONFIG_AHB(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_AHB_SHIFT)) & HASHCRYPT_CONFIG_AHB_MASK)
-#define HASHCRYPT_CONFIG_AES_MASK (0x40U)
-#define HASHCRYPT_CONFIG_AES_SHIFT (6U)
-/*! AES - 1 if AES 128 included
- */
-#define HASHCRYPT_CONFIG_AES(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_AES_SHIFT)) & HASHCRYPT_CONFIG_AES_MASK)
-#define HASHCRYPT_CONFIG_AESKEY_MASK (0x80U)
-#define HASHCRYPT_CONFIG_AESKEY_SHIFT (7U)
-/*! AESKEY - 1 if AES 192 and 256 also included
- */
-#define HASHCRYPT_CONFIG_AESKEY(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_AESKEY_SHIFT)) & HASHCRYPT_CONFIG_AESKEY_MASK)
-#define HASHCRYPT_CONFIG_SECRET_MASK (0x100U)
-#define HASHCRYPT_CONFIG_SECRET_SHIFT (8U)
-/*! SECRET - 1 if AES Secret key available
- */
-#define HASHCRYPT_CONFIG_SECRET(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_SECRET_SHIFT)) & HASHCRYPT_CONFIG_SECRET_MASK)
-#define HASHCRYPT_CONFIG_ICB_MASK (0x800U)
-#define HASHCRYPT_CONFIG_ICB_SHIFT (11U)
-/*! ICB - 1 if ICB over AES included
- */
-#define HASHCRYPT_CONFIG_ICB(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_CONFIG_ICB_SHIFT)) & HASHCRYPT_CONFIG_ICB_MASK)
-/*! @} */
-
-/*! @name LOCK - Lock register allows locking to the current security level or unlocking by the lock holding level. */
-/*! @{ */
-#define HASHCRYPT_LOCK_SECLOCK_MASK (0x3U)
-#define HASHCRYPT_LOCK_SECLOCK_SHIFT (0U)
-/*! SECLOCK - Write 1 to secure-lock this block (if running in a security state). Write 0 to unlock.
- * If locked already, may only write if at same or higher security level as lock. Reads as: 0 if
- * unlocked, else 1, 2, 3 to indicate security level it is locked at. NOTE: this and ID are the
- * only readable registers if locked and current state is lower than lock level.
- * 0b00..Unlocks, so block is open to all. But, AHB Master will only issue non-secure requests.
- * 0b01..Locks to the current security level. AHB Master will issue requests at this level.
- */
-#define HASHCRYPT_LOCK_SECLOCK(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_LOCK_SECLOCK_SHIFT)) & HASHCRYPT_LOCK_SECLOCK_MASK)
-#define HASHCRYPT_LOCK_PATTERN_MASK (0xFFF0U)
-#define HASHCRYPT_LOCK_PATTERN_SHIFT (4U)
-/*! PATTERN - Must write 0xA75 to change lock state. A75:Pattern needed to change bits 1:0
- */
-#define HASHCRYPT_LOCK_PATTERN(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_LOCK_PATTERN_SHIFT)) & HASHCRYPT_LOCK_PATTERN_MASK)
-/*! @} */
-
-/*! @name MASK - */
-/*! @{ */
-#define HASHCRYPT_MASK_MASK_MASK (0xFFFFFFFFU)
-#define HASHCRYPT_MASK_MASK_SHIFT (0U)
-/*! MASK - A random word.
- */
-#define HASHCRYPT_MASK_MASK(x) (((uint32_t)(((uint32_t)(x)) << HASHCRYPT_MASK_MASK_SHIFT)) & HASHCRYPT_MASK_MASK_MASK)
-/*! @} */
-
-/* The count of HASHCRYPT_MASK */
-#define HASHCRYPT_MASK_COUNT (4U)
-
-
-/*!
- * @}
- */ /* end of group HASHCRYPT_Register_Masks */
-
-
-/* HASHCRYPT - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral HASHCRYPT base address */
- #define HASHCRYPT_BASE (0x500A4000u)
- /** Peripheral HASHCRYPT base address */
- #define HASHCRYPT_BASE_NS (0x400A4000u)
- /** Peripheral HASHCRYPT base pointer */
- #define HASHCRYPT ((HASHCRYPT_Type *)HASHCRYPT_BASE)
- /** Peripheral HASHCRYPT base pointer */
- #define HASHCRYPT_NS ((HASHCRYPT_Type *)HASHCRYPT_BASE_NS)
- /** Array initializer of HASHCRYPT peripheral base addresses */
- #define HASHCRYPT_BASE_ADDRS { HASHCRYPT_BASE }
- /** Array initializer of HASHCRYPT peripheral base pointers */
- #define HASHCRYPT_BASE_PTRS { HASHCRYPT }
- /** Array initializer of HASHCRYPT peripheral base addresses */
- #define HASHCRYPT_BASE_ADDRS_NS { HASHCRYPT_BASE_NS }
- /** Array initializer of HASHCRYPT peripheral base pointers */
- #define HASHCRYPT_BASE_PTRS_NS { HASHCRYPT_NS }
-#else
- /** Peripheral HASHCRYPT base address */
- #define HASHCRYPT_BASE (0x400A4000u)
- /** Peripheral HASHCRYPT base pointer */
- #define HASHCRYPT ((HASHCRYPT_Type *)HASHCRYPT_BASE)
- /** Array initializer of HASHCRYPT peripheral base addresses */
- #define HASHCRYPT_BASE_ADDRS { HASHCRYPT_BASE }
- /** Array initializer of HASHCRYPT peripheral base pointers */
- #define HASHCRYPT_BASE_PTRS { HASHCRYPT }
-#endif
-
-/*!
- * @}
- */ /* end of group HASHCRYPT_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- I2C Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup I2C_Peripheral_Access_Layer I2C Peripheral Access Layer
- * @{
- */
-
-/** I2C - Register Layout Typedef */
-typedef struct {
- uint8_t RESERVED_0[2048];
- __IO uint32_t CFG; /**< Configuration for shared functions., offset: 0x800 */
- __IO uint32_t STAT; /**< Status register for Master, Slave, and Monitor functions., offset: 0x804 */
- __IO uint32_t INTENSET; /**< Interrupt Enable Set and read register., offset: 0x808 */
- __O uint32_t INTENCLR; /**< Interrupt Enable Clear register., offset: 0x80C */
- __IO uint32_t TIMEOUT; /**< Time-out value register., offset: 0x810 */
- __IO uint32_t CLKDIV; /**< Clock pre-divider for the entire I2C interface. This determines what time increments are used for the MSTTIME register, and controls some timing of the Slave function., offset: 0x814 */
- __I uint32_t INTSTAT; /**< Interrupt Status register for Master, Slave, and Monitor functions., offset: 0x818 */
- uint8_t RESERVED_1[4];
- __IO uint32_t MSTCTL; /**< Master control register., offset: 0x820 */
- __IO uint32_t MSTTIME; /**< Master timing configuration., offset: 0x824 */
- __IO uint32_t MSTDAT; /**< Combined Master receiver and transmitter data register., offset: 0x828 */
- uint8_t RESERVED_2[20];
- __IO uint32_t SLVCTL; /**< Slave control register., offset: 0x840 */
- __IO uint32_t SLVDAT; /**< Combined Slave receiver and transmitter data register., offset: 0x844 */
- __IO uint32_t SLVADR[4]; /**< Slave address register., array offset: 0x848, array step: 0x4 */
- __IO uint32_t SLVQUAL0; /**< Slave Qualification for address 0., offset: 0x858 */
- uint8_t RESERVED_3[36];
- __I uint32_t MONRXDAT; /**< Monitor receiver data register., offset: 0x880 */
- uint8_t RESERVED_4[1912];
- __I uint32_t ID; /**< Peripheral identification register., offset: 0xFFC */
-} I2C_Type;
-
-/* ----------------------------------------------------------------------------
- -- I2C Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup I2C_Register_Masks I2C Register Masks
- * @{
- */
-
-/*! @name CFG - Configuration for shared functions. */
-/*! @{ */
-#define I2C_CFG_MSTEN_MASK (0x1U)
-#define I2C_CFG_MSTEN_SHIFT (0U)
-/*! MSTEN - Master Enable. When disabled, configurations settings for the Master function are not
- * changed, but the Master function is internally reset.
- * 0b0..Disabled. The I2C Master function is disabled.
- * 0b1..Enabled. The I2C Master function is enabled.
- */
-#define I2C_CFG_MSTEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_CFG_MSTEN_SHIFT)) & I2C_CFG_MSTEN_MASK)
-#define I2C_CFG_SLVEN_MASK (0x2U)
-#define I2C_CFG_SLVEN_SHIFT (1U)
-/*! SLVEN - Slave Enable. When disabled, configurations settings for the Slave function are not
- * changed, but the Slave function is internally reset.
- * 0b0..Disabled. The I2C slave function is disabled.
- * 0b1..Enabled. The I2C slave function is enabled.
- */
-#define I2C_CFG_SLVEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_CFG_SLVEN_SHIFT)) & I2C_CFG_SLVEN_MASK)
-#define I2C_CFG_MONEN_MASK (0x4U)
-#define I2C_CFG_MONEN_SHIFT (2U)
-/*! MONEN - Monitor Enable. When disabled, configurations settings for the Monitor function are not
- * changed, but the Monitor function is internally reset.
- * 0b0..Disabled. The I2C Monitor function is disabled.
- * 0b1..Enabled. The I2C Monitor function is enabled.
- */
-#define I2C_CFG_MONEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_CFG_MONEN_SHIFT)) & I2C_CFG_MONEN_MASK)
-#define I2C_CFG_TIMEOUTEN_MASK (0x8U)
-#define I2C_CFG_TIMEOUTEN_SHIFT (3U)
-/*! TIMEOUTEN - I2C bus Time-out Enable. When disabled, the time-out function is internally reset.
- * 0b0..Disabled. Time-out function is disabled.
- * 0b1..Enabled. Time-out function is enabled. Both types of time-out flags will be generated and will cause
- * interrupts if they are enabled. Typically, only one time-out will be used in a system.
- */
-#define I2C_CFG_TIMEOUTEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_CFG_TIMEOUTEN_SHIFT)) & I2C_CFG_TIMEOUTEN_MASK)
-#define I2C_CFG_MONCLKSTR_MASK (0x10U)
-#define I2C_CFG_MONCLKSTR_SHIFT (4U)
-/*! MONCLKSTR - Monitor function Clock Stretching.
- * 0b0..Disabled. The Monitor function will not perform clock stretching. Software or DMA may not always be able
- * to read data provided by the Monitor function before it is overwritten. This mode may be used when
- * non-invasive monitoring is critical.
- * 0b1..Enabled. The Monitor function will perform clock stretching in order to ensure that software or DMA can
- * read all incoming data supplied by the Monitor function.
- */
-#define I2C_CFG_MONCLKSTR(x) (((uint32_t)(((uint32_t)(x)) << I2C_CFG_MONCLKSTR_SHIFT)) & I2C_CFG_MONCLKSTR_MASK)
-#define I2C_CFG_HSCAPABLE_MASK (0x20U)
-#define I2C_CFG_HSCAPABLE_SHIFT (5U)
-/*! HSCAPABLE - High-speed mode Capable enable. Since High Speed mode alters the way I2C pins drive
- * and filter, as well as the timing for certain I2C signalling, enabling High-speed mode applies
- * to all functions: Master, Slave, and Monitor.
- * 0b0..Fast-mode plus. The I 2C interface will support Standard-mode, Fast-mode, and Fast-mode Plus, to the
- * extent that the pin electronics support these modes. Any changes that need to be made to the pin controls,
- * such as changing the drive strength or filtering, must be made by software via the IOCON register associated
- * with each I2C pin,
- * 0b1..High-speed. In addition to Standard-mode, Fast-mode, and Fast-mode Plus, the I 2C interface will support
- * High-speed mode to the extent that the pin electronics support these modes. See Section 25.7.2.2 for more
- * information.
- */
-#define I2C_CFG_HSCAPABLE(x) (((uint32_t)(((uint32_t)(x)) << I2C_CFG_HSCAPABLE_SHIFT)) & I2C_CFG_HSCAPABLE_MASK)
-/*! @} */
-
-/*! @name STAT - Status register for Master, Slave, and Monitor functions. */
-/*! @{ */
-#define I2C_STAT_MSTPENDING_MASK (0x1U)
-#define I2C_STAT_MSTPENDING_SHIFT (0U)
-/*! MSTPENDING - Master Pending. Indicates that the Master is waiting to continue communication on
- * the I2C-bus (pending) or is idle. When the master is pending, the MSTSTATE bits indicate what
- * type of software service if any the master expects. This flag will cause an interrupt when set
- * if, enabled via the INTENSET register. The MSTPENDING flag is not set when the DMA is handling
- * an event (if the MSTDMA bit in the MSTCTL register is set). If the master is in the idle
- * state, and no communication is needed, mask this interrupt.
- * 0b0..In progress. Communication is in progress and the Master function is busy and cannot currently accept a command.
- * 0b1..Pending. The Master function needs software service or is in the idle state. If the master is not in the
- * idle state, it is waiting to receive or transmit data or the NACK bit.
- */
-#define I2C_STAT_MSTPENDING(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MSTPENDING_SHIFT)) & I2C_STAT_MSTPENDING_MASK)
-#define I2C_STAT_MSTSTATE_MASK (0xEU)
-#define I2C_STAT_MSTSTATE_SHIFT (1U)
-/*! MSTSTATE - Master State code. The master state code reflects the master state when the
- * MSTPENDING bit is set, that is the master is pending or in the idle state. Each value of this field
- * indicates a specific required service for the Master function. All other values are reserved. See
- * Table 400 for details of state values and appropriate responses.
- * 0b000..Idle. The Master function is available to be used for a new transaction.
- * 0b001..Receive ready. Received data available (Master Receiver mode). Address plus Read was previously sent and Acknowledged by slave.
- * 0b010..Transmit ready. Data can be transmitted (Master Transmitter mode). Address plus Write was previously sent and Acknowledged by slave.
- * 0b011..NACK Address. Slave NACKed address.
- * 0b100..NACK Data. Slave NACKed transmitted data.
- */
-#define I2C_STAT_MSTSTATE(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MSTSTATE_SHIFT)) & I2C_STAT_MSTSTATE_MASK)
-#define I2C_STAT_MSTARBLOSS_MASK (0x10U)
-#define I2C_STAT_MSTARBLOSS_SHIFT (4U)
-/*! MSTARBLOSS - Master Arbitration Loss flag. This flag can be cleared by software writing a 1 to
- * this bit. It is also cleared automatically a 1 is written to MSTCONTINUE.
- * 0b0..No Arbitration Loss has occurred.
- * 0b1..Arbitration loss. The Master function has experienced an Arbitration Loss. At this point, the Master
- * function has already stopped driving the bus and gone to an idle state. Software can respond by doing nothing,
- * or by sending a Start in order to attempt to gain control of the bus when it next becomes idle.
- */
-#define I2C_STAT_MSTARBLOSS(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MSTARBLOSS_SHIFT)) & I2C_STAT_MSTARBLOSS_MASK)
-#define I2C_STAT_MSTSTSTPERR_MASK (0x40U)
-#define I2C_STAT_MSTSTSTPERR_SHIFT (6U)
-/*! MSTSTSTPERR - Master Start/Stop Error flag. This flag can be cleared by software writing a 1 to
- * this bit. It is also cleared automatically a 1 is written to MSTCONTINUE.
- * 0b0..No Start/Stop Error has occurred.
- * 0b1..The Master function has experienced a Start/Stop Error. A Start or Stop was detected at a time when it is
- * not allowed by the I2C specification. The Master interface has stopped driving the bus and gone to an
- * idle state, no action is required. A request for a Start could be made, or software could attempt to insure
- * that the bus has not stalled.
- */
-#define I2C_STAT_MSTSTSTPERR(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MSTSTSTPERR_SHIFT)) & I2C_STAT_MSTSTSTPERR_MASK)
-#define I2C_STAT_SLVPENDING_MASK (0x100U)
-#define I2C_STAT_SLVPENDING_SHIFT (8U)
-/*! SLVPENDING - Slave Pending. Indicates that the Slave function is waiting to continue
- * communication on the I2C-bus and needs software service. This flag will cause an interrupt when set if
- * enabled via INTENSET. The SLVPENDING flag is not set when the DMA is handling an event (if the
- * SLVDMA bit in the SLVCTL register is set). The SLVPENDING flag is read-only and is
- * automatically cleared when a 1 is written to the SLVCONTINUE bit in the SLVCTL register. The point in time
- * when SlvPending is set depends on whether the I2C interface is in HSCAPABLE mode. See Section
- * 25.7.2.2.2. When the I2C interface is configured to be HSCAPABLE, HS master codes are
- * detected automatically. Due to the requirements of the HS I2C specification, slave addresses must
- * also be detected automatically, since the address must be acknowledged before the clock can be
- * stretched.
- * 0b0..In progress. The Slave function does not currently need service.
- * 0b1..Pending. The Slave function needs service. Information on what is needed can be found in the adjacent SLVSTATE field.
- */
-#define I2C_STAT_SLVPENDING(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SLVPENDING_SHIFT)) & I2C_STAT_SLVPENDING_MASK)
-#define I2C_STAT_SLVSTATE_MASK (0x600U)
-#define I2C_STAT_SLVSTATE_SHIFT (9U)
-/*! SLVSTATE - Slave State code. Each value of this field indicates a specific required service for
- * the Slave function. All other values are reserved. See Table 401 for state values and actions.
- * note that the occurrence of some states and how they are handled are affected by DMA mode and
- * Automatic Operation modes.
- * 0b00..Slave address. Address plus R/W received. At least one of the four slave addresses has been matched by hardware.
- * 0b01..Slave receive. Received data is available (Slave Receiver mode).
- * 0b10..Slave transmit. Data can be transmitted (Slave Transmitter mode).
- */
-#define I2C_STAT_SLVSTATE(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SLVSTATE_SHIFT)) & I2C_STAT_SLVSTATE_MASK)
-#define I2C_STAT_SLVNOTSTR_MASK (0x800U)
-#define I2C_STAT_SLVNOTSTR_SHIFT (11U)
-/*! SLVNOTSTR - Slave Not Stretching. Indicates when the slave function is stretching the I2C clock.
- * This is needed in order to gracefully invoke Deep Sleep or Power-down modes during slave
- * operation. This read-only flag reflects the slave function status in real time.
- * 0b0..Stretching. The slave function is currently stretching the I2C bus clock. Deep-Sleep or Power-down mode cannot be entered at this time.
- * 0b1..Not stretching. The slave function is not currently stretching the I 2C bus clock. Deep-sleep or
- * Power-down mode could be entered at this time.
- */
-#define I2C_STAT_SLVNOTSTR(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SLVNOTSTR_SHIFT)) & I2C_STAT_SLVNOTSTR_MASK)
-#define I2C_STAT_SLVIDX_MASK (0x3000U)
-#define I2C_STAT_SLVIDX_SHIFT (12U)
-/*! SLVIDX - Slave address match Index. This field is valid when the I2C slave function has been
- * selected by receiving an address that matches one of the slave addresses defined by any enabled
- * slave address registers, and provides an identification of the address that was matched. It is
- * possible that more than one address could be matched, but only one match can be reported here.
- * 0b00..Address 0. Slave address 0 was matched.
- * 0b01..Address 1. Slave address 1 was matched.
- * 0b10..Address 2. Slave address 2 was matched.
- * 0b11..Address 3. Slave address 3 was matched.
- */
-#define I2C_STAT_SLVIDX(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SLVIDX_SHIFT)) & I2C_STAT_SLVIDX_MASK)
-#define I2C_STAT_SLVSEL_MASK (0x4000U)
-#define I2C_STAT_SLVSEL_SHIFT (14U)
-/*! SLVSEL - Slave selected flag. SLVSEL is set after an address match when software tells the Slave
- * function to acknowledge the address, or when the address has been automatically acknowledged.
- * It is cleared when another address cycle presents an address that does not match an enabled
- * address on the Slave function, when slave software decides to NACK a matched address, when
- * there is a Stop detected on the bus, when the master NACKs slave data, and in some combinations of
- * Automatic Operation. SLVSEL is not cleared if software NACKs data.
- * 0b0..Not selected. The Slave function is not currently selected.
- * 0b1..Selected. The Slave function is currently selected.
- */
-#define I2C_STAT_SLVSEL(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SLVSEL_SHIFT)) & I2C_STAT_SLVSEL_MASK)
-#define I2C_STAT_SLVDESEL_MASK (0x8000U)
-#define I2C_STAT_SLVDESEL_SHIFT (15U)
-/*! SLVDESEL - Slave Deselected flag. This flag will cause an interrupt when set if enabled via
- * INTENSET. This flag can be cleared by writing a 1 to this bit.
- * 0b0..Not deselected. The Slave function has not become deselected. This does not mean that it is currently
- * selected. That information can be found in the SLVSEL flag.
- * 0b1..Deselected. The Slave function has become deselected. This is specifically caused by the SLVSEL flag
- * changing from 1 to 0. See the description of SLVSEL for details on when that event occurs.
- */
-#define I2C_STAT_SLVDESEL(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SLVDESEL_SHIFT)) & I2C_STAT_SLVDESEL_MASK)
-#define I2C_STAT_MONRDY_MASK (0x10000U)
-#define I2C_STAT_MONRDY_SHIFT (16U)
-/*! MONRDY - Monitor Ready. This flag is cleared when the MONRXDAT register is read.
- * 0b0..No data. The Monitor function does not currently have data available.
- * 0b1..Data waiting. The Monitor function has data waiting to be read.
- */
-#define I2C_STAT_MONRDY(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MONRDY_SHIFT)) & I2C_STAT_MONRDY_MASK)
-#define I2C_STAT_MONOV_MASK (0x20000U)
-#define I2C_STAT_MONOV_SHIFT (17U)
-/*! MONOV - Monitor Overflow flag.
- * 0b0..No overrun. Monitor data has not overrun.
- * 0b1..Overrun. A Monitor data overrun has occurred. This can only happen when Monitor clock stretching not
- * enabled via the MONCLKSTR bit in the CFG register. Writing 1 to this bit clears the flag.
- */
-#define I2C_STAT_MONOV(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MONOV_SHIFT)) & I2C_STAT_MONOV_MASK)
-#define I2C_STAT_MONACTIVE_MASK (0x40000U)
-#define I2C_STAT_MONACTIVE_SHIFT (18U)
-/*! MONACTIVE - Monitor Active flag. Indicates when the Monitor function considers the I 2C bus to
- * be active. Active is defined here as when some Master is on the bus: a bus Start has occurred
- * more recently than a bus Stop.
- * 0b0..Inactive. The Monitor function considers the I2C bus to be inactive.
- * 0b1..Active. The Monitor function considers the I2C bus to be active.
- */
-#define I2C_STAT_MONACTIVE(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MONACTIVE_SHIFT)) & I2C_STAT_MONACTIVE_MASK)
-#define I2C_STAT_MONIDLE_MASK (0x80000U)
-#define I2C_STAT_MONIDLE_SHIFT (19U)
-/*! MONIDLE - Monitor Idle flag. This flag is set when the Monitor function sees the I2C bus change
- * from active to inactive. This can be used by software to decide when to process data
- * accumulated by the Monitor function. This flag will cause an interrupt when set if enabled via the
- * INTENSET register. The flag can be cleared by writing a 1 to this bit.
- * 0b0..Not idle. The I2C bus is not idle, or this flag has been cleared by software.
- * 0b1..Idle. The I2C bus has gone idle at least once since the last time this flag was cleared by software.
- */
-#define I2C_STAT_MONIDLE(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_MONIDLE_SHIFT)) & I2C_STAT_MONIDLE_MASK)
-#define I2C_STAT_EVENTTIMEOUT_MASK (0x1000000U)
-#define I2C_STAT_EVENTTIMEOUT_SHIFT (24U)
-/*! EVENTTIMEOUT - Event Time-out Interrupt flag. Indicates when the time between events has been
- * longer than the time specified by the TIMEOUT register. Events include Start, Stop, and clock
- * edges. The flag is cleared by writing a 1 to this bit. No time-out is created when the I2C-bus
- * is idle.
- * 0b0..No time-out. I2C bus events have not caused a time-out.
- * 0b1..Event time-out. The time between I2C bus events has been longer than the time specified by the TIMEOUT register.
- */
-#define I2C_STAT_EVENTTIMEOUT(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_EVENTTIMEOUT_SHIFT)) & I2C_STAT_EVENTTIMEOUT_MASK)
-#define I2C_STAT_SCLTIMEOUT_MASK (0x2000000U)
-#define I2C_STAT_SCLTIMEOUT_SHIFT (25U)
-/*! SCLTIMEOUT - SCL Time-out Interrupt flag. Indicates when SCL has remained low longer than the
- * time specific by the TIMEOUT register. The flag is cleared by writing a 1 to this bit.
- * 0b0..No time-out. SCL low time has not caused a time-out.
- * 0b1..Time-out. SCL low time has caused a time-out.
- */
-#define I2C_STAT_SCLTIMEOUT(x) (((uint32_t)(((uint32_t)(x)) << I2C_STAT_SCLTIMEOUT_SHIFT)) & I2C_STAT_SCLTIMEOUT_MASK)
-/*! @} */
-
-/*! @name INTENSET - Interrupt Enable Set and read register. */
-/*! @{ */
-#define I2C_INTENSET_MSTPENDINGEN_MASK (0x1U)
-#define I2C_INTENSET_MSTPENDINGEN_SHIFT (0U)
-/*! MSTPENDINGEN - Master Pending interrupt Enable.
- * 0b0..Disabled. The MstPending interrupt is disabled.
- * 0b1..Enabled. The MstPending interrupt is enabled.
- */
-#define I2C_INTENSET_MSTPENDINGEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_MSTPENDINGEN_SHIFT)) & I2C_INTENSET_MSTPENDINGEN_MASK)
-#define I2C_INTENSET_MSTARBLOSSEN_MASK (0x10U)
-#define I2C_INTENSET_MSTARBLOSSEN_SHIFT (4U)
-/*! MSTARBLOSSEN - Master Arbitration Loss interrupt Enable.
- * 0b0..Disabled. The MstArbLoss interrupt is disabled.
- * 0b1..Enabled. The MstArbLoss interrupt is enabled.
- */
-#define I2C_INTENSET_MSTARBLOSSEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_MSTARBLOSSEN_SHIFT)) & I2C_INTENSET_MSTARBLOSSEN_MASK)
-#define I2C_INTENSET_MSTSTSTPERREN_MASK (0x40U)
-#define I2C_INTENSET_MSTSTSTPERREN_SHIFT (6U)
-/*! MSTSTSTPERREN - Master Start/Stop Error interrupt Enable.
- * 0b0..Disabled. The MstStStpErr interrupt is disabled.
- * 0b1..Enabled. The MstStStpErr interrupt is enabled.
- */
-#define I2C_INTENSET_MSTSTSTPERREN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_MSTSTSTPERREN_SHIFT)) & I2C_INTENSET_MSTSTSTPERREN_MASK)
-#define I2C_INTENSET_SLVPENDINGEN_MASK (0x100U)
-#define I2C_INTENSET_SLVPENDINGEN_SHIFT (8U)
-/*! SLVPENDINGEN - Slave Pending interrupt Enable.
- * 0b0..Disabled. The SlvPending interrupt is disabled.
- * 0b1..Enabled. The SlvPending interrupt is enabled.
- */
-#define I2C_INTENSET_SLVPENDINGEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_SLVPENDINGEN_SHIFT)) & I2C_INTENSET_SLVPENDINGEN_MASK)
-#define I2C_INTENSET_SLVNOTSTREN_MASK (0x800U)
-#define I2C_INTENSET_SLVNOTSTREN_SHIFT (11U)
-/*! SLVNOTSTREN - Slave Not Stretching interrupt Enable.
- * 0b0..Disabled. The SlvNotStr interrupt is disabled.
- * 0b1..Enabled. The SlvNotStr interrupt is enabled.
- */
-#define I2C_INTENSET_SLVNOTSTREN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_SLVNOTSTREN_SHIFT)) & I2C_INTENSET_SLVNOTSTREN_MASK)
-#define I2C_INTENSET_SLVDESELEN_MASK (0x8000U)
-#define I2C_INTENSET_SLVDESELEN_SHIFT (15U)
-/*! SLVDESELEN - Slave Deselect interrupt Enable.
- * 0b0..Disabled. The SlvDeSel interrupt is disabled.
- * 0b1..Enabled. The SlvDeSel interrupt is enabled.
- */
-#define I2C_INTENSET_SLVDESELEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_SLVDESELEN_SHIFT)) & I2C_INTENSET_SLVDESELEN_MASK)
-#define I2C_INTENSET_MONRDYEN_MASK (0x10000U)
-#define I2C_INTENSET_MONRDYEN_SHIFT (16U)
-/*! MONRDYEN - Monitor data Ready interrupt Enable.
- * 0b0..Disabled. The MonRdy interrupt is disabled.
- * 0b1..Enabled. The MonRdy interrupt is enabled.
- */
-#define I2C_INTENSET_MONRDYEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_MONRDYEN_SHIFT)) & I2C_INTENSET_MONRDYEN_MASK)
-#define I2C_INTENSET_MONOVEN_MASK (0x20000U)
-#define I2C_INTENSET_MONOVEN_SHIFT (17U)
-/*! MONOVEN - Monitor Overrun interrupt Enable.
- * 0b0..Disabled. The MonOv interrupt is disabled.
- * 0b1..Enabled. The MonOv interrupt is enabled.
- */
-#define I2C_INTENSET_MONOVEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_MONOVEN_SHIFT)) & I2C_INTENSET_MONOVEN_MASK)
-#define I2C_INTENSET_MONIDLEEN_MASK (0x80000U)
-#define I2C_INTENSET_MONIDLEEN_SHIFT (19U)
-/*! MONIDLEEN - Monitor Idle interrupt Enable.
- * 0b0..Disabled. The MonIdle interrupt is disabled.
- * 0b1..Enabled. The MonIdle interrupt is enabled.
- */
-#define I2C_INTENSET_MONIDLEEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_MONIDLEEN_SHIFT)) & I2C_INTENSET_MONIDLEEN_MASK)
-#define I2C_INTENSET_EVENTTIMEOUTEN_MASK (0x1000000U)
-#define I2C_INTENSET_EVENTTIMEOUTEN_SHIFT (24U)
-/*! EVENTTIMEOUTEN - Event time-out interrupt Enable.
- * 0b0..Disabled. The Event time-out interrupt is disabled.
- * 0b1..Enabled. The Event time-out interrupt is enabled.
- */
-#define I2C_INTENSET_EVENTTIMEOUTEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_EVENTTIMEOUTEN_SHIFT)) & I2C_INTENSET_EVENTTIMEOUTEN_MASK)
-#define I2C_INTENSET_SCLTIMEOUTEN_MASK (0x2000000U)
-#define I2C_INTENSET_SCLTIMEOUTEN_SHIFT (25U)
-/*! SCLTIMEOUTEN - SCL time-out interrupt Enable.
- * 0b0..Disabled. The SCL time-out interrupt is disabled.
- * 0b1..Enabled. The SCL time-out interrupt is enabled.
- */
-#define I2C_INTENSET_SCLTIMEOUTEN(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENSET_SCLTIMEOUTEN_SHIFT)) & I2C_INTENSET_SCLTIMEOUTEN_MASK)
-/*! @} */
-
-/*! @name INTENCLR - Interrupt Enable Clear register. */
-/*! @{ */
-#define I2C_INTENCLR_MSTPENDINGCLR_MASK (0x1U)
-#define I2C_INTENCLR_MSTPENDINGCLR_SHIFT (0U)
-/*! MSTPENDINGCLR - Master Pending interrupt clear. Writing 1 to this bit clears the corresponding
- * bit in the INTENSET register if implemented.
- */
-#define I2C_INTENCLR_MSTPENDINGCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_MSTPENDINGCLR_SHIFT)) & I2C_INTENCLR_MSTPENDINGCLR_MASK)
-#define I2C_INTENCLR_MSTARBLOSSCLR_MASK (0x10U)
-#define I2C_INTENCLR_MSTARBLOSSCLR_SHIFT (4U)
-/*! MSTARBLOSSCLR - Master Arbitration Loss interrupt clear.
- */
-#define I2C_INTENCLR_MSTARBLOSSCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_MSTARBLOSSCLR_SHIFT)) & I2C_INTENCLR_MSTARBLOSSCLR_MASK)
-#define I2C_INTENCLR_MSTSTSTPERRCLR_MASK (0x40U)
-#define I2C_INTENCLR_MSTSTSTPERRCLR_SHIFT (6U)
-/*! MSTSTSTPERRCLR - Master Start/Stop Error interrupt clear.
- */
-#define I2C_INTENCLR_MSTSTSTPERRCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_MSTSTSTPERRCLR_SHIFT)) & I2C_INTENCLR_MSTSTSTPERRCLR_MASK)
-#define I2C_INTENCLR_SLVPENDINGCLR_MASK (0x100U)
-#define I2C_INTENCLR_SLVPENDINGCLR_SHIFT (8U)
-/*! SLVPENDINGCLR - Slave Pending interrupt clear.
- */
-#define I2C_INTENCLR_SLVPENDINGCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_SLVPENDINGCLR_SHIFT)) & I2C_INTENCLR_SLVPENDINGCLR_MASK)
-#define I2C_INTENCLR_SLVNOTSTRCLR_MASK (0x800U)
-#define I2C_INTENCLR_SLVNOTSTRCLR_SHIFT (11U)
-/*! SLVNOTSTRCLR - Slave Not Stretching interrupt clear.
- */
-#define I2C_INTENCLR_SLVNOTSTRCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_SLVNOTSTRCLR_SHIFT)) & I2C_INTENCLR_SLVNOTSTRCLR_MASK)
-#define I2C_INTENCLR_SLVDESELCLR_MASK (0x8000U)
-#define I2C_INTENCLR_SLVDESELCLR_SHIFT (15U)
-/*! SLVDESELCLR - Slave Deselect interrupt clear.
- */
-#define I2C_INTENCLR_SLVDESELCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_SLVDESELCLR_SHIFT)) & I2C_INTENCLR_SLVDESELCLR_MASK)
-#define I2C_INTENCLR_MONRDYCLR_MASK (0x10000U)
-#define I2C_INTENCLR_MONRDYCLR_SHIFT (16U)
-/*! MONRDYCLR - Monitor data Ready interrupt clear.
- */
-#define I2C_INTENCLR_MONRDYCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_MONRDYCLR_SHIFT)) & I2C_INTENCLR_MONRDYCLR_MASK)
-#define I2C_INTENCLR_MONOVCLR_MASK (0x20000U)
-#define I2C_INTENCLR_MONOVCLR_SHIFT (17U)
-/*! MONOVCLR - Monitor Overrun interrupt clear.
- */
-#define I2C_INTENCLR_MONOVCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_MONOVCLR_SHIFT)) & I2C_INTENCLR_MONOVCLR_MASK)
-#define I2C_INTENCLR_MONIDLECLR_MASK (0x80000U)
-#define I2C_INTENCLR_MONIDLECLR_SHIFT (19U)
-/*! MONIDLECLR - Monitor Idle interrupt clear.
- */
-#define I2C_INTENCLR_MONIDLECLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_MONIDLECLR_SHIFT)) & I2C_INTENCLR_MONIDLECLR_MASK)
-#define I2C_INTENCLR_EVENTTIMEOUTCLR_MASK (0x1000000U)
-#define I2C_INTENCLR_EVENTTIMEOUTCLR_SHIFT (24U)
-/*! EVENTTIMEOUTCLR - Event time-out interrupt clear.
- */
-#define I2C_INTENCLR_EVENTTIMEOUTCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_EVENTTIMEOUTCLR_SHIFT)) & I2C_INTENCLR_EVENTTIMEOUTCLR_MASK)
-#define I2C_INTENCLR_SCLTIMEOUTCLR_MASK (0x2000000U)
-#define I2C_INTENCLR_SCLTIMEOUTCLR_SHIFT (25U)
-/*! SCLTIMEOUTCLR - SCL time-out interrupt clear.
- */
-#define I2C_INTENCLR_SCLTIMEOUTCLR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTENCLR_SCLTIMEOUTCLR_SHIFT)) & I2C_INTENCLR_SCLTIMEOUTCLR_MASK)
-/*! @} */
-
-/*! @name TIMEOUT - Time-out value register. */
-/*! @{ */
-#define I2C_TIMEOUT_TOMIN_MASK (0xFU)
-#define I2C_TIMEOUT_TOMIN_SHIFT (0U)
-/*! TOMIN - Time-out time value, bottom four bits. These are hard-wired to 0xF. This gives a minimum
- * time-out of 16 I2C function clocks and also a time-out resolution of 16 I2C function clocks.
- */
-#define I2C_TIMEOUT_TOMIN(x) (((uint32_t)(((uint32_t)(x)) << I2C_TIMEOUT_TOMIN_SHIFT)) & I2C_TIMEOUT_TOMIN_MASK)
-#define I2C_TIMEOUT_TO_MASK (0xFFF0U)
-#define I2C_TIMEOUT_TO_SHIFT (4U)
-/*! TO - Time-out time value. Specifies the time-out interval value in increments of 16 I 2C
- * function clocks, as defined by the CLKDIV register. To change this value while I2C is in operation,
- * disable all time-outs, write a new value to TIMEOUT, then re-enable time-outs. 0x000 = A
- * time-out will occur after 16 counts of the I2C function clock. 0x001 = A time-out will occur after
- * 32 counts of the I2C function clock. 0xFFF = A time-out will occur after 65,536 counts of the
- * I2C function clock.
- */
-#define I2C_TIMEOUT_TO(x) (((uint32_t)(((uint32_t)(x)) << I2C_TIMEOUT_TO_SHIFT)) & I2C_TIMEOUT_TO_MASK)
-/*! @} */
-
-/*! @name CLKDIV - Clock pre-divider for the entire I2C interface. This determines what time increments are used for the MSTTIME register, and controls some timing of the Slave function. */
-/*! @{ */
-#define I2C_CLKDIV_DIVVAL_MASK (0xFFFFU)
-#define I2C_CLKDIV_DIVVAL_SHIFT (0U)
-/*! DIVVAL - This field controls how the Flexcomm clock (FCLK) is used by the I2C functions that
- * need an internal clock in order to operate. 0x0000 = FCLK is used directly by the I2C. 0x0001 =
- * FCLK is divided by 2 before use. 0x0002 = FCLK is divided by 3 before use. 0xFFFF = FCLK is
- * divided by 65,536 before use.
- */
-#define I2C_CLKDIV_DIVVAL(x) (((uint32_t)(((uint32_t)(x)) << I2C_CLKDIV_DIVVAL_SHIFT)) & I2C_CLKDIV_DIVVAL_MASK)
-/*! @} */
-
-/*! @name INTSTAT - Interrupt Status register for Master, Slave, and Monitor functions. */
-/*! @{ */
-#define I2C_INTSTAT_MSTPENDING_MASK (0x1U)
-#define I2C_INTSTAT_MSTPENDING_SHIFT (0U)
-/*! MSTPENDING - Master Pending.
- */
-#define I2C_INTSTAT_MSTPENDING(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_MSTPENDING_SHIFT)) & I2C_INTSTAT_MSTPENDING_MASK)
-#define I2C_INTSTAT_MSTARBLOSS_MASK (0x10U)
-#define I2C_INTSTAT_MSTARBLOSS_SHIFT (4U)
-/*! MSTARBLOSS - Master Arbitration Loss flag.
- */
-#define I2C_INTSTAT_MSTARBLOSS(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_MSTARBLOSS_SHIFT)) & I2C_INTSTAT_MSTARBLOSS_MASK)
-#define I2C_INTSTAT_MSTSTSTPERR_MASK (0x40U)
-#define I2C_INTSTAT_MSTSTSTPERR_SHIFT (6U)
-/*! MSTSTSTPERR - Master Start/Stop Error flag.
- */
-#define I2C_INTSTAT_MSTSTSTPERR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_MSTSTSTPERR_SHIFT)) & I2C_INTSTAT_MSTSTSTPERR_MASK)
-#define I2C_INTSTAT_SLVPENDING_MASK (0x100U)
-#define I2C_INTSTAT_SLVPENDING_SHIFT (8U)
-/*! SLVPENDING - Slave Pending.
- */
-#define I2C_INTSTAT_SLVPENDING(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_SLVPENDING_SHIFT)) & I2C_INTSTAT_SLVPENDING_MASK)
-#define I2C_INTSTAT_SLVNOTSTR_MASK (0x800U)
-#define I2C_INTSTAT_SLVNOTSTR_SHIFT (11U)
-/*! SLVNOTSTR - Slave Not Stretching status.
- */
-#define I2C_INTSTAT_SLVNOTSTR(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_SLVNOTSTR_SHIFT)) & I2C_INTSTAT_SLVNOTSTR_MASK)
-#define I2C_INTSTAT_SLVDESEL_MASK (0x8000U)
-#define I2C_INTSTAT_SLVDESEL_SHIFT (15U)
-/*! SLVDESEL - Slave Deselected flag.
- */
-#define I2C_INTSTAT_SLVDESEL(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_SLVDESEL_SHIFT)) & I2C_INTSTAT_SLVDESEL_MASK)
-#define I2C_INTSTAT_MONRDY_MASK (0x10000U)
-#define I2C_INTSTAT_MONRDY_SHIFT (16U)
-/*! MONRDY - Monitor Ready.
- */
-#define I2C_INTSTAT_MONRDY(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_MONRDY_SHIFT)) & I2C_INTSTAT_MONRDY_MASK)
-#define I2C_INTSTAT_MONOV_MASK (0x20000U)
-#define I2C_INTSTAT_MONOV_SHIFT (17U)
-/*! MONOV - Monitor Overflow flag.
- */
-#define I2C_INTSTAT_MONOV(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_MONOV_SHIFT)) & I2C_INTSTAT_MONOV_MASK)
-#define I2C_INTSTAT_MONIDLE_MASK (0x80000U)
-#define I2C_INTSTAT_MONIDLE_SHIFT (19U)
-/*! MONIDLE - Monitor Idle flag.
- */
-#define I2C_INTSTAT_MONIDLE(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_MONIDLE_SHIFT)) & I2C_INTSTAT_MONIDLE_MASK)
-#define I2C_INTSTAT_EVENTTIMEOUT_MASK (0x1000000U)
-#define I2C_INTSTAT_EVENTTIMEOUT_SHIFT (24U)
-/*! EVENTTIMEOUT - Event time-out Interrupt flag.
- */
-#define I2C_INTSTAT_EVENTTIMEOUT(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_EVENTTIMEOUT_SHIFT)) & I2C_INTSTAT_EVENTTIMEOUT_MASK)
-#define I2C_INTSTAT_SCLTIMEOUT_MASK (0x2000000U)
-#define I2C_INTSTAT_SCLTIMEOUT_SHIFT (25U)
-/*! SCLTIMEOUT - SCL time-out Interrupt flag.
- */
-#define I2C_INTSTAT_SCLTIMEOUT(x) (((uint32_t)(((uint32_t)(x)) << I2C_INTSTAT_SCLTIMEOUT_SHIFT)) & I2C_INTSTAT_SCLTIMEOUT_MASK)
-/*! @} */
-
-/*! @name MSTCTL - Master control register. */
-/*! @{ */
-#define I2C_MSTCTL_MSTCONTINUE_MASK (0x1U)
-#define I2C_MSTCTL_MSTCONTINUE_SHIFT (0U)
-/*! MSTCONTINUE - Master Continue. This bit is write-only.
- * 0b0..No effect.
- * 0b1..Continue. Informs the Master function to continue to the next operation. This must done after writing
- * transmit data, reading received data, or any other housekeeping related to the next bus operation.
- */
-#define I2C_MSTCTL_MSTCONTINUE(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTCTL_MSTCONTINUE_SHIFT)) & I2C_MSTCTL_MSTCONTINUE_MASK)
-#define I2C_MSTCTL_MSTSTART_MASK (0x2U)
-#define I2C_MSTCTL_MSTSTART_SHIFT (1U)
-/*! MSTSTART - Master Start control. This bit is write-only.
- * 0b0..No effect.
- * 0b1..Start. A Start will be generated on the I2C bus at the next allowed time.
- */
-#define I2C_MSTCTL_MSTSTART(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTCTL_MSTSTART_SHIFT)) & I2C_MSTCTL_MSTSTART_MASK)
-#define I2C_MSTCTL_MSTSTOP_MASK (0x4U)
-#define I2C_MSTCTL_MSTSTOP_SHIFT (2U)
-/*! MSTSTOP - Master Stop control. This bit is write-only.
- * 0b0..No effect.
- * 0b1..Stop. A Stop will be generated on the I2C bus at the next allowed time, preceded by a NACK to the slave
- * if the master is receiving data from the slave (Master Receiver mode).
- */
-#define I2C_MSTCTL_MSTSTOP(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTCTL_MSTSTOP_SHIFT)) & I2C_MSTCTL_MSTSTOP_MASK)
-#define I2C_MSTCTL_MSTDMA_MASK (0x8U)
-#define I2C_MSTCTL_MSTDMA_SHIFT (3U)
-/*! MSTDMA - Master DMA enable. Data operations of the I2C can be performed with DMA. Protocol type
- * operations such as Start, address, Stop, and address match must always be done with software,
- * typically via an interrupt. Address acknowledgement must also be done by software except when
- * the I2C is configured to be HSCAPABLE (and address acknowledgement is handled entirely by
- * hardware) or when Automatic Operation is enabled. When a DMA data transfer is complete, MSTDMA
- * must be cleared prior to beginning the next operation, typically a Start or Stop.This bit is
- * read/write.
- * 0b0..Disable. No DMA requests are generated for master operation.
- * 0b1..Enable. A DMA request is generated for I2C master data operations. When this I2C master is generating
- * Acknowledge bits in Master Receiver mode, the acknowledge is generated automatically.
- */
-#define I2C_MSTCTL_MSTDMA(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTCTL_MSTDMA_SHIFT)) & I2C_MSTCTL_MSTDMA_MASK)
-/*! @} */
-
-/*! @name MSTTIME - Master timing configuration. */
-/*! @{ */
-#define I2C_MSTTIME_MSTSCLLOW_MASK (0x7U)
-#define I2C_MSTTIME_MSTSCLLOW_SHIFT (0U)
-/*! MSTSCLLOW - Master SCL Low time. Specifies the minimum low time that will be asserted by this
- * master on SCL. Other devices on the bus (masters or slaves) could lengthen this time. This
- * corresponds to the parameter t LOW in the I2C bus specification. I2C bus specification parameters
- * tBUF and tSU;STA have the same values and are also controlled by MSTSCLLOW.
- * 0b000..2 clocks. Minimum SCL low time is 2 clocks of the I2C clock pre-divider.
- * 0b001..3 clocks. Minimum SCL low time is 3 clocks of the I2C clock pre-divider.
- * 0b010..4 clocks. Minimum SCL low time is 4 clocks of the I2C clock pre-divider.
- * 0b011..5 clocks. Minimum SCL low time is 5 clocks of the I2C clock pre-divider.
- * 0b100..6 clocks. Minimum SCL low time is 6 clocks of the I2C clock pre-divider.
- * 0b101..7 clocks. Minimum SCL low time is 7 clocks of the I2C clock pre-divider.
- * 0b110..8 clocks. Minimum SCL low time is 8 clocks of the I2C clock pre-divider.
- * 0b111..9 clocks. Minimum SCL low time is 9 clocks of the I2C clock pre-divider.
- */
-#define I2C_MSTTIME_MSTSCLLOW(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTTIME_MSTSCLLOW_SHIFT)) & I2C_MSTTIME_MSTSCLLOW_MASK)
-#define I2C_MSTTIME_MSTSCLHIGH_MASK (0x70U)
-#define I2C_MSTTIME_MSTSCLHIGH_SHIFT (4U)
-/*! MSTSCLHIGH - Master SCL High time. Specifies the minimum high time that will be asserted by this
- * master on SCL. Other masters in a multi-master system could shorten this time. This
- * corresponds to the parameter tHIGH in the I2C bus specification. I2C bus specification parameters
- * tSU;STO and tHD;STA have the same values and are also controlled by MSTSCLHIGH.
- * 0b000..2 clocks. Minimum SCL high time is 2 clock of the I2C clock pre-divider.
- * 0b001..3 clocks. Minimum SCL high time is 3 clocks of the I2C clock pre-divider .
- * 0b010..4 clocks. Minimum SCL high time is 4 clock of the I2C clock pre-divider.
- * 0b011..5 clocks. Minimum SCL high time is 5 clock of the I2C clock pre-divider.
- * 0b100..6 clocks. Minimum SCL high time is 6 clock of the I2C clock pre-divider.
- * 0b101..7 clocks. Minimum SCL high time is 7 clock of the I2C clock pre-divider.
- * 0b110..8 clocks. Minimum SCL high time is 8 clock of the I2C clock pre-divider.
- * 0b111..9 clocks. Minimum SCL high time is 9 clocks of the I2C clock pre-divider.
- */
-#define I2C_MSTTIME_MSTSCLHIGH(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTTIME_MSTSCLHIGH_SHIFT)) & I2C_MSTTIME_MSTSCLHIGH_MASK)
-/*! @} */
-
-/*! @name MSTDAT - Combined Master receiver and transmitter data register. */
-/*! @{ */
-#define I2C_MSTDAT_DATA_MASK (0xFFU)
-#define I2C_MSTDAT_DATA_SHIFT (0U)
-/*! DATA - Master function data register. Read: read the most recently received data for the Master
- * function. Write: transmit data using the Master function.
- */
-#define I2C_MSTDAT_DATA(x) (((uint32_t)(((uint32_t)(x)) << I2C_MSTDAT_DATA_SHIFT)) & I2C_MSTDAT_DATA_MASK)
-/*! @} */
-
-/*! @name SLVCTL - Slave control register. */
-/*! @{ */
-#define I2C_SLVCTL_SLVCONTINUE_MASK (0x1U)
-#define I2C_SLVCTL_SLVCONTINUE_SHIFT (0U)
-/*! SLVCONTINUE - Slave Continue.
- * 0b0..No effect.
- * 0b1..Continue. Informs the Slave function to continue to the next operation, by clearing the SLVPENDING flag
- * in the STAT register. This must be done after writing transmit data, reading received data, or any other
- * housekeeping related to the next bus operation. Automatic Operation has different requirements. SLVCONTINUE
- * should not be set unless SLVPENDING = 1.
- */
-#define I2C_SLVCTL_SLVCONTINUE(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVCTL_SLVCONTINUE_SHIFT)) & I2C_SLVCTL_SLVCONTINUE_MASK)
-#define I2C_SLVCTL_SLVNACK_MASK (0x2U)
-#define I2C_SLVCTL_SLVNACK_SHIFT (1U)
-/*! SLVNACK - Slave NACK.
- * 0b0..No effect.
- * 0b1..NACK. Causes the Slave function to NACK the master when the slave is receiving data from the master (Slave Receiver mode).
- */
-#define I2C_SLVCTL_SLVNACK(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVCTL_SLVNACK_SHIFT)) & I2C_SLVCTL_SLVNACK_MASK)
-#define I2C_SLVCTL_SLVDMA_MASK (0x8U)
-#define I2C_SLVCTL_SLVDMA_SHIFT (3U)
-/*! SLVDMA - Slave DMA enable.
- * 0b0..Disabled. No DMA requests are issued for Slave mode operation.
- * 0b1..Enabled. DMA requests are issued for I2C slave data transmission and reception.
- */
-#define I2C_SLVCTL_SLVDMA(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVCTL_SLVDMA_SHIFT)) & I2C_SLVCTL_SLVDMA_MASK)
-#define I2C_SLVCTL_AUTOACK_MASK (0x100U)
-#define I2C_SLVCTL_AUTOACK_SHIFT (8U)
-/*! AUTOACK - Automatic Acknowledge.When this bit is set, it will cause an I2C header which matches
- * SLVADR0 and the direction set by AUTOMATCHREAD to be ACKed immediately; this is used with DMA
- * to allow processing of the data without intervention. If this bit is clear and a header
- * matches SLVADR0, the behavior is controlled by AUTONACK in the SLVADR0 register: allowing NACK or
- * interrupt.
- * 0b0..Normal, non-automatic operation. If AUTONACK = 0, an SlvPending interrupt is generated when a matching
- * address is received. If AUTONACK = 1, received addresses are NACKed (ignored).
- * 0b1..A header with matching SLVADR0 and matching direction as set by AUTOMATCHREAD will be ACKed immediately,
- * allowing the master to move on to the data bytes. If the address matches SLVADR0, but the direction does
- * not match AUTOMATCHREAD, the behavior will depend on the AUTONACK bit in the SLVADR0 register: if AUTONACK
- * is set, then it will be Nacked; else if AUTONACK is clear, then a SlvPending interrupt is generated.
- */
-#define I2C_SLVCTL_AUTOACK(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVCTL_AUTOACK_SHIFT)) & I2C_SLVCTL_AUTOACK_MASK)
-#define I2C_SLVCTL_AUTOMATCHREAD_MASK (0x200U)
-#define I2C_SLVCTL_AUTOMATCHREAD_SHIFT (9U)
-/*! AUTOMATCHREAD - When AUTOACK is set, this bit controls whether it matches a read or write
- * request on the next header with an address matching SLVADR0. Since DMA needs to be configured to
- * match the transfer direction, the direction needs to be specified. This bit allows a direction to
- * be chosen for the next operation.
- * 0b0..The expected next operation in Automatic Mode is an I2C write.
- * 0b1..The expected next operation in Automatic Mode is an I2C read.
- */
-#define I2C_SLVCTL_AUTOMATCHREAD(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVCTL_AUTOMATCHREAD_SHIFT)) & I2C_SLVCTL_AUTOMATCHREAD_MASK)
-/*! @} */
-
-/*! @name SLVDAT - Combined Slave receiver and transmitter data register. */
-/*! @{ */
-#define I2C_SLVDAT_DATA_MASK (0xFFU)
-#define I2C_SLVDAT_DATA_SHIFT (0U)
-/*! DATA - Slave function data register. Read: read the most recently received data for the Slave
- * function. Write: transmit data using the Slave function.
- */
-#define I2C_SLVDAT_DATA(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVDAT_DATA_SHIFT)) & I2C_SLVDAT_DATA_MASK)
-/*! @} */
-
-/*! @name SLVADR - Slave address register. */
-/*! @{ */
-#define I2C_SLVADR_SADISABLE_MASK (0x1U)
-#define I2C_SLVADR_SADISABLE_SHIFT (0U)
-/*! SADISABLE - Slave Address n Disable.
- * 0b0..Enabled. Slave Address n is enabled.
- * 0b1..Ignored Slave Address n is ignored.
- */
-#define I2C_SLVADR_SADISABLE(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVADR_SADISABLE_SHIFT)) & I2C_SLVADR_SADISABLE_MASK)
-#define I2C_SLVADR_SLVADR_MASK (0xFEU)
-#define I2C_SLVADR_SLVADR_SHIFT (1U)
-/*! SLVADR - Slave Address. Seven bit slave address that is compared to received addresses if enabled.
- */
-#define I2C_SLVADR_SLVADR(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVADR_SLVADR_SHIFT)) & I2C_SLVADR_SLVADR_MASK)
-#define I2C_SLVADR_AUTONACK_MASK (0x8000U)
-#define I2C_SLVADR_AUTONACK_SHIFT (15U)
-/*! AUTONACK - Automatic NACK operation. Used in conjunction with AUTOACK and AUTOMATCHREAD, allows
- * software to ignore I2C traffic while handling previous I2C data or other operations.
- * 0b0..Normal operation, matching I2C addresses are not ignored.
- * 0b1..Automatic-only mode. All incoming addresses are ignored (NACKed), unless AUTOACK is set, it matches
- * SLVADRn, and AUTOMATCHREAD matches the direction.
- */
-#define I2C_SLVADR_AUTONACK(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVADR_AUTONACK_SHIFT)) & I2C_SLVADR_AUTONACK_MASK)
-/*! @} */
-
-/* The count of I2C_SLVADR */
-#define I2C_SLVADR_COUNT (4U)
-
-/*! @name SLVQUAL0 - Slave Qualification for address 0. */
-/*! @{ */
-#define I2C_SLVQUAL0_QUALMODE0_MASK (0x1U)
-#define I2C_SLVQUAL0_QUALMODE0_SHIFT (0U)
-/*! QUALMODE0 - Qualify mode for slave address 0.
- * 0b0..Mask. The SLVQUAL0 field is used as a logical mask for matching address 0.
- * 0b1..Extend. The SLVQUAL0 field is used to extend address 0 matching in a range of addresses.
- */
-#define I2C_SLVQUAL0_QUALMODE0(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVQUAL0_QUALMODE0_SHIFT)) & I2C_SLVQUAL0_QUALMODE0_MASK)
-#define I2C_SLVQUAL0_SLVQUAL0_MASK (0xFEU)
-#define I2C_SLVQUAL0_SLVQUAL0_SHIFT (1U)
-/*! SLVQUAL0 - Slave address Qualifier for address 0. A value of 0 causes the address in SLVADR0 to
- * be used as-is, assuming that it is enabled. If QUALMODE0 = 0, any bit in this field which is
- * set to 1 will cause an automatic match of the corresponding bit of the received address when it
- * is compared to the SLVADR0 register. If QUALMODE0 = 1, an address range is matched for
- * address 0. This range extends from the value defined by SLVADR0 to the address defined by SLVQUAL0
- * (address matches when SLVADR0[7:1] <= received address <= SLVQUAL0[7:1]).
- */
-#define I2C_SLVQUAL0_SLVQUAL0(x) (((uint32_t)(((uint32_t)(x)) << I2C_SLVQUAL0_SLVQUAL0_SHIFT)) & I2C_SLVQUAL0_SLVQUAL0_MASK)
-/*! @} */
-
-/*! @name MONRXDAT - Monitor receiver data register. */
-/*! @{ */
-#define I2C_MONRXDAT_MONRXDAT_MASK (0xFFU)
-#define I2C_MONRXDAT_MONRXDAT_SHIFT (0U)
-/*! MONRXDAT - Monitor function Receiver Data. This reflects every data byte that passes on the I2C pins.
- */
-#define I2C_MONRXDAT_MONRXDAT(x) (((uint32_t)(((uint32_t)(x)) << I2C_MONRXDAT_MONRXDAT_SHIFT)) & I2C_MONRXDAT_MONRXDAT_MASK)
-#define I2C_MONRXDAT_MONSTART_MASK (0x100U)
-#define I2C_MONRXDAT_MONSTART_SHIFT (8U)
-/*! MONSTART - Monitor Received Start.
- * 0b0..No start detected. The Monitor function has not detected a Start event on the I2C bus.
- * 0b1..Start detected. The Monitor function has detected a Start event on the I2C bus.
- */
-#define I2C_MONRXDAT_MONSTART(x) (((uint32_t)(((uint32_t)(x)) << I2C_MONRXDAT_MONSTART_SHIFT)) & I2C_MONRXDAT_MONSTART_MASK)
-#define I2C_MONRXDAT_MONRESTART_MASK (0x200U)
-#define I2C_MONRXDAT_MONRESTART_SHIFT (9U)
-/*! MONRESTART - Monitor Received Repeated Start.
- * 0b0..No repeated start detected. The Monitor function has not detected a Repeated Start event on the I2C bus.
- * 0b1..Repeated start detected. The Monitor function has detected a Repeated Start event on the I2C bus.
- */
-#define I2C_MONRXDAT_MONRESTART(x) (((uint32_t)(((uint32_t)(x)) << I2C_MONRXDAT_MONRESTART_SHIFT)) & I2C_MONRXDAT_MONRESTART_MASK)
-#define I2C_MONRXDAT_MONNACK_MASK (0x400U)
-#define I2C_MONRXDAT_MONNACK_SHIFT (10U)
-/*! MONNACK - Monitor Received NACK.
- * 0b0..Acknowledged. The data currently being provided by the Monitor function was acknowledged by at least one master or slave receiver.
- * 0b1..Not acknowledged. The data currently being provided by the Monitor function was not acknowledged by any receiver.
- */
-#define I2C_MONRXDAT_MONNACK(x) (((uint32_t)(((uint32_t)(x)) << I2C_MONRXDAT_MONNACK_SHIFT)) & I2C_MONRXDAT_MONNACK_MASK)
-/*! @} */
-
-/*! @name ID - Peripheral identification register. */
-/*! @{ */
-#define I2C_ID_APERTURE_MASK (0xFFU)
-#define I2C_ID_APERTURE_SHIFT (0U)
-/*! APERTURE - Aperture: encoded as (aperture size/4K) -1, so 0x00 means a 4K aperture.
- */
-#define I2C_ID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << I2C_ID_APERTURE_SHIFT)) & I2C_ID_APERTURE_MASK)
-#define I2C_ID_MINOR_REV_MASK (0xF00U)
-#define I2C_ID_MINOR_REV_SHIFT (8U)
-/*! MINOR_REV - Minor revision of module implementation.
- */
-#define I2C_ID_MINOR_REV(x) (((uint32_t)(((uint32_t)(x)) << I2C_ID_MINOR_REV_SHIFT)) & I2C_ID_MINOR_REV_MASK)
-#define I2C_ID_MAJOR_REV_MASK (0xF000U)
-#define I2C_ID_MAJOR_REV_SHIFT (12U)
-/*! MAJOR_REV - Major revision of module implementation.
- */
-#define I2C_ID_MAJOR_REV(x) (((uint32_t)(((uint32_t)(x)) << I2C_ID_MAJOR_REV_SHIFT)) & I2C_ID_MAJOR_REV_MASK)
-#define I2C_ID_ID_MASK (0xFFFF0000U)
-#define I2C_ID_ID_SHIFT (16U)
-/*! ID - Module identifier for the selected function.
- */
-#define I2C_ID_ID(x) (((uint32_t)(((uint32_t)(x)) << I2C_ID_ID_SHIFT)) & I2C_ID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group I2C_Register_Masks */
-
-
-/* I2C - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral I2C0 base address */
- #define I2C0_BASE (0x50086000u)
- /** Peripheral I2C0 base address */
- #define I2C0_BASE_NS (0x40086000u)
- /** Peripheral I2C0 base pointer */
- #define I2C0 ((I2C_Type *)I2C0_BASE)
- /** Peripheral I2C0 base pointer */
- #define I2C0_NS ((I2C_Type *)I2C0_BASE_NS)
- /** Peripheral I2C1 base address */
- #define I2C1_BASE (0x50087000u)
- /** Peripheral I2C1 base address */
- #define I2C1_BASE_NS (0x40087000u)
- /** Peripheral I2C1 base pointer */
- #define I2C1 ((I2C_Type *)I2C1_BASE)
- /** Peripheral I2C1 base pointer */
- #define I2C1_NS ((I2C_Type *)I2C1_BASE_NS)
- /** Peripheral I2C2 base address */
- #define I2C2_BASE (0x50088000u)
- /** Peripheral I2C2 base address */
- #define I2C2_BASE_NS (0x40088000u)
- /** Peripheral I2C2 base pointer */
- #define I2C2 ((I2C_Type *)I2C2_BASE)
- /** Peripheral I2C2 base pointer */
- #define I2C2_NS ((I2C_Type *)I2C2_BASE_NS)
- /** Peripheral I2C3 base address */
- #define I2C3_BASE (0x50089000u)
- /** Peripheral I2C3 base address */
- #define I2C3_BASE_NS (0x40089000u)
- /** Peripheral I2C3 base pointer */
- #define I2C3 ((I2C_Type *)I2C3_BASE)
- /** Peripheral I2C3 base pointer */
- #define I2C3_NS ((I2C_Type *)I2C3_BASE_NS)
- /** Peripheral I2C4 base address */
- #define I2C4_BASE (0x5008A000u)
- /** Peripheral I2C4 base address */
- #define I2C4_BASE_NS (0x4008A000u)
- /** Peripheral I2C4 base pointer */
- #define I2C4 ((I2C_Type *)I2C4_BASE)
- /** Peripheral I2C4 base pointer */
- #define I2C4_NS ((I2C_Type *)I2C4_BASE_NS)
- /** Peripheral I2C5 base address */
- #define I2C5_BASE (0x50096000u)
- /** Peripheral I2C5 base address */
- #define I2C5_BASE_NS (0x40096000u)
- /** Peripheral I2C5 base pointer */
- #define I2C5 ((I2C_Type *)I2C5_BASE)
- /** Peripheral I2C5 base pointer */
- #define I2C5_NS ((I2C_Type *)I2C5_BASE_NS)
- /** Peripheral I2C6 base address */
- #define I2C6_BASE (0x50097000u)
- /** Peripheral I2C6 base address */
- #define I2C6_BASE_NS (0x40097000u)
- /** Peripheral I2C6 base pointer */
- #define I2C6 ((I2C_Type *)I2C6_BASE)
- /** Peripheral I2C6 base pointer */
- #define I2C6_NS ((I2C_Type *)I2C6_BASE_NS)
- /** Peripheral I2C7 base address */
- #define I2C7_BASE (0x50098000u)
- /** Peripheral I2C7 base address */
- #define I2C7_BASE_NS (0x40098000u)
- /** Peripheral I2C7 base pointer */
- #define I2C7 ((I2C_Type *)I2C7_BASE)
- /** Peripheral I2C7 base pointer */
- #define I2C7_NS ((I2C_Type *)I2C7_BASE_NS)
- /** Array initializer of I2C peripheral base addresses */
- #define I2C_BASE_ADDRS { I2C0_BASE, I2C1_BASE, I2C2_BASE, I2C3_BASE, I2C4_BASE, I2C5_BASE, I2C6_BASE, I2C7_BASE }
- /** Array initializer of I2C peripheral base pointers */
- #define I2C_BASE_PTRS { I2C0, I2C1, I2C2, I2C3, I2C4, I2C5, I2C6, I2C7 }
- /** Array initializer of I2C peripheral base addresses */
- #define I2C_BASE_ADDRS_NS { I2C0_BASE_NS, I2C1_BASE_NS, I2C2_BASE_NS, I2C3_BASE_NS, I2C4_BASE_NS, I2C5_BASE_NS, I2C6_BASE_NS, I2C7_BASE_NS }
- /** Array initializer of I2C peripheral base pointers */
- #define I2C_BASE_PTRS_NS { I2C0_NS, I2C1_NS, I2C2_NS, I2C3_NS, I2C4_NS, I2C5_NS, I2C6_NS, I2C7_NS }
-#else
- /** Peripheral I2C0 base address */
- #define I2C0_BASE (0x40086000u)
- /** Peripheral I2C0 base pointer */
- #define I2C0 ((I2C_Type *)I2C0_BASE)
- /** Peripheral I2C1 base address */
- #define I2C1_BASE (0x40087000u)
- /** Peripheral I2C1 base pointer */
- #define I2C1 ((I2C_Type *)I2C1_BASE)
- /** Peripheral I2C2 base address */
- #define I2C2_BASE (0x40088000u)
- /** Peripheral I2C2 base pointer */
- #define I2C2 ((I2C_Type *)I2C2_BASE)
- /** Peripheral I2C3 base address */
- #define I2C3_BASE (0x40089000u)
- /** Peripheral I2C3 base pointer */
- #define I2C3 ((I2C_Type *)I2C3_BASE)
- /** Peripheral I2C4 base address */
- #define I2C4_BASE (0x4008A000u)
- /** Peripheral I2C4 base pointer */
- #define I2C4 ((I2C_Type *)I2C4_BASE)
- /** Peripheral I2C5 base address */
- #define I2C5_BASE (0x40096000u)
- /** Peripheral I2C5 base pointer */
- #define I2C5 ((I2C_Type *)I2C5_BASE)
- /** Peripheral I2C6 base address */
- #define I2C6_BASE (0x40097000u)
- /** Peripheral I2C6 base pointer */
- #define I2C6 ((I2C_Type *)I2C6_BASE)
- /** Peripheral I2C7 base address */
- #define I2C7_BASE (0x40098000u)
- /** Peripheral I2C7 base pointer */
- #define I2C7 ((I2C_Type *)I2C7_BASE)
- /** Array initializer of I2C peripheral base addresses */
- #define I2C_BASE_ADDRS { I2C0_BASE, I2C1_BASE, I2C2_BASE, I2C3_BASE, I2C4_BASE, I2C5_BASE, I2C6_BASE, I2C7_BASE }
- /** Array initializer of I2C peripheral base pointers */
- #define I2C_BASE_PTRS { I2C0, I2C1, I2C2, I2C3, I2C4, I2C5, I2C6, I2C7 }
-#endif
-/** Interrupt vectors for the I2C peripheral type */
-#define I2C_IRQS { FLEXCOMM0_IRQn, FLEXCOMM1_IRQn, FLEXCOMM2_IRQn, FLEXCOMM3_IRQn, FLEXCOMM4_IRQn, FLEXCOMM5_IRQn, FLEXCOMM6_IRQn, FLEXCOMM7_IRQn }
-
-/*!
- * @}
- */ /* end of group I2C_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- I2S Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup I2S_Peripheral_Access_Layer I2S Peripheral Access Layer
- * @{
- */
-
-/** I2S - Register Layout Typedef */
-typedef struct {
- uint8_t RESERVED_0[3072];
- __IO uint32_t CFG1; /**< Configuration register 1 for the primary channel pair., offset: 0xC00 */
- __IO uint32_t CFG2; /**< Configuration register 2 for the primary channel pair., offset: 0xC04 */
- __IO uint32_t STAT; /**< Status register for the primary channel pair., offset: 0xC08 */
- uint8_t RESERVED_1[16];
- __IO uint32_t DIV; /**< Clock divider, used by all channel pairs., offset: 0xC1C */
- uint8_t RESERVED_2[480];
- __IO uint32_t FIFOCFG; /**< FIFO configuration and enable register., offset: 0xE00 */
- __IO uint32_t FIFOSTAT; /**< FIFO status register., offset: 0xE04 */
- __IO uint32_t FIFOTRIG; /**< FIFO trigger settings for interrupt and DMA request., offset: 0xE08 */
- uint8_t RESERVED_3[4];
- __IO uint32_t FIFOINTENSET; /**< FIFO interrupt enable set (enable) and read register., offset: 0xE10 */
- __IO uint32_t FIFOINTENCLR; /**< FIFO interrupt enable clear (disable) and read register., offset: 0xE14 */
- __I uint32_t FIFOINTSTAT; /**< FIFO interrupt status register., offset: 0xE18 */
- uint8_t RESERVED_4[4];
- __O uint32_t FIFOWR; /**< FIFO write data., offset: 0xE20 */
- __O uint32_t FIFOWR48H; /**< FIFO write data for upper data bits. May only be used if the I2S is configured for 2x 24-bit data and not using DMA., offset: 0xE24 */
- uint8_t RESERVED_5[8];
- __I uint32_t FIFORD; /**< FIFO read data., offset: 0xE30 */
- __I uint32_t FIFORD48H; /**< FIFO read data for upper data bits. May only be used if the I2S is configured for 2x 24-bit data and not using DMA., offset: 0xE34 */
- uint8_t RESERVED_6[8];
- __I uint32_t FIFORDNOPOP; /**< FIFO data read with no FIFO pop., offset: 0xE40 */
- __I uint32_t FIFORD48HNOPOP; /**< FIFO data read for upper data bits with no FIFO pop. May only be used if the I2S is configured for 2x 24-bit data and not using DMA., offset: 0xE44 */
- uint8_t RESERVED_7[436];
- __I uint32_t ID; /**< I2S Module identification, offset: 0xFFC */
-} I2S_Type;
-
-/* ----------------------------------------------------------------------------
- -- I2S Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup I2S_Register_Masks I2S Register Masks
- * @{
- */
-
-/*! @name CFG1 - Configuration register 1 for the primary channel pair. */
-/*! @{ */
-#define I2S_CFG1_MAINENABLE_MASK (0x1U)
-#define I2S_CFG1_MAINENABLE_SHIFT (0U)
-/*! MAINENABLE - Main enable for I 2S function in this Flexcomm
- * 0b0..All I 2S channel pairs in this Flexcomm are disabled and the internal state machines, counters, and flags
- * are reset. No other channel pairs can be enabled.
- * 0b1..This I 2S channel pair is enabled. Other channel pairs in this Flexcomm may be enabled in their individual PAIRENABLE bits.
- */
-#define I2S_CFG1_MAINENABLE(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_MAINENABLE_SHIFT)) & I2S_CFG1_MAINENABLE_MASK)
-#define I2S_CFG1_DATAPAUSE_MASK (0x2U)
-#define I2S_CFG1_DATAPAUSE_SHIFT (1U)
-/*! DATAPAUSE - Data flow Pause. Allows pausing data flow between the I2S serializer/deserializer
- * and the FIFO. This could be done in order to change streams, or while restarting after a data
- * underflow or overflow. When paused, FIFO operations can be done without corrupting data that is
- * in the process of being sent or received. Once a data pause has been requested, the interface
- * may need to complete sending data that was in progress before interrupting the flow of data.
- * Software must check that the pause is actually in effect before taking action. This is done by
- * monitoring the DATAPAUSED flag in the STAT register. When DATAPAUSE is cleared, data transfer
- * will resume at the beginning of the next frame.
- * 0b0..Normal operation, or resuming normal operation at the next frame if the I2S has already been paused.
- * 0b1..A pause in the data flow is being requested. It is in effect when DATAPAUSED in STAT = 1.
- */
-#define I2S_CFG1_DATAPAUSE(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_DATAPAUSE_SHIFT)) & I2S_CFG1_DATAPAUSE_MASK)
-#define I2S_CFG1_PAIRCOUNT_MASK (0xCU)
-#define I2S_CFG1_PAIRCOUNT_SHIFT (2U)
-/*! PAIRCOUNT - Provides the number of I2S channel pairs in this Flexcomm This is a read-only field
- * whose value may be different in other Flexcomms. 00 = there is 1 I2S channel pair in this
- * Flexcomm. 01 = there are 2 I2S channel pairs in this Flexcomm. 10 = there are 3 I2S channel pairs
- * in this Flexcomm. 11 = there are 4 I2S channel pairs in this Flexcomm.
- * 0b00..1 I2S channel pairs in this flexcomm
- * 0b01..2 I2S channel pairs in this flexcomm
- * 0b10..3 I2S channel pairs in this flexcomm
- * 0b11..4 I2S channel pairs in this flexcomm
- */
-#define I2S_CFG1_PAIRCOUNT(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_PAIRCOUNT_SHIFT)) & I2S_CFG1_PAIRCOUNT_MASK)
-#define I2S_CFG1_MSTSLVCFG_MASK (0x30U)
-#define I2S_CFG1_MSTSLVCFG_SHIFT (4U)
-/*! MSTSLVCFG - Master / slave configuration selection, determining how SCK and WS are used by all channel pairs in this Flexcomm.
- * 0b00..Normal slave mode, the default mode. SCK and WS are received from a master and used to transmit or receive data.
- * 0b01..WS synchronized master. WS is received from another master and used to synchronize the generation of
- * SCK, when divided from the Flexcomm function clock.
- * 0b10..Master using an existing SCK. SCK is received and used directly to generate WS, as well as transmitting or receiving data.
- * 0b11..Normal master mode. SCK and WS are generated so they can be sent to one or more slave devices.
- */
-#define I2S_CFG1_MSTSLVCFG(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_MSTSLVCFG_SHIFT)) & I2S_CFG1_MSTSLVCFG_MASK)
-#define I2S_CFG1_MODE_MASK (0xC0U)
-#define I2S_CFG1_MODE_SHIFT (6U)
-/*! MODE - Selects the basic I2S operating mode. Other configurations modify this to obtain all
- * supported cases. See Formats and modes for examples.
- * 0b00..I2S mode a.k.a. 'classic' mode. WS has a 50% duty cycle, with (for each enabled channel pair) one piece
- * of left channel data occurring during the first phase, and one pieces of right channel data occurring
- * during the second phase. In this mode, the data region begins one clock after the leading WS edge for the
- * frame. For a 50% WS duty cycle, FRAMELEN must define an even number of I2S clocks for the frame. If
- * FRAMELEN defines an odd number of clocks per frame, the extra clock will occur on the right.
- * 0b01..DSP mode where WS has a 50% duty cycle. See remark for mode 0.
- * 0b10..DSP mode where WS has a one clock long pulse at the beginning of each data frame.
- * 0b11..DSP mode where WS has a one data slot long pulse at the beginning of each data frame.
- */
-#define I2S_CFG1_MODE(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_MODE_SHIFT)) & I2S_CFG1_MODE_MASK)
-#define I2S_CFG1_RIGHTLOW_MASK (0x100U)
-#define I2S_CFG1_RIGHTLOW_SHIFT (8U)
-/*! RIGHTLOW - Right channel data is in the Low portion of FIFO data. Essentially, this swaps left
- * and right channel data as it is transferred to or from the FIFO. This bit is not used if the
- * data width is greater than 24 bits or if PDMDATA = 1. Note that if the ONECHANNEL field (bit 10
- * of this register) = 1, the one channel to be used is the nominally the left channel. POSITION
- * can still place that data in the frame where right channel data is normally located. if all
- * enabled channel pairs have ONECHANNEL = 1, then RIGHTLOW = 1 is not allowed.
- * 0b0..The right channel is taken from the high part of the FIFO data. For example, when data is 16 bits, FIFO
- * bits 31:16 are used for the right channel.
- * 0b1..The right channel is taken from the low part of the FIFO data. For example, when data is 16 bits, FIFO
- * bits 15:0 are used for the right channel.
- */
-#define I2S_CFG1_RIGHTLOW(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_RIGHTLOW_SHIFT)) & I2S_CFG1_RIGHTLOW_MASK)
-#define I2S_CFG1_LEFTJUST_MASK (0x200U)
-#define I2S_CFG1_LEFTJUST_SHIFT (9U)
-/*! LEFTJUST - Left Justify data.
- * 0b0..Data is transferred between the FIFO and the I2S serializer/deserializer right justified, i.e. starting
- * from bit 0 and continuing to the position defined by DATALEN. This would correspond to right justified data
- * in the stream on the data bus.
- * 0b1..Data is transferred between the FIFO and the I2S serializer/deserializer left justified, i.e. starting
- * from the MSB of the FIFO entry and continuing for the number of bits defined by DATALEN. This would
- * correspond to left justified data in the stream on the data bus.
- */
-#define I2S_CFG1_LEFTJUST(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_LEFTJUST_SHIFT)) & I2S_CFG1_LEFTJUST_MASK)
-#define I2S_CFG1_ONECHANNEL_MASK (0x400U)
-#define I2S_CFG1_ONECHANNEL_SHIFT (10U)
-/*! ONECHANNEL - Single channel mode. Applies to both transmit and receive. This configuration bit
- * applies only to the first I2S channel pair. Other channel pairs may select this mode
- * independently in their separate CFG1 registers.
- * 0b0..I2S data for this channel pair is treated as left and right channels.
- * 0b1..I2S data for this channel pair is treated as a single channel, functionally the left channel for this
- * pair. In mode 0 only, the right side of the frame begins at POSITION = 0x100. This is because mode 0 makes a
- * clear distinction between the left and right sides of the frame. When ONECHANNEL = 1, the single channel
- * of data may be placed on the right by setting POSITION to 0x100 + the data position within the right side
- * (e.g. 0x108 would place data starting at the 8th clock after the middle of the frame). In other modes, data
- * for the single channel of data is placed at the clock defined by POSITION.
- */
-#define I2S_CFG1_ONECHANNEL(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_ONECHANNEL_SHIFT)) & I2S_CFG1_ONECHANNEL_MASK)
-#define I2S_CFG1_SCK_POL_MASK (0x1000U)
-#define I2S_CFG1_SCK_POL_SHIFT (12U)
-/*! SCK_POL - SCK polarity.
- * 0b0..Data is launched on SCK falling edges and sampled on SCK rising edges (standard for I2S).
- * 0b1..Data is launched on SCK rising edges and sampled on SCK falling edges.
- */
-#define I2S_CFG1_SCK_POL(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_SCK_POL_SHIFT)) & I2S_CFG1_SCK_POL_MASK)
-#define I2S_CFG1_WS_POL_MASK (0x2000U)
-#define I2S_CFG1_WS_POL_SHIFT (13U)
-/*! WS_POL - WS polarity.
- * 0b0..Data frames begin at a falling edge of WS (standard for classic I2S).
- * 0b1..WS is inverted, resulting in a data frame beginning at a rising edge of WS (standard for most 'non-classic' variations of I2S).
- */
-#define I2S_CFG1_WS_POL(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_WS_POL_SHIFT)) & I2S_CFG1_WS_POL_MASK)
-#define I2S_CFG1_DATALEN_MASK (0x1F0000U)
-#define I2S_CFG1_DATALEN_SHIFT (16U)
-/*! DATALEN - Data Length, minus 1 encoded, defines the number of data bits to be transmitted or
- * received for all I2S channel pairs in this Flexcomm. Note that data is only driven to or received
- * from SDA for the number of bits defined by DATALEN. DATALEN is also used in these ways by the
- * I2S: Determines the size of data transfers between the FIFO and the I2S
- * serializer/deserializer. See FIFO buffer configurations and usage In mode 1, 2, and 3, determines the location of
- * right data following left data in the frame. In mode 3 (where WS has a one data slot long pulse
- * at the beginning of each data frame) determines the duration of the WS pulse. Values: 0x00 to
- * 0x02 = not supported 0x03 = data is 4 bits in length 0x04 = data is 5 bits in length 0x1F =
- * data is 32 bits in length
- */
-#define I2S_CFG1_DATALEN(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG1_DATALEN_SHIFT)) & I2S_CFG1_DATALEN_MASK)
-/*! @} */
-
-/*! @name CFG2 - Configuration register 2 for the primary channel pair. */
-/*! @{ */
-#define I2S_CFG2_FRAMELEN_MASK (0x1FFU)
-#define I2S_CFG2_FRAMELEN_SHIFT (0U)
-/*! FRAMELEN - Frame Length, minus 1 encoded, defines the number of clocks and data bits in the
- * frames that this channel pair participates in. See Frame format. 0x000 to 0x002 = not supported
- * 0x003 = frame is 4 bits in total length 0x004 = frame is 5 bits in total length 0x1FF = frame is
- * 512 bits in total length if FRAMELEN is an defines an odd length frame (e.g. 33 clocks) in
- * mode 0 or 1, the extra clock appears in the right half. When MODE = 3, FRAMELEN must be larger
- * than DATALEN in order for the WS pulse to be generated correctly.
- */
-#define I2S_CFG2_FRAMELEN(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG2_FRAMELEN_SHIFT)) & I2S_CFG2_FRAMELEN_MASK)
-#define I2S_CFG2_POSITION_MASK (0x1FF0000U)
-#define I2S_CFG2_POSITION_SHIFT (16U)
-/*! POSITION - Data Position. Defines the location within the frame of the data for this channel
- * pair. POSITION + DATALEN must be less than FRAMELEN. See Frame format. When MODE = 0, POSITION
- * defines the location of data in both the left phase and right phase, starting one clock after
- * the WS edge. In other modes, POSITION defines the location of data within the entire frame.
- * ONECHANNEL = 1 while MODE = 0 is a special case, see the description of ONECHANNEL. The
- * combination of DATALEN and the POSITION fields of all channel pairs must be made such that the channels
- * do not overlap within the frame. 0x000 = data begins at bit position 0 (the first bit
- * position) within the frame or WS phase. 0x001 = data begins at bit position 1 within the frame or WS
- * phase. 0x002 = data begins at bit position 2 within the frame or WS phase.
- */
-#define I2S_CFG2_POSITION(x) (((uint32_t)(((uint32_t)(x)) << I2S_CFG2_POSITION_SHIFT)) & I2S_CFG2_POSITION_MASK)
-/*! @} */
-
-/*! @name STAT - Status register for the primary channel pair. */
-/*! @{ */
-#define I2S_STAT_BUSY_MASK (0x1U)
-#define I2S_STAT_BUSY_SHIFT (0U)
-/*! BUSY - Busy status for the primary channel pair. Other BUSY flags may be found in the STAT register for each channel pair.
- * 0b0..The transmitter/receiver for channel pair is currently idle.
- * 0b1..The transmitter/receiver for channel pair is currently processing data.
- */
-#define I2S_STAT_BUSY(x) (((uint32_t)(((uint32_t)(x)) << I2S_STAT_BUSY_SHIFT)) & I2S_STAT_BUSY_MASK)
-#define I2S_STAT_SLVFRMERR_MASK (0x2U)
-#define I2S_STAT_SLVFRMERR_SHIFT (1U)
-/*! SLVFRMERR - Slave Frame Error flag. This applies when at least one channel pair is operating as
- * a slave. An error indicates that the incoming WS signal did not transition as expected due to
- * a mismatch between FRAMELEN and the actual incoming I2S stream.
- * 0b0..No error has been recorded.
- * 0b1..An error has been recorded for some channel pair that is operating in slave mode. ERROR is cleared by writing a 1 to this bit position.
- */
-#define I2S_STAT_SLVFRMERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_STAT_SLVFRMERR_SHIFT)) & I2S_STAT_SLVFRMERR_MASK)
-#define I2S_STAT_LR_MASK (0x4U)
-#define I2S_STAT_LR_SHIFT (2U)
-/*! LR - Left/Right indication. This flag is considered to be a debugging aid and is not expected to
- * be used by an I2S driver. Valid when one channel pair is busy. Indicates left or right data
- * being processed for the currently busy channel pair.
- * 0b0..Left channel.
- * 0b1..Right channel.
- */
-#define I2S_STAT_LR(x) (((uint32_t)(((uint32_t)(x)) << I2S_STAT_LR_SHIFT)) & I2S_STAT_LR_MASK)
-#define I2S_STAT_DATAPAUSED_MASK (0x8U)
-#define I2S_STAT_DATAPAUSED_SHIFT (3U)
-/*! DATAPAUSED - Data Paused status flag. Applies to all I2S channels
- * 0b0..Data is not currently paused. A data pause may have been requested but is not yet in force, waiting for
- * an allowed pause point. Refer to the description of the DATAPAUSE control bit in the CFG1 register.
- * 0b1..A data pause has been requested and is now in force.
- */
-#define I2S_STAT_DATAPAUSED(x) (((uint32_t)(((uint32_t)(x)) << I2S_STAT_DATAPAUSED_SHIFT)) & I2S_STAT_DATAPAUSED_MASK)
-/*! @} */
-
-/*! @name DIV - Clock divider, used by all channel pairs. */
-/*! @{ */
-#define I2S_DIV_DIV_MASK (0xFFFU)
-#define I2S_DIV_DIV_SHIFT (0U)
-/*! DIV - This field controls how this I2S block uses the Flexcomm function clock. 0x000 = The
- * Flexcomm function clock is used directly. 0x001 = The Flexcomm function clock is divided by 2.
- * 0x002 = The Flexcomm function clock is divided by 3. 0xFFF = The Flexcomm function clock is
- * divided by 4,096.
- */
-#define I2S_DIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << I2S_DIV_DIV_SHIFT)) & I2S_DIV_DIV_MASK)
-/*! @} */
-
-/*! @name FIFOCFG - FIFO configuration and enable register. */
-/*! @{ */
-#define I2S_FIFOCFG_ENABLETX_MASK (0x1U)
-#define I2S_FIFOCFG_ENABLETX_SHIFT (0U)
-/*! ENABLETX - Enable the transmit FIFO.
- * 0b0..The transmit FIFO is not enabled.
- * 0b1..The transmit FIFO is enabled.
- */
-#define I2S_FIFOCFG_ENABLETX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_ENABLETX_SHIFT)) & I2S_FIFOCFG_ENABLETX_MASK)
-#define I2S_FIFOCFG_ENABLERX_MASK (0x2U)
-#define I2S_FIFOCFG_ENABLERX_SHIFT (1U)
-/*! ENABLERX - Enable the receive FIFO.
- * 0b0..The receive FIFO is not enabled.
- * 0b1..The receive FIFO is enabled.
- */
-#define I2S_FIFOCFG_ENABLERX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_ENABLERX_SHIFT)) & I2S_FIFOCFG_ENABLERX_MASK)
-#define I2S_FIFOCFG_TXI2SE0_MASK (0x4U)
-#define I2S_FIFOCFG_TXI2SE0_SHIFT (2U)
-/*! TXI2SE0 - Transmit I2S empty 0. Determines the value sent by the I2S in transmit mode if the TX
- * FIFO becomes empty. This value is sent repeatedly until the I2S is paused, the error is
- * cleared, new data is provided, and the I2S is un-paused.
- * 0b0..If the TX FIFO becomes empty, the last value is sent. This setting may be used when the data length is 24
- * bits or less, or when MONO = 1 for this channel pair.
- * 0b1..If the TX FIFO becomes empty, 0 is sent. Use if the data length is greater than 24 bits or if zero fill is preferred.
- */
-#define I2S_FIFOCFG_TXI2SE0(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_TXI2SE0_SHIFT)) & I2S_FIFOCFG_TXI2SE0_MASK)
-#define I2S_FIFOCFG_PACK48_MASK (0x8U)
-#define I2S_FIFOCFG_PACK48_SHIFT (3U)
-/*! PACK48 - Packing format for 48-bit data. This relates to how data is entered into or taken from the FIFO by software or DMA.
- * 0b0..48-bit I2S FIFO entries are handled as all 24-bit values.
- * 0b1..48-bit I2S FIFO entries are handled as alternating 32-bit and 16-bit values.
- */
-#define I2S_FIFOCFG_PACK48(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_PACK48_SHIFT)) & I2S_FIFOCFG_PACK48_MASK)
-#define I2S_FIFOCFG_SIZE_MASK (0x30U)
-#define I2S_FIFOCFG_SIZE_SHIFT (4U)
-/*! SIZE - FIFO size configuration. This is a read-only field. 0x0 = FIFO is configured as 16
- * entries of 8 bits. 0x1, 0x2, 0x3 = not applicable to USART.
- */
-#define I2S_FIFOCFG_SIZE(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_SIZE_SHIFT)) & I2S_FIFOCFG_SIZE_MASK)
-#define I2S_FIFOCFG_DMATX_MASK (0x1000U)
-#define I2S_FIFOCFG_DMATX_SHIFT (12U)
-/*! DMATX - DMA configuration for transmit.
- * 0b0..DMA is not used for the transmit function.
- * 0b1..Trigger DMA for the transmit function if the FIFO is not full. Generally, data interrupts would be disabled if DMA is enabled.
- */
-#define I2S_FIFOCFG_DMATX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_DMATX_SHIFT)) & I2S_FIFOCFG_DMATX_MASK)
-#define I2S_FIFOCFG_DMARX_MASK (0x2000U)
-#define I2S_FIFOCFG_DMARX_SHIFT (13U)
-/*! DMARX - DMA configuration for receive.
- * 0b0..DMA is not used for the receive function.
- * 0b1..Trigger DMA for the receive function if the FIFO is not empty. Generally, data interrupts would be disabled if DMA is enabled.
- */
-#define I2S_FIFOCFG_DMARX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_DMARX_SHIFT)) & I2S_FIFOCFG_DMARX_MASK)
-#define I2S_FIFOCFG_WAKETX_MASK (0x4000U)
-#define I2S_FIFOCFG_WAKETX_SHIFT (14U)
-/*! WAKETX - Wake-up for transmit FIFO level. This allows the device to be woken from reduced power
- * modes (up to power-down, as long as the peripheral function works in that power mode) without
- * enabling the TXLVL interrupt. Only DMA wakes up, processes data, and goes back to sleep. The
- * CPU will remain stopped until woken by another cause, such as DMA completion. See Hardware
- * Wake-up control register.
- * 0b0..Only enabled interrupts will wake up the device form reduced power modes.
- * 0b1..A device wake-up for DMA will occur if the transmit FIFO level reaches the value specified by TXLVL in
- * FIFOTRIG, even when the TXLVL interrupt is not enabled.
- */
-#define I2S_FIFOCFG_WAKETX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_WAKETX_SHIFT)) & I2S_FIFOCFG_WAKETX_MASK)
-#define I2S_FIFOCFG_WAKERX_MASK (0x8000U)
-#define I2S_FIFOCFG_WAKERX_SHIFT (15U)
-/*! WAKERX - Wake-up for receive FIFO level. This allows the device to be woken from reduced power
- * modes (up to power-down, as long as the peripheral function works in that power mode) without
- * enabling the TXLVL interrupt. Only DMA wakes up, processes data, and goes back to sleep. The
- * CPU will remain stopped until woken by another cause, such as DMA completion. See Hardware
- * Wake-up control register.
- * 0b0..Only enabled interrupts will wake up the device form reduced power modes.
- * 0b1..A device wake-up for DMA will occur if the receive FIFO level reaches the value specified by RXLVL in
- * FIFOTRIG, even when the RXLVL interrupt is not enabled.
- */
-#define I2S_FIFOCFG_WAKERX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_WAKERX_SHIFT)) & I2S_FIFOCFG_WAKERX_MASK)
-#define I2S_FIFOCFG_EMPTYTX_MASK (0x10000U)
-#define I2S_FIFOCFG_EMPTYTX_SHIFT (16U)
-/*! EMPTYTX - Empty command for the transmit FIFO. When a 1 is written to this bit, the TX FIFO is emptied.
- */
-#define I2S_FIFOCFG_EMPTYTX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_EMPTYTX_SHIFT)) & I2S_FIFOCFG_EMPTYTX_MASK)
-#define I2S_FIFOCFG_EMPTYRX_MASK (0x20000U)
-#define I2S_FIFOCFG_EMPTYRX_SHIFT (17U)
-/*! EMPTYRX - Empty command for the receive FIFO. When a 1 is written to this bit, the RX FIFO is emptied.
- */
-#define I2S_FIFOCFG_EMPTYRX(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOCFG_EMPTYRX_SHIFT)) & I2S_FIFOCFG_EMPTYRX_MASK)
-/*! @} */
-
-/*! @name FIFOSTAT - FIFO status register. */
-/*! @{ */
-#define I2S_FIFOSTAT_TXERR_MASK (0x1U)
-#define I2S_FIFOSTAT_TXERR_SHIFT (0U)
-/*! TXERR - TX FIFO error. Will be set if a transmit FIFO error occurs. This could be an overflow
- * caused by pushing data into a full FIFO, or by an underflow if the FIFO is empty when data is
- * needed. Cleared by writing a 1 to this bit.
- */
-#define I2S_FIFOSTAT_TXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_TXERR_SHIFT)) & I2S_FIFOSTAT_TXERR_MASK)
-#define I2S_FIFOSTAT_RXERR_MASK (0x2U)
-#define I2S_FIFOSTAT_RXERR_SHIFT (1U)
-/*! RXERR - RX FIFO error. Will be set if a receive FIFO overflow occurs, caused by software or DMA
- * not emptying the FIFO fast enough. Cleared by writing a 1 to this bit.
- */
-#define I2S_FIFOSTAT_RXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_RXERR_SHIFT)) & I2S_FIFOSTAT_RXERR_MASK)
-#define I2S_FIFOSTAT_PERINT_MASK (0x8U)
-#define I2S_FIFOSTAT_PERINT_SHIFT (3U)
-/*! PERINT - Peripheral interrupt. When 1, this indicates that the peripheral function has asserted
- * an interrupt. The details can be found by reading the peripheral's STAT register.
- */
-#define I2S_FIFOSTAT_PERINT(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_PERINT_SHIFT)) & I2S_FIFOSTAT_PERINT_MASK)
-#define I2S_FIFOSTAT_TXEMPTY_MASK (0x10U)
-#define I2S_FIFOSTAT_TXEMPTY_SHIFT (4U)
-/*! TXEMPTY - Transmit FIFO empty. When 1, the transmit FIFO is empty. The peripheral may still be processing the last piece of data.
- */
-#define I2S_FIFOSTAT_TXEMPTY(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_TXEMPTY_SHIFT)) & I2S_FIFOSTAT_TXEMPTY_MASK)
-#define I2S_FIFOSTAT_TXNOTFULL_MASK (0x20U)
-#define I2S_FIFOSTAT_TXNOTFULL_SHIFT (5U)
-/*! TXNOTFULL - Transmit FIFO not full. When 1, the transmit FIFO is not full, so more data can be
- * written. When 0, the transmit FIFO is full and another write would cause it to overflow.
- */
-#define I2S_FIFOSTAT_TXNOTFULL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_TXNOTFULL_SHIFT)) & I2S_FIFOSTAT_TXNOTFULL_MASK)
-#define I2S_FIFOSTAT_RXNOTEMPTY_MASK (0x40U)
-#define I2S_FIFOSTAT_RXNOTEMPTY_SHIFT (6U)
-/*! RXNOTEMPTY - Receive FIFO not empty. When 1, the receive FIFO is not empty, so data can be read. When 0, the receive FIFO is empty.
- */
-#define I2S_FIFOSTAT_RXNOTEMPTY(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_RXNOTEMPTY_SHIFT)) & I2S_FIFOSTAT_RXNOTEMPTY_MASK)
-#define I2S_FIFOSTAT_RXFULL_MASK (0x80U)
-#define I2S_FIFOSTAT_RXFULL_SHIFT (7U)
-/*! RXFULL - Receive FIFO full. When 1, the receive FIFO is full. Data needs to be read out to
- * prevent the peripheral from causing an overflow.
- */
-#define I2S_FIFOSTAT_RXFULL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_RXFULL_SHIFT)) & I2S_FIFOSTAT_RXFULL_MASK)
-#define I2S_FIFOSTAT_TXLVL_MASK (0x1F00U)
-#define I2S_FIFOSTAT_TXLVL_SHIFT (8U)
-/*! TXLVL - Transmit FIFO current level. A 0 means the TX FIFO is currently empty, and the TXEMPTY
- * and TXNOTFULL flags will be 1. Other values tell how much data is actually in the TX FIFO at
- * the point where the read occurs. If the TX FIFO is full, the TXEMPTY and TXNOTFULL flags will be
- * 0.
- */
-#define I2S_FIFOSTAT_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_TXLVL_SHIFT)) & I2S_FIFOSTAT_TXLVL_MASK)
-#define I2S_FIFOSTAT_RXLVL_MASK (0x1F0000U)
-#define I2S_FIFOSTAT_RXLVL_SHIFT (16U)
-/*! RXLVL - Receive FIFO current level. A 0 means the RX FIFO is currently empty, and the RXFULL and
- * RXNOTEMPTY flags will be 0. Other values tell how much data is actually in the RX FIFO at the
- * point where the read occurs. If the RX FIFO is full, the RXFULL and RXNOTEMPTY flags will be
- * 1.
- */
-#define I2S_FIFOSTAT_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOSTAT_RXLVL_SHIFT)) & I2S_FIFOSTAT_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOTRIG - FIFO trigger settings for interrupt and DMA request. */
-/*! @{ */
-#define I2S_FIFOTRIG_TXLVLENA_MASK (0x1U)
-#define I2S_FIFOTRIG_TXLVLENA_SHIFT (0U)
-/*! TXLVLENA - Transmit FIFO level trigger enable. This trigger will become an interrupt if enabled
- * in FIFOINTENSET, or a DMA trigger if DMATX in FIFOCFG is set.
- * 0b0..Transmit FIFO level does not generate a FIFO level trigger.
- * 0b1..An trigger will be generated if the transmit FIFO level reaches the value specified by the TXLVL field in this register.
- */
-#define I2S_FIFOTRIG_TXLVLENA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOTRIG_TXLVLENA_SHIFT)) & I2S_FIFOTRIG_TXLVLENA_MASK)
-#define I2S_FIFOTRIG_RXLVLENA_MASK (0x2U)
-#define I2S_FIFOTRIG_RXLVLENA_SHIFT (1U)
-/*! RXLVLENA - Receive FIFO level trigger enable. This trigger will become an interrupt if enabled
- * in FIFOINTENSET, or a DMA trigger if DMARX in FIFOCFG is set.
- * 0b0..Receive FIFO level does not generate a FIFO level trigger.
- * 0b1..An trigger will be generated if the receive FIFO level reaches the value specified by the RXLVL field in this register.
- */
-#define I2S_FIFOTRIG_RXLVLENA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOTRIG_RXLVLENA_SHIFT)) & I2S_FIFOTRIG_RXLVLENA_MASK)
-#define I2S_FIFOTRIG_TXLVL_MASK (0xF00U)
-#define I2S_FIFOTRIG_TXLVL_SHIFT (8U)
-/*! TXLVL - Transmit FIFO level trigger point. This field is used only when TXLVLENA = 1. If enabled
- * to do so, the FIFO level can wake up the device just enough to perform DMA, then return to
- * the reduced power mode. See Hardware Wake-up control register. 0 = trigger when the TX FIFO
- * becomes empty. 1 = trigger when the TX FIFO level decreases to one entry. 15 = trigger when the TX
- * FIFO level decreases to 15 entries (is no longer full).
- */
-#define I2S_FIFOTRIG_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOTRIG_TXLVL_SHIFT)) & I2S_FIFOTRIG_TXLVL_MASK)
-#define I2S_FIFOTRIG_RXLVL_MASK (0xF0000U)
-#define I2S_FIFOTRIG_RXLVL_SHIFT (16U)
-/*! RXLVL - Receive FIFO level trigger point. The RX FIFO level is checked when a new piece of data
- * is received. This field is used only when RXLVLENA = 1. If enabled to do so, the FIFO level
- * can wake up the device just enough to perform DMA, then return to the reduced power mode. See
- * Hardware Wake-up control register. 0 = trigger when the RX FIFO has received one entry (is no
- * longer empty). 1 = trigger when the RX FIFO has received two entries. 15 = trigger when the RX
- * FIFO has received 16 entries (has become full).
- */
-#define I2S_FIFOTRIG_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOTRIG_RXLVL_SHIFT)) & I2S_FIFOTRIG_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTENSET - FIFO interrupt enable set (enable) and read register. */
-/*! @{ */
-#define I2S_FIFOINTENSET_TXERR_MASK (0x1U)
-#define I2S_FIFOINTENSET_TXERR_SHIFT (0U)
-/*! TXERR - Determines whether an interrupt occurs when a transmit error occurs, based on the TXERR flag in the FIFOSTAT register.
- * 0b0..No interrupt will be generated for a transmit error.
- * 0b1..An interrupt will be generated when a transmit error occurs.
- */
-#define I2S_FIFOINTENSET_TXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENSET_TXERR_SHIFT)) & I2S_FIFOINTENSET_TXERR_MASK)
-#define I2S_FIFOINTENSET_RXERR_MASK (0x2U)
-#define I2S_FIFOINTENSET_RXERR_SHIFT (1U)
-/*! RXERR - Determines whether an interrupt occurs when a receive error occurs, based on the RXERR flag in the FIFOSTAT register.
- * 0b0..No interrupt will be generated for a receive error.
- * 0b1..An interrupt will be generated when a receive error occurs.
- */
-#define I2S_FIFOINTENSET_RXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENSET_RXERR_SHIFT)) & I2S_FIFOINTENSET_RXERR_MASK)
-#define I2S_FIFOINTENSET_TXLVL_MASK (0x4U)
-#define I2S_FIFOINTENSET_TXLVL_SHIFT (2U)
-/*! TXLVL - Determines whether an interrupt occurs when a the transmit FIFO reaches the level
- * specified by the TXLVL field in the FIFOTRIG register.
- * 0b0..No interrupt will be generated based on the TX FIFO level.
- * 0b1..If TXLVLENA in the FIFOTRIG register = 1, an interrupt will be generated when the TX FIFO level decreases
- * to the level specified by TXLVL in the FIFOTRIG register.
- */
-#define I2S_FIFOINTENSET_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENSET_TXLVL_SHIFT)) & I2S_FIFOINTENSET_TXLVL_MASK)
-#define I2S_FIFOINTENSET_RXLVL_MASK (0x8U)
-#define I2S_FIFOINTENSET_RXLVL_SHIFT (3U)
-/*! RXLVL - Determines whether an interrupt occurs when a the receive FIFO reaches the level
- * specified by the TXLVL field in the FIFOTRIG register.
- * 0b0..No interrupt will be generated based on the RX FIFO level.
- * 0b1..If RXLVLENA in the FIFOTRIG register = 1, an interrupt will be generated when the when the RX FIFO level
- * increases to the level specified by RXLVL in the FIFOTRIG register.
- */
-#define I2S_FIFOINTENSET_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENSET_RXLVL_SHIFT)) & I2S_FIFOINTENSET_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTENCLR - FIFO interrupt enable clear (disable) and read register. */
-/*! @{ */
-#define I2S_FIFOINTENCLR_TXERR_MASK (0x1U)
-#define I2S_FIFOINTENCLR_TXERR_SHIFT (0U)
-/*! TXERR - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define I2S_FIFOINTENCLR_TXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENCLR_TXERR_SHIFT)) & I2S_FIFOINTENCLR_TXERR_MASK)
-#define I2S_FIFOINTENCLR_RXERR_MASK (0x2U)
-#define I2S_FIFOINTENCLR_RXERR_SHIFT (1U)
-/*! RXERR - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define I2S_FIFOINTENCLR_RXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENCLR_RXERR_SHIFT)) & I2S_FIFOINTENCLR_RXERR_MASK)
-#define I2S_FIFOINTENCLR_TXLVL_MASK (0x4U)
-#define I2S_FIFOINTENCLR_TXLVL_SHIFT (2U)
-/*! TXLVL - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define I2S_FIFOINTENCLR_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENCLR_TXLVL_SHIFT)) & I2S_FIFOINTENCLR_TXLVL_MASK)
-#define I2S_FIFOINTENCLR_RXLVL_MASK (0x8U)
-#define I2S_FIFOINTENCLR_RXLVL_SHIFT (3U)
-/*! RXLVL - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define I2S_FIFOINTENCLR_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTENCLR_RXLVL_SHIFT)) & I2S_FIFOINTENCLR_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTSTAT - FIFO interrupt status register. */
-/*! @{ */
-#define I2S_FIFOINTSTAT_TXERR_MASK (0x1U)
-#define I2S_FIFOINTSTAT_TXERR_SHIFT (0U)
-/*! TXERR - TX FIFO error.
- */
-#define I2S_FIFOINTSTAT_TXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTSTAT_TXERR_SHIFT)) & I2S_FIFOINTSTAT_TXERR_MASK)
-#define I2S_FIFOINTSTAT_RXERR_MASK (0x2U)
-#define I2S_FIFOINTSTAT_RXERR_SHIFT (1U)
-/*! RXERR - RX FIFO error.
- */
-#define I2S_FIFOINTSTAT_RXERR(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTSTAT_RXERR_SHIFT)) & I2S_FIFOINTSTAT_RXERR_MASK)
-#define I2S_FIFOINTSTAT_TXLVL_MASK (0x4U)
-#define I2S_FIFOINTSTAT_TXLVL_SHIFT (2U)
-/*! TXLVL - Transmit FIFO level interrupt.
- */
-#define I2S_FIFOINTSTAT_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTSTAT_TXLVL_SHIFT)) & I2S_FIFOINTSTAT_TXLVL_MASK)
-#define I2S_FIFOINTSTAT_RXLVL_MASK (0x8U)
-#define I2S_FIFOINTSTAT_RXLVL_SHIFT (3U)
-/*! RXLVL - Receive FIFO level interrupt.
- */
-#define I2S_FIFOINTSTAT_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTSTAT_RXLVL_SHIFT)) & I2S_FIFOINTSTAT_RXLVL_MASK)
-#define I2S_FIFOINTSTAT_PERINT_MASK (0x10U)
-#define I2S_FIFOINTSTAT_PERINT_SHIFT (4U)
-/*! PERINT - Peripheral interrupt.
- */
-#define I2S_FIFOINTSTAT_PERINT(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOINTSTAT_PERINT_SHIFT)) & I2S_FIFOINTSTAT_PERINT_MASK)
-/*! @} */
-
-/*! @name FIFOWR - FIFO write data. */
-/*! @{ */
-#define I2S_FIFOWR_TXDATA_MASK (0xFFFFFFFFU)
-#define I2S_FIFOWR_TXDATA_SHIFT (0U)
-/*! TXDATA - Transmit data to the FIFO. The number of bits used depends on configuration details.
- */
-#define I2S_FIFOWR_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOWR_TXDATA_SHIFT)) & I2S_FIFOWR_TXDATA_MASK)
-/*! @} */
-
-/*! @name FIFOWR48H - FIFO write data for upper data bits. May only be used if the I2S is configured for 2x 24-bit data and not using DMA. */
-/*! @{ */
-#define I2S_FIFOWR48H_TXDATA_MASK (0xFFFFFFU)
-#define I2S_FIFOWR48H_TXDATA_SHIFT (0U)
-/*! TXDATA - Transmit data to the FIFO. Whether this register is used and the number of bits used depends on configuration details.
- */
-#define I2S_FIFOWR48H_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFOWR48H_TXDATA_SHIFT)) & I2S_FIFOWR48H_TXDATA_MASK)
-/*! @} */
-
-/*! @name FIFORD - FIFO read data. */
-/*! @{ */
-#define I2S_FIFORD_RXDATA_MASK (0xFFFFFFFFU)
-#define I2S_FIFORD_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO. The number of bits used depends on configuration details.
- */
-#define I2S_FIFORD_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFORD_RXDATA_SHIFT)) & I2S_FIFORD_RXDATA_MASK)
-/*! @} */
-
-/*! @name FIFORD48H - FIFO read data for upper data bits. May only be used if the I2S is configured for 2x 24-bit data and not using DMA. */
-/*! @{ */
-#define I2S_FIFORD48H_RXDATA_MASK (0xFFFFFFU)
-#define I2S_FIFORD48H_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO. Whether this register is used and the number of bits used depends on configuration details.
- */
-#define I2S_FIFORD48H_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFORD48H_RXDATA_SHIFT)) & I2S_FIFORD48H_RXDATA_MASK)
-/*! @} */
-
-/*! @name FIFORDNOPOP - FIFO data read with no FIFO pop. */
-/*! @{ */
-#define I2S_FIFORDNOPOP_RXDATA_MASK (0xFFFFFFFFU)
-#define I2S_FIFORDNOPOP_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO.
- */
-#define I2S_FIFORDNOPOP_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFORDNOPOP_RXDATA_SHIFT)) & I2S_FIFORDNOPOP_RXDATA_MASK)
-/*! @} */
-
-/*! @name FIFORD48HNOPOP - FIFO data read for upper data bits with no FIFO pop. May only be used if the I2S is configured for 2x 24-bit data and not using DMA. */
-/*! @{ */
-#define I2S_FIFORD48HNOPOP_RXDATA_MASK (0xFFFFFFU)
-#define I2S_FIFORD48HNOPOP_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO. Whether this register is used and the number of bits used depends on configuration details.
- */
-#define I2S_FIFORD48HNOPOP_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << I2S_FIFORD48HNOPOP_RXDATA_SHIFT)) & I2S_FIFORD48HNOPOP_RXDATA_MASK)
-/*! @} */
-
-/*! @name ID - I2S Module identification */
-/*! @{ */
-#define I2S_ID_APERTURE_MASK (0xFFU)
-#define I2S_ID_APERTURE_SHIFT (0U)
-/*! APERTURE - Aperture: encoded as (aperture size/4K) -1, so 0x00 means a 4K aperture.
- */
-#define I2S_ID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << I2S_ID_APERTURE_SHIFT)) & I2S_ID_APERTURE_MASK)
-#define I2S_ID_MINOR_REV_MASK (0xF00U)
-#define I2S_ID_MINOR_REV_SHIFT (8U)
-/*! MINOR_REV - Minor revision of module implementation, starting at 0.
- */
-#define I2S_ID_MINOR_REV(x) (((uint32_t)(((uint32_t)(x)) << I2S_ID_MINOR_REV_SHIFT)) & I2S_ID_MINOR_REV_MASK)
-#define I2S_ID_MAJOR_REV_MASK (0xF000U)
-#define I2S_ID_MAJOR_REV_SHIFT (12U)
-/*! MAJOR_REV - Major revision of module implementation, starting at 0.
- */
-#define I2S_ID_MAJOR_REV(x) (((uint32_t)(((uint32_t)(x)) << I2S_ID_MAJOR_REV_SHIFT)) & I2S_ID_MAJOR_REV_MASK)
-#define I2S_ID_ID_MASK (0xFFFF0000U)
-#define I2S_ID_ID_SHIFT (16U)
-/*! ID - Unique module identifier for this IP block.
- */
-#define I2S_ID_ID(x) (((uint32_t)(((uint32_t)(x)) << I2S_ID_ID_SHIFT)) & I2S_ID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group I2S_Register_Masks */
-
-
-/* I2S - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral I2S0 base address */
- #define I2S0_BASE (0x50086000u)
- /** Peripheral I2S0 base address */
- #define I2S0_BASE_NS (0x40086000u)
- /** Peripheral I2S0 base pointer */
- #define I2S0 ((I2S_Type *)I2S0_BASE)
- /** Peripheral I2S0 base pointer */
- #define I2S0_NS ((I2S_Type *)I2S0_BASE_NS)
- /** Peripheral I2S1 base address */
- #define I2S1_BASE (0x50087000u)
- /** Peripheral I2S1 base address */
- #define I2S1_BASE_NS (0x40087000u)
- /** Peripheral I2S1 base pointer */
- #define I2S1 ((I2S_Type *)I2S1_BASE)
- /** Peripheral I2S1 base pointer */
- #define I2S1_NS ((I2S_Type *)I2S1_BASE_NS)
- /** Peripheral I2S2 base address */
- #define I2S2_BASE (0x50088000u)
- /** Peripheral I2S2 base address */
- #define I2S2_BASE_NS (0x40088000u)
- /** Peripheral I2S2 base pointer */
- #define I2S2 ((I2S_Type *)I2S2_BASE)
- /** Peripheral I2S2 base pointer */
- #define I2S2_NS ((I2S_Type *)I2S2_BASE_NS)
- /** Peripheral I2S3 base address */
- #define I2S3_BASE (0x50089000u)
- /** Peripheral I2S3 base address */
- #define I2S3_BASE_NS (0x40089000u)
- /** Peripheral I2S3 base pointer */
- #define I2S3 ((I2S_Type *)I2S3_BASE)
- /** Peripheral I2S3 base pointer */
- #define I2S3_NS ((I2S_Type *)I2S3_BASE_NS)
- /** Peripheral I2S4 base address */
- #define I2S4_BASE (0x5008A000u)
- /** Peripheral I2S4 base address */
- #define I2S4_BASE_NS (0x4008A000u)
- /** Peripheral I2S4 base pointer */
- #define I2S4 ((I2S_Type *)I2S4_BASE)
- /** Peripheral I2S4 base pointer */
- #define I2S4_NS ((I2S_Type *)I2S4_BASE_NS)
- /** Peripheral I2S5 base address */
- #define I2S5_BASE (0x50096000u)
- /** Peripheral I2S5 base address */
- #define I2S5_BASE_NS (0x40096000u)
- /** Peripheral I2S5 base pointer */
- #define I2S5 ((I2S_Type *)I2S5_BASE)
- /** Peripheral I2S5 base pointer */
- #define I2S5_NS ((I2S_Type *)I2S5_BASE_NS)
- /** Peripheral I2S6 base address */
- #define I2S6_BASE (0x50097000u)
- /** Peripheral I2S6 base address */
- #define I2S6_BASE_NS (0x40097000u)
- /** Peripheral I2S6 base pointer */
- #define I2S6 ((I2S_Type *)I2S6_BASE)
- /** Peripheral I2S6 base pointer */
- #define I2S6_NS ((I2S_Type *)I2S6_BASE_NS)
- /** Peripheral I2S7 base address */
- #define I2S7_BASE (0x50098000u)
- /** Peripheral I2S7 base address */
- #define I2S7_BASE_NS (0x40098000u)
- /** Peripheral I2S7 base pointer */
- #define I2S7 ((I2S_Type *)I2S7_BASE)
- /** Peripheral I2S7 base pointer */
- #define I2S7_NS ((I2S_Type *)I2S7_BASE_NS)
- /** Array initializer of I2S peripheral base addresses */
- #define I2S_BASE_ADDRS { I2S0_BASE, I2S1_BASE, I2S2_BASE, I2S3_BASE, I2S4_BASE, I2S5_BASE, I2S6_BASE, I2S7_BASE }
- /** Array initializer of I2S peripheral base pointers */
- #define I2S_BASE_PTRS { I2S0, I2S1, I2S2, I2S3, I2S4, I2S5, I2S6, I2S7 }
- /** Array initializer of I2S peripheral base addresses */
- #define I2S_BASE_ADDRS_NS { I2S0_BASE_NS, I2S1_BASE_NS, I2S2_BASE_NS, I2S3_BASE_NS, I2S4_BASE_NS, I2S5_BASE_NS, I2S6_BASE_NS, I2S7_BASE_NS }
- /** Array initializer of I2S peripheral base pointers */
- #define I2S_BASE_PTRS_NS { I2S0_NS, I2S1_NS, I2S2_NS, I2S3_NS, I2S4_NS, I2S5_NS, I2S6_NS, I2S7_NS }
-#else
- /** Peripheral I2S0 base address */
- #define I2S0_BASE (0x40086000u)
- /** Peripheral I2S0 base pointer */
- #define I2S0 ((I2S_Type *)I2S0_BASE)
- /** Peripheral I2S1 base address */
- #define I2S1_BASE (0x40087000u)
- /** Peripheral I2S1 base pointer */
- #define I2S1 ((I2S_Type *)I2S1_BASE)
- /** Peripheral I2S2 base address */
- #define I2S2_BASE (0x40088000u)
- /** Peripheral I2S2 base pointer */
- #define I2S2 ((I2S_Type *)I2S2_BASE)
- /** Peripheral I2S3 base address */
- #define I2S3_BASE (0x40089000u)
- /** Peripheral I2S3 base pointer */
- #define I2S3 ((I2S_Type *)I2S3_BASE)
- /** Peripheral I2S4 base address */
- #define I2S4_BASE (0x4008A000u)
- /** Peripheral I2S4 base pointer */
- #define I2S4 ((I2S_Type *)I2S4_BASE)
- /** Peripheral I2S5 base address */
- #define I2S5_BASE (0x40096000u)
- /** Peripheral I2S5 base pointer */
- #define I2S5 ((I2S_Type *)I2S5_BASE)
- /** Peripheral I2S6 base address */
- #define I2S6_BASE (0x40097000u)
- /** Peripheral I2S6 base pointer */
- #define I2S6 ((I2S_Type *)I2S6_BASE)
- /** Peripheral I2S7 base address */
- #define I2S7_BASE (0x40098000u)
- /** Peripheral I2S7 base pointer */
- #define I2S7 ((I2S_Type *)I2S7_BASE)
- /** Array initializer of I2S peripheral base addresses */
- #define I2S_BASE_ADDRS { I2S0_BASE, I2S1_BASE, I2S2_BASE, I2S3_BASE, I2S4_BASE, I2S5_BASE, I2S6_BASE, I2S7_BASE }
- /** Array initializer of I2S peripheral base pointers */
- #define I2S_BASE_PTRS { I2S0, I2S1, I2S2, I2S3, I2S4, I2S5, I2S6, I2S7 }
-#endif
-/** Interrupt vectors for the I2S peripheral type */
-#define I2S_IRQS { FLEXCOMM0_IRQn, FLEXCOMM1_IRQn, FLEXCOMM2_IRQn, FLEXCOMM3_IRQn, FLEXCOMM4_IRQn, FLEXCOMM5_IRQn, FLEXCOMM6_IRQn, FLEXCOMM7_IRQn }
-
-/*!
- * @}
- */ /* end of group I2S_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- INPUTMUX Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup INPUTMUX_Peripheral_Access_Layer INPUTMUX Peripheral Access Layer
- * @{
- */
-
-/** INPUTMUX - Register Layout Typedef */
-typedef struct {
- __IO uint32_t SCT0_INMUX[7]; /**< Input mux register for SCT0 input, array offset: 0x0, array step: 0x4 */
- uint8_t RESERVED_0[4];
- __IO uint32_t TIMER0CAPTSEL[4]; /**< Capture select registers for TIMER0 inputs, array offset: 0x20, array step: 0x4 */
- uint8_t RESERVED_1[16];
- __IO uint32_t TIMER1CAPTSEL[4]; /**< Capture select registers for TIMER1 inputs, array offset: 0x40, array step: 0x4 */
- uint8_t RESERVED_2[16];
- __IO uint32_t TIMER2CAPTSEL[4]; /**< Capture select registers for TIMER2 inputs, array offset: 0x60, array step: 0x4 */
- uint8_t RESERVED_3[80];
- __IO uint32_t PINTSEL[8]; /**< Pin interrupt select register, array offset: 0xC0, array step: 0x4 */
- __IO uint32_t DMA0_ITRIG_INMUX[23]; /**< Trigger select register for DMA0 channel, array offset: 0xE0, array step: 0x4 */
- uint8_t RESERVED_4[36];
- __IO uint32_t DMA0_OTRIG_INMUX[4]; /**< DMA0 output trigger selection to become DMA0 trigger, array offset: 0x160, array step: 0x4 */
- uint8_t RESERVED_5[16];
- __IO uint32_t FREQMEAS_REF; /**< Selection for frequency measurement reference clock, offset: 0x180 */
- __IO uint32_t FREQMEAS_TARGET; /**< Selection for frequency measurement target clock, offset: 0x184 */
- uint8_t RESERVED_6[24];
- __IO uint32_t TIMER3CAPTSEL[4]; /**< Capture select registers for TIMER3 inputs, array offset: 0x1A0, array step: 0x4 */
- uint8_t RESERVED_7[16];
- __IO uint32_t TIMER4CAPTSEL[4]; /**< Capture select registers for TIMER4 inputs, array offset: 0x1C0, array step: 0x4 */
- uint8_t RESERVED_8[16];
- __IO uint32_t PINTSECSEL[2]; /**< Pin interrupt secure select register, array offset: 0x1E0, array step: 0x4 */
- uint8_t RESERVED_9[24];
- __IO uint32_t DMA1_ITRIG_INMUX[10]; /**< Trigger select register for DMA1 channel, array offset: 0x200, array step: 0x4 */
- uint8_t RESERVED_10[24];
- __IO uint32_t DMA1_OTRIG_INMUX[4]; /**< DMA1 output trigger selection to become DMA1 trigger, array offset: 0x240, array step: 0x4 */
- uint8_t RESERVED_11[1264];
- __IO uint32_t DMA0_REQ_ENA; /**< Enable DMA0 requests, offset: 0x740 */
- uint8_t RESERVED_12[4];
- __O uint32_t DMA0_REQ_ENA_SET; /**< Set one or several bits in DMA0_REQ_ENA register, offset: 0x748 */
- uint8_t RESERVED_13[4];
- __O uint32_t DMA0_REQ_ENA_CLR; /**< Clear one or several bits in DMA0_REQ_ENA register, offset: 0x750 */
- uint8_t RESERVED_14[12];
- __IO uint32_t DMA1_REQ_ENA; /**< Enable DMA1 requests, offset: 0x760 */
- uint8_t RESERVED_15[4];
- __O uint32_t DMA1_REQ_ENA_SET; /**< Set one or several bits in DMA1_REQ_ENA register, offset: 0x768 */
- uint8_t RESERVED_16[4];
- __O uint32_t DMA1_REQ_ENA_CLR; /**< Clear one or several bits in DMA1_REQ_ENA register, offset: 0x770 */
- uint8_t RESERVED_17[12];
- __IO uint32_t DMA0_ITRIG_ENA; /**< Enable DMA0 triggers, offset: 0x780 */
- uint8_t RESERVED_18[4];
- __O uint32_t DMA0_ITRIG_ENA_SET; /**< Set one or several bits in DMA0_ITRIG_ENA register, offset: 0x788 */
- uint8_t RESERVED_19[4];
- __O uint32_t DMA0_ITRIG_ENA_CLR; /**< Clear one or several bits in DMA0_ITRIG_ENA register, offset: 0x790 */
- uint8_t RESERVED_20[12];
- __IO uint32_t DMA1_ITRIG_ENA; /**< Enable DMA1 triggers, offset: 0x7A0 */
- uint8_t RESERVED_21[4];
- __O uint32_t DMA1_ITRIG_ENA_SET; /**< Set one or several bits in DMA1_ITRIG_ENA register, offset: 0x7A8 */
- uint8_t RESERVED_22[4];
- __O uint32_t DMA1_ITRIG_ENA_CLR; /**< Clear one or several bits in DMA1_ITRIG_ENA register, offset: 0x7B0 */
-} INPUTMUX_Type;
-
-/* ----------------------------------------------------------------------------
- -- INPUTMUX Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup INPUTMUX_Register_Masks INPUTMUX Register Masks
- * @{
- */
-
-/*! @name SCT0_INMUX - Input mux register for SCT0 input */
-/*! @{ */
-#define INPUTMUX_SCT0_INMUX_INP_N_MASK (0x1FU)
-#define INPUTMUX_SCT0_INMUX_INP_N_SHIFT (0U)
-/*! INP_N - Input number to SCT0 inputs 0 to 6..
- * 0b00000..SCT_GPI0 function selected from IOCON register
- * 0b00001..SCT_GPI1 function selected from IOCON register
- * 0b00010..SCT_GPI2 function selected from IOCON register
- * 0b00011..SCT_GPI3 function selected from IOCON register
- * 0b00100..SCT_GPI4 function selected from IOCON register
- * 0b00101..SCT_GPI5 function selected from IOCON register
- * 0b00110..SCT_GPI6 function selected from IOCON register
- * 0b00111..SCT_GPI7 function selected from IOCON register
- * 0b01000..T0_OUT0 ctimer 0 match[0] output
- * 0b01001..T1_OUT0 ctimer 1 match[0] output
- * 0b01010..T2_OUT0 ctimer 2 match[0] output
- * 0b01011..T3_OUT0 ctimer 3 match[0] output
- * 0b01100..T4_OUT0 ctimer 4 match[0] output
- * 0b01101..ADC_IRQ interrupt request from ADC
- * 0b01110..GPIOINT_BMATCH
- * 0b01111..USB0_FRAME_TOGGLE
- * 0b10000..USB1_FRAME_TOGGLE
- * 0b10001..COMP_OUTPUT output from analog comparator
- * 0b10010..I2S_SHARED_SCK[0] output from I2S pin sharing
- * 0b10011..I2S_SHARED_SCK[1] output from I2S pin sharing
- * 0b10100..I2S_SHARED_WS[0] output from I2S pin sharing
- * 0b10101..I2S_SHARED_WS[1] output from I2S pin sharing
- * 0b10110..ARM_TXEV interrupt event from cpu0 or cpu1
- * 0b10111..DEBUG_HALTED from cpu0 or cpu1
- * 0b11000-0b11111..None
- */
-#define INPUTMUX_SCT0_INMUX_INP_N(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_SCT0_INMUX_INP_N_SHIFT)) & INPUTMUX_SCT0_INMUX_INP_N_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_SCT0_INMUX */
-#define INPUTMUX_SCT0_INMUX_COUNT (7U)
-
-/*! @name TIMER0CAPTSEL - Capture select registers for TIMER0 inputs */
-/*! @{ */
-#define INPUTMUX_TIMER0CAPTSEL_CAPTSEL_MASK (0x1FU)
-#define INPUTMUX_TIMER0CAPTSEL_CAPTSEL_SHIFT (0U)
-/*! CAPTSEL - Input number to TIMER0 capture inputs 0 to 4
- * 0b00000..CT_INP0 function selected from IOCON register
- * 0b00001..CT_INP1 function selected from IOCON register
- * 0b00010..CT_INP2 function selected from IOCON register
- * 0b00011..CT_INP3 function selected from IOCON register
- * 0b00100..CT_INP4 function selected from IOCON register
- * 0b00101..CT_INP5 function selected from IOCON register
- * 0b00110..CT_INP6 function selected from IOCON register
- * 0b00111..CT_INP7 function selected from IOCON register
- * 0b01000..CT_INP8 function selected from IOCON register
- * 0b01001..CT_INP9 function selected from IOCON register
- * 0b01010..CT_INP10 function selected from IOCON register
- * 0b01011..CT_INP11 function selected from IOCON register
- * 0b01100..CT_INP12 function selected from IOCON register
- * 0b01101..CT_INP13 function selected from IOCON register
- * 0b01110..CT_INP14 function selected from IOCON register
- * 0b01111..CT_INP15 function selected from IOCON register
- * 0b10000..CT_INP16 function selected from IOCON register
- * 0b10001..None
- * 0b10010..None
- * 0b10011..None
- * 0b10100..USB0_FRAME_TOGGLE
- * 0b10101..USB1_FRAME_TOGGLE
- * 0b10110..COMP_OUTPUT output from analog comparator
- * 0b10111..I2S_SHARED_WS[0] output from I2S pin sharing
- * 0b11000..I2S_SHARED_WS[1] output from I2S pin sharing
- * 0b11001-0b11111..None
- */
-#define INPUTMUX_TIMER0CAPTSEL_CAPTSEL(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_TIMER0CAPTSEL_CAPTSEL_SHIFT)) & INPUTMUX_TIMER0CAPTSEL_CAPTSEL_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_TIMER0CAPTSEL */
-#define INPUTMUX_TIMER0CAPTSEL_COUNT (4U)
-
-/*! @name TIMER1CAPTSEL - Capture select registers for TIMER1 inputs */
-/*! @{ */
-#define INPUTMUX_TIMER1CAPTSEL_CAPTSEL_MASK (0x1FU)
-#define INPUTMUX_TIMER1CAPTSEL_CAPTSEL_SHIFT (0U)
-/*! CAPTSEL - Input number to TIMER1 capture inputs 0 to 4
- * 0b00000..CT_INP0 function selected from IOCON register
- * 0b00001..CT_INP1 function selected from IOCON register
- * 0b00010..CT_INP2 function selected from IOCON register
- * 0b00011..CT_INP3 function selected from IOCON register
- * 0b00100..CT_INP4 function selected from IOCON register
- * 0b00101..CT_INP5 function selected from IOCON register
- * 0b00110..CT_INP6 function selected from IOCON register
- * 0b00111..CT_INP7 function selected from IOCON register
- * 0b01000..CT_INP8 function selected from IOCON register
- * 0b01001..CT_INP9 function selected from IOCON register
- * 0b01010..CT_INP10 function selected from IOCON register
- * 0b01011..CT_INP11 function selected from IOCON register
- * 0b01100..CT_INP12 function selected from IOCON register
- * 0b01101..CT_INP13 function selected from IOCON register
- * 0b01110..CT_INP14 function selected from IOCON register
- * 0b01111..CT_INP15 function selected from IOCON register
- * 0b10000..CT_INP16 function selected from IOCON register
- * 0b10001..None
- * 0b10010..None
- * 0b10011..None
- * 0b10100..USB0_FRAME_TOGGLE
- * 0b10101..USB1_FRAME_TOGGLE
- * 0b10110..COMP_OUTPUT output from analog comparator
- * 0b10111..I2S_SHARED_WS[0] output from I2S pin sharing
- * 0b11000..I2S_SHARED_WS[1] output from I2S pin sharing
- * 0b11001-0b11111..None
- */
-#define INPUTMUX_TIMER1CAPTSEL_CAPTSEL(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_TIMER1CAPTSEL_CAPTSEL_SHIFT)) & INPUTMUX_TIMER1CAPTSEL_CAPTSEL_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_TIMER1CAPTSEL */
-#define INPUTMUX_TIMER1CAPTSEL_COUNT (4U)
-
-/*! @name TIMER2CAPTSEL - Capture select registers for TIMER2 inputs */
-/*! @{ */
-#define INPUTMUX_TIMER2CAPTSEL_CAPTSEL_MASK (0x1FU)
-#define INPUTMUX_TIMER2CAPTSEL_CAPTSEL_SHIFT (0U)
-/*! CAPTSEL - Input number to TIMER2 capture inputs 0 to 4
- * 0b00000..CT_INP0 function selected from IOCON register
- * 0b00001..CT_INP1 function selected from IOCON register
- * 0b00010..CT_INP2 function selected from IOCON register
- * 0b00011..CT_INP3 function selected from IOCON register
- * 0b00100..CT_INP4 function selected from IOCON register
- * 0b00101..CT_INP5 function selected from IOCON register
- * 0b00110..CT_INP6 function selected from IOCON register
- * 0b00111..CT_INP7 function selected from IOCON register
- * 0b01000..CT_INP8 function selected from IOCON register
- * 0b01001..CT_INP9 function selected from IOCON register
- * 0b01010..CT_INP10 function selected from IOCON register
- * 0b01011..CT_INP11 function selected from IOCON register
- * 0b01100..CT_INP12 function selected from IOCON register
- * 0b01101..CT_INP13 function selected from IOCON register
- * 0b01110..CT_INP14 function selected from IOCON register
- * 0b01111..CT_INP15 function selected from IOCON register
- * 0b10000..CT_INP16 function selected from IOCON register
- * 0b10001..None
- * 0b10010..None
- * 0b10011..None
- * 0b10100..USB0_FRAME_TOGGLE
- * 0b10101..USB1_FRAME_TOGGLE
- * 0b10110..COMP_OUTPUT output from analog comparator
- * 0b10111..I2S_SHARED_WS[0] output from I2S pin sharing
- * 0b11000..I2S_SHARED_WS[1] output from I2S pin sharing
- * 0b11001-0b11111..None
- */
-#define INPUTMUX_TIMER2CAPTSEL_CAPTSEL(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_TIMER2CAPTSEL_CAPTSEL_SHIFT)) & INPUTMUX_TIMER2CAPTSEL_CAPTSEL_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_TIMER2CAPTSEL */
-#define INPUTMUX_TIMER2CAPTSEL_COUNT (4U)
-
-/*! @name PINTSEL - Pin interrupt select register */
-/*! @{ */
-#define INPUTMUX_PINTSEL_INTPIN_MASK (0x7FU)
-#define INPUTMUX_PINTSEL_INTPIN_SHIFT (0U)
-/*! INTPIN - Pin number select for pin interrupt or pattern match engine input. For PIOx_y: INTPIN =
- * (x * 32) + y. PIO0_0 to PIO1_31 correspond to numbers 0 to 63.
- */
-#define INPUTMUX_PINTSEL_INTPIN(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_PINTSEL_INTPIN_SHIFT)) & INPUTMUX_PINTSEL_INTPIN_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_PINTSEL */
-#define INPUTMUX_PINTSEL_COUNT (8U)
-
-/*! @name DMA0_ITRIG_INMUX - Trigger select register for DMA0 channel */
-/*! @{ */
-#define INPUTMUX_DMA0_ITRIG_INMUX_INP_MASK (0x1FU)
-#define INPUTMUX_DMA0_ITRIG_INMUX_INP_SHIFT (0U)
-/*! INP - Trigger input number (decimal value) for DMA channel n (n = 0 to 22).
- * 0b00000..Pin interrupt 0
- * 0b00001..Pin interrupt 1
- * 0b00010..Pin interrupt 2
- * 0b00011..Pin interrupt 3
- * 0b00100..Timer CTIMER0 Match 0
- * 0b00101..Timer CTIMER0 Match 1
- * 0b00110..Timer CTIMER1 Match 0
- * 0b00111..Timer CTIMER1 Match 1
- * 0b01000..Timer CTIMER2 Match 0
- * 0b01001..Timer CTIMER2 Match 1
- * 0b01010..Timer CTIMER3 Match 0
- * 0b01011..Timer CTIMER3 Match 1
- * 0b01100..Timer CTIMER4 Match 0
- * 0b01101..Timer CTIMER4 Match 1
- * 0b01110..COMP_OUTPUT
- * 0b01111..DMA0 output trigger mux 0
- * 0b10000..DMA0 output trigger mux 1
- * 0b10001..DMA0 output trigger mux 1
- * 0b10010..DMA0 output trigger mux 3
- * 0b10011..SCT0 DMA request 0
- * 0b10100..SCT0 DMA request 1
- * 0b10101..HASH DMA RX trigger
- * 0b10110-0b11111..None
- */
-#define INPUTMUX_DMA0_ITRIG_INMUX_INP(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_ITRIG_INMUX_INP_SHIFT)) & INPUTMUX_DMA0_ITRIG_INMUX_INP_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_DMA0_ITRIG_INMUX */
-#define INPUTMUX_DMA0_ITRIG_INMUX_COUNT (23U)
-
-/*! @name DMA0_OTRIG_INMUX - DMA0 output trigger selection to become DMA0 trigger */
-/*! @{ */
-#define INPUTMUX_DMA0_OTRIG_INMUX_INP_MASK (0x1FU)
-#define INPUTMUX_DMA0_OTRIG_INMUX_INP_SHIFT (0U)
-/*! INP - DMA trigger output number (decimal value) for DMA channel n (n = 0 to 22).
- */
-#define INPUTMUX_DMA0_OTRIG_INMUX_INP(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_OTRIG_INMUX_INP_SHIFT)) & INPUTMUX_DMA0_OTRIG_INMUX_INP_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_DMA0_OTRIG_INMUX */
-#define INPUTMUX_DMA0_OTRIG_INMUX_COUNT (4U)
-
-/*! @name FREQMEAS_REF - Selection for frequency measurement reference clock */
-/*! @{ */
-#define INPUTMUX_FREQMEAS_REF_CLKIN_MASK (0x1FU)
-#define INPUTMUX_FREQMEAS_REF_CLKIN_SHIFT (0U)
-/*! CLKIN - Clock source number (decimal value) for frequency measure function target clock: 0 =
- * CLK_IN 1 = FRO 12 MHz oscillator 2 = Watchdog oscillator 3 = 32 kHz RTC oscillator 4 = Main clock
- * (see Section 4.5.23) 5 = PIO0_4 6 = PIO0_20 7 = PIO0_24 8 = PIO1_4
- */
-#define INPUTMUX_FREQMEAS_REF_CLKIN(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_FREQMEAS_REF_CLKIN_SHIFT)) & INPUTMUX_FREQMEAS_REF_CLKIN_MASK)
-/*! @} */
-
-/*! @name FREQMEAS_TARGET - Selection for frequency measurement target clock */
-/*! @{ */
-#define INPUTMUX_FREQMEAS_TARGET_CLKIN_MASK (0x1FU)
-#define INPUTMUX_FREQMEAS_TARGET_CLKIN_SHIFT (0U)
-/*! CLKIN - Clock source number (decimal value) for frequency measure function target clock: 0 =
- * CLK_IN 1 = FRO 12 MHz oscillator 2 = Watchdog oscillator 3 = 32 kHz RTC oscillator 4 = Main clock
- * (see Section 4.5.23) 5 = PIO0_4 6 = PIO0_20 7 = PIO0_24 8 = PIO1_4
- */
-#define INPUTMUX_FREQMEAS_TARGET_CLKIN(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_FREQMEAS_TARGET_CLKIN_SHIFT)) & INPUTMUX_FREQMEAS_TARGET_CLKIN_MASK)
-/*! @} */
-
-/*! @name TIMER3CAPTSEL - Capture select registers for TIMER3 inputs */
-/*! @{ */
-#define INPUTMUX_TIMER3CAPTSEL_CAPTSEL_MASK (0x1FU)
-#define INPUTMUX_TIMER3CAPTSEL_CAPTSEL_SHIFT (0U)
-/*! CAPTSEL - Input number to TIMER3 capture inputs 0 to 4
- * 0b00000..CT_INP0 function selected from IOCON register
- * 0b00001..CT_INP1 function selected from IOCON register
- * 0b00010..CT_INP2 function selected from IOCON register
- * 0b00011..CT_INP3 function selected from IOCON register
- * 0b00100..CT_INP4 function selected from IOCON register
- * 0b00101..CT_INP5 function selected from IOCON register
- * 0b00110..CT_INP6 function selected from IOCON register
- * 0b00111..CT_INP7 function selected from IOCON register
- * 0b01000..CT_INP8 function selected from IOCON register
- * 0b01001..CT_INP9 function selected from IOCON register
- * 0b01010..CT_INP10 function selected from IOCON register
- * 0b01011..CT_INP11 function selected from IOCON register
- * 0b01100..CT_INP12 function selected from IOCON register
- * 0b01101..CT_INP13 function selected from IOCON register
- * 0b01110..CT_INP14 function selected from IOCON register
- * 0b01111..CT_INP15 function selected from IOCON register
- * 0b10000..CT_INP16 function selected from IOCON register
- * 0b10001..CT_INP17 function selected from IOCON register
- * 0b10010..CT_INP18 function selected from IOCON register
- * 0b10011..CT_INP19 function selected from IOCON register
- * 0b10100..USB0_FRAME_TOGGLE
- * 0b10101..USB1_FRAME_TOGGLE
- * 0b10110..COMP_OUTPUT output from analog comparator
- * 0b10111..I2S_SHARED_WS[0] output from I2S pin sharing
- * 0b11000..I2S_SHARED_WS[1] output from I2S pin sharing
- * 0b11001-0b11111..None
- */
-#define INPUTMUX_TIMER3CAPTSEL_CAPTSEL(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_TIMER3CAPTSEL_CAPTSEL_SHIFT)) & INPUTMUX_TIMER3CAPTSEL_CAPTSEL_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_TIMER3CAPTSEL */
-#define INPUTMUX_TIMER3CAPTSEL_COUNT (4U)
-
-/*! @name TIMER4CAPTSEL - Capture select registers for TIMER4 inputs */
-/*! @{ */
-#define INPUTMUX_TIMER4CAPTSEL_CAPTSEL_MASK (0x1FU)
-#define INPUTMUX_TIMER4CAPTSEL_CAPTSEL_SHIFT (0U)
-/*! CAPTSEL - Input number to TIMER4 capture inputs 0 to 4
- * 0b00000..CT_INP0 function selected from IOCON register
- * 0b00001..CT_INP1 function selected from IOCON register
- * 0b00010..CT_INP2 function selected from IOCON register
- * 0b00011..CT_INP3 function selected from IOCON register
- * 0b00100..CT_INP4 function selected from IOCON register
- * 0b00101..CT_INP5 function selected from IOCON register
- * 0b00110..CT_INP6 function selected from IOCON register
- * 0b00111..CT_INP7 function selected from IOCON register
- * 0b01000..CT_INP8 function selected from IOCON register
- * 0b01001..CT_INP9 function selected from IOCON register
- * 0b01010..CT_INP10 function selected from IOCON register
- * 0b01011..CT_INP11 function selected from IOCON register
- * 0b01100..CT_INP12 function selected from IOCON register
- * 0b01101..CT_INP13 function selected from IOCON register
- * 0b01110..CT_INP14 function selected from IOCON register
- * 0b01111..CT_INP15 function selected from IOCON register
- * 0b10000..CT_INP16 function selected from IOCON register
- * 0b10001..CT_INP17 function selected from IOCON register
- * 0b10010..CT_INP18 function selected from IOCON register
- * 0b10011..CT_INP19 function selected from IOCON register
- * 0b10100..USB0_FRAME_TOGGLE
- * 0b10101..USB1_FRAME_TOGGLE
- * 0b10110..COMP_OUTPUT output from analog comparator
- * 0b10111..I2S_SHARED_WS[0] output from I2S pin sharing
- * 0b11000..I2S_SHARED_WS[1] output from I2S pin sharing
- * 0b11001-0b11111..None
- */
-#define INPUTMUX_TIMER4CAPTSEL_CAPTSEL(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_TIMER4CAPTSEL_CAPTSEL_SHIFT)) & INPUTMUX_TIMER4CAPTSEL_CAPTSEL_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_TIMER4CAPTSEL */
-#define INPUTMUX_TIMER4CAPTSEL_COUNT (4U)
-
-/*! @name PINTSECSEL - Pin interrupt secure select register */
-/*! @{ */
-#define INPUTMUX_PINTSECSEL_INTPIN_MASK (0x3FU)
-#define INPUTMUX_PINTSECSEL_INTPIN_SHIFT (0U)
-/*! INTPIN - Pin number select for pin interrupt secure or pattern match engine input. For PIO0_x:
- * INTPIN = x. PIO0_0 to PIO0_31 correspond to numbers 0 to 31.
- */
-#define INPUTMUX_PINTSECSEL_INTPIN(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_PINTSECSEL_INTPIN_SHIFT)) & INPUTMUX_PINTSECSEL_INTPIN_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_PINTSECSEL */
-#define INPUTMUX_PINTSECSEL_COUNT (2U)
-
-/*! @name DMA1_ITRIG_INMUX - Trigger select register for DMA1 channel */
-/*! @{ */
-#define INPUTMUX_DMA1_ITRIG_INMUX_INP_MASK (0xFU)
-#define INPUTMUX_DMA1_ITRIG_INMUX_INP_SHIFT (0U)
-/*! INP - Trigger input number (decimal value) for DMA channel n (n = 0 to 9).
- * 0b0000..Pin interrupt 0
- * 0b0001..Pin interrupt 1
- * 0b0010..Pin interrupt 2
- * 0b0011..Pin interrupt 3
- * 0b0100..Timer CTIMER0 Match 0
- * 0b0101..Timer CTIMER0 Match 1
- * 0b0110..Timer CTIMER2 Match 0
- * 0b0111..Timer CTIMER4 Match 0
- * 0b1000..DMA1 output trigger mux 0
- * 0b1001..DMA1 output trigger mux 1
- * 0b1010..DMA1 output trigger mux 2
- * 0b1011..DMA1 output trigger mux 3
- * 0b1100..SCT0 DMA request 0
- * 0b1101..SCT0 DMA request 1
- * 0b1110..HASH DMA RX trigger
- * 0b1111..None
- */
-#define INPUTMUX_DMA1_ITRIG_INMUX_INP(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_ITRIG_INMUX_INP_SHIFT)) & INPUTMUX_DMA1_ITRIG_INMUX_INP_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_DMA1_ITRIG_INMUX */
-#define INPUTMUX_DMA1_ITRIG_INMUX_COUNT (10U)
-
-/*! @name DMA1_OTRIG_INMUX - DMA1 output trigger selection to become DMA1 trigger */
-/*! @{ */
-#define INPUTMUX_DMA1_OTRIG_INMUX_INP_MASK (0xFU)
-#define INPUTMUX_DMA1_OTRIG_INMUX_INP_SHIFT (0U)
-/*! INP - DMA trigger output number (decimal value) for DMA channel n (n = 0 to 9).
- */
-#define INPUTMUX_DMA1_OTRIG_INMUX_INP(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_OTRIG_INMUX_INP_SHIFT)) & INPUTMUX_DMA1_OTRIG_INMUX_INP_MASK)
-/*! @} */
-
-/* The count of INPUTMUX_DMA1_OTRIG_INMUX */
-#define INPUTMUX_DMA1_OTRIG_INMUX_COUNT (4U)
-
-/*! @name DMA0_REQ_ENA - Enable DMA0 requests */
-/*! @{ */
-#define INPUTMUX_DMA0_REQ_ENA_REQ_ENA_MASK (0x7FFFFFU)
-#define INPUTMUX_DMA0_REQ_ENA_REQ_ENA_SHIFT (0U)
-/*! REQ_ENA - Controls the 23 request inputs of DMA0. If bit i is '1' the DMA request input #i is enabled.
- */
-#define INPUTMUX_DMA0_REQ_ENA_REQ_ENA(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_REQ_ENA_REQ_ENA_SHIFT)) & INPUTMUX_DMA0_REQ_ENA_REQ_ENA_MASK)
-/*! @} */
-
-/*! @name DMA0_REQ_ENA_SET - Set one or several bits in DMA0_REQ_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA0_REQ_ENA_SET_SET_MASK (0x7FFFFFU)
-#define INPUTMUX_DMA0_REQ_ENA_SET_SET_SHIFT (0U)
-/*! SET - Write : If bit #i = 1, bit #i in DMA0_REQ_ENA register is set to 1; if bit #i = 0 , no change in DMA0_REQ_ENA register
- */
-#define INPUTMUX_DMA0_REQ_ENA_SET_SET(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_REQ_ENA_SET_SET_SHIFT)) & INPUTMUX_DMA0_REQ_ENA_SET_SET_MASK)
-/*! @} */
-
-/*! @name DMA0_REQ_ENA_CLR - Clear one or several bits in DMA0_REQ_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA0_REQ_ENA_CLR_CLR_MASK (0x7FFFFFU)
-#define INPUTMUX_DMA0_REQ_ENA_CLR_CLR_SHIFT (0U)
-/*! CLR - Write : If bit #i = 1, bit #i in DMA0_REQ_ENA register is reset to 0; if bit #i = 0 , no change in DMA0_REQ_ENA register
- */
-#define INPUTMUX_DMA0_REQ_ENA_CLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_REQ_ENA_CLR_CLR_SHIFT)) & INPUTMUX_DMA0_REQ_ENA_CLR_CLR_MASK)
-/*! @} */
-
-/*! @name DMA1_REQ_ENA - Enable DMA1 requests */
-/*! @{ */
-#define INPUTMUX_DMA1_REQ_ENA_REQ_ENA_MASK (0x3FFU)
-#define INPUTMUX_DMA1_REQ_ENA_REQ_ENA_SHIFT (0U)
-/*! REQ_ENA - Controls the 10 request inputs of DMA1. If bit i is '1' the DMA request input #i is enabled.
- */
-#define INPUTMUX_DMA1_REQ_ENA_REQ_ENA(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_REQ_ENA_REQ_ENA_SHIFT)) & INPUTMUX_DMA1_REQ_ENA_REQ_ENA_MASK)
-/*! @} */
-
-/*! @name DMA1_REQ_ENA_SET - Set one or several bits in DMA1_REQ_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA1_REQ_ENA_SET_SET_MASK (0x3FFU)
-#define INPUTMUX_DMA1_REQ_ENA_SET_SET_SHIFT (0U)
-/*! SET - Write : If bit #i = 1, bit #i in DMA1_REQ_ENA register is set to 1; if bit #i = 0 , no change in DMA1_REQ_ENA register
- */
-#define INPUTMUX_DMA1_REQ_ENA_SET_SET(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_REQ_ENA_SET_SET_SHIFT)) & INPUTMUX_DMA1_REQ_ENA_SET_SET_MASK)
-/*! @} */
-
-/*! @name DMA1_REQ_ENA_CLR - Clear one or several bits in DMA1_REQ_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA1_REQ_ENA_CLR_CLR_MASK (0x3FFU)
-#define INPUTMUX_DMA1_REQ_ENA_CLR_CLR_SHIFT (0U)
-/*! CLR - Write : If bit #i = 1, bit #i in DMA1_REQ_ENA register is reset to 0; if bit #i = 0 , no change in DMA1_REQ_ENA register
- */
-#define INPUTMUX_DMA1_REQ_ENA_CLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_REQ_ENA_CLR_CLR_SHIFT)) & INPUTMUX_DMA1_REQ_ENA_CLR_CLR_MASK)
-/*! @} */
-
-/*! @name DMA0_ITRIG_ENA - Enable DMA0 triggers */
-/*! @{ */
-#define INPUTMUX_DMA0_ITRIG_ENA_ITRIG_ENA_MASK (0x3FFFFFU)
-#define INPUTMUX_DMA0_ITRIG_ENA_ITRIG_ENA_SHIFT (0U)
-/*! ITRIG_ENA - Controls the 22 trigger inputs of DMA0. If bit i is '1' the DMA trigger input #i is enabled.
- */
-#define INPUTMUX_DMA0_ITRIG_ENA_ITRIG_ENA(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_ITRIG_ENA_ITRIG_ENA_SHIFT)) & INPUTMUX_DMA0_ITRIG_ENA_ITRIG_ENA_MASK)
-/*! @} */
-
-/*! @name DMA0_ITRIG_ENA_SET - Set one or several bits in DMA0_ITRIG_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA0_ITRIG_ENA_SET_SET_MASK (0x3FFFFFU)
-#define INPUTMUX_DMA0_ITRIG_ENA_SET_SET_SHIFT (0U)
-/*! SET - Write : If bit #i = 1, bit #i in DMA0_ITRIG_ENA register is set to 1; if bit #i = 0 , no
- * change in DMA0_ITRIG_ENA register
- */
-#define INPUTMUX_DMA0_ITRIG_ENA_SET_SET(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_ITRIG_ENA_SET_SET_SHIFT)) & INPUTMUX_DMA0_ITRIG_ENA_SET_SET_MASK)
-/*! @} */
-
-/*! @name DMA0_ITRIG_ENA_CLR - Clear one or several bits in DMA0_ITRIG_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA0_ITRIG_ENA_CLR_CLR_MASK (0x3FFFFFU)
-#define INPUTMUX_DMA0_ITRIG_ENA_CLR_CLR_SHIFT (0U)
-/*! CLR - Write : If bit #i = 1, bit #i in DMA0_ITRIG_ENA register is reset to 0; if bit #i = 0 , no
- * change in DMA0_ITRIG_ENA register
- */
-#define INPUTMUX_DMA0_ITRIG_ENA_CLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA0_ITRIG_ENA_CLR_CLR_SHIFT)) & INPUTMUX_DMA0_ITRIG_ENA_CLR_CLR_MASK)
-/*! @} */
-
-/*! @name DMA1_ITRIG_ENA - Enable DMA1 triggers */
-/*! @{ */
-#define INPUTMUX_DMA1_ITRIG_ENA_ITRIG_ENA_MASK (0x7FFFU)
-#define INPUTMUX_DMA1_ITRIG_ENA_ITRIG_ENA_SHIFT (0U)
-/*! ITRIG_ENA - Controls the 15 trigger inputs of DMA1. If bit i is '1' the DMA trigger input #i is enabled.
- */
-#define INPUTMUX_DMA1_ITRIG_ENA_ITRIG_ENA(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_ITRIG_ENA_ITRIG_ENA_SHIFT)) & INPUTMUX_DMA1_ITRIG_ENA_ITRIG_ENA_MASK)
-/*! @} */
-
-/*! @name DMA1_ITRIG_ENA_SET - Set one or several bits in DMA1_ITRIG_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA1_ITRIG_ENA_SET_SET_MASK (0x7FFFU)
-#define INPUTMUX_DMA1_ITRIG_ENA_SET_SET_SHIFT (0U)
-/*! SET - Write : If bit #i = 1, bit #i in DMA1_ITRIG_ENA register is set to 1; if bit #i = 0 , no
- * change in DMA1_ITRIG_ENA register
- */
-#define INPUTMUX_DMA1_ITRIG_ENA_SET_SET(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_ITRIG_ENA_SET_SET_SHIFT)) & INPUTMUX_DMA1_ITRIG_ENA_SET_SET_MASK)
-/*! @} */
-
-/*! @name DMA1_ITRIG_ENA_CLR - Clear one or several bits in DMA1_ITRIG_ENA register */
-/*! @{ */
-#define INPUTMUX_DMA1_ITRIG_ENA_CLR_CLR_MASK (0x7FFFU)
-#define INPUTMUX_DMA1_ITRIG_ENA_CLR_CLR_SHIFT (0U)
-/*! CLR - Write : If bit #i = 1, bit #i in DMA1_ITRIG_ENA register is reset to 0; if bit #i = 0 , no
- * change in DMA1_ITRIG_ENA register
- */
-#define INPUTMUX_DMA1_ITRIG_ENA_CLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << INPUTMUX_DMA1_ITRIG_ENA_CLR_CLR_SHIFT)) & INPUTMUX_DMA1_ITRIG_ENA_CLR_CLR_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group INPUTMUX_Register_Masks */
-
-
-/* INPUTMUX - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral INPUTMUX base address */
- #define INPUTMUX_BASE (0x50006000u)
- /** Peripheral INPUTMUX base address */
- #define INPUTMUX_BASE_NS (0x40006000u)
- /** Peripheral INPUTMUX base pointer */
- #define INPUTMUX ((INPUTMUX_Type *)INPUTMUX_BASE)
- /** Peripheral INPUTMUX base pointer */
- #define INPUTMUX_NS ((INPUTMUX_Type *)INPUTMUX_BASE_NS)
- /** Array initializer of INPUTMUX peripheral base addresses */
- #define INPUTMUX_BASE_ADDRS { INPUTMUX_BASE }
- /** Array initializer of INPUTMUX peripheral base pointers */
- #define INPUTMUX_BASE_PTRS { INPUTMUX }
- /** Array initializer of INPUTMUX peripheral base addresses */
- #define INPUTMUX_BASE_ADDRS_NS { INPUTMUX_BASE_NS }
- /** Array initializer of INPUTMUX peripheral base pointers */
- #define INPUTMUX_BASE_PTRS_NS { INPUTMUX_NS }
-#else
- /** Peripheral INPUTMUX base address */
- #define INPUTMUX_BASE (0x40006000u)
- /** Peripheral INPUTMUX base pointer */
- #define INPUTMUX ((INPUTMUX_Type *)INPUTMUX_BASE)
- /** Array initializer of INPUTMUX peripheral base addresses */
- #define INPUTMUX_BASE_ADDRS { INPUTMUX_BASE }
- /** Array initializer of INPUTMUX peripheral base pointers */
- #define INPUTMUX_BASE_PTRS { INPUTMUX }
-#endif
-
-/*!
- * @}
- */ /* end of group INPUTMUX_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- IOCON Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup IOCON_Peripheral_Access_Layer IOCON Peripheral Access Layer
- * @{
- */
-
-/** IOCON - Register Layout Typedef */
-typedef struct {
- __IO uint32_t PIO[2][32]; /**< Digital I/O control for port 0 pins PIO0_0..Digital I/O control for port 1 pins PIO1_31, array offset: 0x0, array step: index*0x80, index2*0x4 */
-} IOCON_Type;
-
-/* ----------------------------------------------------------------------------
- -- IOCON Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup IOCON_Register_Masks IOCON Register Masks
- * @{
- */
-
-/*! @name PIO - Digital I/O control for port 0 pins PIO0_0..Digital I/O control for port 1 pins PIO1_31 */
-/*! @{ */
-#define IOCON_PIO_FUNC_MASK (0xFU)
-#define IOCON_PIO_FUNC_SHIFT (0U)
-/*! FUNC - Selects pin function.
- * 0b0000..Alternative connection 0.
- * 0b0001..Alternative connection 1.
- * 0b0010..Alternative connection 2.
- * 0b0011..Alternative connection 3.
- * 0b0100..Alternative connection 4.
- * 0b0101..Alternative connection 5.
- * 0b0110..Alternative connection 6.
- * 0b0111..Alternative connection 7.
- */
-#define IOCON_PIO_FUNC(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_FUNC_SHIFT)) & IOCON_PIO_FUNC_MASK)
-#define IOCON_PIO_MODE_MASK (0x30U)
-#define IOCON_PIO_MODE_SHIFT (4U)
-/*! MODE - Selects function mode (on-chip pull-up/pull-down resistor control).
- * 0b00..Inactive. Inactive (no pull-down/pull-up resistor enabled).
- * 0b01..Pull-down. Pull-down resistor enabled.
- * 0b10..Pull-up. Pull-up resistor enabled.
- * 0b11..Repeater. Repeater mode.
- */
-#define IOCON_PIO_MODE(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_MODE_SHIFT)) & IOCON_PIO_MODE_MASK)
-#define IOCON_PIO_SLEW_MASK (0x40U)
-#define IOCON_PIO_SLEW_SHIFT (6U)
-/*! SLEW - Driver slew rate.
- * 0b0..Standard-mode, output slew rate is slower. More outputs can be switched simultaneously.
- * 0b1..Fast-mode, output slew rate is faster. Refer to the appropriate specific device data sheet for details.
- */
-#define IOCON_PIO_SLEW(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_SLEW_SHIFT)) & IOCON_PIO_SLEW_MASK)
-#define IOCON_PIO_INVERT_MASK (0x80U)
-#define IOCON_PIO_INVERT_SHIFT (7U)
-/*! INVERT - Input polarity.
- * 0b0..Disabled. Input function is not inverted.
- * 0b1..Enabled. Input is function inverted.
- */
-#define IOCON_PIO_INVERT(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_INVERT_SHIFT)) & IOCON_PIO_INVERT_MASK)
-#define IOCON_PIO_DIGIMODE_MASK (0x100U)
-#define IOCON_PIO_DIGIMODE_SHIFT (8U)
-/*! DIGIMODE - Select Digital mode.
- * 0b0..Disable digital mode. Digital input set to 0.
- * 0b1..Enable Digital mode. Digital input is enabled.
- */
-#define IOCON_PIO_DIGIMODE(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_DIGIMODE_SHIFT)) & IOCON_PIO_DIGIMODE_MASK)
-#define IOCON_PIO_OD_MASK (0x200U)
-#define IOCON_PIO_OD_SHIFT (9U)
-/*! OD - Controls open-drain mode in standard GPIO mode (EGP = 1). This bit has no effect in I2C mode (EGP=0).
- * 0b0..Normal. Normal push-pull output
- * 0b1..Open-drain. Simulated open-drain output (high drive disabled).
- */
-#define IOCON_PIO_OD(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_OD_SHIFT)) & IOCON_PIO_OD_MASK)
-#define IOCON_PIO_ASW_MASK (0x400U)
-#define IOCON_PIO_ASW_SHIFT (10U)
-/*! ASW - Analog switch input control.
- * 0b0..For pins PIO0_9, PIO0_11, PIO0_12, PIO0_15, PIO0_18, PIO0_31, PIO1_0 and PIO1_9, analog switch is closed
- * (enabled). For the other pins, analog switch is open (disabled).
- * 0b1..For all pins except PIO0_9, PIO0_11, PIO0_12, PIO0_15, PIO0_18, PIO0_31, PIO1_0 and PIO1_9 analog switch is closed (enabled)
- */
-#define IOCON_PIO_ASW(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_ASW_SHIFT)) & IOCON_PIO_ASW_MASK)
-#define IOCON_PIO_SSEL_MASK (0x800U)
-#define IOCON_PIO_SSEL_SHIFT (11U)
-/*! SSEL - Supply Selection bit.
- * 0b0..3V3 Signaling in I2C Mode.
- * 0b1..1V8 Signaling in I2C Mode.
- */
-#define IOCON_PIO_SSEL(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_SSEL_SHIFT)) & IOCON_PIO_SSEL_MASK)
-#define IOCON_PIO_FILTEROFF_MASK (0x1000U)
-#define IOCON_PIO_FILTEROFF_SHIFT (12U)
-/*! FILTEROFF - Controls input glitch filter.
- * 0b0..Filter enabled.
- * 0b1..Filter disabled.
- */
-#define IOCON_PIO_FILTEROFF(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_FILTEROFF_SHIFT)) & IOCON_PIO_FILTEROFF_MASK)
-#define IOCON_PIO_ECS_MASK (0x2000U)
-#define IOCON_PIO_ECS_SHIFT (13U)
-/*! ECS - Pull-up current source enable in I2C mode.
- * 0b1..Enabled. Pull resistor is conencted.
- * 0b0..Disabled. IO is in open drain cell.
- */
-#define IOCON_PIO_ECS(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_ECS_SHIFT)) & IOCON_PIO_ECS_MASK)
-#define IOCON_PIO_EGP_MASK (0x4000U)
-#define IOCON_PIO_EGP_SHIFT (14U)
-/*! EGP - Switch between GPIO mode and I2C mode.
- * 0b0..I2C mode.
- * 0b1..GPIO mode.
- */
-#define IOCON_PIO_EGP(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_EGP_SHIFT)) & IOCON_PIO_EGP_MASK)
-#define IOCON_PIO_I2CFILTER_MASK (0x8000U)
-#define IOCON_PIO_I2CFILTER_SHIFT (15U)
-/*! I2CFILTER - Configures I2C features for standard mode, fast mode, and Fast Mode Plus operation and High-Speed mode operation.
- * 0b0..I2C 50 ns glitch filter enabled. Typically used for Standard-mode, Fast-mode and Fast-mode Plus I2C.
- * 0b1..I2C 10 ns glitch filter enabled. Typically used for High-speed mode I2C.
- */
-#define IOCON_PIO_I2CFILTER(x) (((uint32_t)(((uint32_t)(x)) << IOCON_PIO_I2CFILTER_SHIFT)) & IOCON_PIO_I2CFILTER_MASK)
-/*! @} */
-
-/* The count of IOCON_PIO */
-#define IOCON_PIO_COUNT (2U)
-
-/* The count of IOCON_PIO */
-#define IOCON_PIO_COUNT2 (32U)
-
-
-/*!
- * @}
- */ /* end of group IOCON_Register_Masks */
-
-
-/* IOCON - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral IOCON base address */
- #define IOCON_BASE (0x50001000u)
- /** Peripheral IOCON base address */
- #define IOCON_BASE_NS (0x40001000u)
- /** Peripheral IOCON base pointer */
- #define IOCON ((IOCON_Type *)IOCON_BASE)
- /** Peripheral IOCON base pointer */
- #define IOCON_NS ((IOCON_Type *)IOCON_BASE_NS)
- /** Array initializer of IOCON peripheral base addresses */
- #define IOCON_BASE_ADDRS { IOCON_BASE }
- /** Array initializer of IOCON peripheral base pointers */
- #define IOCON_BASE_PTRS { IOCON }
- /** Array initializer of IOCON peripheral base addresses */
- #define IOCON_BASE_ADDRS_NS { IOCON_BASE_NS }
- /** Array initializer of IOCON peripheral base pointers */
- #define IOCON_BASE_PTRS_NS { IOCON_NS }
-#else
- /** Peripheral IOCON base address */
- #define IOCON_BASE (0x40001000u)
- /** Peripheral IOCON base pointer */
- #define IOCON ((IOCON_Type *)IOCON_BASE)
- /** Array initializer of IOCON peripheral base addresses */
- #define IOCON_BASE_ADDRS { IOCON_BASE }
- /** Array initializer of IOCON peripheral base pointers */
- #define IOCON_BASE_PTRS { IOCON }
-#endif
-
-/*!
- * @}
- */ /* end of group IOCON_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- MAILBOX Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup MAILBOX_Peripheral_Access_Layer MAILBOX Peripheral Access Layer
- * @{
- */
-
-/** MAILBOX - Register Layout Typedef */
-typedef struct {
- struct { /* offset: 0x0, array step: 0x10 */
- __IO uint32_t IRQ; /**< Interrupt request register for the Cortex-M0+ CPU., array offset: 0x0, array step: 0x10 */
- __O uint32_t IRQSET; /**< Set bits in IRQ0, array offset: 0x4, array step: 0x10 */
- __O uint32_t IRQCLR; /**< Clear bits in IRQ0, array offset: 0x8, array step: 0x10 */
- uint8_t RESERVED_0[4];
- } MBOXIRQ[2];
- uint8_t RESERVED_0[216];
- __IO uint32_t MUTEX; /**< Mutual exclusion register[1], offset: 0xF8 */
-} MAILBOX_Type;
-
-/* ----------------------------------------------------------------------------
- -- MAILBOX Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup MAILBOX_Register_Masks MAILBOX Register Masks
- * @{
- */
-
-/*! @name MBOXIRQ_IRQ - Interrupt request register for the Cortex-M0+ CPU. */
-/*! @{ */
-#define MAILBOX_MBOXIRQ_IRQ_INTREQ_MASK (0xFFFFFFFFU)
-#define MAILBOX_MBOXIRQ_IRQ_INTREQ_SHIFT (0U)
-/*! INTREQ - If any bit is set, an interrupt request is sent to the Cortex-M0+ interrupt controller.
- */
-#define MAILBOX_MBOXIRQ_IRQ_INTREQ(x) (((uint32_t)(((uint32_t)(x)) << MAILBOX_MBOXIRQ_IRQ_INTREQ_SHIFT)) & MAILBOX_MBOXIRQ_IRQ_INTREQ_MASK)
-/*! @} */
-
-/* The count of MAILBOX_MBOXIRQ_IRQ */
-#define MAILBOX_MBOXIRQ_IRQ_COUNT (2U)
-
-/*! @name MBOXIRQ_IRQSET - Set bits in IRQ0 */
-/*! @{ */
-#define MAILBOX_MBOXIRQ_IRQSET_INTREQSET_MASK (0xFFFFFFFFU)
-#define MAILBOX_MBOXIRQ_IRQSET_INTREQSET_SHIFT (0U)
-/*! INTREQSET - Writing 1 sets the corresponding bit in the IRQ0 register.
- */
-#define MAILBOX_MBOXIRQ_IRQSET_INTREQSET(x) (((uint32_t)(((uint32_t)(x)) << MAILBOX_MBOXIRQ_IRQSET_INTREQSET_SHIFT)) & MAILBOX_MBOXIRQ_IRQSET_INTREQSET_MASK)
-/*! @} */
-
-/* The count of MAILBOX_MBOXIRQ_IRQSET */
-#define MAILBOX_MBOXIRQ_IRQSET_COUNT (2U)
-
-/*! @name MBOXIRQ_IRQCLR - Clear bits in IRQ0 */
-/*! @{ */
-#define MAILBOX_MBOXIRQ_IRQCLR_INTREQCLR_MASK (0xFFFFFFFFU)
-#define MAILBOX_MBOXIRQ_IRQCLR_INTREQCLR_SHIFT (0U)
-/*! INTREQCLR - Writing 1 clears the corresponding bit in the IRQ0 register.
- */
-#define MAILBOX_MBOXIRQ_IRQCLR_INTREQCLR(x) (((uint32_t)(((uint32_t)(x)) << MAILBOX_MBOXIRQ_IRQCLR_INTREQCLR_SHIFT)) & MAILBOX_MBOXIRQ_IRQCLR_INTREQCLR_MASK)
-/*! @} */
-
-/* The count of MAILBOX_MBOXIRQ_IRQCLR */
-#define MAILBOX_MBOXIRQ_IRQCLR_COUNT (2U)
-
-/*! @name MUTEX - Mutual exclusion register[1] */
-/*! @{ */
-#define MAILBOX_MUTEX_EX_MASK (0x1U)
-#define MAILBOX_MUTEX_EX_SHIFT (0U)
-/*! EX - Cleared when read, set when written. See usage description above.
- */
-#define MAILBOX_MUTEX_EX(x) (((uint32_t)(((uint32_t)(x)) << MAILBOX_MUTEX_EX_SHIFT)) & MAILBOX_MUTEX_EX_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group MAILBOX_Register_Masks */
-
-
-/* MAILBOX - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral MAILBOX base address */
- #define MAILBOX_BASE (0x5008B000u)
- /** Peripheral MAILBOX base address */
- #define MAILBOX_BASE_NS (0x4008B000u)
- /** Peripheral MAILBOX base pointer */
- #define MAILBOX ((MAILBOX_Type *)MAILBOX_BASE)
- /** Peripheral MAILBOX base pointer */
- #define MAILBOX_NS ((MAILBOX_Type *)MAILBOX_BASE_NS)
- /** Array initializer of MAILBOX peripheral base addresses */
- #define MAILBOX_BASE_ADDRS { MAILBOX_BASE }
- /** Array initializer of MAILBOX peripheral base pointers */
- #define MAILBOX_BASE_PTRS { MAILBOX }
- /** Array initializer of MAILBOX peripheral base addresses */
- #define MAILBOX_BASE_ADDRS_NS { MAILBOX_BASE_NS }
- /** Array initializer of MAILBOX peripheral base pointers */
- #define MAILBOX_BASE_PTRS_NS { MAILBOX_NS }
-#else
- /** Peripheral MAILBOX base address */
- #define MAILBOX_BASE (0x4008B000u)
- /** Peripheral MAILBOX base pointer */
- #define MAILBOX ((MAILBOX_Type *)MAILBOX_BASE)
- /** Array initializer of MAILBOX peripheral base addresses */
- #define MAILBOX_BASE_ADDRS { MAILBOX_BASE }
- /** Array initializer of MAILBOX peripheral base pointers */
- #define MAILBOX_BASE_PTRS { MAILBOX }
-#endif
-/** Interrupt vectors for the MAILBOX peripheral type */
-#define MAILBOX_IRQS { MAILBOX_IRQn }
-
-/*!
- * @}
- */ /* end of group MAILBOX_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- MRT Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup MRT_Peripheral_Access_Layer MRT Peripheral Access Layer
- * @{
- */
-
-/** MRT - Register Layout Typedef */
-typedef struct {
- struct { /* offset: 0x0, array step: 0x10 */
- __IO uint32_t INTVAL; /**< MRT Time interval value register. This value is loaded into the TIMER register., array offset: 0x0, array step: 0x10 */
- __I uint32_t TIMER; /**< MRT Timer register. This register reads the value of the down-counter., array offset: 0x4, array step: 0x10 */
- __IO uint32_t CTRL; /**< MRT Control register. This register controls the MRT modes., array offset: 0x8, array step: 0x10 */
- __IO uint32_t STAT; /**< MRT Status register., array offset: 0xC, array step: 0x10 */
- } CHANNEL[4];
- uint8_t RESERVED_0[176];
- __IO uint32_t MODCFG; /**< Module Configuration register. This register provides information about this particular MRT instance, and allows choosing an overall mode for the idle channel feature., offset: 0xF0 */
- __I uint32_t IDLE_CH; /**< Idle channel register. This register returns the number of the first idle channel., offset: 0xF4 */
- __IO uint32_t IRQ_FLAG; /**< Global interrupt flag register, offset: 0xF8 */
-} MRT_Type;
-
-/* ----------------------------------------------------------------------------
- -- MRT Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup MRT_Register_Masks MRT Register Masks
- * @{
- */
-
-/*! @name CHANNEL_INTVAL - MRT Time interval value register. This value is loaded into the TIMER register. */
-/*! @{ */
-#define MRT_CHANNEL_INTVAL_IVALUE_MASK (0xFFFFFFU)
-#define MRT_CHANNEL_INTVAL_IVALUE_SHIFT (0U)
-/*! IVALUE - Time interval load value. This value is loaded into the TIMERn register and the MRT
- * channel n starts counting down from IVALUE -1. If the timer is idle, writing a non-zero value to
- * this bit field starts the timer immediately. If the timer is running, writing a zero to this
- * bit field does the following: If LOAD = 1, the timer stops immediately. If LOAD = 0, the timer
- * stops at the end of the time interval.
- */
-#define MRT_CHANNEL_INTVAL_IVALUE(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_INTVAL_IVALUE_SHIFT)) & MRT_CHANNEL_INTVAL_IVALUE_MASK)
-#define MRT_CHANNEL_INTVAL_LOAD_MASK (0x80000000U)
-#define MRT_CHANNEL_INTVAL_LOAD_SHIFT (31U)
-/*! LOAD - Determines how the timer interval value IVALUE -1 is loaded into the TIMERn register.
- * This bit is write-only. Reading this bit always returns 0.
- * 0b0..No force load. The load from the INTVALn register to the TIMERn register is processed at the end of the
- * time interval if the repeat mode is selected.
- * 0b1..Force load. The INTVALn interval value IVALUE -1 is immediately loaded into the TIMERn register while TIMERn is running.
- */
-#define MRT_CHANNEL_INTVAL_LOAD(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_INTVAL_LOAD_SHIFT)) & MRT_CHANNEL_INTVAL_LOAD_MASK)
-/*! @} */
-
-/* The count of MRT_CHANNEL_INTVAL */
-#define MRT_CHANNEL_INTVAL_COUNT (4U)
-
-/*! @name CHANNEL_TIMER - MRT Timer register. This register reads the value of the down-counter. */
-/*! @{ */
-#define MRT_CHANNEL_TIMER_VALUE_MASK (0xFFFFFFU)
-#define MRT_CHANNEL_TIMER_VALUE_SHIFT (0U)
-/*! VALUE - Holds the current timer value of the down-counter. The initial value of the TIMERn
- * register is loaded as IVALUE - 1 from the INTVALn register either at the end of the time interval
- * or immediately in the following cases: INTVALn register is updated in the idle state. INTVALn
- * register is updated with LOAD = 1. When the timer is in idle state, reading this bit fields
- * returns -1 (0x00FF FFFF).
- */
-#define MRT_CHANNEL_TIMER_VALUE(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_TIMER_VALUE_SHIFT)) & MRT_CHANNEL_TIMER_VALUE_MASK)
-/*! @} */
-
-/* The count of MRT_CHANNEL_TIMER */
-#define MRT_CHANNEL_TIMER_COUNT (4U)
-
-/*! @name CHANNEL_CTRL - MRT Control register. This register controls the MRT modes. */
-/*! @{ */
-#define MRT_CHANNEL_CTRL_INTEN_MASK (0x1U)
-#define MRT_CHANNEL_CTRL_INTEN_SHIFT (0U)
-/*! INTEN - Enable the TIMERn interrupt.
- * 0b0..Disabled. TIMERn interrupt is disabled.
- * 0b1..Enabled. TIMERn interrupt is enabled.
- */
-#define MRT_CHANNEL_CTRL_INTEN(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_CTRL_INTEN_SHIFT)) & MRT_CHANNEL_CTRL_INTEN_MASK)
-#define MRT_CHANNEL_CTRL_MODE_MASK (0x6U)
-#define MRT_CHANNEL_CTRL_MODE_SHIFT (1U)
-/*! MODE - Selects timer mode.
- * 0b00..Repeat interrupt mode.
- * 0b01..One-shot interrupt mode.
- * 0b10..One-shot stall mode.
- * 0b11..Reserved.
- */
-#define MRT_CHANNEL_CTRL_MODE(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_CTRL_MODE_SHIFT)) & MRT_CHANNEL_CTRL_MODE_MASK)
-/*! @} */
-
-/* The count of MRT_CHANNEL_CTRL */
-#define MRT_CHANNEL_CTRL_COUNT (4U)
-
-/*! @name CHANNEL_STAT - MRT Status register. */
-/*! @{ */
-#define MRT_CHANNEL_STAT_INTFLAG_MASK (0x1U)
-#define MRT_CHANNEL_STAT_INTFLAG_SHIFT (0U)
-/*! INTFLAG - Monitors the interrupt flag.
- * 0b0..No pending interrupt. Writing a zero is equivalent to no operation.
- * 0b1..Pending interrupt. The interrupt is pending because TIMERn has reached the end of the time interval. If
- * the INTEN bit in the CONTROLn is also set to 1, the interrupt for timer channel n and the global interrupt
- * are raised. Writing a 1 to this bit clears the interrupt request.
- */
-#define MRT_CHANNEL_STAT_INTFLAG(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_STAT_INTFLAG_SHIFT)) & MRT_CHANNEL_STAT_INTFLAG_MASK)
-#define MRT_CHANNEL_STAT_RUN_MASK (0x2U)
-#define MRT_CHANNEL_STAT_RUN_SHIFT (1U)
-/*! RUN - Indicates the state of TIMERn. This bit is read-only.
- * 0b0..Idle state. TIMERn is stopped.
- * 0b1..Running. TIMERn is running.
- */
-#define MRT_CHANNEL_STAT_RUN(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_STAT_RUN_SHIFT)) & MRT_CHANNEL_STAT_RUN_MASK)
-#define MRT_CHANNEL_STAT_INUSE_MASK (0x4U)
-#define MRT_CHANNEL_STAT_INUSE_SHIFT (2U)
-/*! INUSE - Channel In Use flag. Operating details depend on the MULTITASK bit in the MODCFG
- * register, and affects the use of IDLE_CH. See Idle channel register for details of the two operating
- * modes.
- * 0b0..This channel is not in use.
- * 0b1..This channel is in use.
- */
-#define MRT_CHANNEL_STAT_INUSE(x) (((uint32_t)(((uint32_t)(x)) << MRT_CHANNEL_STAT_INUSE_SHIFT)) & MRT_CHANNEL_STAT_INUSE_MASK)
-/*! @} */
-
-/* The count of MRT_CHANNEL_STAT */
-#define MRT_CHANNEL_STAT_COUNT (4U)
-
-/*! @name MODCFG - Module Configuration register. This register provides information about this particular MRT instance, and allows choosing an overall mode for the idle channel feature. */
-/*! @{ */
-#define MRT_MODCFG_NOC_MASK (0xFU)
-#define MRT_MODCFG_NOC_SHIFT (0U)
-/*! NOC - Identifies the number of channels in this MRT.(4 channels on this device.)
- */
-#define MRT_MODCFG_NOC(x) (((uint32_t)(((uint32_t)(x)) << MRT_MODCFG_NOC_SHIFT)) & MRT_MODCFG_NOC_MASK)
-#define MRT_MODCFG_NOB_MASK (0x1F0U)
-#define MRT_MODCFG_NOB_SHIFT (4U)
-/*! NOB - Identifies the number of timer bits in this MRT. (24 bits wide on this device.)
- */
-#define MRT_MODCFG_NOB(x) (((uint32_t)(((uint32_t)(x)) << MRT_MODCFG_NOB_SHIFT)) & MRT_MODCFG_NOB_MASK)
-#define MRT_MODCFG_MULTITASK_MASK (0x80000000U)
-#define MRT_MODCFG_MULTITASK_SHIFT (31U)
-/*! MULTITASK - Selects the operating mode for the INUSE flags and the IDLE_CH register.
- * 0b0..Hardware status mode. In this mode, the INUSE(n) flags for all channels are reset.
- * 0b1..Multi-task mode.
- */
-#define MRT_MODCFG_MULTITASK(x) (((uint32_t)(((uint32_t)(x)) << MRT_MODCFG_MULTITASK_SHIFT)) & MRT_MODCFG_MULTITASK_MASK)
-/*! @} */
-
-/*! @name IDLE_CH - Idle channel register. This register returns the number of the first idle channel. */
-/*! @{ */
-#define MRT_IDLE_CH_CHAN_MASK (0xF0U)
-#define MRT_IDLE_CH_CHAN_SHIFT (4U)
-/*! CHAN - Idle channel. Reading the CHAN bits, returns the lowest idle timer channel. The number is
- * positioned such that it can be used as an offset from the MRT base address in order to access
- * the registers for the allocated channel. If all timer channels are running, CHAN = 0xF. See
- * text above for more details.
- */
-#define MRT_IDLE_CH_CHAN(x) (((uint32_t)(((uint32_t)(x)) << MRT_IDLE_CH_CHAN_SHIFT)) & MRT_IDLE_CH_CHAN_MASK)
-/*! @} */
-
-/*! @name IRQ_FLAG - Global interrupt flag register */
-/*! @{ */
-#define MRT_IRQ_FLAG_GFLAG0_MASK (0x1U)
-#define MRT_IRQ_FLAG_GFLAG0_SHIFT (0U)
-/*! GFLAG0 - Monitors the interrupt flag of TIMER0.
- * 0b0..No pending interrupt. Writing a zero is equivalent to no operation.
- * 0b1..Pending interrupt. The interrupt is pending because TIMER0 has reached the end of the time interval. If
- * the INTEN bit in the CONTROL0 register is also set to 1, the interrupt for timer channel 0 and the global
- * interrupt are raised. Writing a 1 to this bit clears the interrupt request.
- */
-#define MRT_IRQ_FLAG_GFLAG0(x) (((uint32_t)(((uint32_t)(x)) << MRT_IRQ_FLAG_GFLAG0_SHIFT)) & MRT_IRQ_FLAG_GFLAG0_MASK)
-#define MRT_IRQ_FLAG_GFLAG1_MASK (0x2U)
-#define MRT_IRQ_FLAG_GFLAG1_SHIFT (1U)
-/*! GFLAG1 - Monitors the interrupt flag of TIMER1. See description of channel 0.
- */
-#define MRT_IRQ_FLAG_GFLAG1(x) (((uint32_t)(((uint32_t)(x)) << MRT_IRQ_FLAG_GFLAG1_SHIFT)) & MRT_IRQ_FLAG_GFLAG1_MASK)
-#define MRT_IRQ_FLAG_GFLAG2_MASK (0x4U)
-#define MRT_IRQ_FLAG_GFLAG2_SHIFT (2U)
-/*! GFLAG2 - Monitors the interrupt flag of TIMER2. See description of channel 0.
- */
-#define MRT_IRQ_FLAG_GFLAG2(x) (((uint32_t)(((uint32_t)(x)) << MRT_IRQ_FLAG_GFLAG2_SHIFT)) & MRT_IRQ_FLAG_GFLAG2_MASK)
-#define MRT_IRQ_FLAG_GFLAG3_MASK (0x8U)
-#define MRT_IRQ_FLAG_GFLAG3_SHIFT (3U)
-/*! GFLAG3 - Monitors the interrupt flag of TIMER3. See description of channel 0.
- */
-#define MRT_IRQ_FLAG_GFLAG3(x) (((uint32_t)(((uint32_t)(x)) << MRT_IRQ_FLAG_GFLAG3_SHIFT)) & MRT_IRQ_FLAG_GFLAG3_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group MRT_Register_Masks */
-
-
-/* MRT - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral MRT0 base address */
- #define MRT0_BASE (0x5000D000u)
- /** Peripheral MRT0 base address */
- #define MRT0_BASE_NS (0x4000D000u)
- /** Peripheral MRT0 base pointer */
- #define MRT0 ((MRT_Type *)MRT0_BASE)
- /** Peripheral MRT0 base pointer */
- #define MRT0_NS ((MRT_Type *)MRT0_BASE_NS)
- /** Array initializer of MRT peripheral base addresses */
- #define MRT_BASE_ADDRS { MRT0_BASE }
- /** Array initializer of MRT peripheral base pointers */
- #define MRT_BASE_PTRS { MRT0 }
- /** Array initializer of MRT peripheral base addresses */
- #define MRT_BASE_ADDRS_NS { MRT0_BASE_NS }
- /** Array initializer of MRT peripheral base pointers */
- #define MRT_BASE_PTRS_NS { MRT0_NS }
-#else
- /** Peripheral MRT0 base address */
- #define MRT0_BASE (0x4000D000u)
- /** Peripheral MRT0 base pointer */
- #define MRT0 ((MRT_Type *)MRT0_BASE)
- /** Array initializer of MRT peripheral base addresses */
- #define MRT_BASE_ADDRS { MRT0_BASE }
- /** Array initializer of MRT peripheral base pointers */
- #define MRT_BASE_PTRS { MRT0 }
-#endif
-/** Interrupt vectors for the MRT peripheral type */
-#define MRT_IRQS { MRT0_IRQn }
-
-/*!
- * @}
- */ /* end of group MRT_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- OSTIMER Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup OSTIMER_Peripheral_Access_Layer OSTIMER Peripheral Access Layer
- * @{
- */
-
-/** OSTIMER - Register Layout Typedef */
-typedef struct {
- __I uint32_t EVTIMERL; /**< EVTIMER Low Register, offset: 0x0 */
- __I uint32_t EVTIMERH; /**< EVTIMER High Register, offset: 0x4 */
- __I uint32_t CAPTURE_L; /**< Capture Low Register, offset: 0x8 */
- __I uint32_t CAPTURE_H; /**< Capture High Register, offset: 0xC */
- __IO uint32_t MATCH_L; /**< Match Low Register, offset: 0x10 */
- __IO uint32_t MATCH_H; /**< Match High Register, offset: 0x14 */
- uint8_t RESERVED_0[4];
- __IO uint32_t OSEVENT_CTRL; /**< OS_EVENT TIMER Control Register, offset: 0x1C */
-} OSTIMER_Type;
-
-/* ----------------------------------------------------------------------------
- -- OSTIMER Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup OSTIMER_Register_Masks OSTIMER Register Masks
- * @{
- */
-
-/*! @name EVTIMERL - EVTIMER Low Register */
-/*! @{ */
-#define OSTIMER_EVTIMERL_EVTIMER_COUNT_VALUE_MASK (0xFFFFFFFFU)
-#define OSTIMER_EVTIMERL_EVTIMER_COUNT_VALUE_SHIFT (0U)
-/*! EVTIMER_COUNT_VALUE - A read reflects the current value of the lower 32 bits of the 42-bits
- * EVTIMER. Note: There is only one EVTIMER, readable from all domains.
- */
-#define OSTIMER_EVTIMERL_EVTIMER_COUNT_VALUE(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_EVTIMERL_EVTIMER_COUNT_VALUE_SHIFT)) & OSTIMER_EVTIMERL_EVTIMER_COUNT_VALUE_MASK)
-/*! @} */
-
-/*! @name EVTIMERH - EVTIMER High Register */
-/*! @{ */
-#define OSTIMER_EVTIMERH_EVTIMER_COUNT_VALUE_MASK (0x3FFU)
-#define OSTIMER_EVTIMERH_EVTIMER_COUNT_VALUE_SHIFT (0U)
-/*! EVTIMER_COUNT_VALUE - A read reflects the current value of the upper 10 bits of the 42-bits
- * EVTIMER. Note there is only one EVTIMER, readable from all domains.
- */
-#define OSTIMER_EVTIMERH_EVTIMER_COUNT_VALUE(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_EVTIMERH_EVTIMER_COUNT_VALUE_SHIFT)) & OSTIMER_EVTIMERH_EVTIMER_COUNT_VALUE_MASK)
-/*! @} */
-
-/*! @name CAPTURE_L - Capture Low Register */
-/*! @{ */
-#define OSTIMER_CAPTURE_L_CAPTURE_VALUE_MASK (0xFFFFFFFFU)
-#define OSTIMER_CAPTURE_L_CAPTURE_VALUE_SHIFT (0U)
-/*! CAPTURE_VALUE - A read reflects the value of the lower 32 bits of the central 42-bits EVTIMER at
- * the time the last capture signal was generated by the CPU (using CMSIS C function "__SEV();").
- */
-#define OSTIMER_CAPTURE_L_CAPTURE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_CAPTURE_L_CAPTURE_VALUE_SHIFT)) & OSTIMER_CAPTURE_L_CAPTURE_VALUE_MASK)
-/*! @} */
-
-/*! @name CAPTURE_H - Capture High Register */
-/*! @{ */
-#define OSTIMER_CAPTURE_H_CAPTURE_VALUE_MASK (0x3FFU)
-#define OSTIMER_CAPTURE_H_CAPTURE_VALUE_SHIFT (0U)
-/*! CAPTURE_VALUE - A read reflects the value of the upper 10 bits of the central 42-bits EVTIMER at
- * the time the last capture signal was generated by the CPU (using CMSIS C function "__SEV();").
- */
-#define OSTIMER_CAPTURE_H_CAPTURE_VALUE(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_CAPTURE_H_CAPTURE_VALUE_SHIFT)) & OSTIMER_CAPTURE_H_CAPTURE_VALUE_MASK)
-/*! @} */
-
-/*! @name MATCH_L - Match Low Register */
-/*! @{ */
-#define OSTIMER_MATCH_L_MATCH_VALUE_MASK (0xFFFFFFFFU)
-#define OSTIMER_MATCH_L_MATCH_VALUE_SHIFT (0U)
-/*! MATCH_VALUE - The value written to the MATCH (L/H) register pair is compared against the central
- * EVTIMER. When a match occurs, an interrupt request is generated if enabled.
- */
-#define OSTIMER_MATCH_L_MATCH_VALUE(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_MATCH_L_MATCH_VALUE_SHIFT)) & OSTIMER_MATCH_L_MATCH_VALUE_MASK)
-/*! @} */
-
-/*! @name MATCH_H - Match High Register */
-/*! @{ */
-#define OSTIMER_MATCH_H_MATCH_VALUE_MASK (0x3FFU)
-#define OSTIMER_MATCH_H_MATCH_VALUE_SHIFT (0U)
-/*! MATCH_VALUE - The value written (upper 10 bits) to the MATCH (L/H) register pair is compared
- * against the central EVTIMER. When a match occurs, an interrupt request is generated if enabled.
- */
-#define OSTIMER_MATCH_H_MATCH_VALUE(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_MATCH_H_MATCH_VALUE_SHIFT)) & OSTIMER_MATCH_H_MATCH_VALUE_MASK)
-/*! @} */
-
-/*! @name OSEVENT_CTRL - OS_EVENT TIMER Control Register */
-/*! @{ */
-#define OSTIMER_OSEVENT_CTRL_OSTIMER_INTRFLAG_MASK (0x1U)
-#define OSTIMER_OSEVENT_CTRL_OSTIMER_INTRFLAG_SHIFT (0U)
-/*! OSTIMER_INTRFLAG - This bit is set when a match occurs between the central 42-bits EVTIMER and
- * the value programmed in the match-register pair. This bit is cleared by writing a '1'. Writes
- * to clear this bit are asynchronous. It should be done before a new match value is written into
- * the MATCH_L/H registers.
- */
-#define OSTIMER_OSEVENT_CTRL_OSTIMER_INTRFLAG(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_OSEVENT_CTRL_OSTIMER_INTRFLAG_SHIFT)) & OSTIMER_OSEVENT_CTRL_OSTIMER_INTRFLAG_MASK)
-#define OSTIMER_OSEVENT_CTRL_OSTIMER_INTENA_MASK (0x2U)
-#define OSTIMER_OSEVENT_CTRL_OSTIMER_INTENA_SHIFT (1U)
-/*! OSTIMER_INTENA - When this bit is '1' an interrupt/wakeup request to the domain processor will
- * be asserted when the OSTIMER_INTR flag is set. When this bit is '0', interrupt/wakeup requests
- * due to the OSTIMER_INTR flag are blocked.
- */
-#define OSTIMER_OSEVENT_CTRL_OSTIMER_INTENA(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_OSEVENT_CTRL_OSTIMER_INTENA_SHIFT)) & OSTIMER_OSEVENT_CTRL_OSTIMER_INTENA_MASK)
-#define OSTIMER_OSEVENT_CTRL_MATCH_WR_RDY_MASK (0x4U)
-#define OSTIMER_OSEVENT_CTRL_MATCH_WR_RDY_SHIFT (2U)
-/*! MATCH_WR_RDY - This bit will be low when it is safe to write to reload the Match Registers. In
- * typical applications it should not be necessary to test this bit. [1]
- */
-#define OSTIMER_OSEVENT_CTRL_MATCH_WR_RDY(x) (((uint32_t)(((uint32_t)(x)) << OSTIMER_OSEVENT_CTRL_MATCH_WR_RDY_SHIFT)) & OSTIMER_OSEVENT_CTRL_MATCH_WR_RDY_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group OSTIMER_Register_Masks */
-
-
-/* OSTIMER - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral OSTIMER base address */
- #define OSTIMER_BASE (0x5002D000u)
- /** Peripheral OSTIMER base address */
- #define OSTIMER_BASE_NS (0x4002D000u)
- /** Peripheral OSTIMER base pointer */
- #define OSTIMER ((OSTIMER_Type *)OSTIMER_BASE)
- /** Peripheral OSTIMER base pointer */
- #define OSTIMER_NS ((OSTIMER_Type *)OSTIMER_BASE_NS)
- /** Array initializer of OSTIMER peripheral base addresses */
- #define OSTIMER_BASE_ADDRS { OSTIMER_BASE }
- /** Array initializer of OSTIMER peripheral base pointers */
- #define OSTIMER_BASE_PTRS { OSTIMER }
- /** Array initializer of OSTIMER peripheral base addresses */
- #define OSTIMER_BASE_ADDRS_NS { OSTIMER_BASE_NS }
- /** Array initializer of OSTIMER peripheral base pointers */
- #define OSTIMER_BASE_PTRS_NS { OSTIMER_NS }
-#else
- /** Peripheral OSTIMER base address */
- #define OSTIMER_BASE (0x4002D000u)
- /** Peripheral OSTIMER base pointer */
- #define OSTIMER ((OSTIMER_Type *)OSTIMER_BASE)
- /** Array initializer of OSTIMER peripheral base addresses */
- #define OSTIMER_BASE_ADDRS { OSTIMER_BASE }
- /** Array initializer of OSTIMER peripheral base pointers */
- #define OSTIMER_BASE_PTRS { OSTIMER }
-#endif
-/** Interrupt vectors for the OSTIMER peripheral type */
-#define OSTIMER_IRQS { OS_EVENT_IRQn }
-
-/*!
- * @}
- */ /* end of group OSTIMER_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- PINT Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PINT_Peripheral_Access_Layer PINT Peripheral Access Layer
- * @{
- */
-
-/** PINT - Register Layout Typedef */
-typedef struct {
- __IO uint32_t ISEL; /**< Pin Interrupt Mode register, offset: 0x0 */
- __IO uint32_t IENR; /**< Pin interrupt level or rising edge interrupt enable register, offset: 0x4 */
- __O uint32_t SIENR; /**< Pin interrupt level or rising edge interrupt set register, offset: 0x8 */
- __O uint32_t CIENR; /**< Pin interrupt level (rising edge interrupt) clear register, offset: 0xC */
- __IO uint32_t IENF; /**< Pin interrupt active level or falling edge interrupt enable register, offset: 0x10 */
- __O uint32_t SIENF; /**< Pin interrupt active level or falling edge interrupt set register, offset: 0x14 */
- __O uint32_t CIENF; /**< Pin interrupt active level or falling edge interrupt clear register, offset: 0x18 */
- __IO uint32_t RISE; /**< Pin interrupt rising edge register, offset: 0x1C */
- __IO uint32_t FALL; /**< Pin interrupt falling edge register, offset: 0x20 */
- __IO uint32_t IST; /**< Pin interrupt status register, offset: 0x24 */
- __IO uint32_t PMCTRL; /**< Pattern match interrupt control register, offset: 0x28 */
- __IO uint32_t PMSRC; /**< Pattern match interrupt bit-slice source register, offset: 0x2C */
- __IO uint32_t PMCFG; /**< Pattern match interrupt bit slice configuration register, offset: 0x30 */
-} PINT_Type;
-
-/* ----------------------------------------------------------------------------
- -- PINT Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PINT_Register_Masks PINT Register Masks
- * @{
- */
-
-/*! @name ISEL - Pin Interrupt Mode register */
-/*! @{ */
-#define PINT_ISEL_PMODE_MASK (0xFFU)
-#define PINT_ISEL_PMODE_SHIFT (0U)
-/*! PMODE - Selects the interrupt mode for each pin interrupt. Bit n configures the pin interrupt
- * selected in PINTSELn. 0 = Edge sensitive 1 = Level sensitive
- */
-#define PINT_ISEL_PMODE(x) (((uint32_t)(((uint32_t)(x)) << PINT_ISEL_PMODE_SHIFT)) & PINT_ISEL_PMODE_MASK)
-/*! @} */
-
-/*! @name IENR - Pin interrupt level or rising edge interrupt enable register */
-/*! @{ */
-#define PINT_IENR_ENRL_MASK (0xFFU)
-#define PINT_IENR_ENRL_SHIFT (0U)
-/*! ENRL - Enables the rising edge or level interrupt for each pin interrupt. Bit n configures the
- * pin interrupt selected in PINTSELn. 0 = Disable rising edge or level interrupt. 1 = Enable
- * rising edge or level interrupt.
- */
-#define PINT_IENR_ENRL(x) (((uint32_t)(((uint32_t)(x)) << PINT_IENR_ENRL_SHIFT)) & PINT_IENR_ENRL_MASK)
-/*! @} */
-
-/*! @name SIENR - Pin interrupt level or rising edge interrupt set register */
-/*! @{ */
-#define PINT_SIENR_SETENRL_MASK (0xFFU)
-#define PINT_SIENR_SETENRL_SHIFT (0U)
-/*! SETENRL - Ones written to this address set bits in the IENR, thus enabling interrupts. Bit n
- * sets bit n in the IENR register. 0 = No operation. 1 = Enable rising edge or level interrupt.
- */
-#define PINT_SIENR_SETENRL(x) (((uint32_t)(((uint32_t)(x)) << PINT_SIENR_SETENRL_SHIFT)) & PINT_SIENR_SETENRL_MASK)
-/*! @} */
-
-/*! @name CIENR - Pin interrupt level (rising edge interrupt) clear register */
-/*! @{ */
-#define PINT_CIENR_CENRL_MASK (0xFFU)
-#define PINT_CIENR_CENRL_SHIFT (0U)
-/*! CENRL - Ones written to this address clear bits in the IENR, thus disabling the interrupts. Bit
- * n clears bit n in the IENR register. 0 = No operation. 1 = Disable rising edge or level
- * interrupt.
- */
-#define PINT_CIENR_CENRL(x) (((uint32_t)(((uint32_t)(x)) << PINT_CIENR_CENRL_SHIFT)) & PINT_CIENR_CENRL_MASK)
-/*! @} */
-
-/*! @name IENF - Pin interrupt active level or falling edge interrupt enable register */
-/*! @{ */
-#define PINT_IENF_ENAF_MASK (0xFFU)
-#define PINT_IENF_ENAF_SHIFT (0U)
-/*! ENAF - Enables the falling edge or configures the active level interrupt for each pin interrupt.
- * Bit n configures the pin interrupt selected in PINTSELn. 0 = Disable falling edge interrupt
- * or set active interrupt level LOW. 1 = Enable falling edge interrupt enabled or set active
- * interrupt level HIGH.
- */
-#define PINT_IENF_ENAF(x) (((uint32_t)(((uint32_t)(x)) << PINT_IENF_ENAF_SHIFT)) & PINT_IENF_ENAF_MASK)
-/*! @} */
-
-/*! @name SIENF - Pin interrupt active level or falling edge interrupt set register */
-/*! @{ */
-#define PINT_SIENF_SETENAF_MASK (0xFFU)
-#define PINT_SIENF_SETENAF_SHIFT (0U)
-/*! SETENAF - Ones written to this address set bits in the IENF, thus enabling interrupts. Bit n
- * sets bit n in the IENF register. 0 = No operation. 1 = Select HIGH-active interrupt or enable
- * falling edge interrupt.
- */
-#define PINT_SIENF_SETENAF(x) (((uint32_t)(((uint32_t)(x)) << PINT_SIENF_SETENAF_SHIFT)) & PINT_SIENF_SETENAF_MASK)
-/*! @} */
-
-/*! @name CIENF - Pin interrupt active level or falling edge interrupt clear register */
-/*! @{ */
-#define PINT_CIENF_CENAF_MASK (0xFFU)
-#define PINT_CIENF_CENAF_SHIFT (0U)
-/*! CENAF - Ones written to this address clears bits in the IENF, thus disabling interrupts. Bit n
- * clears bit n in the IENF register. 0 = No operation. 1 = LOW-active interrupt selected or
- * falling edge interrupt disabled.
- */
-#define PINT_CIENF_CENAF(x) (((uint32_t)(((uint32_t)(x)) << PINT_CIENF_CENAF_SHIFT)) & PINT_CIENF_CENAF_MASK)
-/*! @} */
-
-/*! @name RISE - Pin interrupt rising edge register */
-/*! @{ */
-#define PINT_RISE_RDET_MASK (0xFFU)
-#define PINT_RISE_RDET_SHIFT (0U)
-/*! RDET - Rising edge detect. Bit n detects the rising edge of the pin selected in PINTSELn. Read
- * 0: No rising edge has been detected on this pin since Reset or the last time a one was written
- * to this bit. Write 0: no operation. Read 1: a rising edge has been detected since Reset or the
- * last time a one was written to this bit. Write 1: clear rising edge detection for this pin.
- */
-#define PINT_RISE_RDET(x) (((uint32_t)(((uint32_t)(x)) << PINT_RISE_RDET_SHIFT)) & PINT_RISE_RDET_MASK)
-/*! @} */
-
-/*! @name FALL - Pin interrupt falling edge register */
-/*! @{ */
-#define PINT_FALL_FDET_MASK (0xFFU)
-#define PINT_FALL_FDET_SHIFT (0U)
-/*! FDET - Falling edge detect. Bit n detects the falling edge of the pin selected in PINTSELn. Read
- * 0: No falling edge has been detected on this pin since Reset or the last time a one was
- * written to this bit. Write 0: no operation. Read 1: a falling edge has been detected since Reset or
- * the last time a one was written to this bit. Write 1: clear falling edge detection for this
- * pin.
- */
-#define PINT_FALL_FDET(x) (((uint32_t)(((uint32_t)(x)) << PINT_FALL_FDET_SHIFT)) & PINT_FALL_FDET_MASK)
-/*! @} */
-
-/*! @name IST - Pin interrupt status register */
-/*! @{ */
-#define PINT_IST_PSTAT_MASK (0xFFU)
-#define PINT_IST_PSTAT_SHIFT (0U)
-/*! PSTAT - Pin interrupt status. Bit n returns the status, clears the edge interrupt, or inverts
- * the active level of the pin selected in PINTSELn. Read 0: interrupt is not being requested for
- * this interrupt pin. Write 0: no operation. Read 1: interrupt is being requested for this
- * interrupt pin. Write 1 (edge-sensitive): clear rising- and falling-edge detection for this pin.
- * Write 1 (level-sensitive): switch the active level for this pin (in the IENF register).
- */
-#define PINT_IST_PSTAT(x) (((uint32_t)(((uint32_t)(x)) << PINT_IST_PSTAT_SHIFT)) & PINT_IST_PSTAT_MASK)
-/*! @} */
-
-/*! @name PMCTRL - Pattern match interrupt control register */
-/*! @{ */
-#define PINT_PMCTRL_SEL_PMATCH_MASK (0x1U)
-#define PINT_PMCTRL_SEL_PMATCH_SHIFT (0U)
-/*! SEL_PMATCH - Specifies whether the 8 pin interrupts are controlled by the pin interrupt function or by the pattern match function.
- * 0b0..Pin interrupt. Interrupts are driven in response to the standard pin interrupt function.
- * 0b1..Pattern match. Interrupts are driven in response to pattern matches.
- */
-#define PINT_PMCTRL_SEL_PMATCH(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCTRL_SEL_PMATCH_SHIFT)) & PINT_PMCTRL_SEL_PMATCH_MASK)
-#define PINT_PMCTRL_ENA_RXEV_MASK (0x2U)
-#define PINT_PMCTRL_ENA_RXEV_SHIFT (1U)
-/*! ENA_RXEV - Enables the RXEV output to the CPU and/or to a GPIO output when the specified boolean expression evaluates to true.
- * 0b0..Disabled. RXEV output to the CPU is disabled.
- * 0b1..Enabled. RXEV output to the CPU is enabled.
- */
-#define PINT_PMCTRL_ENA_RXEV(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCTRL_ENA_RXEV_SHIFT)) & PINT_PMCTRL_ENA_RXEV_MASK)
-#define PINT_PMCTRL_PMAT_MASK (0xFF000000U)
-#define PINT_PMCTRL_PMAT_SHIFT (24U)
-/*! PMAT - This field displays the current state of pattern matches. A 1 in any bit of this field
- * indicates that the corresponding product term is matched by the current state of the appropriate
- * inputs.
- */
-#define PINT_PMCTRL_PMAT(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCTRL_PMAT_SHIFT)) & PINT_PMCTRL_PMAT_MASK)
-/*! @} */
-
-/*! @name PMSRC - Pattern match interrupt bit-slice source register */
-/*! @{ */
-#define PINT_PMSRC_SRC0_MASK (0x700U)
-#define PINT_PMSRC_SRC0_SHIFT (8U)
-/*! SRC0 - Selects the input source for bit slice 0
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 0.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 0.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 0.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 0.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 0.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 0.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 0.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 0.
- */
-#define PINT_PMSRC_SRC0(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC0_SHIFT)) & PINT_PMSRC_SRC0_MASK)
-#define PINT_PMSRC_SRC1_MASK (0x3800U)
-#define PINT_PMSRC_SRC1_SHIFT (11U)
-/*! SRC1 - Selects the input source for bit slice 1
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 1.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 1.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 1.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 1.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 1.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 1.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 1.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 1.
- */
-#define PINT_PMSRC_SRC1(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC1_SHIFT)) & PINT_PMSRC_SRC1_MASK)
-#define PINT_PMSRC_SRC2_MASK (0x1C000U)
-#define PINT_PMSRC_SRC2_SHIFT (14U)
-/*! SRC2 - Selects the input source for bit slice 2
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 2.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 2.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 2.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 2.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 2.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 2.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 2.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 2.
- */
-#define PINT_PMSRC_SRC2(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC2_SHIFT)) & PINT_PMSRC_SRC2_MASK)
-#define PINT_PMSRC_SRC3_MASK (0xE0000U)
-#define PINT_PMSRC_SRC3_SHIFT (17U)
-/*! SRC3 - Selects the input source for bit slice 3
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 3.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 3.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 3.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 3.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 3.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 3.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 3.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 3.
- */
-#define PINT_PMSRC_SRC3(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC3_SHIFT)) & PINT_PMSRC_SRC3_MASK)
-#define PINT_PMSRC_SRC4_MASK (0x700000U)
-#define PINT_PMSRC_SRC4_SHIFT (20U)
-/*! SRC4 - Selects the input source for bit slice 4
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 4.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 4.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 4.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 4.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 4.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 4.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 4.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 4.
- */
-#define PINT_PMSRC_SRC4(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC4_SHIFT)) & PINT_PMSRC_SRC4_MASK)
-#define PINT_PMSRC_SRC5_MASK (0x3800000U)
-#define PINT_PMSRC_SRC5_SHIFT (23U)
-/*! SRC5 - Selects the input source for bit slice 5
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 5.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 5.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 5.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 5.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 5.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 5.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 5.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 5.
- */
-#define PINT_PMSRC_SRC5(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC5_SHIFT)) & PINT_PMSRC_SRC5_MASK)
-#define PINT_PMSRC_SRC6_MASK (0x1C000000U)
-#define PINT_PMSRC_SRC6_SHIFT (26U)
-/*! SRC6 - Selects the input source for bit slice 6
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 6.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 6.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 6.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 6.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 6.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 6.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 6.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 6.
- */
-#define PINT_PMSRC_SRC6(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC6_SHIFT)) & PINT_PMSRC_SRC6_MASK)
-#define PINT_PMSRC_SRC7_MASK (0xE0000000U)
-#define PINT_PMSRC_SRC7_SHIFT (29U)
-/*! SRC7 - Selects the input source for bit slice 7
- * 0b000..Input 0. Selects the pin selected in the PINTSEL0 register as the source to bit slice 7.
- * 0b001..Input 1. Selects the pin selected in the PINTSEL1 register as the source to bit slice 7.
- * 0b010..Input 2. Selects the pin selected in the PINTSEL2 register as the source to bit slice 7.
- * 0b011..Input 3. Selects the pin selected in the PINTSEL3 register as the source to bit slice 7.
- * 0b100..Input 4. Selects the pin selected in the PINTSEL4 register as the source to bit slice 7.
- * 0b101..Input 5. Selects the pin selected in the PINTSEL5 register as the source to bit slice 7.
- * 0b110..Input 6. Selects the pin selected in the PINTSEL6 register as the source to bit slice 7.
- * 0b111..Input 7. Selects the pin selected in the PINTSEL7 register as the source to bit slice 7.
- */
-#define PINT_PMSRC_SRC7(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMSRC_SRC7_SHIFT)) & PINT_PMSRC_SRC7_MASK)
-/*! @} */
-
-/*! @name PMCFG - Pattern match interrupt bit slice configuration register */
-/*! @{ */
-#define PINT_PMCFG_PROD_ENDPTS0_MASK (0x1U)
-#define PINT_PMCFG_PROD_ENDPTS0_SHIFT (0U)
-/*! PROD_ENDPTS0 - Determines whether slice 0 is an endpoint.
- * 0b0..No effect. Slice 0 is not an endpoint.
- * 0b1..endpoint. Slice 0 is the endpoint of a product term (minterm). Pin interrupt 0 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS0(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS0_SHIFT)) & PINT_PMCFG_PROD_ENDPTS0_MASK)
-#define PINT_PMCFG_PROD_ENDPTS1_MASK (0x2U)
-#define PINT_PMCFG_PROD_ENDPTS1_SHIFT (1U)
-/*! PROD_ENDPTS1 - Determines whether slice 1 is an endpoint.
- * 0b0..No effect. Slice 1 is not an endpoint.
- * 0b1..endpoint. Slice 1 is the endpoint of a product term (minterm). Pin interrupt 1 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS1(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS1_SHIFT)) & PINT_PMCFG_PROD_ENDPTS1_MASK)
-#define PINT_PMCFG_PROD_ENDPTS2_MASK (0x4U)
-#define PINT_PMCFG_PROD_ENDPTS2_SHIFT (2U)
-/*! PROD_ENDPTS2 - Determines whether slice 2 is an endpoint.
- * 0b0..No effect. Slice 2 is not an endpoint.
- * 0b1..endpoint. Slice 2 is the endpoint of a product term (minterm). Pin interrupt 2 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS2(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS2_SHIFT)) & PINT_PMCFG_PROD_ENDPTS2_MASK)
-#define PINT_PMCFG_PROD_ENDPTS3_MASK (0x8U)
-#define PINT_PMCFG_PROD_ENDPTS3_SHIFT (3U)
-/*! PROD_ENDPTS3 - Determines whether slice 3 is an endpoint.
- * 0b0..No effect. Slice 3 is not an endpoint.
- * 0b1..endpoint. Slice 3 is the endpoint of a product term (minterm). Pin interrupt 3 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS3(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS3_SHIFT)) & PINT_PMCFG_PROD_ENDPTS3_MASK)
-#define PINT_PMCFG_PROD_ENDPTS4_MASK (0x10U)
-#define PINT_PMCFG_PROD_ENDPTS4_SHIFT (4U)
-/*! PROD_ENDPTS4 - Determines whether slice 4 is an endpoint.
- * 0b0..No effect. Slice 4 is not an endpoint.
- * 0b1..endpoint. Slice 4 is the endpoint of a product term (minterm). Pin interrupt 4 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS4(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS4_SHIFT)) & PINT_PMCFG_PROD_ENDPTS4_MASK)
-#define PINT_PMCFG_PROD_ENDPTS5_MASK (0x20U)
-#define PINT_PMCFG_PROD_ENDPTS5_SHIFT (5U)
-/*! PROD_ENDPTS5 - Determines whether slice 5 is an endpoint.
- * 0b0..No effect. Slice 5 is not an endpoint.
- * 0b1..endpoint. Slice 5 is the endpoint of a product term (minterm). Pin interrupt 5 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS5(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS5_SHIFT)) & PINT_PMCFG_PROD_ENDPTS5_MASK)
-#define PINT_PMCFG_PROD_ENDPTS6_MASK (0x40U)
-#define PINT_PMCFG_PROD_ENDPTS6_SHIFT (6U)
-/*! PROD_ENDPTS6 - Determines whether slice 6 is an endpoint.
- * 0b0..No effect. Slice 6 is not an endpoint.
- * 0b1..endpoint. Slice 6 is the endpoint of a product term (minterm). Pin interrupt 6 in the NVIC is raised if the minterm evaluates as true.
- */
-#define PINT_PMCFG_PROD_ENDPTS6(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_PROD_ENDPTS6_SHIFT)) & PINT_PMCFG_PROD_ENDPTS6_MASK)
-#define PINT_PMCFG_CFG0_MASK (0x700U)
-#define PINT_PMCFG_CFG0_SHIFT (8U)
-/*! CFG0 - Specifies the match contribution condition for bit slice 0.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG0(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG0_SHIFT)) & PINT_PMCFG_CFG0_MASK)
-#define PINT_PMCFG_CFG1_MASK (0x3800U)
-#define PINT_PMCFG_CFG1_SHIFT (11U)
-/*! CFG1 - Specifies the match contribution condition for bit slice 1.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG1(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG1_SHIFT)) & PINT_PMCFG_CFG1_MASK)
-#define PINT_PMCFG_CFG2_MASK (0x1C000U)
-#define PINT_PMCFG_CFG2_SHIFT (14U)
-/*! CFG2 - Specifies the match contribution condition for bit slice 2.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG2(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG2_SHIFT)) & PINT_PMCFG_CFG2_MASK)
-#define PINT_PMCFG_CFG3_MASK (0xE0000U)
-#define PINT_PMCFG_CFG3_SHIFT (17U)
-/*! CFG3 - Specifies the match contribution condition for bit slice 3.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG3(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG3_SHIFT)) & PINT_PMCFG_CFG3_MASK)
-#define PINT_PMCFG_CFG4_MASK (0x700000U)
-#define PINT_PMCFG_CFG4_SHIFT (20U)
-/*! CFG4 - Specifies the match contribution condition for bit slice 4.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG4(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG4_SHIFT)) & PINT_PMCFG_CFG4_MASK)
-#define PINT_PMCFG_CFG5_MASK (0x3800000U)
-#define PINT_PMCFG_CFG5_SHIFT (23U)
-/*! CFG5 - Specifies the match contribution condition for bit slice 5.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG5(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG5_SHIFT)) & PINT_PMCFG_CFG5_MASK)
-#define PINT_PMCFG_CFG6_MASK (0x1C000000U)
-#define PINT_PMCFG_CFG6_SHIFT (26U)
-/*! CFG6 - Specifies the match contribution condition for bit slice 6.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG6(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG6_SHIFT)) & PINT_PMCFG_CFG6_MASK)
-#define PINT_PMCFG_CFG7_MASK (0xE0000000U)
-#define PINT_PMCFG_CFG7_SHIFT (29U)
-/*! CFG7 - Specifies the match contribution condition for bit slice 7.
- * 0b000..Constant HIGH. This bit slice always contributes to a product term match.
- * 0b001..Sticky rising edge. Match occurs if a rising edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b010..Sticky falling edge. Match occurs if a falling edge on the specified input has occurred since the last
- * time the edge detection for this bit slice was cleared. This bit is only cleared when the PMCFG or the
- * PMSRC registers are written to.
- * 0b011..Sticky rising or falling edge. Match occurs if either a rising or falling edge on the specified input
- * has occurred since the last time the edge detection for this bit slice was cleared. This bit is only
- * cleared when the PMCFG or the PMSRC registers are written to.
- * 0b100..High level. Match (for this bit slice) occurs when there is a high level on the input specified for this bit slice in the PMSRC register.
- * 0b101..Low level. Match occurs when there is a low level on the specified input.
- * 0b110..Constant 0. This bit slice never contributes to a match (should be used to disable any unused bit slices).
- * 0b111..Event. Non-sticky rising or falling edge. Match occurs on an event - i.e. when either a rising or
- * falling edge is first detected on the specified input (this is a non-sticky version of value 0x3) . This bit
- * is cleared after one clock cycle.
- */
-#define PINT_PMCFG_CFG7(x) (((uint32_t)(((uint32_t)(x)) << PINT_PMCFG_CFG7_SHIFT)) & PINT_PMCFG_CFG7_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group PINT_Register_Masks */
-
-
-/* PINT - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral PINT base address */
- #define PINT_BASE (0x50004000u)
- /** Peripheral PINT base address */
- #define PINT_BASE_NS (0x40004000u)
- /** Peripheral PINT base pointer */
- #define PINT ((PINT_Type *)PINT_BASE)
- /** Peripheral PINT base pointer */
- #define PINT_NS ((PINT_Type *)PINT_BASE_NS)
- /** Peripheral SECPINT base address */
- #define SECPINT_BASE (0x50005000u)
- /** Peripheral SECPINT base address */
- #define SECPINT_BASE_NS (0x40005000u)
- /** Peripheral SECPINT base pointer */
- #define SECPINT ((PINT_Type *)SECPINT_BASE)
- /** Peripheral SECPINT base pointer */
- #define SECPINT_NS ((PINT_Type *)SECPINT_BASE_NS)
- /** Array initializer of PINT peripheral base addresses */
- #define PINT_BASE_ADDRS { PINT_BASE, SECPINT_BASE }
- /** Array initializer of PINT peripheral base pointers */
- #define PINT_BASE_PTRS { PINT, SECPINT }
- /** Array initializer of PINT peripheral base addresses */
- #define PINT_BASE_ADDRS_NS { PINT_BASE_NS, SECPINT_BASE_NS }
- /** Array initializer of PINT peripheral base pointers */
- #define PINT_BASE_PTRS_NS { PINT_NS, SECPINT_NS }
-#else
- /** Peripheral PINT base address */
- #define PINT_BASE (0x40004000u)
- /** Peripheral PINT base pointer */
- #define PINT ((PINT_Type *)PINT_BASE)
- /** Peripheral SECPINT base address */
- #define SECPINT_BASE (0x40005000u)
- /** Peripheral SECPINT base pointer */
- #define SECPINT ((PINT_Type *)SECPINT_BASE)
- /** Array initializer of PINT peripheral base addresses */
- #define PINT_BASE_ADDRS { PINT_BASE, SECPINT_BASE }
- /** Array initializer of PINT peripheral base pointers */
- #define PINT_BASE_PTRS { PINT, SECPINT }
-#endif
-/** Interrupt vectors for the PINT peripheral type */
-#define PINT_IRQS { PIN_INT0_IRQn, PIN_INT1_IRQn, PIN_INT2_IRQn, PIN_INT3_IRQn, PIN_INT4_IRQn, PIN_INT5_IRQn, PIN_INT6_IRQn, PIN_INT7_IRQn, SEC_GPIO_INT0_IRQ0_IRQn, SEC_GPIO_INT0_IRQ1_IRQn }
-
-/*!
- * @}
- */ /* end of group PINT_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- PLU Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PLU_Peripheral_Access_Layer PLU Peripheral Access Layer
- * @{
- */
-
-/** PLU - Register Layout Typedef */
-typedef struct {
- struct { /* offset: 0x0, array step: 0x20 */
- __IO uint32_t INP_MUX[5]; /**< LUTn input x MUX, array offset: 0x0, array step: index*0x20, index2*0x4 */
- uint8_t RESERVED_0[12];
- } LUT[26];
- uint8_t RESERVED_0[1216];
- __IO uint32_t LUT_TRUTH[26]; /**< Specifies the Truth Table contents for LUT0..Specifies the Truth Table contents for LUT25, array offset: 0x800, array step: 0x4 */
- uint8_t RESERVED_1[152];
- __I uint32_t OUTPUTS; /**< Provides the current state of the 8 designated PLU Outputs., offset: 0x900 */
- __IO uint32_t WAKEINT_CTRL; /**< Wakeup interrupt control for PLU, offset: 0x904 */
- uint8_t RESERVED_2[760];
- __IO uint32_t OUTPUT_MUX[8]; /**< Selects the source to be connected to PLU Output 0..Selects the source to be connected to PLU Output 7, array offset: 0xC00, array step: 0x4 */
-} PLU_Type;
-
-/* ----------------------------------------------------------------------------
- -- PLU Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PLU_Register_Masks PLU Register Masks
- * @{
- */
-
-/*! @name LUT_INP_MUX - LUTn input x MUX */
-/*! @{ */
-#define PLU_LUT_INP_MUX_LUTn_INPx_MASK (0x3FU)
-#define PLU_LUT_INP_MUX_LUTn_INPx_SHIFT (0U)
-/*! LUTn_INPx - Selects the input source to be connected to LUT25 input4. For each LUT, the slot
- * associated with the output from LUTn itself is tied low.
- * 0b000000..The PLU primary inputs 0.
- * 0b000001..The PLU primary inputs 1.
- * 0b000010..The PLU primary inputs 2.
- * 0b000011..The PLU primary inputs 3.
- * 0b000100..The PLU primary inputs 4.
- * 0b000101..The PLU primary inputs 5.
- * 0b000110..The output of LUT0.
- * 0b000111..The output of LUT1.
- * 0b001000..The output of LUT2.
- * 0b001001..The output of LUT3.
- * 0b001010..The output of LUT4.
- * 0b001011..The output of LUT5.
- * 0b001100..The output of LUT6.
- * 0b001101..The output of LUT7.
- * 0b001110..The output of LUT8.
- * 0b001111..The output of LUT9.
- * 0b010000..The output of LUT10.
- * 0b010001..The output of LUT11.
- * 0b010010..The output of LUT12.
- * 0b010011..The output of LUT13.
- * 0b010100..The output of LUT14.
- * 0b010101..The output of LUT15.
- * 0b010110..The output of LUT16.
- * 0b010111..The output of LUT17.
- * 0b011000..The output of LUT18.
- * 0b011001..The output of LUT19.
- * 0b011010..The output of LUT20.
- * 0b011011..The output of LUT21.
- * 0b011100..The output of LUT22.
- * 0b011101..The output of LUT23.
- * 0b011110..The output of LUT24.
- * 0b011111..The output of LUT25.
- * 0b100000..state(0).
- * 0b100001..state(1).
- * 0b100010..state(2).
- * 0b100011..state(3).
- */
-#define PLU_LUT_INP_MUX_LUTn_INPx(x) (((uint32_t)(((uint32_t)(x)) << PLU_LUT_INP_MUX_LUTn_INPx_SHIFT)) & PLU_LUT_INP_MUX_LUTn_INPx_MASK)
-/*! @} */
-
-/* The count of PLU_LUT_INP_MUX */
-#define PLU_LUT_INP_MUX_COUNT (26U)
-
-/* The count of PLU_LUT_INP_MUX */
-#define PLU_LUT_INP_MUX_COUNT2 (5U)
-
-/*! @name LUT_TRUTH - Specifies the Truth Table contents for LUT0..Specifies the Truth Table contents for LUT25 */
-/*! @{ */
-#define PLU_LUT_TRUTH_LUTn_TRUTH_MASK (0xFFFFFFFFU)
-#define PLU_LUT_TRUTH_LUTn_TRUTH_SHIFT (0U)
-/*! LUTn_TRUTH - Specifies the Truth Table contents for LUT25..
- */
-#define PLU_LUT_TRUTH_LUTn_TRUTH(x) (((uint32_t)(((uint32_t)(x)) << PLU_LUT_TRUTH_LUTn_TRUTH_SHIFT)) & PLU_LUT_TRUTH_LUTn_TRUTH_MASK)
-/*! @} */
-
-/* The count of PLU_LUT_TRUTH */
-#define PLU_LUT_TRUTH_COUNT (26U)
-
-/*! @name OUTPUTS - Provides the current state of the 8 designated PLU Outputs. */
-/*! @{ */
-#define PLU_OUTPUTS_OUTPUT_STATE_MASK (0xFFU)
-#define PLU_OUTPUTS_OUTPUT_STATE_SHIFT (0U)
-/*! OUTPUT_STATE - Provides the current state of the 8 designated PLU Outputs..
- */
-#define PLU_OUTPUTS_OUTPUT_STATE(x) (((uint32_t)(((uint32_t)(x)) << PLU_OUTPUTS_OUTPUT_STATE_SHIFT)) & PLU_OUTPUTS_OUTPUT_STATE_MASK)
-/*! @} */
-
-/*! @name WAKEINT_CTRL - Wakeup interrupt control for PLU */
-/*! @{ */
-#define PLU_WAKEINT_CTRL_MASK_MASK (0xFFU)
-#define PLU_WAKEINT_CTRL_MASK_SHIFT (0U)
-/*! MASK - Interrupt mask (which of the 8 PLU Outputs contribute to interrupt)
- */
-#define PLU_WAKEINT_CTRL_MASK(x) (((uint32_t)(((uint32_t)(x)) << PLU_WAKEINT_CTRL_MASK_SHIFT)) & PLU_WAKEINT_CTRL_MASK_MASK)
-#define PLU_WAKEINT_CTRL_FILTER_MODE_MASK (0x300U)
-#define PLU_WAKEINT_CTRL_FILTER_MODE_SHIFT (8U)
-/*! FILTER_MODE - control input of the PLU, add filtering for glitch.
- * 0b00..Bypass mode.
- * 0b01..Filter 1 clock period.
- * 0b10..Filter 2 clock period.
- * 0b11..Filter 3 clock period.
- */
-#define PLU_WAKEINT_CTRL_FILTER_MODE(x) (((uint32_t)(((uint32_t)(x)) << PLU_WAKEINT_CTRL_FILTER_MODE_SHIFT)) & PLU_WAKEINT_CTRL_FILTER_MODE_MASK)
-#define PLU_WAKEINT_CTRL_FILTER_CLKSEL_MASK (0xC00U)
-#define PLU_WAKEINT_CTRL_FILTER_CLKSEL_SHIFT (10U)
-/*! FILTER_CLKSEL - hclk is divided by 2**filter_clksel.
- * 0b00..Selects the 1 MHz low-power oscillator as the filter clock.
- * 0b01..Selects the 12 Mhz FRO as the filter clock.
- * 0b10..Selects a third filter clock source, if provided.
- * 0b11..Reserved.
- */
-#define PLU_WAKEINT_CTRL_FILTER_CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << PLU_WAKEINT_CTRL_FILTER_CLKSEL_SHIFT)) & PLU_WAKEINT_CTRL_FILTER_CLKSEL_MASK)
-#define PLU_WAKEINT_CTRL_LATCH_ENABLE_MASK (0x1000U)
-#define PLU_WAKEINT_CTRL_LATCH_ENABLE_SHIFT (12U)
-/*! LATCH_ENABLE - latch the interrupt , then can be cleared with next bit INTR_CLEAR
- */
-#define PLU_WAKEINT_CTRL_LATCH_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << PLU_WAKEINT_CTRL_LATCH_ENABLE_SHIFT)) & PLU_WAKEINT_CTRL_LATCH_ENABLE_MASK)
-#define PLU_WAKEINT_CTRL_INTR_CLEAR_MASK (0x2000U)
-#define PLU_WAKEINT_CTRL_INTR_CLEAR_SHIFT (13U)
-/*! INTR_CLEAR - Write to clear wakeint_latched
- */
-#define PLU_WAKEINT_CTRL_INTR_CLEAR(x) (((uint32_t)(((uint32_t)(x)) << PLU_WAKEINT_CTRL_INTR_CLEAR_SHIFT)) & PLU_WAKEINT_CTRL_INTR_CLEAR_MASK)
-/*! @} */
-
-/*! @name OUTPUT_MUX - Selects the source to be connected to PLU Output 0..Selects the source to be connected to PLU Output 7 */
-/*! @{ */
-#define PLU_OUTPUT_MUX_OUTPUTn_MASK (0x1FU)
-#define PLU_OUTPUT_MUX_OUTPUTn_SHIFT (0U)
-/*! OUTPUTn - Selects the source to be connected to PLU Output 7.
- * 0b00000..The PLU output 0.
- * 0b00001..The PLU output 1.
- * 0b00010..The PLU output 2.
- * 0b00011..The PLU output 3.
- * 0b00100..The PLU output 4.
- * 0b00101..The PLU output 5.
- * 0b00110..The PLU output 6.
- * 0b00111..The PLU output 7.
- * 0b01000..The PLU output 8.
- * 0b01001..The PLU output 9.
- * 0b01010..The PLU output 10.
- * 0b01011..The PLU output 11.
- * 0b01100..The PLU output 12.
- * 0b01101..The PLU output 13.
- * 0b01110..The PLU output 14.
- * 0b01111..The PLU output 15.
- * 0b10000..The PLU output 16.
- * 0b10001..The PLU output 17.
- * 0b10010..The PLU output 18.
- * 0b10011..The PLU output 19.
- * 0b10100..The PLU output 20.
- * 0b10101..The PLU output 21.
- * 0b10110..The PLU output 22.
- * 0b10111..The PLU output 23.
- * 0b11000..The PLU output 24.
- * 0b11001..The PLU output 25.
- * 0b11010..state(0).
- * 0b11011..state(1).
- * 0b11100..state(2).
- * 0b11101..state(3).
- */
-#define PLU_OUTPUT_MUX_OUTPUTn(x) (((uint32_t)(((uint32_t)(x)) << PLU_OUTPUT_MUX_OUTPUTn_SHIFT)) & PLU_OUTPUT_MUX_OUTPUTn_MASK)
-/*! @} */
-
-/* The count of PLU_OUTPUT_MUX */
-#define PLU_OUTPUT_MUX_COUNT (8U)
-
-
-/*!
- * @}
- */ /* end of group PLU_Register_Masks */
-
-
-/* PLU - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral PLU base address */
- #define PLU_BASE (0x5003D000u)
- /** Peripheral PLU base address */
- #define PLU_BASE_NS (0x4003D000u)
- /** Peripheral PLU base pointer */
- #define PLU ((PLU_Type *)PLU_BASE)
- /** Peripheral PLU base pointer */
- #define PLU_NS ((PLU_Type *)PLU_BASE_NS)
- /** Array initializer of PLU peripheral base addresses */
- #define PLU_BASE_ADDRS { PLU_BASE }
- /** Array initializer of PLU peripheral base pointers */
- #define PLU_BASE_PTRS { PLU }
- /** Array initializer of PLU peripheral base addresses */
- #define PLU_BASE_ADDRS_NS { PLU_BASE_NS }
- /** Array initializer of PLU peripheral base pointers */
- #define PLU_BASE_PTRS_NS { PLU_NS }
-#else
- /** Peripheral PLU base address */
- #define PLU_BASE (0x4003D000u)
- /** Peripheral PLU base pointer */
- #define PLU ((PLU_Type *)PLU_BASE)
- /** Array initializer of PLU peripheral base addresses */
- #define PLU_BASE_ADDRS { PLU_BASE }
- /** Array initializer of PLU peripheral base pointers */
- #define PLU_BASE_PTRS { PLU }
-#endif
-
-/*!
- * @}
- */ /* end of group PLU_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- PMC Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PMC_Peripheral_Access_Layer PMC Peripheral Access Layer
- * @{
- */
-
-/** PMC - Register Layout Typedef */
-typedef struct {
- uint8_t RESERVED_0[8];
- __IO uint32_t RESETCTRL; /**< Reset Control [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset], offset: 0x8 */
- uint8_t RESERVED_1[36];
- __IO uint32_t BODVBAT; /**< VBAT Brown Out Dectector (BoD) control register [Reset by: PoR, Pin Reset, Software Reset], offset: 0x30 */
- uint8_t RESERVED_2[28];
- __IO uint32_t COMP; /**< Analog Comparator control register [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset], offset: 0x50 */
- uint8_t RESERVED_3[20];
- __IO uint32_t WAKEIOCAUSE; /**< Allows to identify the Wake-up I/O source from Deep Power Down mode, offset: 0x68 */
- uint8_t RESERVED_4[8];
- __IO uint32_t STATUSCLK; /**< FRO and XTAL status register [Reset by: PoR, Brown Out Detectors Reset], offset: 0x74 */
- uint8_t RESERVED_5[12];
- __IO uint32_t AOREG1; /**< General purpose always on domain data storage [Reset by: PoR, Brown Out Detectors Reset], offset: 0x84 */
- uint8_t RESERVED_6[16];
- __IO uint32_t RTCOSC32K; /**< RTC 1 KHZ and 1 Hz clocks source control register [Reset by: PoR, Brown Out Detectors Reset], offset: 0x98 */
- __IO uint32_t OSTIMERr; /**< OS Timer control register [Reset by: PoR, Brown Out Detectors Reset], offset: 0x9C */
- uint8_t RESERVED_7[24];
- __IO uint32_t PDRUNCFG0; /**< Controls the power to various analog blocks [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset], offset: 0xB8 */
- uint8_t RESERVED_8[4];
- __O uint32_t PDRUNCFGSET0; /**< Controls the power to various analog blocks [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset], offset: 0xC0 */
- uint8_t RESERVED_9[4];
- __O uint32_t PDRUNCFGCLR0; /**< Controls the power to various analog blocks [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset], offset: 0xC8 */
-} PMC_Type;
-
-/* ----------------------------------------------------------------------------
- -- PMC Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PMC_Register_Masks PMC Register Masks
- * @{
- */
-
-/*! @name RESETCTRL - Reset Control [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset] */
-/*! @{ */
-#define PMC_RESETCTRL_DPDWAKEUPRESETENABLE_MASK (0x1U)
-#define PMC_RESETCTRL_DPDWAKEUPRESETENABLE_SHIFT (0U)
-/*! DPDWAKEUPRESETENABLE - Wake-up from DEEP POWER DOWN reset event (either from wake up I/O or RTC or OS Event Timer).
- * 0b0..Reset event from DEEP POWER DOWN mode is disable.
- * 0b1..Reset event from DEEP POWER DOWN mode is enable.
- */
-#define PMC_RESETCTRL_DPDWAKEUPRESETENABLE(x) (((uint32_t)(((uint32_t)(x)) << PMC_RESETCTRL_DPDWAKEUPRESETENABLE_SHIFT)) & PMC_RESETCTRL_DPDWAKEUPRESETENABLE_MASK)
-#define PMC_RESETCTRL_BODVBATRESETENABLE_MASK (0x2U)
-#define PMC_RESETCTRL_BODVBATRESETENABLE_SHIFT (1U)
-/*! BODVBATRESETENABLE - BOD VBAT reset enable.
- * 0b0..BOD VBAT reset is disable.
- * 0b1..BOD VBAT reset is enable.
- */
-#define PMC_RESETCTRL_BODVBATRESETENABLE(x) (((uint32_t)(((uint32_t)(x)) << PMC_RESETCTRL_BODVBATRESETENABLE_SHIFT)) & PMC_RESETCTRL_BODVBATRESETENABLE_MASK)
-#define PMC_RESETCTRL_SWRRESETENABLE_MASK (0x8U)
-#define PMC_RESETCTRL_SWRRESETENABLE_SHIFT (3U)
-/*! SWRRESETENABLE - Software reset enable.
- * 0b0..Software reset is disable.
- * 0b1..Software reset is enable.
- */
-#define PMC_RESETCTRL_SWRRESETENABLE(x) (((uint32_t)(((uint32_t)(x)) << PMC_RESETCTRL_SWRRESETENABLE_SHIFT)) & PMC_RESETCTRL_SWRRESETENABLE_MASK)
-/*! @} */
-
-/*! @name BODVBAT - VBAT Brown Out Dectector (BoD) control register [Reset by: PoR, Pin Reset, Software Reset] */
-/*! @{ */
-#define PMC_BODVBAT_TRIGLVL_MASK (0x1FU)
-#define PMC_BODVBAT_TRIGLVL_SHIFT (0U)
-/*! TRIGLVL - BoD trigger level.
- * 0b00000..1.00 V.
- * 0b00001..1.10 V.
- * 0b00010..1.20 V.
- * 0b00011..1.30 V.
- * 0b00100..1.40 V.
- * 0b00101..1.50 V.
- * 0b00110..1.60 V.
- * 0b00111..1.65 V.
- * 0b01000..1.70 V.
- * 0b01001..1.75 V.
- * 0b01010..1.80 V.
- * 0b01011..1.90 V.
- * 0b01100..2.00 V.
- * 0b01101..2.10 V.
- * 0b01110..2.20 V.
- * 0b01111..2.30 V.
- * 0b10000..2.40 V.
- * 0b10001..2.50 V.
- * 0b10010..2.60 V.
- * 0b10011..2.70 V.
- * 0b10100..2.806 V.
- * 0b10101..2.90 V.
- * 0b10110..3.00 V.
- * 0b10111..3.10 V.
- * 0b11000..3.20 V.
- * 0b11001..3.30 V.
- * 0b11010..3.30 V.
- * 0b11011..3.30 V.
- * 0b11100..3.30 V.
- * 0b11101..3.30 V.
- * 0b11110..3.30 V.
- * 0b11111..3.30 V.
- */
-#define PMC_BODVBAT_TRIGLVL(x) (((uint32_t)(((uint32_t)(x)) << PMC_BODVBAT_TRIGLVL_SHIFT)) & PMC_BODVBAT_TRIGLVL_MASK)
-#define PMC_BODVBAT_HYST_MASK (0x60U)
-#define PMC_BODVBAT_HYST_SHIFT (5U)
-/*! HYST - BoD Hysteresis control.
- * 0b00..25 mV.
- * 0b01..50 mV.
- * 0b10..75 mV.
- * 0b11..100 mV.
- */
-#define PMC_BODVBAT_HYST(x) (((uint32_t)(((uint32_t)(x)) << PMC_BODVBAT_HYST_SHIFT)) & PMC_BODVBAT_HYST_MASK)
-/*! @} */
-
-/*! @name COMP - Analog Comparator control register [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset] */
-/*! @{ */
-#define PMC_COMP_HYST_MASK (0x2U)
-#define PMC_COMP_HYST_SHIFT (1U)
-/*! HYST - Hysteris when hyst = '1'.
- * 0b0..Hysteresis is disable.
- * 0b1..Hysteresis is enable.
- */
-#define PMC_COMP_HYST(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_HYST_SHIFT)) & PMC_COMP_HYST_MASK)
-#define PMC_COMP_VREFINPUT_MASK (0x4U)
-#define PMC_COMP_VREFINPUT_SHIFT (2U)
-/*! VREFINPUT - Dedicated control bit to select between internal VREF and VDDA (for the resistive ladder).
- * 0b0..Select internal VREF.
- * 0b1..Select VDDA.
- */
-#define PMC_COMP_VREFINPUT(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_VREFINPUT_SHIFT)) & PMC_COMP_VREFINPUT_MASK)
-#define PMC_COMP_LOWPOWER_MASK (0x8U)
-#define PMC_COMP_LOWPOWER_SHIFT (3U)
-/*! LOWPOWER - Low power mode.
- * 0b0..High speed mode.
- * 0b1..Low power mode (Low speed).
- */
-#define PMC_COMP_LOWPOWER(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_LOWPOWER_SHIFT)) & PMC_COMP_LOWPOWER_MASK)
-#define PMC_COMP_PMUX_MASK (0x70U)
-#define PMC_COMP_PMUX_SHIFT (4U)
-/*! PMUX - Control word for P multiplexer:.
- * 0b000..VREF (See fiedl VREFINPUT).
- * 0b001..Pin P0_0.
- * 0b010..Pin P0_9.
- * 0b011..Pin P0_18.
- * 0b100..Pin P1_14.
- * 0b101..Pin P2_23.
- */
-#define PMC_COMP_PMUX(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_PMUX_SHIFT)) & PMC_COMP_PMUX_MASK)
-#define PMC_COMP_NMUX_MASK (0x380U)
-#define PMC_COMP_NMUX_SHIFT (7U)
-/*! NMUX - Control word for N multiplexer:.
- * 0b000..VREF (See field VREFINPUT).
- * 0b001..Pin P0_0.
- * 0b010..Pin P0_9.
- * 0b011..Pin P0_18.
- * 0b100..Pin P1_14.
- * 0b101..Pin P2_23.
- */
-#define PMC_COMP_NMUX(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_NMUX_SHIFT)) & PMC_COMP_NMUX_MASK)
-#define PMC_COMP_VREF_MASK (0x7C00U)
-#define PMC_COMP_VREF_SHIFT (10U)
-/*! VREF - Control reference voltage step, per steps of (VREFINPUT/31).
- */
-#define PMC_COMP_VREF(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_VREF_SHIFT)) & PMC_COMP_VREF_MASK)
-#define PMC_COMP_FILTERCGF_SAMPLEMODE_MASK (0x30000U)
-#define PMC_COMP_FILTERCGF_SAMPLEMODE_SHIFT (16U)
-/*! FILTERCGF_SAMPLEMODE - Filter Sample mode.
- */
-#define PMC_COMP_FILTERCGF_SAMPLEMODE(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_FILTERCGF_SAMPLEMODE_SHIFT)) & PMC_COMP_FILTERCGF_SAMPLEMODE_MASK)
-#define PMC_COMP_FILTERCGF_CLKDIV_MASK (0x1C0000U)
-#define PMC_COMP_FILTERCGF_CLKDIV_SHIFT (18U)
-/*! FILTERCGF_CLKDIV - Filter Clock div .
- */
-#define PMC_COMP_FILTERCGF_CLKDIV(x) (((uint32_t)(((uint32_t)(x)) << PMC_COMP_FILTERCGF_CLKDIV_SHIFT)) & PMC_COMP_FILTERCGF_CLKDIV_MASK)
-/*! @} */
-
-/*! @name WAKEIOCAUSE - Allows to identify the Wake-up I/O source from Deep Power Down mode */
-/*! @{ */
-#define PMC_WAKEIOCAUSE_WAKEUP0_MASK (0x1U)
-#define PMC_WAKEIOCAUSE_WAKEUP0_SHIFT (0U)
-/*! WAKEUP0 - Allows to identify Wake up I/O 0 as the wake-up source from Deep Power Down mode.
- * 0b0..Last wake up from Deep Power down mode was NOT triggred by wake up I/O 0.
- * 0b1..Last wake up from Deep Power down mode was triggred by wake up I/O 0.
- */
-#define PMC_WAKEIOCAUSE_WAKEUP0(x) (((uint32_t)(((uint32_t)(x)) << PMC_WAKEIOCAUSE_WAKEUP0_SHIFT)) & PMC_WAKEIOCAUSE_WAKEUP0_MASK)
-#define PMC_WAKEIOCAUSE_WAKEUP1_MASK (0x2U)
-#define PMC_WAKEIOCAUSE_WAKEUP1_SHIFT (1U)
-/*! WAKEUP1 - Allows to identify Wake up I/O 1 as the wake-up source from Deep Power Down mode.
- * 0b0..Last wake up from Deep Power down mode was NOT triggred by wake up I/O 1.
- * 0b1..Last wake up from Deep Power down mode was triggred by wake up I/O 1.
- */
-#define PMC_WAKEIOCAUSE_WAKEUP1(x) (((uint32_t)(((uint32_t)(x)) << PMC_WAKEIOCAUSE_WAKEUP1_SHIFT)) & PMC_WAKEIOCAUSE_WAKEUP1_MASK)
-#define PMC_WAKEIOCAUSE_WAKEUP2_MASK (0x4U)
-#define PMC_WAKEIOCAUSE_WAKEUP2_SHIFT (2U)
-/*! WAKEUP2 - Allows to identify Wake up I/O 2 as the wake-up source from Deep Power Down mode.
- * 0b0..Last wake up from Deep Power down mode was NOT triggred by wake up I/O 2.
- * 0b1..Last wake up from Deep Power down mode was triggred by wake up I/O 2.
- */
-#define PMC_WAKEIOCAUSE_WAKEUP2(x) (((uint32_t)(((uint32_t)(x)) << PMC_WAKEIOCAUSE_WAKEUP2_SHIFT)) & PMC_WAKEIOCAUSE_WAKEUP2_MASK)
-#define PMC_WAKEIOCAUSE_WAKEUP3_MASK (0x8U)
-#define PMC_WAKEIOCAUSE_WAKEUP3_SHIFT (3U)
-/*! WAKEUP3 - Allows to identify Wake up I/O 3 as the wake-up source from Deep Power Down mode.
- * 0b0..Last wake up from Deep Power down mode was NOT triggred by wake up I/O 3.
- * 0b1..Last wake up from Deep Power down mode was triggred by wake up I/O 3.
- */
-#define PMC_WAKEIOCAUSE_WAKEUP3(x) (((uint32_t)(((uint32_t)(x)) << PMC_WAKEIOCAUSE_WAKEUP3_SHIFT)) & PMC_WAKEIOCAUSE_WAKEUP3_MASK)
-/*! @} */
-
-/*! @name STATUSCLK - FRO and XTAL status register [Reset by: PoR, Brown Out Detectors Reset] */
-/*! @{ */
-#define PMC_STATUSCLK_XTAL32KOK_MASK (0x1U)
-#define PMC_STATUSCLK_XTAL32KOK_SHIFT (0U)
-/*! XTAL32KOK - XTAL oscillator 32 K OK signal.
- */
-#define PMC_STATUSCLK_XTAL32KOK(x) (((uint32_t)(((uint32_t)(x)) << PMC_STATUSCLK_XTAL32KOK_SHIFT)) & PMC_STATUSCLK_XTAL32KOK_MASK)
-#define PMC_STATUSCLK_XTAL32KOSCFAILURE_MASK (0x4U)
-#define PMC_STATUSCLK_XTAL32KOSCFAILURE_SHIFT (2U)
-/*! XTAL32KOSCFAILURE - XTAL32 KHZ oscillator oscillation failure detection indicator.
- * 0b0..No oscillation failure has been detetced since the last time this bit has been cleared..
- * 0b1..At least one oscillation failure has been detetced since the last time this bit has been cleared..
- */
-#define PMC_STATUSCLK_XTAL32KOSCFAILURE(x) (((uint32_t)(((uint32_t)(x)) << PMC_STATUSCLK_XTAL32KOSCFAILURE_SHIFT)) & PMC_STATUSCLK_XTAL32KOSCFAILURE_MASK)
-/*! @} */
-
-/*! @name AOREG1 - General purpose always on domain data storage [Reset by: PoR, Brown Out Detectors Reset] */
-/*! @{ */
-#define PMC_AOREG1_POR_MASK (0x10U)
-#define PMC_AOREG1_POR_SHIFT (4U)
-/*! POR - The last chip reset was caused by a Power On Reset.
- */
-#define PMC_AOREG1_POR(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_POR_SHIFT)) & PMC_AOREG1_POR_MASK)
-#define PMC_AOREG1_PADRESET_MASK (0x20U)
-#define PMC_AOREG1_PADRESET_SHIFT (5U)
-/*! PADRESET - The last chip reset was caused by a Pin Reset.
- */
-#define PMC_AOREG1_PADRESET(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_PADRESET_SHIFT)) & PMC_AOREG1_PADRESET_MASK)
-#define PMC_AOREG1_BODRESET_MASK (0x40U)
-#define PMC_AOREG1_BODRESET_SHIFT (6U)
-/*! BODRESET - The last chip reset was caused by a Brown Out Detector (BoD), either VBAT BoD or Core Logic BoD.
- */
-#define PMC_AOREG1_BODRESET(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_BODRESET_SHIFT)) & PMC_AOREG1_BODRESET_MASK)
-#define PMC_AOREG1_SYSTEMRESET_MASK (0x80U)
-#define PMC_AOREG1_SYSTEMRESET_SHIFT (7U)
-/*! SYSTEMRESET - The last chip reset was caused by a System Reset requested by the ARM CPU.
- */
-#define PMC_AOREG1_SYSTEMRESET(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_SYSTEMRESET_SHIFT)) & PMC_AOREG1_SYSTEMRESET_MASK)
-#define PMC_AOREG1_WDTRESET_MASK (0x100U)
-#define PMC_AOREG1_WDTRESET_SHIFT (8U)
-/*! WDTRESET - The last chip reset was caused by the Watchdog Timer.
- */
-#define PMC_AOREG1_WDTRESET(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_WDTRESET_SHIFT)) & PMC_AOREG1_WDTRESET_MASK)
-#define PMC_AOREG1_SWRRESET_MASK (0x200U)
-#define PMC_AOREG1_SWRRESET_SHIFT (9U)
-/*! SWRRESET - The last chip reset was caused by a Software event.
- */
-#define PMC_AOREG1_SWRRESET(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_SWRRESET_SHIFT)) & PMC_AOREG1_SWRRESET_MASK)
-#define PMC_AOREG1_DPDRESET_WAKEUPIO_MASK (0x400U)
-#define PMC_AOREG1_DPDRESET_WAKEUPIO_SHIFT (10U)
-/*! DPDRESET_WAKEUPIO - The last chip reset was caused by a Wake-up I/O reset event during a Deep Power-Down mode.
- */
-#define PMC_AOREG1_DPDRESET_WAKEUPIO(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_DPDRESET_WAKEUPIO_SHIFT)) & PMC_AOREG1_DPDRESET_WAKEUPIO_MASK)
-#define PMC_AOREG1_DPDRESET_RTC_MASK (0x800U)
-#define PMC_AOREG1_DPDRESET_RTC_SHIFT (11U)
-/*! DPDRESET_RTC - The last chip reset was caused by an RTC (either RTC Alarm or RTC wake up) reset event during a Deep Power-Down mode.
- */
-#define PMC_AOREG1_DPDRESET_RTC(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_DPDRESET_RTC_SHIFT)) & PMC_AOREG1_DPDRESET_RTC_MASK)
-#define PMC_AOREG1_DPDRESET_OSTIMER_MASK (0x1000U)
-#define PMC_AOREG1_DPDRESET_OSTIMER_SHIFT (12U)
-/*! DPDRESET_OSTIMER - The last chip reset was caused by an OS Event Timer reset event during a Deep Power-Down mode.
- */
-#define PMC_AOREG1_DPDRESET_OSTIMER(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_DPDRESET_OSTIMER_SHIFT)) & PMC_AOREG1_DPDRESET_OSTIMER_MASK)
-#define PMC_AOREG1_BOOTERRORCOUNTER_MASK (0xF0000U)
-#define PMC_AOREG1_BOOTERRORCOUNTER_SHIFT (16U)
-/*! BOOTERRORCOUNTER - ROM Boot Fatal Error Counter.
- */
-#define PMC_AOREG1_BOOTERRORCOUNTER(x) (((uint32_t)(((uint32_t)(x)) << PMC_AOREG1_BOOTERRORCOUNTER_SHIFT)) & PMC_AOREG1_BOOTERRORCOUNTER_MASK)
-/*! @} */
-
-/*! @name RTCOSC32K - RTC 1 KHZ and 1 Hz clocks source control register [Reset by: PoR, Brown Out Detectors Reset] */
-/*! @{ */
-#define PMC_RTCOSC32K_SEL_MASK (0x1U)
-#define PMC_RTCOSC32K_SEL_SHIFT (0U)
-/*! SEL - Select the 32K oscillator to be used in Deep Power Down Mode for the RTC (either XTAL32KHz or FRO32KHz) .
- * 0b0..FRO 32 KHz.
- * 0b1..XTAL 32KHz.
- */
-#define PMC_RTCOSC32K_SEL(x) (((uint32_t)(((uint32_t)(x)) << PMC_RTCOSC32K_SEL_SHIFT)) & PMC_RTCOSC32K_SEL_MASK)
-#define PMC_RTCOSC32K_CLK1KHZDIV_MASK (0xEU)
-#define PMC_RTCOSC32K_CLK1KHZDIV_SHIFT (1U)
-/*! CLK1KHZDIV - Actual division ratio is : 28 + CLK1KHZDIV.
- */
-#define PMC_RTCOSC32K_CLK1KHZDIV(x) (((uint32_t)(((uint32_t)(x)) << PMC_RTCOSC32K_CLK1KHZDIV_SHIFT)) & PMC_RTCOSC32K_CLK1KHZDIV_MASK)
-#define PMC_RTCOSC32K_CLK1KHZDIVUPDATEREQ_MASK (0x8000U)
-#define PMC_RTCOSC32K_CLK1KHZDIVUPDATEREQ_SHIFT (15U)
-/*! CLK1KHZDIVUPDATEREQ - RTC 1KHz clock Divider status flag.
- */
-#define PMC_RTCOSC32K_CLK1KHZDIVUPDATEREQ(x) (((uint32_t)(((uint32_t)(x)) << PMC_RTCOSC32K_CLK1KHZDIVUPDATEREQ_SHIFT)) & PMC_RTCOSC32K_CLK1KHZDIVUPDATEREQ_MASK)
-#define PMC_RTCOSC32K_CLK1HZDIV_MASK (0x7FF0000U)
-#define PMC_RTCOSC32K_CLK1HZDIV_SHIFT (16U)
-/*! CLK1HZDIV - Actual division ratio is : 31744 + CLK1HZDIV.
- */
-#define PMC_RTCOSC32K_CLK1HZDIV(x) (((uint32_t)(((uint32_t)(x)) << PMC_RTCOSC32K_CLK1HZDIV_SHIFT)) & PMC_RTCOSC32K_CLK1HZDIV_MASK)
-#define PMC_RTCOSC32K_CLK1HZDIVHALT_MASK (0x40000000U)
-#define PMC_RTCOSC32K_CLK1HZDIVHALT_SHIFT (30U)
-/*! CLK1HZDIVHALT - Halts the divider counter.
- */
-#define PMC_RTCOSC32K_CLK1HZDIVHALT(x) (((uint32_t)(((uint32_t)(x)) << PMC_RTCOSC32K_CLK1HZDIVHALT_SHIFT)) & PMC_RTCOSC32K_CLK1HZDIVHALT_MASK)
-#define PMC_RTCOSC32K_CLK1HZDIVUPDATEREQ_MASK (0x80000000U)
-#define PMC_RTCOSC32K_CLK1HZDIVUPDATEREQ_SHIFT (31U)
-/*! CLK1HZDIVUPDATEREQ - RTC 1Hz Divider status flag.
- */
-#define PMC_RTCOSC32K_CLK1HZDIVUPDATEREQ(x) (((uint32_t)(((uint32_t)(x)) << PMC_RTCOSC32K_CLK1HZDIVUPDATEREQ_SHIFT)) & PMC_RTCOSC32K_CLK1HZDIVUPDATEREQ_MASK)
-/*! @} */
-
-/*! @name OSTIMER - OS Timer control register [Reset by: PoR, Brown Out Detectors Reset] */
-/*! @{ */
-#define PMC_OSTIMER_SOFTRESET_MASK (0x1U)
-#define PMC_OSTIMER_SOFTRESET_SHIFT (0U)
-/*! SOFTRESET - Active high reset.
- */
-#define PMC_OSTIMER_SOFTRESET(x) (((uint32_t)(((uint32_t)(x)) << PMC_OSTIMER_SOFTRESET_SHIFT)) & PMC_OSTIMER_SOFTRESET_MASK)
-#define PMC_OSTIMER_CLOCKENABLE_MASK (0x2U)
-#define PMC_OSTIMER_CLOCKENABLE_SHIFT (1U)
-/*! CLOCKENABLE - Enable OSTIMER 32 KHz clock.
- */
-#define PMC_OSTIMER_CLOCKENABLE(x) (((uint32_t)(((uint32_t)(x)) << PMC_OSTIMER_CLOCKENABLE_SHIFT)) & PMC_OSTIMER_CLOCKENABLE_MASK)
-#define PMC_OSTIMER_DPDWAKEUPENABLE_MASK (0x4U)
-#define PMC_OSTIMER_DPDWAKEUPENABLE_SHIFT (2U)
-/*! DPDWAKEUPENABLE - Wake up enable in Deep Power Down mode (To be used in Enable Deep Power Down mode).
- */
-#define PMC_OSTIMER_DPDWAKEUPENABLE(x) (((uint32_t)(((uint32_t)(x)) << PMC_OSTIMER_DPDWAKEUPENABLE_SHIFT)) & PMC_OSTIMER_DPDWAKEUPENABLE_MASK)
-#define PMC_OSTIMER_OSC32KPD_MASK (0x8U)
-#define PMC_OSTIMER_OSC32KPD_SHIFT (3U)
-/*! OSC32KPD - Oscilator 32KHz (either FRO32KHz or XTAL32KHz according to RTCOSC32K.
- */
-#define PMC_OSTIMER_OSC32KPD(x) (((uint32_t)(((uint32_t)(x)) << PMC_OSTIMER_OSC32KPD_SHIFT)) & PMC_OSTIMER_OSC32KPD_MASK)
-/*! @} */
-
-/*! @name PDRUNCFG0 - Controls the power to various analog blocks [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset] */
-/*! @{ */
-#define PMC_PDRUNCFG0_PDEN_BODVBAT_MASK (0x8U)
-#define PMC_PDRUNCFG0_PDEN_BODVBAT_SHIFT (3U)
-/*! PDEN_BODVBAT - Controls power to VBAT Brown Out Detector (BOD).
- * 0b0..BOD VBAT is powered.
- * 0b1..BOD VBAT is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_BODVBAT(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_BODVBAT_SHIFT)) & PMC_PDRUNCFG0_PDEN_BODVBAT_MASK)
-#define PMC_PDRUNCFG0_PDEN_FRO32K_MASK (0x40U)
-#define PMC_PDRUNCFG0_PDEN_FRO32K_SHIFT (6U)
-/*! PDEN_FRO32K - Controls power to the Free Running Oscillator (FRO) 32 KHz.
- * 0b0..FRO32KHz is powered.
- * 0b1..FRO32KHz is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_FRO32K(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_FRO32K_SHIFT)) & PMC_PDRUNCFG0_PDEN_FRO32K_MASK)
-#define PMC_PDRUNCFG0_PDEN_XTAL32K_MASK (0x80U)
-#define PMC_PDRUNCFG0_PDEN_XTAL32K_SHIFT (7U)
-/*! PDEN_XTAL32K - Controls power to crystal 32 KHz.
- * 0b0..Crystal 32KHz is powered.
- * 0b1..Crystal 32KHz is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_XTAL32K(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_XTAL32K_SHIFT)) & PMC_PDRUNCFG0_PDEN_XTAL32K_MASK)
-#define PMC_PDRUNCFG0_PDEN_XTAL32M_MASK (0x100U)
-#define PMC_PDRUNCFG0_PDEN_XTAL32M_SHIFT (8U)
-/*! PDEN_XTAL32M - Controls power to crystal 32 MHz.
- * 0b0..Crystal 32MHz is powered.
- * 0b1..Crystal 32MHz is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_XTAL32M(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_XTAL32M_SHIFT)) & PMC_PDRUNCFG0_PDEN_XTAL32M_MASK)
-#define PMC_PDRUNCFG0_PDEN_PLL0_MASK (0x200U)
-#define PMC_PDRUNCFG0_PDEN_PLL0_SHIFT (9U)
-/*! PDEN_PLL0 - Controls power to System PLL (also refered as PLL0).
- * 0b0..PLL0 is powered.
- * 0b1..PLL0 is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_PLL0(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_PLL0_SHIFT)) & PMC_PDRUNCFG0_PDEN_PLL0_MASK)
-#define PMC_PDRUNCFG0_PDEN_PLL1_MASK (0x400U)
-#define PMC_PDRUNCFG0_PDEN_PLL1_SHIFT (10U)
-/*! PDEN_PLL1 - Controls power to USB PLL (also refered as PLL1).
- * 0b0..PLL1 is powered.
- * 0b1..PLL1 is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_PLL1(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_PLL1_SHIFT)) & PMC_PDRUNCFG0_PDEN_PLL1_MASK)
-#define PMC_PDRUNCFG0_PDEN_USBFSPHY_MASK (0x800U)
-#define PMC_PDRUNCFG0_PDEN_USBFSPHY_SHIFT (11U)
-/*! PDEN_USBFSPHY - Controls power to USB Full Speed phy.
- * 0b0..USB Full Speed phy is powered.
- * 0b1..USB Full Speed phy is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_USBFSPHY(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_USBFSPHY_SHIFT)) & PMC_PDRUNCFG0_PDEN_USBFSPHY_MASK)
-#define PMC_PDRUNCFG0_PDEN_USBHSPHY_MASK (0x1000U)
-#define PMC_PDRUNCFG0_PDEN_USBHSPHY_SHIFT (12U)
-/*! PDEN_USBHSPHY - Controls power to USB High Speed Phy.
- * 0b0..USB HS phy is powered.
- * 0b1..USB HS phy is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_USBHSPHY(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_USBHSPHY_SHIFT)) & PMC_PDRUNCFG0_PDEN_USBHSPHY_MASK)
-#define PMC_PDRUNCFG0_PDEN_COMP_MASK (0x2000U)
-#define PMC_PDRUNCFG0_PDEN_COMP_SHIFT (13U)
-/*! PDEN_COMP - Controls power to Analog Comparator.
- * 0b0..Analog Comparator is powered.
- * 0b1..Analog Comparator is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_COMP(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_COMP_SHIFT)) & PMC_PDRUNCFG0_PDEN_COMP_MASK)
-#define PMC_PDRUNCFG0_PDEN_LDOUSBHS_MASK (0x40000U)
-#define PMC_PDRUNCFG0_PDEN_LDOUSBHS_SHIFT (18U)
-/*! PDEN_LDOUSBHS - Controls power to USB high speed LDO.
- * 0b0..USB high speed LDO is powered.
- * 0b1..USB high speed LDO is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_LDOUSBHS(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_LDOUSBHS_SHIFT)) & PMC_PDRUNCFG0_PDEN_LDOUSBHS_MASK)
-#define PMC_PDRUNCFG0_PDEN_AUXBIAS_MASK (0x80000U)
-#define PMC_PDRUNCFG0_PDEN_AUXBIAS_SHIFT (19U)
-/*! PDEN_AUXBIAS - Controls power to auxiliary biasing (AUXBIAS)
- * 0b0..auxiliary biasing is powered.
- * 0b1..auxiliary biasing is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_AUXBIAS(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_AUXBIAS_SHIFT)) & PMC_PDRUNCFG0_PDEN_AUXBIAS_MASK)
-#define PMC_PDRUNCFG0_PDEN_LDOXO32M_MASK (0x100000U)
-#define PMC_PDRUNCFG0_PDEN_LDOXO32M_SHIFT (20U)
-/*! PDEN_LDOXO32M - Controls power to crystal 32 MHz LDO.
- * 0b0..crystal 32 MHz LDO is powered.
- * 0b1..crystal 32 MHz LDO is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_LDOXO32M(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_LDOXO32M_SHIFT)) & PMC_PDRUNCFG0_PDEN_LDOXO32M_MASK)
-#define PMC_PDRUNCFG0_PDEN_RNG_MASK (0x400000U)
-#define PMC_PDRUNCFG0_PDEN_RNG_SHIFT (22U)
-/*! PDEN_RNG - Controls power to all True Random Number Genetaor (TRNG) clock sources.
- * 0b0..TRNG clocks are powered.
- * 0b1..TRNG clocks are powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_RNG(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_RNG_SHIFT)) & PMC_PDRUNCFG0_PDEN_RNG_MASK)
-#define PMC_PDRUNCFG0_PDEN_PLL0_SSCG_MASK (0x800000U)
-#define PMC_PDRUNCFG0_PDEN_PLL0_SSCG_SHIFT (23U)
-/*! PDEN_PLL0_SSCG - Controls power to System PLL (PLL0) Spread Spectrum module.
- * 0b0..PLL0 Sread spectrum module is powered.
- * 0b1..PLL0 Sread spectrum module is powered down.
- */
-#define PMC_PDRUNCFG0_PDEN_PLL0_SSCG(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFG0_PDEN_PLL0_SSCG_SHIFT)) & PMC_PDRUNCFG0_PDEN_PLL0_SSCG_MASK)
-/*! @} */
-
-/*! @name PDRUNCFGSET0 - Controls the power to various analog blocks [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset] */
-/*! @{ */
-#define PMC_PDRUNCFGSET0_PDRUNCFGSET0_MASK (0xFFFFFFFFU)
-#define PMC_PDRUNCFGSET0_PDRUNCFGSET0_SHIFT (0U)
-/*! PDRUNCFGSET0 - Writing ones to this register sets the corresponding bit or bits in the PDRUNCFG0 register, if they are implemented.
- */
-#define PMC_PDRUNCFGSET0_PDRUNCFGSET0(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFGSET0_PDRUNCFGSET0_SHIFT)) & PMC_PDRUNCFGSET0_PDRUNCFGSET0_MASK)
-/*! @} */
-
-/*! @name PDRUNCFGCLR0 - Controls the power to various analog blocks [Reset by: PoR, Pin Reset, Brown Out Detectors Reset, Deep Power Down Reset, Software Reset] */
-/*! @{ */
-#define PMC_PDRUNCFGCLR0_PDRUNCFGCLR0_MASK (0xFFFFFFFFU)
-#define PMC_PDRUNCFGCLR0_PDRUNCFGCLR0_SHIFT (0U)
-/*! PDRUNCFGCLR0 - Writing ones to this register clears the corresponding bit or bits in the PDRUNCFG0 register, if they are implemented.
- */
-#define PMC_PDRUNCFGCLR0_PDRUNCFGCLR0(x) (((uint32_t)(((uint32_t)(x)) << PMC_PDRUNCFGCLR0_PDRUNCFGCLR0_SHIFT)) & PMC_PDRUNCFGCLR0_PDRUNCFGCLR0_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group PMC_Register_Masks */
-
-
-/* PMC - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral PMC base address */
- #define PMC_BASE (0x50020000u)
- /** Peripheral PMC base address */
- #define PMC_BASE_NS (0x40020000u)
- /** Peripheral PMC base pointer */
- #define PMC ((PMC_Type *)PMC_BASE)
- /** Peripheral PMC base pointer */
- #define PMC_NS ((PMC_Type *)PMC_BASE_NS)
- /** Array initializer of PMC peripheral base addresses */
- #define PMC_BASE_ADDRS { PMC_BASE }
- /** Array initializer of PMC peripheral base pointers */
- #define PMC_BASE_PTRS { PMC }
- /** Array initializer of PMC peripheral base addresses */
- #define PMC_BASE_ADDRS_NS { PMC_BASE_NS }
- /** Array initializer of PMC peripheral base pointers */
- #define PMC_BASE_PTRS_NS { PMC_NS }
-#else
- /** Peripheral PMC base address */
- #define PMC_BASE (0x40020000u)
- /** Peripheral PMC base pointer */
- #define PMC ((PMC_Type *)PMC_BASE)
- /** Array initializer of PMC peripheral base addresses */
- #define PMC_BASE_ADDRS { PMC_BASE }
- /** Array initializer of PMC peripheral base pointers */
- #define PMC_BASE_PTRS { PMC }
-#endif
-
-/*!
- * @}
- */ /* end of group PMC_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- POWERQUAD Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup POWERQUAD_Peripheral_Access_Layer POWERQUAD Peripheral Access Layer
- * @{
- */
-
-/** POWERQUAD - Register Layout Typedef */
-typedef struct {
- __IO uint32_t OUTBASE; /**< Base address register for output region, offset: 0x0 */
- __IO uint32_t OUTFORMAT; /**< Output format, offset: 0x4 */
- __IO uint32_t TMPBASE; /**< Base address register for temp region, offset: 0x8 */
- __IO uint32_t TMPFORMAT; /**< Temp format, offset: 0xC */
- __IO uint32_t INABASE; /**< Base address register for input A region, offset: 0x10 */
- __IO uint32_t INAFORMAT; /**< Input A format, offset: 0x14 */
- __IO uint32_t INBBASE; /**< Base address register for input B region, offset: 0x18 */
- __IO uint32_t INBFORMAT; /**< Input B format, offset: 0x1C */
- uint8_t RESERVED_0[224];
- __IO uint32_t CONTROL; /**< PowerQuad Control register, offset: 0x100 */
- __IO uint32_t LENGTH; /**< Length register, offset: 0x104 */
- __IO uint32_t CPPRE; /**< Pre-scale register, offset: 0x108 */
- __IO uint32_t MISC; /**< Misc register, offset: 0x10C */
- __IO uint32_t CURSORY; /**< Cursory register, offset: 0x110 */
- uint8_t RESERVED_1[108];
- __IO uint32_t CORDIC_X; /**< Cordic input X register, offset: 0x180 */
- __IO uint32_t CORDIC_Y; /**< Cordic input Y register, offset: 0x184 */
- __IO uint32_t CORDIC_Z; /**< Cordic input Z register, offset: 0x188 */
- __IO uint32_t ERRSTAT; /**< Read/Write register where error statuses are captured (sticky), offset: 0x18C */
- __IO uint32_t INTREN; /**< INTERRUPT enable register, offset: 0x190 */
- __IO uint32_t EVENTEN; /**< Event Enable register, offset: 0x194 */
- __IO uint32_t INTRSTAT; /**< INTERRUPT STATUS register, offset: 0x198 */
- uint8_t RESERVED_2[100];
- __IO uint32_t GPREG[16]; /**< General purpose register bank N., array offset: 0x200, array step: 0x4 */
- __IO uint32_t COMPREG[8]; /**< Compute register bank, array offset: 0x240, array step: 0x4 */
-} POWERQUAD_Type;
-
-/* ----------------------------------------------------------------------------
- -- POWERQUAD Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup POWERQUAD_Register_Masks POWERQUAD Register Masks
- * @{
- */
-
-/*! @name OUTBASE - Base address register for output region */
-/*! @{ */
-#define POWERQUAD_OUTBASE_OUTBASE_MASK (0xFFFFFFFFU)
-#define POWERQUAD_OUTBASE_OUTBASE_SHIFT (0U)
-/*! outbase - Base address register for the output region
- */
-#define POWERQUAD_OUTBASE_OUTBASE(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_OUTBASE_OUTBASE_SHIFT)) & POWERQUAD_OUTBASE_OUTBASE_MASK)
-/*! @} */
-
-/*! @name OUTFORMAT - Output format */
-/*! @{ */
-#define POWERQUAD_OUTFORMAT_OUT_FORMATINT_MASK (0x3U)
-#define POWERQUAD_OUTFORMAT_OUT_FORMATINT_SHIFT (0U)
-/*! out_formatint - Output Internal format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_OUTFORMAT_OUT_FORMATINT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_OUTFORMAT_OUT_FORMATINT_SHIFT)) & POWERQUAD_OUTFORMAT_OUT_FORMATINT_MASK)
-#define POWERQUAD_OUTFORMAT_OUT_FORMATEXT_MASK (0x30U)
-#define POWERQUAD_OUTFORMAT_OUT_FORMATEXT_SHIFT (4U)
-/*! out_formatext - Output External format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_OUTFORMAT_OUT_FORMATEXT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_OUTFORMAT_OUT_FORMATEXT_SHIFT)) & POWERQUAD_OUTFORMAT_OUT_FORMATEXT_MASK)
-#define POWERQUAD_OUTFORMAT_OUT_SCALER_MASK (0xFF00U)
-#define POWERQUAD_OUTFORMAT_OUT_SCALER_SHIFT (8U)
-/*! out_scaler - Output Scaler value (for scaled 'q31' formats)
- */
-#define POWERQUAD_OUTFORMAT_OUT_SCALER(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_OUTFORMAT_OUT_SCALER_SHIFT)) & POWERQUAD_OUTFORMAT_OUT_SCALER_MASK)
-/*! @} */
-
-/*! @name TMPBASE - Base address register for temp region */
-/*! @{ */
-#define POWERQUAD_TMPBASE_TMPBASE_MASK (0xFFFFFFFFU)
-#define POWERQUAD_TMPBASE_TMPBASE_SHIFT (0U)
-/*! tmpbase - Base address register for the temporary region
- */
-#define POWERQUAD_TMPBASE_TMPBASE(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_TMPBASE_TMPBASE_SHIFT)) & POWERQUAD_TMPBASE_TMPBASE_MASK)
-/*! @} */
-
-/*! @name TMPFORMAT - Temp format */
-/*! @{ */
-#define POWERQUAD_TMPFORMAT_TMP_FORMATINT_MASK (0x3U)
-#define POWERQUAD_TMPFORMAT_TMP_FORMATINT_SHIFT (0U)
-/*! tmp_formatint - Temp Internal format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_TMPFORMAT_TMP_FORMATINT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_TMPFORMAT_TMP_FORMATINT_SHIFT)) & POWERQUAD_TMPFORMAT_TMP_FORMATINT_MASK)
-#define POWERQUAD_TMPFORMAT_TMP_FORMATEXT_MASK (0x30U)
-#define POWERQUAD_TMPFORMAT_TMP_FORMATEXT_SHIFT (4U)
-/*! tmp_formatext - Temp External format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_TMPFORMAT_TMP_FORMATEXT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_TMPFORMAT_TMP_FORMATEXT_SHIFT)) & POWERQUAD_TMPFORMAT_TMP_FORMATEXT_MASK)
-#define POWERQUAD_TMPFORMAT_TMP_SCALER_MASK (0xFF00U)
-#define POWERQUAD_TMPFORMAT_TMP_SCALER_SHIFT (8U)
-/*! tmp_scaler - Temp Scaler value (for scaled 'q31' formats)
- */
-#define POWERQUAD_TMPFORMAT_TMP_SCALER(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_TMPFORMAT_TMP_SCALER_SHIFT)) & POWERQUAD_TMPFORMAT_TMP_SCALER_MASK)
-/*! @} */
-
-/*! @name INABASE - Base address register for input A region */
-/*! @{ */
-#define POWERQUAD_INABASE_INABASE_MASK (0xFFFFFFFFU)
-#define POWERQUAD_INABASE_INABASE_SHIFT (0U)
-/*! inabase - Base address register for the input A region
- */
-#define POWERQUAD_INABASE_INABASE(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INABASE_INABASE_SHIFT)) & POWERQUAD_INABASE_INABASE_MASK)
-/*! @} */
-
-/*! @name INAFORMAT - Input A format */
-/*! @{ */
-#define POWERQUAD_INAFORMAT_INA_FORMATINT_MASK (0x3U)
-#define POWERQUAD_INAFORMAT_INA_FORMATINT_SHIFT (0U)
-/*! ina_formatint - Input A Internal format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_INAFORMAT_INA_FORMATINT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INAFORMAT_INA_FORMATINT_SHIFT)) & POWERQUAD_INAFORMAT_INA_FORMATINT_MASK)
-#define POWERQUAD_INAFORMAT_INA_FORMATEXT_MASK (0x30U)
-#define POWERQUAD_INAFORMAT_INA_FORMATEXT_SHIFT (4U)
-/*! ina_formatext - Input A External format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_INAFORMAT_INA_FORMATEXT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INAFORMAT_INA_FORMATEXT_SHIFT)) & POWERQUAD_INAFORMAT_INA_FORMATEXT_MASK)
-#define POWERQUAD_INAFORMAT_INA_SCALER_MASK (0xFF00U)
-#define POWERQUAD_INAFORMAT_INA_SCALER_SHIFT (8U)
-/*! ina_scaler - Input A Scaler value (for scaled 'q31' formats)
- */
-#define POWERQUAD_INAFORMAT_INA_SCALER(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INAFORMAT_INA_SCALER_SHIFT)) & POWERQUAD_INAFORMAT_INA_SCALER_MASK)
-/*! @} */
-
-/*! @name INBBASE - Base address register for input B region */
-/*! @{ */
-#define POWERQUAD_INBBASE_INBBASE_MASK (0xFFFFFFFFU)
-#define POWERQUAD_INBBASE_INBBASE_SHIFT (0U)
-/*! inbbase - Base address register for the input B region
- */
-#define POWERQUAD_INBBASE_INBBASE(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INBBASE_INBBASE_SHIFT)) & POWERQUAD_INBBASE_INBBASE_MASK)
-/*! @} */
-
-/*! @name INBFORMAT - Input B format */
-/*! @{ */
-#define POWERQUAD_INBFORMAT_INB_FORMATINT_MASK (0x3U)
-#define POWERQUAD_INBFORMAT_INB_FORMATINT_SHIFT (0U)
-/*! inb_formatint - Input B Internal format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_INBFORMAT_INB_FORMATINT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INBFORMAT_INB_FORMATINT_SHIFT)) & POWERQUAD_INBFORMAT_INB_FORMATINT_MASK)
-#define POWERQUAD_INBFORMAT_INB_FORMATEXT_MASK (0x30U)
-#define POWERQUAD_INBFORMAT_INB_FORMATEXT_SHIFT (4U)
-/*! inb_formatext - Input B External format (00: q15; 01:q31; 10:float)
- */
-#define POWERQUAD_INBFORMAT_INB_FORMATEXT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INBFORMAT_INB_FORMATEXT_SHIFT)) & POWERQUAD_INBFORMAT_INB_FORMATEXT_MASK)
-#define POWERQUAD_INBFORMAT_INB_SCALER_MASK (0xFF00U)
-#define POWERQUAD_INBFORMAT_INB_SCALER_SHIFT (8U)
-/*! inb_scaler - Input B Scaler value (for scaled 'q31' formats)
- */
-#define POWERQUAD_INBFORMAT_INB_SCALER(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INBFORMAT_INB_SCALER_SHIFT)) & POWERQUAD_INBFORMAT_INB_SCALER_MASK)
-/*! @} */
-
-/*! @name CONTROL - PowerQuad Control register */
-/*! @{ */
-#define POWERQUAD_CONTROL_DECODE_OPCODE_MASK (0xFU)
-#define POWERQUAD_CONTROL_DECODE_OPCODE_SHIFT (0U)
-/*! decode_opcode - opcode specific to decode_machine
- */
-#define POWERQUAD_CONTROL_DECODE_OPCODE(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CONTROL_DECODE_OPCODE_SHIFT)) & POWERQUAD_CONTROL_DECODE_OPCODE_MASK)
-#define POWERQUAD_CONTROL_DECODE_MACHINE_MASK (0xF0U)
-#define POWERQUAD_CONTROL_DECODE_MACHINE_SHIFT (4U)
-/*! decode_machine - 0 : Coprocessor , 1 : matrix , 2 : fft , 3 : fir , 4 : stat , 5 : cordic , 6 -15 : NA
- */
-#define POWERQUAD_CONTROL_DECODE_MACHINE(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CONTROL_DECODE_MACHINE_SHIFT)) & POWERQUAD_CONTROL_DECODE_MACHINE_MASK)
-#define POWERQUAD_CONTROL_INST_BUSY_MASK (0x80000000U)
-#define POWERQUAD_CONTROL_INST_BUSY_SHIFT (31U)
-/*! inst_busy - Instruction busy signal when high indicates processing is on
- */
-#define POWERQUAD_CONTROL_INST_BUSY(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CONTROL_INST_BUSY_SHIFT)) & POWERQUAD_CONTROL_INST_BUSY_MASK)
-/*! @} */
-
-/*! @name LENGTH - Length register */
-/*! @{ */
-#define POWERQUAD_LENGTH_INST_LENGTH_MASK (0xFFFFFFFFU)
-#define POWERQUAD_LENGTH_INST_LENGTH_SHIFT (0U)
-/*! inst_length - Length register. When FIR : fir_xlength = inst_length[15:0] , fir_tlength =
- * inst_len[31:16]. When MTX : rows_a = inst_length[4:0] , cols_a = inst_length[12:8] , cols_b =
- * inst_length[20:16]
- */
-#define POWERQUAD_LENGTH_INST_LENGTH(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_LENGTH_INST_LENGTH_SHIFT)) & POWERQUAD_LENGTH_INST_LENGTH_MASK)
-/*! @} */
-
-/*! @name CPPRE - Pre-scale register */
-/*! @{ */
-#define POWERQUAD_CPPRE_CPPRE_IN_MASK (0xFFU)
-#define POWERQUAD_CPPRE_CPPRE_IN_SHIFT (0U)
-/*! cppre_in - co-processor scaling of input
- */
-#define POWERQUAD_CPPRE_CPPRE_IN(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CPPRE_CPPRE_IN_SHIFT)) & POWERQUAD_CPPRE_CPPRE_IN_MASK)
-#define POWERQUAD_CPPRE_CPPRE_OUT_MASK (0xFF00U)
-#define POWERQUAD_CPPRE_CPPRE_OUT_SHIFT (8U)
-/*! cppre_out - co-processor fixed point output
- */
-#define POWERQUAD_CPPRE_CPPRE_OUT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CPPRE_CPPRE_OUT_SHIFT)) & POWERQUAD_CPPRE_CPPRE_OUT_MASK)
-#define POWERQUAD_CPPRE_CPPRE_SAT_MASK (0x10000U)
-#define POWERQUAD_CPPRE_CPPRE_SAT_SHIFT (16U)
-/*! cppre_sat - 1 : forces sub-32 bit saturation
- */
-#define POWERQUAD_CPPRE_CPPRE_SAT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CPPRE_CPPRE_SAT_SHIFT)) & POWERQUAD_CPPRE_CPPRE_SAT_MASK)
-#define POWERQUAD_CPPRE_CPPRE_SAT8_MASK (0x20000U)
-#define POWERQUAD_CPPRE_CPPRE_SAT8_SHIFT (17U)
-/*! cppre_sat8 - 0 = 8bits, 1 = 16bits
- */
-#define POWERQUAD_CPPRE_CPPRE_SAT8(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CPPRE_CPPRE_SAT8_SHIFT)) & POWERQUAD_CPPRE_CPPRE_SAT8_MASK)
-/*! @} */
-
-/*! @name MISC - Misc register */
-/*! @{ */
-#define POWERQUAD_MISC_INST_MISC_MASK (0xFFFFFFFFU)
-#define POWERQUAD_MISC_INST_MISC_SHIFT (0U)
-/*! inst_misc - Misc register. For Matrix : Used for scale factor
- */
-#define POWERQUAD_MISC_INST_MISC(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_MISC_INST_MISC_SHIFT)) & POWERQUAD_MISC_INST_MISC_MASK)
-/*! @} */
-
-/*! @name CURSORY - Cursory register */
-/*! @{ */
-#define POWERQUAD_CURSORY_CURSORY_MASK (0x1U)
-#define POWERQUAD_CURSORY_CURSORY_SHIFT (0U)
-/*! cursory - 1 : Enable cursory mode
- */
-#define POWERQUAD_CURSORY_CURSORY(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CURSORY_CURSORY_SHIFT)) & POWERQUAD_CURSORY_CURSORY_MASK)
-/*! @} */
-
-/*! @name CORDIC_X - Cordic input X register */
-/*! @{ */
-#define POWERQUAD_CORDIC_X_CORDIC_X_MASK (0xFFFFFFFFU)
-#define POWERQUAD_CORDIC_X_CORDIC_X_SHIFT (0U)
-/*! cordic_x - Cordic input x
- */
-#define POWERQUAD_CORDIC_X_CORDIC_X(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CORDIC_X_CORDIC_X_SHIFT)) & POWERQUAD_CORDIC_X_CORDIC_X_MASK)
-/*! @} */
-
-/*! @name CORDIC_Y - Cordic input Y register */
-/*! @{ */
-#define POWERQUAD_CORDIC_Y_CORDIC_Y_MASK (0xFFFFFFFFU)
-#define POWERQUAD_CORDIC_Y_CORDIC_Y_SHIFT (0U)
-/*! cordic_y - Cordic input y
- */
-#define POWERQUAD_CORDIC_Y_CORDIC_Y(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CORDIC_Y_CORDIC_Y_SHIFT)) & POWERQUAD_CORDIC_Y_CORDIC_Y_MASK)
-/*! @} */
-
-/*! @name CORDIC_Z - Cordic input Z register */
-/*! @{ */
-#define POWERQUAD_CORDIC_Z_CORDIC_Z_MASK (0xFFFFFFFFU)
-#define POWERQUAD_CORDIC_Z_CORDIC_Z_SHIFT (0U)
-/*! cordic_z - Cordic input z
- */
-#define POWERQUAD_CORDIC_Z_CORDIC_Z(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_CORDIC_Z_CORDIC_Z_SHIFT)) & POWERQUAD_CORDIC_Z_CORDIC_Z_MASK)
-/*! @} */
-
-/*! @name ERRSTAT - Read/Write register where error statuses are captured (sticky) */
-/*! @{ */
-#define POWERQUAD_ERRSTAT_OVERFLOW_MASK (0x1U)
-#define POWERQUAD_ERRSTAT_OVERFLOW_SHIFT (0U)
-/*! OVERFLOW - overflow
- */
-#define POWERQUAD_ERRSTAT_OVERFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_ERRSTAT_OVERFLOW_SHIFT)) & POWERQUAD_ERRSTAT_OVERFLOW_MASK)
-#define POWERQUAD_ERRSTAT_NAN_MASK (0x2U)
-#define POWERQUAD_ERRSTAT_NAN_SHIFT (1U)
-/*! NAN - nan
- */
-#define POWERQUAD_ERRSTAT_NAN(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_ERRSTAT_NAN_SHIFT)) & POWERQUAD_ERRSTAT_NAN_MASK)
-#define POWERQUAD_ERRSTAT_FIXEDOVERFLOW_MASK (0x4U)
-#define POWERQUAD_ERRSTAT_FIXEDOVERFLOW_SHIFT (2U)
-/*! FIXEDOVERFLOW - fixed_pt_overflow
- */
-#define POWERQUAD_ERRSTAT_FIXEDOVERFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_ERRSTAT_FIXEDOVERFLOW_SHIFT)) & POWERQUAD_ERRSTAT_FIXEDOVERFLOW_MASK)
-#define POWERQUAD_ERRSTAT_UNDERFLOW_MASK (0x8U)
-#define POWERQUAD_ERRSTAT_UNDERFLOW_SHIFT (3U)
-/*! UNDERFLOW - underflow
- */
-#define POWERQUAD_ERRSTAT_UNDERFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_ERRSTAT_UNDERFLOW_SHIFT)) & POWERQUAD_ERRSTAT_UNDERFLOW_MASK)
-#define POWERQUAD_ERRSTAT_BUSERROR_MASK (0x10U)
-#define POWERQUAD_ERRSTAT_BUSERROR_SHIFT (4U)
-/*! BUSERROR - bus_error
- */
-#define POWERQUAD_ERRSTAT_BUSERROR(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_ERRSTAT_BUSERROR_SHIFT)) & POWERQUAD_ERRSTAT_BUSERROR_MASK)
-/*! @} */
-
-/*! @name INTREN - INTERRUPT enable register */
-/*! @{ */
-#define POWERQUAD_INTREN_INTR_OFLOW_MASK (0x1U)
-#define POWERQUAD_INTREN_INTR_OFLOW_SHIFT (0U)
-/*! intr_oflow - 1 : Enable interrupt on Floating point overflow
- */
-#define POWERQUAD_INTREN_INTR_OFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTREN_INTR_OFLOW_SHIFT)) & POWERQUAD_INTREN_INTR_OFLOW_MASK)
-#define POWERQUAD_INTREN_INTR_NAN_MASK (0x2U)
-#define POWERQUAD_INTREN_INTR_NAN_SHIFT (1U)
-/*! intr_nan - 1 : Enable interrupt on Floating point NaN
- */
-#define POWERQUAD_INTREN_INTR_NAN(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTREN_INTR_NAN_SHIFT)) & POWERQUAD_INTREN_INTR_NAN_MASK)
-#define POWERQUAD_INTREN_INTR_FIXED_MASK (0x4U)
-#define POWERQUAD_INTREN_INTR_FIXED_SHIFT (2U)
-/*! intr_fixed - 1: Enable interrupt on Fixed point Overflow
- */
-#define POWERQUAD_INTREN_INTR_FIXED(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTREN_INTR_FIXED_SHIFT)) & POWERQUAD_INTREN_INTR_FIXED_MASK)
-#define POWERQUAD_INTREN_INTR_UFLOW_MASK (0x8U)
-#define POWERQUAD_INTREN_INTR_UFLOW_SHIFT (3U)
-/*! intr_uflow - 1 : Enable interrupt on Subnormal truncation
- */
-#define POWERQUAD_INTREN_INTR_UFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTREN_INTR_UFLOW_SHIFT)) & POWERQUAD_INTREN_INTR_UFLOW_MASK)
-#define POWERQUAD_INTREN_INTR_BERR_MASK (0x10U)
-#define POWERQUAD_INTREN_INTR_BERR_SHIFT (4U)
-/*! intr_berr - 1: Enable interrupt on AHBM Buss Error
- */
-#define POWERQUAD_INTREN_INTR_BERR(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTREN_INTR_BERR_SHIFT)) & POWERQUAD_INTREN_INTR_BERR_MASK)
-#define POWERQUAD_INTREN_INTR_COMP_MASK (0x80U)
-#define POWERQUAD_INTREN_INTR_COMP_SHIFT (7U)
-/*! intr_comp - 1: Enable interrupt on instruction completion
- */
-#define POWERQUAD_INTREN_INTR_COMP(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTREN_INTR_COMP_SHIFT)) & POWERQUAD_INTREN_INTR_COMP_MASK)
-/*! @} */
-
-/*! @name EVENTEN - Event Enable register */
-/*! @{ */
-#define POWERQUAD_EVENTEN_EVENT_OFLOW_MASK (0x1U)
-#define POWERQUAD_EVENTEN_EVENT_OFLOW_SHIFT (0U)
-/*! event_oflow - 1 : Enable event trigger on Floating point overflow
- */
-#define POWERQUAD_EVENTEN_EVENT_OFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_EVENTEN_EVENT_OFLOW_SHIFT)) & POWERQUAD_EVENTEN_EVENT_OFLOW_MASK)
-#define POWERQUAD_EVENTEN_EVENT_NAN_MASK (0x2U)
-#define POWERQUAD_EVENTEN_EVENT_NAN_SHIFT (1U)
-/*! event_nan - 1 : Enable event trigger on Floating point NaN
- */
-#define POWERQUAD_EVENTEN_EVENT_NAN(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_EVENTEN_EVENT_NAN_SHIFT)) & POWERQUAD_EVENTEN_EVENT_NAN_MASK)
-#define POWERQUAD_EVENTEN_EVENT_FIXED_MASK (0x4U)
-#define POWERQUAD_EVENTEN_EVENT_FIXED_SHIFT (2U)
-/*! event_fixed - 1: Enable event trigger on Fixed point Overflow
- */
-#define POWERQUAD_EVENTEN_EVENT_FIXED(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_EVENTEN_EVENT_FIXED_SHIFT)) & POWERQUAD_EVENTEN_EVENT_FIXED_MASK)
-#define POWERQUAD_EVENTEN_EVENT_UFLOW_MASK (0x8U)
-#define POWERQUAD_EVENTEN_EVENT_UFLOW_SHIFT (3U)
-/*! event_uflow - 1 : Enable event trigger on Subnormal truncation
- */
-#define POWERQUAD_EVENTEN_EVENT_UFLOW(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_EVENTEN_EVENT_UFLOW_SHIFT)) & POWERQUAD_EVENTEN_EVENT_UFLOW_MASK)
-#define POWERQUAD_EVENTEN_EVENT_BERR_MASK (0x10U)
-#define POWERQUAD_EVENTEN_EVENT_BERR_SHIFT (4U)
-/*! event_berr - 1: Enable event trigger on AHBM Buss Error
- */
-#define POWERQUAD_EVENTEN_EVENT_BERR(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_EVENTEN_EVENT_BERR_SHIFT)) & POWERQUAD_EVENTEN_EVENT_BERR_MASK)
-#define POWERQUAD_EVENTEN_EVENT_COMP_MASK (0x80U)
-#define POWERQUAD_EVENTEN_EVENT_COMP_SHIFT (7U)
-/*! event_comp - 1: Enable event trigger on instruction completion
- */
-#define POWERQUAD_EVENTEN_EVENT_COMP(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_EVENTEN_EVENT_COMP_SHIFT)) & POWERQUAD_EVENTEN_EVENT_COMP_MASK)
-/*! @} */
-
-/*! @name INTRSTAT - INTERRUPT STATUS register */
-/*! @{ */
-#define POWERQUAD_INTRSTAT_INTR_STAT_MASK (0x1U)
-#define POWERQUAD_INTRSTAT_INTR_STAT_SHIFT (0U)
-/*! intr_stat - Intr status ( 1 bit to indicate interrupt captured, 0 means no new interrupt), write any value will clear this bit
- */
-#define POWERQUAD_INTRSTAT_INTR_STAT(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_INTRSTAT_INTR_STAT_SHIFT)) & POWERQUAD_INTRSTAT_INTR_STAT_MASK)
-/*! @} */
-
-/*! @name GPREG - General purpose register bank N. */
-/*! @{ */
-#define POWERQUAD_GPREG_GPREG_MASK (0xFFFFFFFFU)
-#define POWERQUAD_GPREG_GPREG_SHIFT (0U)
-/*! gpreg - General purpose register bank
- */
-#define POWERQUAD_GPREG_GPREG(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_GPREG_GPREG_SHIFT)) & POWERQUAD_GPREG_GPREG_MASK)
-/*! @} */
-
-/* The count of POWERQUAD_GPREG */
-#define POWERQUAD_GPREG_COUNT (16U)
-
-/*! @name COMPREGS_COMPREG - Compute register bank */
-/*! @{ */
-#define POWERQUAD_COMPREGS_COMPREG_COMPREG_MASK (0xFFFFFFFFU)
-#define POWERQUAD_COMPREGS_COMPREG_COMPREG_SHIFT (0U)
-/*! compreg - Compute register bank
- */
-#define POWERQUAD_COMPREGS_COMPREG_COMPREG(x) (((uint32_t)(((uint32_t)(x)) << POWERQUAD_COMPREGS_COMPREG_COMPREG_SHIFT)) & POWERQUAD_COMPREGS_COMPREG_COMPREG_MASK)
-/*! @} */
-
-/* The count of POWERQUAD_COMPREGS_COMPREG */
-#define POWERQUAD_COMPREGS_COMPREG_COUNT (8U)
-
-
-/*!
- * @}
- */ /* end of group POWERQUAD_Register_Masks */
-
-
-/* POWERQUAD - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral POWERQUAD base address */
- #define POWERQUAD_BASE (0x500A6000u)
- /** Peripheral POWERQUAD base address */
- #define POWERQUAD_BASE_NS (0x400A6000u)
- /** Peripheral POWERQUAD base pointer */
- #define POWERQUAD ((POWERQUAD_Type *)POWERQUAD_BASE)
- /** Peripheral POWERQUAD base pointer */
- #define POWERQUAD_NS ((POWERQUAD_Type *)POWERQUAD_BASE_NS)
- /** Array initializer of POWERQUAD peripheral base addresses */
- #define POWERQUAD_BASE_ADDRS { POWERQUAD_BASE }
- /** Array initializer of POWERQUAD peripheral base pointers */
- #define POWERQUAD_BASE_PTRS { POWERQUAD }
- /** Array initializer of POWERQUAD peripheral base addresses */
- #define POWERQUAD_BASE_ADDRS_NS { POWERQUAD_BASE_NS }
- /** Array initializer of POWERQUAD peripheral base pointers */
- #define POWERQUAD_BASE_PTRS_NS { POWERQUAD_NS }
-#else
- /** Peripheral POWERQUAD base address */
- #define POWERQUAD_BASE (0x400A6000u)
- /** Peripheral POWERQUAD base pointer */
- #define POWERQUAD ((POWERQUAD_Type *)POWERQUAD_BASE)
- /** Array initializer of POWERQUAD peripheral base addresses */
- #define POWERQUAD_BASE_ADDRS { POWERQUAD_BASE }
- /** Array initializer of POWERQUAD peripheral base pointers */
- #define POWERQUAD_BASE_PTRS { POWERQUAD }
-#endif
-
-/*!
- * @}
- */ /* end of group POWERQUAD_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- PRINCE Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PRINCE_Peripheral_Access_Layer PRINCE Peripheral Access Layer
- * @{
- */
-
-/** PRINCE - Register Layout Typedef */
-typedef struct {
- __IO uint32_t ENC_ENABLE; /**< Encryption Enable register, offset: 0x0 */
- __O uint32_t MASK_LSB; /**< Data Mask register, 32 Least Significant Bits, offset: 0x4 */
- __O uint32_t MASK_MSB; /**< Data Mask register, 32 Most Significant Bits, offset: 0x8 */
- __IO uint32_t LOCK; /**< Lock register, offset: 0xC */
- __O uint32_t IV_LSB0; /**< Initial Vector register for region 0, Least Significant Bits, offset: 0x10 */
- __O uint32_t IV_MSB0; /**< Initial Vector register for region 0, Most Significant Bits, offset: 0x14 */
- __IO uint32_t BASE_ADDR0; /**< Base Address for region 0 register, offset: 0x18 */
- __IO uint32_t SR_ENABLE0; /**< Sub-Region Enable register for region 0, offset: 0x1C */
- __O uint32_t IV_LSB1; /**< Initial Vector register for region 1, Least Significant Bits, offset: 0x20 */
- __O uint32_t IV_MSB1; /**< Initial Vector register for region 1, Most Significant Bits, offset: 0x24 */
- __IO uint32_t BASE_ADDR1; /**< Base Address for region 1 register, offset: 0x28 */
- __IO uint32_t SR_ENABLE1; /**< Sub-Region Enable register for region 1, offset: 0x2C */
- __O uint32_t IV_LSB2; /**< Initial Vector register for region 2, Least Significant Bits, offset: 0x30 */
- __O uint32_t IV_MSB2; /**< Initial Vector register for region 2, Most Significant Bits, offset: 0x34 */
- __IO uint32_t BASE_ADDR2; /**< Base Address for region 2 register, offset: 0x38 */
- __IO uint32_t SR_ENABLE2; /**< Sub-Region Enable register for region 2, offset: 0x3C */
-} PRINCE_Type;
-
-/* ----------------------------------------------------------------------------
- -- PRINCE Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PRINCE_Register_Masks PRINCE Register Masks
- * @{
- */
-
-/*! @name ENC_ENABLE - Encryption Enable register */
-/*! @{ */
-#define PRINCE_ENC_ENABLE_EN_MASK (0x1U)
-#define PRINCE_ENC_ENABLE_EN_SHIFT (0U)
-/*! EN - Encryption Enable.
- * 0b0..Encryption of writes to the flash controller DATAW* registers is disabled.
- * 0b1..Encryption of writes to the flash controller DATAW* registers is enabled.
- */
-#define PRINCE_ENC_ENABLE_EN(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_ENC_ENABLE_EN_SHIFT)) & PRINCE_ENC_ENABLE_EN_MASK)
-/*! @} */
-
-/*! @name MASK_LSB - Data Mask register, 32 Least Significant Bits */
-/*! @{ */
-#define PRINCE_MASK_LSB_MASKVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_MASK_LSB_MASKVAL_SHIFT (0U)
-/*! MASKVAL - Value of the 32 Least Significant Bits of the 64-bit data mask.
- */
-#define PRINCE_MASK_LSB_MASKVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_MASK_LSB_MASKVAL_SHIFT)) & PRINCE_MASK_LSB_MASKVAL_MASK)
-/*! @} */
-
-/*! @name MASK_MSB - Data Mask register, 32 Most Significant Bits */
-/*! @{ */
-#define PRINCE_MASK_MSB_MASKVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_MASK_MSB_MASKVAL_SHIFT (0U)
-/*! MASKVAL - Value of the 32 Most Significant Bits of the 64-bit data mask.
- */
-#define PRINCE_MASK_MSB_MASKVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_MASK_MSB_MASKVAL_SHIFT)) & PRINCE_MASK_MSB_MASKVAL_MASK)
-/*! @} */
-
-/*! @name LOCK - Lock register */
-/*! @{ */
-#define PRINCE_LOCK_LOCKREG0_MASK (0x1U)
-#define PRINCE_LOCK_LOCKREG0_SHIFT (0U)
-/*! LOCKREG0 - Lock Region 0 registers.
- * 0b0..Disabled. IV_LSB0, IV_MSB0, BASE_ADDR0, and SR_ENABLE0 are writable..
- * 0b1..Enabled. IV_LSB0, IV_MSB0, BASE_ADDR0, and SR_ENABLE0 are not writable..
- */
-#define PRINCE_LOCK_LOCKREG0(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_LOCK_LOCKREG0_SHIFT)) & PRINCE_LOCK_LOCKREG0_MASK)
-#define PRINCE_LOCK_LOCKREG1_MASK (0x2U)
-#define PRINCE_LOCK_LOCKREG1_SHIFT (1U)
-/*! LOCKREG1 - Lock Region 1 registers.
- * 0b0..Disabled. IV_LSB1, IV_MSB1, BASE_ADDR1, and SR_ENABLE1 are writable..
- * 0b1..Enabled. IV_LSB1, IV_MSB1, BASE_ADDR1, and SR_ENABLE1 are not writable..
- */
-#define PRINCE_LOCK_LOCKREG1(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_LOCK_LOCKREG1_SHIFT)) & PRINCE_LOCK_LOCKREG1_MASK)
-#define PRINCE_LOCK_LOCKREG2_MASK (0x4U)
-#define PRINCE_LOCK_LOCKREG2_SHIFT (2U)
-/*! LOCKREG2 - Lock Region 2 registers.
- * 0b0..Disabled. IV_LSB2, IV_MSB2, BASE_ADDR2, and SR_ENABLE2 are writable..
- * 0b1..Enabled. IV_LSB2, IV_MSB2, BASE_ADDR2, and SR_ENABLE2 are not writable..
- */
-#define PRINCE_LOCK_LOCKREG2(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_LOCK_LOCKREG2_SHIFT)) & PRINCE_LOCK_LOCKREG2_MASK)
-#define PRINCE_LOCK_LOCKMASK_MASK (0x100U)
-#define PRINCE_LOCK_LOCKMASK_SHIFT (8U)
-/*! LOCKMASK - Lock the Mask registers.
- * 0b0..Disabled. MASK_LSB, and MASK_MSB are writable..
- * 0b1..Enabled. MASK_LSB, and MASK_MSB are not writable..
- */
-#define PRINCE_LOCK_LOCKMASK(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_LOCK_LOCKMASK_SHIFT)) & PRINCE_LOCK_LOCKMASK_MASK)
-/*! @} */
-
-/*! @name IV_LSB0 - Initial Vector register for region 0, Least Significant Bits */
-/*! @{ */
-#define PRINCE_IV_LSB0_IVVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_IV_LSB0_IVVAL_SHIFT (0U)
-/*! IVVAL - Initial Vector value for the 32 Least Significant Bits of the 64-bit Initial Vector.
- */
-#define PRINCE_IV_LSB0_IVVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_IV_LSB0_IVVAL_SHIFT)) & PRINCE_IV_LSB0_IVVAL_MASK)
-/*! @} */
-
-/*! @name IV_MSB0 - Initial Vector register for region 0, Most Significant Bits */
-/*! @{ */
-#define PRINCE_IV_MSB0_IVVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_IV_MSB0_IVVAL_SHIFT (0U)
-/*! IVVAL - Initial Vector value for the 32 Most Significant Bits of the 64-bit Initial Vector.
- */
-#define PRINCE_IV_MSB0_IVVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_IV_MSB0_IVVAL_SHIFT)) & PRINCE_IV_MSB0_IVVAL_MASK)
-/*! @} */
-
-/*! @name BASE_ADDR0 - Base Address for region 0 register */
-/*! @{ */
-#define PRINCE_BASE_ADDR0_ADDR_FIXED_MASK (0x3FFFFU)
-#define PRINCE_BASE_ADDR0_ADDR_FIXED_SHIFT (0U)
-/*! ADDR_FIXED - Fixed portion of the base address of region 0.
- */
-#define PRINCE_BASE_ADDR0_ADDR_FIXED(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_BASE_ADDR0_ADDR_FIXED_SHIFT)) & PRINCE_BASE_ADDR0_ADDR_FIXED_MASK)
-#define PRINCE_BASE_ADDR0_ADDR_PRG_MASK (0xC0000U)
-#define PRINCE_BASE_ADDR0_ADDR_PRG_SHIFT (18U)
-/*! ADDR_PRG - Programmable portion of the base address of region 0.
- */
-#define PRINCE_BASE_ADDR0_ADDR_PRG(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_BASE_ADDR0_ADDR_PRG_SHIFT)) & PRINCE_BASE_ADDR0_ADDR_PRG_MASK)
-/*! @} */
-
-/*! @name SR_ENABLE0 - Sub-Region Enable register for region 0 */
-/*! @{ */
-#define PRINCE_SR_ENABLE0_EN_MASK (0xFFFFFFFFU)
-#define PRINCE_SR_ENABLE0_EN_SHIFT (0U)
-/*! EN - Each bit in this field enables an 8KB subregion for encryption at offset 8KB*bitnum of region 0.
- */
-#define PRINCE_SR_ENABLE0_EN(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_SR_ENABLE0_EN_SHIFT)) & PRINCE_SR_ENABLE0_EN_MASK)
-/*! @} */
-
-/*! @name IV_LSB1 - Initial Vector register for region 1, Least Significant Bits */
-/*! @{ */
-#define PRINCE_IV_LSB1_IVVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_IV_LSB1_IVVAL_SHIFT (0U)
-/*! IVVAL - Initial Vector value for the 32 Least Significant Bits of the 64-bit Initial Vector.
- */
-#define PRINCE_IV_LSB1_IVVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_IV_LSB1_IVVAL_SHIFT)) & PRINCE_IV_LSB1_IVVAL_MASK)
-/*! @} */
-
-/*! @name IV_MSB1 - Initial Vector register for region 1, Most Significant Bits */
-/*! @{ */
-#define PRINCE_IV_MSB1_IVVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_IV_MSB1_IVVAL_SHIFT (0U)
-/*! IVVAL - Initial Vector value for the 32 Most Significant Bits of the 64-bit Initial Vector.
- */
-#define PRINCE_IV_MSB1_IVVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_IV_MSB1_IVVAL_SHIFT)) & PRINCE_IV_MSB1_IVVAL_MASK)
-/*! @} */
-
-/*! @name BASE_ADDR1 - Base Address for region 1 register */
-/*! @{ */
-#define PRINCE_BASE_ADDR1_ADDR_FIXED_MASK (0x3FFFFU)
-#define PRINCE_BASE_ADDR1_ADDR_FIXED_SHIFT (0U)
-/*! ADDR_FIXED - Fixed portion of the base address of region 1.
- */
-#define PRINCE_BASE_ADDR1_ADDR_FIXED(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_BASE_ADDR1_ADDR_FIXED_SHIFT)) & PRINCE_BASE_ADDR1_ADDR_FIXED_MASK)
-#define PRINCE_BASE_ADDR1_ADDR_PRG_MASK (0xC0000U)
-#define PRINCE_BASE_ADDR1_ADDR_PRG_SHIFT (18U)
-/*! ADDR_PRG - Programmable portion of the base address of region 1.
- */
-#define PRINCE_BASE_ADDR1_ADDR_PRG(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_BASE_ADDR1_ADDR_PRG_SHIFT)) & PRINCE_BASE_ADDR1_ADDR_PRG_MASK)
-/*! @} */
-
-/*! @name SR_ENABLE1 - Sub-Region Enable register for region 1 */
-/*! @{ */
-#define PRINCE_SR_ENABLE1_EN_MASK (0xFFFFFFFFU)
-#define PRINCE_SR_ENABLE1_EN_SHIFT (0U)
-/*! EN - Each bit in this field enables an 8KB subregion for encryption at offset 8KB*bitnum of region 1.
- */
-#define PRINCE_SR_ENABLE1_EN(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_SR_ENABLE1_EN_SHIFT)) & PRINCE_SR_ENABLE1_EN_MASK)
-/*! @} */
-
-/*! @name IV_LSB2 - Initial Vector register for region 2, Least Significant Bits */
-/*! @{ */
-#define PRINCE_IV_LSB2_IVVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_IV_LSB2_IVVAL_SHIFT (0U)
-/*! IVVAL - Initial Vector value for the 32 Least Significant Bits of the 64-bit Initial Vector.
- */
-#define PRINCE_IV_LSB2_IVVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_IV_LSB2_IVVAL_SHIFT)) & PRINCE_IV_LSB2_IVVAL_MASK)
-/*! @} */
-
-/*! @name IV_MSB2 - Initial Vector register for region 2, Most Significant Bits */
-/*! @{ */
-#define PRINCE_IV_MSB2_IVVAL_MASK (0xFFFFFFFFU)
-#define PRINCE_IV_MSB2_IVVAL_SHIFT (0U)
-/*! IVVAL - Initial Vector value for the 32 Most Significant Bits of the 64-bit Initial Vector.
- */
-#define PRINCE_IV_MSB2_IVVAL(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_IV_MSB2_IVVAL_SHIFT)) & PRINCE_IV_MSB2_IVVAL_MASK)
-/*! @} */
-
-/*! @name BASE_ADDR2 - Base Address for region 2 register */
-/*! @{ */
-#define PRINCE_BASE_ADDR2_ADDR_FIXED_MASK (0x3FFFFU)
-#define PRINCE_BASE_ADDR2_ADDR_FIXED_SHIFT (0U)
-/*! ADDR_FIXED - Fixed portion of the base address of region 2.
- */
-#define PRINCE_BASE_ADDR2_ADDR_FIXED(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_BASE_ADDR2_ADDR_FIXED_SHIFT)) & PRINCE_BASE_ADDR2_ADDR_FIXED_MASK)
-#define PRINCE_BASE_ADDR2_ADDR_PRG_MASK (0xC0000U)
-#define PRINCE_BASE_ADDR2_ADDR_PRG_SHIFT (18U)
-/*! ADDR_PRG - Programmable portion of the base address of region 2.
- */
-#define PRINCE_BASE_ADDR2_ADDR_PRG(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_BASE_ADDR2_ADDR_PRG_SHIFT)) & PRINCE_BASE_ADDR2_ADDR_PRG_MASK)
-/*! @} */
-
-/*! @name SR_ENABLE2 - Sub-Region Enable register for region 2 */
-/*! @{ */
-#define PRINCE_SR_ENABLE2_EN_MASK (0xFFFFFFFFU)
-#define PRINCE_SR_ENABLE2_EN_SHIFT (0U)
-/*! EN - Each bit in this field enables an 8KB subregion for encryption at offset 8KB*bitnum of region 2.
- */
-#define PRINCE_SR_ENABLE2_EN(x) (((uint32_t)(((uint32_t)(x)) << PRINCE_SR_ENABLE2_EN_SHIFT)) & PRINCE_SR_ENABLE2_EN_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group PRINCE_Register_Masks */
-
-
-/* PRINCE - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral PRINCE base address */
- #define PRINCE_BASE (0x50035000u)
- /** Peripheral PRINCE base address */
- #define PRINCE_BASE_NS (0x40035000u)
- /** Peripheral PRINCE base pointer */
- #define PRINCE ((PRINCE_Type *)PRINCE_BASE)
- /** Peripheral PRINCE base pointer */
- #define PRINCE_NS ((PRINCE_Type *)PRINCE_BASE_NS)
- /** Array initializer of PRINCE peripheral base addresses */
- #define PRINCE_BASE_ADDRS { PRINCE_BASE }
- /** Array initializer of PRINCE peripheral base pointers */
- #define PRINCE_BASE_PTRS { PRINCE }
- /** Array initializer of PRINCE peripheral base addresses */
- #define PRINCE_BASE_ADDRS_NS { PRINCE_BASE_NS }
- /** Array initializer of PRINCE peripheral base pointers */
- #define PRINCE_BASE_PTRS_NS { PRINCE_NS }
-#else
- /** Peripheral PRINCE base address */
- #define PRINCE_BASE (0x40035000u)
- /** Peripheral PRINCE base pointer */
- #define PRINCE ((PRINCE_Type *)PRINCE_BASE)
- /** Array initializer of PRINCE peripheral base addresses */
- #define PRINCE_BASE_ADDRS { PRINCE_BASE }
- /** Array initializer of PRINCE peripheral base pointers */
- #define PRINCE_BASE_PTRS { PRINCE }
-#endif
-
-/*!
- * @}
- */ /* end of group PRINCE_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- PUF Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PUF_Peripheral_Access_Layer PUF Peripheral Access Layer
- * @{
- */
-
-/** PUF - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< PUF Control register, offset: 0x0 */
- __IO uint32_t KEYINDEX; /**< PUF Key Index register, offset: 0x4 */
- __IO uint32_t KEYSIZE; /**< PUF Key Size register, offset: 0x8 */
- uint8_t RESERVED_0[20];
- __I uint32_t STAT; /**< PUF Status register, offset: 0x20 */
- uint8_t RESERVED_1[4];
- __I uint32_t ALLOW; /**< PUF Allow register, offset: 0x28 */
- uint8_t RESERVED_2[20];
- __O uint32_t KEYINPUT; /**< PUF Key Input register, offset: 0x40 */
- __O uint32_t CODEINPUT; /**< PUF Code Input register, offset: 0x44 */
- __I uint32_t CODEOUTPUT; /**< PUF Code Output register, offset: 0x48 */
- uint8_t RESERVED_3[20];
- __I uint32_t KEYOUTINDEX; /**< PUF Key Output Index register, offset: 0x60 */
- __I uint32_t KEYOUTPUT; /**< PUF Key Output register, offset: 0x64 */
- uint8_t RESERVED_4[116];
- __IO uint32_t IFSTAT; /**< PUF Interface Status and clear register, offset: 0xDC */
- uint8_t RESERVED_5[28];
- __I uint32_t VERSION; /**< PUF version register., offset: 0xFC */
- __IO uint32_t INTEN; /**< PUF Interrupt Enable, offset: 0x100 */
- __IO uint32_t INTSTAT; /**< PUF interrupt status, offset: 0x104 */
- __IO uint32_t PWRCTRL; /**< PUF RAM Power Control, offset: 0x108 */
- __IO uint32_t CFG; /**< PUF config register for block bits, offset: 0x10C */
- uint8_t RESERVED_6[240];
- __IO uint32_t KEYLOCK; /**< Only reset in case of full IC reset, offset: 0x200 */
- __IO uint32_t KEYENABLE; /**< , offset: 0x204 */
- __O uint32_t KEYRESET; /**< Reinitialize Keys shift registers counters, offset: 0x208 */
- __IO uint32_t IDXBLK_L; /**< , offset: 0x20C */
- __IO uint32_t IDXBLK_H_DP; /**< , offset: 0x210 */
- __O uint32_t KEYMASK[4]; /**< Only reset in case of full IC reset, array offset: 0x214, array step: 0x4 */
- uint8_t RESERVED_7[48];
- __IO uint32_t IDXBLK_H; /**< , offset: 0x254 */
- __IO uint32_t IDXBLK_L_DP; /**< , offset: 0x258 */
- __I uint32_t SHIFT_STATUS; /**< , offset: 0x25C */
-} PUF_Type;
-
-/* ----------------------------------------------------------------------------
- -- PUF Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup PUF_Register_Masks PUF Register Masks
- * @{
- */
-
-/*! @name CTRL - PUF Control register */
-/*! @{ */
-#define PUF_CTRL_ZEROIZE_MASK (0x1U)
-#define PUF_CTRL_ZEROIZE_SHIFT (0U)
-/*! zeroize - Begin Zeroize operation for PUF and go to Error state
- */
-#define PUF_CTRL_ZEROIZE(x) (((uint32_t)(((uint32_t)(x)) << PUF_CTRL_ZEROIZE_SHIFT)) & PUF_CTRL_ZEROIZE_MASK)
-#define PUF_CTRL_ENROLL_MASK (0x2U)
-#define PUF_CTRL_ENROLL_SHIFT (1U)
-/*! enroll - Begin Enroll operation
- */
-#define PUF_CTRL_ENROLL(x) (((uint32_t)(((uint32_t)(x)) << PUF_CTRL_ENROLL_SHIFT)) & PUF_CTRL_ENROLL_MASK)
-#define PUF_CTRL_START_MASK (0x4U)
-#define PUF_CTRL_START_SHIFT (2U)
-/*! start - Begin Start operation
- */
-#define PUF_CTRL_START(x) (((uint32_t)(((uint32_t)(x)) << PUF_CTRL_START_SHIFT)) & PUF_CTRL_START_MASK)
-#define PUF_CTRL_GENERATEKEY_MASK (0x8U)
-#define PUF_CTRL_GENERATEKEY_SHIFT (3U)
-/*! GENERATEKEY - Begin Set Intrinsic Key operation
- */
-#define PUF_CTRL_GENERATEKEY(x) (((uint32_t)(((uint32_t)(x)) << PUF_CTRL_GENERATEKEY_SHIFT)) & PUF_CTRL_GENERATEKEY_MASK)
-#define PUF_CTRL_SETKEY_MASK (0x10U)
-#define PUF_CTRL_SETKEY_SHIFT (4U)
-/*! SETKEY - Begin Set User Key operation
- */
-#define PUF_CTRL_SETKEY(x) (((uint32_t)(((uint32_t)(x)) << PUF_CTRL_SETKEY_SHIFT)) & PUF_CTRL_SETKEY_MASK)
-#define PUF_CTRL_GETKEY_MASK (0x40U)
-#define PUF_CTRL_GETKEY_SHIFT (6U)
-/*! GETKEY - Begin Get Key operation
- */
-#define PUF_CTRL_GETKEY(x) (((uint32_t)(((uint32_t)(x)) << PUF_CTRL_GETKEY_SHIFT)) & PUF_CTRL_GETKEY_MASK)
-/*! @} */
-
-/*! @name KEYINDEX - PUF Key Index register */
-/*! @{ */
-#define PUF_KEYINDEX_KEYIDX_MASK (0xFU)
-#define PUF_KEYINDEX_KEYIDX_SHIFT (0U)
-/*! KEYIDX - Key index for Set Key operations
- */
-#define PUF_KEYINDEX_KEYIDX(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYINDEX_KEYIDX_SHIFT)) & PUF_KEYINDEX_KEYIDX_MASK)
-/*! @} */
-
-/*! @name KEYSIZE - PUF Key Size register */
-/*! @{ */
-#define PUF_KEYSIZE_KEYSIZE_MASK (0x3FU)
-#define PUF_KEYSIZE_KEYSIZE_SHIFT (0U)
-/*! KEYSIZE - Key size for Set Key operations
- */
-#define PUF_KEYSIZE_KEYSIZE(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYSIZE_KEYSIZE_SHIFT)) & PUF_KEYSIZE_KEYSIZE_MASK)
-/*! @} */
-
-/*! @name STAT - PUF Status register */
-/*! @{ */
-#define PUF_STAT_BUSY_MASK (0x1U)
-#define PUF_STAT_BUSY_SHIFT (0U)
-/*! busy - Indicates that operation is in progress
- */
-#define PUF_STAT_BUSY(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_BUSY_SHIFT)) & PUF_STAT_BUSY_MASK)
-#define PUF_STAT_SUCCESS_MASK (0x2U)
-#define PUF_STAT_SUCCESS_SHIFT (1U)
-/*! SUCCESS - Last operation was successful
- */
-#define PUF_STAT_SUCCESS(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_SUCCESS_SHIFT)) & PUF_STAT_SUCCESS_MASK)
-#define PUF_STAT_ERROR_MASK (0x4U)
-#define PUF_STAT_ERROR_SHIFT (2U)
-/*! error - PUF is in the Error state and no operations can be performed
- */
-#define PUF_STAT_ERROR(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_ERROR_SHIFT)) & PUF_STAT_ERROR_MASK)
-#define PUF_STAT_KEYINREQ_MASK (0x10U)
-#define PUF_STAT_KEYINREQ_SHIFT (4U)
-/*! KEYINREQ - Request for next part of key
- */
-#define PUF_STAT_KEYINREQ(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_KEYINREQ_SHIFT)) & PUF_STAT_KEYINREQ_MASK)
-#define PUF_STAT_KEYOUTAVAIL_MASK (0x20U)
-#define PUF_STAT_KEYOUTAVAIL_SHIFT (5U)
-/*! KEYOUTAVAIL - Next part of key is available
- */
-#define PUF_STAT_KEYOUTAVAIL(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_KEYOUTAVAIL_SHIFT)) & PUF_STAT_KEYOUTAVAIL_MASK)
-#define PUF_STAT_CODEINREQ_MASK (0x40U)
-#define PUF_STAT_CODEINREQ_SHIFT (6U)
-/*! CODEINREQ - Request for next part of AC/KC
- */
-#define PUF_STAT_CODEINREQ(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_CODEINREQ_SHIFT)) & PUF_STAT_CODEINREQ_MASK)
-#define PUF_STAT_CODEOUTAVAIL_MASK (0x80U)
-#define PUF_STAT_CODEOUTAVAIL_SHIFT (7U)
-/*! CODEOUTAVAIL - Next part of AC/KC is available
- */
-#define PUF_STAT_CODEOUTAVAIL(x) (((uint32_t)(((uint32_t)(x)) << PUF_STAT_CODEOUTAVAIL_SHIFT)) & PUF_STAT_CODEOUTAVAIL_MASK)
-/*! @} */
-
-/*! @name ALLOW - PUF Allow register */
-/*! @{ */
-#define PUF_ALLOW_ALLOWENROLL_MASK (0x1U)
-#define PUF_ALLOW_ALLOWENROLL_SHIFT (0U)
-/*! ALLOWENROLL - Enroll operation is allowed
- */
-#define PUF_ALLOW_ALLOWENROLL(x) (((uint32_t)(((uint32_t)(x)) << PUF_ALLOW_ALLOWENROLL_SHIFT)) & PUF_ALLOW_ALLOWENROLL_MASK)
-#define PUF_ALLOW_ALLOWSTART_MASK (0x2U)
-#define PUF_ALLOW_ALLOWSTART_SHIFT (1U)
-/*! ALLOWSTART - Start operation is allowed
- */
-#define PUF_ALLOW_ALLOWSTART(x) (((uint32_t)(((uint32_t)(x)) << PUF_ALLOW_ALLOWSTART_SHIFT)) & PUF_ALLOW_ALLOWSTART_MASK)
-#define PUF_ALLOW_ALLOWSETKEY_MASK (0x4U)
-#define PUF_ALLOW_ALLOWSETKEY_SHIFT (2U)
-/*! ALLOWSETKEY - Set Key operations are allowed
- */
-#define PUF_ALLOW_ALLOWSETKEY(x) (((uint32_t)(((uint32_t)(x)) << PUF_ALLOW_ALLOWSETKEY_SHIFT)) & PUF_ALLOW_ALLOWSETKEY_MASK)
-#define PUF_ALLOW_ALLOWGETKEY_MASK (0x8U)
-#define PUF_ALLOW_ALLOWGETKEY_SHIFT (3U)
-/*! ALLOWGETKEY - Get Key operation is allowed
- */
-#define PUF_ALLOW_ALLOWGETKEY(x) (((uint32_t)(((uint32_t)(x)) << PUF_ALLOW_ALLOWGETKEY_SHIFT)) & PUF_ALLOW_ALLOWGETKEY_MASK)
-/*! @} */
-
-/*! @name KEYINPUT - PUF Key Input register */
-/*! @{ */
-#define PUF_KEYINPUT_KEYIN_MASK (0xFFFFFFFFU)
-#define PUF_KEYINPUT_KEYIN_SHIFT (0U)
-/*! KEYIN - Key input data
- */
-#define PUF_KEYINPUT_KEYIN(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYINPUT_KEYIN_SHIFT)) & PUF_KEYINPUT_KEYIN_MASK)
-/*! @} */
-
-/*! @name CODEINPUT - PUF Code Input register */
-/*! @{ */
-#define PUF_CODEINPUT_CODEIN_MASK (0xFFFFFFFFU)
-#define PUF_CODEINPUT_CODEIN_SHIFT (0U)
-/*! CODEIN - AC/KC input data
- */
-#define PUF_CODEINPUT_CODEIN(x) (((uint32_t)(((uint32_t)(x)) << PUF_CODEINPUT_CODEIN_SHIFT)) & PUF_CODEINPUT_CODEIN_MASK)
-/*! @} */
-
-/*! @name CODEOUTPUT - PUF Code Output register */
-/*! @{ */
-#define PUF_CODEOUTPUT_CODEOUT_MASK (0xFFFFFFFFU)
-#define PUF_CODEOUTPUT_CODEOUT_SHIFT (0U)
-/*! CODEOUT - AC/KC output data
- */
-#define PUF_CODEOUTPUT_CODEOUT(x) (((uint32_t)(((uint32_t)(x)) << PUF_CODEOUTPUT_CODEOUT_SHIFT)) & PUF_CODEOUTPUT_CODEOUT_MASK)
-/*! @} */
-
-/*! @name KEYOUTINDEX - PUF Key Output Index register */
-/*! @{ */
-#define PUF_KEYOUTINDEX_KEYOUTIDX_MASK (0xFU)
-#define PUF_KEYOUTINDEX_KEYOUTIDX_SHIFT (0U)
-/*! KEYOUTIDX - Key index for the key that is currently output via the Key Output register
- */
-#define PUF_KEYOUTINDEX_KEYOUTIDX(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYOUTINDEX_KEYOUTIDX_SHIFT)) & PUF_KEYOUTINDEX_KEYOUTIDX_MASK)
-/*! @} */
-
-/*! @name KEYOUTPUT - PUF Key Output register */
-/*! @{ */
-#define PUF_KEYOUTPUT_KEYOUT_MASK (0xFFFFFFFFU)
-#define PUF_KEYOUTPUT_KEYOUT_SHIFT (0U)
-/*! KEYOUT - Key output data
- */
-#define PUF_KEYOUTPUT_KEYOUT(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYOUTPUT_KEYOUT_SHIFT)) & PUF_KEYOUTPUT_KEYOUT_MASK)
-/*! @} */
-
-/*! @name IFSTAT - PUF Interface Status and clear register */
-/*! @{ */
-#define PUF_IFSTAT_ERROR_MASK (0x1U)
-#define PUF_IFSTAT_ERROR_SHIFT (0U)
-/*! ERROR - Indicates that an APB error has occurred,Writing logic1 clears the if_error bit
- */
-#define PUF_IFSTAT_ERROR(x) (((uint32_t)(((uint32_t)(x)) << PUF_IFSTAT_ERROR_SHIFT)) & PUF_IFSTAT_ERROR_MASK)
-/*! @} */
-
-/*! @name VERSION - PUF version register. */
-/*! @{ */
-#define PUF_VERSION_VERSION_MASK (0xFFFFFFFFU)
-#define PUF_VERSION_VERSION_SHIFT (0U)
-/*! VERSION - Version of the PUF module.
- */
-#define PUF_VERSION_VERSION(x) (((uint32_t)(((uint32_t)(x)) << PUF_VERSION_VERSION_SHIFT)) & PUF_VERSION_VERSION_MASK)
-/*! @} */
-
-/*! @name INTEN - PUF Interrupt Enable */
-/*! @{ */
-#define PUF_INTEN_READYEN_MASK (0x1U)
-#define PUF_INTEN_READYEN_SHIFT (0U)
-/*! READYEN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_READYEN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_READYEN_SHIFT)) & PUF_INTEN_READYEN_MASK)
-#define PUF_INTEN_SUCCESEN_MASK (0x2U)
-#define PUF_INTEN_SUCCESEN_SHIFT (1U)
-/*! SUCCESEN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_SUCCESEN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_SUCCESEN_SHIFT)) & PUF_INTEN_SUCCESEN_MASK)
-#define PUF_INTEN_ERROREN_MASK (0x4U)
-#define PUF_INTEN_ERROREN_SHIFT (2U)
-/*! ERROREN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_ERROREN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_ERROREN_SHIFT)) & PUF_INTEN_ERROREN_MASK)
-#define PUF_INTEN_KEYINREQEN_MASK (0x10U)
-#define PUF_INTEN_KEYINREQEN_SHIFT (4U)
-/*! KEYINREQEN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_KEYINREQEN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_KEYINREQEN_SHIFT)) & PUF_INTEN_KEYINREQEN_MASK)
-#define PUF_INTEN_KEYOUTAVAILEN_MASK (0x20U)
-#define PUF_INTEN_KEYOUTAVAILEN_SHIFT (5U)
-/*! KEYOUTAVAILEN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_KEYOUTAVAILEN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_KEYOUTAVAILEN_SHIFT)) & PUF_INTEN_KEYOUTAVAILEN_MASK)
-#define PUF_INTEN_CODEINREQEN_MASK (0x40U)
-#define PUF_INTEN_CODEINREQEN_SHIFT (6U)
-/*! CODEINREQEN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_CODEINREQEN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_CODEINREQEN_SHIFT)) & PUF_INTEN_CODEINREQEN_MASK)
-#define PUF_INTEN_CODEOUTAVAILEN_MASK (0x80U)
-#define PUF_INTEN_CODEOUTAVAILEN_SHIFT (7U)
-/*! CODEOUTAVAILEN - Enable corresponding interrupt. Note that bit numbers match those assigned in QK_SR (Quiddikey Status Register)
- */
-#define PUF_INTEN_CODEOUTAVAILEN(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTEN_CODEOUTAVAILEN_SHIFT)) & PUF_INTEN_CODEOUTAVAILEN_MASK)
-/*! @} */
-
-/*! @name INTSTAT - PUF interrupt status */
-/*! @{ */
-#define PUF_INTSTAT_READY_MASK (0x1U)
-#define PUF_INTSTAT_READY_SHIFT (0U)
-/*! READY - Triggers on falling edge of busy, write 1 to clear
- */
-#define PUF_INTSTAT_READY(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_READY_SHIFT)) & PUF_INTSTAT_READY_MASK)
-#define PUF_INTSTAT_SUCCESS_MASK (0x2U)
-#define PUF_INTSTAT_SUCCESS_SHIFT (1U)
-/*! SUCCESS - Level sensitive interrupt, cleared when interrupt source clears
- */
-#define PUF_INTSTAT_SUCCESS(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_SUCCESS_SHIFT)) & PUF_INTSTAT_SUCCESS_MASK)
-#define PUF_INTSTAT_ERROR_MASK (0x4U)
-#define PUF_INTSTAT_ERROR_SHIFT (2U)
-/*! ERROR - Level sensitive interrupt, cleared when interrupt source clears
- */
-#define PUF_INTSTAT_ERROR(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_ERROR_SHIFT)) & PUF_INTSTAT_ERROR_MASK)
-#define PUF_INTSTAT_KEYINREQ_MASK (0x10U)
-#define PUF_INTSTAT_KEYINREQ_SHIFT (4U)
-/*! KEYINREQ - Level sensitive interrupt, cleared when interrupt source clears
- */
-#define PUF_INTSTAT_KEYINREQ(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_KEYINREQ_SHIFT)) & PUF_INTSTAT_KEYINREQ_MASK)
-#define PUF_INTSTAT_KEYOUTAVAIL_MASK (0x20U)
-#define PUF_INTSTAT_KEYOUTAVAIL_SHIFT (5U)
-/*! KEYOUTAVAIL - Level sensitive interrupt, cleared when interrupt source clears
- */
-#define PUF_INTSTAT_KEYOUTAVAIL(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_KEYOUTAVAIL_SHIFT)) & PUF_INTSTAT_KEYOUTAVAIL_MASK)
-#define PUF_INTSTAT_CODEINREQ_MASK (0x40U)
-#define PUF_INTSTAT_CODEINREQ_SHIFT (6U)
-/*! CODEINREQ - Level sensitive interrupt, cleared when interrupt source clears
- */
-#define PUF_INTSTAT_CODEINREQ(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_CODEINREQ_SHIFT)) & PUF_INTSTAT_CODEINREQ_MASK)
-#define PUF_INTSTAT_CODEOUTAVAIL_MASK (0x80U)
-#define PUF_INTSTAT_CODEOUTAVAIL_SHIFT (7U)
-/*! CODEOUTAVAIL - Level sensitive interrupt, cleared when interrupt source clears
- */
-#define PUF_INTSTAT_CODEOUTAVAIL(x) (((uint32_t)(((uint32_t)(x)) << PUF_INTSTAT_CODEOUTAVAIL_SHIFT)) & PUF_INTSTAT_CODEOUTAVAIL_MASK)
-/*! @} */
-
-/*! @name PWRCTRL - PUF RAM Power Control */
-/*! @{ */
-#define PUF_PWRCTRL_RAMON_MASK (0x1U)
-#define PUF_PWRCTRL_RAMON_SHIFT (0U)
-/*! RAMON - Power on the PUF RAM.
- */
-#define PUF_PWRCTRL_RAMON(x) (((uint32_t)(((uint32_t)(x)) << PUF_PWRCTRL_RAMON_SHIFT)) & PUF_PWRCTRL_RAMON_MASK)
-#define PUF_PWRCTRL_RAMSTAT_MASK (0x2U)
-#define PUF_PWRCTRL_RAMSTAT_SHIFT (1U)
-/*! RAMSTAT - PUF RAM status.
- */
-#define PUF_PWRCTRL_RAMSTAT(x) (((uint32_t)(((uint32_t)(x)) << PUF_PWRCTRL_RAMSTAT_SHIFT)) & PUF_PWRCTRL_RAMSTAT_MASK)
-/*! @} */
-
-/*! @name CFG - PUF config register for block bits */
-/*! @{ */
-#define PUF_CFG_BLOCKENROLL_SETKEY_MASK (0x1U)
-#define PUF_CFG_BLOCKENROLL_SETKEY_SHIFT (0U)
-/*! BLOCKENROLL_SETKEY - Block enroll operation. Write 1 to set, cleared on reset.
- */
-#define PUF_CFG_BLOCKENROLL_SETKEY(x) (((uint32_t)(((uint32_t)(x)) << PUF_CFG_BLOCKENROLL_SETKEY_SHIFT)) & PUF_CFG_BLOCKENROLL_SETKEY_MASK)
-#define PUF_CFG_BLOCKKEYOUTPUT_MASK (0x2U)
-#define PUF_CFG_BLOCKKEYOUTPUT_SHIFT (1U)
-/*! BLOCKKEYOUTPUT - Block set key operation. Write 1 to set, cleared on reset.
- */
-#define PUF_CFG_BLOCKKEYOUTPUT(x) (((uint32_t)(((uint32_t)(x)) << PUF_CFG_BLOCKKEYOUTPUT_SHIFT)) & PUF_CFG_BLOCKKEYOUTPUT_MASK)
-/*! @} */
-
-/*! @name KEYLOCK - Only reset in case of full IC reset */
-/*! @{ */
-#define PUF_KEYLOCK_KEY0_MASK (0x3U)
-#define PUF_KEYLOCK_KEY0_SHIFT (0U)
-/*! KEY0 - "10:Write access to KEY0MASK, KEYENABLE.KEY0 and KEYRESET.KEY0 is allowed. 00, 01,
- * 11:Write access to KEY0MASK, KEYENABLE.KEY0 and KEYRESET.KEY0 is NOT allowed. Important Note : Once
- * this field is written with a value different from '10', its value can no longer be modified
- * until un Power On Reset occurs."
- */
-#define PUF_KEYLOCK_KEY0(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYLOCK_KEY0_SHIFT)) & PUF_KEYLOCK_KEY0_MASK)
-#define PUF_KEYLOCK_KEY1_MASK (0xCU)
-#define PUF_KEYLOCK_KEY1_SHIFT (2U)
-/*! KEY1 - "10:Write access to KEY1MASK, KEYENABLE.KEY1 and KEYRESET.KEY1 is allowed. 00, 01,
- * 11:Write access to KEY1MASK, KEYENABLE.KEY1 and KEYRESET.KEY1 is NOT allowed. Important Note : Once
- * this field is written with a value different from '10', its value can no longer be modified
- * until un Power On Reset occurs."
- */
-#define PUF_KEYLOCK_KEY1(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYLOCK_KEY1_SHIFT)) & PUF_KEYLOCK_KEY1_MASK)
-#define PUF_KEYLOCK_KEY2_MASK (0x30U)
-#define PUF_KEYLOCK_KEY2_SHIFT (4U)
-/*! KEY2 - "10:Write access to KEY2MASK, KEYENABLE.KEY2 and KEYRESET.KEY2 is allowed. 00, 01,
- * 11:Write access to KEY2MASK, KEYENABLE.KEY2 and KEYRESET.KEY2 is NOT allowed. Important Note : Once
- * this field is written with a value different from '10', its value can no longer be modified
- * until un Power On Reset occurs."
- */
-#define PUF_KEYLOCK_KEY2(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYLOCK_KEY2_SHIFT)) & PUF_KEYLOCK_KEY2_MASK)
-#define PUF_KEYLOCK_KEY3_MASK (0xC0U)
-#define PUF_KEYLOCK_KEY3_SHIFT (6U)
-/*! KEY3 - "10:Write access to KEY3MASK, KEYENABLE.KEY3 and KEYRESET.KEY3 is allowed. 00, 01,
- * 11:Write access to KEY3MASK, KEYENABLE.KEY3 and KEYRESET.KEY3 is NOT allowed. Important Note : Once
- * this field is written with a value different from '10', its value can no longer be modified
- * until un Power On Reset occurs."
- */
-#define PUF_KEYLOCK_KEY3(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYLOCK_KEY3_SHIFT)) & PUF_KEYLOCK_KEY3_MASK)
-/*! @} */
-
-/*! @name KEYENABLE - */
-/*! @{ */
-#define PUF_KEYENABLE_KEY0_MASK (0x3U)
-#define PUF_KEYENABLE_KEY0_SHIFT (0U)
-/*! KEY0 - "10: Data coming out from PUF Index 0 interface are shifted in KEY0 register. 00, 01, 11
- * : Data coming out from PUF Index 0 interface are NOT shifted in KEY0 register."
- */
-#define PUF_KEYENABLE_KEY0(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYENABLE_KEY0_SHIFT)) & PUF_KEYENABLE_KEY0_MASK)
-#define PUF_KEYENABLE_KEY1_MASK (0xCU)
-#define PUF_KEYENABLE_KEY1_SHIFT (2U)
-/*! KEY1 - "10: Data coming out from PUF Index 0 interface are shifted in KEY1 register. 00, 01, 11
- * : Data coming out from PUF Index 0 interface are NOT shifted in KEY1 register."
- */
-#define PUF_KEYENABLE_KEY1(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYENABLE_KEY1_SHIFT)) & PUF_KEYENABLE_KEY1_MASK)
-#define PUF_KEYENABLE_KEY2_MASK (0x30U)
-#define PUF_KEYENABLE_KEY2_SHIFT (4U)
-/*! KEY2 - "10: Data coming out from PUF Index 0 interface are shifted in KEY2 register. 00, 01, 11
- * : Data coming out from PUF Index 0 interface are NOT shifted in KEY2 register."
- */
-#define PUF_KEYENABLE_KEY2(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYENABLE_KEY2_SHIFT)) & PUF_KEYENABLE_KEY2_MASK)
-#define PUF_KEYENABLE_KEY3_MASK (0xC0U)
-#define PUF_KEYENABLE_KEY3_SHIFT (6U)
-/*! KEY3 - "10: Data coming out from PUF Index 0 interface are shifted in KEY3 register. 00, 01, 11
- * : Data coming out from PUF Index 0 interface are NOT shifted in KEY3 register."
- */
-#define PUF_KEYENABLE_KEY3(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYENABLE_KEY3_SHIFT)) & PUF_KEYENABLE_KEY3_MASK)
-/*! @} */
-
-/*! @name KEYRESET - Reinitialize Keys shift registers counters */
-/*! @{ */
-#define PUF_KEYRESET_KEY0_MASK (0x3U)
-#define PUF_KEYRESET_KEY0_SHIFT (0U)
-/*! KEY0 - 10: Reset KEY0 shift register. Self clearing. Must be done before loading any new key.
- */
-#define PUF_KEYRESET_KEY0(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYRESET_KEY0_SHIFT)) & PUF_KEYRESET_KEY0_MASK)
-#define PUF_KEYRESET_KEY1_MASK (0xCU)
-#define PUF_KEYRESET_KEY1_SHIFT (2U)
-/*! KEY1 - 10: Reset KEY1 shift register. Self clearing. Must be done before loading any new key.
- */
-#define PUF_KEYRESET_KEY1(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYRESET_KEY1_SHIFT)) & PUF_KEYRESET_KEY1_MASK)
-#define PUF_KEYRESET_KEY2_MASK (0x30U)
-#define PUF_KEYRESET_KEY2_SHIFT (4U)
-/*! KEY2 - 10: Reset KEY2 shift register. Self clearing. Must be done before loading any new key.
- */
-#define PUF_KEYRESET_KEY2(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYRESET_KEY2_SHIFT)) & PUF_KEYRESET_KEY2_MASK)
-#define PUF_KEYRESET_KEY3_MASK (0xC0U)
-#define PUF_KEYRESET_KEY3_SHIFT (6U)
-/*! KEY3 - 10: Reset KEY3 shift register. Self clearing. Must be done before loading any new key.
- */
-#define PUF_KEYRESET_KEY3(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYRESET_KEY3_SHIFT)) & PUF_KEYRESET_KEY3_MASK)
-/*! @} */
-
-/*! @name IDXBLK_L - */
-/*! @{ */
-#define PUF_IDXBLK_L_IDX1_MASK (0xCU)
-#define PUF_IDXBLK_L_IDX1_SHIFT (2U)
-/*! IDX1 - Use to block PUF index 1
- */
-#define PUF_IDXBLK_L_IDX1(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX1_SHIFT)) & PUF_IDXBLK_L_IDX1_MASK)
-#define PUF_IDXBLK_L_IDX2_MASK (0x30U)
-#define PUF_IDXBLK_L_IDX2_SHIFT (4U)
-/*! IDX2 - Use to block PUF index 2
- */
-#define PUF_IDXBLK_L_IDX2(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX2_SHIFT)) & PUF_IDXBLK_L_IDX2_MASK)
-#define PUF_IDXBLK_L_IDX3_MASK (0xC0U)
-#define PUF_IDXBLK_L_IDX3_SHIFT (6U)
-/*! IDX3 - Use to block PUF index 3
- */
-#define PUF_IDXBLK_L_IDX3(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX3_SHIFT)) & PUF_IDXBLK_L_IDX3_MASK)
-#define PUF_IDXBLK_L_IDX4_MASK (0x300U)
-#define PUF_IDXBLK_L_IDX4_SHIFT (8U)
-/*! IDX4 - Use to block PUF index 4
- */
-#define PUF_IDXBLK_L_IDX4(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX4_SHIFT)) & PUF_IDXBLK_L_IDX4_MASK)
-#define PUF_IDXBLK_L_IDX5_MASK (0xC00U)
-#define PUF_IDXBLK_L_IDX5_SHIFT (10U)
-/*! IDX5 - Use to block PUF index 5
- */
-#define PUF_IDXBLK_L_IDX5(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX5_SHIFT)) & PUF_IDXBLK_L_IDX5_MASK)
-#define PUF_IDXBLK_L_IDX6_MASK (0x3000U)
-#define PUF_IDXBLK_L_IDX6_SHIFT (12U)
-/*! IDX6 - Use to block PUF index 6
- */
-#define PUF_IDXBLK_L_IDX6(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX6_SHIFT)) & PUF_IDXBLK_L_IDX6_MASK)
-#define PUF_IDXBLK_L_IDX7_MASK (0xC000U)
-#define PUF_IDXBLK_L_IDX7_SHIFT (14U)
-/*! IDX7 - Use to block PUF index 7
- */
-#define PUF_IDXBLK_L_IDX7(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_IDX7_SHIFT)) & PUF_IDXBLK_L_IDX7_MASK)
-#define PUF_IDXBLK_L_LOCK_IDX_MASK (0xC0000000U)
-#define PUF_IDXBLK_L_LOCK_IDX_SHIFT (30U)
-/*! LOCK_IDX - Lock 0 to 7 PUF key indexes
- */
-#define PUF_IDXBLK_L_LOCK_IDX(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_LOCK_IDX_SHIFT)) & PUF_IDXBLK_L_LOCK_IDX_MASK)
-/*! @} */
-
-/*! @name IDXBLK_H_DP - */
-/*! @{ */
-#define PUF_IDXBLK_H_DP_IDX8_MASK (0x3U)
-#define PUF_IDXBLK_H_DP_IDX8_SHIFT (0U)
-/*! IDX8 - Use to block PUF index 8
- */
-#define PUF_IDXBLK_H_DP_IDX8(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX8_SHIFT)) & PUF_IDXBLK_H_DP_IDX8_MASK)
-#define PUF_IDXBLK_H_DP_IDX9_MASK (0xCU)
-#define PUF_IDXBLK_H_DP_IDX9_SHIFT (2U)
-/*! IDX9 - Use to block PUF index 9
- */
-#define PUF_IDXBLK_H_DP_IDX9(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX9_SHIFT)) & PUF_IDXBLK_H_DP_IDX9_MASK)
-#define PUF_IDXBLK_H_DP_IDX10_MASK (0x30U)
-#define PUF_IDXBLK_H_DP_IDX10_SHIFT (4U)
-/*! IDX10 - Use to block PUF index 10
- */
-#define PUF_IDXBLK_H_DP_IDX10(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX10_SHIFT)) & PUF_IDXBLK_H_DP_IDX10_MASK)
-#define PUF_IDXBLK_H_DP_IDX11_MASK (0xC0U)
-#define PUF_IDXBLK_H_DP_IDX11_SHIFT (6U)
-/*! IDX11 - Use to block PUF index 11
- */
-#define PUF_IDXBLK_H_DP_IDX11(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX11_SHIFT)) & PUF_IDXBLK_H_DP_IDX11_MASK)
-#define PUF_IDXBLK_H_DP_IDX12_MASK (0x300U)
-#define PUF_IDXBLK_H_DP_IDX12_SHIFT (8U)
-/*! IDX12 - Use to block PUF index 12
- */
-#define PUF_IDXBLK_H_DP_IDX12(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX12_SHIFT)) & PUF_IDXBLK_H_DP_IDX12_MASK)
-#define PUF_IDXBLK_H_DP_IDX13_MASK (0xC00U)
-#define PUF_IDXBLK_H_DP_IDX13_SHIFT (10U)
-/*! IDX13 - Use to block PUF index 13
- */
-#define PUF_IDXBLK_H_DP_IDX13(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX13_SHIFT)) & PUF_IDXBLK_H_DP_IDX13_MASK)
-#define PUF_IDXBLK_H_DP_IDX14_MASK (0x3000U)
-#define PUF_IDXBLK_H_DP_IDX14_SHIFT (12U)
-/*! IDX14 - Use to block PUF index 14
- */
-#define PUF_IDXBLK_H_DP_IDX14(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX14_SHIFT)) & PUF_IDXBLK_H_DP_IDX14_MASK)
-#define PUF_IDXBLK_H_DP_IDX15_MASK (0xC000U)
-#define PUF_IDXBLK_H_DP_IDX15_SHIFT (14U)
-/*! IDX15 - Use to block PUF index 15
- */
-#define PUF_IDXBLK_H_DP_IDX15(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_DP_IDX15_SHIFT)) & PUF_IDXBLK_H_DP_IDX15_MASK)
-/*! @} */
-
-/*! @name KEYMASK - Only reset in case of full IC reset */
-/*! @{ */
-#define PUF_KEYMASK_KEYMASK_MASK (0xFFFFFFFFU)
-#define PUF_KEYMASK_KEYMASK_SHIFT (0U)
-#define PUF_KEYMASK_KEYMASK(x) (((uint32_t)(((uint32_t)(x)) << PUF_KEYMASK_KEYMASK_SHIFT)) & PUF_KEYMASK_KEYMASK_MASK)
-/*! @} */
-
-/* The count of PUF_KEYMASK */
-#define PUF_KEYMASK_COUNT (4U)
-
-/*! @name IDXBLK_H - */
-/*! @{ */
-#define PUF_IDXBLK_H_IDX8_MASK (0x3U)
-#define PUF_IDXBLK_H_IDX8_SHIFT (0U)
-/*! IDX8 - Use to block PUF index 8
- */
-#define PUF_IDXBLK_H_IDX8(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX8_SHIFT)) & PUF_IDXBLK_H_IDX8_MASK)
-#define PUF_IDXBLK_H_IDX9_MASK (0xCU)
-#define PUF_IDXBLK_H_IDX9_SHIFT (2U)
-/*! IDX9 - Use to block PUF index 9
- */
-#define PUF_IDXBLK_H_IDX9(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX9_SHIFT)) & PUF_IDXBLK_H_IDX9_MASK)
-#define PUF_IDXBLK_H_IDX10_MASK (0x30U)
-#define PUF_IDXBLK_H_IDX10_SHIFT (4U)
-/*! IDX10 - Use to block PUF index 10
- */
-#define PUF_IDXBLK_H_IDX10(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX10_SHIFT)) & PUF_IDXBLK_H_IDX10_MASK)
-#define PUF_IDXBLK_H_IDX11_MASK (0xC0U)
-#define PUF_IDXBLK_H_IDX11_SHIFT (6U)
-/*! IDX11 - Use to block PUF index 11
- */
-#define PUF_IDXBLK_H_IDX11(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX11_SHIFT)) & PUF_IDXBLK_H_IDX11_MASK)
-#define PUF_IDXBLK_H_IDX12_MASK (0x300U)
-#define PUF_IDXBLK_H_IDX12_SHIFT (8U)
-/*! IDX12 - Use to block PUF index 12
- */
-#define PUF_IDXBLK_H_IDX12(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX12_SHIFT)) & PUF_IDXBLK_H_IDX12_MASK)
-#define PUF_IDXBLK_H_IDX13_MASK (0xC00U)
-#define PUF_IDXBLK_H_IDX13_SHIFT (10U)
-/*! IDX13 - Use to block PUF index 13
- */
-#define PUF_IDXBLK_H_IDX13(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX13_SHIFT)) & PUF_IDXBLK_H_IDX13_MASK)
-#define PUF_IDXBLK_H_IDX14_MASK (0x3000U)
-#define PUF_IDXBLK_H_IDX14_SHIFT (12U)
-/*! IDX14 - Use to block PUF index 14
- */
-#define PUF_IDXBLK_H_IDX14(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX14_SHIFT)) & PUF_IDXBLK_H_IDX14_MASK)
-#define PUF_IDXBLK_H_IDX15_MASK (0xC000U)
-#define PUF_IDXBLK_H_IDX15_SHIFT (14U)
-/*! IDX15 - Use to block PUF index 15
- */
-#define PUF_IDXBLK_H_IDX15(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_IDX15_SHIFT)) & PUF_IDXBLK_H_IDX15_MASK)
-#define PUF_IDXBLK_H_LOCK_IDX_MASK (0xC0000000U)
-#define PUF_IDXBLK_H_LOCK_IDX_SHIFT (30U)
-/*! LOCK_IDX - Lock 8 to 15 PUF key indexes
- */
-#define PUF_IDXBLK_H_LOCK_IDX(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_H_LOCK_IDX_SHIFT)) & PUF_IDXBLK_H_LOCK_IDX_MASK)
-/*! @} */
-
-/*! @name IDXBLK_L_DP - */
-/*! @{ */
-#define PUF_IDXBLK_L_DP_IDX1_MASK (0xCU)
-#define PUF_IDXBLK_L_DP_IDX1_SHIFT (2U)
-/*! IDX1 - Use to block PUF index 1
- */
-#define PUF_IDXBLK_L_DP_IDX1(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX1_SHIFT)) & PUF_IDXBLK_L_DP_IDX1_MASK)
-#define PUF_IDXBLK_L_DP_IDX2_MASK (0x30U)
-#define PUF_IDXBLK_L_DP_IDX2_SHIFT (4U)
-/*! IDX2 - Use to block PUF index 2
- */
-#define PUF_IDXBLK_L_DP_IDX2(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX2_SHIFT)) & PUF_IDXBLK_L_DP_IDX2_MASK)
-#define PUF_IDXBLK_L_DP_IDX3_MASK (0xC0U)
-#define PUF_IDXBLK_L_DP_IDX3_SHIFT (6U)
-/*! IDX3 - Use to block PUF index 3
- */
-#define PUF_IDXBLK_L_DP_IDX3(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX3_SHIFT)) & PUF_IDXBLK_L_DP_IDX3_MASK)
-#define PUF_IDXBLK_L_DP_IDX4_MASK (0x300U)
-#define PUF_IDXBLK_L_DP_IDX4_SHIFT (8U)
-/*! IDX4 - Use to block PUF index 4
- */
-#define PUF_IDXBLK_L_DP_IDX4(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX4_SHIFT)) & PUF_IDXBLK_L_DP_IDX4_MASK)
-#define PUF_IDXBLK_L_DP_IDX5_MASK (0xC00U)
-#define PUF_IDXBLK_L_DP_IDX5_SHIFT (10U)
-/*! IDX5 - Use to block PUF index 5
- */
-#define PUF_IDXBLK_L_DP_IDX5(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX5_SHIFT)) & PUF_IDXBLK_L_DP_IDX5_MASK)
-#define PUF_IDXBLK_L_DP_IDX6_MASK (0x3000U)
-#define PUF_IDXBLK_L_DP_IDX6_SHIFT (12U)
-/*! IDX6 - Use to block PUF index 6
- */
-#define PUF_IDXBLK_L_DP_IDX6(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX6_SHIFT)) & PUF_IDXBLK_L_DP_IDX6_MASK)
-#define PUF_IDXBLK_L_DP_IDX7_MASK (0xC000U)
-#define PUF_IDXBLK_L_DP_IDX7_SHIFT (14U)
-/*! IDX7 - Use to block PUF index 7
- */
-#define PUF_IDXBLK_L_DP_IDX7(x) (((uint32_t)(((uint32_t)(x)) << PUF_IDXBLK_L_DP_IDX7_SHIFT)) & PUF_IDXBLK_L_DP_IDX7_MASK)
-/*! @} */
-
-/*! @name SHIFT_STATUS - */
-/*! @{ */
-#define PUF_SHIFT_STATUS_KEY0_MASK (0xFU)
-#define PUF_SHIFT_STATUS_KEY0_SHIFT (0U)
-/*! KEY0 - Index counter from key 0 shift register
- */
-#define PUF_SHIFT_STATUS_KEY0(x) (((uint32_t)(((uint32_t)(x)) << PUF_SHIFT_STATUS_KEY0_SHIFT)) & PUF_SHIFT_STATUS_KEY0_MASK)
-#define PUF_SHIFT_STATUS_KEY1_MASK (0xF0U)
-#define PUF_SHIFT_STATUS_KEY1_SHIFT (4U)
-/*! KEY1 - Index counter from key 1 shift register
- */
-#define PUF_SHIFT_STATUS_KEY1(x) (((uint32_t)(((uint32_t)(x)) << PUF_SHIFT_STATUS_KEY1_SHIFT)) & PUF_SHIFT_STATUS_KEY1_MASK)
-#define PUF_SHIFT_STATUS_KEY2_MASK (0xF00U)
-#define PUF_SHIFT_STATUS_KEY2_SHIFT (8U)
-/*! KEY2 - Index counter from key 2 shift register
- */
-#define PUF_SHIFT_STATUS_KEY2(x) (((uint32_t)(((uint32_t)(x)) << PUF_SHIFT_STATUS_KEY2_SHIFT)) & PUF_SHIFT_STATUS_KEY2_MASK)
-#define PUF_SHIFT_STATUS_KEY3_MASK (0xF000U)
-#define PUF_SHIFT_STATUS_KEY3_SHIFT (12U)
-/*! KEY3 - Index counter from key 3 shift register
- */
-#define PUF_SHIFT_STATUS_KEY3(x) (((uint32_t)(((uint32_t)(x)) << PUF_SHIFT_STATUS_KEY3_SHIFT)) & PUF_SHIFT_STATUS_KEY3_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group PUF_Register_Masks */
-
-
-/* PUF - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral PUF base address */
- #define PUF_BASE (0x5003B000u)
- /** Peripheral PUF base address */
- #define PUF_BASE_NS (0x4003B000u)
- /** Peripheral PUF base pointer */
- #define PUF ((PUF_Type *)PUF_BASE)
- /** Peripheral PUF base pointer */
- #define PUF_NS ((PUF_Type *)PUF_BASE_NS)
- /** Array initializer of PUF peripheral base addresses */
- #define PUF_BASE_ADDRS { PUF_BASE }
- /** Array initializer of PUF peripheral base pointers */
- #define PUF_BASE_PTRS { PUF }
- /** Array initializer of PUF peripheral base addresses */
- #define PUF_BASE_ADDRS_NS { PUF_BASE_NS }
- /** Array initializer of PUF peripheral base pointers */
- #define PUF_BASE_PTRS_NS { PUF_NS }
-#else
- /** Peripheral PUF base address */
- #define PUF_BASE (0x4003B000u)
- /** Peripheral PUF base pointer */
- #define PUF ((PUF_Type *)PUF_BASE)
- /** Array initializer of PUF peripheral base addresses */
- #define PUF_BASE_ADDRS { PUF_BASE }
- /** Array initializer of PUF peripheral base pointers */
- #define PUF_BASE_PTRS { PUF }
-#endif
-/** Interrupt vectors for the PUF peripheral type */
-#define PUF_IRQS { PUF_IRQn }
-
-/*!
- * @}
- */ /* end of group PUF_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- RNG Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup RNG_Peripheral_Access_Layer RNG Peripheral Access Layer
- * @{
- */
-
-/** RNG - Register Layout Typedef */
-typedef struct {
- __I uint32_t RANDOM_NUMBER; /**< This register contains a random 32 bit number which is computed on demand, at each time it is read, offset: 0x0 */
- uint8_t RESERVED_0[4];
- __I uint32_t COUNTER_VAL; /**< , offset: 0x8 */
- __IO uint32_t COUNTER_CFG; /**< , offset: 0xC */
- __IO uint32_t ONLINE_TEST_CFG; /**< , offset: 0x10 */
- __I uint32_t ONLINE_TEST_VAL; /**< , offset: 0x14 */
- uint8_t RESERVED_1[4068];
- __I uint32_t MODULEID; /**< IP identifier, offset: 0xFFC */
-} RNG_Type;
-
-/* ----------------------------------------------------------------------------
- -- RNG Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup RNG_Register_Masks RNG Register Masks
- * @{
- */
-
-/*! @name RANDOM_NUMBER - This register contains a random 32 bit number which is computed on demand, at each time it is read */
-/*! @{ */
-#define RNG_RANDOM_NUMBER_RANDOM_NUMBER_MASK (0xFFFFFFFFU)
-#define RNG_RANDOM_NUMBER_RANDOM_NUMBER_SHIFT (0U)
-/*! RANDOM_NUMBER - This register contains a random 32 bit number which is computed on demand, at each time it is read.
- */
-#define RNG_RANDOM_NUMBER_RANDOM_NUMBER(x) (((uint32_t)(((uint32_t)(x)) << RNG_RANDOM_NUMBER_RANDOM_NUMBER_SHIFT)) & RNG_RANDOM_NUMBER_RANDOM_NUMBER_MASK)
-/*! @} */
-
-/*! @name COUNTER_VAL - */
-/*! @{ */
-#define RNG_COUNTER_VAL_CLK_RATIO_MASK (0xFFU)
-#define RNG_COUNTER_VAL_CLK_RATIO_SHIFT (0U)
-/*! CLK_RATIO - Gives the ratio between the internal clocks frequencies and the register clock
- * frequency for evaluation and certification purposes.
- */
-#define RNG_COUNTER_VAL_CLK_RATIO(x) (((uint32_t)(((uint32_t)(x)) << RNG_COUNTER_VAL_CLK_RATIO_SHIFT)) & RNG_COUNTER_VAL_CLK_RATIO_MASK)
-#define RNG_COUNTER_VAL_REFRESH_CNT_MASK (0x1F00U)
-#define RNG_COUNTER_VAL_REFRESH_CNT_SHIFT (8U)
-/*! REFRESH_CNT - Incremented (till max possible value) each time COUNTER was updated since last reading to any *_NUMBER.
- */
-#define RNG_COUNTER_VAL_REFRESH_CNT(x) (((uint32_t)(((uint32_t)(x)) << RNG_COUNTER_VAL_REFRESH_CNT_SHIFT)) & RNG_COUNTER_VAL_REFRESH_CNT_MASK)
-/*! @} */
-
-/*! @name COUNTER_CFG - */
-/*! @{ */
-#define RNG_COUNTER_CFG_MODE_MASK (0x3U)
-#define RNG_COUNTER_CFG_MODE_SHIFT (0U)
-/*! MODE - 00: disabled 01: update once.
- */
-#define RNG_COUNTER_CFG_MODE(x) (((uint32_t)(((uint32_t)(x)) << RNG_COUNTER_CFG_MODE_SHIFT)) & RNG_COUNTER_CFG_MODE_MASK)
-#define RNG_COUNTER_CFG_CLOCK_SEL_MASK (0x1CU)
-#define RNG_COUNTER_CFG_CLOCK_SEL_SHIFT (2U)
-/*! CLOCK_SEL - Selects the internal clock on which to compute statistics.
- */
-#define RNG_COUNTER_CFG_CLOCK_SEL(x) (((uint32_t)(((uint32_t)(x)) << RNG_COUNTER_CFG_CLOCK_SEL_SHIFT)) & RNG_COUNTER_CFG_CLOCK_SEL_MASK)
-#define RNG_COUNTER_CFG_SHIFT4X_MASK (0xE0U)
-#define RNG_COUNTER_CFG_SHIFT4X_SHIFT (5U)
-/*! SHIFT4X - To be used to add precision to clock_ratio and determine 'entropy refill'.
- */
-#define RNG_COUNTER_CFG_SHIFT4X(x) (((uint32_t)(((uint32_t)(x)) << RNG_COUNTER_CFG_SHIFT4X_SHIFT)) & RNG_COUNTER_CFG_SHIFT4X_MASK)
-/*! @} */
-
-/*! @name ONLINE_TEST_CFG - */
-/*! @{ */
-#define RNG_ONLINE_TEST_CFG_ACTIVATE_MASK (0x1U)
-#define RNG_ONLINE_TEST_CFG_ACTIVATE_SHIFT (0U)
-/*! ACTIVATE - 0: disabled 1: activated Update rythm for VAL depends on COUNTER_CFG if data_sel is set to COUNTER.
- */
-#define RNG_ONLINE_TEST_CFG_ACTIVATE(x) (((uint32_t)(((uint32_t)(x)) << RNG_ONLINE_TEST_CFG_ACTIVATE_SHIFT)) & RNG_ONLINE_TEST_CFG_ACTIVATE_MASK)
-#define RNG_ONLINE_TEST_CFG_DATA_SEL_MASK (0x6U)
-#define RNG_ONLINE_TEST_CFG_DATA_SEL_SHIFT (1U)
-/*! DATA_SEL - Selects source on which to apply online test: 00: LSB of COUNTER: raw data from one
- * or all sources of entropy 01: MSB of COUNTER: raw data from one or all sources of entropy 10:
- * RANDOM_NUMBER 11: ENCRYPTED_NUMBER 'activate' should be set to 'disabled' before changing this
- * field.
- */
-#define RNG_ONLINE_TEST_CFG_DATA_SEL(x) (((uint32_t)(((uint32_t)(x)) << RNG_ONLINE_TEST_CFG_DATA_SEL_SHIFT)) & RNG_ONLINE_TEST_CFG_DATA_SEL_MASK)
-/*! @} */
-
-/*! @name ONLINE_TEST_VAL - */
-/*! @{ */
-#define RNG_ONLINE_TEST_VAL_LIVE_CHI_SQUARED_MASK (0xFU)
-#define RNG_ONLINE_TEST_VAL_LIVE_CHI_SQUARED_SHIFT (0U)
-/*! LIVE_CHI_SQUARED - This value is updated as described in field 'activate'.
- */
-#define RNG_ONLINE_TEST_VAL_LIVE_CHI_SQUARED(x) (((uint32_t)(((uint32_t)(x)) << RNG_ONLINE_TEST_VAL_LIVE_CHI_SQUARED_SHIFT)) & RNG_ONLINE_TEST_VAL_LIVE_CHI_SQUARED_MASK)
-#define RNG_ONLINE_TEST_VAL_MIN_CHI_SQUARED_MASK (0xF0U)
-#define RNG_ONLINE_TEST_VAL_MIN_CHI_SQUARED_SHIFT (4U)
-/*! MIN_CHI_SQUARED - This field is reset when 'activate'==0.
- */
-#define RNG_ONLINE_TEST_VAL_MIN_CHI_SQUARED(x) (((uint32_t)(((uint32_t)(x)) << RNG_ONLINE_TEST_VAL_MIN_CHI_SQUARED_SHIFT)) & RNG_ONLINE_TEST_VAL_MIN_CHI_SQUARED_MASK)
-#define RNG_ONLINE_TEST_VAL_MAX_CHI_SQUARED_MASK (0xF00U)
-#define RNG_ONLINE_TEST_VAL_MAX_CHI_SQUARED_SHIFT (8U)
-/*! MAX_CHI_SQUARED - This field is reset when 'activate'==0.
- */
-#define RNG_ONLINE_TEST_VAL_MAX_CHI_SQUARED(x) (((uint32_t)(((uint32_t)(x)) << RNG_ONLINE_TEST_VAL_MAX_CHI_SQUARED_SHIFT)) & RNG_ONLINE_TEST_VAL_MAX_CHI_SQUARED_MASK)
-/*! @} */
-
-/*! @name MODULEID - IP identifier */
-/*! @{ */
-#define RNG_MODULEID_APERTURE_MASK (0xFFU)
-#define RNG_MODULEID_APERTURE_SHIFT (0U)
-/*! APERTURE - Aperture i.
- */
-#define RNG_MODULEID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << RNG_MODULEID_APERTURE_SHIFT)) & RNG_MODULEID_APERTURE_MASK)
-#define RNG_MODULEID_MIN_REV_MASK (0xF00U)
-#define RNG_MODULEID_MIN_REV_SHIFT (8U)
-/*! MIN_REV - Minor revision i.
- */
-#define RNG_MODULEID_MIN_REV(x) (((uint32_t)(((uint32_t)(x)) << RNG_MODULEID_MIN_REV_SHIFT)) & RNG_MODULEID_MIN_REV_MASK)
-#define RNG_MODULEID_MAJ_REV_MASK (0xF000U)
-#define RNG_MODULEID_MAJ_REV_SHIFT (12U)
-/*! MAJ_REV - Major revision i.
- */
-#define RNG_MODULEID_MAJ_REV(x) (((uint32_t)(((uint32_t)(x)) << RNG_MODULEID_MAJ_REV_SHIFT)) & RNG_MODULEID_MAJ_REV_MASK)
-#define RNG_MODULEID_ID_MASK (0xFFFF0000U)
-#define RNG_MODULEID_ID_SHIFT (16U)
-/*! ID - Identifier.
- */
-#define RNG_MODULEID_ID(x) (((uint32_t)(((uint32_t)(x)) << RNG_MODULEID_ID_SHIFT)) & RNG_MODULEID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group RNG_Register_Masks */
-
-
-/* RNG - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral RNG base address */
- #define RNG_BASE (0x5003A000u)
- /** Peripheral RNG base address */
- #define RNG_BASE_NS (0x4003A000u)
- /** Peripheral RNG base pointer */
- #define RNG ((RNG_Type *)RNG_BASE)
- /** Peripheral RNG base pointer */
- #define RNG_NS ((RNG_Type *)RNG_BASE_NS)
- /** Array initializer of RNG peripheral base addresses */
- #define RNG_BASE_ADDRS { RNG_BASE }
- /** Array initializer of RNG peripheral base pointers */
- #define RNG_BASE_PTRS { RNG }
- /** Array initializer of RNG peripheral base addresses */
- #define RNG_BASE_ADDRS_NS { RNG_BASE_NS }
- /** Array initializer of RNG peripheral base pointers */
- #define RNG_BASE_PTRS_NS { RNG_NS }
-#else
- /** Peripheral RNG base address */
- #define RNG_BASE (0x4003A000u)
- /** Peripheral RNG base pointer */
- #define RNG ((RNG_Type *)RNG_BASE)
- /** Array initializer of RNG peripheral base addresses */
- #define RNG_BASE_ADDRS { RNG_BASE }
- /** Array initializer of RNG peripheral base pointers */
- #define RNG_BASE_PTRS { RNG }
-#endif
-
-/*!
- * @}
- */ /* end of group RNG_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- RTC Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup RTC_Peripheral_Access_Layer RTC Peripheral Access Layer
- * @{
- */
-
-/** RTC - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< RTC control register, offset: 0x0 */
- __IO uint32_t MATCH; /**< RTC match register, offset: 0x4 */
- __IO uint32_t COUNT; /**< RTC counter register, offset: 0x8 */
- __IO uint32_t WAKE; /**< High-resolution/wake-up timer control register, offset: 0xC */
- __I uint32_t SUBSEC; /**< Sub-second counter register, offset: 0x10 */
- uint8_t RESERVED_0[44];
- __IO uint32_t GPREG[8]; /**< General Purpose register, array offset: 0x40, array step: 0x4 */
-} RTC_Type;
-
-/* ----------------------------------------------------------------------------
- -- RTC Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup RTC_Register_Masks RTC Register Masks
- * @{
- */
-
-/*! @name CTRL - RTC control register */
-/*! @{ */
-#define RTC_CTRL_SWRESET_MASK (0x1U)
-#define RTC_CTRL_SWRESET_SHIFT (0U)
-/*! SWRESET - Software reset control
- * 0b0..Not in reset. The RTC is not held in reset. This bit must be cleared prior to configuring or initiating any operation of the RTC.
- * 0b1..In reset. The RTC is held in reset. All register bits within the RTC will be forced to their reset value
- * except the OFD bit. This bit must be cleared before writing to any register in the RTC - including writes
- * to set any of the other bits within this register. Do not attempt to write to any bits of this register at
- * the same time that the reset bit is being cleared.
- */
-#define RTC_CTRL_SWRESET(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_SWRESET_SHIFT)) & RTC_CTRL_SWRESET_MASK)
-#define RTC_CTRL_ALARM1HZ_MASK (0x4U)
-#define RTC_CTRL_ALARM1HZ_SHIFT (2U)
-/*! ALARM1HZ - RTC 1 Hz timer alarm flag status.
- * 0b0..No match. No match has occurred on the 1 Hz RTC timer. Writing a 0 has no effect.
- * 0b1..Match. A match condition has occurred on the 1 Hz RTC timer. This flag generates an RTC alarm interrupt
- * request RTC_ALARM which can also wake up the part from any low power mode. Writing a 1 clears this bit.
- */
-#define RTC_CTRL_ALARM1HZ(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_ALARM1HZ_SHIFT)) & RTC_CTRL_ALARM1HZ_MASK)
-#define RTC_CTRL_WAKE1KHZ_MASK (0x8U)
-#define RTC_CTRL_WAKE1KHZ_SHIFT (3U)
-/*! WAKE1KHZ - RTC 1 kHz timer wake-up flag status.
- * 0b0..Run. The RTC 1 kHz timer is running. Writing a 0 has no effect.
- * 0b1..Time-out. The 1 kHz high-resolution/wake-up timer has timed out. This flag generates an RTC wake-up
- * interrupt request RTC-WAKE which can also wake up the part from any low power mode. Writing a 1 clears this bit.
- */
-#define RTC_CTRL_WAKE1KHZ(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_WAKE1KHZ_SHIFT)) & RTC_CTRL_WAKE1KHZ_MASK)
-#define RTC_CTRL_ALARMDPD_EN_MASK (0x10U)
-#define RTC_CTRL_ALARMDPD_EN_SHIFT (4U)
-/*! ALARMDPD_EN - RTC 1 Hz timer alarm enable for Deep power-down.
- * 0b0..Disable. A match on the 1 Hz RTC timer will not bring the part out of Deep power-down mode.
- * 0b1..Enable. A match on the 1 Hz RTC timer bring the part out of Deep power-down mode.
- */
-#define RTC_CTRL_ALARMDPD_EN(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_ALARMDPD_EN_SHIFT)) & RTC_CTRL_ALARMDPD_EN_MASK)
-#define RTC_CTRL_WAKEDPD_EN_MASK (0x20U)
-#define RTC_CTRL_WAKEDPD_EN_SHIFT (5U)
-/*! WAKEDPD_EN - RTC 1 kHz timer wake-up enable for Deep power-down.
- * 0b0..Disable. A match on the 1 kHz RTC timer will not bring the part out of Deep power-down mode.
- * 0b1..Enable. A match on the 1 kHz RTC timer bring the part out of Deep power-down mode.
- */
-#define RTC_CTRL_WAKEDPD_EN(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_WAKEDPD_EN_SHIFT)) & RTC_CTRL_WAKEDPD_EN_MASK)
-#define RTC_CTRL_RTC1KHZ_EN_MASK (0x40U)
-#define RTC_CTRL_RTC1KHZ_EN_SHIFT (6U)
-/*! RTC1KHZ_EN - RTC 1 kHz clock enable. This bit can be set to 0 to conserve power if the 1 kHz
- * timer is not used. This bit has no effect when the RTC is disabled (bit 7 of this register is 0).
- * 0b0..Disable. A match on the 1 kHz RTC timer will not bring the part out of Deep power-down mode.
- * 0b1..Enable. The 1 kHz RTC timer is enabled.
- */
-#define RTC_CTRL_RTC1KHZ_EN(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_RTC1KHZ_EN_SHIFT)) & RTC_CTRL_RTC1KHZ_EN_MASK)
-#define RTC_CTRL_RTC_EN_MASK (0x80U)
-#define RTC_CTRL_RTC_EN_SHIFT (7U)
-/*! RTC_EN - RTC enable.
- * 0b0..Disable. The RTC 1 Hz and 1 kHz clocks are shut down and the RTC operation is disabled. This bit should
- * be 0 when writing to load a value in the RTC counter register.
- * 0b1..Enable. The 1 Hz RTC clock is running and RTC operation is enabled. This bit must be set to initiate
- * operation of the RTC. The first clock to the RTC counter occurs 1 s after this bit is set. To also enable the
- * high-resolution, 1 kHz clock, set bit 6 in this register.
- */
-#define RTC_CTRL_RTC_EN(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_RTC_EN_SHIFT)) & RTC_CTRL_RTC_EN_MASK)
-#define RTC_CTRL_RTC_OSC_PD_MASK (0x100U)
-#define RTC_CTRL_RTC_OSC_PD_SHIFT (8U)
-/*! RTC_OSC_PD - RTC oscillator power-down control.
- * 0b0..See RTC_OSC_BYPASS
- * 0b1..RTC oscillator is powered-down.
- */
-#define RTC_CTRL_RTC_OSC_PD(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_RTC_OSC_PD_SHIFT)) & RTC_CTRL_RTC_OSC_PD_MASK)
-#define RTC_CTRL_RTC_OSC_BYPASS_MASK (0x200U)
-#define RTC_CTRL_RTC_OSC_BYPASS_SHIFT (9U)
-/*! RTC_OSC_BYPASS - RTC oscillator bypass control.
- * 0b0..The RTC Oscillator operates normally as a crystal oscillator with the crystal connected between the RTC_XTALIN and RTC_XTALOUT pins.
- * 0b1..The RTC Oscillator is in bypass mode. In this mode a clock can be directly input into the RTC_XTALIN pin.
- */
-#define RTC_CTRL_RTC_OSC_BYPASS(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_RTC_OSC_BYPASS_SHIFT)) & RTC_CTRL_RTC_OSC_BYPASS_MASK)
-#define RTC_CTRL_RTC_SUBSEC_ENA_MASK (0x400U)
-#define RTC_CTRL_RTC_SUBSEC_ENA_SHIFT (10U)
-/*! RTC_SUBSEC_ENA - RTC Sub-second counter control.
- * 0b0..The sub-second counter (if implemented) is disabled. This bit is cleared by a system-level POR or BOD
- * reset as well as a by the RTC_ENA bit (bit 7 in this register). On modules not equipped with a sub-second
- * counter, this bit will always read-back as a '0'.
- * 0b1..The 32 KHz sub-second counter is enabled (if implemented). Counting commences on the start of the first
- * one-second interval after this bit is set. Note: This bit can only be set after the RTC_ENA bit (bit 7) is
- * set by a previous write operation. Note: The RTC sub-second counter must be re-enabled whenever the chip
- * exits deep power-down mode.
- */
-#define RTC_CTRL_RTC_SUBSEC_ENA(x) (((uint32_t)(((uint32_t)(x)) << RTC_CTRL_RTC_SUBSEC_ENA_SHIFT)) & RTC_CTRL_RTC_SUBSEC_ENA_MASK)
-/*! @} */
-
-/*! @name MATCH - RTC match register */
-/*! @{ */
-#define RTC_MATCH_MATVAL_MASK (0xFFFFFFFFU)
-#define RTC_MATCH_MATVAL_SHIFT (0U)
-/*! MATVAL - Contains the match value against which the 1 Hz RTC timer will be compared to set the
- * alarm flag RTC_ALARM and generate an alarm interrupt/wake-up if enabled.
- */
-#define RTC_MATCH_MATVAL(x) (((uint32_t)(((uint32_t)(x)) << RTC_MATCH_MATVAL_SHIFT)) & RTC_MATCH_MATVAL_MASK)
-/*! @} */
-
-/*! @name COUNT - RTC counter register */
-/*! @{ */
-#define RTC_COUNT_VAL_MASK (0xFFFFFFFFU)
-#define RTC_COUNT_VAL_SHIFT (0U)
-/*! VAL - A read reflects the current value of the main, 1 Hz RTC timer. A write loads a new initial
- * value into the timer. The RTC counter will count up continuously at a 1 Hz rate once the RTC
- * Software Reset is removed (by clearing bit 0 of the CTRL register). Only write to this
- * register when the RTC_EN bit in the RTC CTRL Register is 0. The counter increments one second after
- * the RTC_EN bit is set.
- */
-#define RTC_COUNT_VAL(x) (((uint32_t)(((uint32_t)(x)) << RTC_COUNT_VAL_SHIFT)) & RTC_COUNT_VAL_MASK)
-/*! @} */
-
-/*! @name WAKE - High-resolution/wake-up timer control register */
-/*! @{ */
-#define RTC_WAKE_VAL_MASK (0xFFFFU)
-#define RTC_WAKE_VAL_SHIFT (0U)
-/*! VAL - A read reflects the current value of the high-resolution/wake-up timer. A write pre-loads
- * a start count value into the wake-up timer and initializes a count-down sequence. Do not write
- * to this register while counting is in progress.
- */
-#define RTC_WAKE_VAL(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAKE_VAL_SHIFT)) & RTC_WAKE_VAL_MASK)
-/*! @} */
-
-/*! @name SUBSEC - Sub-second counter register */
-/*! @{ */
-#define RTC_SUBSEC_SUBSEC_MASK (0x7FFFU)
-#define RTC_SUBSEC_SUBSEC_SHIFT (0U)
-/*! SUBSEC - A read reflects the current value of the 32KHz sub-second counter. This counter is
- * cleared whenever the SUBSEC_ENA bit in the RTC_CONTROL register is low. Up-counting at a 32KHz
- * rate commences at the start of the next one-second interval after the SUBSEC_ENA bit is set. This
- * counter must be re-enabled after exiting deep power-down mode or after the main RTC module is
- * disabled and re-enabled. On modules not equipped with a sub-second counter, this register
- * will read-back as all zeroes.
- */
-#define RTC_SUBSEC_SUBSEC(x) (((uint32_t)(((uint32_t)(x)) << RTC_SUBSEC_SUBSEC_SHIFT)) & RTC_SUBSEC_SUBSEC_MASK)
-/*! @} */
-
-/*! @name GPREG - General Purpose register */
-/*! @{ */
-#define RTC_GPREG_GPDATA_MASK (0xFFFFFFFFU)
-#define RTC_GPREG_GPDATA_SHIFT (0U)
-/*! GPDATA - Data retained during Deep power-down mode or loss of main power as long as VBAT is supplied.
- */
-#define RTC_GPREG_GPDATA(x) (((uint32_t)(((uint32_t)(x)) << RTC_GPREG_GPDATA_SHIFT)) & RTC_GPREG_GPDATA_MASK)
-/*! @} */
-
-/* The count of RTC_GPREG */
-#define RTC_GPREG_COUNT (8U)
-
-
-/*!
- * @}
- */ /* end of group RTC_Register_Masks */
-
-
-/* RTC - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral RTC base address */
- #define RTC_BASE (0x5002C000u)
- /** Peripheral RTC base address */
- #define RTC_BASE_NS (0x4002C000u)
- /** Peripheral RTC base pointer */
- #define RTC ((RTC_Type *)RTC_BASE)
- /** Peripheral RTC base pointer */
- #define RTC_NS ((RTC_Type *)RTC_BASE_NS)
- /** Array initializer of RTC peripheral base addresses */
- #define RTC_BASE_ADDRS { RTC_BASE }
- /** Array initializer of RTC peripheral base pointers */
- #define RTC_BASE_PTRS { RTC }
- /** Array initializer of RTC peripheral base addresses */
- #define RTC_BASE_ADDRS_NS { RTC_BASE_NS }
- /** Array initializer of RTC peripheral base pointers */
- #define RTC_BASE_PTRS_NS { RTC_NS }
-#else
- /** Peripheral RTC base address */
- #define RTC_BASE (0x4002C000u)
- /** Peripheral RTC base pointer */
- #define RTC ((RTC_Type *)RTC_BASE)
- /** Array initializer of RTC peripheral base addresses */
- #define RTC_BASE_ADDRS { RTC_BASE }
- /** Array initializer of RTC peripheral base pointers */
- #define RTC_BASE_PTRS { RTC }
-#endif
-/** Interrupt vectors for the RTC peripheral type */
-#define RTC_IRQS { RTC_IRQn }
-
-/*!
- * @}
- */ /* end of group RTC_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- SCT Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SCT_Peripheral_Access_Layer SCT Peripheral Access Layer
- * @{
- */
-
-/** SCT - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CONFIG; /**< SCT configuration register, offset: 0x0 */
- union { /* offset: 0x4 */
- struct { /* offset: 0x4 */
- __IO uint16_t CTRLL; /**< SCT_CTRLL register, offset: 0x4 */
- __IO uint16_t CTRLH; /**< SCT_CTRLH register, offset: 0x6 */
- } CTRL_ACCESS16BIT;
- __IO uint32_t CTRL; /**< SCT control register, offset: 0x4 */
- };
- union { /* offset: 0x8 */
- struct { /* offset: 0x8 */
- __IO uint16_t LIMITL; /**< SCT_LIMITL register, offset: 0x8 */
- __IO uint16_t LIMITH; /**< SCT_LIMITH register, offset: 0xA */
- } LIMIT_ACCESS16BIT;
- __IO uint32_t LIMIT; /**< SCT limit event select register, offset: 0x8 */
- };
- union { /* offset: 0xC */
- struct { /* offset: 0xC */
- __IO uint16_t HALTL; /**< SCT_HALTL register, offset: 0xC */
- __IO uint16_t HALTH; /**< SCT_HALTH register, offset: 0xE */
- } HALT_ACCESS16BIT;
- __IO uint32_t HALT; /**< SCT halt event select register, offset: 0xC */
- };
- union { /* offset: 0x10 */
- struct { /* offset: 0x10 */
- __IO uint16_t STOPL; /**< SCT_STOPL register, offset: 0x10 */
- __IO uint16_t STOPH; /**< SCT_STOPH register, offset: 0x12 */
- } STOP_ACCESS16BIT;
- __IO uint32_t STOP; /**< SCT stop event select register, offset: 0x10 */
- };
- union { /* offset: 0x14 */
- struct { /* offset: 0x14 */
- __IO uint16_t STARTL; /**< SCT_STARTL register, offset: 0x14 */
- __IO uint16_t STARTH; /**< SCT_STARTH register, offset: 0x16 */
- } START_ACCESS16BIT;
- __IO uint32_t START; /**< SCT start event select register, offset: 0x14 */
- };
- uint8_t RESERVED_0[40];
- union { /* offset: 0x40 */
- struct { /* offset: 0x40 */
- __IO uint16_t COUNTL; /**< SCT_COUNTL register, offset: 0x40 */
- __IO uint16_t COUNTH; /**< SCT_COUNTH register, offset: 0x42 */
- } COUNT_ACCESS16BIT;
- __IO uint32_t COUNT; /**< SCT counter register, offset: 0x40 */
- };
- union { /* offset: 0x44 */
- struct { /* offset: 0x44 */
- __IO uint16_t STATEL; /**< SCT_STATEL register, offset: 0x44 */
- __IO uint16_t STATEH; /**< SCT_STATEH register, offset: 0x46 */
- } STATE_ACCESS16BIT;
- __IO uint32_t STATE; /**< SCT state register, offset: 0x44 */
- };
- __I uint32_t INPUT; /**< SCT input register, offset: 0x48 */
- union { /* offset: 0x4C */
- struct { /* offset: 0x4C */
- __IO uint16_t REGMODEL; /**< SCT_REGMODEL register, offset: 0x4C */
- __IO uint16_t REGMODEH; /**< SCT_REGMODEH register, offset: 0x4E */
- } REGMODE_ACCESS16BIT;
- __IO uint32_t REGMODE; /**< SCT match/capture mode register, offset: 0x4C */
- };
- __IO uint32_t OUTPUT; /**< SCT output register, offset: 0x50 */
- __IO uint32_t OUTPUTDIRCTRL; /**< SCT output counter direction control register, offset: 0x54 */
- __IO uint32_t RES; /**< SCT conflict resolution register, offset: 0x58 */
- __IO uint32_t DMAREQ0; /**< SCT DMA request 0 register, offset: 0x5C */
- __IO uint32_t DMAREQ1; /**< SCT DMA request 1 register, offset: 0x60 */
- uint8_t RESERVED_1[140];
- __IO uint32_t EVEN; /**< SCT event interrupt enable register, offset: 0xF0 */
- __IO uint32_t EVFLAG; /**< SCT event flag register, offset: 0xF4 */
- __IO uint32_t CONEN; /**< SCT conflict interrupt enable register, offset: 0xF8 */
- __IO uint32_t CONFLAG; /**< SCT conflict flag register, offset: 0xFC */
- union { /* offset: 0x100 */
- union { /* offset: 0x100, array step: 0x4 */
- struct { /* offset: 0x100, array step: 0x4 */
- __IO uint16_t CAPL; /**< SCT_CAPL register, array offset: 0x100, array step: 0x4 */
- __IO uint16_t CAPH; /**< SCT_CAPH register, array offset: 0x102, array step: 0x4 */
- } CAP_ACCESS16BIT[16];
- __IO uint32_t CAP[16]; /**< SCT capture register of capture channel, array offset: 0x100, array step: 0x4 */
- };
- union { /* offset: 0x100, array step: 0x4 */
- struct { /* offset: 0x100, array step: 0x4 */
- __IO uint16_t MATCHL; /**< SCT_MATCHL register, array offset: 0x100, array step: 0x4 */
- __IO uint16_t MATCHH; /**< SCT_MATCHH register, array offset: 0x102, array step: 0x4 */
- } MATCH_ACCESS16BIT[16];
- __IO uint32_t MATCH[16]; /**< SCT match value register of match channels, array offset: 0x100, array step: 0x4 */
- };
- };
- uint8_t RESERVED_2[192];
- union { /* offset: 0x200 */
- union { /* offset: 0x200, array step: 0x4 */
- struct { /* offset: 0x200, array step: 0x4 */
- __IO uint16_t CAPCTRLL; /**< SCT_CAPCTRLL register, array offset: 0x200, array step: 0x4 */
- __IO uint16_t CAPCTRLH; /**< SCT_CAPCTRLH register, array offset: 0x202, array step: 0x4 */
- } CAPCTRL_ACCESS16BIT[16];
- __IO uint32_t CAPCTRL[16]; /**< SCT capture control register, array offset: 0x200, array step: 0x4 */
- };
- union { /* offset: 0x200, array step: 0x4 */
- struct { /* offset: 0x200, array step: 0x4 */
- __IO uint16_t MATCHRELL; /**< SCT_MATCHRELL register, array offset: 0x200, array step: 0x4 */
- __IO uint16_t MATCHRELH; /**< SCT_MATCHRELH register, array offset: 0x202, array step: 0x4 */
- } MATCHREL_ACCESS16BIT[16];
- __IO uint32_t MATCHREL[16]; /**< SCT match reload value register, array offset: 0x200, array step: 0x4 */
- };
- };
- uint8_t RESERVED_3[192];
- struct { /* offset: 0x300, array step: 0x8 */
- __IO uint32_t STATE; /**< SCT event state register 0, array offset: 0x300, array step: 0x8 */
- __IO uint32_t CTRL; /**< SCT event control register 0, array offset: 0x304, array step: 0x8 */
- } EV[16];
- uint8_t RESERVED_4[384];
- struct { /* offset: 0x500, array step: 0x8 */
- __IO uint32_t SET; /**< SCT output 0 set register, array offset: 0x500, array step: 0x8 */
- __IO uint32_t CLR; /**< SCT output 0 clear register, array offset: 0x504, array step: 0x8 */
- } OUT[10];
-} SCT_Type;
-
-/* ----------------------------------------------------------------------------
- -- SCT Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SCT_Register_Masks SCT Register Masks
- * @{
- */
-
-/*! @name CONFIG - SCT configuration register */
-/*! @{ */
-#define SCT_CONFIG_UNIFY_MASK (0x1U)
-#define SCT_CONFIG_UNIFY_SHIFT (0U)
-/*! UNIFY - SCT operation
- * 0b0..The SCT operates as two 16-bit counters named COUNTER_L and COUNTER_H.
- * 0b1..The SCT operates as a unified 32-bit counter.
- */
-#define SCT_CONFIG_UNIFY(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_UNIFY_SHIFT)) & SCT_CONFIG_UNIFY_MASK)
-#define SCT_CONFIG_CLKMODE_MASK (0x6U)
-#define SCT_CONFIG_CLKMODE_SHIFT (1U)
-/*! CLKMODE - SCT clock mode
- * 0b00..System Clock Mode. The system clock clocks the entire SCT module including the counter(s) and counter prescalers.
- * 0b01..Sampled System Clock Mode. The system clock clocks the SCT module, but the counter and prescalers are
- * only enabled to count when the designated edge is detected on the input selected by the CKSEL field. The
- * minimum pulse width on the selected clock-gate input is 1 bus clock period. This mode is the
- * high-performance, sampled-clock mode.
- * 0b10..SCT Input Clock Mode. The input/edge selected by the CKSEL field clocks the SCT module, including the
- * counters and prescalers, after first being synchronized to the system clock. The minimum pulse width on the
- * clock input is 1 bus clock period. This mode is the low-power, sampled-clock mode.
- * 0b11..Asynchronous Mode. The entire SCT module is clocked directly by the input/edge selected by the CKSEL
- * field. In this mode, the SCT outputs are switched synchronously to the SCT input clock - not the system
- * clock. The input clock rate must be at least half the system clock rate and can be the same or faster than
- * the system clock.
- */
-#define SCT_CONFIG_CLKMODE(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_CLKMODE_SHIFT)) & SCT_CONFIG_CLKMODE_MASK)
-#define SCT_CONFIG_CKSEL_MASK (0x78U)
-#define SCT_CONFIG_CKSEL_SHIFT (3U)
-/*! CKSEL - SCT clock select. The specific functionality of the designated input/edge is dependent
- * on the CLKMODE bit selection in this register.
- * 0b0000..Rising edges on input 0.
- * 0b0001..Falling edges on input 0.
- * 0b0010..Rising edges on input 1.
- * 0b0011..Falling edges on input 1.
- * 0b0100..Rising edges on input 2.
- * 0b0101..Falling edges on input 2.
- * 0b0110..Rising edges on input 3.
- * 0b0111..Falling edges on input 3.
- * 0b1000..Rising edges on input 4.
- * 0b1001..Falling edges on input 4.
- * 0b1010..Rising edges on input 5.
- * 0b1011..Falling edges on input 5.
- * 0b1100..Rising edges on input 6.
- * 0b1101..Falling edges on input 6.
- * 0b1110..Rising edges on input 7.
- * 0b1111..Falling edges on input 7.
- */
-#define SCT_CONFIG_CKSEL(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_CKSEL_SHIFT)) & SCT_CONFIG_CKSEL_MASK)
-#define SCT_CONFIG_NORELOAD_L_MASK (0x80U)
-#define SCT_CONFIG_NORELOAD_L_SHIFT (7U)
-/*! NORELOAD_L - A 1 in this bit prevents the lower match registers from being reloaded from their
- * respective reload registers. Setting this bit eliminates the need to write to the reload
- * registers MATCHREL if the match values are fixed. Software can write to set or clear this bit at any
- * time. This bit applies to both the higher and lower registers when the UNIFY bit is set.
- */
-#define SCT_CONFIG_NORELOAD_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_NORELOAD_L_SHIFT)) & SCT_CONFIG_NORELOAD_L_MASK)
-#define SCT_CONFIG_NORELOAD_H_MASK (0x100U)
-#define SCT_CONFIG_NORELOAD_H_SHIFT (8U)
-/*! NORELOAD_H - A 1 in this bit prevents the higher match registers from being reloaded from their
- * respective reload registers. Setting this bit eliminates the need to write to the reload
- * registers MATCHREL if the match values are fixed. Software can write to set or clear this bit at
- * any time. This bit is not used when the UNIFY bit is set.
- */
-#define SCT_CONFIG_NORELOAD_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_NORELOAD_H_SHIFT)) & SCT_CONFIG_NORELOAD_H_MASK)
-#define SCT_CONFIG_INSYNC_MASK (0x1E00U)
-#define SCT_CONFIG_INSYNC_SHIFT (9U)
-/*! INSYNC - Synchronization for input N (bit 9 = input 0, bit 10 = input 1,, bit 12 = input 3); all
- * other bits are reserved. A 1 in one of these bits subjects the corresponding input to
- * synchronization to the SCT clock, before it is used to create an event. If an input is known to
- * already be synchronous to the SCT clock, this bit may be set to 0 for faster input response. (Note:
- * The SCT clock is the system clock for CKMODEs 0-2. It is the selected, asynchronous SCT input
- * clock for CKMODE3). Note that the INSYNC field only affects inputs used for event generation.
- * It does not apply to the clock input specified in the CKSEL field.
- */
-#define SCT_CONFIG_INSYNC(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_INSYNC_SHIFT)) & SCT_CONFIG_INSYNC_MASK)
-#define SCT_CONFIG_AUTOLIMIT_L_MASK (0x20000U)
-#define SCT_CONFIG_AUTOLIMIT_L_SHIFT (17U)
-/*! AUTOLIMIT_L - A one in this bit causes a match on match register 0 to be treated as a de-facto
- * LIMIT condition without the need to define an associated event. As with any LIMIT event, this
- * automatic limit causes the counter to be cleared to zero in unidirectional mode or to change
- * the direction of count in bi-directional mode. Software can write to set or clear this bit at
- * any time. This bit applies to both the higher and lower registers when the UNIFY bit is set.
- */
-#define SCT_CONFIG_AUTOLIMIT_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_AUTOLIMIT_L_SHIFT)) & SCT_CONFIG_AUTOLIMIT_L_MASK)
-#define SCT_CONFIG_AUTOLIMIT_H_MASK (0x40000U)
-#define SCT_CONFIG_AUTOLIMIT_H_SHIFT (18U)
-/*! AUTOLIMIT_H - A one in this bit will cause a match on match register 0 to be treated as a
- * de-facto LIMIT condition without the need to define an associated event. As with any LIMIT event,
- * this automatic limit causes the counter to be cleared to zero in unidirectional mode or to
- * change the direction of count in bi-directional mode. Software can write to set or clear this bit
- * at any time. This bit is not used when the UNIFY bit is set.
- */
-#define SCT_CONFIG_AUTOLIMIT_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFIG_AUTOLIMIT_H_SHIFT)) & SCT_CONFIG_AUTOLIMIT_H_MASK)
-/*! @} */
-
-/*! @name CTRLL - SCT_CTRLL register */
-/*! @{ */
-#define SCT_CTRLL_DOWN_L_MASK (0x1U)
-#define SCT_CTRLL_DOWN_L_SHIFT (0U)
-/*! DOWN_L - This bit is 1 when the L or unified counter is counting down. Hardware sets this bit
- * when the counter is counting up, counter limit occurs, and BIDIR = 1.Hardware clears this bit
- * when the counter is counting down and a limit condition occurs or when the counter reaches 0.
- */
-#define SCT_CTRLL_DOWN_L(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLL_DOWN_L_SHIFT)) & SCT_CTRLL_DOWN_L_MASK)
-#define SCT_CTRLL_STOP_L_MASK (0x2U)
-#define SCT_CTRLL_STOP_L_SHIFT (1U)
-/*! STOP_L - When this bit is 1 and HALT is 0, the L or unified counter does not run, but I/O events
- * related to the counter can occur. If a designated start event occurs, this bit is cleared and
- * counting resumes.
- */
-#define SCT_CTRLL_STOP_L(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLL_STOP_L_SHIFT)) & SCT_CTRLL_STOP_L_MASK)
-#define SCT_CTRLL_HALT_L_MASK (0x4U)
-#define SCT_CTRLL_HALT_L_SHIFT (2U)
-/*! HALT_L - When this bit is 1, the L or unified counter does not run and no events can occur. A
- * reset sets this bit. When the HALT_L bit is one, the STOP_L bit is cleared. It is possible to
- * remove the halt condition while keeping the SCT in the stop condition (not running) with a
- * single write to this register to simultaneously clear the HALT bit and set the STOP bit. Once set,
- * only software can clear this bit to restore counter operation. This bit is set on reset.
- */
-#define SCT_CTRLL_HALT_L(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLL_HALT_L_SHIFT)) & SCT_CTRLL_HALT_L_MASK)
-#define SCT_CTRLL_CLRCTR_L_MASK (0x8U)
-#define SCT_CTRLL_CLRCTR_L_SHIFT (3U)
-/*! CLRCTR_L - Writing a 1 to this bit clears the L or unified counter. This bit always reads as 0.
- */
-#define SCT_CTRLL_CLRCTR_L(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLL_CLRCTR_L_SHIFT)) & SCT_CTRLL_CLRCTR_L_MASK)
-#define SCT_CTRLL_BIDIR_L_MASK (0x10U)
-#define SCT_CTRLL_BIDIR_L_SHIFT (4U)
-/*! BIDIR_L - L or unified counter direction select
- * 0b0..Up. The counter counts up to a limit condition, then is cleared to zero.
- * 0b1..Up-down. The counter counts up to a limit, then counts down to a limit condition or to 0.
- */
-#define SCT_CTRLL_BIDIR_L(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLL_BIDIR_L_SHIFT)) & SCT_CTRLL_BIDIR_L_MASK)
-#define SCT_CTRLL_PRE_L_MASK (0x1FE0U)
-#define SCT_CTRLL_PRE_L_SHIFT (5U)
-/*! PRE_L - Specifies the factor by which the SCT clock is prescaled to produce the L or unified
- * counter clock. The counter clock is clocked at the rate of the SCT clock divided by PRE_L+1.
- * Clear the counter (by writing a 1 to the CLRCTR bit) whenever changing the PRE value.
- */
-#define SCT_CTRLL_PRE_L(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLL_PRE_L_SHIFT)) & SCT_CTRLL_PRE_L_MASK)
-/*! @} */
-
-/*! @name CTRLH - SCT_CTRLH register */
-/*! @{ */
-#define SCT_CTRLH_DOWN_H_MASK (0x1U)
-#define SCT_CTRLH_DOWN_H_SHIFT (0U)
-/*! DOWN_H - This bit is 1 when the H counter is counting down. Hardware sets this bit when the
- * counter is counting, a counter limit condition occurs, and BIDIR is 1. Hardware clears this bit
- * when the counter is counting down and a limit condition occurs or when the counter reaches 0.
- */
-#define SCT_CTRLH_DOWN_H(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLH_DOWN_H_SHIFT)) & SCT_CTRLH_DOWN_H_MASK)
-#define SCT_CTRLH_STOP_H_MASK (0x2U)
-#define SCT_CTRLH_STOP_H_SHIFT (1U)
-/*! STOP_H - When this bit is 1 and HALT is 0, the H counter does not, run but I/O events related to
- * the counter can occur. If such an event matches the mask in the Start register, this bit is
- * cleared and counting resumes.
- */
-#define SCT_CTRLH_STOP_H(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLH_STOP_H_SHIFT)) & SCT_CTRLH_STOP_H_MASK)
-#define SCT_CTRLH_HALT_H_MASK (0x4U)
-#define SCT_CTRLH_HALT_H_SHIFT (2U)
-/*! HALT_H - When this bit is 1, the H counter does not run and no events can occur. A reset sets
- * this bit. When the HALT_H bit is one, the STOP_H bit is cleared. It is possible to remove the
- * halt condition while keeping the SCT in the stop condition (not running) with a single write to
- * this register to simultaneously clear the HALT bit and set the STOP bit. Once set, this bit
- * can only be cleared by software to restore counter operation. This bit is set on reset.
- */
-#define SCT_CTRLH_HALT_H(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLH_HALT_H_SHIFT)) & SCT_CTRLH_HALT_H_MASK)
-#define SCT_CTRLH_CLRCTR_H_MASK (0x8U)
-#define SCT_CTRLH_CLRCTR_H_SHIFT (3U)
-/*! CLRCTR_H - Writing a 1 to this bit clears the H counter. This bit always reads as 0.
- */
-#define SCT_CTRLH_CLRCTR_H(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLH_CLRCTR_H_SHIFT)) & SCT_CTRLH_CLRCTR_H_MASK)
-#define SCT_CTRLH_BIDIR_H_MASK (0x10U)
-#define SCT_CTRLH_BIDIR_H_SHIFT (4U)
-/*! BIDIR_H - Direction select
- * 0b0..The H counter counts up to its limit condition, then is cleared to zero.
- * 0b1..The H counter counts up to its limit, then counts down to a limit condition or to 0.
- */
-#define SCT_CTRLH_BIDIR_H(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLH_BIDIR_H_SHIFT)) & SCT_CTRLH_BIDIR_H_MASK)
-#define SCT_CTRLH_PRE_H_MASK (0x1FE0U)
-#define SCT_CTRLH_PRE_H_SHIFT (5U)
-/*! PRE_H - Specifies the factor by which the SCT clock is prescaled to produce the H counter clock.
- * The counter clock is clocked at the rate of the SCT clock divided by PRELH+1. Clear the
- * counter (by writing a 1 to the CLRCTR bit) whenever changing the PRE value.
- */
-#define SCT_CTRLH_PRE_H(x) (((uint16_t)(((uint16_t)(x)) << SCT_CTRLH_PRE_H_SHIFT)) & SCT_CTRLH_PRE_H_MASK)
-/*! @} */
-
-/*! @name CTRL - SCT control register */
-/*! @{ */
-#define SCT_CTRL_DOWN_L_MASK (0x1U)
-#define SCT_CTRL_DOWN_L_SHIFT (0U)
-/*! DOWN_L - This bit is 1 when the L or unified counter is counting down. Hardware sets this bit
- * when the counter is counting up, counter limit occurs, and BIDIR = 1.Hardware clears this bit
- * when the counter is counting down and a limit condition occurs or when the counter reaches 0.
- */
-#define SCT_CTRL_DOWN_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_DOWN_L_SHIFT)) & SCT_CTRL_DOWN_L_MASK)
-#define SCT_CTRL_STOP_L_MASK (0x2U)
-#define SCT_CTRL_STOP_L_SHIFT (1U)
-/*! STOP_L - When this bit is 1 and HALT is 0, the L or unified counter does not run, but I/O events
- * related to the counter can occur. If a designated start event occurs, this bit is cleared and
- * counting resumes.
- */
-#define SCT_CTRL_STOP_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_STOP_L_SHIFT)) & SCT_CTRL_STOP_L_MASK)
-#define SCT_CTRL_HALT_L_MASK (0x4U)
-#define SCT_CTRL_HALT_L_SHIFT (2U)
-/*! HALT_L - When this bit is 1, the L or unified counter does not run and no events can occur. A
- * reset sets this bit. When the HALT_L bit is one, the STOP_L bit is cleared. It is possible to
- * remove the halt condition while keeping the SCT in the stop condition (not running) with a
- * single write to this register to simultaneously clear the HALT bit and set the STOP bit. Once set,
- * only software can clear this bit to restore counter operation. This bit is set on reset.
- */
-#define SCT_CTRL_HALT_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_HALT_L_SHIFT)) & SCT_CTRL_HALT_L_MASK)
-#define SCT_CTRL_CLRCTR_L_MASK (0x8U)
-#define SCT_CTRL_CLRCTR_L_SHIFT (3U)
-/*! CLRCTR_L - Writing a 1 to this bit clears the L or unified counter. This bit always reads as 0.
- */
-#define SCT_CTRL_CLRCTR_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_CLRCTR_L_SHIFT)) & SCT_CTRL_CLRCTR_L_MASK)
-#define SCT_CTRL_BIDIR_L_MASK (0x10U)
-#define SCT_CTRL_BIDIR_L_SHIFT (4U)
-/*! BIDIR_L - L or unified counter direction select
- * 0b0..Up. The counter counts up to a limit condition, then is cleared to zero.
- * 0b1..Up-down. The counter counts up to a limit, then counts down to a limit condition or to 0.
- */
-#define SCT_CTRL_BIDIR_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_BIDIR_L_SHIFT)) & SCT_CTRL_BIDIR_L_MASK)
-#define SCT_CTRL_PRE_L_MASK (0x1FE0U)
-#define SCT_CTRL_PRE_L_SHIFT (5U)
-/*! PRE_L - Specifies the factor by which the SCT clock is prescaled to produce the L or unified
- * counter clock. The counter clock is clocked at the rate of the SCT clock divided by PRE_L+1.
- * Clear the counter (by writing a 1 to the CLRCTR bit) whenever changing the PRE value.
- */
-#define SCT_CTRL_PRE_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_PRE_L_SHIFT)) & SCT_CTRL_PRE_L_MASK)
-#define SCT_CTRL_DOWN_H_MASK (0x10000U)
-#define SCT_CTRL_DOWN_H_SHIFT (16U)
-/*! DOWN_H - This bit is 1 when the H counter is counting down. Hardware sets this bit when the
- * counter is counting, a counter limit condition occurs, and BIDIR is 1. Hardware clears this bit
- * when the counter is counting down and a limit condition occurs or when the counter reaches 0.
- */
-#define SCT_CTRL_DOWN_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_DOWN_H_SHIFT)) & SCT_CTRL_DOWN_H_MASK)
-#define SCT_CTRL_STOP_H_MASK (0x20000U)
-#define SCT_CTRL_STOP_H_SHIFT (17U)
-/*! STOP_H - When this bit is 1 and HALT is 0, the H counter does not, run but I/O events related to
- * the counter can occur. If such an event matches the mask in the Start register, this bit is
- * cleared and counting resumes.
- */
-#define SCT_CTRL_STOP_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_STOP_H_SHIFT)) & SCT_CTRL_STOP_H_MASK)
-#define SCT_CTRL_HALT_H_MASK (0x40000U)
-#define SCT_CTRL_HALT_H_SHIFT (18U)
-/*! HALT_H - When this bit is 1, the H counter does not run and no events can occur. A reset sets
- * this bit. When the HALT_H bit is one, the STOP_H bit is cleared. It is possible to remove the
- * halt condition while keeping the SCT in the stop condition (not running) with a single write to
- * this register to simultaneously clear the HALT bit and set the STOP bit. Once set, this bit
- * can only be cleared by software to restore counter operation. This bit is set on reset.
- */
-#define SCT_CTRL_HALT_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_HALT_H_SHIFT)) & SCT_CTRL_HALT_H_MASK)
-#define SCT_CTRL_CLRCTR_H_MASK (0x80000U)
-#define SCT_CTRL_CLRCTR_H_SHIFT (19U)
-/*! CLRCTR_H - Writing a 1 to this bit clears the H counter. This bit always reads as 0.
- */
-#define SCT_CTRL_CLRCTR_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_CLRCTR_H_SHIFT)) & SCT_CTRL_CLRCTR_H_MASK)
-#define SCT_CTRL_BIDIR_H_MASK (0x100000U)
-#define SCT_CTRL_BIDIR_H_SHIFT (20U)
-/*! BIDIR_H - Direction select
- * 0b0..The H counter counts up to its limit condition, then is cleared to zero.
- * 0b1..The H counter counts up to its limit, then counts down to a limit condition or to 0.
- */
-#define SCT_CTRL_BIDIR_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_BIDIR_H_SHIFT)) & SCT_CTRL_BIDIR_H_MASK)
-#define SCT_CTRL_PRE_H_MASK (0x1FE00000U)
-#define SCT_CTRL_PRE_H_SHIFT (21U)
-/*! PRE_H - Specifies the factor by which the SCT clock is prescaled to produce the H counter clock.
- * The counter clock is clocked at the rate of the SCT clock divided by PRELH+1. Clear the
- * counter (by writing a 1 to the CLRCTR bit) whenever changing the PRE value.
- */
-#define SCT_CTRL_PRE_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CTRL_PRE_H_SHIFT)) & SCT_CTRL_PRE_H_MASK)
-/*! @} */
-
-/*! @name LIMITL - SCT_LIMITL register */
-/*! @{ */
-#define SCT_LIMITL_LIMITL_MASK (0xFFFFU)
-#define SCT_LIMITL_LIMITL_SHIFT (0U)
-#define SCT_LIMITL_LIMITL(x) (((uint16_t)(((uint16_t)(x)) << SCT_LIMITL_LIMITL_SHIFT)) & SCT_LIMITL_LIMITL_MASK)
-/*! @} */
-
-/*! @name LIMITH - SCT_LIMITH register */
-/*! @{ */
-#define SCT_LIMITH_LIMITH_MASK (0xFFFFU)
-#define SCT_LIMITH_LIMITH_SHIFT (0U)
-#define SCT_LIMITH_LIMITH(x) (((uint16_t)(((uint16_t)(x)) << SCT_LIMITH_LIMITH_SHIFT)) & SCT_LIMITH_LIMITH_MASK)
-/*! @} */
-
-/*! @name LIMIT - SCT limit event select register */
-/*! @{ */
-#define SCT_LIMIT_LIMMSK_L_MASK (0xFFFFU)
-#define SCT_LIMIT_LIMMSK_L_SHIFT (0U)
-/*! LIMMSK_L - If bit n is one, event n is used as a counter limit for the L or unified counter
- * (event 0 = bit 0, event 1 = bit 1, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_LIMIT_LIMMSK_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_LIMIT_LIMMSK_L_SHIFT)) & SCT_LIMIT_LIMMSK_L_MASK)
-#define SCT_LIMIT_LIMMSK_H_MASK (0xFFFF0000U)
-#define SCT_LIMIT_LIMMSK_H_SHIFT (16U)
-/*! LIMMSK_H - If bit n is one, event n is used as a counter limit for the H counter (event 0 = bit
- * 16, event 1 = bit 17, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_LIMIT_LIMMSK_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_LIMIT_LIMMSK_H_SHIFT)) & SCT_LIMIT_LIMMSK_H_MASK)
-/*! @} */
-
-/*! @name HALTL - SCT_HALTL register */
-/*! @{ */
-#define SCT_HALTL_HALTL_MASK (0xFFFFU)
-#define SCT_HALTL_HALTL_SHIFT (0U)
-#define SCT_HALTL_HALTL(x) (((uint16_t)(((uint16_t)(x)) << SCT_HALTL_HALTL_SHIFT)) & SCT_HALTL_HALTL_MASK)
-/*! @} */
-
-/*! @name HALTH - SCT_HALTH register */
-/*! @{ */
-#define SCT_HALTH_HALTH_MASK (0xFFFFU)
-#define SCT_HALTH_HALTH_SHIFT (0U)
-#define SCT_HALTH_HALTH(x) (((uint16_t)(((uint16_t)(x)) << SCT_HALTH_HALTH_SHIFT)) & SCT_HALTH_HALTH_MASK)
-/*! @} */
-
-/*! @name HALT - SCT halt event select register */
-/*! @{ */
-#define SCT_HALT_HALTMSK_L_MASK (0xFFFFU)
-#define SCT_HALT_HALTMSK_L_SHIFT (0U)
-/*! HALTMSK_L - If bit n is one, event n sets the HALT_L bit in the CTRL register (event 0 = bit 0,
- * event 1 = bit 1, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_HALT_HALTMSK_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_HALT_HALTMSK_L_SHIFT)) & SCT_HALT_HALTMSK_L_MASK)
-#define SCT_HALT_HALTMSK_H_MASK (0xFFFF0000U)
-#define SCT_HALT_HALTMSK_H_SHIFT (16U)
-/*! HALTMSK_H - If bit n is one, event n sets the HALT_H bit in the CTRL register (event 0 = bit 16,
- * event 1 = bit 17, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_HALT_HALTMSK_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_HALT_HALTMSK_H_SHIFT)) & SCT_HALT_HALTMSK_H_MASK)
-/*! @} */
-
-/*! @name STOPL - SCT_STOPL register */
-/*! @{ */
-#define SCT_STOPL_STOPL_MASK (0xFFFFU)
-#define SCT_STOPL_STOPL_SHIFT (0U)
-#define SCT_STOPL_STOPL(x) (((uint16_t)(((uint16_t)(x)) << SCT_STOPL_STOPL_SHIFT)) & SCT_STOPL_STOPL_MASK)
-/*! @} */
-
-/*! @name STOPH - SCT_STOPH register */
-/*! @{ */
-#define SCT_STOPH_STOPH_MASK (0xFFFFU)
-#define SCT_STOPH_STOPH_SHIFT (0U)
-#define SCT_STOPH_STOPH(x) (((uint16_t)(((uint16_t)(x)) << SCT_STOPH_STOPH_SHIFT)) & SCT_STOPH_STOPH_MASK)
-/*! @} */
-
-/*! @name STOP - SCT stop event select register */
-/*! @{ */
-#define SCT_STOP_STOPMSK_L_MASK (0xFFFFU)
-#define SCT_STOP_STOPMSK_L_SHIFT (0U)
-/*! STOPMSK_L - If bit n is one, event n sets the STOP_L bit in the CTRL register (event 0 = bit 0,
- * event 1 = bit 1, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_STOP_STOPMSK_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_STOP_STOPMSK_L_SHIFT)) & SCT_STOP_STOPMSK_L_MASK)
-#define SCT_STOP_STOPMSK_H_MASK (0xFFFF0000U)
-#define SCT_STOP_STOPMSK_H_SHIFT (16U)
-/*! STOPMSK_H - If bit n is one, event n sets the STOP_H bit in the CTRL register (event 0 = bit 16,
- * event 1 = bit 17, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_STOP_STOPMSK_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_STOP_STOPMSK_H_SHIFT)) & SCT_STOP_STOPMSK_H_MASK)
-/*! @} */
-
-/*! @name STARTL - SCT_STARTL register */
-/*! @{ */
-#define SCT_STARTL_STARTL_MASK (0xFFFFU)
-#define SCT_STARTL_STARTL_SHIFT (0U)
-#define SCT_STARTL_STARTL(x) (((uint16_t)(((uint16_t)(x)) << SCT_STARTL_STARTL_SHIFT)) & SCT_STARTL_STARTL_MASK)
-/*! @} */
-
-/*! @name STARTH - SCT_STARTH register */
-/*! @{ */
-#define SCT_STARTH_STARTH_MASK (0xFFFFU)
-#define SCT_STARTH_STARTH_SHIFT (0U)
-#define SCT_STARTH_STARTH(x) (((uint16_t)(((uint16_t)(x)) << SCT_STARTH_STARTH_SHIFT)) & SCT_STARTH_STARTH_MASK)
-/*! @} */
-
-/*! @name START - SCT start event select register */
-/*! @{ */
-#define SCT_START_STARTMSK_L_MASK (0xFFFFU)
-#define SCT_START_STARTMSK_L_SHIFT (0U)
-/*! STARTMSK_L - If bit n is one, event n clears the STOP_L bit in the CTRL register (event 0 = bit
- * 0, event 1 = bit 1, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_START_STARTMSK_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_START_STARTMSK_L_SHIFT)) & SCT_START_STARTMSK_L_MASK)
-#define SCT_START_STARTMSK_H_MASK (0xFFFF0000U)
-#define SCT_START_STARTMSK_H_SHIFT (16U)
-/*! STARTMSK_H - If bit n is one, event n clears the STOP_H bit in the CTRL register (event 0 = bit
- * 16, event 1 = bit 17, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_START_STARTMSK_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_START_STARTMSK_H_SHIFT)) & SCT_START_STARTMSK_H_MASK)
-/*! @} */
-
-/*! @name COUNTL - SCT_COUNTL register */
-/*! @{ */
-#define SCT_COUNTL_COUNTL_MASK (0xFFFFU)
-#define SCT_COUNTL_COUNTL_SHIFT (0U)
-#define SCT_COUNTL_COUNTL(x) (((uint16_t)(((uint16_t)(x)) << SCT_COUNTL_COUNTL_SHIFT)) & SCT_COUNTL_COUNTL_MASK)
-/*! @} */
-
-/*! @name COUNTH - SCT_COUNTH register */
-/*! @{ */
-#define SCT_COUNTH_COUNTH_MASK (0xFFFFU)
-#define SCT_COUNTH_COUNTH_SHIFT (0U)
-#define SCT_COUNTH_COUNTH(x) (((uint16_t)(((uint16_t)(x)) << SCT_COUNTH_COUNTH_SHIFT)) & SCT_COUNTH_COUNTH_MASK)
-/*! @} */
-
-/*! @name COUNT - SCT counter register */
-/*! @{ */
-#define SCT_COUNT_CTR_L_MASK (0xFFFFU)
-#define SCT_COUNT_CTR_L_SHIFT (0U)
-/*! CTR_L - When UNIFY = 0, read or write the 16-bit L counter value. When UNIFY = 1, read or write
- * the lower 16 bits of the 32-bit unified counter.
- */
-#define SCT_COUNT_CTR_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_COUNT_CTR_L_SHIFT)) & SCT_COUNT_CTR_L_MASK)
-#define SCT_COUNT_CTR_H_MASK (0xFFFF0000U)
-#define SCT_COUNT_CTR_H_SHIFT (16U)
-/*! CTR_H - When UNIFY = 0, read or write the 16-bit H counter value. When UNIFY = 1, read or write
- * the upper 16 bits of the 32-bit unified counter.
- */
-#define SCT_COUNT_CTR_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_COUNT_CTR_H_SHIFT)) & SCT_COUNT_CTR_H_MASK)
-/*! @} */
-
-/*! @name STATEL - SCT_STATEL register */
-/*! @{ */
-#define SCT_STATEL_STATEL_MASK (0xFFFFU)
-#define SCT_STATEL_STATEL_SHIFT (0U)
-#define SCT_STATEL_STATEL(x) (((uint16_t)(((uint16_t)(x)) << SCT_STATEL_STATEL_SHIFT)) & SCT_STATEL_STATEL_MASK)
-/*! @} */
-
-/*! @name STATEH - SCT_STATEH register */
-/*! @{ */
-#define SCT_STATEH_STATEH_MASK (0xFFFFU)
-#define SCT_STATEH_STATEH_SHIFT (0U)
-#define SCT_STATEH_STATEH(x) (((uint16_t)(((uint16_t)(x)) << SCT_STATEH_STATEH_SHIFT)) & SCT_STATEH_STATEH_MASK)
-/*! @} */
-
-/*! @name STATE - SCT state register */
-/*! @{ */
-#define SCT_STATE_STATE_L_MASK (0x1FU)
-#define SCT_STATE_STATE_L_SHIFT (0U)
-/*! STATE_L - State variable.
- */
-#define SCT_STATE_STATE_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_STATE_STATE_L_SHIFT)) & SCT_STATE_STATE_L_MASK)
-#define SCT_STATE_STATE_H_MASK (0x1F0000U)
-#define SCT_STATE_STATE_H_SHIFT (16U)
-/*! STATE_H - State variable.
- */
-#define SCT_STATE_STATE_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_STATE_STATE_H_SHIFT)) & SCT_STATE_STATE_H_MASK)
-/*! @} */
-
-/*! @name INPUT - SCT input register */
-/*! @{ */
-#define SCT_INPUT_AIN0_MASK (0x1U)
-#define SCT_INPUT_AIN0_SHIFT (0U)
-/*! AIN0 - Input 0 state. Input 0 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN0(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN0_SHIFT)) & SCT_INPUT_AIN0_MASK)
-#define SCT_INPUT_AIN1_MASK (0x2U)
-#define SCT_INPUT_AIN1_SHIFT (1U)
-/*! AIN1 - Input 1 state. Input 1 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN1(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN1_SHIFT)) & SCT_INPUT_AIN1_MASK)
-#define SCT_INPUT_AIN2_MASK (0x4U)
-#define SCT_INPUT_AIN2_SHIFT (2U)
-/*! AIN2 - Input 2 state. Input 2 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN2(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN2_SHIFT)) & SCT_INPUT_AIN2_MASK)
-#define SCT_INPUT_AIN3_MASK (0x8U)
-#define SCT_INPUT_AIN3_SHIFT (3U)
-/*! AIN3 - Input 3 state. Input 3 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN3(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN3_SHIFT)) & SCT_INPUT_AIN3_MASK)
-#define SCT_INPUT_AIN4_MASK (0x10U)
-#define SCT_INPUT_AIN4_SHIFT (4U)
-/*! AIN4 - Input 4 state. Input 4 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN4(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN4_SHIFT)) & SCT_INPUT_AIN4_MASK)
-#define SCT_INPUT_AIN5_MASK (0x20U)
-#define SCT_INPUT_AIN5_SHIFT (5U)
-/*! AIN5 - Input 5 state. Input 5 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN5(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN5_SHIFT)) & SCT_INPUT_AIN5_MASK)
-#define SCT_INPUT_AIN6_MASK (0x40U)
-#define SCT_INPUT_AIN6_SHIFT (6U)
-/*! AIN6 - Input 6 state. Input 6 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN6(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN6_SHIFT)) & SCT_INPUT_AIN6_MASK)
-#define SCT_INPUT_AIN7_MASK (0x80U)
-#define SCT_INPUT_AIN7_SHIFT (7U)
-/*! AIN7 - Input 7 state. Input 7 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN7(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN7_SHIFT)) & SCT_INPUT_AIN7_MASK)
-#define SCT_INPUT_AIN8_MASK (0x100U)
-#define SCT_INPUT_AIN8_SHIFT (8U)
-/*! AIN8 - Input 8 state. Input 8 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN8(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN8_SHIFT)) & SCT_INPUT_AIN8_MASK)
-#define SCT_INPUT_AIN9_MASK (0x200U)
-#define SCT_INPUT_AIN9_SHIFT (9U)
-/*! AIN9 - Input 9 state. Input 9 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN9(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN9_SHIFT)) & SCT_INPUT_AIN9_MASK)
-#define SCT_INPUT_AIN10_MASK (0x400U)
-#define SCT_INPUT_AIN10_SHIFT (10U)
-/*! AIN10 - Input 10 state. Input 10 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN10(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN10_SHIFT)) & SCT_INPUT_AIN10_MASK)
-#define SCT_INPUT_AIN11_MASK (0x800U)
-#define SCT_INPUT_AIN11_SHIFT (11U)
-/*! AIN11 - Input 11 state. Input 11 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN11(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN11_SHIFT)) & SCT_INPUT_AIN11_MASK)
-#define SCT_INPUT_AIN12_MASK (0x1000U)
-#define SCT_INPUT_AIN12_SHIFT (12U)
-/*! AIN12 - Input 12 state. Input 12 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN12(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN12_SHIFT)) & SCT_INPUT_AIN12_MASK)
-#define SCT_INPUT_AIN13_MASK (0x2000U)
-#define SCT_INPUT_AIN13_SHIFT (13U)
-/*! AIN13 - Input 13 state. Input 13 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN13(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN13_SHIFT)) & SCT_INPUT_AIN13_MASK)
-#define SCT_INPUT_AIN14_MASK (0x4000U)
-#define SCT_INPUT_AIN14_SHIFT (14U)
-/*! AIN14 - Input 14 state. Input 14 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN14(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN14_SHIFT)) & SCT_INPUT_AIN14_MASK)
-#define SCT_INPUT_AIN15_MASK (0x8000U)
-#define SCT_INPUT_AIN15_SHIFT (15U)
-/*! AIN15 - Input 15 state. Input 15 state on the last SCT clock edge.
- */
-#define SCT_INPUT_AIN15(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_AIN15_SHIFT)) & SCT_INPUT_AIN15_MASK)
-#define SCT_INPUT_SIN0_MASK (0x10000U)
-#define SCT_INPUT_SIN0_SHIFT (16U)
-/*! SIN0 - Input 0 state. Input 0 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN0(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN0_SHIFT)) & SCT_INPUT_SIN0_MASK)
-#define SCT_INPUT_SIN1_MASK (0x20000U)
-#define SCT_INPUT_SIN1_SHIFT (17U)
-/*! SIN1 - Input 1 state. Input 1 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN1(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN1_SHIFT)) & SCT_INPUT_SIN1_MASK)
-#define SCT_INPUT_SIN2_MASK (0x40000U)
-#define SCT_INPUT_SIN2_SHIFT (18U)
-/*! SIN2 - Input 2 state. Input 2 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN2(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN2_SHIFT)) & SCT_INPUT_SIN2_MASK)
-#define SCT_INPUT_SIN3_MASK (0x80000U)
-#define SCT_INPUT_SIN3_SHIFT (19U)
-/*! SIN3 - Input 3 state. Input 3 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN3(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN3_SHIFT)) & SCT_INPUT_SIN3_MASK)
-#define SCT_INPUT_SIN4_MASK (0x100000U)
-#define SCT_INPUT_SIN4_SHIFT (20U)
-/*! SIN4 - Input 4 state. Input 4 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN4(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN4_SHIFT)) & SCT_INPUT_SIN4_MASK)
-#define SCT_INPUT_SIN5_MASK (0x200000U)
-#define SCT_INPUT_SIN5_SHIFT (21U)
-/*! SIN5 - Input 5 state. Input 5 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN5(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN5_SHIFT)) & SCT_INPUT_SIN5_MASK)
-#define SCT_INPUT_SIN6_MASK (0x400000U)
-#define SCT_INPUT_SIN6_SHIFT (22U)
-/*! SIN6 - Input 6 state. Input 6 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN6(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN6_SHIFT)) & SCT_INPUT_SIN6_MASK)
-#define SCT_INPUT_SIN7_MASK (0x800000U)
-#define SCT_INPUT_SIN7_SHIFT (23U)
-/*! SIN7 - Input 7 state. Input 7 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN7(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN7_SHIFT)) & SCT_INPUT_SIN7_MASK)
-#define SCT_INPUT_SIN8_MASK (0x1000000U)
-#define SCT_INPUT_SIN8_SHIFT (24U)
-/*! SIN8 - Input 8 state. Input 8 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN8(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN8_SHIFT)) & SCT_INPUT_SIN8_MASK)
-#define SCT_INPUT_SIN9_MASK (0x2000000U)
-#define SCT_INPUT_SIN9_SHIFT (25U)
-/*! SIN9 - Input 9 state. Input 9 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN9(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN9_SHIFT)) & SCT_INPUT_SIN9_MASK)
-#define SCT_INPUT_SIN10_MASK (0x4000000U)
-#define SCT_INPUT_SIN10_SHIFT (26U)
-/*! SIN10 - Input 10 state. Input 10 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN10(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN10_SHIFT)) & SCT_INPUT_SIN10_MASK)
-#define SCT_INPUT_SIN11_MASK (0x8000000U)
-#define SCT_INPUT_SIN11_SHIFT (27U)
-/*! SIN11 - Input 11 state. Input 11 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN11(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN11_SHIFT)) & SCT_INPUT_SIN11_MASK)
-#define SCT_INPUT_SIN12_MASK (0x10000000U)
-#define SCT_INPUT_SIN12_SHIFT (28U)
-/*! SIN12 - Input 12 state. Input 12 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN12(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN12_SHIFT)) & SCT_INPUT_SIN12_MASK)
-#define SCT_INPUT_SIN13_MASK (0x20000000U)
-#define SCT_INPUT_SIN13_SHIFT (29U)
-/*! SIN13 - Input 13 state. Input 13 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN13(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN13_SHIFT)) & SCT_INPUT_SIN13_MASK)
-#define SCT_INPUT_SIN14_MASK (0x40000000U)
-#define SCT_INPUT_SIN14_SHIFT (30U)
-/*! SIN14 - Input 14 state. Input 14 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN14(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN14_SHIFT)) & SCT_INPUT_SIN14_MASK)
-#define SCT_INPUT_SIN15_MASK (0x80000000U)
-#define SCT_INPUT_SIN15_SHIFT (31U)
-/*! SIN15 - Input 15 state. Input 15 state following the synchronization specified by INSYNC.
- */
-#define SCT_INPUT_SIN15(x) (((uint32_t)(((uint32_t)(x)) << SCT_INPUT_SIN15_SHIFT)) & SCT_INPUT_SIN15_MASK)
-/*! @} */
-
-/*! @name REGMODEL - SCT_REGMODEL register */
-/*! @{ */
-#define SCT_REGMODEL_REGMODEL_MASK (0xFFFFU)
-#define SCT_REGMODEL_REGMODEL_SHIFT (0U)
-#define SCT_REGMODEL_REGMODEL(x) (((uint16_t)(((uint16_t)(x)) << SCT_REGMODEL_REGMODEL_SHIFT)) & SCT_REGMODEL_REGMODEL_MASK)
-/*! @} */
-
-/*! @name REGMODEH - SCT_REGMODEH register */
-/*! @{ */
-#define SCT_REGMODEH_REGMODEH_MASK (0xFFFFU)
-#define SCT_REGMODEH_REGMODEH_SHIFT (0U)
-#define SCT_REGMODEH_REGMODEH(x) (((uint16_t)(((uint16_t)(x)) << SCT_REGMODEH_REGMODEH_SHIFT)) & SCT_REGMODEH_REGMODEH_MASK)
-/*! @} */
-
-/*! @name REGMODE - SCT match/capture mode register */
-/*! @{ */
-#define SCT_REGMODE_REGMOD_L_MASK (0xFFFFU)
-#define SCT_REGMODE_REGMOD_L_SHIFT (0U)
-/*! REGMOD_L - Each bit controls one match/capture register (register 0 = bit 0, register 1 = bit 1,
- * etc.). The number of bits = number of match/captures in this SCT. 0 = register operates as
- * match register. 1 = register operates as capture register.
- */
-#define SCT_REGMODE_REGMOD_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_REGMODE_REGMOD_L_SHIFT)) & SCT_REGMODE_REGMOD_L_MASK)
-#define SCT_REGMODE_REGMOD_H_MASK (0xFFFF0000U)
-#define SCT_REGMODE_REGMOD_H_SHIFT (16U)
-/*! REGMOD_H - Each bit controls one match/capture register (register 0 = bit 16, register 1 = bit
- * 17, etc.). The number of bits = number of match/captures in this SCT. 0 = register operates as
- * match registers. 1 = register operates as capture registers.
- */
-#define SCT_REGMODE_REGMOD_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_REGMODE_REGMOD_H_SHIFT)) & SCT_REGMODE_REGMOD_H_MASK)
-/*! @} */
-
-/*! @name OUTPUT - SCT output register */
-/*! @{ */
-#define SCT_OUTPUT_OUT_MASK (0xFFFFU)
-#define SCT_OUTPUT_OUT_SHIFT (0U)
-/*! OUT - Writing a 1 to bit n forces the corresponding output HIGH. Writing a 0 forces the
- * corresponding output LOW (output 0 = bit 0, output 1 = bit 1, etc.). The number of bits = number of
- * outputs in this SCT.
- */
-#define SCT_OUTPUT_OUT(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUT_OUT_SHIFT)) & SCT_OUTPUT_OUT_MASK)
-/*! @} */
-
-/*! @name OUTPUTDIRCTRL - SCT output counter direction control register */
-/*! @{ */
-#define SCT_OUTPUTDIRCTRL_SETCLR0_MASK (0x3U)
-#define SCT_OUTPUTDIRCTRL_SETCLR0_SHIFT (0U)
-/*! SETCLR0 - Set/clear operation on output 0. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR0(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR0_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR0_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR1_MASK (0xCU)
-#define SCT_OUTPUTDIRCTRL_SETCLR1_SHIFT (2U)
-/*! SETCLR1 - Set/clear operation on output 1. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR1(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR1_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR1_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR2_MASK (0x30U)
-#define SCT_OUTPUTDIRCTRL_SETCLR2_SHIFT (4U)
-/*! SETCLR2 - Set/clear operation on output 2. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR2(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR2_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR2_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR3_MASK (0xC0U)
-#define SCT_OUTPUTDIRCTRL_SETCLR3_SHIFT (6U)
-/*! SETCLR3 - Set/clear operation on output 3. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR3(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR3_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR3_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR4_MASK (0x300U)
-#define SCT_OUTPUTDIRCTRL_SETCLR4_SHIFT (8U)
-/*! SETCLR4 - Set/clear operation on output 4. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR4(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR4_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR4_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR5_MASK (0xC00U)
-#define SCT_OUTPUTDIRCTRL_SETCLR5_SHIFT (10U)
-/*! SETCLR5 - Set/clear operation on output 5. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR5(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR5_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR5_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR6_MASK (0x3000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR6_SHIFT (12U)
-/*! SETCLR6 - Set/clear operation on output 6. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR6(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR6_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR6_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR7_MASK (0xC000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR7_SHIFT (14U)
-/*! SETCLR7 - Set/clear operation on output 7. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR7(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR7_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR7_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR8_MASK (0x30000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR8_SHIFT (16U)
-/*! SETCLR8 - Set/clear operation on output 8. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR8(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR8_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR8_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR9_MASK (0xC0000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR9_SHIFT (18U)
-/*! SETCLR9 - Set/clear operation on output 9. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR9(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR9_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR9_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR10_MASK (0x300000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR10_SHIFT (20U)
-/*! SETCLR10 - Set/clear operation on output 10. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR10(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR10_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR10_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR11_MASK (0xC00000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR11_SHIFT (22U)
-/*! SETCLR11 - Set/clear operation on output 11. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR11(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR11_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR11_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR12_MASK (0x3000000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR12_SHIFT (24U)
-/*! SETCLR12 - Set/clear operation on output 12. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR12(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR12_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR12_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR13_MASK (0xC000000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR13_SHIFT (26U)
-/*! SETCLR13 - Set/clear operation on output 13. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR13(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR13_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR13_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR14_MASK (0x30000000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR14_SHIFT (28U)
-/*! SETCLR14 - Set/clear operation on output 14. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR14(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR14_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR14_MASK)
-#define SCT_OUTPUTDIRCTRL_SETCLR15_MASK (0xC0000000U)
-#define SCT_OUTPUTDIRCTRL_SETCLR15_SHIFT (30U)
-/*! SETCLR15 - Set/clear operation on output 15. Value 0x3 is reserved. Do not program this value.
- * 0b00..Set and clear do not depend on the direction of any counter.
- * 0b01..Set and clear are reversed when counter L or the unified counter is counting down.
- * 0b10..Set and clear are reversed when counter H is counting down. Do not use if UNIFY = 1.
- */
-#define SCT_OUTPUTDIRCTRL_SETCLR15(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUTPUTDIRCTRL_SETCLR15_SHIFT)) & SCT_OUTPUTDIRCTRL_SETCLR15_MASK)
-/*! @} */
-
-/*! @name RES - SCT conflict resolution register */
-/*! @{ */
-#define SCT_RES_O0RES_MASK (0x3U)
-#define SCT_RES_O0RES_SHIFT (0U)
-/*! O0RES - Effect of simultaneous set and clear on output 0.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR0 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR0 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O0RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O0RES_SHIFT)) & SCT_RES_O0RES_MASK)
-#define SCT_RES_O1RES_MASK (0xCU)
-#define SCT_RES_O1RES_SHIFT (2U)
-/*! O1RES - Effect of simultaneous set and clear on output 1.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR1 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR1 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O1RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O1RES_SHIFT)) & SCT_RES_O1RES_MASK)
-#define SCT_RES_O2RES_MASK (0x30U)
-#define SCT_RES_O2RES_SHIFT (4U)
-/*! O2RES - Effect of simultaneous set and clear on output 2.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR2 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output n (or set based on the SETCLR2 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O2RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O2RES_SHIFT)) & SCT_RES_O2RES_MASK)
-#define SCT_RES_O3RES_MASK (0xC0U)
-#define SCT_RES_O3RES_SHIFT (6U)
-/*! O3RES - Effect of simultaneous set and clear on output 3.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR3 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR3 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O3RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O3RES_SHIFT)) & SCT_RES_O3RES_MASK)
-#define SCT_RES_O4RES_MASK (0x300U)
-#define SCT_RES_O4RES_SHIFT (8U)
-/*! O4RES - Effect of simultaneous set and clear on output 4.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR4 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR4 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O4RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O4RES_SHIFT)) & SCT_RES_O4RES_MASK)
-#define SCT_RES_O5RES_MASK (0xC00U)
-#define SCT_RES_O5RES_SHIFT (10U)
-/*! O5RES - Effect of simultaneous set and clear on output 5.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR5 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR5 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O5RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O5RES_SHIFT)) & SCT_RES_O5RES_MASK)
-#define SCT_RES_O6RES_MASK (0x3000U)
-#define SCT_RES_O6RES_SHIFT (12U)
-/*! O6RES - Effect of simultaneous set and clear on output 6.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR6 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR6 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O6RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O6RES_SHIFT)) & SCT_RES_O6RES_MASK)
-#define SCT_RES_O7RES_MASK (0xC000U)
-#define SCT_RES_O7RES_SHIFT (14U)
-/*! O7RES - Effect of simultaneous set and clear on output 7.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR7 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output n (or set based on the SETCLR7 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O7RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O7RES_SHIFT)) & SCT_RES_O7RES_MASK)
-#define SCT_RES_O8RES_MASK (0x30000U)
-#define SCT_RES_O8RES_SHIFT (16U)
-/*! O8RES - Effect of simultaneous set and clear on output 8.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR8 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR8 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O8RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O8RES_SHIFT)) & SCT_RES_O8RES_MASK)
-#define SCT_RES_O9RES_MASK (0xC0000U)
-#define SCT_RES_O9RES_SHIFT (18U)
-/*! O9RES - Effect of simultaneous set and clear on output 9.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR9 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR9 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O9RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O9RES_SHIFT)) & SCT_RES_O9RES_MASK)
-#define SCT_RES_O10RES_MASK (0x300000U)
-#define SCT_RES_O10RES_SHIFT (20U)
-/*! O10RES - Effect of simultaneous set and clear on output 10.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR10 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR10 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O10RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O10RES_SHIFT)) & SCT_RES_O10RES_MASK)
-#define SCT_RES_O11RES_MASK (0xC00000U)
-#define SCT_RES_O11RES_SHIFT (22U)
-/*! O11RES - Effect of simultaneous set and clear on output 11.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR11 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR11 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O11RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O11RES_SHIFT)) & SCT_RES_O11RES_MASK)
-#define SCT_RES_O12RES_MASK (0x3000000U)
-#define SCT_RES_O12RES_SHIFT (24U)
-/*! O12RES - Effect of simultaneous set and clear on output 12.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR12 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR12 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O12RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O12RES_SHIFT)) & SCT_RES_O12RES_MASK)
-#define SCT_RES_O13RES_MASK (0xC000000U)
-#define SCT_RES_O13RES_SHIFT (26U)
-/*! O13RES - Effect of simultaneous set and clear on output 13.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR13 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR13 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O13RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O13RES_SHIFT)) & SCT_RES_O13RES_MASK)
-#define SCT_RES_O14RES_MASK (0x30000000U)
-#define SCT_RES_O14RES_SHIFT (28U)
-/*! O14RES - Effect of simultaneous set and clear on output 14.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR14 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR14 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O14RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O14RES_SHIFT)) & SCT_RES_O14RES_MASK)
-#define SCT_RES_O15RES_MASK (0xC0000000U)
-#define SCT_RES_O15RES_SHIFT (30U)
-/*! O15RES - Effect of simultaneous set and clear on output 15.
- * 0b00..No change.
- * 0b01..Set output (or clear based on the SETCLR15 field in the OUTPUTDIRCTRL register).
- * 0b10..Clear output (or set based on the SETCLR15 field).
- * 0b11..Toggle output.
- */
-#define SCT_RES_O15RES(x) (((uint32_t)(((uint32_t)(x)) << SCT_RES_O15RES_SHIFT)) & SCT_RES_O15RES_MASK)
-/*! @} */
-
-/*! @name DMAREQ0 - SCT DMA request 0 register */
-/*! @{ */
-#define SCT_DMAREQ0_DEV_0_MASK (0xFFFFU)
-#define SCT_DMAREQ0_DEV_0_SHIFT (0U)
-/*! DEV_0 - If bit n is one, event n triggers DMA request 0 (event 0 = bit 0, event 1 = bit 1,
- * etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_DMAREQ0_DEV_0(x) (((uint32_t)(((uint32_t)(x)) << SCT_DMAREQ0_DEV_0_SHIFT)) & SCT_DMAREQ0_DEV_0_MASK)
-#define SCT_DMAREQ0_DRL0_MASK (0x40000000U)
-#define SCT_DMAREQ0_DRL0_SHIFT (30U)
-/*! DRL0 - A 1 in this bit triggers DMA request 0 when it loads the MATCH_L/Unified registers from the RELOAD_L/Unified registers.
- */
-#define SCT_DMAREQ0_DRL0(x) (((uint32_t)(((uint32_t)(x)) << SCT_DMAREQ0_DRL0_SHIFT)) & SCT_DMAREQ0_DRL0_MASK)
-#define SCT_DMAREQ0_DRQ0_MASK (0x80000000U)
-#define SCT_DMAREQ0_DRQ0_SHIFT (31U)
-/*! DRQ0 - This read-only bit indicates the state of DMA Request 0. Note that if the related DMA
- * channel is enabled and properly set up, it is unlikely that software will see this flag, it will
- * be cleared rapidly by the DMA service. The flag remaining set could point to an issue with DMA
- * setup.
- */
-#define SCT_DMAREQ0_DRQ0(x) (((uint32_t)(((uint32_t)(x)) << SCT_DMAREQ0_DRQ0_SHIFT)) & SCT_DMAREQ0_DRQ0_MASK)
-/*! @} */
-
-/*! @name DMAREQ1 - SCT DMA request 1 register */
-/*! @{ */
-#define SCT_DMAREQ1_DEV_1_MASK (0xFFFFU)
-#define SCT_DMAREQ1_DEV_1_SHIFT (0U)
-/*! DEV_1 - If bit n is one, event n triggers DMA request 1 (event 0 = bit 0, event 1 = bit 1,
- * etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_DMAREQ1_DEV_1(x) (((uint32_t)(((uint32_t)(x)) << SCT_DMAREQ1_DEV_1_SHIFT)) & SCT_DMAREQ1_DEV_1_MASK)
-#define SCT_DMAREQ1_DRL1_MASK (0x40000000U)
-#define SCT_DMAREQ1_DRL1_SHIFT (30U)
-/*! DRL1 - A 1 in this bit triggers DMA request 1 when it loads the Match L/Unified registers from the Reload L/Unified registers.
- */
-#define SCT_DMAREQ1_DRL1(x) (((uint32_t)(((uint32_t)(x)) << SCT_DMAREQ1_DRL1_SHIFT)) & SCT_DMAREQ1_DRL1_MASK)
-#define SCT_DMAREQ1_DRQ1_MASK (0x80000000U)
-#define SCT_DMAREQ1_DRQ1_SHIFT (31U)
-/*! DRQ1 - This read-only bit indicates the state of DMA Request 1. Note that if the related DMA
- * channel is enabled and properly set up, it is unlikely that software will see this flag, it will
- * be cleared rapidly by the DMA service. The flag remaining set could point to an issue with DMA
- * setup.
- */
-#define SCT_DMAREQ1_DRQ1(x) (((uint32_t)(((uint32_t)(x)) << SCT_DMAREQ1_DRQ1_SHIFT)) & SCT_DMAREQ1_DRQ1_MASK)
-/*! @} */
-
-/*! @name EVEN - SCT event interrupt enable register */
-/*! @{ */
-#define SCT_EVEN_IEN_MASK (0xFFFFU)
-#define SCT_EVEN_IEN_SHIFT (0U)
-/*! IEN - The SCT requests an interrupt when bit n of this register and the event flag register are
- * both one (event 0 = bit 0, event 1 = bit 1, etc.). The number of bits = number of events in
- * this SCT.
- */
-#define SCT_EVEN_IEN(x) (((uint32_t)(((uint32_t)(x)) << SCT_EVEN_IEN_SHIFT)) & SCT_EVEN_IEN_MASK)
-/*! @} */
-
-/*! @name EVFLAG - SCT event flag register */
-/*! @{ */
-#define SCT_EVFLAG_FLAG_MASK (0xFFFFU)
-#define SCT_EVFLAG_FLAG_SHIFT (0U)
-/*! FLAG - Bit n is one if event n has occurred since reset or a 1 was last written to this bit
- * (event 0 = bit 0, event 1 = bit 1, etc.). The number of bits = number of events in this SCT.
- */
-#define SCT_EVFLAG_FLAG(x) (((uint32_t)(((uint32_t)(x)) << SCT_EVFLAG_FLAG_SHIFT)) & SCT_EVFLAG_FLAG_MASK)
-/*! @} */
-
-/*! @name CONEN - SCT conflict interrupt enable register */
-/*! @{ */
-#define SCT_CONEN_NCEN_MASK (0xFFFFU)
-#define SCT_CONEN_NCEN_SHIFT (0U)
-/*! NCEN - The SCT requests an interrupt when bit n of this register and the SCT conflict flag
- * register are both one (output 0 = bit 0, output 1 = bit 1, etc.). The number of bits = number of
- * outputs in this SCT.
- */
-#define SCT_CONEN_NCEN(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONEN_NCEN_SHIFT)) & SCT_CONEN_NCEN_MASK)
-/*! @} */
-
-/*! @name CONFLAG - SCT conflict flag register */
-/*! @{ */
-#define SCT_CONFLAG_NCFLAG_MASK (0xFFFFU)
-#define SCT_CONFLAG_NCFLAG_SHIFT (0U)
-/*! NCFLAG - Bit n is one if a no-change conflict event occurred on output n since reset or a 1 was
- * last written to this bit (output 0 = bit 0, output 1 = bit 1, etc.). The number of bits =
- * number of outputs in this SCT.
- */
-#define SCT_CONFLAG_NCFLAG(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFLAG_NCFLAG_SHIFT)) & SCT_CONFLAG_NCFLAG_MASK)
-#define SCT_CONFLAG_BUSERRL_MASK (0x40000000U)
-#define SCT_CONFLAG_BUSERRL_SHIFT (30U)
-/*! BUSERRL - The most recent bus error from this SCT involved writing CTR L/Unified, STATE
- * L/Unified, MATCH L/Unified, or the Output register when the L/U counter was not halted. A word write
- * to certain L and H registers can be half successful and half unsuccessful.
- */
-#define SCT_CONFLAG_BUSERRL(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFLAG_BUSERRL_SHIFT)) & SCT_CONFLAG_BUSERRL_MASK)
-#define SCT_CONFLAG_BUSERRH_MASK (0x80000000U)
-#define SCT_CONFLAG_BUSERRH_SHIFT (31U)
-/*! BUSERRH - The most recent bus error from this SCT involved writing CTR H, STATE H, MATCH H, or
- * the Output register when the H counter was not halted.
- */
-#define SCT_CONFLAG_BUSERRH(x) (((uint32_t)(((uint32_t)(x)) << SCT_CONFLAG_BUSERRH_SHIFT)) & SCT_CONFLAG_BUSERRH_MASK)
-/*! @} */
-
-/*! @name CAPL - SCT_CAPL register */
-/*! @{ */
-#define SCT_CAPL_CAPL_MASK (0xFFFFU)
-#define SCT_CAPL_CAPL_SHIFT (0U)
-#define SCT_CAPL_CAPL(x) (((uint16_t)(((uint16_t)(x)) << SCT_CAPL_CAPL_SHIFT)) & SCT_CAPL_CAPL_MASK)
-/*! @} */
-
-/* The count of SCT_CAPL */
-#define SCT_CAPL_COUNT (16U)
-
-/*! @name CAPH - SCT_CAPH register */
-/*! @{ */
-#define SCT_CAPH_CAPH_MASK (0xFFFFU)
-#define SCT_CAPH_CAPH_SHIFT (0U)
-#define SCT_CAPH_CAPH(x) (((uint16_t)(((uint16_t)(x)) << SCT_CAPH_CAPH_SHIFT)) & SCT_CAPH_CAPH_MASK)
-/*! @} */
-
-/* The count of SCT_CAPH */
-#define SCT_CAPH_COUNT (16U)
-
-/*! @name CAP - SCT capture register of capture channel */
-/*! @{ */
-#define SCT_CAP_CAPn_L_MASK (0xFFFFU)
-#define SCT_CAP_CAPn_L_SHIFT (0U)
-/*! CAPn_L - When UNIFY = 0, read the 16-bit counter value at which this register was last captured.
- * When UNIFY = 1, read the lower 16 bits of the 32-bit value at which this register was last
- * captured.
- */
-#define SCT_CAP_CAPn_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CAP_CAPn_L_SHIFT)) & SCT_CAP_CAPn_L_MASK)
-#define SCT_CAP_CAPn_H_MASK (0xFFFF0000U)
-#define SCT_CAP_CAPn_H_SHIFT (16U)
-/*! CAPn_H - When UNIFY = 0, read the 16-bit counter value at which this register was last captured.
- * When UNIFY = 1, read the upper 16 bits of the 32-bit value at which this register was last
- * captured.
- */
-#define SCT_CAP_CAPn_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CAP_CAPn_H_SHIFT)) & SCT_CAP_CAPn_H_MASK)
-/*! @} */
-
-/* The count of SCT_CAP */
-#define SCT_CAP_COUNT (16U)
-
-/*! @name MATCHL - SCT_MATCHL register */
-/*! @{ */
-#define SCT_MATCHL_MATCHL_MASK (0xFFFFU)
-#define SCT_MATCHL_MATCHL_SHIFT (0U)
-#define SCT_MATCHL_MATCHL(x) (((uint16_t)(((uint16_t)(x)) << SCT_MATCHL_MATCHL_SHIFT)) & SCT_MATCHL_MATCHL_MASK)
-/*! @} */
-
-/* The count of SCT_MATCHL */
-#define SCT_MATCHL_COUNT (16U)
-
-/*! @name MATCHH - SCT_MATCHH register */
-/*! @{ */
-#define SCT_MATCHH_MATCHH_MASK (0xFFFFU)
-#define SCT_MATCHH_MATCHH_SHIFT (0U)
-#define SCT_MATCHH_MATCHH(x) (((uint16_t)(((uint16_t)(x)) << SCT_MATCHH_MATCHH_SHIFT)) & SCT_MATCHH_MATCHH_MASK)
-/*! @} */
-
-/* The count of SCT_MATCHH */
-#define SCT_MATCHH_COUNT (16U)
-
-/*! @name MATCH - SCT match value register of match channels */
-/*! @{ */
-#define SCT_MATCH_MATCHn_L_MASK (0xFFFFU)
-#define SCT_MATCH_MATCHn_L_SHIFT (0U)
-/*! MATCHn_L - When UNIFY = 0, read or write the 16-bit value to be compared to the L counter. When
- * UNIFY = 1, read or write the lower 16 bits of the 32-bit value to be compared to the unified
- * counter.
- */
-#define SCT_MATCH_MATCHn_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_MATCH_MATCHn_L_SHIFT)) & SCT_MATCH_MATCHn_L_MASK)
-#define SCT_MATCH_MATCHn_H_MASK (0xFFFF0000U)
-#define SCT_MATCH_MATCHn_H_SHIFT (16U)
-/*! MATCHn_H - When UNIFY = 0, read or write the 16-bit value to be compared to the H counter. When
- * UNIFY = 1, read or write the upper 16 bits of the 32-bit value to be compared to the unified
- * counter.
- */
-#define SCT_MATCH_MATCHn_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_MATCH_MATCHn_H_SHIFT)) & SCT_MATCH_MATCHn_H_MASK)
-/*! @} */
-
-/* The count of SCT_MATCH */
-#define SCT_MATCH_COUNT (16U)
-
-/*! @name CAPCTRLL - SCT_CAPCTRLL register */
-/*! @{ */
-#define SCT_CAPCTRLL_CAPCTRLL_MASK (0xFFFFU)
-#define SCT_CAPCTRLL_CAPCTRLL_SHIFT (0U)
-#define SCT_CAPCTRLL_CAPCTRLL(x) (((uint16_t)(((uint16_t)(x)) << SCT_CAPCTRLL_CAPCTRLL_SHIFT)) & SCT_CAPCTRLL_CAPCTRLL_MASK)
-/*! @} */
-
-/* The count of SCT_CAPCTRLL */
-#define SCT_CAPCTRLL_COUNT (16U)
-
-/*! @name CAPCTRLH - SCT_CAPCTRLH register */
-/*! @{ */
-#define SCT_CAPCTRLH_CAPCTRLH_MASK (0xFFFFU)
-#define SCT_CAPCTRLH_CAPCTRLH_SHIFT (0U)
-#define SCT_CAPCTRLH_CAPCTRLH(x) (((uint16_t)(((uint16_t)(x)) << SCT_CAPCTRLH_CAPCTRLH_SHIFT)) & SCT_CAPCTRLH_CAPCTRLH_MASK)
-/*! @} */
-
-/* The count of SCT_CAPCTRLH */
-#define SCT_CAPCTRLH_COUNT (16U)
-
-/*! @name CAPCTRL - SCT capture control register */
-/*! @{ */
-#define SCT_CAPCTRL_CAPCONn_L_MASK (0xFFFFU)
-#define SCT_CAPCTRL_CAPCONn_L_SHIFT (0U)
-/*! CAPCONn_L - If bit m is one, event m causes the CAPn_L (UNIFY = 0) or the CAPn (UNIFY = 1)
- * register to be loaded (event 0 = bit 0, event 1 = bit 1, etc.). The number of bits = number of
- * match/captures in this SCT.
- */
-#define SCT_CAPCTRL_CAPCONn_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_CAPCTRL_CAPCONn_L_SHIFT)) & SCT_CAPCTRL_CAPCONn_L_MASK)
-#define SCT_CAPCTRL_CAPCONn_H_MASK (0xFFFF0000U)
-#define SCT_CAPCTRL_CAPCONn_H_SHIFT (16U)
-/*! CAPCONn_H - If bit m is one, event m causes the CAPn_H (UNIFY = 0) register to be loaded (event
- * 0 = bit 16, event 1 = bit 17, etc.). The number of bits = number of match/captures in this SCT.
- */
-#define SCT_CAPCTRL_CAPCONn_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_CAPCTRL_CAPCONn_H_SHIFT)) & SCT_CAPCTRL_CAPCONn_H_MASK)
-/*! @} */
-
-/* The count of SCT_CAPCTRL */
-#define SCT_CAPCTRL_COUNT (16U)
-
-/*! @name MATCHRELL - SCT_MATCHRELL register */
-/*! @{ */
-#define SCT_MATCHRELL_MATCHRELL_MASK (0xFFFFU)
-#define SCT_MATCHRELL_MATCHRELL_SHIFT (0U)
-#define SCT_MATCHRELL_MATCHRELL(x) (((uint16_t)(((uint16_t)(x)) << SCT_MATCHRELL_MATCHRELL_SHIFT)) & SCT_MATCHRELL_MATCHRELL_MASK)
-/*! @} */
-
-/* The count of SCT_MATCHRELL */
-#define SCT_MATCHRELL_COUNT (16U)
-
-/*! @name MATCHRELH - SCT_MATCHRELH register */
-/*! @{ */
-#define SCT_MATCHRELH_MATCHRELH_MASK (0xFFFFU)
-#define SCT_MATCHRELH_MATCHRELH_SHIFT (0U)
-#define SCT_MATCHRELH_MATCHRELH(x) (((uint16_t)(((uint16_t)(x)) << SCT_MATCHRELH_MATCHRELH_SHIFT)) & SCT_MATCHRELH_MATCHRELH_MASK)
-/*! @} */
-
-/* The count of SCT_MATCHRELH */
-#define SCT_MATCHRELH_COUNT (16U)
-
-/*! @name MATCHREL - SCT match reload value register */
-/*! @{ */
-#define SCT_MATCHREL_RELOADn_L_MASK (0xFFFFU)
-#define SCT_MATCHREL_RELOADn_L_SHIFT (0U)
-/*! RELOADn_L - When UNIFY = 0, specifies the 16-bit value to be loaded into the MATCHn_L register.
- * When UNIFY = 1, specifies the lower 16 bits of the 32-bit value to be loaded into the MATCHn
- * register.
- */
-#define SCT_MATCHREL_RELOADn_L(x) (((uint32_t)(((uint32_t)(x)) << SCT_MATCHREL_RELOADn_L_SHIFT)) & SCT_MATCHREL_RELOADn_L_MASK)
-#define SCT_MATCHREL_RELOADn_H_MASK (0xFFFF0000U)
-#define SCT_MATCHREL_RELOADn_H_SHIFT (16U)
-/*! RELOADn_H - When UNIFY = 0, specifies the 16-bit to be loaded into the MATCHn_H register. When
- * UNIFY = 1, specifies the upper 16 bits of the 32-bit value to be loaded into the MATCHn
- * register.
- */
-#define SCT_MATCHREL_RELOADn_H(x) (((uint32_t)(((uint32_t)(x)) << SCT_MATCHREL_RELOADn_H_SHIFT)) & SCT_MATCHREL_RELOADn_H_MASK)
-/*! @} */
-
-/* The count of SCT_MATCHREL */
-#define SCT_MATCHREL_COUNT (16U)
-
-/*! @name EV_STATE - SCT event state register 0 */
-/*! @{ */
-#define SCT_EV_STATE_STATEMSKn_MASK (0xFFFFU)
-#define SCT_EV_STATE_STATEMSKn_SHIFT (0U)
-/*! STATEMSKn - If bit m is one, event n happens in state m of the counter selected by the HEVENT
- * bit (n = event number, m = state number; state 0 = bit 0, state 1= bit 1, etc.). The number of
- * bits = number of states in this SCT.
- */
-#define SCT_EV_STATE_STATEMSKn(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_STATE_STATEMSKn_SHIFT)) & SCT_EV_STATE_STATEMSKn_MASK)
-/*! @} */
-
-/* The count of SCT_EV_STATE */
-#define SCT_EV_STATE_COUNT (16U)
-
-/*! @name EV_CTRL - SCT event control register 0 */
-/*! @{ */
-#define SCT_EV_CTRL_MATCHSEL_MASK (0xFU)
-#define SCT_EV_CTRL_MATCHSEL_SHIFT (0U)
-/*! MATCHSEL - Selects the Match register associated with this event (if any). A match can occur
- * only when the counter selected by the HEVENT bit is running.
- */
-#define SCT_EV_CTRL_MATCHSEL(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_MATCHSEL_SHIFT)) & SCT_EV_CTRL_MATCHSEL_MASK)
-#define SCT_EV_CTRL_HEVENT_MASK (0x10U)
-#define SCT_EV_CTRL_HEVENT_SHIFT (4U)
-/*! HEVENT - Select L/H counter. Do not set this bit if UNIFY = 1.
- * 0b0..Selects the L state and the L match register selected by MATCHSEL.
- * 0b1..Selects the H state and the H match register selected by MATCHSEL.
- */
-#define SCT_EV_CTRL_HEVENT(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_HEVENT_SHIFT)) & SCT_EV_CTRL_HEVENT_MASK)
-#define SCT_EV_CTRL_OUTSEL_MASK (0x20U)
-#define SCT_EV_CTRL_OUTSEL_SHIFT (5U)
-/*! OUTSEL - Input/output select
- * 0b0..Selects the inputs selected by IOSEL.
- * 0b1..Selects the outputs selected by IOSEL.
- */
-#define SCT_EV_CTRL_OUTSEL(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_OUTSEL_SHIFT)) & SCT_EV_CTRL_OUTSEL_MASK)
-#define SCT_EV_CTRL_IOSEL_MASK (0x3C0U)
-#define SCT_EV_CTRL_IOSEL_SHIFT (6U)
-/*! IOSEL - Selects the input or output signal number associated with this event (if any). Do not
- * select an input in this register if CKMODE is 1x. In this case the clock input is an implicit
- * ingredient of every event.
- */
-#define SCT_EV_CTRL_IOSEL(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_IOSEL_SHIFT)) & SCT_EV_CTRL_IOSEL_MASK)
-#define SCT_EV_CTRL_IOCOND_MASK (0xC00U)
-#define SCT_EV_CTRL_IOCOND_SHIFT (10U)
-/*! IOCOND - Selects the I/O condition for event n. (The detection of edges on outputs lag the
- * conditions that switch the outputs by one SCT clock). In order to guarantee proper edge/state
- * detection, an input must have a minimum pulse width of at least one SCT clock period .
- * 0b00..LOW
- * 0b01..Rise
- * 0b10..Fall
- * 0b11..HIGH
- */
-#define SCT_EV_CTRL_IOCOND(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_IOCOND_SHIFT)) & SCT_EV_CTRL_IOCOND_MASK)
-#define SCT_EV_CTRL_COMBMODE_MASK (0x3000U)
-#define SCT_EV_CTRL_COMBMODE_SHIFT (12U)
-/*! COMBMODE - Selects how the specified match and I/O condition are used and combined.
- * 0b00..OR. The event occurs when either the specified match or I/O condition occurs.
- * 0b01..MATCH. Uses the specified match only.
- * 0b10..IO. Uses the specified I/O condition only.
- * 0b11..AND. The event occurs when the specified match and I/O condition occur simultaneously.
- */
-#define SCT_EV_CTRL_COMBMODE(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_COMBMODE_SHIFT)) & SCT_EV_CTRL_COMBMODE_MASK)
-#define SCT_EV_CTRL_STATELD_MASK (0x4000U)
-#define SCT_EV_CTRL_STATELD_SHIFT (14U)
-/*! STATELD - This bit controls how the STATEV value modifies the state selected by HEVENT when this
- * event is the highest-numbered event occurring for that state.
- * 0b0..STATEV value is added into STATE (the carry-out is ignored).
- * 0b1..STATEV value is loaded into STATE.
- */
-#define SCT_EV_CTRL_STATELD(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_STATELD_SHIFT)) & SCT_EV_CTRL_STATELD_MASK)
-#define SCT_EV_CTRL_STATEV_MASK (0xF8000U)
-#define SCT_EV_CTRL_STATEV_SHIFT (15U)
-/*! STATEV - This value is loaded into or added to the state selected by HEVENT, depending on
- * STATELD, when this event is the highest-numbered event occurring for that state. If STATELD and
- * STATEV are both zero, there is no change to the STATE value.
- */
-#define SCT_EV_CTRL_STATEV(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_STATEV_SHIFT)) & SCT_EV_CTRL_STATEV_MASK)
-#define SCT_EV_CTRL_MATCHMEM_MASK (0x100000U)
-#define SCT_EV_CTRL_MATCHMEM_SHIFT (20U)
-/*! MATCHMEM - If this bit is one and the COMBMODE field specifies a match component to the
- * triggering of this event, then a match is considered to be active whenever the counter value is
- * GREATER THAN OR EQUAL TO the value specified in the match register when counting up, LESS THEN OR
- * EQUAL TO the match value when counting down. If this bit is zero, a match is only be active
- * during the cycle when the counter is equal to the match value.
- */
-#define SCT_EV_CTRL_MATCHMEM(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_MATCHMEM_SHIFT)) & SCT_EV_CTRL_MATCHMEM_MASK)
-#define SCT_EV_CTRL_DIRECTION_MASK (0x600000U)
-#define SCT_EV_CTRL_DIRECTION_SHIFT (21U)
-/*! DIRECTION - Direction qualifier for event generation. This field only applies when the counters
- * are operating in BIDIR mode. If BIDIR = 0, the SCT ignores this field. Value 0x3 is reserved.
- * 0b00..Direction independent. This event is triggered regardless of the count direction.
- * 0b01..Counting up. This event is triggered only during up-counting when BIDIR = 1.
- * 0b10..Counting down. This event is triggered only during down-counting when BIDIR = 1.
- */
-#define SCT_EV_CTRL_DIRECTION(x) (((uint32_t)(((uint32_t)(x)) << SCT_EV_CTRL_DIRECTION_SHIFT)) & SCT_EV_CTRL_DIRECTION_MASK)
-/*! @} */
-
-/* The count of SCT_EV_CTRL */
-#define SCT_EV_CTRL_COUNT (16U)
-
-/*! @name OUT_SET - SCT output 0 set register */
-/*! @{ */
-#define SCT_OUT_SET_SET_MASK (0xFFFFU)
-#define SCT_OUT_SET_SET_SHIFT (0U)
-/*! SET - A 1 in bit m selects event m to set output n (or clear it if SETCLRn = 0x1 or 0x2) output
- * 0 = bit 0, output 1 = bit 1, etc. The number of bits = number of events in this SCT. When the
- * counter is used in bi-directional mode, it is possible to reverse the action specified by the
- * output set and clear registers when counting down, See the OUTPUTCTRL register.
- */
-#define SCT_OUT_SET_SET(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUT_SET_SET_SHIFT)) & SCT_OUT_SET_SET_MASK)
-/*! @} */
-
-/* The count of SCT_OUT_SET */
-#define SCT_OUT_SET_COUNT (10U)
-
-/*! @name OUT_CLR - SCT output 0 clear register */
-/*! @{ */
-#define SCT_OUT_CLR_CLR_MASK (0xFFFFU)
-#define SCT_OUT_CLR_CLR_SHIFT (0U)
-/*! CLR - A 1 in bit m selects event m to clear output n (or set it if SETCLRn = 0x1 or 0x2) event 0
- * = bit 0, event 1 = bit 1, etc. The number of bits = number of events in this SCT. When the
- * counter is used in bi-directional mode, it is possible to reverse the action specified by the
- * output set and clear registers when counting down, See the OUTPUTCTRL register.
- */
-#define SCT_OUT_CLR_CLR(x) (((uint32_t)(((uint32_t)(x)) << SCT_OUT_CLR_CLR_SHIFT)) & SCT_OUT_CLR_CLR_MASK)
-/*! @} */
-
-/* The count of SCT_OUT_CLR */
-#define SCT_OUT_CLR_COUNT (10U)
-
-
-/*!
- * @}
- */ /* end of group SCT_Register_Masks */
-
-
-/* SCT - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral SCT0 base address */
- #define SCT0_BASE (0x50085000u)
- /** Peripheral SCT0 base address */
- #define SCT0_BASE_NS (0x40085000u)
- /** Peripheral SCT0 base pointer */
- #define SCT0 ((SCT_Type *)SCT0_BASE)
- /** Peripheral SCT0 base pointer */
- #define SCT0_NS ((SCT_Type *)SCT0_BASE_NS)
- /** Array initializer of SCT peripheral base addresses */
- #define SCT_BASE_ADDRS { SCT0_BASE }
- /** Array initializer of SCT peripheral base pointers */
- #define SCT_BASE_PTRS { SCT0 }
- /** Array initializer of SCT peripheral base addresses */
- #define SCT_BASE_ADDRS_NS { SCT0_BASE_NS }
- /** Array initializer of SCT peripheral base pointers */
- #define SCT_BASE_PTRS_NS { SCT0_NS }
-#else
- /** Peripheral SCT0 base address */
- #define SCT0_BASE (0x40085000u)
- /** Peripheral SCT0 base pointer */
- #define SCT0 ((SCT_Type *)SCT0_BASE)
- /** Array initializer of SCT peripheral base addresses */
- #define SCT_BASE_ADDRS { SCT0_BASE }
- /** Array initializer of SCT peripheral base pointers */
- #define SCT_BASE_PTRS { SCT0 }
-#endif
-/** Interrupt vectors for the SCT peripheral type */
-#define SCT_IRQS { SCT0_IRQn }
-
-/*!
- * @}
- */ /* end of group SCT_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- SDIF Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SDIF_Peripheral_Access_Layer SDIF Peripheral Access Layer
- * @{
- */
-
-/** SDIF - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< Control register, offset: 0x0 */
- __IO uint32_t PWREN; /**< Power Enable register, offset: 0x4 */
- __IO uint32_t CLKDIV; /**< Clock Divider register, offset: 0x8 */
- uint8_t RESERVED_0[4];
- __IO uint32_t CLKENA; /**< Clock Enable register, offset: 0x10 */
- __IO uint32_t TMOUT; /**< Time-out register, offset: 0x14 */
- __IO uint32_t CTYPE; /**< Card Type register, offset: 0x18 */
- __IO uint32_t BLKSIZ; /**< Block Size register, offset: 0x1C */
- __IO uint32_t BYTCNT; /**< Byte Count register, offset: 0x20 */
- __IO uint32_t INTMASK; /**< Interrupt Mask register, offset: 0x24 */
- __IO uint32_t CMDARG; /**< Command Argument register, offset: 0x28 */
- __IO uint32_t CMD; /**< Command register, offset: 0x2C */
- __IO uint32_t RESP[4]; /**< Response register, array offset: 0x30, array step: 0x4 */
- __IO uint32_t MINTSTS; /**< Masked Interrupt Status register, offset: 0x40 */
- __IO uint32_t RINTSTS; /**< Raw Interrupt Status register, offset: 0x44 */
- __IO uint32_t STATUS; /**< Status register, offset: 0x48 */
- __IO uint32_t FIFOTH; /**< FIFO Threshold Watermark register, offset: 0x4C */
- __IO uint32_t CDETECT; /**< Card Detect register, offset: 0x50 */
- __IO uint32_t WRTPRT; /**< Write Protect register, offset: 0x54 */
- uint8_t RESERVED_1[4];
- __IO uint32_t TCBCNT; /**< Transferred CIU Card Byte Count register, offset: 0x5C */
- __IO uint32_t TBBCNT; /**< Transferred Host to BIU-FIFO Byte Count register, offset: 0x60 */
- __IO uint32_t DEBNCE; /**< Debounce Count register, offset: 0x64 */
- uint8_t RESERVED_2[16];
- __IO uint32_t RST_N; /**< Hardware Reset, offset: 0x78 */
- uint8_t RESERVED_3[4];
- __IO uint32_t BMOD; /**< Bus Mode register, offset: 0x80 */
- __IO uint32_t PLDMND; /**< Poll Demand register, offset: 0x84 */
- __IO uint32_t DBADDR; /**< Descriptor List Base Address register, offset: 0x88 */
- __IO uint32_t IDSTS; /**< Internal DMAC Status register, offset: 0x8C */
- __IO uint32_t IDINTEN; /**< Internal DMAC Interrupt Enable register, offset: 0x90 */
- __IO uint32_t DSCADDR; /**< Current Host Descriptor Address register, offset: 0x94 */
- __IO uint32_t BUFADDR; /**< Current Buffer Descriptor Address register, offset: 0x98 */
- uint8_t RESERVED_4[100];
- __IO uint32_t CARDTHRCTL; /**< Card Threshold Control, offset: 0x100 */
- __IO uint32_t BACKENDPWR; /**< Power control, offset: 0x104 */
- uint8_t RESERVED_5[248];
- __IO uint32_t FIFO[64]; /**< SDIF FIFO, array offset: 0x200, array step: 0x4 */
-} SDIF_Type;
-
-/* ----------------------------------------------------------------------------
- -- SDIF Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SDIF_Register_Masks SDIF Register Masks
- * @{
- */
-
-/*! @name CTRL - Control register */
-/*! @{ */
-#define SDIF_CTRL_CONTROLLER_RESET_MASK (0x1U)
-#define SDIF_CTRL_CONTROLLER_RESET_SHIFT (0U)
-/*! CONTROLLER_RESET - Controller reset.
- */
-#define SDIF_CTRL_CONTROLLER_RESET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_CONTROLLER_RESET_SHIFT)) & SDIF_CTRL_CONTROLLER_RESET_MASK)
-#define SDIF_CTRL_FIFO_RESET_MASK (0x2U)
-#define SDIF_CTRL_FIFO_RESET_SHIFT (1U)
-/*! FIFO_RESET - Fifo reset.
- */
-#define SDIF_CTRL_FIFO_RESET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_FIFO_RESET_SHIFT)) & SDIF_CTRL_FIFO_RESET_MASK)
-#define SDIF_CTRL_DMA_RESET_MASK (0x4U)
-#define SDIF_CTRL_DMA_RESET_SHIFT (2U)
-/*! DMA_RESET - DMA reset.
- */
-#define SDIF_CTRL_DMA_RESET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_DMA_RESET_SHIFT)) & SDIF_CTRL_DMA_RESET_MASK)
-#define SDIF_CTRL_INT_ENABLE_MASK (0x10U)
-#define SDIF_CTRL_INT_ENABLE_SHIFT (4U)
-/*! INT_ENABLE - Global interrupt enable/disable bit.
- */
-#define SDIF_CTRL_INT_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_INT_ENABLE_SHIFT)) & SDIF_CTRL_INT_ENABLE_MASK)
-#define SDIF_CTRL_READ_WAIT_MASK (0x40U)
-#define SDIF_CTRL_READ_WAIT_SHIFT (6U)
-/*! READ_WAIT - Read/wait.
- */
-#define SDIF_CTRL_READ_WAIT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_READ_WAIT_SHIFT)) & SDIF_CTRL_READ_WAIT_MASK)
-#define SDIF_CTRL_SEND_IRQ_RESPONSE_MASK (0x80U)
-#define SDIF_CTRL_SEND_IRQ_RESPONSE_SHIFT (7U)
-/*! SEND_IRQ_RESPONSE - Send irq response.
- */
-#define SDIF_CTRL_SEND_IRQ_RESPONSE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_SEND_IRQ_RESPONSE_SHIFT)) & SDIF_CTRL_SEND_IRQ_RESPONSE_MASK)
-#define SDIF_CTRL_ABORT_READ_DATA_MASK (0x100U)
-#define SDIF_CTRL_ABORT_READ_DATA_SHIFT (8U)
-/*! ABORT_READ_DATA - Abort read data.
- */
-#define SDIF_CTRL_ABORT_READ_DATA(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_ABORT_READ_DATA_SHIFT)) & SDIF_CTRL_ABORT_READ_DATA_MASK)
-#define SDIF_CTRL_SEND_CCSD_MASK (0x200U)
-#define SDIF_CTRL_SEND_CCSD_SHIFT (9U)
-/*! SEND_CCSD - Send ccsd.
- */
-#define SDIF_CTRL_SEND_CCSD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_SEND_CCSD_SHIFT)) & SDIF_CTRL_SEND_CCSD_MASK)
-#define SDIF_CTRL_SEND_AUTO_STOP_CCSD_MASK (0x400U)
-#define SDIF_CTRL_SEND_AUTO_STOP_CCSD_SHIFT (10U)
-/*! SEND_AUTO_STOP_CCSD - Send auto stop ccsd.
- */
-#define SDIF_CTRL_SEND_AUTO_STOP_CCSD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_SEND_AUTO_STOP_CCSD_SHIFT)) & SDIF_CTRL_SEND_AUTO_STOP_CCSD_MASK)
-#define SDIF_CTRL_CEATA_DEVICE_INTERRUPT_STATUS_MASK (0x800U)
-#define SDIF_CTRL_CEATA_DEVICE_INTERRUPT_STATUS_SHIFT (11U)
-/*! CEATA_DEVICE_INTERRUPT_STATUS - CEATA device interrupt status.
- */
-#define SDIF_CTRL_CEATA_DEVICE_INTERRUPT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_CEATA_DEVICE_INTERRUPT_STATUS_SHIFT)) & SDIF_CTRL_CEATA_DEVICE_INTERRUPT_STATUS_MASK)
-#define SDIF_CTRL_CARD_VOLTAGE_A0_MASK (0x10000U)
-#define SDIF_CTRL_CARD_VOLTAGE_A0_SHIFT (16U)
-/*! CARD_VOLTAGE_A0 - Controls the state of the SD_VOLT0 pin.
- */
-#define SDIF_CTRL_CARD_VOLTAGE_A0(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_CARD_VOLTAGE_A0_SHIFT)) & SDIF_CTRL_CARD_VOLTAGE_A0_MASK)
-#define SDIF_CTRL_CARD_VOLTAGE_A1_MASK (0x20000U)
-#define SDIF_CTRL_CARD_VOLTAGE_A1_SHIFT (17U)
-/*! CARD_VOLTAGE_A1 - Controls the state of the SD_VOLT1 pin.
- */
-#define SDIF_CTRL_CARD_VOLTAGE_A1(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_CARD_VOLTAGE_A1_SHIFT)) & SDIF_CTRL_CARD_VOLTAGE_A1_MASK)
-#define SDIF_CTRL_CARD_VOLTAGE_A2_MASK (0x40000U)
-#define SDIF_CTRL_CARD_VOLTAGE_A2_SHIFT (18U)
-/*! CARD_VOLTAGE_A2 - Controls the state of the SD_VOLT2 pin.
- */
-#define SDIF_CTRL_CARD_VOLTAGE_A2(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_CARD_VOLTAGE_A2_SHIFT)) & SDIF_CTRL_CARD_VOLTAGE_A2_MASK)
-#define SDIF_CTRL_USE_INTERNAL_DMAC_MASK (0x2000000U)
-#define SDIF_CTRL_USE_INTERNAL_DMAC_SHIFT (25U)
-/*! USE_INTERNAL_DMAC - SD/MMC DMA use.
- */
-#define SDIF_CTRL_USE_INTERNAL_DMAC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTRL_USE_INTERNAL_DMAC_SHIFT)) & SDIF_CTRL_USE_INTERNAL_DMAC_MASK)
-/*! @} */
-
-/*! @name PWREN - Power Enable register */
-/*! @{ */
-#define SDIF_PWREN_POWER_ENABLE0_MASK (0x1U)
-#define SDIF_PWREN_POWER_ENABLE0_SHIFT (0U)
-/*! POWER_ENABLE0 - Power on/off switch for card 0; once power is turned on, software should wait
- * for regulator/switch ramp-up time before trying to initialize card 0.
- */
-#define SDIF_PWREN_POWER_ENABLE0(x) (((uint32_t)(((uint32_t)(x)) << SDIF_PWREN_POWER_ENABLE0_SHIFT)) & SDIF_PWREN_POWER_ENABLE0_MASK)
-#define SDIF_PWREN_POWER_ENABLE1_MASK (0x2U)
-#define SDIF_PWREN_POWER_ENABLE1_SHIFT (1U)
-/*! POWER_ENABLE1 - Power on/off switch for card 1; once power is turned on, software should wait
- * for regulator/switch ramp-up time before trying to initialize card 1.
- */
-#define SDIF_PWREN_POWER_ENABLE1(x) (((uint32_t)(((uint32_t)(x)) << SDIF_PWREN_POWER_ENABLE1_SHIFT)) & SDIF_PWREN_POWER_ENABLE1_MASK)
-/*! @} */
-
-/*! @name CLKDIV - Clock Divider register */
-/*! @{ */
-#define SDIF_CLKDIV_CLK_DIVIDER0_MASK (0xFFU)
-#define SDIF_CLKDIV_CLK_DIVIDER0_SHIFT (0U)
-/*! CLK_DIVIDER0 - Clock divider-0 value.
- */
-#define SDIF_CLKDIV_CLK_DIVIDER0(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CLKDIV_CLK_DIVIDER0_SHIFT)) & SDIF_CLKDIV_CLK_DIVIDER0_MASK)
-/*! @} */
-
-/*! @name CLKENA - Clock Enable register */
-/*! @{ */
-#define SDIF_CLKENA_CCLK0_ENABLE_MASK (0x1U)
-#define SDIF_CLKENA_CCLK0_ENABLE_SHIFT (0U)
-/*! CCLK0_ENABLE - Clock-enable control for SD card 0 clock.
- */
-#define SDIF_CLKENA_CCLK0_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CLKENA_CCLK0_ENABLE_SHIFT)) & SDIF_CLKENA_CCLK0_ENABLE_MASK)
-#define SDIF_CLKENA_CCLK1_ENABLE_MASK (0x2U)
-#define SDIF_CLKENA_CCLK1_ENABLE_SHIFT (1U)
-/*! CCLK1_ENABLE - Clock-enable control for SD card 1 clock.
- */
-#define SDIF_CLKENA_CCLK1_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CLKENA_CCLK1_ENABLE_SHIFT)) & SDIF_CLKENA_CCLK1_ENABLE_MASK)
-#define SDIF_CLKENA_CCLK0_LOW_POWER_MASK (0x10000U)
-#define SDIF_CLKENA_CCLK0_LOW_POWER_SHIFT (16U)
-/*! CCLK0_LOW_POWER - Low-power control for SD card 0 clock.
- */
-#define SDIF_CLKENA_CCLK0_LOW_POWER(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CLKENA_CCLK0_LOW_POWER_SHIFT)) & SDIF_CLKENA_CCLK0_LOW_POWER_MASK)
-#define SDIF_CLKENA_CCLK1_LOW_POWER_MASK (0x20000U)
-#define SDIF_CLKENA_CCLK1_LOW_POWER_SHIFT (17U)
-/*! CCLK1_LOW_POWER - Low-power control for SD card 1 clock.
- */
-#define SDIF_CLKENA_CCLK1_LOW_POWER(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CLKENA_CCLK1_LOW_POWER_SHIFT)) & SDIF_CLKENA_CCLK1_LOW_POWER_MASK)
-/*! @} */
-
-/*! @name TMOUT - Time-out register */
-/*! @{ */
-#define SDIF_TMOUT_RESPONSE_TIMEOUT_MASK (0xFFU)
-#define SDIF_TMOUT_RESPONSE_TIMEOUT_SHIFT (0U)
-/*! RESPONSE_TIMEOUT - Response time-out value.
- */
-#define SDIF_TMOUT_RESPONSE_TIMEOUT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_TMOUT_RESPONSE_TIMEOUT_SHIFT)) & SDIF_TMOUT_RESPONSE_TIMEOUT_MASK)
-#define SDIF_TMOUT_DATA_TIMEOUT_MASK (0xFFFFFF00U)
-#define SDIF_TMOUT_DATA_TIMEOUT_SHIFT (8U)
-/*! DATA_TIMEOUT - Value for card Data Read time-out; same value also used for Data Starvation by Host time-out.
- */
-#define SDIF_TMOUT_DATA_TIMEOUT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_TMOUT_DATA_TIMEOUT_SHIFT)) & SDIF_TMOUT_DATA_TIMEOUT_MASK)
-/*! @} */
-
-/*! @name CTYPE - Card Type register */
-/*! @{ */
-#define SDIF_CTYPE_CARD0_WIDTH0_MASK (0x1U)
-#define SDIF_CTYPE_CARD0_WIDTH0_SHIFT (0U)
-/*! CARD0_WIDTH0 - Indicates if card 0 is 1-bit or 4-bit: 0 - 1-bit mode 1 - 4-bit mode 1 and 4-bit
- * modes only work when 8-bit mode in CARD0_WIDTH1 is not enabled (bit 16 in this register is set
- * to 0).
- */
-#define SDIF_CTYPE_CARD0_WIDTH0(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTYPE_CARD0_WIDTH0_SHIFT)) & SDIF_CTYPE_CARD0_WIDTH0_MASK)
-#define SDIF_CTYPE_CARD1_WIDTH0_MASK (0x2U)
-#define SDIF_CTYPE_CARD1_WIDTH0_SHIFT (1U)
-/*! CARD1_WIDTH0 - Indicates if card 1 is 1-bit or 4-bit: 0 - 1-bit mode 1 - 4-bit mode 1 and 4-bit
- * modes only work when 8-bit mode in CARD1_WIDTH1 is not enabled (bit 16 in this register is set
- * to 0).
- */
-#define SDIF_CTYPE_CARD1_WIDTH0(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTYPE_CARD1_WIDTH0_SHIFT)) & SDIF_CTYPE_CARD1_WIDTH0_MASK)
-#define SDIF_CTYPE_CARD0_WIDTH1_MASK (0x10000U)
-#define SDIF_CTYPE_CARD0_WIDTH1_SHIFT (16U)
-/*! CARD0_WIDTH1 - Indicates if card 0 is 8-bit: 0 - Non 8-bit mode 1 - 8-bit mode.
- */
-#define SDIF_CTYPE_CARD0_WIDTH1(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTYPE_CARD0_WIDTH1_SHIFT)) & SDIF_CTYPE_CARD0_WIDTH1_MASK)
-#define SDIF_CTYPE_CARD1_WIDTH1_MASK (0x20000U)
-#define SDIF_CTYPE_CARD1_WIDTH1_SHIFT (17U)
-/*! CARD1_WIDTH1 - Indicates if card 1 is 8-bit: 0 - Non 8-bit mode 1 - 8-bit mode.
- */
-#define SDIF_CTYPE_CARD1_WIDTH1(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CTYPE_CARD1_WIDTH1_SHIFT)) & SDIF_CTYPE_CARD1_WIDTH1_MASK)
-/*! @} */
-
-/*! @name BLKSIZ - Block Size register */
-/*! @{ */
-#define SDIF_BLKSIZ_BLOCK_SIZE_MASK (0xFFFFU)
-#define SDIF_BLKSIZ_BLOCK_SIZE_SHIFT (0U)
-/*! BLOCK_SIZE - Block size.
- */
-#define SDIF_BLKSIZ_BLOCK_SIZE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BLKSIZ_BLOCK_SIZE_SHIFT)) & SDIF_BLKSIZ_BLOCK_SIZE_MASK)
-/*! @} */
-
-/*! @name BYTCNT - Byte Count register */
-/*! @{ */
-#define SDIF_BYTCNT_BYTE_COUNT_MASK (0xFFFFFFFFU)
-#define SDIF_BYTCNT_BYTE_COUNT_SHIFT (0U)
-/*! BYTE_COUNT - Number of bytes to be transferred; should be integer multiple of Block Size for block transfers.
- */
-#define SDIF_BYTCNT_BYTE_COUNT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BYTCNT_BYTE_COUNT_SHIFT)) & SDIF_BYTCNT_BYTE_COUNT_MASK)
-/*! @} */
-
-/*! @name INTMASK - Interrupt Mask register */
-/*! @{ */
-#define SDIF_INTMASK_CDET_MASK (0x1U)
-#define SDIF_INTMASK_CDET_SHIFT (0U)
-/*! CDET - Card detect.
- */
-#define SDIF_INTMASK_CDET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_CDET_SHIFT)) & SDIF_INTMASK_CDET_MASK)
-#define SDIF_INTMASK_RE_MASK (0x2U)
-#define SDIF_INTMASK_RE_SHIFT (1U)
-/*! RE - Response error.
- */
-#define SDIF_INTMASK_RE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_RE_SHIFT)) & SDIF_INTMASK_RE_MASK)
-#define SDIF_INTMASK_CDONE_MASK (0x4U)
-#define SDIF_INTMASK_CDONE_SHIFT (2U)
-/*! CDONE - Command done.
- */
-#define SDIF_INTMASK_CDONE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_CDONE_SHIFT)) & SDIF_INTMASK_CDONE_MASK)
-#define SDIF_INTMASK_DTO_MASK (0x8U)
-#define SDIF_INTMASK_DTO_SHIFT (3U)
-/*! DTO - Data transfer over.
- */
-#define SDIF_INTMASK_DTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_DTO_SHIFT)) & SDIF_INTMASK_DTO_MASK)
-#define SDIF_INTMASK_TXDR_MASK (0x10U)
-#define SDIF_INTMASK_TXDR_SHIFT (4U)
-/*! TXDR - Transmit FIFO data request.
- */
-#define SDIF_INTMASK_TXDR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_TXDR_SHIFT)) & SDIF_INTMASK_TXDR_MASK)
-#define SDIF_INTMASK_RXDR_MASK (0x20U)
-#define SDIF_INTMASK_RXDR_SHIFT (5U)
-/*! RXDR - Receive FIFO data request.
- */
-#define SDIF_INTMASK_RXDR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_RXDR_SHIFT)) & SDIF_INTMASK_RXDR_MASK)
-#define SDIF_INTMASK_RCRC_MASK (0x40U)
-#define SDIF_INTMASK_RCRC_SHIFT (6U)
-/*! RCRC - Response CRC error.
- */
-#define SDIF_INTMASK_RCRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_RCRC_SHIFT)) & SDIF_INTMASK_RCRC_MASK)
-#define SDIF_INTMASK_DCRC_MASK (0x80U)
-#define SDIF_INTMASK_DCRC_SHIFT (7U)
-/*! DCRC - Data CRC error.
- */
-#define SDIF_INTMASK_DCRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_DCRC_SHIFT)) & SDIF_INTMASK_DCRC_MASK)
-#define SDIF_INTMASK_RTO_MASK (0x100U)
-#define SDIF_INTMASK_RTO_SHIFT (8U)
-/*! RTO - Response time-out.
- */
-#define SDIF_INTMASK_RTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_RTO_SHIFT)) & SDIF_INTMASK_RTO_MASK)
-#define SDIF_INTMASK_DRTO_MASK (0x200U)
-#define SDIF_INTMASK_DRTO_SHIFT (9U)
-/*! DRTO - Data read time-out.
- */
-#define SDIF_INTMASK_DRTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_DRTO_SHIFT)) & SDIF_INTMASK_DRTO_MASK)
-#define SDIF_INTMASK_HTO_MASK (0x400U)
-#define SDIF_INTMASK_HTO_SHIFT (10U)
-/*! HTO - Data starvation-by-host time-out (HTO).
- */
-#define SDIF_INTMASK_HTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_HTO_SHIFT)) & SDIF_INTMASK_HTO_MASK)
-#define SDIF_INTMASK_FRUN_MASK (0x800U)
-#define SDIF_INTMASK_FRUN_SHIFT (11U)
-/*! FRUN - FIFO underrun/overrun error.
- */
-#define SDIF_INTMASK_FRUN(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_FRUN_SHIFT)) & SDIF_INTMASK_FRUN_MASK)
-#define SDIF_INTMASK_HLE_MASK (0x1000U)
-#define SDIF_INTMASK_HLE_SHIFT (12U)
-/*! HLE - Hardware locked write error.
- */
-#define SDIF_INTMASK_HLE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_HLE_SHIFT)) & SDIF_INTMASK_HLE_MASK)
-#define SDIF_INTMASK_SBE_MASK (0x2000U)
-#define SDIF_INTMASK_SBE_SHIFT (13U)
-/*! SBE - Start-bit error.
- */
-#define SDIF_INTMASK_SBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_SBE_SHIFT)) & SDIF_INTMASK_SBE_MASK)
-#define SDIF_INTMASK_ACD_MASK (0x4000U)
-#define SDIF_INTMASK_ACD_SHIFT (14U)
-/*! ACD - Auto command done.
- */
-#define SDIF_INTMASK_ACD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_ACD_SHIFT)) & SDIF_INTMASK_ACD_MASK)
-#define SDIF_INTMASK_EBE_MASK (0x8000U)
-#define SDIF_INTMASK_EBE_SHIFT (15U)
-/*! EBE - End-bit error (read)/Write no CRC.
- */
-#define SDIF_INTMASK_EBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_EBE_SHIFT)) & SDIF_INTMASK_EBE_MASK)
-#define SDIF_INTMASK_SDIO_INT_MASK_MASK (0x10000U)
-#define SDIF_INTMASK_SDIO_INT_MASK_SHIFT (16U)
-/*! SDIO_INT_MASK - Mask SDIO interrupt.
- */
-#define SDIF_INTMASK_SDIO_INT_MASK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_INTMASK_SDIO_INT_MASK_SHIFT)) & SDIF_INTMASK_SDIO_INT_MASK_MASK)
-/*! @} */
-
-/*! @name CMDARG - Command Argument register */
-/*! @{ */
-#define SDIF_CMDARG_CMD_ARG_MASK (0xFFFFFFFFU)
-#define SDIF_CMDARG_CMD_ARG_SHIFT (0U)
-/*! CMD_ARG - Value indicates command argument to be passed to card.
- */
-#define SDIF_CMDARG_CMD_ARG(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMDARG_CMD_ARG_SHIFT)) & SDIF_CMDARG_CMD_ARG_MASK)
-/*! @} */
-
-/*! @name CMD - Command register */
-/*! @{ */
-#define SDIF_CMD_CMD_INDEX_MASK (0x3FU)
-#define SDIF_CMD_CMD_INDEX_SHIFT (0U)
-/*! CMD_INDEX - Command index.
- */
-#define SDIF_CMD_CMD_INDEX(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_CMD_INDEX_SHIFT)) & SDIF_CMD_CMD_INDEX_MASK)
-#define SDIF_CMD_RESPONSE_EXPECT_MASK (0x40U)
-#define SDIF_CMD_RESPONSE_EXPECT_SHIFT (6U)
-/*! RESPONSE_EXPECT - Response expect.
- */
-#define SDIF_CMD_RESPONSE_EXPECT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_RESPONSE_EXPECT_SHIFT)) & SDIF_CMD_RESPONSE_EXPECT_MASK)
-#define SDIF_CMD_RESPONSE_LENGTH_MASK (0x80U)
-#define SDIF_CMD_RESPONSE_LENGTH_SHIFT (7U)
-/*! RESPONSE_LENGTH - Response length.
- */
-#define SDIF_CMD_RESPONSE_LENGTH(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_RESPONSE_LENGTH_SHIFT)) & SDIF_CMD_RESPONSE_LENGTH_MASK)
-#define SDIF_CMD_CHECK_RESPONSE_CRC_MASK (0x100U)
-#define SDIF_CMD_CHECK_RESPONSE_CRC_SHIFT (8U)
-/*! CHECK_RESPONSE_CRC - Check response CRC.
- */
-#define SDIF_CMD_CHECK_RESPONSE_CRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_CHECK_RESPONSE_CRC_SHIFT)) & SDIF_CMD_CHECK_RESPONSE_CRC_MASK)
-#define SDIF_CMD_DATA_EXPECTED_MASK (0x200U)
-#define SDIF_CMD_DATA_EXPECTED_SHIFT (9U)
-/*! DATA_EXPECTED - Data expected.
- */
-#define SDIF_CMD_DATA_EXPECTED(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_DATA_EXPECTED_SHIFT)) & SDIF_CMD_DATA_EXPECTED_MASK)
-#define SDIF_CMD_READ_WRITE_MASK (0x400U)
-#define SDIF_CMD_READ_WRITE_SHIFT (10U)
-/*! READ_WRITE - read/write.
- */
-#define SDIF_CMD_READ_WRITE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_READ_WRITE_SHIFT)) & SDIF_CMD_READ_WRITE_MASK)
-#define SDIF_CMD_TRANSFER_MODE_MASK (0x800U)
-#define SDIF_CMD_TRANSFER_MODE_SHIFT (11U)
-/*! TRANSFER_MODE - Transfer mode.
- */
-#define SDIF_CMD_TRANSFER_MODE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_TRANSFER_MODE_SHIFT)) & SDIF_CMD_TRANSFER_MODE_MASK)
-#define SDIF_CMD_SEND_AUTO_STOP_MASK (0x1000U)
-#define SDIF_CMD_SEND_AUTO_STOP_SHIFT (12U)
-/*! SEND_AUTO_STOP - Send auto stop.
- */
-#define SDIF_CMD_SEND_AUTO_STOP(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_SEND_AUTO_STOP_SHIFT)) & SDIF_CMD_SEND_AUTO_STOP_MASK)
-#define SDIF_CMD_WAIT_PRVDATA_COMPLETE_MASK (0x2000U)
-#define SDIF_CMD_WAIT_PRVDATA_COMPLETE_SHIFT (13U)
-/*! WAIT_PRVDATA_COMPLETE - Wait prvdata complete.
- */
-#define SDIF_CMD_WAIT_PRVDATA_COMPLETE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_WAIT_PRVDATA_COMPLETE_SHIFT)) & SDIF_CMD_WAIT_PRVDATA_COMPLETE_MASK)
-#define SDIF_CMD_STOP_ABORT_CMD_MASK (0x4000U)
-#define SDIF_CMD_STOP_ABORT_CMD_SHIFT (14U)
-/*! STOP_ABORT_CMD - Stop abort command.
- */
-#define SDIF_CMD_STOP_ABORT_CMD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_STOP_ABORT_CMD_SHIFT)) & SDIF_CMD_STOP_ABORT_CMD_MASK)
-#define SDIF_CMD_SEND_INITIALIZATION_MASK (0x8000U)
-#define SDIF_CMD_SEND_INITIALIZATION_SHIFT (15U)
-/*! SEND_INITIALIZATION - Send initialization.
- */
-#define SDIF_CMD_SEND_INITIALIZATION(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_SEND_INITIALIZATION_SHIFT)) & SDIF_CMD_SEND_INITIALIZATION_MASK)
-#define SDIF_CMD_CARD_NUMBER_MASK (0x1F0000U)
-#define SDIF_CMD_CARD_NUMBER_SHIFT (16U)
-/*! CARD_NUMBER - Specifies the card number of SDCARD for which the current Command is being executed
- * 0b00000..Command will be execute on SDCARD 0
- * 0b00001..Command will be execute on SDCARD 1
- */
-#define SDIF_CMD_CARD_NUMBER(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_CARD_NUMBER_SHIFT)) & SDIF_CMD_CARD_NUMBER_MASK)
-#define SDIF_CMD_UPDATE_CLOCK_REGISTERS_ONLY_MASK (0x200000U)
-#define SDIF_CMD_UPDATE_CLOCK_REGISTERS_ONLY_SHIFT (21U)
-/*! UPDATE_CLOCK_REGISTERS_ONLY - Update clock registers only.
- */
-#define SDIF_CMD_UPDATE_CLOCK_REGISTERS_ONLY(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_UPDATE_CLOCK_REGISTERS_ONLY_SHIFT)) & SDIF_CMD_UPDATE_CLOCK_REGISTERS_ONLY_MASK)
-#define SDIF_CMD_READ_CEATA_DEVICE_MASK (0x400000U)
-#define SDIF_CMD_READ_CEATA_DEVICE_SHIFT (22U)
-/*! READ_CEATA_DEVICE - Read ceata device.
- */
-#define SDIF_CMD_READ_CEATA_DEVICE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_READ_CEATA_DEVICE_SHIFT)) & SDIF_CMD_READ_CEATA_DEVICE_MASK)
-#define SDIF_CMD_CCS_EXPECTED_MASK (0x800000U)
-#define SDIF_CMD_CCS_EXPECTED_SHIFT (23U)
-/*! CCS_EXPECTED - CCS expected.
- */
-#define SDIF_CMD_CCS_EXPECTED(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_CCS_EXPECTED_SHIFT)) & SDIF_CMD_CCS_EXPECTED_MASK)
-#define SDIF_CMD_ENABLE_BOOT_MASK (0x1000000U)
-#define SDIF_CMD_ENABLE_BOOT_SHIFT (24U)
-/*! ENABLE_BOOT - Enable Boot - this bit should be set only for mandatory boot mode.
- */
-#define SDIF_CMD_ENABLE_BOOT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_ENABLE_BOOT_SHIFT)) & SDIF_CMD_ENABLE_BOOT_MASK)
-#define SDIF_CMD_EXPECT_BOOT_ACK_MASK (0x2000000U)
-#define SDIF_CMD_EXPECT_BOOT_ACK_SHIFT (25U)
-/*! EXPECT_BOOT_ACK - Expect Boot Acknowledge.
- */
-#define SDIF_CMD_EXPECT_BOOT_ACK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_EXPECT_BOOT_ACK_SHIFT)) & SDIF_CMD_EXPECT_BOOT_ACK_MASK)
-#define SDIF_CMD_DISABLE_BOOT_MASK (0x4000000U)
-#define SDIF_CMD_DISABLE_BOOT_SHIFT (26U)
-/*! DISABLE_BOOT - Disable Boot.
- */
-#define SDIF_CMD_DISABLE_BOOT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_DISABLE_BOOT_SHIFT)) & SDIF_CMD_DISABLE_BOOT_MASK)
-#define SDIF_CMD_BOOT_MODE_MASK (0x8000000U)
-#define SDIF_CMD_BOOT_MODE_SHIFT (27U)
-/*! BOOT_MODE - Boot Mode.
- */
-#define SDIF_CMD_BOOT_MODE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_BOOT_MODE_SHIFT)) & SDIF_CMD_BOOT_MODE_MASK)
-#define SDIF_CMD_VOLT_SWITCH_MASK (0x10000000U)
-#define SDIF_CMD_VOLT_SWITCH_SHIFT (28U)
-/*! VOLT_SWITCH - Voltage switch bit.
- */
-#define SDIF_CMD_VOLT_SWITCH(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_VOLT_SWITCH_SHIFT)) & SDIF_CMD_VOLT_SWITCH_MASK)
-#define SDIF_CMD_USE_HOLD_REG_MASK (0x20000000U)
-#define SDIF_CMD_USE_HOLD_REG_SHIFT (29U)
-/*! USE_HOLD_REG - Use Hold Register.
- */
-#define SDIF_CMD_USE_HOLD_REG(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_USE_HOLD_REG_SHIFT)) & SDIF_CMD_USE_HOLD_REG_MASK)
-#define SDIF_CMD_START_CMD_MASK (0x80000000U)
-#define SDIF_CMD_START_CMD_SHIFT (31U)
-/*! START_CMD - Start command.
- */
-#define SDIF_CMD_START_CMD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CMD_START_CMD_SHIFT)) & SDIF_CMD_START_CMD_MASK)
-/*! @} */
-
-/*! @name RESP - Response register */
-/*! @{ */
-#define SDIF_RESP_RESPONSE_MASK (0xFFFFFFFFU)
-#define SDIF_RESP_RESPONSE_SHIFT (0U)
-/*! RESPONSE - Bits of response.
- */
-#define SDIF_RESP_RESPONSE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RESP_RESPONSE_SHIFT)) & SDIF_RESP_RESPONSE_MASK)
-/*! @} */
-
-/* The count of SDIF_RESP */
-#define SDIF_RESP_COUNT (4U)
-
-/*! @name MINTSTS - Masked Interrupt Status register */
-/*! @{ */
-#define SDIF_MINTSTS_CDET_MASK (0x1U)
-#define SDIF_MINTSTS_CDET_SHIFT (0U)
-/*! CDET - Card detect.
- */
-#define SDIF_MINTSTS_CDET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_CDET_SHIFT)) & SDIF_MINTSTS_CDET_MASK)
-#define SDIF_MINTSTS_RE_MASK (0x2U)
-#define SDIF_MINTSTS_RE_SHIFT (1U)
-/*! RE - Response error.
- */
-#define SDIF_MINTSTS_RE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_RE_SHIFT)) & SDIF_MINTSTS_RE_MASK)
-#define SDIF_MINTSTS_CDONE_MASK (0x4U)
-#define SDIF_MINTSTS_CDONE_SHIFT (2U)
-/*! CDONE - Command done.
- */
-#define SDIF_MINTSTS_CDONE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_CDONE_SHIFT)) & SDIF_MINTSTS_CDONE_MASK)
-#define SDIF_MINTSTS_DTO_MASK (0x8U)
-#define SDIF_MINTSTS_DTO_SHIFT (3U)
-/*! DTO - Data transfer over.
- */
-#define SDIF_MINTSTS_DTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_DTO_SHIFT)) & SDIF_MINTSTS_DTO_MASK)
-#define SDIF_MINTSTS_TXDR_MASK (0x10U)
-#define SDIF_MINTSTS_TXDR_SHIFT (4U)
-/*! TXDR - Transmit FIFO data request.
- */
-#define SDIF_MINTSTS_TXDR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_TXDR_SHIFT)) & SDIF_MINTSTS_TXDR_MASK)
-#define SDIF_MINTSTS_RXDR_MASK (0x20U)
-#define SDIF_MINTSTS_RXDR_SHIFT (5U)
-/*! RXDR - Receive FIFO data request.
- */
-#define SDIF_MINTSTS_RXDR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_RXDR_SHIFT)) & SDIF_MINTSTS_RXDR_MASK)
-#define SDIF_MINTSTS_RCRC_MASK (0x40U)
-#define SDIF_MINTSTS_RCRC_SHIFT (6U)
-/*! RCRC - Response CRC error.
- */
-#define SDIF_MINTSTS_RCRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_RCRC_SHIFT)) & SDIF_MINTSTS_RCRC_MASK)
-#define SDIF_MINTSTS_DCRC_MASK (0x80U)
-#define SDIF_MINTSTS_DCRC_SHIFT (7U)
-/*! DCRC - Data CRC error.
- */
-#define SDIF_MINTSTS_DCRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_DCRC_SHIFT)) & SDIF_MINTSTS_DCRC_MASK)
-#define SDIF_MINTSTS_RTO_MASK (0x100U)
-#define SDIF_MINTSTS_RTO_SHIFT (8U)
-/*! RTO - Response time-out.
- */
-#define SDIF_MINTSTS_RTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_RTO_SHIFT)) & SDIF_MINTSTS_RTO_MASK)
-#define SDIF_MINTSTS_DRTO_MASK (0x200U)
-#define SDIF_MINTSTS_DRTO_SHIFT (9U)
-/*! DRTO - Data read time-out.
- */
-#define SDIF_MINTSTS_DRTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_DRTO_SHIFT)) & SDIF_MINTSTS_DRTO_MASK)
-#define SDIF_MINTSTS_HTO_MASK (0x400U)
-#define SDIF_MINTSTS_HTO_SHIFT (10U)
-/*! HTO - Data starvation-by-host time-out (HTO).
- */
-#define SDIF_MINTSTS_HTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_HTO_SHIFT)) & SDIF_MINTSTS_HTO_MASK)
-#define SDIF_MINTSTS_FRUN_MASK (0x800U)
-#define SDIF_MINTSTS_FRUN_SHIFT (11U)
-/*! FRUN - FIFO underrun/overrun error.
- */
-#define SDIF_MINTSTS_FRUN(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_FRUN_SHIFT)) & SDIF_MINTSTS_FRUN_MASK)
-#define SDIF_MINTSTS_HLE_MASK (0x1000U)
-#define SDIF_MINTSTS_HLE_SHIFT (12U)
-/*! HLE - Hardware locked write error.
- */
-#define SDIF_MINTSTS_HLE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_HLE_SHIFT)) & SDIF_MINTSTS_HLE_MASK)
-#define SDIF_MINTSTS_SBE_MASK (0x2000U)
-#define SDIF_MINTSTS_SBE_SHIFT (13U)
-/*! SBE - Start-bit error.
- */
-#define SDIF_MINTSTS_SBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_SBE_SHIFT)) & SDIF_MINTSTS_SBE_MASK)
-#define SDIF_MINTSTS_ACD_MASK (0x4000U)
-#define SDIF_MINTSTS_ACD_SHIFT (14U)
-/*! ACD - Auto command done.
- */
-#define SDIF_MINTSTS_ACD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_ACD_SHIFT)) & SDIF_MINTSTS_ACD_MASK)
-#define SDIF_MINTSTS_EBE_MASK (0x8000U)
-#define SDIF_MINTSTS_EBE_SHIFT (15U)
-/*! EBE - End-bit error (read)/write no CRC.
- */
-#define SDIF_MINTSTS_EBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_EBE_SHIFT)) & SDIF_MINTSTS_EBE_MASK)
-#define SDIF_MINTSTS_SDIO_INTERRUPT_MASK (0x10000U)
-#define SDIF_MINTSTS_SDIO_INTERRUPT_SHIFT (16U)
-/*! SDIO_INTERRUPT - Interrupt from SDIO card.
- */
-#define SDIF_MINTSTS_SDIO_INTERRUPT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_MINTSTS_SDIO_INTERRUPT_SHIFT)) & SDIF_MINTSTS_SDIO_INTERRUPT_MASK)
-/*! @} */
-
-/*! @name RINTSTS - Raw Interrupt Status register */
-/*! @{ */
-#define SDIF_RINTSTS_CDET_MASK (0x1U)
-#define SDIF_RINTSTS_CDET_SHIFT (0U)
-/*! CDET - Card detect.
- */
-#define SDIF_RINTSTS_CDET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_CDET_SHIFT)) & SDIF_RINTSTS_CDET_MASK)
-#define SDIF_RINTSTS_RE_MASK (0x2U)
-#define SDIF_RINTSTS_RE_SHIFT (1U)
-/*! RE - Response error.
- */
-#define SDIF_RINTSTS_RE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_RE_SHIFT)) & SDIF_RINTSTS_RE_MASK)
-#define SDIF_RINTSTS_CDONE_MASK (0x4U)
-#define SDIF_RINTSTS_CDONE_SHIFT (2U)
-/*! CDONE - Command done.
- */
-#define SDIF_RINTSTS_CDONE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_CDONE_SHIFT)) & SDIF_RINTSTS_CDONE_MASK)
-#define SDIF_RINTSTS_DTO_MASK (0x8U)
-#define SDIF_RINTSTS_DTO_SHIFT (3U)
-/*! DTO - Data transfer over.
- */
-#define SDIF_RINTSTS_DTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_DTO_SHIFT)) & SDIF_RINTSTS_DTO_MASK)
-#define SDIF_RINTSTS_TXDR_MASK (0x10U)
-#define SDIF_RINTSTS_TXDR_SHIFT (4U)
-/*! TXDR - Transmit FIFO data request.
- */
-#define SDIF_RINTSTS_TXDR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_TXDR_SHIFT)) & SDIF_RINTSTS_TXDR_MASK)
-#define SDIF_RINTSTS_RXDR_MASK (0x20U)
-#define SDIF_RINTSTS_RXDR_SHIFT (5U)
-/*! RXDR - Receive FIFO data request.
- */
-#define SDIF_RINTSTS_RXDR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_RXDR_SHIFT)) & SDIF_RINTSTS_RXDR_MASK)
-#define SDIF_RINTSTS_RCRC_MASK (0x40U)
-#define SDIF_RINTSTS_RCRC_SHIFT (6U)
-/*! RCRC - Response CRC error.
- */
-#define SDIF_RINTSTS_RCRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_RCRC_SHIFT)) & SDIF_RINTSTS_RCRC_MASK)
-#define SDIF_RINTSTS_DCRC_MASK (0x80U)
-#define SDIF_RINTSTS_DCRC_SHIFT (7U)
-/*! DCRC - Data CRC error.
- */
-#define SDIF_RINTSTS_DCRC(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_DCRC_SHIFT)) & SDIF_RINTSTS_DCRC_MASK)
-#define SDIF_RINTSTS_RTO_BAR_MASK (0x100U)
-#define SDIF_RINTSTS_RTO_BAR_SHIFT (8U)
-/*! RTO_BAR - Response time-out (RTO)/Boot Ack Received (BAR).
- */
-#define SDIF_RINTSTS_RTO_BAR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_RTO_BAR_SHIFT)) & SDIF_RINTSTS_RTO_BAR_MASK)
-#define SDIF_RINTSTS_DRTO_BDS_MASK (0x200U)
-#define SDIF_RINTSTS_DRTO_BDS_SHIFT (9U)
-/*! DRTO_BDS - Data read time-out (DRTO)/Boot Data Start (BDS).
- */
-#define SDIF_RINTSTS_DRTO_BDS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_DRTO_BDS_SHIFT)) & SDIF_RINTSTS_DRTO_BDS_MASK)
-#define SDIF_RINTSTS_HTO_MASK (0x400U)
-#define SDIF_RINTSTS_HTO_SHIFT (10U)
-/*! HTO - Data starvation-by-host time-out (HTO).
- */
-#define SDIF_RINTSTS_HTO(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_HTO_SHIFT)) & SDIF_RINTSTS_HTO_MASK)
-#define SDIF_RINTSTS_FRUN_MASK (0x800U)
-#define SDIF_RINTSTS_FRUN_SHIFT (11U)
-/*! FRUN - FIFO underrun/overrun error.
- */
-#define SDIF_RINTSTS_FRUN(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_FRUN_SHIFT)) & SDIF_RINTSTS_FRUN_MASK)
-#define SDIF_RINTSTS_HLE_MASK (0x1000U)
-#define SDIF_RINTSTS_HLE_SHIFT (12U)
-/*! HLE - Hardware locked write error.
- */
-#define SDIF_RINTSTS_HLE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_HLE_SHIFT)) & SDIF_RINTSTS_HLE_MASK)
-#define SDIF_RINTSTS_SBE_MASK (0x2000U)
-#define SDIF_RINTSTS_SBE_SHIFT (13U)
-/*! SBE - Start-bit error.
- */
-#define SDIF_RINTSTS_SBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_SBE_SHIFT)) & SDIF_RINTSTS_SBE_MASK)
-#define SDIF_RINTSTS_ACD_MASK (0x4000U)
-#define SDIF_RINTSTS_ACD_SHIFT (14U)
-/*! ACD - Auto command done.
- */
-#define SDIF_RINTSTS_ACD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_ACD_SHIFT)) & SDIF_RINTSTS_ACD_MASK)
-#define SDIF_RINTSTS_EBE_MASK (0x8000U)
-#define SDIF_RINTSTS_EBE_SHIFT (15U)
-/*! EBE - End-bit error (read)/write no CRC.
- */
-#define SDIF_RINTSTS_EBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_EBE_SHIFT)) & SDIF_RINTSTS_EBE_MASK)
-#define SDIF_RINTSTS_SDIO_INTERRUPT_MASK (0x10000U)
-#define SDIF_RINTSTS_SDIO_INTERRUPT_SHIFT (16U)
-/*! SDIO_INTERRUPT - Interrupt from SDIO card.
- */
-#define SDIF_RINTSTS_SDIO_INTERRUPT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RINTSTS_SDIO_INTERRUPT_SHIFT)) & SDIF_RINTSTS_SDIO_INTERRUPT_MASK)
-/*! @} */
-
-/*! @name STATUS - Status register */
-/*! @{ */
-#define SDIF_STATUS_FIFO_RX_WATERMARK_MASK (0x1U)
-#define SDIF_STATUS_FIFO_RX_WATERMARK_SHIFT (0U)
-/*! FIFO_RX_WATERMARK - FIFO reached Receive watermark level; not qualified with data transfer.
- */
-#define SDIF_STATUS_FIFO_RX_WATERMARK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_FIFO_RX_WATERMARK_SHIFT)) & SDIF_STATUS_FIFO_RX_WATERMARK_MASK)
-#define SDIF_STATUS_FIFO_TX_WATERMARK_MASK (0x2U)
-#define SDIF_STATUS_FIFO_TX_WATERMARK_SHIFT (1U)
-/*! FIFO_TX_WATERMARK - FIFO reached Transmit watermark level; not qualified with data transfer.
- */
-#define SDIF_STATUS_FIFO_TX_WATERMARK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_FIFO_TX_WATERMARK_SHIFT)) & SDIF_STATUS_FIFO_TX_WATERMARK_MASK)
-#define SDIF_STATUS_FIFO_EMPTY_MASK (0x4U)
-#define SDIF_STATUS_FIFO_EMPTY_SHIFT (2U)
-/*! FIFO_EMPTY - FIFO is empty status.
- */
-#define SDIF_STATUS_FIFO_EMPTY(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_FIFO_EMPTY_SHIFT)) & SDIF_STATUS_FIFO_EMPTY_MASK)
-#define SDIF_STATUS_FIFO_FULL_MASK (0x8U)
-#define SDIF_STATUS_FIFO_FULL_SHIFT (3U)
-/*! FIFO_FULL - FIFO is full status.
- */
-#define SDIF_STATUS_FIFO_FULL(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_FIFO_FULL_SHIFT)) & SDIF_STATUS_FIFO_FULL_MASK)
-#define SDIF_STATUS_CMDFSMSTATES_MASK (0xF0U)
-#define SDIF_STATUS_CMDFSMSTATES_SHIFT (4U)
-/*! CMDFSMSTATES - Command FSM states: 0 - Idle 1 - Send init sequence 2 - Tx cmd start bit 3 - Tx
- * cmd tx bit 4 - Tx cmd index + arg 5 - Tx cmd crc7 6 - Tx cmd end bit 7 - Rx resp start bit 8 -
- * Rx resp IRQ response 9 - Rx resp tx bit 10 - Rx resp cmd idx 11 - Rx resp data 12 - Rx resp
- * crc7 13 - Rx resp end bit 14 - Cmd path wait NCC 15 - Wait; CMD-to-response turnaround NOTE: The
- * command FSM state is represented using 19 bits.
- */
-#define SDIF_STATUS_CMDFSMSTATES(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_CMDFSMSTATES_SHIFT)) & SDIF_STATUS_CMDFSMSTATES_MASK)
-#define SDIF_STATUS_DATA_3_STATUS_MASK (0x100U)
-#define SDIF_STATUS_DATA_3_STATUS_SHIFT (8U)
-/*! DATA_3_STATUS - Raw selected card_data[3]; checks whether card is present 0 - card not present 1 - card present.
- */
-#define SDIF_STATUS_DATA_3_STATUS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_DATA_3_STATUS_SHIFT)) & SDIF_STATUS_DATA_3_STATUS_MASK)
-#define SDIF_STATUS_DATA_BUSY_MASK (0x200U)
-#define SDIF_STATUS_DATA_BUSY_SHIFT (9U)
-/*! DATA_BUSY - Inverted version of raw selected card_data[0] 0 - card data not busy 1 - card data busy.
- */
-#define SDIF_STATUS_DATA_BUSY(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_DATA_BUSY_SHIFT)) & SDIF_STATUS_DATA_BUSY_MASK)
-#define SDIF_STATUS_DATA_STATE_MC_BUSY_MASK (0x400U)
-#define SDIF_STATUS_DATA_STATE_MC_BUSY_SHIFT (10U)
-/*! DATA_STATE_MC_BUSY - Data transmit or receive state-machine is busy.
- */
-#define SDIF_STATUS_DATA_STATE_MC_BUSY(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_DATA_STATE_MC_BUSY_SHIFT)) & SDIF_STATUS_DATA_STATE_MC_BUSY_MASK)
-#define SDIF_STATUS_RESPONSE_INDEX_MASK (0x1F800U)
-#define SDIF_STATUS_RESPONSE_INDEX_SHIFT (11U)
-/*! RESPONSE_INDEX - Index of previous response, including any auto-stop sent by core.
- */
-#define SDIF_STATUS_RESPONSE_INDEX(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_RESPONSE_INDEX_SHIFT)) & SDIF_STATUS_RESPONSE_INDEX_MASK)
-#define SDIF_STATUS_FIFO_COUNT_MASK (0x3FFE0000U)
-#define SDIF_STATUS_FIFO_COUNT_SHIFT (17U)
-/*! FIFO_COUNT - FIFO count - Number of filled locations in FIFO.
- */
-#define SDIF_STATUS_FIFO_COUNT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_FIFO_COUNT_SHIFT)) & SDIF_STATUS_FIFO_COUNT_MASK)
-#define SDIF_STATUS_DMA_ACK_MASK (0x40000000U)
-#define SDIF_STATUS_DMA_ACK_SHIFT (30U)
-/*! DMA_ACK - DMA acknowledge signal state.
- */
-#define SDIF_STATUS_DMA_ACK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_DMA_ACK_SHIFT)) & SDIF_STATUS_DMA_ACK_MASK)
-#define SDIF_STATUS_DMA_REQ_MASK (0x80000000U)
-#define SDIF_STATUS_DMA_REQ_SHIFT (31U)
-/*! DMA_REQ - DMA request signal state.
- */
-#define SDIF_STATUS_DMA_REQ(x) (((uint32_t)(((uint32_t)(x)) << SDIF_STATUS_DMA_REQ_SHIFT)) & SDIF_STATUS_DMA_REQ_MASK)
-/*! @} */
-
-/*! @name FIFOTH - FIFO Threshold Watermark register */
-/*! @{ */
-#define SDIF_FIFOTH_TX_WMARK_MASK (0xFFFU)
-#define SDIF_FIFOTH_TX_WMARK_SHIFT (0U)
-/*! TX_WMARK - FIFO threshold watermark level when transmitting data to card.
- */
-#define SDIF_FIFOTH_TX_WMARK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_FIFOTH_TX_WMARK_SHIFT)) & SDIF_FIFOTH_TX_WMARK_MASK)
-#define SDIF_FIFOTH_RX_WMARK_MASK (0xFFF0000U)
-#define SDIF_FIFOTH_RX_WMARK_SHIFT (16U)
-/*! RX_WMARK - FIFO threshold watermark level when receiving data to card.
- */
-#define SDIF_FIFOTH_RX_WMARK(x) (((uint32_t)(((uint32_t)(x)) << SDIF_FIFOTH_RX_WMARK_SHIFT)) & SDIF_FIFOTH_RX_WMARK_MASK)
-#define SDIF_FIFOTH_DMA_MTS_MASK (0x70000000U)
-#define SDIF_FIFOTH_DMA_MTS_SHIFT (28U)
-/*! DMA_MTS - Burst size of multiple transaction; should be programmed same as DW-DMA controller
- * multiple-transaction-size SRC/DEST_MSIZE.
- */
-#define SDIF_FIFOTH_DMA_MTS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_FIFOTH_DMA_MTS_SHIFT)) & SDIF_FIFOTH_DMA_MTS_MASK)
-/*! @} */
-
-/*! @name CDETECT - Card Detect register */
-/*! @{ */
-#define SDIF_CDETECT_CARD0_DETECT_MASK (0x1U)
-#define SDIF_CDETECT_CARD0_DETECT_SHIFT (0U)
-/*! CARD0_DETECT - Card 0 detect
- */
-#define SDIF_CDETECT_CARD0_DETECT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CDETECT_CARD0_DETECT_SHIFT)) & SDIF_CDETECT_CARD0_DETECT_MASK)
-#define SDIF_CDETECT_CARD1_DETECT_MASK (0x2U)
-#define SDIF_CDETECT_CARD1_DETECT_SHIFT (1U)
-/*! CARD1_DETECT - Card 1 detect
- */
-#define SDIF_CDETECT_CARD1_DETECT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CDETECT_CARD1_DETECT_SHIFT)) & SDIF_CDETECT_CARD1_DETECT_MASK)
-/*! @} */
-
-/*! @name WRTPRT - Write Protect register */
-/*! @{ */
-#define SDIF_WRTPRT_WRITE_PROTECT_MASK (0x1U)
-#define SDIF_WRTPRT_WRITE_PROTECT_SHIFT (0U)
-/*! WRITE_PROTECT - Write protect.
- */
-#define SDIF_WRTPRT_WRITE_PROTECT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_WRTPRT_WRITE_PROTECT_SHIFT)) & SDIF_WRTPRT_WRITE_PROTECT_MASK)
-/*! @} */
-
-/*! @name TCBCNT - Transferred CIU Card Byte Count register */
-/*! @{ */
-#define SDIF_TCBCNT_TRANS_CARD_BYTE_COUNT_MASK (0xFFFFFFFFU)
-#define SDIF_TCBCNT_TRANS_CARD_BYTE_COUNT_SHIFT (0U)
-/*! TRANS_CARD_BYTE_COUNT - Number of bytes transferred by CIU unit to card.
- */
-#define SDIF_TCBCNT_TRANS_CARD_BYTE_COUNT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_TCBCNT_TRANS_CARD_BYTE_COUNT_SHIFT)) & SDIF_TCBCNT_TRANS_CARD_BYTE_COUNT_MASK)
-/*! @} */
-
-/*! @name TBBCNT - Transferred Host to BIU-FIFO Byte Count register */
-/*! @{ */
-#define SDIF_TBBCNT_TRANS_FIFO_BYTE_COUNT_MASK (0xFFFFFFFFU)
-#define SDIF_TBBCNT_TRANS_FIFO_BYTE_COUNT_SHIFT (0U)
-/*! TRANS_FIFO_BYTE_COUNT - Number of bytes transferred between Host/DMA memory and BIU FIFO.
- */
-#define SDIF_TBBCNT_TRANS_FIFO_BYTE_COUNT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_TBBCNT_TRANS_FIFO_BYTE_COUNT_SHIFT)) & SDIF_TBBCNT_TRANS_FIFO_BYTE_COUNT_MASK)
-/*! @} */
-
-/*! @name DEBNCE - Debounce Count register */
-/*! @{ */
-#define SDIF_DEBNCE_DEBOUNCE_COUNT_MASK (0xFFFFFFU)
-#define SDIF_DEBNCE_DEBOUNCE_COUNT_SHIFT (0U)
-/*! DEBOUNCE_COUNT - Number of host clocks (SD_CLK) used by debounce filter logic for card detect; typical debounce time is 5-25 ms.
- */
-#define SDIF_DEBNCE_DEBOUNCE_COUNT(x) (((uint32_t)(((uint32_t)(x)) << SDIF_DEBNCE_DEBOUNCE_COUNT_SHIFT)) & SDIF_DEBNCE_DEBOUNCE_COUNT_MASK)
-/*! @} */
-
-/*! @name RST_N - Hardware Reset */
-/*! @{ */
-#define SDIF_RST_N_CARD_RESET_MASK (0x1U)
-#define SDIF_RST_N_CARD_RESET_SHIFT (0U)
-/*! CARD_RESET - Hardware reset.
- */
-#define SDIF_RST_N_CARD_RESET(x) (((uint32_t)(((uint32_t)(x)) << SDIF_RST_N_CARD_RESET_SHIFT)) & SDIF_RST_N_CARD_RESET_MASK)
-/*! @} */
-
-/*! @name BMOD - Bus Mode register */
-/*! @{ */
-#define SDIF_BMOD_SWR_MASK (0x1U)
-#define SDIF_BMOD_SWR_SHIFT (0U)
-/*! SWR - Software Reset.
- */
-#define SDIF_BMOD_SWR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BMOD_SWR_SHIFT)) & SDIF_BMOD_SWR_MASK)
-#define SDIF_BMOD_FB_MASK (0x2U)
-#define SDIF_BMOD_FB_SHIFT (1U)
-/*! FB - Fixed Burst.
- */
-#define SDIF_BMOD_FB(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BMOD_FB_SHIFT)) & SDIF_BMOD_FB_MASK)
-#define SDIF_BMOD_DSL_MASK (0x7CU)
-#define SDIF_BMOD_DSL_SHIFT (2U)
-/*! DSL - Descriptor Skip Length.
- */
-#define SDIF_BMOD_DSL(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BMOD_DSL_SHIFT)) & SDIF_BMOD_DSL_MASK)
-#define SDIF_BMOD_DE_MASK (0x80U)
-#define SDIF_BMOD_DE_SHIFT (7U)
-/*! DE - SD/MMC DMA Enable.
- */
-#define SDIF_BMOD_DE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BMOD_DE_SHIFT)) & SDIF_BMOD_DE_MASK)
-#define SDIF_BMOD_PBL_MASK (0x700U)
-#define SDIF_BMOD_PBL_SHIFT (8U)
-/*! PBL - Programmable Burst Length.
- */
-#define SDIF_BMOD_PBL(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BMOD_PBL_SHIFT)) & SDIF_BMOD_PBL_MASK)
-/*! @} */
-
-/*! @name PLDMND - Poll Demand register */
-/*! @{ */
-#define SDIF_PLDMND_PD_MASK (0xFFFFFFFFU)
-#define SDIF_PLDMND_PD_SHIFT (0U)
-/*! PD - Poll Demand.
- */
-#define SDIF_PLDMND_PD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_PLDMND_PD_SHIFT)) & SDIF_PLDMND_PD_MASK)
-/*! @} */
-
-/*! @name DBADDR - Descriptor List Base Address register */
-/*! @{ */
-#define SDIF_DBADDR_SDL_MASK (0xFFFFFFFFU)
-#define SDIF_DBADDR_SDL_SHIFT (0U)
-/*! SDL - Start of Descriptor List.
- */
-#define SDIF_DBADDR_SDL(x) (((uint32_t)(((uint32_t)(x)) << SDIF_DBADDR_SDL_SHIFT)) & SDIF_DBADDR_SDL_MASK)
-/*! @} */
-
-/*! @name IDSTS - Internal DMAC Status register */
-/*! @{ */
-#define SDIF_IDSTS_TI_MASK (0x1U)
-#define SDIF_IDSTS_TI_SHIFT (0U)
-/*! TI - Transmit Interrupt.
- */
-#define SDIF_IDSTS_TI(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_TI_SHIFT)) & SDIF_IDSTS_TI_MASK)
-#define SDIF_IDSTS_RI_MASK (0x2U)
-#define SDIF_IDSTS_RI_SHIFT (1U)
-/*! RI - Receive Interrupt.
- */
-#define SDIF_IDSTS_RI(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_RI_SHIFT)) & SDIF_IDSTS_RI_MASK)
-#define SDIF_IDSTS_FBE_MASK (0x4U)
-#define SDIF_IDSTS_FBE_SHIFT (2U)
-/*! FBE - Fatal Bus Error Interrupt.
- */
-#define SDIF_IDSTS_FBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_FBE_SHIFT)) & SDIF_IDSTS_FBE_MASK)
-#define SDIF_IDSTS_DU_MASK (0x10U)
-#define SDIF_IDSTS_DU_SHIFT (4U)
-/*! DU - Descriptor Unavailable Interrupt.
- */
-#define SDIF_IDSTS_DU(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_DU_SHIFT)) & SDIF_IDSTS_DU_MASK)
-#define SDIF_IDSTS_CES_MASK (0x20U)
-#define SDIF_IDSTS_CES_SHIFT (5U)
-/*! CES - Card Error Summary.
- */
-#define SDIF_IDSTS_CES(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_CES_SHIFT)) & SDIF_IDSTS_CES_MASK)
-#define SDIF_IDSTS_NIS_MASK (0x100U)
-#define SDIF_IDSTS_NIS_SHIFT (8U)
-/*! NIS - Normal Interrupt Summary.
- */
-#define SDIF_IDSTS_NIS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_NIS_SHIFT)) & SDIF_IDSTS_NIS_MASK)
-#define SDIF_IDSTS_AIS_MASK (0x200U)
-#define SDIF_IDSTS_AIS_SHIFT (9U)
-/*! AIS - Abnormal Interrupt Summary.
- */
-#define SDIF_IDSTS_AIS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_AIS_SHIFT)) & SDIF_IDSTS_AIS_MASK)
-#define SDIF_IDSTS_EB_MASK (0x1C00U)
-#define SDIF_IDSTS_EB_SHIFT (10U)
-/*! EB - Error Bits.
- */
-#define SDIF_IDSTS_EB(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_EB_SHIFT)) & SDIF_IDSTS_EB_MASK)
-#define SDIF_IDSTS_FSM_MASK (0x1E000U)
-#define SDIF_IDSTS_FSM_SHIFT (13U)
-/*! FSM - DMAC state machine present state.
- */
-#define SDIF_IDSTS_FSM(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDSTS_FSM_SHIFT)) & SDIF_IDSTS_FSM_MASK)
-/*! @} */
-
-/*! @name IDINTEN - Internal DMAC Interrupt Enable register */
-/*! @{ */
-#define SDIF_IDINTEN_TI_MASK (0x1U)
-#define SDIF_IDINTEN_TI_SHIFT (0U)
-/*! TI - Transmit Interrupt Enable.
- */
-#define SDIF_IDINTEN_TI(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_TI_SHIFT)) & SDIF_IDINTEN_TI_MASK)
-#define SDIF_IDINTEN_RI_MASK (0x2U)
-#define SDIF_IDINTEN_RI_SHIFT (1U)
-/*! RI - Receive Interrupt Enable.
- */
-#define SDIF_IDINTEN_RI(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_RI_SHIFT)) & SDIF_IDINTEN_RI_MASK)
-#define SDIF_IDINTEN_FBE_MASK (0x4U)
-#define SDIF_IDINTEN_FBE_SHIFT (2U)
-/*! FBE - Fatal Bus Error Enable.
- */
-#define SDIF_IDINTEN_FBE(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_FBE_SHIFT)) & SDIF_IDINTEN_FBE_MASK)
-#define SDIF_IDINTEN_DU_MASK (0x10U)
-#define SDIF_IDINTEN_DU_SHIFT (4U)
-/*! DU - Descriptor Unavailable Interrupt.
- */
-#define SDIF_IDINTEN_DU(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_DU_SHIFT)) & SDIF_IDINTEN_DU_MASK)
-#define SDIF_IDINTEN_CES_MASK (0x20U)
-#define SDIF_IDINTEN_CES_SHIFT (5U)
-/*! CES - Card Error summary Interrupt Enable.
- */
-#define SDIF_IDINTEN_CES(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_CES_SHIFT)) & SDIF_IDINTEN_CES_MASK)
-#define SDIF_IDINTEN_NIS_MASK (0x100U)
-#define SDIF_IDINTEN_NIS_SHIFT (8U)
-/*! NIS - Normal Interrupt Summary Enable.
- */
-#define SDIF_IDINTEN_NIS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_NIS_SHIFT)) & SDIF_IDINTEN_NIS_MASK)
-#define SDIF_IDINTEN_AIS_MASK (0x200U)
-#define SDIF_IDINTEN_AIS_SHIFT (9U)
-/*! AIS - Abnormal Interrupt Summary Enable.
- */
-#define SDIF_IDINTEN_AIS(x) (((uint32_t)(((uint32_t)(x)) << SDIF_IDINTEN_AIS_SHIFT)) & SDIF_IDINTEN_AIS_MASK)
-/*! @} */
-
-/*! @name DSCADDR - Current Host Descriptor Address register */
-/*! @{ */
-#define SDIF_DSCADDR_HDA_MASK (0xFFFFFFFFU)
-#define SDIF_DSCADDR_HDA_SHIFT (0U)
-/*! HDA - Host Descriptor Address Pointer.
- */
-#define SDIF_DSCADDR_HDA(x) (((uint32_t)(((uint32_t)(x)) << SDIF_DSCADDR_HDA_SHIFT)) & SDIF_DSCADDR_HDA_MASK)
-/*! @} */
-
-/*! @name BUFADDR - Current Buffer Descriptor Address register */
-/*! @{ */
-#define SDIF_BUFADDR_HBA_MASK (0xFFFFFFFFU)
-#define SDIF_BUFADDR_HBA_SHIFT (0U)
-/*! HBA - Host Buffer Address Pointer.
- */
-#define SDIF_BUFADDR_HBA(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BUFADDR_HBA_SHIFT)) & SDIF_BUFADDR_HBA_MASK)
-/*! @} */
-
-/*! @name CARDTHRCTL - Card Threshold Control */
-/*! @{ */
-#define SDIF_CARDTHRCTL_CARDRDTHREN_MASK (0x1U)
-#define SDIF_CARDTHRCTL_CARDRDTHREN_SHIFT (0U)
-/*! CARDRDTHREN - Card Read Threshold Enable.
- */
-#define SDIF_CARDTHRCTL_CARDRDTHREN(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CARDTHRCTL_CARDRDTHREN_SHIFT)) & SDIF_CARDTHRCTL_CARDRDTHREN_MASK)
-#define SDIF_CARDTHRCTL_BSYCLRINTEN_MASK (0x2U)
-#define SDIF_CARDTHRCTL_BSYCLRINTEN_SHIFT (1U)
-/*! BSYCLRINTEN - Busy Clear Interrupt Enable.
- */
-#define SDIF_CARDTHRCTL_BSYCLRINTEN(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CARDTHRCTL_BSYCLRINTEN_SHIFT)) & SDIF_CARDTHRCTL_BSYCLRINTEN_MASK)
-#define SDIF_CARDTHRCTL_CARDTHRESHOLD_MASK (0xFF0000U)
-#define SDIF_CARDTHRCTL_CARDTHRESHOLD_SHIFT (16U)
-/*! CARDTHRESHOLD - Card Threshold size.
- */
-#define SDIF_CARDTHRCTL_CARDTHRESHOLD(x) (((uint32_t)(((uint32_t)(x)) << SDIF_CARDTHRCTL_CARDTHRESHOLD_SHIFT)) & SDIF_CARDTHRCTL_CARDTHRESHOLD_MASK)
-/*! @} */
-
-/*! @name BACKENDPWR - Power control */
-/*! @{ */
-#define SDIF_BACKENDPWR_BACKENDPWR_MASK (0x1U)
-#define SDIF_BACKENDPWR_BACKENDPWR_SHIFT (0U)
-/*! BACKENDPWR - Back-end Power control for card application.
- */
-#define SDIF_BACKENDPWR_BACKENDPWR(x) (((uint32_t)(((uint32_t)(x)) << SDIF_BACKENDPWR_BACKENDPWR_SHIFT)) & SDIF_BACKENDPWR_BACKENDPWR_MASK)
-/*! @} */
-
-/*! @name FIFO - SDIF FIFO */
-/*! @{ */
-#define SDIF_FIFO_DATA_MASK (0xFFFFFFFFU)
-#define SDIF_FIFO_DATA_SHIFT (0U)
-/*! DATA - SDIF FIFO.
- */
-#define SDIF_FIFO_DATA(x) (((uint32_t)(((uint32_t)(x)) << SDIF_FIFO_DATA_SHIFT)) & SDIF_FIFO_DATA_MASK)
-/*! @} */
-
-/* The count of SDIF_FIFO */
-#define SDIF_FIFO_COUNT (64U)
-
-
-/*!
- * @}
- */ /* end of group SDIF_Register_Masks */
-
-
-/* SDIF - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral SDIF base address */
- #define SDIF_BASE (0x5009B000u)
- /** Peripheral SDIF base address */
- #define SDIF_BASE_NS (0x4009B000u)
- /** Peripheral SDIF base pointer */
- #define SDIF ((SDIF_Type *)SDIF_BASE)
- /** Peripheral SDIF base pointer */
- #define SDIF_NS ((SDIF_Type *)SDIF_BASE_NS)
- /** Array initializer of SDIF peripheral base addresses */
- #define SDIF_BASE_ADDRS { SDIF_BASE }
- /** Array initializer of SDIF peripheral base pointers */
- #define SDIF_BASE_PTRS { SDIF }
- /** Array initializer of SDIF peripheral base addresses */
- #define SDIF_BASE_ADDRS_NS { SDIF_BASE_NS }
- /** Array initializer of SDIF peripheral base pointers */
- #define SDIF_BASE_PTRS_NS { SDIF_NS }
-#else
- /** Peripheral SDIF base address */
- #define SDIF_BASE (0x4009B000u)
- /** Peripheral SDIF base pointer */
- #define SDIF ((SDIF_Type *)SDIF_BASE)
- /** Array initializer of SDIF peripheral base addresses */
- #define SDIF_BASE_ADDRS { SDIF_BASE }
- /** Array initializer of SDIF peripheral base pointers */
- #define SDIF_BASE_PTRS { SDIF }
-#endif
-/** Interrupt vectors for the SDIF peripheral type */
-#define SDIF_IRQS { SDIO_IRQn }
-
-/*!
- * @}
- */ /* end of group SDIF_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- SPI Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SPI_Peripheral_Access_Layer SPI Peripheral Access Layer
- * @{
- */
-
-/** SPI - Register Layout Typedef */
-typedef struct {
- uint8_t RESERVED_0[1024];
- __IO uint32_t CFG; /**< SPI Configuration register, offset: 0x400 */
- __IO uint32_t DLY; /**< SPI Delay register, offset: 0x404 */
- __IO uint32_t STAT; /**< SPI Status. Some status flags can be cleared by writing a 1 to that bit position., offset: 0x408 */
- __IO uint32_t INTENSET; /**< SPI Interrupt Enable read and Set. A complete value may be read from this register. Writing a 1 to any implemented bit position causes that bit to be set., offset: 0x40C */
- __O uint32_t INTENCLR; /**< SPI Interrupt Enable Clear. Writing a 1 to any implemented bit position causes the corresponding bit in INTENSET to be cleared., offset: 0x410 */
- uint8_t RESERVED_1[16];
- __IO uint32_t DIV; /**< SPI clock Divider, offset: 0x424 */
- __I uint32_t INTSTAT; /**< SPI Interrupt Status, offset: 0x428 */
- uint8_t RESERVED_2[2516];
- __IO uint32_t FIFOCFG; /**< FIFO configuration and enable register., offset: 0xE00 */
- __IO uint32_t FIFOSTAT; /**< FIFO status register., offset: 0xE04 */
- __IO uint32_t FIFOTRIG; /**< FIFO trigger settings for interrupt and DMA request., offset: 0xE08 */
- uint8_t RESERVED_3[4];
- __IO uint32_t FIFOINTENSET; /**< FIFO interrupt enable set (enable) and read register., offset: 0xE10 */
- __IO uint32_t FIFOINTENCLR; /**< FIFO interrupt enable clear (disable) and read register., offset: 0xE14 */
- __I uint32_t FIFOINTSTAT; /**< FIFO interrupt status register., offset: 0xE18 */
- uint8_t RESERVED_4[4];
- __O uint32_t FIFOWR; /**< FIFO write data., offset: 0xE20 */
- uint8_t RESERVED_5[12];
- __I uint32_t FIFORD; /**< FIFO read data., offset: 0xE30 */
- uint8_t RESERVED_6[12];
- __I uint32_t FIFORDNOPOP; /**< FIFO data read with no FIFO pop., offset: 0xE40 */
- uint8_t RESERVED_7[440];
- __I uint32_t ID; /**< Peripheral identification register., offset: 0xFFC */
-} SPI_Type;
-
-/* ----------------------------------------------------------------------------
- -- SPI Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SPI_Register_Masks SPI Register Masks
- * @{
- */
-
-/*! @name CFG - SPI Configuration register */
-/*! @{ */
-#define SPI_CFG_ENABLE_MASK (0x1U)
-#define SPI_CFG_ENABLE_SHIFT (0U)
-/*! ENABLE - SPI enable.
- * 0b0..Disabled. The SPI is disabled and the internal state machine and counters are reset.
- * 0b1..Enabled. The SPI is enabled for operation.
- */
-#define SPI_CFG_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_ENABLE_SHIFT)) & SPI_CFG_ENABLE_MASK)
-#define SPI_CFG_MASTER_MASK (0x4U)
-#define SPI_CFG_MASTER_SHIFT (2U)
-/*! MASTER - Master mode select.
- * 0b0..Slave mode. The SPI will operate in slave mode. SCK, MOSI, and the SSEL signals are inputs, MISO is an output.
- * 0b1..Master mode. The SPI will operate in master mode. SCK, MOSI, and the SSEL signals are outputs, MISO is an input.
- */
-#define SPI_CFG_MASTER(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_MASTER_SHIFT)) & SPI_CFG_MASTER_MASK)
-#define SPI_CFG_LSBF_MASK (0x8U)
-#define SPI_CFG_LSBF_SHIFT (3U)
-/*! LSBF - LSB First mode enable.
- * 0b0..Standard. Data is transmitted and received in standard MSB first order.
- * 0b1..Reverse. Data is transmitted and received in reverse order (LSB first).
- */
-#define SPI_CFG_LSBF(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_LSBF_SHIFT)) & SPI_CFG_LSBF_MASK)
-#define SPI_CFG_CPHA_MASK (0x10U)
-#define SPI_CFG_CPHA_SHIFT (4U)
-/*! CPHA - Clock Phase select.
- * 0b0..Change. The SPI captures serial data on the first clock transition of the transfer (when the clock
- * changes away from the rest state). Data is changed on the following edge.
- * 0b1..Capture. The SPI changes serial data on the first clock transition of the transfer (when the clock
- * changes away from the rest state). Data is captured on the following edge.
- */
-#define SPI_CFG_CPHA(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_CPHA_SHIFT)) & SPI_CFG_CPHA_MASK)
-#define SPI_CFG_CPOL_MASK (0x20U)
-#define SPI_CFG_CPOL_SHIFT (5U)
-/*! CPOL - Clock Polarity select.
- * 0b0..Low. The rest state of the clock (between transfers) is low.
- * 0b1..High. The rest state of the clock (between transfers) is high.
- */
-#define SPI_CFG_CPOL(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_CPOL_SHIFT)) & SPI_CFG_CPOL_MASK)
-#define SPI_CFG_LOOP_MASK (0x80U)
-#define SPI_CFG_LOOP_SHIFT (7U)
-/*! LOOP - Loopback mode enable. Loopback mode applies only to Master mode, and connects transmit
- * and receive data connected together to allow simple software testing.
- * 0b0..Disabled.
- * 0b1..Enabled.
- */
-#define SPI_CFG_LOOP(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_LOOP_SHIFT)) & SPI_CFG_LOOP_MASK)
-#define SPI_CFG_SPOL0_MASK (0x100U)
-#define SPI_CFG_SPOL0_SHIFT (8U)
-/*! SPOL0 - SSEL0 Polarity select.
- * 0b0..Low. The SSEL0 pin is active low.
- * 0b1..High. The SSEL0 pin is active high.
- */
-#define SPI_CFG_SPOL0(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_SPOL0_SHIFT)) & SPI_CFG_SPOL0_MASK)
-#define SPI_CFG_SPOL1_MASK (0x200U)
-#define SPI_CFG_SPOL1_SHIFT (9U)
-/*! SPOL1 - SSEL1 Polarity select.
- * 0b0..Low. The SSEL1 pin is active low.
- * 0b1..High. The SSEL1 pin is active high.
- */
-#define SPI_CFG_SPOL1(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_SPOL1_SHIFT)) & SPI_CFG_SPOL1_MASK)
-#define SPI_CFG_SPOL2_MASK (0x400U)
-#define SPI_CFG_SPOL2_SHIFT (10U)
-/*! SPOL2 - SSEL2 Polarity select.
- * 0b0..Low. The SSEL2 pin is active low.
- * 0b1..High. The SSEL2 pin is active high.
- */
-#define SPI_CFG_SPOL2(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_SPOL2_SHIFT)) & SPI_CFG_SPOL2_MASK)
-#define SPI_CFG_SPOL3_MASK (0x800U)
-#define SPI_CFG_SPOL3_SHIFT (11U)
-/*! SPOL3 - SSEL3 Polarity select.
- * 0b0..Low. The SSEL3 pin is active low.
- * 0b1..High. The SSEL3 pin is active high.
- */
-#define SPI_CFG_SPOL3(x) (((uint32_t)(((uint32_t)(x)) << SPI_CFG_SPOL3_SHIFT)) & SPI_CFG_SPOL3_MASK)
-/*! @} */
-
-/*! @name DLY - SPI Delay register */
-/*! @{ */
-#define SPI_DLY_PRE_DELAY_MASK (0xFU)
-#define SPI_DLY_PRE_DELAY_SHIFT (0U)
-/*! PRE_DELAY - Controls the amount of time between SSEL assertion and the beginning of a data
- * transfer. There is always one SPI clock time between SSEL assertion and the first clock edge. This
- * is not considered part of the pre-delay. 0x0 = No additional time is inserted. 0x1 = 1 SPI
- * clock time is inserted. 0x2 = 2 SPI clock times are inserted. 0xF = 15 SPI clock times are
- * inserted.
- */
-#define SPI_DLY_PRE_DELAY(x) (((uint32_t)(((uint32_t)(x)) << SPI_DLY_PRE_DELAY_SHIFT)) & SPI_DLY_PRE_DELAY_MASK)
-#define SPI_DLY_POST_DELAY_MASK (0xF0U)
-#define SPI_DLY_POST_DELAY_SHIFT (4U)
-/*! POST_DELAY - Controls the amount of time between the end of a data transfer and SSEL
- * deassertion. 0x0 = No additional time is inserted. 0x1 = 1 SPI clock time is inserted. 0x2 = 2 SPI clock
- * times are inserted. 0xF = 15 SPI clock times are inserted.
- */
-#define SPI_DLY_POST_DELAY(x) (((uint32_t)(((uint32_t)(x)) << SPI_DLY_POST_DELAY_SHIFT)) & SPI_DLY_POST_DELAY_MASK)
-#define SPI_DLY_FRAME_DELAY_MASK (0xF00U)
-#define SPI_DLY_FRAME_DELAY_SHIFT (8U)
-/*! FRAME_DELAY - If the EOF flag is set, controls the minimum amount of time between the current
- * frame and the next frame (or SSEL deassertion if EOT). 0x0 = No additional time is inserted. 0x1
- * = 1 SPI clock time is inserted. 0x2 = 2 SPI clock times are inserted. 0xF = 15 SPI clock
- * times are inserted.
- */
-#define SPI_DLY_FRAME_DELAY(x) (((uint32_t)(((uint32_t)(x)) << SPI_DLY_FRAME_DELAY_SHIFT)) & SPI_DLY_FRAME_DELAY_MASK)
-#define SPI_DLY_TRANSFER_DELAY_MASK (0xF000U)
-#define SPI_DLY_TRANSFER_DELAY_SHIFT (12U)
-/*! TRANSFER_DELAY - Controls the minimum amount of time that the SSEL is deasserted between
- * transfers. 0x0 = The minimum time that SSEL is deasserted is 1 SPI clock time. (Zero added time.) 0x1
- * = The minimum time that SSEL is deasserted is 2 SPI clock times. 0x2 = The minimum time that
- * SSEL is deasserted is 3 SPI clock times. 0xF = The minimum time that SSEL is deasserted is 16
- * SPI clock times.
- */
-#define SPI_DLY_TRANSFER_DELAY(x) (((uint32_t)(((uint32_t)(x)) << SPI_DLY_TRANSFER_DELAY_SHIFT)) & SPI_DLY_TRANSFER_DELAY_MASK)
-/*! @} */
-
-/*! @name STAT - SPI Status. Some status flags can be cleared by writing a 1 to that bit position. */
-/*! @{ */
-#define SPI_STAT_SSA_MASK (0x10U)
-#define SPI_STAT_SSA_SHIFT (4U)
-/*! SSA - Slave Select Assert. This flag is set whenever any slave select transitions from
- * deasserted to asserted, in both master and slave modes. This allows determining when the SPI
- * transmit/receive functions become busy, and allows waking up the device from reduced power modes when a
- * slave mode access begins. This flag is cleared by software.
- */
-#define SPI_STAT_SSA(x) (((uint32_t)(((uint32_t)(x)) << SPI_STAT_SSA_SHIFT)) & SPI_STAT_SSA_MASK)
-#define SPI_STAT_SSD_MASK (0x20U)
-#define SPI_STAT_SSD_SHIFT (5U)
-/*! SSD - Slave Select Deassert. This flag is set whenever any asserted slave selects transition to
- * deasserted, in both master and slave modes. This allows determining when the SPI
- * transmit/receive functions become idle. This flag is cleared by software.
- */
-#define SPI_STAT_SSD(x) (((uint32_t)(((uint32_t)(x)) << SPI_STAT_SSD_SHIFT)) & SPI_STAT_SSD_MASK)
-#define SPI_STAT_STALLED_MASK (0x40U)
-#define SPI_STAT_STALLED_SHIFT (6U)
-/*! STALLED - Stalled status flag. This indicates whether the SPI is currently in a stall condition.
- */
-#define SPI_STAT_STALLED(x) (((uint32_t)(((uint32_t)(x)) << SPI_STAT_STALLED_SHIFT)) & SPI_STAT_STALLED_MASK)
-#define SPI_STAT_ENDTRANSFER_MASK (0x80U)
-#define SPI_STAT_ENDTRANSFER_SHIFT (7U)
-/*! ENDTRANSFER - End Transfer control bit. Software can set this bit to force an end to the current
- * transfer when the transmitter finishes any activity already in progress, as if the EOT flag
- * had been set prior to the last transmission. This capability is included to support cases where
- * it is not known when transmit data is written that it will be the end of a transfer. The bit
- * is cleared when the transmitter becomes idle as the transfer comes to an end. Forcing an end
- * of transfer in this manner causes any specified FRAME_DELAY and TRANSFER_DELAY to be inserted.
- */
-#define SPI_STAT_ENDTRANSFER(x) (((uint32_t)(((uint32_t)(x)) << SPI_STAT_ENDTRANSFER_SHIFT)) & SPI_STAT_ENDTRANSFER_MASK)
-#define SPI_STAT_MSTIDLE_MASK (0x100U)
-#define SPI_STAT_MSTIDLE_SHIFT (8U)
-/*! MSTIDLE - Master idle status flag. This bit is 1 whenever the SPI master function is fully idle.
- * This means that the transmit holding register is empty and the transmitter is not in the
- * process of sending data.
- */
-#define SPI_STAT_MSTIDLE(x) (((uint32_t)(((uint32_t)(x)) << SPI_STAT_MSTIDLE_SHIFT)) & SPI_STAT_MSTIDLE_MASK)
-/*! @} */
-
-/*! @name INTENSET - SPI Interrupt Enable read and Set. A complete value may be read from this register. Writing a 1 to any implemented bit position causes that bit to be set. */
-/*! @{ */
-#define SPI_INTENSET_SSAEN_MASK (0x10U)
-#define SPI_INTENSET_SSAEN_SHIFT (4U)
-/*! SSAEN - Slave select assert interrupt enable. Determines whether an interrupt occurs when the Slave Select is asserted.
- * 0b0..Disabled. No interrupt will be generated when any Slave Select transitions from deasserted to asserted.
- * 0b1..Enabled. An interrupt will be generated when any Slave Select transitions from deasserted to asserted.
- */
-#define SPI_INTENSET_SSAEN(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTENSET_SSAEN_SHIFT)) & SPI_INTENSET_SSAEN_MASK)
-#define SPI_INTENSET_SSDEN_MASK (0x20U)
-#define SPI_INTENSET_SSDEN_SHIFT (5U)
-/*! SSDEN - Slave select deassert interrupt enable. Determines whether an interrupt occurs when the Slave Select is deasserted.
- * 0b0..Disabled. No interrupt will be generated when all asserted Slave Selects transition to deasserted.
- * 0b1..Enabled. An interrupt will be generated when all asserted Slave Selects transition to deasserted.
- */
-#define SPI_INTENSET_SSDEN(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTENSET_SSDEN_SHIFT)) & SPI_INTENSET_SSDEN_MASK)
-#define SPI_INTENSET_MSTIDLEEN_MASK (0x100U)
-#define SPI_INTENSET_MSTIDLEEN_SHIFT (8U)
-/*! MSTIDLEEN - Master idle interrupt enable.
- * 0b0..No interrupt will be generated when the SPI master function is idle.
- * 0b1..An interrupt will be generated when the SPI master function is fully idle.
- */
-#define SPI_INTENSET_MSTIDLEEN(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTENSET_MSTIDLEEN_SHIFT)) & SPI_INTENSET_MSTIDLEEN_MASK)
-/*! @} */
-
-/*! @name INTENCLR - SPI Interrupt Enable Clear. Writing a 1 to any implemented bit position causes the corresponding bit in INTENSET to be cleared. */
-/*! @{ */
-#define SPI_INTENCLR_SSAEN_MASK (0x10U)
-#define SPI_INTENCLR_SSAEN_SHIFT (4U)
-/*! SSAEN - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define SPI_INTENCLR_SSAEN(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTENCLR_SSAEN_SHIFT)) & SPI_INTENCLR_SSAEN_MASK)
-#define SPI_INTENCLR_SSDEN_MASK (0x20U)
-#define SPI_INTENCLR_SSDEN_SHIFT (5U)
-/*! SSDEN - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define SPI_INTENCLR_SSDEN(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTENCLR_SSDEN_SHIFT)) & SPI_INTENCLR_SSDEN_MASK)
-#define SPI_INTENCLR_MSTIDLE_MASK (0x100U)
-#define SPI_INTENCLR_MSTIDLE_SHIFT (8U)
-/*! MSTIDLE - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define SPI_INTENCLR_MSTIDLE(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTENCLR_MSTIDLE_SHIFT)) & SPI_INTENCLR_MSTIDLE_MASK)
-/*! @} */
-
-/*! @name DIV - SPI clock Divider */
-/*! @{ */
-#define SPI_DIV_DIVVAL_MASK (0xFFFFU)
-#define SPI_DIV_DIVVAL_SHIFT (0U)
-/*! DIVVAL - Rate divider value. Specifies how the Flexcomm clock (FCLK) is divided to produce the
- * SPI clock rate in master mode. DIVVAL is -1 encoded such that the value 0 results in FCLK/1,
- * the value 1 results in FCLK/2, up to the maximum possible divide value of 0xFFFF, which results
- * in FCLK/65536.
- */
-#define SPI_DIV_DIVVAL(x) (((uint32_t)(((uint32_t)(x)) << SPI_DIV_DIVVAL_SHIFT)) & SPI_DIV_DIVVAL_MASK)
-/*! @} */
-
-/*! @name INTSTAT - SPI Interrupt Status */
-/*! @{ */
-#define SPI_INTSTAT_SSA_MASK (0x10U)
-#define SPI_INTSTAT_SSA_SHIFT (4U)
-/*! SSA - Slave Select Assert.
- */
-#define SPI_INTSTAT_SSA(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTSTAT_SSA_SHIFT)) & SPI_INTSTAT_SSA_MASK)
-#define SPI_INTSTAT_SSD_MASK (0x20U)
-#define SPI_INTSTAT_SSD_SHIFT (5U)
-/*! SSD - Slave Select Deassert.
- */
-#define SPI_INTSTAT_SSD(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTSTAT_SSD_SHIFT)) & SPI_INTSTAT_SSD_MASK)
-#define SPI_INTSTAT_MSTIDLE_MASK (0x100U)
-#define SPI_INTSTAT_MSTIDLE_SHIFT (8U)
-/*! MSTIDLE - Master Idle status flag.
- */
-#define SPI_INTSTAT_MSTIDLE(x) (((uint32_t)(((uint32_t)(x)) << SPI_INTSTAT_MSTIDLE_SHIFT)) & SPI_INTSTAT_MSTIDLE_MASK)
-/*! @} */
-
-/*! @name FIFOCFG - FIFO configuration and enable register. */
-/*! @{ */
-#define SPI_FIFOCFG_ENABLETX_MASK (0x1U)
-#define SPI_FIFOCFG_ENABLETX_SHIFT (0U)
-/*! ENABLETX - Enable the transmit FIFO.
- * 0b0..The transmit FIFO is not enabled.
- * 0b1..The transmit FIFO is enabled.
- */
-#define SPI_FIFOCFG_ENABLETX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_ENABLETX_SHIFT)) & SPI_FIFOCFG_ENABLETX_MASK)
-#define SPI_FIFOCFG_ENABLERX_MASK (0x2U)
-#define SPI_FIFOCFG_ENABLERX_SHIFT (1U)
-/*! ENABLERX - Enable the receive FIFO.
- * 0b0..The receive FIFO is not enabled.
- * 0b1..The receive FIFO is enabled.
- */
-#define SPI_FIFOCFG_ENABLERX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_ENABLERX_SHIFT)) & SPI_FIFOCFG_ENABLERX_MASK)
-#define SPI_FIFOCFG_SIZE_MASK (0x30U)
-#define SPI_FIFOCFG_SIZE_SHIFT (4U)
-/*! SIZE - FIFO size configuration. This is a read-only field. 0x0 = FIFO is configured as 16
- * entries of 8 bits. 0x1, 0x2, 0x3 = not applicable to USART.
- */
-#define SPI_FIFOCFG_SIZE(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_SIZE_SHIFT)) & SPI_FIFOCFG_SIZE_MASK)
-#define SPI_FIFOCFG_DMATX_MASK (0x1000U)
-#define SPI_FIFOCFG_DMATX_SHIFT (12U)
-/*! DMATX - DMA configuration for transmit.
- * 0b0..DMA is not used for the transmit function.
- * 0b1..Trigger DMA for the transmit function if the FIFO is not full. Generally, data interrupts would be disabled if DMA is enabled.
- */
-#define SPI_FIFOCFG_DMATX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_DMATX_SHIFT)) & SPI_FIFOCFG_DMATX_MASK)
-#define SPI_FIFOCFG_DMARX_MASK (0x2000U)
-#define SPI_FIFOCFG_DMARX_SHIFT (13U)
-/*! DMARX - DMA configuration for receive.
- * 0b0..DMA is not used for the receive function.
- * 0b1..Trigger DMA for the receive function if the FIFO is not empty. Generally, data interrupts would be disabled if DMA is enabled.
- */
-#define SPI_FIFOCFG_DMARX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_DMARX_SHIFT)) & SPI_FIFOCFG_DMARX_MASK)
-#define SPI_FIFOCFG_WAKETX_MASK (0x4000U)
-#define SPI_FIFOCFG_WAKETX_SHIFT (14U)
-/*! WAKETX - Wake-up for transmit FIFO level. This allows the device to be woken from reduced power
- * modes (up to power-down, as long as the peripheral function works in that power mode) without
- * enabling the TXLVL interrupt. Only DMA wakes up, processes data, and goes back to sleep. The
- * CPU will remain stopped until woken by another cause, such as DMA completion. See Hardware
- * Wake-up control register.
- * 0b0..Only enabled interrupts will wake up the device form reduced power modes.
- * 0b1..A device wake-up for DMA will occur if the transmit FIFO level reaches the value specified by TXLVL in
- * FIFOTRIG, even when the TXLVL interrupt is not enabled.
- */
-#define SPI_FIFOCFG_WAKETX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_WAKETX_SHIFT)) & SPI_FIFOCFG_WAKETX_MASK)
-#define SPI_FIFOCFG_WAKERX_MASK (0x8000U)
-#define SPI_FIFOCFG_WAKERX_SHIFT (15U)
-/*! WAKERX - Wake-up for receive FIFO level. This allows the device to be woken from reduced power
- * modes (up to power-down, as long as the peripheral function works in that power mode) without
- * enabling the TXLVL interrupt. Only DMA wakes up, processes data, and goes back to sleep. The
- * CPU will remain stopped until woken by another cause, such as DMA completion. See Hardware
- * Wake-up control register.
- * 0b0..Only enabled interrupts will wake up the device form reduced power modes.
- * 0b1..A device wake-up for DMA will occur if the receive FIFO level reaches the value specified by RXLVL in
- * FIFOTRIG, even when the RXLVL interrupt is not enabled.
- */
-#define SPI_FIFOCFG_WAKERX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_WAKERX_SHIFT)) & SPI_FIFOCFG_WAKERX_MASK)
-#define SPI_FIFOCFG_EMPTYTX_MASK (0x10000U)
-#define SPI_FIFOCFG_EMPTYTX_SHIFT (16U)
-/*! EMPTYTX - Empty command for the transmit FIFO. When a 1 is written to this bit, the TX FIFO is emptied.
- */
-#define SPI_FIFOCFG_EMPTYTX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_EMPTYTX_SHIFT)) & SPI_FIFOCFG_EMPTYTX_MASK)
-#define SPI_FIFOCFG_EMPTYRX_MASK (0x20000U)
-#define SPI_FIFOCFG_EMPTYRX_SHIFT (17U)
-/*! EMPTYRX - Empty command for the receive FIFO. When a 1 is written to this bit, the RX FIFO is emptied.
- */
-#define SPI_FIFOCFG_EMPTYRX(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOCFG_EMPTYRX_SHIFT)) & SPI_FIFOCFG_EMPTYRX_MASK)
-/*! @} */
-
-/*! @name FIFOSTAT - FIFO status register. */
-/*! @{ */
-#define SPI_FIFOSTAT_TXERR_MASK (0x1U)
-#define SPI_FIFOSTAT_TXERR_SHIFT (0U)
-/*! TXERR - TX FIFO error. Will be set if a transmit FIFO error occurs. This could be an overflow
- * caused by pushing data into a full FIFO, or by an underflow if the FIFO is empty when data is
- * needed. Cleared by writing a 1 to this bit.
- */
-#define SPI_FIFOSTAT_TXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_TXERR_SHIFT)) & SPI_FIFOSTAT_TXERR_MASK)
-#define SPI_FIFOSTAT_RXERR_MASK (0x2U)
-#define SPI_FIFOSTAT_RXERR_SHIFT (1U)
-/*! RXERR - RX FIFO error. Will be set if a receive FIFO overflow occurs, caused by software or DMA
- * not emptying the FIFO fast enough. Cleared by writing a 1 to this bit.
- */
-#define SPI_FIFOSTAT_RXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_RXERR_SHIFT)) & SPI_FIFOSTAT_RXERR_MASK)
-#define SPI_FIFOSTAT_PERINT_MASK (0x8U)
-#define SPI_FIFOSTAT_PERINT_SHIFT (3U)
-/*! PERINT - Peripheral interrupt. When 1, this indicates that the peripheral function has asserted
- * an interrupt. The details can be found by reading the peripheral's STAT register.
- */
-#define SPI_FIFOSTAT_PERINT(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_PERINT_SHIFT)) & SPI_FIFOSTAT_PERINT_MASK)
-#define SPI_FIFOSTAT_TXEMPTY_MASK (0x10U)
-#define SPI_FIFOSTAT_TXEMPTY_SHIFT (4U)
-/*! TXEMPTY - Transmit FIFO empty. When 1, the transmit FIFO is empty. The peripheral may still be processing the last piece of data.
- */
-#define SPI_FIFOSTAT_TXEMPTY(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_TXEMPTY_SHIFT)) & SPI_FIFOSTAT_TXEMPTY_MASK)
-#define SPI_FIFOSTAT_TXNOTFULL_MASK (0x20U)
-#define SPI_FIFOSTAT_TXNOTFULL_SHIFT (5U)
-/*! TXNOTFULL - Transmit FIFO not full. When 1, the transmit FIFO is not full, so more data can be
- * written. When 0, the transmit FIFO is full and another write would cause it to overflow.
- */
-#define SPI_FIFOSTAT_TXNOTFULL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_TXNOTFULL_SHIFT)) & SPI_FIFOSTAT_TXNOTFULL_MASK)
-#define SPI_FIFOSTAT_RXNOTEMPTY_MASK (0x40U)
-#define SPI_FIFOSTAT_RXNOTEMPTY_SHIFT (6U)
-/*! RXNOTEMPTY - Receive FIFO not empty. When 1, the receive FIFO is not empty, so data can be read. When 0, the receive FIFO is empty.
- */
-#define SPI_FIFOSTAT_RXNOTEMPTY(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_RXNOTEMPTY_SHIFT)) & SPI_FIFOSTAT_RXNOTEMPTY_MASK)
-#define SPI_FIFOSTAT_RXFULL_MASK (0x80U)
-#define SPI_FIFOSTAT_RXFULL_SHIFT (7U)
-/*! RXFULL - Receive FIFO full. When 1, the receive FIFO is full. Data needs to be read out to
- * prevent the peripheral from causing an overflow.
- */
-#define SPI_FIFOSTAT_RXFULL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_RXFULL_SHIFT)) & SPI_FIFOSTAT_RXFULL_MASK)
-#define SPI_FIFOSTAT_TXLVL_MASK (0x1F00U)
-#define SPI_FIFOSTAT_TXLVL_SHIFT (8U)
-/*! TXLVL - Transmit FIFO current level. A 0 means the TX FIFO is currently empty, and the TXEMPTY
- * and TXNOTFULL flags will be 1. Other values tell how much data is actually in the TX FIFO at
- * the point where the read occurs. If the TX FIFO is full, the TXEMPTY and TXNOTFULL flags will be
- * 0.
- */
-#define SPI_FIFOSTAT_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_TXLVL_SHIFT)) & SPI_FIFOSTAT_TXLVL_MASK)
-#define SPI_FIFOSTAT_RXLVL_MASK (0x1F0000U)
-#define SPI_FIFOSTAT_RXLVL_SHIFT (16U)
-/*! RXLVL - Receive FIFO current level. A 0 means the RX FIFO is currently empty, and the RXFULL and
- * RXNOTEMPTY flags will be 0. Other values tell how much data is actually in the RX FIFO at the
- * point where the read occurs. If the RX FIFO is full, the RXFULL and RXNOTEMPTY flags will be
- * 1.
- */
-#define SPI_FIFOSTAT_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOSTAT_RXLVL_SHIFT)) & SPI_FIFOSTAT_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOTRIG - FIFO trigger settings for interrupt and DMA request. */
-/*! @{ */
-#define SPI_FIFOTRIG_TXLVLENA_MASK (0x1U)
-#define SPI_FIFOTRIG_TXLVLENA_SHIFT (0U)
-/*! TXLVLENA - Transmit FIFO level trigger enable. This trigger will become an interrupt if enabled
- * in FIFOINTENSET, or a DMA trigger if DMATX in FIFOCFG is set.
- * 0b0..Transmit FIFO level does not generate a FIFO level trigger.
- * 0b1..An trigger will be generated if the transmit FIFO level reaches the value specified by the TXLVL field in this register.
- */
-#define SPI_FIFOTRIG_TXLVLENA(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOTRIG_TXLVLENA_SHIFT)) & SPI_FIFOTRIG_TXLVLENA_MASK)
-#define SPI_FIFOTRIG_RXLVLENA_MASK (0x2U)
-#define SPI_FIFOTRIG_RXLVLENA_SHIFT (1U)
-/*! RXLVLENA - Receive FIFO level trigger enable. This trigger will become an interrupt if enabled
- * in FIFOINTENSET, or a DMA trigger if DMARX in FIFOCFG is set.
- * 0b0..Receive FIFO level does not generate a FIFO level trigger.
- * 0b1..An trigger will be generated if the receive FIFO level reaches the value specified by the RXLVL field in this register.
- */
-#define SPI_FIFOTRIG_RXLVLENA(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOTRIG_RXLVLENA_SHIFT)) & SPI_FIFOTRIG_RXLVLENA_MASK)
-#define SPI_FIFOTRIG_TXLVL_MASK (0xF00U)
-#define SPI_FIFOTRIG_TXLVL_SHIFT (8U)
-/*! TXLVL - Transmit FIFO level trigger point. This field is used only when TXLVLENA = 1. If enabled
- * to do so, the FIFO level can wake up the device just enough to perform DMA, then return to
- * the reduced power mode. See Hardware Wake-up control register. 0 = trigger when the TX FIFO
- * becomes empty. 1 = trigger when the TX FIFO level decreases to one entry. 15 = trigger when the TX
- * FIFO level decreases to 15 entries (is no longer full).
- */
-#define SPI_FIFOTRIG_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOTRIG_TXLVL_SHIFT)) & SPI_FIFOTRIG_TXLVL_MASK)
-#define SPI_FIFOTRIG_RXLVL_MASK (0xF0000U)
-#define SPI_FIFOTRIG_RXLVL_SHIFT (16U)
-/*! RXLVL - Receive FIFO level trigger point. The RX FIFO level is checked when a new piece of data
- * is received. This field is used only when RXLVLENA = 1. If enabled to do so, the FIFO level
- * can wake up the device just enough to perform DMA, then return to the reduced power mode. See
- * Hardware Wake-up control register. 0 = trigger when the RX FIFO has received one entry (is no
- * longer empty). 1 = trigger when the RX FIFO has received two entries. 15 = trigger when the RX
- * FIFO has received 16 entries (has become full).
- */
-#define SPI_FIFOTRIG_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOTRIG_RXLVL_SHIFT)) & SPI_FIFOTRIG_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTENSET - FIFO interrupt enable set (enable) and read register. */
-/*! @{ */
-#define SPI_FIFOINTENSET_TXERR_MASK (0x1U)
-#define SPI_FIFOINTENSET_TXERR_SHIFT (0U)
-/*! TXERR - Determines whether an interrupt occurs when a transmit error occurs, based on the TXERR flag in the FIFOSTAT register.
- * 0b0..No interrupt will be generated for a transmit error.
- * 0b1..An interrupt will be generated when a transmit error occurs.
- */
-#define SPI_FIFOINTENSET_TXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENSET_TXERR_SHIFT)) & SPI_FIFOINTENSET_TXERR_MASK)
-#define SPI_FIFOINTENSET_RXERR_MASK (0x2U)
-#define SPI_FIFOINTENSET_RXERR_SHIFT (1U)
-/*! RXERR - Determines whether an interrupt occurs when a receive error occurs, based on the RXERR flag in the FIFOSTAT register.
- * 0b0..No interrupt will be generated for a receive error.
- * 0b1..An interrupt will be generated when a receive error occurs.
- */
-#define SPI_FIFOINTENSET_RXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENSET_RXERR_SHIFT)) & SPI_FIFOINTENSET_RXERR_MASK)
-#define SPI_FIFOINTENSET_TXLVL_MASK (0x4U)
-#define SPI_FIFOINTENSET_TXLVL_SHIFT (2U)
-/*! TXLVL - Determines whether an interrupt occurs when a the transmit FIFO reaches the level
- * specified by the TXLVL field in the FIFOTRIG register.
- * 0b0..No interrupt will be generated based on the TX FIFO level.
- * 0b1..If TXLVLENA in the FIFOTRIG register = 1, an interrupt will be generated when the TX FIFO level decreases
- * to the level specified by TXLVL in the FIFOTRIG register.
- */
-#define SPI_FIFOINTENSET_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENSET_TXLVL_SHIFT)) & SPI_FIFOINTENSET_TXLVL_MASK)
-#define SPI_FIFOINTENSET_RXLVL_MASK (0x8U)
-#define SPI_FIFOINTENSET_RXLVL_SHIFT (3U)
-/*! RXLVL - Determines whether an interrupt occurs when a the receive FIFO reaches the level
- * specified by the TXLVL field in the FIFOTRIG register.
- * 0b0..No interrupt will be generated based on the RX FIFO level.
- * 0b1..If RXLVLENA in the FIFOTRIG register = 1, an interrupt will be generated when the when the RX FIFO level
- * increases to the level specified by RXLVL in the FIFOTRIG register.
- */
-#define SPI_FIFOINTENSET_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENSET_RXLVL_SHIFT)) & SPI_FIFOINTENSET_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTENCLR - FIFO interrupt enable clear (disable) and read register. */
-/*! @{ */
-#define SPI_FIFOINTENCLR_TXERR_MASK (0x1U)
-#define SPI_FIFOINTENCLR_TXERR_SHIFT (0U)
-/*! TXERR - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define SPI_FIFOINTENCLR_TXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENCLR_TXERR_SHIFT)) & SPI_FIFOINTENCLR_TXERR_MASK)
-#define SPI_FIFOINTENCLR_RXERR_MASK (0x2U)
-#define SPI_FIFOINTENCLR_RXERR_SHIFT (1U)
-/*! RXERR - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define SPI_FIFOINTENCLR_RXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENCLR_RXERR_SHIFT)) & SPI_FIFOINTENCLR_RXERR_MASK)
-#define SPI_FIFOINTENCLR_TXLVL_MASK (0x4U)
-#define SPI_FIFOINTENCLR_TXLVL_SHIFT (2U)
-/*! TXLVL - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define SPI_FIFOINTENCLR_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENCLR_TXLVL_SHIFT)) & SPI_FIFOINTENCLR_TXLVL_MASK)
-#define SPI_FIFOINTENCLR_RXLVL_MASK (0x8U)
-#define SPI_FIFOINTENCLR_RXLVL_SHIFT (3U)
-/*! RXLVL - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define SPI_FIFOINTENCLR_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTENCLR_RXLVL_SHIFT)) & SPI_FIFOINTENCLR_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTSTAT - FIFO interrupt status register. */
-/*! @{ */
-#define SPI_FIFOINTSTAT_TXERR_MASK (0x1U)
-#define SPI_FIFOINTSTAT_TXERR_SHIFT (0U)
-/*! TXERR - TX FIFO error.
- */
-#define SPI_FIFOINTSTAT_TXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTSTAT_TXERR_SHIFT)) & SPI_FIFOINTSTAT_TXERR_MASK)
-#define SPI_FIFOINTSTAT_RXERR_MASK (0x2U)
-#define SPI_FIFOINTSTAT_RXERR_SHIFT (1U)
-/*! RXERR - RX FIFO error.
- */
-#define SPI_FIFOINTSTAT_RXERR(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTSTAT_RXERR_SHIFT)) & SPI_FIFOINTSTAT_RXERR_MASK)
-#define SPI_FIFOINTSTAT_TXLVL_MASK (0x4U)
-#define SPI_FIFOINTSTAT_TXLVL_SHIFT (2U)
-/*! TXLVL - Transmit FIFO level interrupt.
- */
-#define SPI_FIFOINTSTAT_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTSTAT_TXLVL_SHIFT)) & SPI_FIFOINTSTAT_TXLVL_MASK)
-#define SPI_FIFOINTSTAT_RXLVL_MASK (0x8U)
-#define SPI_FIFOINTSTAT_RXLVL_SHIFT (3U)
-/*! RXLVL - Receive FIFO level interrupt.
- */
-#define SPI_FIFOINTSTAT_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTSTAT_RXLVL_SHIFT)) & SPI_FIFOINTSTAT_RXLVL_MASK)
-#define SPI_FIFOINTSTAT_PERINT_MASK (0x10U)
-#define SPI_FIFOINTSTAT_PERINT_SHIFT (4U)
-/*! PERINT - Peripheral interrupt.
- */
-#define SPI_FIFOINTSTAT_PERINT(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOINTSTAT_PERINT_SHIFT)) & SPI_FIFOINTSTAT_PERINT_MASK)
-/*! @} */
-
-/*! @name FIFOWR - FIFO write data. */
-/*! @{ */
-#define SPI_FIFOWR_TXDATA_MASK (0xFFFFU)
-#define SPI_FIFOWR_TXDATA_SHIFT (0U)
-/*! TXDATA - Transmit data to the FIFO.
- */
-#define SPI_FIFOWR_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_TXDATA_SHIFT)) & SPI_FIFOWR_TXDATA_MASK)
-#define SPI_FIFOWR_TXSSEL0_N_MASK (0x10000U)
-#define SPI_FIFOWR_TXSSEL0_N_SHIFT (16U)
-/*! TXSSEL0_N - Transmit slave select. This field asserts SSEL0 in master mode. The output on the pin is active LOW by default.
- * 0b0..SSEL0 asserted.
- * 0b1..SSEL0 not asserted.
- */
-#define SPI_FIFOWR_TXSSEL0_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_TXSSEL0_N_SHIFT)) & SPI_FIFOWR_TXSSEL0_N_MASK)
-#define SPI_FIFOWR_TXSSEL1_N_MASK (0x20000U)
-#define SPI_FIFOWR_TXSSEL1_N_SHIFT (17U)
-/*! TXSSEL1_N - Transmit slave select. This field asserts SSEL1 in master mode. The output on the pin is active LOW by default.
- * 0b0..SSEL1 asserted.
- * 0b1..SSEL1 not asserted.
- */
-#define SPI_FIFOWR_TXSSEL1_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_TXSSEL1_N_SHIFT)) & SPI_FIFOWR_TXSSEL1_N_MASK)
-#define SPI_FIFOWR_TXSSEL2_N_MASK (0x40000U)
-#define SPI_FIFOWR_TXSSEL2_N_SHIFT (18U)
-/*! TXSSEL2_N - Transmit slave select. This field asserts SSEL2 in master mode. The output on the pin is active LOW by default.
- * 0b0..SSEL2 asserted.
- * 0b1..SSEL2 not asserted.
- */
-#define SPI_FIFOWR_TXSSEL2_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_TXSSEL2_N_SHIFT)) & SPI_FIFOWR_TXSSEL2_N_MASK)
-#define SPI_FIFOWR_TXSSEL3_N_MASK (0x80000U)
-#define SPI_FIFOWR_TXSSEL3_N_SHIFT (19U)
-/*! TXSSEL3_N - Transmit slave select. This field asserts SSEL3 in master mode. The output on the pin is active LOW by default.
- * 0b0..SSEL3 asserted.
- * 0b1..SSEL3 not asserted.
- */
-#define SPI_FIFOWR_TXSSEL3_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_TXSSEL3_N_SHIFT)) & SPI_FIFOWR_TXSSEL3_N_MASK)
-#define SPI_FIFOWR_EOT_MASK (0x100000U)
-#define SPI_FIFOWR_EOT_SHIFT (20U)
-/*! EOT - End of transfer. The asserted SSEL will be deasserted at the end of a transfer and remain
- * so far at least the time specified by the Transfer_delay value in the DLY register.
- * 0b0..SSEL not deasserted. This piece of data is not treated as the end of a transfer. SSEL will not be deasserted at the end of this data.
- * 0b1..SSEL deasserted. This piece of data is treated as the end of a transfer. SSEL will be deasserted at the end of this piece of data.
- */
-#define SPI_FIFOWR_EOT(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_EOT_SHIFT)) & SPI_FIFOWR_EOT_MASK)
-#define SPI_FIFOWR_EOF_MASK (0x200000U)
-#define SPI_FIFOWR_EOF_SHIFT (21U)
-/*! EOF - End of frame. Between frames, a delay may be inserted, as defined by the Frame_delay value
- * in the DLY register. The end of a frame may not be particularly meaningful if the Frame_delay
- * value = 0. This control can be used as part of the support for frame lengths greater than 16
- * bits.
- * 0b0..Data not EOF. This piece of data transmitted is not treated as the end of a frame.
- * 0b1..Data EOF. This piece of data is treated as the end of a frame, causing the Frame_delay time to be
- * inserted before subsequent data is transmitted.
- */
-#define SPI_FIFOWR_EOF(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_EOF_SHIFT)) & SPI_FIFOWR_EOF_MASK)
-#define SPI_FIFOWR_RXIGNORE_MASK (0x400000U)
-#define SPI_FIFOWR_RXIGNORE_SHIFT (22U)
-/*! RXIGNORE - Receive Ignore. This allows data to be transmitted using the SPI without the need to
- * read unneeded data from the receiver. Setting this bit simplifies the transmit process and can
- * be used with the DMA.
- * 0b0..Read received data. Received data must be read in order to allow transmission to progress. SPI transmit
- * will halt when the receive data FIFO is full. In slave mode, an overrun error will occur if received data
- * is not read before new data is received.
- * 0b1..Ignore received data. Received data is ignored, allowing transmission without reading unneeded received
- * data. No receiver flags are generated.
- */
-#define SPI_FIFOWR_RXIGNORE(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_RXIGNORE_SHIFT)) & SPI_FIFOWR_RXIGNORE_MASK)
-#define SPI_FIFOWR_LEN_MASK (0xF000000U)
-#define SPI_FIFOWR_LEN_SHIFT (24U)
-/*! LEN - Data Length. Specifies the data length from 4 to 16 bits. Note that transfer lengths
- * greater than 16 bits are supported by implementing multiple sequential transmits. 0x0-2 = Reserved.
- * 0x3 = Data transfer is 4 bits in length. 0x4 = Data transfer is 5 bits in length. 0xF = Data
- * transfer is 16 bits in length.
- */
-#define SPI_FIFOWR_LEN(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFOWR_LEN_SHIFT)) & SPI_FIFOWR_LEN_MASK)
-/*! @} */
-
-/*! @name FIFORD - FIFO read data. */
-/*! @{ */
-#define SPI_FIFORD_RXDATA_MASK (0xFFFFU)
-#define SPI_FIFORD_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO.
- */
-#define SPI_FIFORD_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORD_RXDATA_SHIFT)) & SPI_FIFORD_RXDATA_MASK)
-#define SPI_FIFORD_RXSSEL0_N_MASK (0x10000U)
-#define SPI_FIFORD_RXSSEL0_N_SHIFT (16U)
-/*! RXSSEL0_N - Slave Select for receive. This field allows the state of the SSEL0 pin to be saved
- * along with received data. The value will reflect the SSEL0 pin for both master and slave
- * operation. A zero indicates that a slave select is active. The actual polarity of each slave select
- * pin is configured by the related SPOL bit in CFG.
- */
-#define SPI_FIFORD_RXSSEL0_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORD_RXSSEL0_N_SHIFT)) & SPI_FIFORD_RXSSEL0_N_MASK)
-#define SPI_FIFORD_RXSSEL1_N_MASK (0x20000U)
-#define SPI_FIFORD_RXSSEL1_N_SHIFT (17U)
-/*! RXSSEL1_N - Slave Select for receive. This field allows the state of the SSEL1 pin to be saved
- * along with received data. The value will reflect the SSEL1 pin for both master and slave
- * operation. A zero indicates that a slave select is active. The actual polarity of each slave select
- * pin is configured by the related SPOL bit in CFG.
- */
-#define SPI_FIFORD_RXSSEL1_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORD_RXSSEL1_N_SHIFT)) & SPI_FIFORD_RXSSEL1_N_MASK)
-#define SPI_FIFORD_RXSSEL2_N_MASK (0x40000U)
-#define SPI_FIFORD_RXSSEL2_N_SHIFT (18U)
-/*! RXSSEL2_N - Slave Select for receive. This field allows the state of the SSEL2 pin to be saved
- * along with received data. The value will reflect the SSEL2 pin for both master and slave
- * operation. A zero indicates that a slave select is active. The actual polarity of each slave select
- * pin is configured by the related SPOL bit in CFG.
- */
-#define SPI_FIFORD_RXSSEL2_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORD_RXSSEL2_N_SHIFT)) & SPI_FIFORD_RXSSEL2_N_MASK)
-#define SPI_FIFORD_RXSSEL3_N_MASK (0x80000U)
-#define SPI_FIFORD_RXSSEL3_N_SHIFT (19U)
-/*! RXSSEL3_N - Slave Select for receive. This field allows the state of the SSEL3 pin to be saved
- * along with received data. The value will reflect the SSEL3 pin for both master and slave
- * operation. A zero indicates that a slave select is active. The actual polarity of each slave select
- * pin is configured by the related SPOL bit in CFG.
- */
-#define SPI_FIFORD_RXSSEL3_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORD_RXSSEL3_N_SHIFT)) & SPI_FIFORD_RXSSEL3_N_MASK)
-#define SPI_FIFORD_SOT_MASK (0x100000U)
-#define SPI_FIFORD_SOT_SHIFT (20U)
-/*! SOT - Start of Transfer flag. This flag will be 1 if this is the first data after the SSELs went
- * from deasserted to asserted (i.e., any previous transfer has ended). This information can be
- * used to identify the first piece of data in cases where the transfer length is greater than 16
- * bits.
- */
-#define SPI_FIFORD_SOT(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORD_SOT_SHIFT)) & SPI_FIFORD_SOT_MASK)
-/*! @} */
-
-/*! @name FIFORDNOPOP - FIFO data read with no FIFO pop. */
-/*! @{ */
-#define SPI_FIFORDNOPOP_RXDATA_MASK (0xFFFFU)
-#define SPI_FIFORDNOPOP_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO.
- */
-#define SPI_FIFORDNOPOP_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORDNOPOP_RXDATA_SHIFT)) & SPI_FIFORDNOPOP_RXDATA_MASK)
-#define SPI_FIFORDNOPOP_RXSSEL0_N_MASK (0x10000U)
-#define SPI_FIFORDNOPOP_RXSSEL0_N_SHIFT (16U)
-/*! RXSSEL0_N - Slave Select for receive.
- */
-#define SPI_FIFORDNOPOP_RXSSEL0_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORDNOPOP_RXSSEL0_N_SHIFT)) & SPI_FIFORDNOPOP_RXSSEL0_N_MASK)
-#define SPI_FIFORDNOPOP_RXSSEL1_N_MASK (0x20000U)
-#define SPI_FIFORDNOPOP_RXSSEL1_N_SHIFT (17U)
-/*! RXSSEL1_N - Slave Select for receive.
- */
-#define SPI_FIFORDNOPOP_RXSSEL1_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORDNOPOP_RXSSEL1_N_SHIFT)) & SPI_FIFORDNOPOP_RXSSEL1_N_MASK)
-#define SPI_FIFORDNOPOP_RXSSEL2_N_MASK (0x40000U)
-#define SPI_FIFORDNOPOP_RXSSEL2_N_SHIFT (18U)
-/*! RXSSEL2_N - Slave Select for receive.
- */
-#define SPI_FIFORDNOPOP_RXSSEL2_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORDNOPOP_RXSSEL2_N_SHIFT)) & SPI_FIFORDNOPOP_RXSSEL2_N_MASK)
-#define SPI_FIFORDNOPOP_RXSSEL3_N_MASK (0x80000U)
-#define SPI_FIFORDNOPOP_RXSSEL3_N_SHIFT (19U)
-/*! RXSSEL3_N - Slave Select for receive.
- */
-#define SPI_FIFORDNOPOP_RXSSEL3_N(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORDNOPOP_RXSSEL3_N_SHIFT)) & SPI_FIFORDNOPOP_RXSSEL3_N_MASK)
-#define SPI_FIFORDNOPOP_SOT_MASK (0x100000U)
-#define SPI_FIFORDNOPOP_SOT_SHIFT (20U)
-/*! SOT - Start of transfer flag.
- */
-#define SPI_FIFORDNOPOP_SOT(x) (((uint32_t)(((uint32_t)(x)) << SPI_FIFORDNOPOP_SOT_SHIFT)) & SPI_FIFORDNOPOP_SOT_MASK)
-/*! @} */
-
-/*! @name ID - Peripheral identification register. */
-/*! @{ */
-#define SPI_ID_APERTURE_MASK (0xFFU)
-#define SPI_ID_APERTURE_SHIFT (0U)
-/*! APERTURE - Aperture: encoded as (aperture size/4K) -1, so 0x00 means a 4K aperture.
- */
-#define SPI_ID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << SPI_ID_APERTURE_SHIFT)) & SPI_ID_APERTURE_MASK)
-#define SPI_ID_MINOR_REV_MASK (0xF00U)
-#define SPI_ID_MINOR_REV_SHIFT (8U)
-/*! MINOR_REV - Minor revision of module implementation.
- */
-#define SPI_ID_MINOR_REV(x) (((uint32_t)(((uint32_t)(x)) << SPI_ID_MINOR_REV_SHIFT)) & SPI_ID_MINOR_REV_MASK)
-#define SPI_ID_MAJOR_REV_MASK (0xF000U)
-#define SPI_ID_MAJOR_REV_SHIFT (12U)
-/*! MAJOR_REV - Major revision of module implementation.
- */
-#define SPI_ID_MAJOR_REV(x) (((uint32_t)(((uint32_t)(x)) << SPI_ID_MAJOR_REV_SHIFT)) & SPI_ID_MAJOR_REV_MASK)
-#define SPI_ID_ID_MASK (0xFFFF0000U)
-#define SPI_ID_ID_SHIFT (16U)
-/*! ID - Module identifier for the selected function.
- */
-#define SPI_ID_ID(x) (((uint32_t)(((uint32_t)(x)) << SPI_ID_ID_SHIFT)) & SPI_ID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group SPI_Register_Masks */
-
-
-/* SPI - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral SPI0 base address */
- #define SPI0_BASE (0x50086000u)
- /** Peripheral SPI0 base address */
- #define SPI0_BASE_NS (0x40086000u)
- /** Peripheral SPI0 base pointer */
- #define SPI0 ((SPI_Type *)SPI0_BASE)
- /** Peripheral SPI0 base pointer */
- #define SPI0_NS ((SPI_Type *)SPI0_BASE_NS)
- /** Peripheral SPI1 base address */
- #define SPI1_BASE (0x50087000u)
- /** Peripheral SPI1 base address */
- #define SPI1_BASE_NS (0x40087000u)
- /** Peripheral SPI1 base pointer */
- #define SPI1 ((SPI_Type *)SPI1_BASE)
- /** Peripheral SPI1 base pointer */
- #define SPI1_NS ((SPI_Type *)SPI1_BASE_NS)
- /** Peripheral SPI2 base address */
- #define SPI2_BASE (0x50088000u)
- /** Peripheral SPI2 base address */
- #define SPI2_BASE_NS (0x40088000u)
- /** Peripheral SPI2 base pointer */
- #define SPI2 ((SPI_Type *)SPI2_BASE)
- /** Peripheral SPI2 base pointer */
- #define SPI2_NS ((SPI_Type *)SPI2_BASE_NS)
- /** Peripheral SPI3 base address */
- #define SPI3_BASE (0x50089000u)
- /** Peripheral SPI3 base address */
- #define SPI3_BASE_NS (0x40089000u)
- /** Peripheral SPI3 base pointer */
- #define SPI3 ((SPI_Type *)SPI3_BASE)
- /** Peripheral SPI3 base pointer */
- #define SPI3_NS ((SPI_Type *)SPI3_BASE_NS)
- /** Peripheral SPI4 base address */
- #define SPI4_BASE (0x5008A000u)
- /** Peripheral SPI4 base address */
- #define SPI4_BASE_NS (0x4008A000u)
- /** Peripheral SPI4 base pointer */
- #define SPI4 ((SPI_Type *)SPI4_BASE)
- /** Peripheral SPI4 base pointer */
- #define SPI4_NS ((SPI_Type *)SPI4_BASE_NS)
- /** Peripheral SPI5 base address */
- #define SPI5_BASE (0x50096000u)
- /** Peripheral SPI5 base address */
- #define SPI5_BASE_NS (0x40096000u)
- /** Peripheral SPI5 base pointer */
- #define SPI5 ((SPI_Type *)SPI5_BASE)
- /** Peripheral SPI5 base pointer */
- #define SPI5_NS ((SPI_Type *)SPI5_BASE_NS)
- /** Peripheral SPI6 base address */
- #define SPI6_BASE (0x50097000u)
- /** Peripheral SPI6 base address */
- #define SPI6_BASE_NS (0x40097000u)
- /** Peripheral SPI6 base pointer */
- #define SPI6 ((SPI_Type *)SPI6_BASE)
- /** Peripheral SPI6 base pointer */
- #define SPI6_NS ((SPI_Type *)SPI6_BASE_NS)
- /** Peripheral SPI7 base address */
- #define SPI7_BASE (0x50098000u)
- /** Peripheral SPI7 base address */
- #define SPI7_BASE_NS (0x40098000u)
- /** Peripheral SPI7 base pointer */
- #define SPI7 ((SPI_Type *)SPI7_BASE)
- /** Peripheral SPI7 base pointer */
- #define SPI7_NS ((SPI_Type *)SPI7_BASE_NS)
- /** Peripheral SPI8 base address */
- #define SPI8_BASE (0x5009F000u)
- /** Peripheral SPI8 base address */
- #define SPI8_BASE_NS (0x4009F000u)
- /** Peripheral SPI8 base pointer */
- #define SPI8 ((SPI_Type *)SPI8_BASE)
- /** Peripheral SPI8 base pointer */
- #define SPI8_NS ((SPI_Type *)SPI8_BASE_NS)
- /** Array initializer of SPI peripheral base addresses */
- #define SPI_BASE_ADDRS { SPI0_BASE, SPI1_BASE, SPI2_BASE, SPI3_BASE, SPI4_BASE, SPI5_BASE, SPI6_BASE, SPI7_BASE, SPI8_BASE }
- /** Array initializer of SPI peripheral base pointers */
- #define SPI_BASE_PTRS { SPI0, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SPI7, SPI8 }
- /** Array initializer of SPI peripheral base addresses */
- #define SPI_BASE_ADDRS_NS { SPI0_BASE_NS, SPI1_BASE_NS, SPI2_BASE_NS, SPI3_BASE_NS, SPI4_BASE_NS, SPI5_BASE_NS, SPI6_BASE_NS, SPI7_BASE_NS, SPI8_BASE_NS }
- /** Array initializer of SPI peripheral base pointers */
- #define SPI_BASE_PTRS_NS { SPI0_NS, SPI1_NS, SPI2_NS, SPI3_NS, SPI4_NS, SPI5_NS, SPI6_NS, SPI7_NS, SPI8_NS }
-#else
- /** Peripheral SPI0 base address */
- #define SPI0_BASE (0x40086000u)
- /** Peripheral SPI0 base pointer */
- #define SPI0 ((SPI_Type *)SPI0_BASE)
- /** Peripheral SPI1 base address */
- #define SPI1_BASE (0x40087000u)
- /** Peripheral SPI1 base pointer */
- #define SPI1 ((SPI_Type *)SPI1_BASE)
- /** Peripheral SPI2 base address */
- #define SPI2_BASE (0x40088000u)
- /** Peripheral SPI2 base pointer */
- #define SPI2 ((SPI_Type *)SPI2_BASE)
- /** Peripheral SPI3 base address */
- #define SPI3_BASE (0x40089000u)
- /** Peripheral SPI3 base pointer */
- #define SPI3 ((SPI_Type *)SPI3_BASE)
- /** Peripheral SPI4 base address */
- #define SPI4_BASE (0x4008A000u)
- /** Peripheral SPI4 base pointer */
- #define SPI4 ((SPI_Type *)SPI4_BASE)
- /** Peripheral SPI5 base address */
- #define SPI5_BASE (0x40096000u)
- /** Peripheral SPI5 base pointer */
- #define SPI5 ((SPI_Type *)SPI5_BASE)
- /** Peripheral SPI6 base address */
- #define SPI6_BASE (0x40097000u)
- /** Peripheral SPI6 base pointer */
- #define SPI6 ((SPI_Type *)SPI6_BASE)
- /** Peripheral SPI7 base address */
- #define SPI7_BASE (0x40098000u)
- /** Peripheral SPI7 base pointer */
- #define SPI7 ((SPI_Type *)SPI7_BASE)
- /** Peripheral SPI8 base address */
- #define SPI8_BASE (0x4009F000u)
- /** Peripheral SPI8 base pointer */
- #define SPI8 ((SPI_Type *)SPI8_BASE)
- /** Array initializer of SPI peripheral base addresses */
- #define SPI_BASE_ADDRS { SPI0_BASE, SPI1_BASE, SPI2_BASE, SPI3_BASE, SPI4_BASE, SPI5_BASE, SPI6_BASE, SPI7_BASE, SPI8_BASE }
- /** Array initializer of SPI peripheral base pointers */
- #define SPI_BASE_PTRS { SPI0, SPI1, SPI2, SPI3, SPI4, SPI5, SPI6, SPI7, SPI8 }
-#endif
-/** Interrupt vectors for the SPI peripheral type */
-#define SPI_IRQS { FLEXCOMM0_IRQn, FLEXCOMM1_IRQn, FLEXCOMM2_IRQn, FLEXCOMM3_IRQn, FLEXCOMM4_IRQn, FLEXCOMM5_IRQn, FLEXCOMM6_IRQn, FLEXCOMM7_IRQn, FLEXCOMM8_IRQn }
-
-/*!
- * @}
- */ /* end of group SPI_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- SYSCON Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SYSCON_Peripheral_Access_Layer SYSCON Peripheral Access Layer
- * @{
- */
-
-/** SYSCON - Register Layout Typedef */
-typedef struct {
- __IO uint32_t MEMORYREMAP; /**< Memory Remap control register, offset: 0x0 */
- uint8_t RESERVED_0[12];
- __IO uint32_t AHBMATPRIO; /**< AHB Matrix priority control register Priority values are 3 = highest, 0 = lowest, offset: 0x10 */
- uint8_t RESERVED_1[36];
- __IO uint32_t CPU0STCKCAL; /**< System tick calibration for secure part of CPU0, offset: 0x38 */
- __IO uint32_t CPU0NSTCKCAL; /**< System tick calibration for non-secure part of CPU0, offset: 0x3C */
- __IO uint32_t CPU1STCKCAL; /**< System tick calibration for CPU1, offset: 0x40 */
- uint8_t RESERVED_2[4];
- __IO uint32_t NMISRC; /**< NMI Source Select, offset: 0x48 */
- uint8_t RESERVED_3[180];
- union { /* offset: 0x100 */
- struct { /* offset: 0x100 */
- __IO uint32_t PRESETCTRL0; /**< Peripheral reset control 0, offset: 0x100 */
- __IO uint32_t PRESETCTRL1; /**< Peripheral reset control 1, offset: 0x104 */
- __IO uint32_t PRESETCTRL2; /**< Peripheral reset control 2, offset: 0x108 */
- } PRESETCTRL;
- __IO uint32_t PRESETCTRLX[3]; /**< Peripheral reset control register, array offset: 0x100, array step: 0x4 */
- };
- uint8_t RESERVED_4[20];
- __IO uint32_t PRESETCTRLSET[3]; /**< Peripheral reset control set register, array offset: 0x120, array step: 0x4 */
- uint8_t RESERVED_5[20];
- __IO uint32_t PRESETCTRLCLR[3]; /**< Peripheral reset control clear register, array offset: 0x140, array step: 0x4 */
- uint8_t RESERVED_6[20];
- __O uint32_t SWR_RESET; /**< generate a software_reset, offset: 0x160 */
- uint8_t RESERVED_7[156];
- union { /* offset: 0x200 */
- struct { /* offset: 0x200 */
- __IO uint32_t AHBCLKCTRL0; /**< AHB Clock control 0, offset: 0x200 */
- __IO uint32_t AHBCLKCTRL1; /**< AHB Clock control 1, offset: 0x204 */
- __IO uint32_t AHBCLKCTRL2; /**< AHB Clock control 2, offset: 0x208 */
- } AHBCLKCTRL;
- __IO uint32_t AHBCLKCTRLX[3]; /**< Peripheral reset control register, array offset: 0x200, array step: 0x4 */
- };
- uint8_t RESERVED_8[20];
- __IO uint32_t AHBCLKCTRLSET[3]; /**< Peripheral reset control register, array offset: 0x220, array step: 0x4 */
- uint8_t RESERVED_9[20];
- __IO uint32_t AHBCLKCTRLCLR[3]; /**< Peripheral reset control register, array offset: 0x240, array step: 0x4 */
- uint8_t RESERVED_10[20];
- union { /* offset: 0x260 */
- struct { /* offset: 0x260 */
- __IO uint32_t SYSTICKCLKSEL0; /**< System Tick Timer for CPU0 source select, offset: 0x260 */
- __IO uint32_t SYSTICKCLKSEL1; /**< System Tick Timer for CPU1 source select, offset: 0x264 */
- } SYSTICKCLKSEL;
- __IO uint32_t SYSTICKCLKSELX[2]; /**< Peripheral reset control register, array offset: 0x260, array step: 0x4 */
- };
- __IO uint32_t TRACECLKSEL; /**< Trace clock source select, offset: 0x268 */
- union { /* offset: 0x26C */
- struct { /* offset: 0x26C */
- __IO uint32_t CTIMERCLKSEL0; /**< CTimer 0 clock source select, offset: 0x26C */
- __IO uint32_t CTIMERCLKSEL1; /**< CTimer 1 clock source select, offset: 0x270 */
- __IO uint32_t CTIMERCLKSEL2; /**< CTimer 2 clock source select, offset: 0x274 */
- __IO uint32_t CTIMERCLKSEL3; /**< CTimer 3 clock source select, offset: 0x278 */
- __IO uint32_t CTIMERCLKSEL4; /**< CTimer 4 clock source select, offset: 0x27C */
- } CTIMERCLKSEL;
- __IO uint32_t CTIMERCLKSELX[5]; /**< Peripheral reset control register, array offset: 0x26C, array step: 0x4 */
- };
- __IO uint32_t MAINCLKSELA; /**< Main clock A source select, offset: 0x280 */
- __IO uint32_t MAINCLKSELB; /**< Main clock source select, offset: 0x284 */
- __IO uint32_t CLKOUTSEL; /**< CLKOUT clock source select, offset: 0x288 */
- uint8_t RESERVED_11[4];
- __IO uint32_t PLL0CLKSEL; /**< PLL0 clock source select, offset: 0x290 */
- __IO uint32_t PLL1CLKSEL; /**< PLL1 clock source select, offset: 0x294 */
- uint8_t RESERVED_12[12];
- __IO uint32_t ADCCLKSEL; /**< ADC clock source select, offset: 0x2A4 */
- __IO uint32_t USB0CLKSEL; /**< FS USB clock source select, offset: 0x2A8 */
- uint8_t RESERVED_13[4];
- union { /* offset: 0x2B0 */
- struct { /* offset: 0x2B0 */
- __IO uint32_t FCCLKSEL0; /**< Flexcomm Interface 0 clock source select for Fractional Rate Divider, offset: 0x2B0 */
- __IO uint32_t FCCLKSEL1; /**< Flexcomm Interface 1 clock source select for Fractional Rate Divider, offset: 0x2B4 */
- __IO uint32_t FCCLKSEL2; /**< Flexcomm Interface 2 clock source select for Fractional Rate Divider, offset: 0x2B8 */
- __IO uint32_t FCCLKSEL3; /**< Flexcomm Interface 3 clock source select for Fractional Rate Divider, offset: 0x2BC */
- __IO uint32_t FCCLKSEL4; /**< Flexcomm Interface 4 clock source select for Fractional Rate Divider, offset: 0x2C0 */
- __IO uint32_t FCCLKSEL5; /**< Flexcomm Interface 5 clock source select for Fractional Rate Divider, offset: 0x2C4 */
- __IO uint32_t FCCLKSEL6; /**< Flexcomm Interface 6 clock source select for Fractional Rate Divider, offset: 0x2C8 */
- __IO uint32_t FCCLKSEL7; /**< Flexcomm Interface 7 clock source select for Fractional Rate Divider, offset: 0x2CC */
- } FCCLKSEL;
- __IO uint32_t FCCLKSELX[8]; /**< Peripheral reset control register, array offset: 0x2B0, array step: 0x4 */
- };
- __IO uint32_t HSLSPICLKSEL; /**< HS LSPI clock source select, offset: 0x2D0 */
- uint8_t RESERVED_14[12];
- __IO uint32_t MCLKCLKSEL; /**< MCLK clock source select, offset: 0x2E0 */
- uint8_t RESERVED_15[12];
- __IO uint32_t SCTCLKSEL; /**< SCTimer/PWM clock source select, offset: 0x2F0 */
- uint8_t RESERVED_16[4];
- __IO uint32_t SDIOCLKSEL; /**< SDIO clock source select, offset: 0x2F8 */
- uint8_t RESERVED_17[4];
- __IO uint32_t SYSTICKCLKDIV0; /**< System Tick Timer divider for CPU0, offset: 0x300 */
- __IO uint32_t SYSTICKCLKDIV1; /**< System Tick Timer divider for CPU1, offset: 0x304 */
- __IO uint32_t TRACECLKDIV; /**< TRACE clock divider, offset: 0x308 */
- uint8_t RESERVED_18[20];
- union { /* offset: 0x320 */
- struct { /* offset: 0x320 */
- __IO uint32_t FLEXFRG0CTRL; /**< Fractional rate divider for flexcomm 0, offset: 0x320 */
- __IO uint32_t FLEXFRG1CTRL; /**< Fractional rate divider for flexcomm 1, offset: 0x324 */
- __IO uint32_t FLEXFRG2CTRL; /**< Fractional rate divider for flexcomm 2, offset: 0x328 */
- __IO uint32_t FLEXFRG3CTRL; /**< Fractional rate divider for flexcomm 3, offset: 0x32C */
- __IO uint32_t FLEXFRG4CTRL; /**< Fractional rate divider for flexcomm 4, offset: 0x330 */
- __IO uint32_t FLEXFRG5CTRL; /**< Fractional rate divider for flexcomm 5, offset: 0x334 */
- __IO uint32_t FLEXFRG6CTRL; /**< Fractional rate divider for flexcomm 6, offset: 0x338 */
- __IO uint32_t FLEXFRG7CTRL; /**< Fractional rate divider for flexcomm 7, offset: 0x33C */
- } FLEXFRGCTRL;
- __IO uint32_t FLEXFRGXCTRL[8]; /**< Peripheral reset control register, array offset: 0x320, array step: 0x4 */
- };
- uint8_t RESERVED_19[64];
- __IO uint32_t AHBCLKDIV; /**< System clock divider, offset: 0x380 */
- __IO uint32_t CLKOUTDIV; /**< CLKOUT clock divider, offset: 0x384 */
- __IO uint32_t FROHFDIV; /**< FRO_HF (96MHz) clock divider, offset: 0x388 */
- __IO uint32_t WDTCLKDIV; /**< WDT clock divider, offset: 0x38C */
- uint8_t RESERVED_20[4];
- __IO uint32_t ADCCLKDIV; /**< ADC clock divider, offset: 0x394 */
- __IO uint32_t USB0CLKDIV; /**< USB0 Clock divider, offset: 0x398 */
- uint8_t RESERVED_21[16];
- __IO uint32_t MCLKDIV; /**< I2S MCLK clock divider, offset: 0x3AC */
- uint8_t RESERVED_22[4];
- __IO uint32_t SCTCLKDIV; /**< SCT/PWM clock divider, offset: 0x3B4 */
- uint8_t RESERVED_23[4];
- __IO uint32_t SDIOCLKDIV; /**< SDIO clock divider, offset: 0x3BC */
- uint8_t RESERVED_24[4];
- __IO uint32_t PLL0CLKDIV; /**< PLL0 clock divider, offset: 0x3C4 */
- uint8_t RESERVED_25[52];
- __IO uint32_t CLOCKGENUPDATELOCKOUT; /**< Control clock configuration registers access (like xxxDIV, xxxSEL), offset: 0x3FC */
- __IO uint32_t FMCCR; /**< FMC configuration register, offset: 0x400 */
- uint8_t RESERVED_26[8];
- __IO uint32_t USB0NEEDCLKCTRL; /**< USB0 need clock control, offset: 0x40C */
- __I uint32_t USB0NEEDCLKSTAT; /**< USB0 need clock status, offset: 0x410 */
- uint8_t RESERVED_27[8];
- __O uint32_t FMCFLUSH; /**< FMCflush control, offset: 0x41C */
- __IO uint32_t MCLKIO; /**< MCLK control, offset: 0x420 */
- __IO uint32_t USB1NEEDCLKCTRL; /**< USB1 need clock control, offset: 0x424 */
- __I uint32_t USB1NEEDCLKSTAT; /**< USB1 need clock status, offset: 0x428 */
- uint8_t RESERVED_28[52];
- __IO uint32_t SDIOCLKCTRL; /**< SDIO CCLKIN phase and delay control, offset: 0x460 */
- uint8_t RESERVED_29[252];
- __IO uint32_t PLL1CTRL; /**< PLL1 550m control, offset: 0x560 */
- __I uint32_t PLL1STAT; /**< PLL1 550m status, offset: 0x564 */
- __IO uint32_t PLL1NDEC; /**< PLL1 550m N divider, offset: 0x568 */
- __IO uint32_t PLL1MDEC; /**< PLL1 550m M divider, offset: 0x56C */
- __IO uint32_t PLL1PDEC; /**< PLL1 550m P divider, offset: 0x570 */
- uint8_t RESERVED_30[12];
- __IO uint32_t PLL0CTRL; /**< PLL0 550m control, offset: 0x580 */
- __I uint32_t PLL0STAT; /**< PLL0 550m status, offset: 0x584 */
- __IO uint32_t PLL0NDEC; /**< PLL0 550m N divider, offset: 0x588 */
- __IO uint32_t PLL0PDEC; /**< PLL0 550m P divider, offset: 0x58C */
- __IO uint32_t PLL0SSCG0; /**< PLL0 Spread Spectrum Wrapper control register 0, offset: 0x590 */
- __IO uint32_t PLL0SSCG1; /**< PLL0 Spread Spectrum Wrapper control register 1, offset: 0x594 */
- uint8_t RESERVED_31[616];
- __IO uint32_t CPUCTRL; /**< CPU Control for multiple processors, offset: 0x800 */
- __IO uint32_t CPBOOT; /**< Coprocessor Boot Address, offset: 0x804 */
- uint8_t RESERVED_32[4];
- __I uint32_t CPSTAT; /**< CPU Status, offset: 0x80C */
- uint8_t RESERVED_33[520];
- __IO uint32_t CLOCK_CTRL; /**< Various system clock controls : Flash clock (48 MHz) control, clocks to Frequency Measures, offset: 0xA18 */
- uint8_t RESERVED_34[244];
- __IO uint32_t COMP_INT_CTRL; /**< Comparator Interrupt control, offset: 0xB10 */
- __I uint32_t COMP_INT_STATUS; /**< Comparator Interrupt status, offset: 0xB14 */
- uint8_t RESERVED_35[748];
- __IO uint32_t AUTOCLKGATEOVERRIDE; /**< Control automatic clock gating, offset: 0xE04 */
- __IO uint32_t GPIOPSYNC; /**< Enable bypass of the first stage of synchonization inside GPIO_INT module, offset: 0xE08 */
- uint8_t RESERVED_36[404];
- __IO uint32_t DEBUG_LOCK_EN; /**< Control write access to security registers., offset: 0xFA0 */
- __IO uint32_t DEBUG_FEATURES; /**< Cortex M33 (CPU0) and micro Cortex M33 (CPU1) debug features control., offset: 0xFA4 */
- __IO uint32_t DEBUG_FEATURES_DP; /**< Cortex M33 (CPU0) and micro Cortex M33 (CPU1) debug features control DUPLICATE register., offset: 0xFA8 */
- uint8_t RESERVED_37[16];
- __O uint32_t KEY_BLOCK; /**< block quiddikey/PUF all index., offset: 0xFBC */
- __IO uint32_t DEBUG_AUTH_BEACON; /**< Debug authentication BEACON register, offset: 0xFC0 */
- uint8_t RESERVED_38[16];
- __IO uint32_t CPUCFG; /**< CPUs configuration register, offset: 0xFD4 */
- uint8_t RESERVED_39[32];
- __I uint32_t DEVICE_ID0; /**< Device ID, offset: 0xFF8 */
- __I uint32_t DIEID; /**< Chip revision ID and Number, offset: 0xFFC */
-} SYSCON_Type;
-
-/* ----------------------------------------------------------------------------
- -- SYSCON Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SYSCON_Register_Masks SYSCON Register Masks
- * @{
- */
-
-/*! @name MEMORYREMAP - Memory Remap control register */
-/*! @{ */
-#define SYSCON_MEMORYREMAP_MAP_MASK (0x3U)
-#define SYSCON_MEMORYREMAP_MAP_SHIFT (0U)
-/*! MAP - Select the location of the vector table :.
- * 0b00..Vector Table in ROM.
- * 0b01..Vector Table in RAM.
- * 0b10..Vector Table in Flash.
- * 0b11..Vector Table in Flash.
- */
-#define SYSCON_MEMORYREMAP_MAP(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MEMORYREMAP_MAP_SHIFT)) & SYSCON_MEMORYREMAP_MAP_MASK)
-/*! @} */
-
-/*! @name AHBMATPRIO - AHB Matrix priority control register Priority values are 3 = highest, 0 = lowest */
-/*! @{ */
-#define SYSCON_AHBMATPRIO_PRI_CPU0_CBUS_MASK (0x3U)
-#define SYSCON_AHBMATPRIO_PRI_CPU0_CBUS_SHIFT (0U)
-/*! PRI_CPU0_CBUS - CPU0 C-AHB bus.
- */
-#define SYSCON_AHBMATPRIO_PRI_CPU0_CBUS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_CPU0_CBUS_SHIFT)) & SYSCON_AHBMATPRIO_PRI_CPU0_CBUS_MASK)
-#define SYSCON_AHBMATPRIO_PRI_CPU0_SBUS_MASK (0xCU)
-#define SYSCON_AHBMATPRIO_PRI_CPU0_SBUS_SHIFT (2U)
-/*! PRI_CPU0_SBUS - CPU0 S-AHB bus.
- */
-#define SYSCON_AHBMATPRIO_PRI_CPU0_SBUS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_CPU0_SBUS_SHIFT)) & SYSCON_AHBMATPRIO_PRI_CPU0_SBUS_MASK)
-#define SYSCON_AHBMATPRIO_PRI_CPU1_CBUS_MASK (0x30U)
-#define SYSCON_AHBMATPRIO_PRI_CPU1_CBUS_SHIFT (4U)
-/*! PRI_CPU1_CBUS - CPU1 C-AHB bus.
- */
-#define SYSCON_AHBMATPRIO_PRI_CPU1_CBUS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_CPU1_CBUS_SHIFT)) & SYSCON_AHBMATPRIO_PRI_CPU1_CBUS_MASK)
-#define SYSCON_AHBMATPRIO_PRI_CPU1_SBUS_MASK (0xC0U)
-#define SYSCON_AHBMATPRIO_PRI_CPU1_SBUS_SHIFT (6U)
-/*! PRI_CPU1_SBUS - CPU1 S-AHB bus.
- */
-#define SYSCON_AHBMATPRIO_PRI_CPU1_SBUS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_CPU1_SBUS_SHIFT)) & SYSCON_AHBMATPRIO_PRI_CPU1_SBUS_MASK)
-#define SYSCON_AHBMATPRIO_PRI_USB_FS_MASK (0x300U)
-#define SYSCON_AHBMATPRIO_PRI_USB_FS_SHIFT (8U)
-/*! PRI_USB_FS - USB-FS.(USB0)
- */
-#define SYSCON_AHBMATPRIO_PRI_USB_FS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_USB_FS_SHIFT)) & SYSCON_AHBMATPRIO_PRI_USB_FS_MASK)
-#define SYSCON_AHBMATPRIO_PRI_SDMA0_MASK (0xC00U)
-#define SYSCON_AHBMATPRIO_PRI_SDMA0_SHIFT (10U)
-/*! PRI_SDMA0 - DMA0 controller priority.
- */
-#define SYSCON_AHBMATPRIO_PRI_SDMA0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_SDMA0_SHIFT)) & SYSCON_AHBMATPRIO_PRI_SDMA0_MASK)
-#define SYSCON_AHBMATPRIO_PRI_SDIO_MASK (0x30000U)
-#define SYSCON_AHBMATPRIO_PRI_SDIO_SHIFT (16U)
-/*! PRI_SDIO - SDIO.
- */
-#define SYSCON_AHBMATPRIO_PRI_SDIO(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_SDIO_SHIFT)) & SYSCON_AHBMATPRIO_PRI_SDIO_MASK)
-#define SYSCON_AHBMATPRIO_PRI_PQ_MASK (0xC0000U)
-#define SYSCON_AHBMATPRIO_PRI_PQ_SHIFT (18U)
-/*! PRI_PQ - PQ (HW Accelerator).
- */
-#define SYSCON_AHBMATPRIO_PRI_PQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_PQ_SHIFT)) & SYSCON_AHBMATPRIO_PRI_PQ_MASK)
-#define SYSCON_AHBMATPRIO_PRI_HASH_AES_MASK (0x300000U)
-#define SYSCON_AHBMATPRIO_PRI_HASH_AES_SHIFT (20U)
-/*! PRI_HASH_AES - HASH_AES.
- */
-#define SYSCON_AHBMATPRIO_PRI_HASH_AES(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_HASH_AES_SHIFT)) & SYSCON_AHBMATPRIO_PRI_HASH_AES_MASK)
-#define SYSCON_AHBMATPRIO_PRI_USB_HS_MASK (0xC00000U)
-#define SYSCON_AHBMATPRIO_PRI_USB_HS_SHIFT (22U)
-/*! PRI_USB_HS - USB-HS.(USB1)
- */
-#define SYSCON_AHBMATPRIO_PRI_USB_HS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_USB_HS_SHIFT)) & SYSCON_AHBMATPRIO_PRI_USB_HS_MASK)
-#define SYSCON_AHBMATPRIO_PRI_SDMA1_MASK (0x3000000U)
-#define SYSCON_AHBMATPRIO_PRI_SDMA1_SHIFT (24U)
-/*! PRI_SDMA1 - DMA1 controller priority.
- */
-#define SYSCON_AHBMATPRIO_PRI_SDMA1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBMATPRIO_PRI_SDMA1_SHIFT)) & SYSCON_AHBMATPRIO_PRI_SDMA1_MASK)
-/*! @} */
-
-/*! @name CPU0STCKCAL - System tick calibration for secure part of CPU0 */
-/*! @{ */
-#define SYSCON_CPU0STCKCAL_TENMS_MASK (0xFFFFFFU)
-#define SYSCON_CPU0STCKCAL_TENMS_SHIFT (0U)
-/*! TENMS - Reload value for 10ms (100Hz) timing, subject to system clock skew errors. If the value
- * reads as zero, the calibration value is not known.
- */
-#define SYSCON_CPU0STCKCAL_TENMS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU0STCKCAL_TENMS_SHIFT)) & SYSCON_CPU0STCKCAL_TENMS_MASK)
-#define SYSCON_CPU0STCKCAL_SKEW_MASK (0x1000000U)
-#define SYSCON_CPU0STCKCAL_SKEW_SHIFT (24U)
-/*! SKEW - Initial value for the Systick timer.
- */
-#define SYSCON_CPU0STCKCAL_SKEW(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU0STCKCAL_SKEW_SHIFT)) & SYSCON_CPU0STCKCAL_SKEW_MASK)
-#define SYSCON_CPU0STCKCAL_NOREF_MASK (0x2000000U)
-#define SYSCON_CPU0STCKCAL_NOREF_SHIFT (25U)
-/*! NOREF - Indicates whether the device provides a reference clock to the processor: 0 = reference
- * clock provided; 1 = no reference clock provided.
- */
-#define SYSCON_CPU0STCKCAL_NOREF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU0STCKCAL_NOREF_SHIFT)) & SYSCON_CPU0STCKCAL_NOREF_MASK)
-/*! @} */
-
-/*! @name CPU0NSTCKCAL - System tick calibration for non-secure part of CPU0 */
-/*! @{ */
-#define SYSCON_CPU0NSTCKCAL_TENMS_MASK (0xFFFFFFU)
-#define SYSCON_CPU0NSTCKCAL_TENMS_SHIFT (0U)
-/*! TENMS - Reload value for 10 ms (100 Hz) timing, subject to system clock skew errors. If the
- * value reads as zero, the calibration value is not known.
- */
-#define SYSCON_CPU0NSTCKCAL_TENMS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU0NSTCKCAL_TENMS_SHIFT)) & SYSCON_CPU0NSTCKCAL_TENMS_MASK)
-#define SYSCON_CPU0NSTCKCAL_SKEW_MASK (0x1000000U)
-#define SYSCON_CPU0NSTCKCAL_SKEW_SHIFT (24U)
-/*! SKEW - Indicates whether the TENMS value is exact: 0 = TENMS value is exact; 1 = TENMS value is inexact, or not given.
- */
-#define SYSCON_CPU0NSTCKCAL_SKEW(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU0NSTCKCAL_SKEW_SHIFT)) & SYSCON_CPU0NSTCKCAL_SKEW_MASK)
-#define SYSCON_CPU0NSTCKCAL_NOREF_MASK (0x2000000U)
-#define SYSCON_CPU0NSTCKCAL_NOREF_SHIFT (25U)
-/*! NOREF - Initial value for the Systick timer.
- */
-#define SYSCON_CPU0NSTCKCAL_NOREF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU0NSTCKCAL_NOREF_SHIFT)) & SYSCON_CPU0NSTCKCAL_NOREF_MASK)
-/*! @} */
-
-/*! @name CPU1STCKCAL - System tick calibration for CPU1 */
-/*! @{ */
-#define SYSCON_CPU1STCKCAL_TENMS_MASK (0xFFFFFFU)
-#define SYSCON_CPU1STCKCAL_TENMS_SHIFT (0U)
-/*! TENMS - Reload value for 10ms (100Hz) timing, subject to system clock skew errors. If the value
- * reads as zero, the calibration value is not known.
- */
-#define SYSCON_CPU1STCKCAL_TENMS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU1STCKCAL_TENMS_SHIFT)) & SYSCON_CPU1STCKCAL_TENMS_MASK)
-#define SYSCON_CPU1STCKCAL_SKEW_MASK (0x1000000U)
-#define SYSCON_CPU1STCKCAL_SKEW_SHIFT (24U)
-/*! SKEW - Indicates whether the TENMS value is exact: 0 = TENMS value is exact; 1 = TENMS value is inexact, or not given.
- */
-#define SYSCON_CPU1STCKCAL_SKEW(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU1STCKCAL_SKEW_SHIFT)) & SYSCON_CPU1STCKCAL_SKEW_MASK)
-#define SYSCON_CPU1STCKCAL_NOREF_MASK (0x2000000U)
-#define SYSCON_CPU1STCKCAL_NOREF_SHIFT (25U)
-/*! NOREF - Indicates whether the device provides a reference clock to the processor: 0 = reference
- * clock provided; 1 = no reference clock provided.
- */
-#define SYSCON_CPU1STCKCAL_NOREF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPU1STCKCAL_NOREF_SHIFT)) & SYSCON_CPU1STCKCAL_NOREF_MASK)
-/*! @} */
-
-/*! @name NMISRC - NMI Source Select */
-/*! @{ */
-#define SYSCON_NMISRC_IRQCPU0_MASK (0x3FU)
-#define SYSCON_NMISRC_IRQCPU0_SHIFT (0U)
-/*! IRQCPU0 - The IRQ number of the interrupt that acts as the Non-Maskable Interrupt (NMI) for the CPU0, if enabled by NMIENCPU0.
- */
-#define SYSCON_NMISRC_IRQCPU0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_NMISRC_IRQCPU0_SHIFT)) & SYSCON_NMISRC_IRQCPU0_MASK)
-#define SYSCON_NMISRC_IRQCPU1_MASK (0x3F00U)
-#define SYSCON_NMISRC_IRQCPU1_SHIFT (8U)
-/*! IRQCPU1 - The IRQ number of the interrupt that acts as the Non-Maskable Interrupt (NMI) for the CPU1, if enabled by NMIENCPU1.
- */
-#define SYSCON_NMISRC_IRQCPU1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_NMISRC_IRQCPU1_SHIFT)) & SYSCON_NMISRC_IRQCPU1_MASK)
-#define SYSCON_NMISRC_NMIENCPU1_MASK (0x40000000U)
-#define SYSCON_NMISRC_NMIENCPU1_SHIFT (30U)
-/*! NMIENCPU1 - Write a 1 to this bit to enable the Non-Maskable Interrupt (NMI) source selected by IRQCPU1.
- */
-#define SYSCON_NMISRC_NMIENCPU1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_NMISRC_NMIENCPU1_SHIFT)) & SYSCON_NMISRC_NMIENCPU1_MASK)
-#define SYSCON_NMISRC_NMIENCPU0_MASK (0x80000000U)
-#define SYSCON_NMISRC_NMIENCPU0_SHIFT (31U)
-/*! NMIENCPU0 - Write a 1 to this bit to enable the Non-Maskable Interrupt (NMI) source selected by IRQCPU0.
- */
-#define SYSCON_NMISRC_NMIENCPU0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_NMISRC_NMIENCPU0_SHIFT)) & SYSCON_NMISRC_NMIENCPU0_MASK)
-/*! @} */
-
-/*! @name PRESETCTRL0 - Peripheral reset control 0 */
-/*! @{ */
-#define SYSCON_PRESETCTRL0_ROM_RST_MASK (0x2U)
-#define SYSCON_PRESETCTRL0_ROM_RST_SHIFT (1U)
-/*! ROM_RST - ROM reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_ROM_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_ROM_RST_SHIFT)) & SYSCON_PRESETCTRL0_ROM_RST_MASK)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL1_RST_MASK (0x8U)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL1_RST_SHIFT (3U)
-/*! SRAM_CTRL1_RST - SRAM Controller 1 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_SRAM_CTRL1_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_SRAM_CTRL1_RST_SHIFT)) & SYSCON_PRESETCTRL0_SRAM_CTRL1_RST_MASK)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL2_RST_MASK (0x10U)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL2_RST_SHIFT (4U)
-/*! SRAM_CTRL2_RST - SRAM Controller 2 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_SRAM_CTRL2_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_SRAM_CTRL2_RST_SHIFT)) & SYSCON_PRESETCTRL0_SRAM_CTRL2_RST_MASK)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL3_RST_MASK (0x20U)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL3_RST_SHIFT (5U)
-/*! SRAM_CTRL3_RST - SRAM Controller 3 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_SRAM_CTRL3_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_SRAM_CTRL3_RST_SHIFT)) & SYSCON_PRESETCTRL0_SRAM_CTRL3_RST_MASK)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL4_RST_MASK (0x40U)
-#define SYSCON_PRESETCTRL0_SRAM_CTRL4_RST_SHIFT (6U)
-/*! SRAM_CTRL4_RST - SRAM Controller 4 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_SRAM_CTRL4_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_SRAM_CTRL4_RST_SHIFT)) & SYSCON_PRESETCTRL0_SRAM_CTRL4_RST_MASK)
-#define SYSCON_PRESETCTRL0_FLASH_RST_MASK (0x80U)
-#define SYSCON_PRESETCTRL0_FLASH_RST_SHIFT (7U)
-/*! FLASH_RST - Flash controller reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_FLASH_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_FLASH_RST_SHIFT)) & SYSCON_PRESETCTRL0_FLASH_RST_MASK)
-#define SYSCON_PRESETCTRL0_FMC_RST_MASK (0x100U)
-#define SYSCON_PRESETCTRL0_FMC_RST_SHIFT (8U)
-/*! FMC_RST - FMC controller reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_FMC_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_FMC_RST_SHIFT)) & SYSCON_PRESETCTRL0_FMC_RST_MASK)
-#define SYSCON_PRESETCTRL0_MUX_RST_MASK (0x800U)
-#define SYSCON_PRESETCTRL0_MUX_RST_SHIFT (11U)
-/*! MUX_RST - Input Mux reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_MUX_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_MUX_RST_SHIFT)) & SYSCON_PRESETCTRL0_MUX_RST_MASK)
-#define SYSCON_PRESETCTRL0_IOCON_RST_MASK (0x2000U)
-#define SYSCON_PRESETCTRL0_IOCON_RST_SHIFT (13U)
-/*! IOCON_RST - I/O controller reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_IOCON_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_IOCON_RST_SHIFT)) & SYSCON_PRESETCTRL0_IOCON_RST_MASK)
-#define SYSCON_PRESETCTRL0_GPIO0_RST_MASK (0x4000U)
-#define SYSCON_PRESETCTRL0_GPIO0_RST_SHIFT (14U)
-/*! GPIO0_RST - GPIO0 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_GPIO0_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_GPIO0_RST_SHIFT)) & SYSCON_PRESETCTRL0_GPIO0_RST_MASK)
-#define SYSCON_PRESETCTRL0_GPIO1_RST_MASK (0x8000U)
-#define SYSCON_PRESETCTRL0_GPIO1_RST_SHIFT (15U)
-/*! GPIO1_RST - GPIO1 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_GPIO1_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_GPIO1_RST_SHIFT)) & SYSCON_PRESETCTRL0_GPIO1_RST_MASK)
-#define SYSCON_PRESETCTRL0_GPIO2_RST_MASK (0x10000U)
-#define SYSCON_PRESETCTRL0_GPIO2_RST_SHIFT (16U)
-/*! GPIO2_RST - GPIO2 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_GPIO2_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_GPIO2_RST_SHIFT)) & SYSCON_PRESETCTRL0_GPIO2_RST_MASK)
-#define SYSCON_PRESETCTRL0_GPIO3_RST_MASK (0x20000U)
-#define SYSCON_PRESETCTRL0_GPIO3_RST_SHIFT (17U)
-/*! GPIO3_RST - GPIO3 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_GPIO3_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_GPIO3_RST_SHIFT)) & SYSCON_PRESETCTRL0_GPIO3_RST_MASK)
-#define SYSCON_PRESETCTRL0_PINT_RST_MASK (0x40000U)
-#define SYSCON_PRESETCTRL0_PINT_RST_SHIFT (18U)
-/*! PINT_RST - Pin interrupt (PINT) reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_PINT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_PINT_RST_SHIFT)) & SYSCON_PRESETCTRL0_PINT_RST_MASK)
-#define SYSCON_PRESETCTRL0_GINT_RST_MASK (0x80000U)
-#define SYSCON_PRESETCTRL0_GINT_RST_SHIFT (19U)
-/*! GINT_RST - Group interrupt (GINT) reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_GINT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_GINT_RST_SHIFT)) & SYSCON_PRESETCTRL0_GINT_RST_MASK)
-#define SYSCON_PRESETCTRL0_DMA0_RST_MASK (0x100000U)
-#define SYSCON_PRESETCTRL0_DMA0_RST_SHIFT (20U)
-/*! DMA0_RST - DMA0 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_DMA0_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_DMA0_RST_SHIFT)) & SYSCON_PRESETCTRL0_DMA0_RST_MASK)
-#define SYSCON_PRESETCTRL0_CRCGEN_RST_MASK (0x200000U)
-#define SYSCON_PRESETCTRL0_CRCGEN_RST_SHIFT (21U)
-/*! CRCGEN_RST - CRCGEN reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_CRCGEN_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_CRCGEN_RST_SHIFT)) & SYSCON_PRESETCTRL0_CRCGEN_RST_MASK)
-#define SYSCON_PRESETCTRL0_WWDT_RST_MASK (0x400000U)
-#define SYSCON_PRESETCTRL0_WWDT_RST_SHIFT (22U)
-/*! WWDT_RST - Watchdog Timer reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_WWDT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_WWDT_RST_SHIFT)) & SYSCON_PRESETCTRL0_WWDT_RST_MASK)
-#define SYSCON_PRESETCTRL0_RTC_RST_MASK (0x800000U)
-#define SYSCON_PRESETCTRL0_RTC_RST_SHIFT (23U)
-/*! RTC_RST - Real Time Clock (RTC) reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_RTC_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_RTC_RST_SHIFT)) & SYSCON_PRESETCTRL0_RTC_RST_MASK)
-#define SYSCON_PRESETCTRL0_MAILBOX_RST_MASK (0x4000000U)
-#define SYSCON_PRESETCTRL0_MAILBOX_RST_SHIFT (26U)
-/*! MAILBOX_RST - Inter CPU communication Mailbox reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_MAILBOX_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_MAILBOX_RST_SHIFT)) & SYSCON_PRESETCTRL0_MAILBOX_RST_MASK)
-#define SYSCON_PRESETCTRL0_ADC_RST_MASK (0x8000000U)
-#define SYSCON_PRESETCTRL0_ADC_RST_SHIFT (27U)
-/*! ADC_RST - ADC reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL0_ADC_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL0_ADC_RST_SHIFT)) & SYSCON_PRESETCTRL0_ADC_RST_MASK)
-/*! @} */
-
-/*! @name PRESETCTRL1 - Peripheral reset control 1 */
-/*! @{ */
-#define SYSCON_PRESETCTRL1_MRT_RST_MASK (0x1U)
-#define SYSCON_PRESETCTRL1_MRT_RST_SHIFT (0U)
-/*! MRT_RST - MRT reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_MRT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_MRT_RST_SHIFT)) & SYSCON_PRESETCTRL1_MRT_RST_MASK)
-#define SYSCON_PRESETCTRL1_OSTIMER_RST_MASK (0x2U)
-#define SYSCON_PRESETCTRL1_OSTIMER_RST_SHIFT (1U)
-/*! OSTIMER_RST - OS Event Timer reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_OSTIMER_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_OSTIMER_RST_SHIFT)) & SYSCON_PRESETCTRL1_OSTIMER_RST_MASK)
-#define SYSCON_PRESETCTRL1_SCT_RST_MASK (0x4U)
-#define SYSCON_PRESETCTRL1_SCT_RST_SHIFT (2U)
-/*! SCT_RST - SCT reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_SCT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_SCT_RST_SHIFT)) & SYSCON_PRESETCTRL1_SCT_RST_MASK)
-#define SYSCON_PRESETCTRL1_SCTIPU_RST_MASK (0x40U)
-#define SYSCON_PRESETCTRL1_SCTIPU_RST_SHIFT (6U)
-/*! SCTIPU_RST - SCTIPU reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_SCTIPU_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_SCTIPU_RST_SHIFT)) & SYSCON_PRESETCTRL1_SCTIPU_RST_MASK)
-#define SYSCON_PRESETCTRL1_UTICK_RST_MASK (0x400U)
-#define SYSCON_PRESETCTRL1_UTICK_RST_SHIFT (10U)
-/*! UTICK_RST - UTICK reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_UTICK_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_UTICK_RST_SHIFT)) & SYSCON_PRESETCTRL1_UTICK_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC0_RST_MASK (0x800U)
-#define SYSCON_PRESETCTRL1_FC0_RST_SHIFT (11U)
-/*! FC0_RST - FC0 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC0_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC0_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC0_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC1_RST_MASK (0x1000U)
-#define SYSCON_PRESETCTRL1_FC1_RST_SHIFT (12U)
-/*! FC1_RST - FC1 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC1_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC1_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC1_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC2_RST_MASK (0x2000U)
-#define SYSCON_PRESETCTRL1_FC2_RST_SHIFT (13U)
-/*! FC2_RST - FC2 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC2_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC2_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC2_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC3_RST_MASK (0x4000U)
-#define SYSCON_PRESETCTRL1_FC3_RST_SHIFT (14U)
-/*! FC3_RST - FC3 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC3_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC3_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC3_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC4_RST_MASK (0x8000U)
-#define SYSCON_PRESETCTRL1_FC4_RST_SHIFT (15U)
-/*! FC4_RST - FC4 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC4_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC4_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC4_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC5_RST_MASK (0x10000U)
-#define SYSCON_PRESETCTRL1_FC5_RST_SHIFT (16U)
-/*! FC5_RST - FC5 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC5_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC5_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC5_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC6_RST_MASK (0x20000U)
-#define SYSCON_PRESETCTRL1_FC6_RST_SHIFT (17U)
-/*! FC6_RST - FC6 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC6_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC6_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC6_RST_MASK)
-#define SYSCON_PRESETCTRL1_FC7_RST_MASK (0x40000U)
-#define SYSCON_PRESETCTRL1_FC7_RST_SHIFT (18U)
-/*! FC7_RST - FC7 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_FC7_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_FC7_RST_SHIFT)) & SYSCON_PRESETCTRL1_FC7_RST_MASK)
-#define SYSCON_PRESETCTRL1_TIMER2_RST_MASK (0x400000U)
-#define SYSCON_PRESETCTRL1_TIMER2_RST_SHIFT (22U)
-/*! TIMER2_RST - Timer 2 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_TIMER2_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_TIMER2_RST_SHIFT)) & SYSCON_PRESETCTRL1_TIMER2_RST_MASK)
-#define SYSCON_PRESETCTRL1_USB0_DEV_RST_MASK (0x2000000U)
-#define SYSCON_PRESETCTRL1_USB0_DEV_RST_SHIFT (25U)
-/*! USB0_DEV_RST - USB0 DEV reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_USB0_DEV_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_USB0_DEV_RST_SHIFT)) & SYSCON_PRESETCTRL1_USB0_DEV_RST_MASK)
-#define SYSCON_PRESETCTRL1_TIMER0_RST_MASK (0x4000000U)
-#define SYSCON_PRESETCTRL1_TIMER0_RST_SHIFT (26U)
-/*! TIMER0_RST - Timer 0 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_TIMER0_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_TIMER0_RST_SHIFT)) & SYSCON_PRESETCTRL1_TIMER0_RST_MASK)
-#define SYSCON_PRESETCTRL1_TIMER1_RST_MASK (0x8000000U)
-#define SYSCON_PRESETCTRL1_TIMER1_RST_SHIFT (27U)
-/*! TIMER1_RST - Timer 1 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL1_TIMER1_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL1_TIMER1_RST_SHIFT)) & SYSCON_PRESETCTRL1_TIMER1_RST_MASK)
-/*! @} */
-
-/*! @name PRESETCTRL2 - Peripheral reset control 2 */
-/*! @{ */
-#define SYSCON_PRESETCTRL2_DMA1_RST_MASK (0x2U)
-#define SYSCON_PRESETCTRL2_DMA1_RST_SHIFT (1U)
-/*! DMA1_RST - DMA1 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_DMA1_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_DMA1_RST_SHIFT)) & SYSCON_PRESETCTRL2_DMA1_RST_MASK)
-#define SYSCON_PRESETCTRL2_COMP_RST_MASK (0x4U)
-#define SYSCON_PRESETCTRL2_COMP_RST_SHIFT (2U)
-/*! COMP_RST - Comparator reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_COMP_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_COMP_RST_SHIFT)) & SYSCON_PRESETCTRL2_COMP_RST_MASK)
-#define SYSCON_PRESETCTRL2_SDIO_RST_MASK (0x8U)
-#define SYSCON_PRESETCTRL2_SDIO_RST_SHIFT (3U)
-/*! SDIO_RST - SDIO reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_SDIO_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_SDIO_RST_SHIFT)) & SYSCON_PRESETCTRL2_SDIO_RST_MASK)
-#define SYSCON_PRESETCTRL2_USB1_HOST_RST_MASK (0x10U)
-#define SYSCON_PRESETCTRL2_USB1_HOST_RST_SHIFT (4U)
-/*! USB1_HOST_RST - USB1 Host reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_USB1_HOST_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_USB1_HOST_RST_SHIFT)) & SYSCON_PRESETCTRL2_USB1_HOST_RST_MASK)
-#define SYSCON_PRESETCTRL2_USB1_DEV_RST_MASK (0x20U)
-#define SYSCON_PRESETCTRL2_USB1_DEV_RST_SHIFT (5U)
-/*! USB1_DEV_RST - USB1 dev reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_USB1_DEV_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_USB1_DEV_RST_SHIFT)) & SYSCON_PRESETCTRL2_USB1_DEV_RST_MASK)
-#define SYSCON_PRESETCTRL2_USB1_RAM_RST_MASK (0x40U)
-#define SYSCON_PRESETCTRL2_USB1_RAM_RST_SHIFT (6U)
-/*! USB1_RAM_RST - USB1 RAM reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_USB1_RAM_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_USB1_RAM_RST_SHIFT)) & SYSCON_PRESETCTRL2_USB1_RAM_RST_MASK)
-#define SYSCON_PRESETCTRL2_USB1_PHY_RST_MASK (0x80U)
-#define SYSCON_PRESETCTRL2_USB1_PHY_RST_SHIFT (7U)
-/*! USB1_PHY_RST - USB1 PHY reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_USB1_PHY_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_USB1_PHY_RST_SHIFT)) & SYSCON_PRESETCTRL2_USB1_PHY_RST_MASK)
-#define SYSCON_PRESETCTRL2_FREQME_RST_MASK (0x100U)
-#define SYSCON_PRESETCTRL2_FREQME_RST_SHIFT (8U)
-/*! FREQME_RST - Frequency meter reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_FREQME_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_FREQME_RST_SHIFT)) & SYSCON_PRESETCTRL2_FREQME_RST_MASK)
-#define SYSCON_PRESETCTRL2_RNG_RST_MASK (0x2000U)
-#define SYSCON_PRESETCTRL2_RNG_RST_SHIFT (13U)
-/*! RNG_RST - RNG reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_RNG_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_RNG_RST_SHIFT)) & SYSCON_PRESETCTRL2_RNG_RST_MASK)
-#define SYSCON_PRESETCTRL2_SYSCTL_RST_MASK (0x8000U)
-#define SYSCON_PRESETCTRL2_SYSCTL_RST_SHIFT (15U)
-/*! SYSCTL_RST - SYSCTL Block reset.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_SYSCTL_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_SYSCTL_RST_SHIFT)) & SYSCON_PRESETCTRL2_SYSCTL_RST_MASK)
-#define SYSCON_PRESETCTRL2_USB0_HOSTM_RST_MASK (0x10000U)
-#define SYSCON_PRESETCTRL2_USB0_HOSTM_RST_SHIFT (16U)
-/*! USB0_HOSTM_RST - USB0 Host Master reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_USB0_HOSTM_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_USB0_HOSTM_RST_SHIFT)) & SYSCON_PRESETCTRL2_USB0_HOSTM_RST_MASK)
-#define SYSCON_PRESETCTRL2_USB0_HOSTS_RST_MASK (0x20000U)
-#define SYSCON_PRESETCTRL2_USB0_HOSTS_RST_SHIFT (17U)
-/*! USB0_HOSTS_RST - USB0 Host Slave reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_USB0_HOSTS_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_USB0_HOSTS_RST_SHIFT)) & SYSCON_PRESETCTRL2_USB0_HOSTS_RST_MASK)
-#define SYSCON_PRESETCTRL2_HASH_AES_RST_MASK (0x40000U)
-#define SYSCON_PRESETCTRL2_HASH_AES_RST_SHIFT (18U)
-/*! HASH_AES_RST - HASH_AES reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_HASH_AES_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_HASH_AES_RST_SHIFT)) & SYSCON_PRESETCTRL2_HASH_AES_RST_MASK)
-#define SYSCON_PRESETCTRL2_PQ_RST_MASK (0x80000U)
-#define SYSCON_PRESETCTRL2_PQ_RST_SHIFT (19U)
-/*! PQ_RST - Power Quad reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_PQ_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_PQ_RST_SHIFT)) & SYSCON_PRESETCTRL2_PQ_RST_MASK)
-#define SYSCON_PRESETCTRL2_PLULUT_RST_MASK (0x100000U)
-#define SYSCON_PRESETCTRL2_PLULUT_RST_SHIFT (20U)
-/*! PLULUT_RST - PLU LUT reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_PLULUT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_PLULUT_RST_SHIFT)) & SYSCON_PRESETCTRL2_PLULUT_RST_MASK)
-#define SYSCON_PRESETCTRL2_TIMER3_RST_MASK (0x200000U)
-#define SYSCON_PRESETCTRL2_TIMER3_RST_SHIFT (21U)
-/*! TIMER3_RST - Timer 3 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_TIMER3_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_TIMER3_RST_SHIFT)) & SYSCON_PRESETCTRL2_TIMER3_RST_MASK)
-#define SYSCON_PRESETCTRL2_TIMER4_RST_MASK (0x400000U)
-#define SYSCON_PRESETCTRL2_TIMER4_RST_SHIFT (22U)
-/*! TIMER4_RST - Timer 4 reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_TIMER4_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_TIMER4_RST_SHIFT)) & SYSCON_PRESETCTRL2_TIMER4_RST_MASK)
-#define SYSCON_PRESETCTRL2_PUF_RST_MASK (0x800000U)
-#define SYSCON_PRESETCTRL2_PUF_RST_SHIFT (23U)
-/*! PUF_RST - PUF reset control reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_PUF_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_PUF_RST_SHIFT)) & SYSCON_PRESETCTRL2_PUF_RST_MASK)
-#define SYSCON_PRESETCTRL2_CASPER_RST_MASK (0x1000000U)
-#define SYSCON_PRESETCTRL2_CASPER_RST_SHIFT (24U)
-/*! CASPER_RST - Casper reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_CASPER_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_CASPER_RST_SHIFT)) & SYSCON_PRESETCTRL2_CASPER_RST_MASK)
-#define SYSCON_PRESETCTRL2_ANALOG_CTRL_RST_MASK (0x8000000U)
-#define SYSCON_PRESETCTRL2_ANALOG_CTRL_RST_SHIFT (27U)
-/*! ANALOG_CTRL_RST - analog control reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_ANALOG_CTRL_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_ANALOG_CTRL_RST_SHIFT)) & SYSCON_PRESETCTRL2_ANALOG_CTRL_RST_MASK)
-#define SYSCON_PRESETCTRL2_HS_LSPI_RST_MASK (0x10000000U)
-#define SYSCON_PRESETCTRL2_HS_LSPI_RST_SHIFT (28U)
-/*! HS_LSPI_RST - HS LSPI reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_HS_LSPI_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_HS_LSPI_RST_SHIFT)) & SYSCON_PRESETCTRL2_HS_LSPI_RST_MASK)
-#define SYSCON_PRESETCTRL2_GPIO_SEC_RST_MASK (0x20000000U)
-#define SYSCON_PRESETCTRL2_GPIO_SEC_RST_SHIFT (29U)
-/*! GPIO_SEC_RST - GPIO secure reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_GPIO_SEC_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_GPIO_SEC_RST_SHIFT)) & SYSCON_PRESETCTRL2_GPIO_SEC_RST_MASK)
-#define SYSCON_PRESETCTRL2_GPIO_SEC_INT_RST_MASK (0x40000000U)
-#define SYSCON_PRESETCTRL2_GPIO_SEC_INT_RST_SHIFT (30U)
-/*! GPIO_SEC_INT_RST - GPIO secure int reset control.
- * 0b1..Bloc is reset.
- * 0b0..Bloc is not reset.
- */
-#define SYSCON_PRESETCTRL2_GPIO_SEC_INT_RST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRL2_GPIO_SEC_INT_RST_SHIFT)) & SYSCON_PRESETCTRL2_GPIO_SEC_INT_RST_MASK)
-/*! @} */
-
-/*! @name PRESETCTRLX - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_PRESETCTRLX_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_PRESETCTRLX_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_PRESETCTRLX_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRLX_DATA_SHIFT)) & SYSCON_PRESETCTRLX_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_PRESETCTRLX */
-#define SYSCON_PRESETCTRLX_COUNT (3U)
-
-/*! @name PRESETCTRLSET - Peripheral reset control set register */
-/*! @{ */
-#define SYSCON_PRESETCTRLSET_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_PRESETCTRLSET_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_PRESETCTRLSET_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRLSET_DATA_SHIFT)) & SYSCON_PRESETCTRLSET_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_PRESETCTRLSET */
-#define SYSCON_PRESETCTRLSET_COUNT (3U)
-
-/*! @name PRESETCTRLCLR - Peripheral reset control clear register */
-/*! @{ */
-#define SYSCON_PRESETCTRLCLR_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_PRESETCTRLCLR_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_PRESETCTRLCLR_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PRESETCTRLCLR_DATA_SHIFT)) & SYSCON_PRESETCTRLCLR_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_PRESETCTRLCLR */
-#define SYSCON_PRESETCTRLCLR_COUNT (3U)
-
-/*! @name SWR_RESET - generate a software_reset */
-/*! @{ */
-#define SYSCON_SWR_RESET_SWR_RESET_MASK (0xFFFFFFFFU)
-#define SYSCON_SWR_RESET_SWR_RESET_SHIFT (0U)
-/*! SWR_RESET - Write 0x5A00_0001 to generate a software_reset.
- * 0b01011010000000000000000000000001..Generate a software reset.
- * 0b00000000000000000000000000000000..Bloc is not reset.
- */
-#define SYSCON_SWR_RESET_SWR_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SWR_RESET_SWR_RESET_SHIFT)) & SYSCON_SWR_RESET_SWR_RESET_MASK)
-/*! @} */
-
-/*! @name AHBCLKCTRL0 - AHB Clock control 0 */
-/*! @{ */
-#define SYSCON_AHBCLKCTRL0_ROM_MASK (0x2U)
-#define SYSCON_AHBCLKCTRL0_ROM_SHIFT (1U)
-/*! ROM - Enables the clock for the ROM.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_ROM(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_ROM_SHIFT)) & SYSCON_AHBCLKCTRL0_ROM_MASK)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL1_MASK (0x8U)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL1_SHIFT (3U)
-/*! SRAM_CTRL1 - Enables the clock for the SRAM Controller 1.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_SRAM_CTRL1_SHIFT)) & SYSCON_AHBCLKCTRL0_SRAM_CTRL1_MASK)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL2_MASK (0x10U)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL2_SHIFT (4U)
-/*! SRAM_CTRL2 - Enables the clock for the SRAM Controller 2.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL2(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_SRAM_CTRL2_SHIFT)) & SYSCON_AHBCLKCTRL0_SRAM_CTRL2_MASK)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL3_MASK (0x20U)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL3_SHIFT (5U)
-/*! SRAM_CTRL3 - Enables the clock for the SRAM Controller 3.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL3(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_SRAM_CTRL3_SHIFT)) & SYSCON_AHBCLKCTRL0_SRAM_CTRL3_MASK)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL4_MASK (0x40U)
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL4_SHIFT (6U)
-/*! SRAM_CTRL4 - Enables the clock for the SRAM Controller 4.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_SRAM_CTRL4(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_SRAM_CTRL4_SHIFT)) & SYSCON_AHBCLKCTRL0_SRAM_CTRL4_MASK)
-#define SYSCON_AHBCLKCTRL0_FLASH_MASK (0x80U)
-#define SYSCON_AHBCLKCTRL0_FLASH_SHIFT (7U)
-/*! FLASH - Enables the clock for the Flash controller.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_FLASH(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_FLASH_SHIFT)) & SYSCON_AHBCLKCTRL0_FLASH_MASK)
-#define SYSCON_AHBCLKCTRL0_FMC_MASK (0x100U)
-#define SYSCON_AHBCLKCTRL0_FMC_SHIFT (8U)
-/*! FMC - Enables the clock for the FMC controller.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_FMC(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_FMC_SHIFT)) & SYSCON_AHBCLKCTRL0_FMC_MASK)
-#define SYSCON_AHBCLKCTRL0_MUX_MASK (0x800U)
-#define SYSCON_AHBCLKCTRL0_MUX_SHIFT (11U)
-/*! MUX - Enables the clock for the Input Mux.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_MUX(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_MUX_SHIFT)) & SYSCON_AHBCLKCTRL0_MUX_MASK)
-#define SYSCON_AHBCLKCTRL0_IOCON_MASK (0x2000U)
-#define SYSCON_AHBCLKCTRL0_IOCON_SHIFT (13U)
-/*! IOCON - Enables the clock for the I/O controller.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_IOCON(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_IOCON_SHIFT)) & SYSCON_AHBCLKCTRL0_IOCON_MASK)
-#define SYSCON_AHBCLKCTRL0_GPIO0_MASK (0x4000U)
-#define SYSCON_AHBCLKCTRL0_GPIO0_SHIFT (14U)
-/*! GPIO0 - Enables the clock for the GPIO0.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_GPIO0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_GPIO0_SHIFT)) & SYSCON_AHBCLKCTRL0_GPIO0_MASK)
-#define SYSCON_AHBCLKCTRL0_GPIO1_MASK (0x8000U)
-#define SYSCON_AHBCLKCTRL0_GPIO1_SHIFT (15U)
-/*! GPIO1 - Enables the clock for the GPIO1.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_GPIO1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_GPIO1_SHIFT)) & SYSCON_AHBCLKCTRL0_GPIO1_MASK)
-#define SYSCON_AHBCLKCTRL0_GPIO2_MASK (0x10000U)
-#define SYSCON_AHBCLKCTRL0_GPIO2_SHIFT (16U)
-/*! GPIO2 - Enables the clock for the GPIO2.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_GPIO2(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_GPIO2_SHIFT)) & SYSCON_AHBCLKCTRL0_GPIO2_MASK)
-#define SYSCON_AHBCLKCTRL0_GPIO3_MASK (0x20000U)
-#define SYSCON_AHBCLKCTRL0_GPIO3_SHIFT (17U)
-/*! GPIO3 - Enables the clock for the GPIO3.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_GPIO3(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_GPIO3_SHIFT)) & SYSCON_AHBCLKCTRL0_GPIO3_MASK)
-#define SYSCON_AHBCLKCTRL0_PINT_MASK (0x40000U)
-#define SYSCON_AHBCLKCTRL0_PINT_SHIFT (18U)
-/*! PINT - Enables the clock for the Pin interrupt (PINT).
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_PINT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_PINT_SHIFT)) & SYSCON_AHBCLKCTRL0_PINT_MASK)
-#define SYSCON_AHBCLKCTRL0_GINT_MASK (0x80000U)
-#define SYSCON_AHBCLKCTRL0_GINT_SHIFT (19U)
-/*! GINT - Enables the clock for the Group interrupt (GINT).
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_GINT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_GINT_SHIFT)) & SYSCON_AHBCLKCTRL0_GINT_MASK)
-#define SYSCON_AHBCLKCTRL0_DMA0_MASK (0x100000U)
-#define SYSCON_AHBCLKCTRL0_DMA0_SHIFT (20U)
-/*! DMA0 - Enables the clock for the DMA0.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_DMA0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_DMA0_SHIFT)) & SYSCON_AHBCLKCTRL0_DMA0_MASK)
-#define SYSCON_AHBCLKCTRL0_CRCGEN_MASK (0x200000U)
-#define SYSCON_AHBCLKCTRL0_CRCGEN_SHIFT (21U)
-/*! CRCGEN - Enables the clock for the CRCGEN.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_CRCGEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_CRCGEN_SHIFT)) & SYSCON_AHBCLKCTRL0_CRCGEN_MASK)
-#define SYSCON_AHBCLKCTRL0_WWDT_MASK (0x400000U)
-#define SYSCON_AHBCLKCTRL0_WWDT_SHIFT (22U)
-/*! WWDT - Enables the clock for the Watchdog Timer.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_WWDT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_WWDT_SHIFT)) & SYSCON_AHBCLKCTRL0_WWDT_MASK)
-#define SYSCON_AHBCLKCTRL0_RTC_MASK (0x800000U)
-#define SYSCON_AHBCLKCTRL0_RTC_SHIFT (23U)
-/*! RTC - Enables the clock for the Real Time Clock (RTC).
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_RTC(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_RTC_SHIFT)) & SYSCON_AHBCLKCTRL0_RTC_MASK)
-#define SYSCON_AHBCLKCTRL0_MAILBOX_MASK (0x4000000U)
-#define SYSCON_AHBCLKCTRL0_MAILBOX_SHIFT (26U)
-/*! MAILBOX - Enables the clock for the Inter CPU communication Mailbox.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_MAILBOX(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_MAILBOX_SHIFT)) & SYSCON_AHBCLKCTRL0_MAILBOX_MASK)
-#define SYSCON_AHBCLKCTRL0_ADC_MASK (0x8000000U)
-#define SYSCON_AHBCLKCTRL0_ADC_SHIFT (27U)
-/*! ADC - Enables the clock for the ADC.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL0_ADC(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL0_ADC_SHIFT)) & SYSCON_AHBCLKCTRL0_ADC_MASK)
-/*! @} */
-
-/*! @name AHBCLKCTRL1 - AHB Clock control 1 */
-/*! @{ */
-#define SYSCON_AHBCLKCTRL1_MRT_MASK (0x1U)
-#define SYSCON_AHBCLKCTRL1_MRT_SHIFT (0U)
-/*! MRT - Enables the clock for the MRT.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_MRT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_MRT_SHIFT)) & SYSCON_AHBCLKCTRL1_MRT_MASK)
-#define SYSCON_AHBCLKCTRL1_OSTIMER_MASK (0x2U)
-#define SYSCON_AHBCLKCTRL1_OSTIMER_SHIFT (1U)
-/*! OSTIMER - Enables the clock for the OS Event Timer.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_OSTIMER(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_OSTIMER_SHIFT)) & SYSCON_AHBCLKCTRL1_OSTIMER_MASK)
-#define SYSCON_AHBCLKCTRL1_SCT_MASK (0x4U)
-#define SYSCON_AHBCLKCTRL1_SCT_SHIFT (2U)
-/*! SCT - Enables the clock for the SCT.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_SCT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_SCT_SHIFT)) & SYSCON_AHBCLKCTRL1_SCT_MASK)
-#define SYSCON_AHBCLKCTRL1_UTICK_MASK (0x400U)
-#define SYSCON_AHBCLKCTRL1_UTICK_SHIFT (10U)
-/*! UTICK - Enables the clock for the UTICK.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_UTICK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_UTICK_SHIFT)) & SYSCON_AHBCLKCTRL1_UTICK_MASK)
-#define SYSCON_AHBCLKCTRL1_FC0_MASK (0x800U)
-#define SYSCON_AHBCLKCTRL1_FC0_SHIFT (11U)
-/*! FC0 - Enables the clock for the FC0.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC0_SHIFT)) & SYSCON_AHBCLKCTRL1_FC0_MASK)
-#define SYSCON_AHBCLKCTRL1_FC1_MASK (0x1000U)
-#define SYSCON_AHBCLKCTRL1_FC1_SHIFT (12U)
-/*! FC1 - Enables the clock for the FC1.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC1_SHIFT)) & SYSCON_AHBCLKCTRL1_FC1_MASK)
-#define SYSCON_AHBCLKCTRL1_FC2_MASK (0x2000U)
-#define SYSCON_AHBCLKCTRL1_FC2_SHIFT (13U)
-/*! FC2 - Enables the clock for the FC2.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC2(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC2_SHIFT)) & SYSCON_AHBCLKCTRL1_FC2_MASK)
-#define SYSCON_AHBCLKCTRL1_FC3_MASK (0x4000U)
-#define SYSCON_AHBCLKCTRL1_FC3_SHIFT (14U)
-/*! FC3 - Enables the clock for the FC3.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC3(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC3_SHIFT)) & SYSCON_AHBCLKCTRL1_FC3_MASK)
-#define SYSCON_AHBCLKCTRL1_FC4_MASK (0x8000U)
-#define SYSCON_AHBCLKCTRL1_FC4_SHIFT (15U)
-/*! FC4 - Enables the clock for the FC4.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC4(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC4_SHIFT)) & SYSCON_AHBCLKCTRL1_FC4_MASK)
-#define SYSCON_AHBCLKCTRL1_FC5_MASK (0x10000U)
-#define SYSCON_AHBCLKCTRL1_FC5_SHIFT (16U)
-/*! FC5 - Enables the clock for the FC5.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC5(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC5_SHIFT)) & SYSCON_AHBCLKCTRL1_FC5_MASK)
-#define SYSCON_AHBCLKCTRL1_FC6_MASK (0x20000U)
-#define SYSCON_AHBCLKCTRL1_FC6_SHIFT (17U)
-/*! FC6 - Enables the clock for the FC6.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC6(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC6_SHIFT)) & SYSCON_AHBCLKCTRL1_FC6_MASK)
-#define SYSCON_AHBCLKCTRL1_FC7_MASK (0x40000U)
-#define SYSCON_AHBCLKCTRL1_FC7_SHIFT (18U)
-/*! FC7 - Enables the clock for the FC7.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_FC7(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_FC7_SHIFT)) & SYSCON_AHBCLKCTRL1_FC7_MASK)
-#define SYSCON_AHBCLKCTRL1_TIMER2_MASK (0x400000U)
-#define SYSCON_AHBCLKCTRL1_TIMER2_SHIFT (22U)
-/*! TIMER2 - Enables the clock for the Timer 2.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_TIMER2(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_TIMER2_SHIFT)) & SYSCON_AHBCLKCTRL1_TIMER2_MASK)
-#define SYSCON_AHBCLKCTRL1_USB0_DEV_MASK (0x2000000U)
-#define SYSCON_AHBCLKCTRL1_USB0_DEV_SHIFT (25U)
-/*! USB0_DEV - Enables the clock for the USB0 DEV.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_USB0_DEV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_USB0_DEV_SHIFT)) & SYSCON_AHBCLKCTRL1_USB0_DEV_MASK)
-#define SYSCON_AHBCLKCTRL1_TIMER0_MASK (0x4000000U)
-#define SYSCON_AHBCLKCTRL1_TIMER0_SHIFT (26U)
-/*! TIMER0 - Enables the clock for the Timer 0.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_TIMER0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_TIMER0_SHIFT)) & SYSCON_AHBCLKCTRL1_TIMER0_MASK)
-#define SYSCON_AHBCLKCTRL1_TIMER1_MASK (0x8000000U)
-#define SYSCON_AHBCLKCTRL1_TIMER1_SHIFT (27U)
-/*! TIMER1 - Enables the clock for the Timer 1.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL1_TIMER1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL1_TIMER1_SHIFT)) & SYSCON_AHBCLKCTRL1_TIMER1_MASK)
-/*! @} */
-
-/*! @name AHBCLKCTRL2 - AHB Clock control 2 */
-/*! @{ */
-#define SYSCON_AHBCLKCTRL2_DMA1_MASK (0x2U)
-#define SYSCON_AHBCLKCTRL2_DMA1_SHIFT (1U)
-/*! DMA1 - Enables the clock for the DMA1.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_DMA1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_DMA1_SHIFT)) & SYSCON_AHBCLKCTRL2_DMA1_MASK)
-#define SYSCON_AHBCLKCTRL2_COMP_MASK (0x4U)
-#define SYSCON_AHBCLKCTRL2_COMP_SHIFT (2U)
-/*! COMP - Enables the clock for the Comparator.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_COMP(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_COMP_SHIFT)) & SYSCON_AHBCLKCTRL2_COMP_MASK)
-#define SYSCON_AHBCLKCTRL2_SDIO_MASK (0x8U)
-#define SYSCON_AHBCLKCTRL2_SDIO_SHIFT (3U)
-/*! SDIO - Enables the clock for the SDIO.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_SDIO(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_SDIO_SHIFT)) & SYSCON_AHBCLKCTRL2_SDIO_MASK)
-#define SYSCON_AHBCLKCTRL2_USB1_HOST_MASK (0x10U)
-#define SYSCON_AHBCLKCTRL2_USB1_HOST_SHIFT (4U)
-/*! USB1_HOST - Enables the clock for the USB1 Host.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_USB1_HOST(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_USB1_HOST_SHIFT)) & SYSCON_AHBCLKCTRL2_USB1_HOST_MASK)
-#define SYSCON_AHBCLKCTRL2_USB1_DEV_MASK (0x20U)
-#define SYSCON_AHBCLKCTRL2_USB1_DEV_SHIFT (5U)
-/*! USB1_DEV - Enables the clock for the USB1 dev.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_USB1_DEV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_USB1_DEV_SHIFT)) & SYSCON_AHBCLKCTRL2_USB1_DEV_MASK)
-#define SYSCON_AHBCLKCTRL2_USB1_RAM_MASK (0x40U)
-#define SYSCON_AHBCLKCTRL2_USB1_RAM_SHIFT (6U)
-/*! USB1_RAM - Enables the clock for the USB1 RAM.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_USB1_RAM(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_USB1_RAM_SHIFT)) & SYSCON_AHBCLKCTRL2_USB1_RAM_MASK)
-#define SYSCON_AHBCLKCTRL2_USB1_PHY_MASK (0x80U)
-#define SYSCON_AHBCLKCTRL2_USB1_PHY_SHIFT (7U)
-/*! USB1_PHY - Enables the clock for the USB1 PHY.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_USB1_PHY(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_USB1_PHY_SHIFT)) & SYSCON_AHBCLKCTRL2_USB1_PHY_MASK)
-#define SYSCON_AHBCLKCTRL2_FREQME_MASK (0x100U)
-#define SYSCON_AHBCLKCTRL2_FREQME_SHIFT (8U)
-/*! FREQME - Enables the clock for the Frequency meter.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_FREQME(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_FREQME_SHIFT)) & SYSCON_AHBCLKCTRL2_FREQME_MASK)
-#define SYSCON_AHBCLKCTRL2_RNG_MASK (0x2000U)
-#define SYSCON_AHBCLKCTRL2_RNG_SHIFT (13U)
-/*! RNG - Enables the clock for the RNG.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_RNG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_RNG_SHIFT)) & SYSCON_AHBCLKCTRL2_RNG_MASK)
-#define SYSCON_AHBCLKCTRL2_SYSCTL_MASK (0x8000U)
-#define SYSCON_AHBCLKCTRL2_SYSCTL_SHIFT (15U)
-/*! SYSCTL - SYSCTL block clock.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_SYSCTL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_SYSCTL_SHIFT)) & SYSCON_AHBCLKCTRL2_SYSCTL_MASK)
-#define SYSCON_AHBCLKCTRL2_USB0_HOSTM_MASK (0x10000U)
-#define SYSCON_AHBCLKCTRL2_USB0_HOSTM_SHIFT (16U)
-/*! USB0_HOSTM - Enables the clock for the USB0 Host Master.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_USB0_HOSTM(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_USB0_HOSTM_SHIFT)) & SYSCON_AHBCLKCTRL2_USB0_HOSTM_MASK)
-#define SYSCON_AHBCLKCTRL2_USB0_HOSTS_MASK (0x20000U)
-#define SYSCON_AHBCLKCTRL2_USB0_HOSTS_SHIFT (17U)
-/*! USB0_HOSTS - Enables the clock for the USB0 Host Slave.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_USB0_HOSTS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_USB0_HOSTS_SHIFT)) & SYSCON_AHBCLKCTRL2_USB0_HOSTS_MASK)
-#define SYSCON_AHBCLKCTRL2_HASH_AES_MASK (0x40000U)
-#define SYSCON_AHBCLKCTRL2_HASH_AES_SHIFT (18U)
-/*! HASH_AES - Enables the clock for the HASH_AES.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_HASH_AES(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_HASH_AES_SHIFT)) & SYSCON_AHBCLKCTRL2_HASH_AES_MASK)
-#define SYSCON_AHBCLKCTRL2_PQ_MASK (0x80000U)
-#define SYSCON_AHBCLKCTRL2_PQ_SHIFT (19U)
-/*! PQ - Enables the clock for the Power Quad.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_PQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_PQ_SHIFT)) & SYSCON_AHBCLKCTRL2_PQ_MASK)
-#define SYSCON_AHBCLKCTRL2_PLULUT_MASK (0x100000U)
-#define SYSCON_AHBCLKCTRL2_PLULUT_SHIFT (20U)
-/*! PLULUT - Enables the clock for the PLU LUT.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_PLULUT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_PLULUT_SHIFT)) & SYSCON_AHBCLKCTRL2_PLULUT_MASK)
-#define SYSCON_AHBCLKCTRL2_TIMER3_MASK (0x200000U)
-#define SYSCON_AHBCLKCTRL2_TIMER3_SHIFT (21U)
-/*! TIMER3 - Enables the clock for the Timer 3.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_TIMER3(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_TIMER3_SHIFT)) & SYSCON_AHBCLKCTRL2_TIMER3_MASK)
-#define SYSCON_AHBCLKCTRL2_TIMER4_MASK (0x400000U)
-#define SYSCON_AHBCLKCTRL2_TIMER4_SHIFT (22U)
-/*! TIMER4 - Enables the clock for the Timer 4.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_TIMER4(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_TIMER4_SHIFT)) & SYSCON_AHBCLKCTRL2_TIMER4_MASK)
-#define SYSCON_AHBCLKCTRL2_PUF_MASK (0x800000U)
-#define SYSCON_AHBCLKCTRL2_PUF_SHIFT (23U)
-/*! PUF - Enables the clock for the PUF reset control.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_PUF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_PUF_SHIFT)) & SYSCON_AHBCLKCTRL2_PUF_MASK)
-#define SYSCON_AHBCLKCTRL2_CASPER_MASK (0x1000000U)
-#define SYSCON_AHBCLKCTRL2_CASPER_SHIFT (24U)
-/*! CASPER - Enables the clock for the Casper.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_CASPER(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_CASPER_SHIFT)) & SYSCON_AHBCLKCTRL2_CASPER_MASK)
-#define SYSCON_AHBCLKCTRL2_ANALOG_CTRL_MASK (0x8000000U)
-#define SYSCON_AHBCLKCTRL2_ANALOG_CTRL_SHIFT (27U)
-/*! ANALOG_CTRL - Enables the clock for the analog control.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_ANALOG_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_ANALOG_CTRL_SHIFT)) & SYSCON_AHBCLKCTRL2_ANALOG_CTRL_MASK)
-#define SYSCON_AHBCLKCTRL2_HS_LSPI_MASK (0x10000000U)
-#define SYSCON_AHBCLKCTRL2_HS_LSPI_SHIFT (28U)
-/*! HS_LSPI - Enables the clock for the HS LSPI.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_HS_LSPI(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_HS_LSPI_SHIFT)) & SYSCON_AHBCLKCTRL2_HS_LSPI_MASK)
-#define SYSCON_AHBCLKCTRL2_GPIO_SEC_MASK (0x20000000U)
-#define SYSCON_AHBCLKCTRL2_GPIO_SEC_SHIFT (29U)
-/*! GPIO_SEC - Enables the clock for the GPIO secure.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_GPIO_SEC(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_GPIO_SEC_SHIFT)) & SYSCON_AHBCLKCTRL2_GPIO_SEC_MASK)
-#define SYSCON_AHBCLKCTRL2_GPIO_SEC_INT_MASK (0x40000000U)
-#define SYSCON_AHBCLKCTRL2_GPIO_SEC_INT_SHIFT (30U)
-/*! GPIO_SEC_INT - Enables the clock for the GPIO secure int.
- * 0b1..Enable Clock.
- * 0b0..Disable Clock.
- */
-#define SYSCON_AHBCLKCTRL2_GPIO_SEC_INT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRL2_GPIO_SEC_INT_SHIFT)) & SYSCON_AHBCLKCTRL2_GPIO_SEC_INT_MASK)
-/*! @} */
-
-/*! @name AHBCLKCTRLX - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_AHBCLKCTRLX_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_AHBCLKCTRLX_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_AHBCLKCTRLX_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRLX_DATA_SHIFT)) & SYSCON_AHBCLKCTRLX_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_AHBCLKCTRLX */
-#define SYSCON_AHBCLKCTRLX_COUNT (3U)
-
-/*! @name AHBCLKCTRLSET - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_AHBCLKCTRLSET_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_AHBCLKCTRLSET_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_AHBCLKCTRLSET_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRLSET_DATA_SHIFT)) & SYSCON_AHBCLKCTRLSET_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_AHBCLKCTRLSET */
-#define SYSCON_AHBCLKCTRLSET_COUNT (3U)
-
-/*! @name AHBCLKCTRLCLR - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_AHBCLKCTRLCLR_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_AHBCLKCTRLCLR_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_AHBCLKCTRLCLR_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKCTRLCLR_DATA_SHIFT)) & SYSCON_AHBCLKCTRLCLR_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_AHBCLKCTRLCLR */
-#define SYSCON_AHBCLKCTRLCLR_COUNT (3U)
-
-/*! @name SYSTICKCLKSEL0 - System Tick Timer for CPU0 source select */
-/*! @{ */
-#define SYSCON_SYSTICKCLKSEL0_SEL_MASK (0x7U)
-#define SYSCON_SYSTICKCLKSEL0_SEL_SHIFT (0U)
-/*! SEL - System Tick Timer for CPU0 source select.
- * 0b000..System Tick 0 divided clock.
- * 0b001..FRO 1MHz clock.
- * 0b010..Oscillator 32 kHz clock.
- * 0b011..No clock.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_SYSTICKCLKSEL0_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKSEL0_SEL_SHIFT)) & SYSCON_SYSTICKCLKSEL0_SEL_MASK)
-/*! @} */
-
-/*! @name SYSTICKCLKSEL1 - System Tick Timer for CPU1 source select */
-/*! @{ */
-#define SYSCON_SYSTICKCLKSEL1_SEL_MASK (0x7U)
-#define SYSCON_SYSTICKCLKSEL1_SEL_SHIFT (0U)
-/*! SEL - System Tick Timer for CPU1 source select.
- * 0b000..System Tick 1 divided clock.
- * 0b001..FRO 1MHz clock.
- * 0b010..Oscillator 32 kHz clock.
- * 0b011..No clock.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_SYSTICKCLKSEL1_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKSEL1_SEL_SHIFT)) & SYSCON_SYSTICKCLKSEL1_SEL_MASK)
-/*! @} */
-
-/*! @name SYSTICKCLKSELX - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_SYSTICKCLKSELX_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_SYSTICKCLKSELX_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_SYSTICKCLKSELX_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKSELX_DATA_SHIFT)) & SYSCON_SYSTICKCLKSELX_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_SYSTICKCLKSELX */
-#define SYSCON_SYSTICKCLKSELX_COUNT (2U)
-
-/*! @name TRACECLKSEL - Trace clock source select */
-/*! @{ */
-#define SYSCON_TRACECLKSEL_SEL_MASK (0x7U)
-#define SYSCON_TRACECLKSEL_SEL_SHIFT (0U)
-/*! SEL - Trace clock source select.
- * 0b000..Trace divided clock.
- * 0b001..FRO 1MHz clock.
- * 0b010..Oscillator 32 kHz clock.
- * 0b011..No clock.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_TRACECLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_TRACECLKSEL_SEL_SHIFT)) & SYSCON_TRACECLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name CTIMERCLKSEL0 - CTimer 0 clock source select */
-/*! @{ */
-#define SYSCON_CTIMERCLKSEL0_SEL_MASK (0x7U)
-#define SYSCON_CTIMERCLKSEL0_SEL_SHIFT (0U)
-/*! SEL - CTimer 0 clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_CTIMERCLKSEL0_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CTIMERCLKSEL0_SEL_SHIFT)) & SYSCON_CTIMERCLKSEL0_SEL_MASK)
-/*! @} */
-
-/*! @name CTIMERCLKSEL1 - CTimer 1 clock source select */
-/*! @{ */
-#define SYSCON_CTIMERCLKSEL1_SEL_MASK (0x7U)
-#define SYSCON_CTIMERCLKSEL1_SEL_SHIFT (0U)
-/*! SEL - CTimer 1 clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_CTIMERCLKSEL1_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CTIMERCLKSEL1_SEL_SHIFT)) & SYSCON_CTIMERCLKSEL1_SEL_MASK)
-/*! @} */
-
-/*! @name CTIMERCLKSEL2 - CTimer 2 clock source select */
-/*! @{ */
-#define SYSCON_CTIMERCLKSEL2_SEL_MASK (0x7U)
-#define SYSCON_CTIMERCLKSEL2_SEL_SHIFT (0U)
-/*! SEL - CTimer 2 clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_CTIMERCLKSEL2_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CTIMERCLKSEL2_SEL_SHIFT)) & SYSCON_CTIMERCLKSEL2_SEL_MASK)
-/*! @} */
-
-/*! @name CTIMERCLKSEL3 - CTimer 3 clock source select */
-/*! @{ */
-#define SYSCON_CTIMERCLKSEL3_SEL_MASK (0x7U)
-#define SYSCON_CTIMERCLKSEL3_SEL_SHIFT (0U)
-/*! SEL - CTimer 3 clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_CTIMERCLKSEL3_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CTIMERCLKSEL3_SEL_SHIFT)) & SYSCON_CTIMERCLKSEL3_SEL_MASK)
-/*! @} */
-
-/*! @name CTIMERCLKSEL4 - CTimer 4 clock source select */
-/*! @{ */
-#define SYSCON_CTIMERCLKSEL4_SEL_MASK (0x7U)
-#define SYSCON_CTIMERCLKSEL4_SEL_SHIFT (0U)
-/*! SEL - CTimer 4 clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_CTIMERCLKSEL4_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CTIMERCLKSEL4_SEL_SHIFT)) & SYSCON_CTIMERCLKSEL4_SEL_MASK)
-/*! @} */
-
-/*! @name CTIMERCLKSELX - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_CTIMERCLKSELX_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_CTIMERCLKSELX_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_CTIMERCLKSELX_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CTIMERCLKSELX_DATA_SHIFT)) & SYSCON_CTIMERCLKSELX_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_CTIMERCLKSELX */
-#define SYSCON_CTIMERCLKSELX_COUNT (5U)
-
-/*! @name MAINCLKSELA - Main clock A source select */
-/*! @{ */
-#define SYSCON_MAINCLKSELA_SEL_MASK (0x7U)
-#define SYSCON_MAINCLKSELA_SEL_SHIFT (0U)
-/*! SEL - Main clock A source select.
- * 0b000..FRO 12 MHz clock.
- * 0b001..CLKIN clock.
- * 0b010..FRO 1MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..Reserved.
- * 0b101..Reserved.
- * 0b110..Reserved.
- * 0b111..Reserved.
- */
-#define SYSCON_MAINCLKSELA_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MAINCLKSELA_SEL_SHIFT)) & SYSCON_MAINCLKSELA_SEL_MASK)
-/*! @} */
-
-/*! @name MAINCLKSELB - Main clock source select */
-/*! @{ */
-#define SYSCON_MAINCLKSELB_SEL_MASK (0x7U)
-#define SYSCON_MAINCLKSELB_SEL_SHIFT (0U)
-/*! SEL - Main clock source select.
- * 0b000..Main Clock A.
- * 0b001..PLL0 clock.
- * 0b010..PLL1 clock.
- * 0b011..Oscillator 32 kHz clock.
- * 0b100..Reserved.
- * 0b101..Reserved.
- * 0b110..Reserved.
- * 0b111..Reserved.
- */
-#define SYSCON_MAINCLKSELB_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MAINCLKSELB_SEL_SHIFT)) & SYSCON_MAINCLKSELB_SEL_MASK)
-/*! @} */
-
-/*! @name CLKOUTSEL - CLKOUT clock source select */
-/*! @{ */
-#define SYSCON_CLKOUTSEL_SEL_MASK (0x7U)
-#define SYSCON_CLKOUTSEL_SEL_SHIFT (0U)
-/*! SEL - CLKOUT clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..CLKIN clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..PLL1 clock.
- * 0b110..Oscillator 32kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_CLKOUTSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLKOUTSEL_SEL_SHIFT)) & SYSCON_CLKOUTSEL_SEL_MASK)
-/*! @} */
-
-/*! @name PLL0CLKSEL - PLL0 clock source select */
-/*! @{ */
-#define SYSCON_PLL0CLKSEL_SEL_MASK (0x7U)
-#define SYSCON_PLL0CLKSEL_SEL_SHIFT (0U)
-/*! SEL - PLL0 clock source select.
- * 0b000..FRO 12 MHz clock.
- * 0b001..CLKIN clock.
- * 0b010..FRO 1MHz clock.
- * 0b011..Oscillator 32kHz clock.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_PLL0CLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CLKSEL_SEL_SHIFT)) & SYSCON_PLL0CLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name PLL1CLKSEL - PLL1 clock source select */
-/*! @{ */
-#define SYSCON_PLL1CLKSEL_SEL_MASK (0x7U)
-#define SYSCON_PLL1CLKSEL_SEL_SHIFT (0U)
-/*! SEL - PLL1 clock source select.
- * 0b000..FRO 12 MHz clock.
- * 0b001..CLKIN clock.
- * 0b010..FRO 1MHz clock.
- * 0b011..Oscillator 32kHz clock.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_PLL1CLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CLKSEL_SEL_SHIFT)) & SYSCON_PLL1CLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name ADCCLKSEL - ADC clock source select */
-/*! @{ */
-#define SYSCON_ADCCLKSEL_SEL_MASK (0x7U)
-#define SYSCON_ADCCLKSEL_SEL_SHIFT (0U)
-/*! SEL - ADC clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..FRO 96 MHz clock.
- * 0b011..Reserved.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_ADCCLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_ADCCLKSEL_SEL_SHIFT)) & SYSCON_ADCCLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name USB0CLKSEL - FS USB clock source select */
-/*! @{ */
-#define SYSCON_USB0CLKSEL_SEL_MASK (0x7U)
-#define SYSCON_USB0CLKSEL_SEL_SHIFT (0U)
-/*! SEL - FS USB clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..No clock.
- * 0b101..PLL1 clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_USB0CLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0CLKSEL_SEL_SHIFT)) & SYSCON_USB0CLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL0 - Flexcomm Interface 0 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL0_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL0_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 0 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL0_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL0_SEL_SHIFT)) & SYSCON_FCCLKSEL0_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL1 - Flexcomm Interface 1 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL1_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL1_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 1 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL1_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL1_SEL_SHIFT)) & SYSCON_FCCLKSEL1_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL2 - Flexcomm Interface 2 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL2_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL2_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 2 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL2_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL2_SEL_SHIFT)) & SYSCON_FCCLKSEL2_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL3 - Flexcomm Interface 3 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL3_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL3_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 3 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL3_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL3_SEL_SHIFT)) & SYSCON_FCCLKSEL3_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL4 - Flexcomm Interface 4 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL4_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL4_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 4 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL4_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL4_SEL_SHIFT)) & SYSCON_FCCLKSEL4_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL5 - Flexcomm Interface 5 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL5_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL5_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 5 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL5_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL5_SEL_SHIFT)) & SYSCON_FCCLKSEL5_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL6 - Flexcomm Interface 6 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL6_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL6_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 6 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL6_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL6_SEL_SHIFT)) & SYSCON_FCCLKSEL6_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSEL7 - Flexcomm Interface 7 clock source select for Fractional Rate Divider */
-/*! @{ */
-#define SYSCON_FCCLKSEL7_SEL_MASK (0x7U)
-#define SYSCON_FCCLKSEL7_SEL_SHIFT (0U)
-/*! SEL - Flexcomm Interface 7 clock source select for Fractional Rate Divider.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..MCLK clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_FCCLKSEL7_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSEL7_SEL_SHIFT)) & SYSCON_FCCLKSEL7_SEL_MASK)
-/*! @} */
-
-/*! @name FCCLKSELX - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_FCCLKSELX_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_FCCLKSELX_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_FCCLKSELX_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FCCLKSELX_DATA_SHIFT)) & SYSCON_FCCLKSELX_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_FCCLKSELX */
-#define SYSCON_FCCLKSELX_COUNT (8U)
-
-/*! @name HSLSPICLKSEL - HS LSPI clock source select */
-/*! @{ */
-#define SYSCON_HSLSPICLKSEL_SEL_MASK (0x7U)
-#define SYSCON_HSLSPICLKSEL_SEL_SHIFT (0U)
-/*! SEL - HS LSPI clock source select.
- * 0b000..Main clock.
- * 0b001..system PLL divided clock.
- * 0b010..FRO 12 MHz clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..FRO 1MHz clock.
- * 0b101..No clock.
- * 0b110..Oscillator 32 kHz clock.
- * 0b111..No clock.
- */
-#define SYSCON_HSLSPICLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_HSLSPICLKSEL_SEL_SHIFT)) & SYSCON_HSLSPICLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name MCLKCLKSEL - MCLK clock source select */
-/*! @{ */
-#define SYSCON_MCLKCLKSEL_SEL_MASK (0x7U)
-#define SYSCON_MCLKCLKSEL_SEL_SHIFT (0U)
-/*! SEL - MCLK clock source select.
- * 0b000..FRO 96 MHz clock.
- * 0b001..PLL0 clock.
- * 0b010..Reserved.
- * 0b011..Reserved.
- * 0b100..No clock.
- * 0b101..No clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_MCLKCLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MCLKCLKSEL_SEL_SHIFT)) & SYSCON_MCLKCLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name SCTCLKSEL - SCTimer/PWM clock source select */
-/*! @{ */
-#define SYSCON_SCTCLKSEL_SEL_MASK (0x7U)
-#define SYSCON_SCTCLKSEL_SEL_SHIFT (0U)
-/*! SEL - SCTimer/PWM clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..CLKIN clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..No clock.
- * 0b101..MCLK clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_SCTCLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SCTCLKSEL_SEL_SHIFT)) & SYSCON_SCTCLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name SDIOCLKSEL - SDIO clock source select */
-/*! @{ */
-#define SYSCON_SDIOCLKSEL_SEL_MASK (0x7U)
-#define SYSCON_SDIOCLKSEL_SEL_SHIFT (0U)
-/*! SEL - SDIO clock source select.
- * 0b000..Main clock.
- * 0b001..PLL0 clock.
- * 0b010..No clock.
- * 0b011..FRO 96 MHz clock.
- * 0b100..No clock.
- * 0b101..PLL1 clock.
- * 0b110..No clock.
- * 0b111..No clock.
- */
-#define SYSCON_SDIOCLKSEL_SEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKSEL_SEL_SHIFT)) & SYSCON_SDIOCLKSEL_SEL_MASK)
-/*! @} */
-
-/*! @name SYSTICKCLKDIV0 - System Tick Timer divider for CPU0 */
-/*! @{ */
-#define SYSCON_SYSTICKCLKDIV0_DIV_MASK (0xFFU)
-#define SYSCON_SYSTICKCLKDIV0_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_SYSTICKCLKDIV0_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV0_DIV_SHIFT)) & SYSCON_SYSTICKCLKDIV0_DIV_MASK)
-#define SYSCON_SYSTICKCLKDIV0_RESET_MASK (0x20000000U)
-#define SYSCON_SYSTICKCLKDIV0_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_SYSTICKCLKDIV0_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV0_RESET_SHIFT)) & SYSCON_SYSTICKCLKDIV0_RESET_MASK)
-#define SYSCON_SYSTICKCLKDIV0_HALT_MASK (0x40000000U)
-#define SYSCON_SYSTICKCLKDIV0_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_SYSTICKCLKDIV0_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV0_HALT_SHIFT)) & SYSCON_SYSTICKCLKDIV0_HALT_MASK)
-#define SYSCON_SYSTICKCLKDIV0_REQFLAG_MASK (0x80000000U)
-#define SYSCON_SYSTICKCLKDIV0_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_SYSTICKCLKDIV0_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV0_REQFLAG_SHIFT)) & SYSCON_SYSTICKCLKDIV0_REQFLAG_MASK)
-/*! @} */
-
-/*! @name SYSTICKCLKDIV1 - System Tick Timer divider for CPU1 */
-/*! @{ */
-#define SYSCON_SYSTICKCLKDIV1_DIV_MASK (0xFFU)
-#define SYSCON_SYSTICKCLKDIV1_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_SYSTICKCLKDIV1_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV1_DIV_SHIFT)) & SYSCON_SYSTICKCLKDIV1_DIV_MASK)
-#define SYSCON_SYSTICKCLKDIV1_RESET_MASK (0x20000000U)
-#define SYSCON_SYSTICKCLKDIV1_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_SYSTICKCLKDIV1_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV1_RESET_SHIFT)) & SYSCON_SYSTICKCLKDIV1_RESET_MASK)
-#define SYSCON_SYSTICKCLKDIV1_HALT_MASK (0x40000000U)
-#define SYSCON_SYSTICKCLKDIV1_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_SYSTICKCLKDIV1_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV1_HALT_SHIFT)) & SYSCON_SYSTICKCLKDIV1_HALT_MASK)
-#define SYSCON_SYSTICKCLKDIV1_REQFLAG_MASK (0x80000000U)
-#define SYSCON_SYSTICKCLKDIV1_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_SYSTICKCLKDIV1_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SYSTICKCLKDIV1_REQFLAG_SHIFT)) & SYSCON_SYSTICKCLKDIV1_REQFLAG_MASK)
-/*! @} */
-
-/*! @name TRACECLKDIV - TRACE clock divider */
-/*! @{ */
-#define SYSCON_TRACECLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_TRACECLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_TRACECLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_TRACECLKDIV_DIV_SHIFT)) & SYSCON_TRACECLKDIV_DIV_MASK)
-#define SYSCON_TRACECLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_TRACECLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_TRACECLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_TRACECLKDIV_RESET_SHIFT)) & SYSCON_TRACECLKDIV_RESET_MASK)
-#define SYSCON_TRACECLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_TRACECLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_TRACECLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_TRACECLKDIV_HALT_SHIFT)) & SYSCON_TRACECLKDIV_HALT_MASK)
-#define SYSCON_TRACECLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_TRACECLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_TRACECLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_TRACECLKDIV_REQFLAG_SHIFT)) & SYSCON_TRACECLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name FLEXFRG0CTRL - Fractional rate divider for flexcomm 0 */
-/*! @{ */
-#define SYSCON_FLEXFRG0CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG0CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG0CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG0CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG0CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG0CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG0CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG0CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG0CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG0CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG1CTRL - Fractional rate divider for flexcomm 1 */
-/*! @{ */
-#define SYSCON_FLEXFRG1CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG1CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG1CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG1CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG1CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG1CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG1CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG1CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG1CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG1CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG2CTRL - Fractional rate divider for flexcomm 2 */
-/*! @{ */
-#define SYSCON_FLEXFRG2CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG2CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG2CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG2CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG2CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG2CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG2CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG2CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG2CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG2CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG3CTRL - Fractional rate divider for flexcomm 3 */
-/*! @{ */
-#define SYSCON_FLEXFRG3CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG3CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG3CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG3CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG3CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG3CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG3CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG3CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG3CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG3CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG4CTRL - Fractional rate divider for flexcomm 4 */
-/*! @{ */
-#define SYSCON_FLEXFRG4CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG4CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG4CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG4CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG4CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG4CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG4CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG4CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG4CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG4CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG5CTRL - Fractional rate divider for flexcomm 5 */
-/*! @{ */
-#define SYSCON_FLEXFRG5CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG5CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG5CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG5CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG5CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG5CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG5CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG5CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG5CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG5CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG6CTRL - Fractional rate divider for flexcomm 6 */
-/*! @{ */
-#define SYSCON_FLEXFRG6CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG6CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG6CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG6CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG6CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG6CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG6CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG6CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG6CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG6CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRG7CTRL - Fractional rate divider for flexcomm 7 */
-/*! @{ */
-#define SYSCON_FLEXFRG7CTRL_DIV_MASK (0xFFU)
-#define SYSCON_FLEXFRG7CTRL_DIV_SHIFT (0U)
-/*! DIV - Denominator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG7CTRL_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG7CTRL_DIV_SHIFT)) & SYSCON_FLEXFRG7CTRL_DIV_MASK)
-#define SYSCON_FLEXFRG7CTRL_MULT_MASK (0xFF00U)
-#define SYSCON_FLEXFRG7CTRL_MULT_SHIFT (8U)
-/*! MULT - Numerator of the fractional rate divider.
- */
-#define SYSCON_FLEXFRG7CTRL_MULT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRG7CTRL_MULT_SHIFT)) & SYSCON_FLEXFRG7CTRL_MULT_MASK)
-/*! @} */
-
-/*! @name FLEXFRGXCTRL - Peripheral reset control register */
-/*! @{ */
-#define SYSCON_FLEXFRGXCTRL_DATA_MASK (0xFFFFFFFFU)
-#define SYSCON_FLEXFRGXCTRL_DATA_SHIFT (0U)
-/*! DATA - Data array value
- */
-#define SYSCON_FLEXFRGXCTRL_DATA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FLEXFRGXCTRL_DATA_SHIFT)) & SYSCON_FLEXFRGXCTRL_DATA_MASK)
-/*! @} */
-
-/* The count of SYSCON_FLEXFRGXCTRL */
-#define SYSCON_FLEXFRGXCTRL_COUNT (8U)
-
-/*! @name AHBCLKDIV - System clock divider */
-/*! @{ */
-#define SYSCON_AHBCLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_AHBCLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_AHBCLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKDIV_DIV_SHIFT)) & SYSCON_AHBCLKDIV_DIV_MASK)
-#define SYSCON_AHBCLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_AHBCLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_AHBCLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKDIV_RESET_SHIFT)) & SYSCON_AHBCLKDIV_RESET_MASK)
-#define SYSCON_AHBCLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_AHBCLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_AHBCLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKDIV_HALT_SHIFT)) & SYSCON_AHBCLKDIV_HALT_MASK)
-#define SYSCON_AHBCLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_AHBCLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_AHBCLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AHBCLKDIV_REQFLAG_SHIFT)) & SYSCON_AHBCLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name CLKOUTDIV - CLKOUT clock divider */
-/*! @{ */
-#define SYSCON_CLKOUTDIV_DIV_MASK (0xFFU)
-#define SYSCON_CLKOUTDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_CLKOUTDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLKOUTDIV_DIV_SHIFT)) & SYSCON_CLKOUTDIV_DIV_MASK)
-#define SYSCON_CLKOUTDIV_RESET_MASK (0x20000000U)
-#define SYSCON_CLKOUTDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_CLKOUTDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLKOUTDIV_RESET_SHIFT)) & SYSCON_CLKOUTDIV_RESET_MASK)
-#define SYSCON_CLKOUTDIV_HALT_MASK (0x40000000U)
-#define SYSCON_CLKOUTDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_CLKOUTDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLKOUTDIV_HALT_SHIFT)) & SYSCON_CLKOUTDIV_HALT_MASK)
-#define SYSCON_CLKOUTDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_CLKOUTDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_CLKOUTDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLKOUTDIV_REQFLAG_SHIFT)) & SYSCON_CLKOUTDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name FROHFDIV - FRO_HF (96MHz) clock divider */
-/*! @{ */
-#define SYSCON_FROHFDIV_DIV_MASK (0xFFU)
-#define SYSCON_FROHFDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_FROHFDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FROHFDIV_DIV_SHIFT)) & SYSCON_FROHFDIV_DIV_MASK)
-#define SYSCON_FROHFDIV_RESET_MASK (0x20000000U)
-#define SYSCON_FROHFDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_FROHFDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FROHFDIV_RESET_SHIFT)) & SYSCON_FROHFDIV_RESET_MASK)
-#define SYSCON_FROHFDIV_HALT_MASK (0x40000000U)
-#define SYSCON_FROHFDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_FROHFDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FROHFDIV_HALT_SHIFT)) & SYSCON_FROHFDIV_HALT_MASK)
-#define SYSCON_FROHFDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_FROHFDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_FROHFDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FROHFDIV_REQFLAG_SHIFT)) & SYSCON_FROHFDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name WDTCLKDIV - WDT clock divider */
-/*! @{ */
-#define SYSCON_WDTCLKDIV_DIV_MASK (0x3FU)
-#define SYSCON_WDTCLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_WDTCLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_WDTCLKDIV_DIV_SHIFT)) & SYSCON_WDTCLKDIV_DIV_MASK)
-#define SYSCON_WDTCLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_WDTCLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_WDTCLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_WDTCLKDIV_RESET_SHIFT)) & SYSCON_WDTCLKDIV_RESET_MASK)
-#define SYSCON_WDTCLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_WDTCLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_WDTCLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_WDTCLKDIV_HALT_SHIFT)) & SYSCON_WDTCLKDIV_HALT_MASK)
-#define SYSCON_WDTCLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_WDTCLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_WDTCLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_WDTCLKDIV_REQFLAG_SHIFT)) & SYSCON_WDTCLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name ADCCLKDIV - ADC clock divider */
-/*! @{ */
-#define SYSCON_ADCCLKDIV_DIV_MASK (0x7U)
-#define SYSCON_ADCCLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_ADCCLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_ADCCLKDIV_DIV_SHIFT)) & SYSCON_ADCCLKDIV_DIV_MASK)
-#define SYSCON_ADCCLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_ADCCLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_ADCCLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_ADCCLKDIV_RESET_SHIFT)) & SYSCON_ADCCLKDIV_RESET_MASK)
-#define SYSCON_ADCCLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_ADCCLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_ADCCLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_ADCCLKDIV_HALT_SHIFT)) & SYSCON_ADCCLKDIV_HALT_MASK)
-#define SYSCON_ADCCLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_ADCCLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_ADCCLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_ADCCLKDIV_REQFLAG_SHIFT)) & SYSCON_ADCCLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name USB0CLKDIV - USB0 Clock divider */
-/*! @{ */
-#define SYSCON_USB0CLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_USB0CLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_USB0CLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0CLKDIV_DIV_SHIFT)) & SYSCON_USB0CLKDIV_DIV_MASK)
-#define SYSCON_USB0CLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_USB0CLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_USB0CLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0CLKDIV_RESET_SHIFT)) & SYSCON_USB0CLKDIV_RESET_MASK)
-#define SYSCON_USB0CLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_USB0CLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_USB0CLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0CLKDIV_HALT_SHIFT)) & SYSCON_USB0CLKDIV_HALT_MASK)
-#define SYSCON_USB0CLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_USB0CLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_USB0CLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0CLKDIV_REQFLAG_SHIFT)) & SYSCON_USB0CLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name MCLKDIV - I2S MCLK clock divider */
-/*! @{ */
-#define SYSCON_MCLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_MCLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_MCLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MCLKDIV_DIV_SHIFT)) & SYSCON_MCLKDIV_DIV_MASK)
-#define SYSCON_MCLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_MCLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_MCLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MCLKDIV_RESET_SHIFT)) & SYSCON_MCLKDIV_RESET_MASK)
-#define SYSCON_MCLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_MCLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_MCLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MCLKDIV_HALT_SHIFT)) & SYSCON_MCLKDIV_HALT_MASK)
-#define SYSCON_MCLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_MCLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_MCLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MCLKDIV_REQFLAG_SHIFT)) & SYSCON_MCLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name SCTCLKDIV - SCT/PWM clock divider */
-/*! @{ */
-#define SYSCON_SCTCLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_SCTCLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_SCTCLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SCTCLKDIV_DIV_SHIFT)) & SYSCON_SCTCLKDIV_DIV_MASK)
-#define SYSCON_SCTCLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_SCTCLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_SCTCLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SCTCLKDIV_RESET_SHIFT)) & SYSCON_SCTCLKDIV_RESET_MASK)
-#define SYSCON_SCTCLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_SCTCLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_SCTCLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SCTCLKDIV_HALT_SHIFT)) & SYSCON_SCTCLKDIV_HALT_MASK)
-#define SYSCON_SCTCLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_SCTCLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_SCTCLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SCTCLKDIV_REQFLAG_SHIFT)) & SYSCON_SCTCLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name SDIOCLKDIV - SDIO clock divider */
-/*! @{ */
-#define SYSCON_SDIOCLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_SDIOCLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_SDIOCLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKDIV_DIV_SHIFT)) & SYSCON_SDIOCLKDIV_DIV_MASK)
-#define SYSCON_SDIOCLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_SDIOCLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_SDIOCLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKDIV_RESET_SHIFT)) & SYSCON_SDIOCLKDIV_RESET_MASK)
-#define SYSCON_SDIOCLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_SDIOCLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_SDIOCLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKDIV_HALT_SHIFT)) & SYSCON_SDIOCLKDIV_HALT_MASK)
-#define SYSCON_SDIOCLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_SDIOCLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_SDIOCLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKDIV_REQFLAG_SHIFT)) & SYSCON_SDIOCLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name PLL0CLKDIV - PLL0 clock divider */
-/*! @{ */
-#define SYSCON_PLL0CLKDIV_DIV_MASK (0xFFU)
-#define SYSCON_PLL0CLKDIV_DIV_SHIFT (0U)
-/*! DIV - Clock divider value.
- */
-#define SYSCON_PLL0CLKDIV_DIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CLKDIV_DIV_SHIFT)) & SYSCON_PLL0CLKDIV_DIV_MASK)
-#define SYSCON_PLL0CLKDIV_RESET_MASK (0x20000000U)
-#define SYSCON_PLL0CLKDIV_RESET_SHIFT (29U)
-/*! RESET - Resets the divider counter.
- * 0b1..Divider is reset.
- * 0b0..Divider is not reset.
- */
-#define SYSCON_PLL0CLKDIV_RESET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CLKDIV_RESET_SHIFT)) & SYSCON_PLL0CLKDIV_RESET_MASK)
-#define SYSCON_PLL0CLKDIV_HALT_MASK (0x40000000U)
-#define SYSCON_PLL0CLKDIV_HALT_SHIFT (30U)
-/*! HALT - Halts the divider counter.
- * 0b1..Divider clock is stoped.
- * 0b0..Divider clock is running.
- */
-#define SYSCON_PLL0CLKDIV_HALT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CLKDIV_HALT_SHIFT)) & SYSCON_PLL0CLKDIV_HALT_MASK)
-#define SYSCON_PLL0CLKDIV_REQFLAG_MASK (0x80000000U)
-#define SYSCON_PLL0CLKDIV_REQFLAG_SHIFT (31U)
-/*! REQFLAG - Divider status flag.
- * 0b1..Clock frequency is not stable.
- * 0b0..Divider clock is stable.
- */
-#define SYSCON_PLL0CLKDIV_REQFLAG(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CLKDIV_REQFLAG_SHIFT)) & SYSCON_PLL0CLKDIV_REQFLAG_MASK)
-/*! @} */
-
-/*! @name CLOCKGENUPDATELOCKOUT - Control clock configuration registers access (like xxxDIV, xxxSEL) */
-/*! @{ */
-#define SYSCON_CLOCKGENUPDATELOCKOUT_CLOCKGENUPDATELOCKOUT_MASK (0xFFFFFFFFU)
-#define SYSCON_CLOCKGENUPDATELOCKOUT_CLOCKGENUPDATELOCKOUT_SHIFT (0U)
-/*! CLOCKGENUPDATELOCKOUT - Control clock configuration registers access (like xxxDIV, xxxSEL).
- * 0b00000000000000000000000000000001..update all clock configuration.
- * 0b00000000000000000000000000000000..all hardware clock configruration are freeze.
- */
-#define SYSCON_CLOCKGENUPDATELOCKOUT_CLOCKGENUPDATELOCKOUT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCKGENUPDATELOCKOUT_CLOCKGENUPDATELOCKOUT_SHIFT)) & SYSCON_CLOCKGENUPDATELOCKOUT_CLOCKGENUPDATELOCKOUT_MASK)
-/*! @} */
-
-/*! @name FMCCR - FMC configuration register */
-/*! @{ */
-#define SYSCON_FMCCR_FLASHTIM_MASK (0xF000U)
-#define SYSCON_FMCCR_FLASHTIM_SHIFT (12U)
-/*! FLASHTIM - Flash memory access time.
- * 0b0000..1 system clock flash access time (for system clock rates up to 11 MHz).
- * 0b0001..2 system clocks flash access time (for system clock rates up to 22 MHz).
- * 0b0010..3 system clocks flash access time (for system clock rates up to 33 MHz).
- * 0b0011..4 system clocks flash access time (for system clock rates up to 44 MHz).
- * 0b0100..5 system clocks flash access time (for system clock rates up to 55 MHz).
- * 0b0101..6 system clocks flash access time (for system clock rates up to 66 MHz).
- * 0b0110..7 system clocks flash access time (for system clock rates up to 77 MHz).
- * 0b0111..8 system clocks flash access time (for system clock rates up to 88 MHz).
- * 0b1000..9 system clocks flash access time (for system clock rates up to 100 MHz).
- */
-#define SYSCON_FMCCR_FLASHTIM(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FMCCR_FLASHTIM_SHIFT)) & SYSCON_FMCCR_FLASHTIM_MASK)
-/*! @} */
-
-/*! @name USB0NEEDCLKCTRL - USB0 need clock control */
-/*! @{ */
-#define SYSCON_USB0NEEDCLKCTRL_AP_FS_DEV_NEEDCLK_MASK (0x1U)
-#define SYSCON_USB0NEEDCLKCTRL_AP_FS_DEV_NEEDCLK_SHIFT (0U)
-/*! AP_FS_DEV_NEEDCLK - USB0 Device USB0_NEEDCLK signal control:.
- * 0b0..Under hardware control.
- * 0b1..Forced high.
- */
-#define SYSCON_USB0NEEDCLKCTRL_AP_FS_DEV_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0NEEDCLKCTRL_AP_FS_DEV_NEEDCLK_SHIFT)) & SYSCON_USB0NEEDCLKCTRL_AP_FS_DEV_NEEDCLK_MASK)
-#define SYSCON_USB0NEEDCLKCTRL_POL_FS_DEV_NEEDCLK_MASK (0x2U)
-#define SYSCON_USB0NEEDCLKCTRL_POL_FS_DEV_NEEDCLK_SHIFT (1U)
-/*! POL_FS_DEV_NEEDCLK - USB0 Device USB0_NEEDCLK polarity for triggering the USB0 wake-up interrupt:.
- * 0b0..Falling edge of device USB0_NEEDCLK triggers wake-up.
- * 0b1..Rising edge of device USB0_NEEDCLK triggers wake-up.
- */
-#define SYSCON_USB0NEEDCLKCTRL_POL_FS_DEV_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0NEEDCLKCTRL_POL_FS_DEV_NEEDCLK_SHIFT)) & SYSCON_USB0NEEDCLKCTRL_POL_FS_DEV_NEEDCLK_MASK)
-#define SYSCON_USB0NEEDCLKCTRL_AP_FS_HOST_NEEDCLK_MASK (0x4U)
-#define SYSCON_USB0NEEDCLKCTRL_AP_FS_HOST_NEEDCLK_SHIFT (2U)
-/*! AP_FS_HOST_NEEDCLK - USB0 Host USB0_NEEDCLK signal control:.
- * 0b0..Under hardware control.
- * 0b1..Forced high.
- */
-#define SYSCON_USB0NEEDCLKCTRL_AP_FS_HOST_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0NEEDCLKCTRL_AP_FS_HOST_NEEDCLK_SHIFT)) & SYSCON_USB0NEEDCLKCTRL_AP_FS_HOST_NEEDCLK_MASK)
-#define SYSCON_USB0NEEDCLKCTRL_POL_FS_HOST_NEEDCLK_MASK (0x8U)
-#define SYSCON_USB0NEEDCLKCTRL_POL_FS_HOST_NEEDCLK_SHIFT (3U)
-/*! POL_FS_HOST_NEEDCLK - USB0 Host USB0_NEEDCLK polarity for triggering the USB0 wake-up interrupt:.
- * 0b0..Falling edge of device USB0_NEEDCLK triggers wake-up.
- * 0b1..Rising edge of device USB0_NEEDCLK triggers wake-up.
- */
-#define SYSCON_USB0NEEDCLKCTRL_POL_FS_HOST_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0NEEDCLKCTRL_POL_FS_HOST_NEEDCLK_SHIFT)) & SYSCON_USB0NEEDCLKCTRL_POL_FS_HOST_NEEDCLK_MASK)
-/*! @} */
-
-/*! @name USB0NEEDCLKSTAT - USB0 need clock status */
-/*! @{ */
-#define SYSCON_USB0NEEDCLKSTAT_DEV_NEEDCLK_MASK (0x1U)
-#define SYSCON_USB0NEEDCLKSTAT_DEV_NEEDCLK_SHIFT (0U)
-/*! DEV_NEEDCLK - USB0 Device USB0_NEEDCLK signal status:.
- * 0b1..USB0 Device clock is high.
- * 0b0..USB0 Device clock is low.
- */
-#define SYSCON_USB0NEEDCLKSTAT_DEV_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0NEEDCLKSTAT_DEV_NEEDCLK_SHIFT)) & SYSCON_USB0NEEDCLKSTAT_DEV_NEEDCLK_MASK)
-#define SYSCON_USB0NEEDCLKSTAT_HOST_NEEDCLK_MASK (0x2U)
-#define SYSCON_USB0NEEDCLKSTAT_HOST_NEEDCLK_SHIFT (1U)
-/*! HOST_NEEDCLK - USB0 Host USB0_NEEDCLK signal status:.
- * 0b1..USB0 Host clock is high.
- * 0b0..USB0 Host clock is low.
- */
-#define SYSCON_USB0NEEDCLKSTAT_HOST_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB0NEEDCLKSTAT_HOST_NEEDCLK_SHIFT)) & SYSCON_USB0NEEDCLKSTAT_HOST_NEEDCLK_MASK)
-/*! @} */
-
-/*! @name FMCFLUSH - FMCflush control */
-/*! @{ */
-#define SYSCON_FMCFLUSH_FLUSH_MASK (0x1U)
-#define SYSCON_FMCFLUSH_FLUSH_SHIFT (0U)
-/*! FLUSH - Flush control
- * 0b1..Flush the FMC buffer contents.
- * 0b0..No action is performed.
- */
-#define SYSCON_FMCFLUSH_FLUSH(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_FMCFLUSH_FLUSH_SHIFT)) & SYSCON_FMCFLUSH_FLUSH_MASK)
-/*! @} */
-
-/*! @name MCLKIO - MCLK control */
-/*! @{ */
-#define SYSCON_MCLKIO_MCLKIO_MASK (0x1U)
-#define SYSCON_MCLKIO_MCLKIO_SHIFT (0U)
-/*! MCLKIO - MCLK control.
- * 0b0..input mode.
- * 0b1..output mode.
- */
-#define SYSCON_MCLKIO_MCLKIO(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_MCLKIO_MCLKIO_SHIFT)) & SYSCON_MCLKIO_MCLKIO_MASK)
-/*! @} */
-
-/*! @name USB1NEEDCLKCTRL - USB1 need clock control */
-/*! @{ */
-#define SYSCON_USB1NEEDCLKCTRL_AP_HS_DEV_NEEDCLK_MASK (0x1U)
-#define SYSCON_USB1NEEDCLKCTRL_AP_HS_DEV_NEEDCLK_SHIFT (0U)
-/*! AP_HS_DEV_NEEDCLK - USB1 Device need_clock signal control:
- * 0b0..HOST_NEEDCLK is under hardware control.
- * 0b1..HOST_NEEDCLK is forced high.
- */
-#define SYSCON_USB1NEEDCLKCTRL_AP_HS_DEV_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKCTRL_AP_HS_DEV_NEEDCLK_SHIFT)) & SYSCON_USB1NEEDCLKCTRL_AP_HS_DEV_NEEDCLK_MASK)
-#define SYSCON_USB1NEEDCLKCTRL_POL_HS_DEV_NEEDCLK_MASK (0x2U)
-#define SYSCON_USB1NEEDCLKCTRL_POL_HS_DEV_NEEDCLK_SHIFT (1U)
-/*! POL_HS_DEV_NEEDCLK - USB1 device need clock polarity for triggering the USB1_NEEDCLK wake-up interrupt:
- * 0b0..Falling edge of DEV_NEEDCLK triggers wake-up.
- * 0b1..Rising edge of DEV_NEEDCLK triggers wake-up.
- */
-#define SYSCON_USB1NEEDCLKCTRL_POL_HS_DEV_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKCTRL_POL_HS_DEV_NEEDCLK_SHIFT)) & SYSCON_USB1NEEDCLKCTRL_POL_HS_DEV_NEEDCLK_MASK)
-#define SYSCON_USB1NEEDCLKCTRL_AP_HS_HOST_NEEDCLK_MASK (0x4U)
-#define SYSCON_USB1NEEDCLKCTRL_AP_HS_HOST_NEEDCLK_SHIFT (2U)
-/*! AP_HS_HOST_NEEDCLK - USB1 Host need clock signal control:
- * 0b0..HOST_NEEDCLK is under hardware control.
- * 0b1..HOST_NEEDCLK is forced high.
- */
-#define SYSCON_USB1NEEDCLKCTRL_AP_HS_HOST_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKCTRL_AP_HS_HOST_NEEDCLK_SHIFT)) & SYSCON_USB1NEEDCLKCTRL_AP_HS_HOST_NEEDCLK_MASK)
-#define SYSCON_USB1NEEDCLKCTRL_POL_HS_HOST_NEEDCLK_MASK (0x8U)
-#define SYSCON_USB1NEEDCLKCTRL_POL_HS_HOST_NEEDCLK_SHIFT (3U)
-/*! POL_HS_HOST_NEEDCLK - USB1 host need clock polarity for triggering the USB1_NEEDCLK wake-up interrupt.
- * 0b0..Falling edge of HOST_NEEDCLK triggers wake-up.
- * 0b1..Rising edge of HOST_NEEDCLK triggers wake-up.
- */
-#define SYSCON_USB1NEEDCLKCTRL_POL_HS_HOST_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKCTRL_POL_HS_HOST_NEEDCLK_SHIFT)) & SYSCON_USB1NEEDCLKCTRL_POL_HS_HOST_NEEDCLK_MASK)
-#define SYSCON_USB1NEEDCLKCTRL_HS_DEV_WAKEUP_N_MASK (0x10U)
-#define SYSCON_USB1NEEDCLKCTRL_HS_DEV_WAKEUP_N_SHIFT (4U)
-/*! HS_DEV_WAKEUP_N - Software override of device controller PHY wake up logic.
- * 0b0..Forces USB1_PHY to wake-up.
- * 0b1..Normal USB1_PHY behavior.
- */
-#define SYSCON_USB1NEEDCLKCTRL_HS_DEV_WAKEUP_N(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKCTRL_HS_DEV_WAKEUP_N_SHIFT)) & SYSCON_USB1NEEDCLKCTRL_HS_DEV_WAKEUP_N_MASK)
-/*! @} */
-
-/*! @name USB1NEEDCLKSTAT - USB1 need clock status */
-/*! @{ */
-#define SYSCON_USB1NEEDCLKSTAT_DEV_NEEDCLK_MASK (0x1U)
-#define SYSCON_USB1NEEDCLKSTAT_DEV_NEEDCLK_SHIFT (0U)
-/*! DEV_NEEDCLK - USB1 Device need_clock signal status:.
- * 0b1..DEV_NEEDCLK is high.
- * 0b0..DEV_NEEDCLK is low.
- */
-#define SYSCON_USB1NEEDCLKSTAT_DEV_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKSTAT_DEV_NEEDCLK_SHIFT)) & SYSCON_USB1NEEDCLKSTAT_DEV_NEEDCLK_MASK)
-#define SYSCON_USB1NEEDCLKSTAT_HOST_NEEDCLK_MASK (0x2U)
-#define SYSCON_USB1NEEDCLKSTAT_HOST_NEEDCLK_SHIFT (1U)
-/*! HOST_NEEDCLK - USB1 Host need_clock signal status:.
- * 0b1..HOST_NEEDCLK is high.
- * 0b0..HOST_NEEDCLK is low.
- */
-#define SYSCON_USB1NEEDCLKSTAT_HOST_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_USB1NEEDCLKSTAT_HOST_NEEDCLK_SHIFT)) & SYSCON_USB1NEEDCLKSTAT_HOST_NEEDCLK_MASK)
-/*! @} */
-
-/*! @name SDIOCLKCTRL - SDIO CCLKIN phase and delay control */
-/*! @{ */
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_PHASE_MASK (0x3U)
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_PHASE_SHIFT (0U)
-/*! CCLK_DRV_PHASE - Programmable delay value by which cclk_in_drv is phase-shifted with regard to cclk_in.
- * 0b00..0 degree shift.
- * 0b01..90 degree shift.
- * 0b10..180 degree shift.
- * 0b11..270 degree shift.
- */
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_PHASE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_CCLK_DRV_PHASE_SHIFT)) & SYSCON_SDIOCLKCTRL_CCLK_DRV_PHASE_MASK)
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_PHASE_MASK (0xCU)
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_PHASE_SHIFT (2U)
-/*! CCLK_SAMPLE_PHASE - Programmable delay value by which cclk_in_sample is delayed with regard to cclk_in.
- * 0b00..0 degree shift.
- * 0b01..90 degree shift.
- * 0b10..180 degree shift.
- * 0b11..270 degree shift.
- */
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_PHASE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_PHASE_SHIFT)) & SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_PHASE_MASK)
-#define SYSCON_SDIOCLKCTRL_PHASE_ACTIVE_MASK (0x80U)
-#define SYSCON_SDIOCLKCTRL_PHASE_ACTIVE_SHIFT (7U)
-/*! PHASE_ACTIVE - Enables the delays CCLK_DRV_PHASE and CCLK_SAMPLE_PHASE.
- * 0b0..Bypassed.
- * 0b1..Activates phase shift logic. When active, the clock divider is active and phase delays are enabled.
- */
-#define SYSCON_SDIOCLKCTRL_PHASE_ACTIVE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_PHASE_ACTIVE_SHIFT)) & SYSCON_SDIOCLKCTRL_PHASE_ACTIVE_MASK)
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_MASK (0x1F0000U)
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_SHIFT (16U)
-/*! CCLK_DRV_DELAY - Programmable delay value by which cclk_in_drv is delayed with regard to cclk_in.
- */
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_SHIFT)) & SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_MASK)
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_ACTIVE_MASK (0x800000U)
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_ACTIVE_SHIFT (23U)
-/*! CCLK_DRV_DELAY_ACTIVE - Enables drive delay, as controlled by the CCLK_DRV_DELAY field.
- * 0b1..Enable drive delay.
- * 0b0..Disable drive delay.
- */
-#define SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_ACTIVE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_ACTIVE_SHIFT)) & SYSCON_SDIOCLKCTRL_CCLK_DRV_DELAY_ACTIVE_MASK)
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_MASK (0x1F000000U)
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_SHIFT (24U)
-/*! CCLK_SAMPLE_DELAY - Programmable delay value by which cclk_in_sample is delayed with regard to cclk_in.
- */
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_SHIFT)) & SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_MASK)
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_ACTIVE_MASK (0x80000000U)
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_ACTIVE_SHIFT (31U)
-/*! CCLK_SAMPLE_DELAY_ACTIVE - Enables sample delay, as controlled by the CCLK_SAMPLE_DELAY field.
- * 0b1..Enables sample delay.
- * 0b0..Disables sample delay.
- */
-#define SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_ACTIVE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_ACTIVE_SHIFT)) & SYSCON_SDIOCLKCTRL_CCLK_SAMPLE_DELAY_ACTIVE_MASK)
-/*! @} */
-
-/*! @name PLL1CTRL - PLL1 550m control */
-/*! @{ */
-#define SYSCON_PLL1CTRL_SELR_MASK (0xFU)
-#define SYSCON_PLL1CTRL_SELR_SHIFT (0U)
-/*! SELR - Bandwidth select R value.
- */
-#define SYSCON_PLL1CTRL_SELR(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_SELR_SHIFT)) & SYSCON_PLL1CTRL_SELR_MASK)
-#define SYSCON_PLL1CTRL_SELI_MASK (0x3F0U)
-#define SYSCON_PLL1CTRL_SELI_SHIFT (4U)
-/*! SELI - Bandwidth select I value.
- */
-#define SYSCON_PLL1CTRL_SELI(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_SELI_SHIFT)) & SYSCON_PLL1CTRL_SELI_MASK)
-#define SYSCON_PLL1CTRL_SELP_MASK (0x7C00U)
-#define SYSCON_PLL1CTRL_SELP_SHIFT (10U)
-/*! SELP - Bandwidth select P value.
- */
-#define SYSCON_PLL1CTRL_SELP(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_SELP_SHIFT)) & SYSCON_PLL1CTRL_SELP_MASK)
-#define SYSCON_PLL1CTRL_BYPASSPLL_MASK (0x8000U)
-#define SYSCON_PLL1CTRL_BYPASSPLL_SHIFT (15U)
-/*! BYPASSPLL - Bypass PLL input clock is sent directly to the PLL output (default).
- * 0b1..PLL input clock is sent directly to the PLL output.
- * 0b0..use PLL.
- */
-#define SYSCON_PLL1CTRL_BYPASSPLL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_BYPASSPLL_SHIFT)) & SYSCON_PLL1CTRL_BYPASSPLL_MASK)
-#define SYSCON_PLL1CTRL_BYPASSPOSTDIV2_MASK (0x10000U)
-#define SYSCON_PLL1CTRL_BYPASSPOSTDIV2_SHIFT (16U)
-/*! BYPASSPOSTDIV2 - bypass of the divide-by-2 divider in the post-divider.
- * 0b1..bypass of the divide-by-2 divider in the post-divider.
- * 0b0..use the divide-by-2 divider in the post-divider.
- */
-#define SYSCON_PLL1CTRL_BYPASSPOSTDIV2(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_BYPASSPOSTDIV2_SHIFT)) & SYSCON_PLL1CTRL_BYPASSPOSTDIV2_MASK)
-#define SYSCON_PLL1CTRL_LIMUPOFF_MASK (0x20000U)
-#define SYSCON_PLL1CTRL_LIMUPOFF_SHIFT (17U)
-/*! LIMUPOFF - limup_off = 1 in spread spectrum and fractional PLL applications.
- */
-#define SYSCON_PLL1CTRL_LIMUPOFF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_LIMUPOFF_SHIFT)) & SYSCON_PLL1CTRL_LIMUPOFF_MASK)
-#define SYSCON_PLL1CTRL_BWDIRECT_MASK (0x40000U)
-#define SYSCON_PLL1CTRL_BWDIRECT_SHIFT (18U)
-/*! BWDIRECT - control of the bandwidth of the PLL.
- * 0b1..modify the bandwidth of the PLL directly.
- * 0b0..the bandwidth is changed synchronously with the feedback-divider.
- */
-#define SYSCON_PLL1CTRL_BWDIRECT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_BWDIRECT_SHIFT)) & SYSCON_PLL1CTRL_BWDIRECT_MASK)
-#define SYSCON_PLL1CTRL_BYPASSPREDIV_MASK (0x80000U)
-#define SYSCON_PLL1CTRL_BYPASSPREDIV_SHIFT (19U)
-/*! BYPASSPREDIV - bypass of the pre-divider.
- * 0b1..bypass of the pre-divider.
- * 0b0..use the pre-divider.
- */
-#define SYSCON_PLL1CTRL_BYPASSPREDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_BYPASSPREDIV_SHIFT)) & SYSCON_PLL1CTRL_BYPASSPREDIV_MASK)
-#define SYSCON_PLL1CTRL_BYPASSPOSTDIV_MASK (0x100000U)
-#define SYSCON_PLL1CTRL_BYPASSPOSTDIV_SHIFT (20U)
-/*! BYPASSPOSTDIV - bypass of the post-divider.
- * 0b1..bypass of the post-divider.
- * 0b0..use the post-divider.
- */
-#define SYSCON_PLL1CTRL_BYPASSPOSTDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_BYPASSPOSTDIV_SHIFT)) & SYSCON_PLL1CTRL_BYPASSPOSTDIV_MASK)
-#define SYSCON_PLL1CTRL_CLKEN_MASK (0x200000U)
-#define SYSCON_PLL1CTRL_CLKEN_SHIFT (21U)
-/*! CLKEN - enable the output clock.
- * 0b1..Enable the output clock.
- * 0b0..Disable the output clock.
- */
-#define SYSCON_PLL1CTRL_CLKEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_CLKEN_SHIFT)) & SYSCON_PLL1CTRL_CLKEN_MASK)
-#define SYSCON_PLL1CTRL_FRMEN_MASK (0x400000U)
-#define SYSCON_PLL1CTRL_FRMEN_SHIFT (22U)
-/*! FRMEN - 1: free running mode.
- */
-#define SYSCON_PLL1CTRL_FRMEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_FRMEN_SHIFT)) & SYSCON_PLL1CTRL_FRMEN_MASK)
-#define SYSCON_PLL1CTRL_FRMCLKSTABLE_MASK (0x800000U)
-#define SYSCON_PLL1CTRL_FRMCLKSTABLE_SHIFT (23U)
-/*! FRMCLKSTABLE - free running mode clockstable: Warning: Only make frm_clockstable = 1 after the PLL output frequency is stable.
- */
-#define SYSCON_PLL1CTRL_FRMCLKSTABLE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_FRMCLKSTABLE_SHIFT)) & SYSCON_PLL1CTRL_FRMCLKSTABLE_MASK)
-#define SYSCON_PLL1CTRL_SKEWEN_MASK (0x1000000U)
-#define SYSCON_PLL1CTRL_SKEWEN_SHIFT (24U)
-/*! SKEWEN - Skew mode.
- * 0b1..skewmode is enable.
- * 0b0..skewmode is disable.
- */
-#define SYSCON_PLL1CTRL_SKEWEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1CTRL_SKEWEN_SHIFT)) & SYSCON_PLL1CTRL_SKEWEN_MASK)
-/*! @} */
-
-/*! @name PLL1STAT - PLL1 550m status */
-/*! @{ */
-#define SYSCON_PLL1STAT_LOCK_MASK (0x1U)
-#define SYSCON_PLL1STAT_LOCK_SHIFT (0U)
-/*! LOCK - lock detector output (active high) Warning: The lock signal is only reliable between fref[2] :100 kHz to 20 MHz.
- */
-#define SYSCON_PLL1STAT_LOCK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1STAT_LOCK_SHIFT)) & SYSCON_PLL1STAT_LOCK_MASK)
-#define SYSCON_PLL1STAT_PREDIVACK_MASK (0x2U)
-#define SYSCON_PLL1STAT_PREDIVACK_SHIFT (1U)
-/*! PREDIVACK - pre-divider ratio change acknowledge.
- */
-#define SYSCON_PLL1STAT_PREDIVACK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1STAT_PREDIVACK_SHIFT)) & SYSCON_PLL1STAT_PREDIVACK_MASK)
-#define SYSCON_PLL1STAT_FEEDDIVACK_MASK (0x4U)
-#define SYSCON_PLL1STAT_FEEDDIVACK_SHIFT (2U)
-/*! FEEDDIVACK - feedback divider ratio change acknowledge.
- */
-#define SYSCON_PLL1STAT_FEEDDIVACK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1STAT_FEEDDIVACK_SHIFT)) & SYSCON_PLL1STAT_FEEDDIVACK_MASK)
-#define SYSCON_PLL1STAT_POSTDIVACK_MASK (0x8U)
-#define SYSCON_PLL1STAT_POSTDIVACK_SHIFT (3U)
-/*! POSTDIVACK - post-divider ratio change acknowledge.
- */
-#define SYSCON_PLL1STAT_POSTDIVACK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1STAT_POSTDIVACK_SHIFT)) & SYSCON_PLL1STAT_POSTDIVACK_MASK)
-#define SYSCON_PLL1STAT_FRMDET_MASK (0x10U)
-#define SYSCON_PLL1STAT_FRMDET_SHIFT (4U)
-/*! FRMDET - free running detector output (active high).
- */
-#define SYSCON_PLL1STAT_FRMDET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1STAT_FRMDET_SHIFT)) & SYSCON_PLL1STAT_FRMDET_MASK)
-/*! @} */
-
-/*! @name PLL1NDEC - PLL1 550m N divider */
-/*! @{ */
-#define SYSCON_PLL1NDEC_NDIV_MASK (0xFFU)
-#define SYSCON_PLL1NDEC_NDIV_SHIFT (0U)
-/*! NDIV - pre-divider divider ratio (N-divider).
- */
-#define SYSCON_PLL1NDEC_NDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1NDEC_NDIV_SHIFT)) & SYSCON_PLL1NDEC_NDIV_MASK)
-#define SYSCON_PLL1NDEC_NREQ_MASK (0x100U)
-#define SYSCON_PLL1NDEC_NREQ_SHIFT (8U)
-/*! NREQ - pre-divider ratio change request.
- */
-#define SYSCON_PLL1NDEC_NREQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1NDEC_NREQ_SHIFT)) & SYSCON_PLL1NDEC_NREQ_MASK)
-/*! @} */
-
-/*! @name PLL1MDEC - PLL1 550m M divider */
-/*! @{ */
-#define SYSCON_PLL1MDEC_MDIV_MASK (0xFFFFU)
-#define SYSCON_PLL1MDEC_MDIV_SHIFT (0U)
-/*! MDIV - feedback divider divider ratio (M-divider).
- */
-#define SYSCON_PLL1MDEC_MDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1MDEC_MDIV_SHIFT)) & SYSCON_PLL1MDEC_MDIV_MASK)
-#define SYSCON_PLL1MDEC_MREQ_MASK (0x10000U)
-#define SYSCON_PLL1MDEC_MREQ_SHIFT (16U)
-/*! MREQ - feedback ratio change request.
- */
-#define SYSCON_PLL1MDEC_MREQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1MDEC_MREQ_SHIFT)) & SYSCON_PLL1MDEC_MREQ_MASK)
-/*! @} */
-
-/*! @name PLL1PDEC - PLL1 550m P divider */
-/*! @{ */
-#define SYSCON_PLL1PDEC_PDIV_MASK (0x1FU)
-#define SYSCON_PLL1PDEC_PDIV_SHIFT (0U)
-/*! PDIV - post-divider divider ratio (P-divider)
- */
-#define SYSCON_PLL1PDEC_PDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1PDEC_PDIV_SHIFT)) & SYSCON_PLL1PDEC_PDIV_MASK)
-#define SYSCON_PLL1PDEC_PREQ_MASK (0x20U)
-#define SYSCON_PLL1PDEC_PREQ_SHIFT (5U)
-/*! PREQ - feedback ratio change request.
- */
-#define SYSCON_PLL1PDEC_PREQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL1PDEC_PREQ_SHIFT)) & SYSCON_PLL1PDEC_PREQ_MASK)
-/*! @} */
-
-/*! @name PLL0CTRL - PLL0 550m control */
-/*! @{ */
-#define SYSCON_PLL0CTRL_SELR_MASK (0xFU)
-#define SYSCON_PLL0CTRL_SELR_SHIFT (0U)
-/*! SELR - Bandwidth select R value.
- */
-#define SYSCON_PLL0CTRL_SELR(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_SELR_SHIFT)) & SYSCON_PLL0CTRL_SELR_MASK)
-#define SYSCON_PLL0CTRL_SELI_MASK (0x3F0U)
-#define SYSCON_PLL0CTRL_SELI_SHIFT (4U)
-/*! SELI - Bandwidth select I value.
- */
-#define SYSCON_PLL0CTRL_SELI(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_SELI_SHIFT)) & SYSCON_PLL0CTRL_SELI_MASK)
-#define SYSCON_PLL0CTRL_SELP_MASK (0x7C00U)
-#define SYSCON_PLL0CTRL_SELP_SHIFT (10U)
-/*! SELP - Bandwidth select P value.
- */
-#define SYSCON_PLL0CTRL_SELP(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_SELP_SHIFT)) & SYSCON_PLL0CTRL_SELP_MASK)
-#define SYSCON_PLL0CTRL_BYPASSPLL_MASK (0x8000U)
-#define SYSCON_PLL0CTRL_BYPASSPLL_SHIFT (15U)
-/*! BYPASSPLL - Bypass PLL input clock is sent directly to the PLL output (default).
- * 0b1..Bypass PLL input clock is sent directly to the PLL output.
- * 0b0..use PLL.
- */
-#define SYSCON_PLL0CTRL_BYPASSPLL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_BYPASSPLL_SHIFT)) & SYSCON_PLL0CTRL_BYPASSPLL_MASK)
-#define SYSCON_PLL0CTRL_BYPASSPOSTDIV2_MASK (0x10000U)
-#define SYSCON_PLL0CTRL_BYPASSPOSTDIV2_SHIFT (16U)
-/*! BYPASSPOSTDIV2 - bypass of the divide-by-2 divider in the post-divider.
- * 0b1..bypass of the divide-by-2 divider in the post-divider.
- * 0b0..use the divide-by-2 divider in the post-divider.
- */
-#define SYSCON_PLL0CTRL_BYPASSPOSTDIV2(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_BYPASSPOSTDIV2_SHIFT)) & SYSCON_PLL0CTRL_BYPASSPOSTDIV2_MASK)
-#define SYSCON_PLL0CTRL_LIMUPOFF_MASK (0x20000U)
-#define SYSCON_PLL0CTRL_LIMUPOFF_SHIFT (17U)
-/*! LIMUPOFF - limup_off = 1 in spread spectrum and fractional PLL applications.
- */
-#define SYSCON_PLL0CTRL_LIMUPOFF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_LIMUPOFF_SHIFT)) & SYSCON_PLL0CTRL_LIMUPOFF_MASK)
-#define SYSCON_PLL0CTRL_BWDIRECT_MASK (0x40000U)
-#define SYSCON_PLL0CTRL_BWDIRECT_SHIFT (18U)
-/*! BWDIRECT - Control of the bandwidth of the PLL.
- * 0b1..modify the bandwidth of the PLL directly.
- * 0b0..the bandwidth is changed synchronously with the feedback-divider.
- */
-#define SYSCON_PLL0CTRL_BWDIRECT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_BWDIRECT_SHIFT)) & SYSCON_PLL0CTRL_BWDIRECT_MASK)
-#define SYSCON_PLL0CTRL_BYPASSPREDIV_MASK (0x80000U)
-#define SYSCON_PLL0CTRL_BYPASSPREDIV_SHIFT (19U)
-/*! BYPASSPREDIV - bypass of the pre-divider.
- * 0b1..bypass of the pre-divider.
- * 0b0..use the pre-divider.
- */
-#define SYSCON_PLL0CTRL_BYPASSPREDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_BYPASSPREDIV_SHIFT)) & SYSCON_PLL0CTRL_BYPASSPREDIV_MASK)
-#define SYSCON_PLL0CTRL_BYPASSPOSTDIV_MASK (0x100000U)
-#define SYSCON_PLL0CTRL_BYPASSPOSTDIV_SHIFT (20U)
-/*! BYPASSPOSTDIV - bypass of the post-divider.
- * 0b1..bypass of the post-divider.
- * 0b0..use the post-divider.
- */
-#define SYSCON_PLL0CTRL_BYPASSPOSTDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_BYPASSPOSTDIV_SHIFT)) & SYSCON_PLL0CTRL_BYPASSPOSTDIV_MASK)
-#define SYSCON_PLL0CTRL_CLKEN_MASK (0x200000U)
-#define SYSCON_PLL0CTRL_CLKEN_SHIFT (21U)
-/*! CLKEN - enable the output clock.
- * 0b1..enable the output clock.
- * 0b0..disable the output clock.
- */
-#define SYSCON_PLL0CTRL_CLKEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_CLKEN_SHIFT)) & SYSCON_PLL0CTRL_CLKEN_MASK)
-#define SYSCON_PLL0CTRL_FRMEN_MASK (0x400000U)
-#define SYSCON_PLL0CTRL_FRMEN_SHIFT (22U)
-/*! FRMEN - free running mode.
- * 0b1..free running mode is enable.
- * 0b0..free running mode is disable.
- */
-#define SYSCON_PLL0CTRL_FRMEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_FRMEN_SHIFT)) & SYSCON_PLL0CTRL_FRMEN_MASK)
-#define SYSCON_PLL0CTRL_FRMCLKSTABLE_MASK (0x800000U)
-#define SYSCON_PLL0CTRL_FRMCLKSTABLE_SHIFT (23U)
-/*! FRMCLKSTABLE - free running mode clockstable: Warning: Only make frm_clockstable =1 after the PLL output frequency is stable.
- */
-#define SYSCON_PLL0CTRL_FRMCLKSTABLE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_FRMCLKSTABLE_SHIFT)) & SYSCON_PLL0CTRL_FRMCLKSTABLE_MASK)
-#define SYSCON_PLL0CTRL_SKEWEN_MASK (0x1000000U)
-#define SYSCON_PLL0CTRL_SKEWEN_SHIFT (24U)
-/*! SKEWEN - skew mode.
- * 0b1..skew mode is enable.
- * 0b0..skew mode is disable.
- */
-#define SYSCON_PLL0CTRL_SKEWEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0CTRL_SKEWEN_SHIFT)) & SYSCON_PLL0CTRL_SKEWEN_MASK)
-/*! @} */
-
-/*! @name PLL0STAT - PLL0 550m status */
-/*! @{ */
-#define SYSCON_PLL0STAT_LOCK_MASK (0x1U)
-#define SYSCON_PLL0STAT_LOCK_SHIFT (0U)
-/*! LOCK - lock detector output (active high) Warning: The lock signal is only reliable between fref[2] :100 kHz to 20 MHz.
- */
-#define SYSCON_PLL0STAT_LOCK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0STAT_LOCK_SHIFT)) & SYSCON_PLL0STAT_LOCK_MASK)
-#define SYSCON_PLL0STAT_PREDIVACK_MASK (0x2U)
-#define SYSCON_PLL0STAT_PREDIVACK_SHIFT (1U)
-/*! PREDIVACK - pre-divider ratio change acknowledge.
- */
-#define SYSCON_PLL0STAT_PREDIVACK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0STAT_PREDIVACK_SHIFT)) & SYSCON_PLL0STAT_PREDIVACK_MASK)
-#define SYSCON_PLL0STAT_FEEDDIVACK_MASK (0x4U)
-#define SYSCON_PLL0STAT_FEEDDIVACK_SHIFT (2U)
-/*! FEEDDIVACK - feedback divider ratio change acknowledge.
- */
-#define SYSCON_PLL0STAT_FEEDDIVACK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0STAT_FEEDDIVACK_SHIFT)) & SYSCON_PLL0STAT_FEEDDIVACK_MASK)
-#define SYSCON_PLL0STAT_POSTDIVACK_MASK (0x8U)
-#define SYSCON_PLL0STAT_POSTDIVACK_SHIFT (3U)
-/*! POSTDIVACK - post-divider ratio change acknowledge.
- */
-#define SYSCON_PLL0STAT_POSTDIVACK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0STAT_POSTDIVACK_SHIFT)) & SYSCON_PLL0STAT_POSTDIVACK_MASK)
-#define SYSCON_PLL0STAT_FRMDET_MASK (0x10U)
-#define SYSCON_PLL0STAT_FRMDET_SHIFT (4U)
-/*! FRMDET - free running detector output (active high).
- */
-#define SYSCON_PLL0STAT_FRMDET(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0STAT_FRMDET_SHIFT)) & SYSCON_PLL0STAT_FRMDET_MASK)
-/*! @} */
-
-/*! @name PLL0NDEC - PLL0 550m N divider */
-/*! @{ */
-#define SYSCON_PLL0NDEC_NDIV_MASK (0xFFU)
-#define SYSCON_PLL0NDEC_NDIV_SHIFT (0U)
-/*! NDIV - pre-divider divider ratio (N-divider).
- */
-#define SYSCON_PLL0NDEC_NDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0NDEC_NDIV_SHIFT)) & SYSCON_PLL0NDEC_NDIV_MASK)
-#define SYSCON_PLL0NDEC_NREQ_MASK (0x100U)
-#define SYSCON_PLL0NDEC_NREQ_SHIFT (8U)
-/*! NREQ - pre-divider ratio change request.
- */
-#define SYSCON_PLL0NDEC_NREQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0NDEC_NREQ_SHIFT)) & SYSCON_PLL0NDEC_NREQ_MASK)
-/*! @} */
-
-/*! @name PLL0PDEC - PLL0 550m P divider */
-/*! @{ */
-#define SYSCON_PLL0PDEC_PDIV_MASK (0x1FU)
-#define SYSCON_PLL0PDEC_PDIV_SHIFT (0U)
-/*! PDIV - post-divider divider ratio (P-divider)
- */
-#define SYSCON_PLL0PDEC_PDIV(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0PDEC_PDIV_SHIFT)) & SYSCON_PLL0PDEC_PDIV_MASK)
-#define SYSCON_PLL0PDEC_PREQ_MASK (0x20U)
-#define SYSCON_PLL0PDEC_PREQ_SHIFT (5U)
-/*! PREQ - feedback ratio change request.
- */
-#define SYSCON_PLL0PDEC_PREQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0PDEC_PREQ_SHIFT)) & SYSCON_PLL0PDEC_PREQ_MASK)
-/*! @} */
-
-/*! @name PLL0SSCG0 - PLL0 Spread Spectrum Wrapper control register 0 */
-/*! @{ */
-#define SYSCON_PLL0SSCG0_MD_LBS_MASK (0xFFFFFFFFU)
-#define SYSCON_PLL0SSCG0_MD_LBS_SHIFT (0U)
-/*! MD_LBS - input word of the wrapper bit 31 to 0.
- */
-#define SYSCON_PLL0SSCG0_MD_LBS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG0_MD_LBS_SHIFT)) & SYSCON_PLL0SSCG0_MD_LBS_MASK)
-/*! @} */
-
-/*! @name PLL0SSCG1 - PLL0 Spread Spectrum Wrapper control register 1 */
-/*! @{ */
-#define SYSCON_PLL0SSCG1_MD_MBS_MASK (0x1U)
-#define SYSCON_PLL0SSCG1_MD_MBS_SHIFT (0U)
-/*! MD_MBS - input word of the wrapper bit 32.
- */
-#define SYSCON_PLL0SSCG1_MD_MBS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MD_MBS_SHIFT)) & SYSCON_PLL0SSCG1_MD_MBS_MASK)
-#define SYSCON_PLL0SSCG1_MD_REQ_MASK (0x2U)
-#define SYSCON_PLL0SSCG1_MD_REQ_SHIFT (1U)
-/*! MD_REQ - md change request.
- */
-#define SYSCON_PLL0SSCG1_MD_REQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MD_REQ_SHIFT)) & SYSCON_PLL0SSCG1_MD_REQ_MASK)
-#define SYSCON_PLL0SSCG1_MF_MASK (0x1CU)
-#define SYSCON_PLL0SSCG1_MF_SHIFT (2U)
-/*! MF - programmable modulation frequency fm = Fref/Nss mf[2:0] = 000 => Nss=512 (fm ~ 3.
- */
-#define SYSCON_PLL0SSCG1_MF(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MF_SHIFT)) & SYSCON_PLL0SSCG1_MF_MASK)
-#define SYSCON_PLL0SSCG1_MR_MASK (0xE0U)
-#define SYSCON_PLL0SSCG1_MR_SHIFT (5U)
-/*! MR - programmable frequency modulation depth Dfmodpk-pk = Fref*kss/Fcco = kss/(2*md[32:25]dec)
- * mr[2:0] = 000 => kss = 0 (no spread spectrum) mr[2:0] = 001 => kss ~ 1 mr[2:0] = 010 => kss ~ 1.
- */
-#define SYSCON_PLL0SSCG1_MR(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MR_SHIFT)) & SYSCON_PLL0SSCG1_MR_MASK)
-#define SYSCON_PLL0SSCG1_MC_MASK (0x300U)
-#define SYSCON_PLL0SSCG1_MC_SHIFT (8U)
-/*! MC - modulation waveform control Compensation for low pass filtering of the PLL to get a
- * triangular modulation at the output of the PLL, giving a flat frequency spectrum.
- */
-#define SYSCON_PLL0SSCG1_MC(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MC_SHIFT)) & SYSCON_PLL0SSCG1_MC_MASK)
-#define SYSCON_PLL0SSCG1_MDIV_EXT_MASK (0x3FFFC00U)
-#define SYSCON_PLL0SSCG1_MDIV_EXT_SHIFT (10U)
-/*! MDIV_EXT - to select an external mdiv value.
- */
-#define SYSCON_PLL0SSCG1_MDIV_EXT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MDIV_EXT_SHIFT)) & SYSCON_PLL0SSCG1_MDIV_EXT_MASK)
-#define SYSCON_PLL0SSCG1_MREQ_MASK (0x4000000U)
-#define SYSCON_PLL0SSCG1_MREQ_SHIFT (26U)
-/*! MREQ - to select an external mreq value.
- */
-#define SYSCON_PLL0SSCG1_MREQ(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_MREQ_SHIFT)) & SYSCON_PLL0SSCG1_MREQ_MASK)
-#define SYSCON_PLL0SSCG1_DITHER_MASK (0x8000000U)
-#define SYSCON_PLL0SSCG1_DITHER_SHIFT (27U)
-/*! DITHER - dithering between two modulation frequencies in a random way or in a pseudo random way
- * (white noise), in order to decrease the probability that the modulated waveform will occur
- * with the same phase on a particular point on the screen.
- */
-#define SYSCON_PLL0SSCG1_DITHER(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_DITHER_SHIFT)) & SYSCON_PLL0SSCG1_DITHER_MASK)
-#define SYSCON_PLL0SSCG1_SEL_EXT_MASK (0x10000000U)
-#define SYSCON_PLL0SSCG1_SEL_EXT_SHIFT (28U)
-/*! SEL_EXT - to select mdiv_ext and mreq_ext sel_ext = 0: mdiv ~ md[32:0], mreq = 1 sel_ext = 1 : mdiv = mdiv_ext, mreq = mreq_ext.
- */
-#define SYSCON_PLL0SSCG1_SEL_EXT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_PLL0SSCG1_SEL_EXT_SHIFT)) & SYSCON_PLL0SSCG1_SEL_EXT_MASK)
-/*! @} */
-
-/*! @name CPUCTRL - CPU Control for multiple processors */
-/*! @{ */
-#define SYSCON_CPUCTRL_CPU1CLKEN_MASK (0x8U)
-#define SYSCON_CPUCTRL_CPU1CLKEN_SHIFT (3U)
-/*! CPU1CLKEN - CPU1 clock enable.
- * 0b1..The CPU1 clock is enabled.
- * 0b0..The CPU1 clock is not enabled.
- */
-#define SYSCON_CPUCTRL_CPU1CLKEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPUCTRL_CPU1CLKEN_SHIFT)) & SYSCON_CPUCTRL_CPU1CLKEN_MASK)
-#define SYSCON_CPUCTRL_CPU1RSTEN_MASK (0x20U)
-#define SYSCON_CPUCTRL_CPU1RSTEN_SHIFT (5U)
-/*! CPU1RSTEN - CPU1 reset.
- * 0b1..The CPU1 is being reset.
- * 0b0..The CPU1 is not being reset.
- */
-#define SYSCON_CPUCTRL_CPU1RSTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPUCTRL_CPU1RSTEN_SHIFT)) & SYSCON_CPUCTRL_CPU1RSTEN_MASK)
-/*! @} */
-
-/*! @name CPBOOT - Coprocessor Boot Address */
-/*! @{ */
-#define SYSCON_CPBOOT_CPBOOT_MASK (0xFFFFFFFFU)
-#define SYSCON_CPBOOT_CPBOOT_SHIFT (0U)
-/*! CPBOOT - Coprocessor Boot Address for CPU1.
- */
-#define SYSCON_CPBOOT_CPBOOT(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPBOOT_CPBOOT_SHIFT)) & SYSCON_CPBOOT_CPBOOT_MASK)
-/*! @} */
-
-/*! @name CPSTAT - CPU Status */
-/*! @{ */
-#define SYSCON_CPSTAT_CPU0SLEEPING_MASK (0x1U)
-#define SYSCON_CPSTAT_CPU0SLEEPING_SHIFT (0U)
-/*! CPU0SLEEPING - The CPU0 sleeping state.
- * 0b1..the CPU is sleeping.
- * 0b0..the CPU is not sleeping.
- */
-#define SYSCON_CPSTAT_CPU0SLEEPING(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPSTAT_CPU0SLEEPING_SHIFT)) & SYSCON_CPSTAT_CPU0SLEEPING_MASK)
-#define SYSCON_CPSTAT_CPU1SLEEPING_MASK (0x2U)
-#define SYSCON_CPSTAT_CPU1SLEEPING_SHIFT (1U)
-/*! CPU1SLEEPING - The CPU1 sleeping state.
- * 0b1..the CPU is sleeping.
- * 0b0..the CPU is not sleeping.
- */
-#define SYSCON_CPSTAT_CPU1SLEEPING(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPSTAT_CPU1SLEEPING_SHIFT)) & SYSCON_CPSTAT_CPU1SLEEPING_MASK)
-#define SYSCON_CPSTAT_CPU0LOCKUP_MASK (0x4U)
-#define SYSCON_CPSTAT_CPU0LOCKUP_SHIFT (2U)
-/*! CPU0LOCKUP - The CPU0 lockup state.
- * 0b1..the CPU is in lockup.
- * 0b0..the CPU is not in lockup.
- */
-#define SYSCON_CPSTAT_CPU0LOCKUP(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPSTAT_CPU0LOCKUP_SHIFT)) & SYSCON_CPSTAT_CPU0LOCKUP_MASK)
-#define SYSCON_CPSTAT_CPU1LOCKUP_MASK (0x8U)
-#define SYSCON_CPSTAT_CPU1LOCKUP_SHIFT (3U)
-/*! CPU1LOCKUP - The CPU1 lockup state.
- * 0b1..the CPU is in lockup.
- * 0b0..the CPU is not in lockup.
- */
-#define SYSCON_CPSTAT_CPU1LOCKUP(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPSTAT_CPU1LOCKUP_SHIFT)) & SYSCON_CPSTAT_CPU1LOCKUP_MASK)
-/*! @} */
-
-/*! @name CLOCK_CTRL - Various system clock controls : Flash clock (48 MHz) control, clocks to Frequency Measures */
-/*! @{ */
-#define SYSCON_CLOCK_CTRL_XTAL32MHZ_FREQM_ENA_MASK (0x2U)
-#define SYSCON_CLOCK_CTRL_XTAL32MHZ_FREQM_ENA_SHIFT (1U)
-/*! XTAL32MHZ_FREQM_ENA - Enable XTAL32MHz clock for Frequency Measure module.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_XTAL32MHZ_FREQM_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_XTAL32MHZ_FREQM_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_XTAL32MHZ_FREQM_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_FRO1MHZ_UTICK_ENA_MASK (0x4U)
-#define SYSCON_CLOCK_CTRL_FRO1MHZ_UTICK_ENA_SHIFT (2U)
-/*! FRO1MHZ_UTICK_ENA - Enable FRO 1MHz clock for Frequency Measure module and for UTICK.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_FRO1MHZ_UTICK_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_FRO1MHZ_UTICK_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_FRO1MHZ_UTICK_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_FRO12MHZ_FREQM_ENA_MASK (0x8U)
-#define SYSCON_CLOCK_CTRL_FRO12MHZ_FREQM_ENA_SHIFT (3U)
-/*! FRO12MHZ_FREQM_ENA - Enable FRO 12MHz clock for Frequency Measure module.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_FRO12MHZ_FREQM_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_FRO12MHZ_FREQM_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_FRO12MHZ_FREQM_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_FRO_HF_FREQM_ENA_MASK (0x10U)
-#define SYSCON_CLOCK_CTRL_FRO_HF_FREQM_ENA_SHIFT (4U)
-/*! FRO_HF_FREQM_ENA - Enable FRO 96MHz clock for Frequency Measure module.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_FRO_HF_FREQM_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_FRO_HF_FREQM_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_FRO_HF_FREQM_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_CLKIN_ENA_MASK (0x20U)
-#define SYSCON_CLOCK_CTRL_CLKIN_ENA_SHIFT (5U)
-/*! CLKIN_ENA - Enable clock_in clock for clock module.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_CLKIN_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_CLKIN_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_CLKIN_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_MASK (0x40U)
-#define SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_SHIFT (6U)
-/*! FRO1MHZ_CLK_ENA - Enable FRO 1MHz clock for clock muxing in clock gen.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_ANA_FRO12M_CLK_ENA_MASK (0x80U)
-#define SYSCON_CLOCK_CTRL_ANA_FRO12M_CLK_ENA_SHIFT (7U)
-/*! ANA_FRO12M_CLK_ENA - Enable FRO 12MHz clock for analog control of the FRO 192MHz.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_ANA_FRO12M_CLK_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_ANA_FRO12M_CLK_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_ANA_FRO12M_CLK_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_XO_CAL_CLK_ENA_MASK (0x100U)
-#define SYSCON_CLOCK_CTRL_XO_CAL_CLK_ENA_SHIFT (8U)
-/*! XO_CAL_CLK_ENA - Enable clock for cristal oscilator calibration.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_XO_CAL_CLK_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_XO_CAL_CLK_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_XO_CAL_CLK_ENA_MASK)
-#define SYSCON_CLOCK_CTRL_PLU_DEGLITCH_CLK_ENA_MASK (0x200U)
-#define SYSCON_CLOCK_CTRL_PLU_DEGLITCH_CLK_ENA_SHIFT (9U)
-/*! PLU_DEGLITCH_CLK_ENA - Enable clocks FRO_1MHz and FRO_12MHz for PLU deglitching.
- * 0b1..The clock is enabled.
- * 0b0..The clock is not enabled.
- */
-#define SYSCON_CLOCK_CTRL_PLU_DEGLITCH_CLK_ENA(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CLOCK_CTRL_PLU_DEGLITCH_CLK_ENA_SHIFT)) & SYSCON_CLOCK_CTRL_PLU_DEGLITCH_CLK_ENA_MASK)
-/*! @} */
-
-/*! @name COMP_INT_CTRL - Comparator Interrupt control */
-/*! @{ */
-#define SYSCON_COMP_INT_CTRL_INT_ENABLE_MASK (0x1U)
-#define SYSCON_COMP_INT_CTRL_INT_ENABLE_SHIFT (0U)
-/*! INT_ENABLE - Analog Comparator interrupt enable control:.
- * 0b1..interrupt enable.
- * 0b0..interrupt disable.
- */
-#define SYSCON_COMP_INT_CTRL_INT_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_CTRL_INT_ENABLE_SHIFT)) & SYSCON_COMP_INT_CTRL_INT_ENABLE_MASK)
-#define SYSCON_COMP_INT_CTRL_INT_CLEAR_MASK (0x2U)
-#define SYSCON_COMP_INT_CTRL_INT_CLEAR_SHIFT (1U)
-/*! INT_CLEAR - Analog Comparator interrupt clear.
- * 0b0..No effect.
- * 0b1..Clear the interrupt. Self-cleared bit.
- */
-#define SYSCON_COMP_INT_CTRL_INT_CLEAR(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_CTRL_INT_CLEAR_SHIFT)) & SYSCON_COMP_INT_CTRL_INT_CLEAR_MASK)
-#define SYSCON_COMP_INT_CTRL_INT_CTRL_MASK (0x1CU)
-#define SYSCON_COMP_INT_CTRL_INT_CTRL_SHIFT (2U)
-/*! INT_CTRL - Comparator interrupt type selector:.
- * 0b000..The analog comparator interrupt edge sensitive is disabled.
- * 0b010..analog comparator interrupt is rising edge sensitive.
- * 0b100..analog comparator interrupt is falling edge sensitive.
- * 0b110..analog comparator interrupt is rising and falling edge sensitive.
- * 0b001..The analog comparator interrupt level sensitive is disabled.
- * 0b011..Analog Comparator interrupt is high level sensitive.
- * 0b101..Analog Comparator interrupt is low level sensitive.
- * 0b111..The analog comparator interrupt level sensitive is disabled.
- */
-#define SYSCON_COMP_INT_CTRL_INT_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_CTRL_INT_CTRL_SHIFT)) & SYSCON_COMP_INT_CTRL_INT_CTRL_MASK)
-#define SYSCON_COMP_INT_CTRL_INT_SOURCE_MASK (0x20U)
-#define SYSCON_COMP_INT_CTRL_INT_SOURCE_SHIFT (5U)
-/*! INT_SOURCE - Select which Analog comparator output (filtered our un-filtered) is used for interrupt detection.
- * 0b0..Select Analog Comparator filtered output as input for interrupt detection.
- * 0b1..Select Analog Comparator raw output (unfiltered) as input for interrupt detection. Must be used when
- * Analog comparator is used as wake up source in Power down mode.
- */
-#define SYSCON_COMP_INT_CTRL_INT_SOURCE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_CTRL_INT_SOURCE_SHIFT)) & SYSCON_COMP_INT_CTRL_INT_SOURCE_MASK)
-/*! @} */
-
-/*! @name COMP_INT_STATUS - Comparator Interrupt status */
-/*! @{ */
-#define SYSCON_COMP_INT_STATUS_STATUS_MASK (0x1U)
-#define SYSCON_COMP_INT_STATUS_STATUS_SHIFT (0U)
-/*! STATUS - Interrupt status BEFORE Interrupt Enable.
- * 0b0..no interrupt pending.
- * 0b1..interrupt pending.
- */
-#define SYSCON_COMP_INT_STATUS_STATUS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_STATUS_STATUS_SHIFT)) & SYSCON_COMP_INT_STATUS_STATUS_MASK)
-#define SYSCON_COMP_INT_STATUS_INT_STATUS_MASK (0x2U)
-#define SYSCON_COMP_INT_STATUS_INT_STATUS_SHIFT (1U)
-/*! INT_STATUS - Interrupt status AFTER Interrupt Enable.
- * 0b0..no interrupt pending.
- * 0b1..interrupt pending.
- */
-#define SYSCON_COMP_INT_STATUS_INT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_STATUS_INT_STATUS_SHIFT)) & SYSCON_COMP_INT_STATUS_INT_STATUS_MASK)
-#define SYSCON_COMP_INT_STATUS_VAL_MASK (0x4U)
-#define SYSCON_COMP_INT_STATUS_VAL_SHIFT (2U)
-/*! VAL - comparator analog output.
- * 0b1..P+ is greater than P-.
- * 0b0..P+ is smaller than P-.
- */
-#define SYSCON_COMP_INT_STATUS_VAL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_COMP_INT_STATUS_VAL_SHIFT)) & SYSCON_COMP_INT_STATUS_VAL_MASK)
-/*! @} */
-
-/*! @name AUTOCLKGATEOVERRIDE - Control automatic clock gating */
-/*! @{ */
-#define SYSCON_AUTOCLKGATEOVERRIDE_ROM_MASK (0x1U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_ROM_SHIFT (0U)
-/*! ROM - Control automatic clock gating of ROM controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_ROM(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_ROM_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_ROM_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAMX_CTRL_MASK (0x2U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAMX_CTRL_SHIFT (1U)
-/*! RAMX_CTRL - Control automatic clock gating of RAMX controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAMX_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_RAMX_CTRL_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_RAMX_CTRL_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM0_CTRL_MASK (0x4U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM0_CTRL_SHIFT (2U)
-/*! RAM0_CTRL - Control automatic clock gating of RAM0 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM0_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_RAM0_CTRL_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_RAM0_CTRL_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM1_CTRL_MASK (0x8U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM1_CTRL_SHIFT (3U)
-/*! RAM1_CTRL - Control automatic clock gating of RAM1 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM1_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_RAM1_CTRL_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_RAM1_CTRL_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM2_CTRL_MASK (0x10U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM2_CTRL_SHIFT (4U)
-/*! RAM2_CTRL - Control automatic clock gating of RAM2 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM2_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_RAM2_CTRL_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_RAM2_CTRL_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM3_CTRL_MASK (0x20U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM3_CTRL_SHIFT (5U)
-/*! RAM3_CTRL - Control automatic clock gating of RAM3 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM3_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_RAM3_CTRL_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_RAM3_CTRL_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM4_CTRL_MASK (0x40U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM4_CTRL_SHIFT (6U)
-/*! RAM4_CTRL - Control automatic clock gating of RAM4 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_RAM4_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_RAM4_CTRL_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_RAM4_CTRL_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYNC0_APB_MASK (0x80U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYNC0_APB_SHIFT (7U)
-/*! SYNC0_APB - Control automatic clock gating of synchronous bridge controller 0.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYNC0_APB(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_SYNC0_APB_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_SYNC0_APB_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYNC1_APB_MASK (0x100U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYNC1_APB_SHIFT (8U)
-/*! SYNC1_APB - Control automatic clock gating of synchronous bridge controller 1.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYNC1_APB(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_SYNC1_APB_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_SYNC1_APB_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_CRCGEN_MASK (0x800U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_CRCGEN_SHIFT (11U)
-/*! CRCGEN - Control automatic clock gating of CRCGEN controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_CRCGEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_CRCGEN_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_CRCGEN_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SDMA0_MASK (0x1000U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SDMA0_SHIFT (12U)
-/*! SDMA0 - Control automatic clock gating of DMA0 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_SDMA0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_SDMA0_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_SDMA0_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SDMA1_MASK (0x2000U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SDMA1_SHIFT (13U)
-/*! SDMA1 - Control automatic clock gating of DMA1 controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_SDMA1(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_SDMA1_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_SDMA1_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_USB0_MASK (0x4000U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_USB0_SHIFT (14U)
-/*! USB0 - Control automatic clock gating of USB controller.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_USB0(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_USB0_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_USB0_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYSCON_MASK (0x8000U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYSCON_SHIFT (15U)
-/*! SYSCON - Control automatic clock gating of synchronous system controller registers bank.
- * 0b1..Automatic clock gating is overridden (Clock gating is disabled).
- * 0b0..Automatic clock gating is not overridden.
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_SYSCON(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_SYSCON_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_SYSCON_MASK)
-#define SYSCON_AUTOCLKGATEOVERRIDE_ENABLEUPDATE_MASK (0xFFFF0000U)
-#define SYSCON_AUTOCLKGATEOVERRIDE_ENABLEUPDATE_SHIFT (16U)
-/*! ENABLEUPDATE - The value 0xC0DE must be written for AUTOCLKGATEOVERRIDE registers fields updates to have effect.
- * 0b1100000011011110..Bit Fields 0 - 15 of this register are updated
- * 0b0000000000000000..Bit Fields 0 - 15 of this register are not updated
- */
-#define SYSCON_AUTOCLKGATEOVERRIDE_ENABLEUPDATE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_AUTOCLKGATEOVERRIDE_ENABLEUPDATE_SHIFT)) & SYSCON_AUTOCLKGATEOVERRIDE_ENABLEUPDATE_MASK)
-/*! @} */
-
-/*! @name GPIOPSYNC - Enable bypass of the first stage of synchonization inside GPIO_INT module */
-/*! @{ */
-#define SYSCON_GPIOPSYNC_PSYNC_MASK (0x1U)
-#define SYSCON_GPIOPSYNC_PSYNC_SHIFT (0U)
-/*! PSYNC - Enable bypass of the first stage of synchonization inside GPIO_INT module.
- * 0b1..bypass of the first stage of synchonization inside GPIO_INT module.
- * 0b0..use the first stage of synchonization inside GPIO_INT module.
- */
-#define SYSCON_GPIOPSYNC_PSYNC(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_GPIOPSYNC_PSYNC_SHIFT)) & SYSCON_GPIOPSYNC_PSYNC_MASK)
-/*! @} */
-
-/*! @name DEBUG_LOCK_EN - Control write access to security registers. */
-/*! @{ */
-#define SYSCON_DEBUG_LOCK_EN_LOCK_ALL_MASK (0xFU)
-#define SYSCON_DEBUG_LOCK_EN_LOCK_ALL_SHIFT (0U)
-/*! LOCK_ALL - Control write access to CODESECURITYPROTTEST, CODESECURITYPROTCPU0,
- * CODESECURITYPROTCPU1, CPU0_DEBUG_FEATURES, CPU1_DEBUG_FEATURES and DBG_AUTH_SCRATCH registers.
- * 0b1010..1010: Enable write access to all 6 registers.
- * 0b0000..Any other value than b1010: disable write access to all 6 registers.
- */
-#define SYSCON_DEBUG_LOCK_EN_LOCK_ALL(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_LOCK_EN_LOCK_ALL_SHIFT)) & SYSCON_DEBUG_LOCK_EN_LOCK_ALL_MASK)
-/*! @} */
-
-/*! @name DEBUG_FEATURES - Cortex M33 (CPU0) and micro Cortex M33 (CPU1) debug features control. */
-/*! @{ */
-#define SYSCON_DEBUG_FEATURES_CPU0_DBGEN_MASK (0x3U)
-#define SYSCON_DEBUG_FEATURES_CPU0_DBGEN_SHIFT (0U)
-/*! CPU0_DBGEN - CPU0 Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_CPU0_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_CPU0_DBGEN_SHIFT)) & SYSCON_DEBUG_FEATURES_CPU0_DBGEN_MASK)
-#define SYSCON_DEBUG_FEATURES_CPU0_NIDEN_MASK (0xCU)
-#define SYSCON_DEBUG_FEATURES_CPU0_NIDEN_SHIFT (2U)
-/*! CPU0_NIDEN - CPU0 Non Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_CPU0_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_CPU0_NIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_CPU0_NIDEN_MASK)
-#define SYSCON_DEBUG_FEATURES_CPU0_SPIDEN_MASK (0x30U)
-#define SYSCON_DEBUG_FEATURES_CPU0_SPIDEN_SHIFT (4U)
-/*! CPU0_SPIDEN - CPU0 Secure Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_CPU0_SPIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_CPU0_SPIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_CPU0_SPIDEN_MASK)
-#define SYSCON_DEBUG_FEATURES_CPU0_SPNIDEN_MASK (0xC0U)
-#define SYSCON_DEBUG_FEATURES_CPU0_SPNIDEN_SHIFT (6U)
-/*! CPU0_SPNIDEN - CPU0 Secure Non Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_CPU0_SPNIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_CPU0_SPNIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_CPU0_SPNIDEN_MASK)
-#define SYSCON_DEBUG_FEATURES_CPU1_DBGEN_MASK (0x300U)
-#define SYSCON_DEBUG_FEATURES_CPU1_DBGEN_SHIFT (8U)
-/*! CPU1_DBGEN - CPU1 Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_CPU1_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_CPU1_DBGEN_SHIFT)) & SYSCON_DEBUG_FEATURES_CPU1_DBGEN_MASK)
-#define SYSCON_DEBUG_FEATURES_CPU1_NIDEN_MASK (0xC00U)
-#define SYSCON_DEBUG_FEATURES_CPU1_NIDEN_SHIFT (10U)
-/*! CPU1_NIDEN - CPU1 Non Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_CPU1_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_CPU1_NIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_CPU1_NIDEN_MASK)
-/*! @} */
-
-/*! @name DEBUG_FEATURES_DP - Cortex M33 (CPU0) and micro Cortex M33 (CPU1) debug features control DUPLICATE register. */
-/*! @{ */
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_DBGEN_MASK (0x3U)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_DBGEN_SHIFT (0U)
-/*! CPU0_DBGEN - CPU0 (CPU0) Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_DP_CPU0_DBGEN_SHIFT)) & SYSCON_DEBUG_FEATURES_DP_CPU0_DBGEN_MASK)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_NIDEN_MASK (0xCU)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_NIDEN_SHIFT (2U)
-/*! CPU0_NIDEN - CPU0 Non Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_DP_CPU0_NIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_DP_CPU0_NIDEN_MASK)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_SPIDEN_MASK (0x30U)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_SPIDEN_SHIFT (4U)
-/*! CPU0_SPIDEN - CPU0 Secure Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_SPIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_DP_CPU0_SPIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_DP_CPU0_SPIDEN_MASK)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_SPNIDEN_MASK (0xC0U)
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_SPNIDEN_SHIFT (6U)
-/*! CPU0_SPNIDEN - CPU0 Secure Non Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_DP_CPU0_SPNIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_DP_CPU0_SPNIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_DP_CPU0_SPNIDEN_MASK)
-#define SYSCON_DEBUG_FEATURES_DP_CPU1_DBGEN_MASK (0x300U)
-#define SYSCON_DEBUG_FEATURES_DP_CPU1_DBGEN_SHIFT (8U)
-/*! CPU1_DBGEN - CPU1 Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_DP_CPU1_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_DP_CPU1_DBGEN_SHIFT)) & SYSCON_DEBUG_FEATURES_DP_CPU1_DBGEN_MASK)
-#define SYSCON_DEBUG_FEATURES_DP_CPU1_NIDEN_MASK (0xC00U)
-#define SYSCON_DEBUG_FEATURES_DP_CPU1_NIDEN_SHIFT (10U)
-/*! CPU1_NIDEN - CPU1 Non Invasive debug control:.
- * 0b10..10: Invasive debug is enabled.
- * 0b01..Any other value than b10: invasive debug is disable.
- */
-#define SYSCON_DEBUG_FEATURES_DP_CPU1_NIDEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_FEATURES_DP_CPU1_NIDEN_SHIFT)) & SYSCON_DEBUG_FEATURES_DP_CPU1_NIDEN_MASK)
-/*! @} */
-
-/*! @name KEY_BLOCK - block quiddikey/PUF all index. */
-/*! @{ */
-#define SYSCON_KEY_BLOCK_KEY_BLOCK_MASK (0xFFFFFFFFU)
-#define SYSCON_KEY_BLOCK_KEY_BLOCK_SHIFT (0U)
-/*! KEY_BLOCK - Write a value to block quiddikey/PUF all index.
- */
-#define SYSCON_KEY_BLOCK_KEY_BLOCK(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_KEY_BLOCK_KEY_BLOCK_SHIFT)) & SYSCON_KEY_BLOCK_KEY_BLOCK_MASK)
-/*! @} */
-
-/*! @name DEBUG_AUTH_BEACON - Debug authentication BEACON register */
-/*! @{ */
-#define SYSCON_DEBUG_AUTH_BEACON_BEACON_MASK (0xFFFFFFFFU)
-#define SYSCON_DEBUG_AUTH_BEACON_BEACON_SHIFT (0U)
-/*! BEACON - Set by the debug authentication code in ROM to pass the debug beacons (Credential
- * Beacon and Authentication Beacon) to application code.
- */
-#define SYSCON_DEBUG_AUTH_BEACON_BEACON(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEBUG_AUTH_BEACON_BEACON_SHIFT)) & SYSCON_DEBUG_AUTH_BEACON_BEACON_MASK)
-/*! @} */
-
-/*! @name CPUCFG - CPUs configuration register */
-/*! @{ */
-#define SYSCON_CPUCFG_CPU1ENABLE_MASK (0x4U)
-#define SYSCON_CPUCFG_CPU1ENABLE_SHIFT (2U)
-/*! CPU1ENABLE - Enable CPU1.
- * 0b0..CPU1 is disable (Processor in reset).
- * 0b1..CPU1 is enable.
- */
-#define SYSCON_CPUCFG_CPU1ENABLE(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_CPUCFG_CPU1ENABLE_SHIFT)) & SYSCON_CPUCFG_CPU1ENABLE_MASK)
-/*! @} */
-
-/*! @name DEVICE_ID0 - Device ID */
-/*! @{ */
-#define SYSCON_DEVICE_ID0_ROM_REV_MINOR_MASK (0xF00000U)
-#define SYSCON_DEVICE_ID0_ROM_REV_MINOR_SHIFT (20U)
-/*! ROM_REV_MINOR - ROM revision.
- */
-#define SYSCON_DEVICE_ID0_ROM_REV_MINOR(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DEVICE_ID0_ROM_REV_MINOR_SHIFT)) & SYSCON_DEVICE_ID0_ROM_REV_MINOR_MASK)
-/*! @} */
-
-/*! @name DIEID - Chip revision ID and Number */
-/*! @{ */
-#define SYSCON_DIEID_REV_ID_MASK (0xFU)
-#define SYSCON_DIEID_REV_ID_SHIFT (0U)
-/*! REV_ID - Chip Metal Revision ID.
- */
-#define SYSCON_DIEID_REV_ID(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DIEID_REV_ID_SHIFT)) & SYSCON_DIEID_REV_ID_MASK)
-#define SYSCON_DIEID_MCO_NUM_IN_DIE_ID_MASK (0xFFFFF0U)
-#define SYSCON_DIEID_MCO_NUM_IN_DIE_ID_SHIFT (4U)
-/*! MCO_NUM_IN_DIE_ID - Chip Number 0x426B.
- */
-#define SYSCON_DIEID_MCO_NUM_IN_DIE_ID(x) (((uint32_t)(((uint32_t)(x)) << SYSCON_DIEID_MCO_NUM_IN_DIE_ID_SHIFT)) & SYSCON_DIEID_MCO_NUM_IN_DIE_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group SYSCON_Register_Masks */
-
-
-/* SYSCON - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral SYSCON base address */
- #define SYSCON_BASE (0x50000000u)
- /** Peripheral SYSCON base address */
- #define SYSCON_BASE_NS (0x40000000u)
- /** Peripheral SYSCON base pointer */
- #define SYSCON ((SYSCON_Type *)SYSCON_BASE)
- /** Peripheral SYSCON base pointer */
- #define SYSCON_NS ((SYSCON_Type *)SYSCON_BASE_NS)
- /** Array initializer of SYSCON peripheral base addresses */
- #define SYSCON_BASE_ADDRS { SYSCON_BASE }
- /** Array initializer of SYSCON peripheral base pointers */
- #define SYSCON_BASE_PTRS { SYSCON }
- /** Array initializer of SYSCON peripheral base addresses */
- #define SYSCON_BASE_ADDRS_NS { SYSCON_BASE_NS }
- /** Array initializer of SYSCON peripheral base pointers */
- #define SYSCON_BASE_PTRS_NS { SYSCON_NS }
-#else
- /** Peripheral SYSCON base address */
- #define SYSCON_BASE (0x40000000u)
- /** Peripheral SYSCON base pointer */
- #define SYSCON ((SYSCON_Type *)SYSCON_BASE)
- /** Array initializer of SYSCON peripheral base addresses */
- #define SYSCON_BASE_ADDRS { SYSCON_BASE }
- /** Array initializer of SYSCON peripheral base pointers */
- #define SYSCON_BASE_PTRS { SYSCON }
-#endif
-
-/*!
- * @}
- */ /* end of group SYSCON_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- SYSCTL Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SYSCTL_Peripheral_Access_Layer SYSCTL Peripheral Access Layer
- * @{
- */
-
-/** SYSCTL - Register Layout Typedef */
-typedef struct {
- __IO uint32_t UPDATELCKOUT; /**< update lock out control, offset: 0x0 */
- uint8_t RESERVED_0[60];
- __IO uint32_t FCCTRLSEL[8]; /**< Selects the source for SCK going into Flexcomm 0..Selects the source for SCK going into Flexcomm 7, array offset: 0x40, array step: 0x4 */
- uint8_t RESERVED_1[32];
- __IO uint32_t SHAREDCTRLSET[2]; /**< Selects sources and data combinations for shared signal set 0...Selects sources and data combinations for shared signal set 1., array offset: 0x80, array step: 0x4 */
- uint8_t RESERVED_2[120];
- __I uint32_t USB_HS_STATUS; /**< Status register for USB HS, offset: 0x100 */
-} SYSCTL_Type;
-
-/* ----------------------------------------------------------------------------
- -- SYSCTL Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SYSCTL_Register_Masks SYSCTL Register Masks
- * @{
- */
-
-/*! @name UPDATELCKOUT - update lock out control */
-/*! @{ */
-#define SYSCTL_UPDATELCKOUT_UPDATELCKOUT_MASK (0x1U)
-#define SYSCTL_UPDATELCKOUT_UPDATELCKOUT_SHIFT (0U)
-/*! UPDATELCKOUT - All Registers
- * 0b0..Normal Mode. Can be written to.
- * 0b1..Protected Mode. Cannot be written to.
- */
-#define SYSCTL_UPDATELCKOUT_UPDATELCKOUT(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_UPDATELCKOUT_UPDATELCKOUT_SHIFT)) & SYSCTL_UPDATELCKOUT_UPDATELCKOUT_MASK)
-/*! @} */
-
-/*! @name FCCTRLSEL - Selects the source for SCK going into Flexcomm 0..Selects the source for SCK going into Flexcomm 7 */
-/*! @{ */
-#define SYSCTL_FCCTRLSEL_SCKINSEL_MASK (0x3U)
-#define SYSCTL_FCCTRLSEL_SCKINSEL_SHIFT (0U)
-/*! SCKINSEL - Selects the source for SCK going into this Flexcomm.
- * 0b00..Selects the dedicated FCn_SCK function for this Flexcomm.
- * 0b01..SCK is taken from shared signal set 0 (defined by SHAREDCTRLSET0).
- * 0b10..SCK is taken from shared signal set 1 (defined by SHAREDCTRLSET1).
- * 0b11..Reserved.
- */
-#define SYSCTL_FCCTRLSEL_SCKINSEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_FCCTRLSEL_SCKINSEL_SHIFT)) & SYSCTL_FCCTRLSEL_SCKINSEL_MASK)
-#define SYSCTL_FCCTRLSEL_WSINSEL_MASK (0x300U)
-#define SYSCTL_FCCTRLSEL_WSINSEL_SHIFT (8U)
-/*! WSINSEL - Selects the source for WS going into this Flexcomm.
- * 0b00..Selects the dedicated (FCn_TXD_SCL_MISO_WS) function for this Flexcomm.
- * 0b01..WS is taken from shared signal set 0 (defined by SHAREDCTRLSET0).
- * 0b10..WS is taken from shared signal set 1 (defined by SHAREDCTRLSET1).
- * 0b11..Reserved.
- */
-#define SYSCTL_FCCTRLSEL_WSINSEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_FCCTRLSEL_WSINSEL_SHIFT)) & SYSCTL_FCCTRLSEL_WSINSEL_MASK)
-#define SYSCTL_FCCTRLSEL_DATAINSEL_MASK (0x30000U)
-#define SYSCTL_FCCTRLSEL_DATAINSEL_SHIFT (16U)
-/*! DATAINSEL - Selects the source for DATA input to this Flexcomm.
- * 0b00..Selects the dedicated FCn_RXD_SDA_MOSI_DATA input for this Flexcomm.
- * 0b01..Input data is taken from shared signal set 0 (defined by SHAREDCTRLSET0).
- * 0b10..Input data is taken from shared signal set 1 (defined by SHAREDCTRLSET1).
- * 0b11..Reserved.
- */
-#define SYSCTL_FCCTRLSEL_DATAINSEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_FCCTRLSEL_DATAINSEL_SHIFT)) & SYSCTL_FCCTRLSEL_DATAINSEL_MASK)
-#define SYSCTL_FCCTRLSEL_DATAOUTSEL_MASK (0x3000000U)
-#define SYSCTL_FCCTRLSEL_DATAOUTSEL_SHIFT (24U)
-/*! DATAOUTSEL - Selects the source for DATA output from this Flexcomm.
- * 0b00..Selects the dedicated FCn_RXD_SDA_MOSI_DATA output from this Flexcomm.
- * 0b01..Output data is taken from shared signal set 0 (defined by SHAREDCTRLSET0).
- * 0b10..Output data is taken from shared signal set 1 (defined by SHAREDCTRLSET1).
- * 0b11..Reserved.
- */
-#define SYSCTL_FCCTRLSEL_DATAOUTSEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_FCCTRLSEL_DATAOUTSEL_SHIFT)) & SYSCTL_FCCTRLSEL_DATAOUTSEL_MASK)
-/*! @} */
-
-/* The count of SYSCTL_FCCTRLSEL */
-#define SYSCTL_FCCTRLSEL_COUNT (8U)
-
-/*! @name SHAREDCTRLSET - Selects sources and data combinations for shared signal set 0...Selects sources and data combinations for shared signal set 1. */
-/*! @{ */
-#define SYSCTL_SHAREDCTRLSET_SHAREDSCKSEL_MASK (0x7U)
-#define SYSCTL_SHAREDCTRLSET_SHAREDSCKSEL_SHIFT (0U)
-/*! SHAREDSCKSEL - Selects the source for SCK of this shared signal set.
- * 0b000..SCK for this shared signal set comes from Flexcomm 0.
- * 0b001..SCK for this shared signal set comes from Flexcomm 1.
- * 0b010..SCK for this shared signal set comes from Flexcomm 2.
- * 0b011..SCK for this shared signal set comes from Flexcomm 3.
- * 0b100..SCK for this shared signal set comes from Flexcomm 4.
- * 0b101..SCK for this shared signal set comes from Flexcomm 5.
- * 0b110..SCK for this shared signal set comes from Flexcomm 6.
- * 0b111..SCK for this shared signal set comes from Flexcomm 7.
- */
-#define SYSCTL_SHAREDCTRLSET_SHAREDSCKSEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_SHAREDSCKSEL_SHIFT)) & SYSCTL_SHAREDCTRLSET_SHAREDSCKSEL_MASK)
-#define SYSCTL_SHAREDCTRLSET_SHAREDWSSEL_MASK (0x70U)
-#define SYSCTL_SHAREDCTRLSET_SHAREDWSSEL_SHIFT (4U)
-/*! SHAREDWSSEL - Selects the source for WS of this shared signal set.
- * 0b000..WS for this shared signal set comes from Flexcomm 0.
- * 0b001..WS for this shared signal set comes from Flexcomm 1.
- * 0b010..WS for this shared signal set comes from Flexcomm 2.
- * 0b011..WS for this shared signal set comes from Flexcomm 3.
- * 0b100..WS for this shared signal set comes from Flexcomm 4.
- * 0b101..WS for this shared signal set comes from Flexcomm 5.
- * 0b110..WS for this shared signal set comes from Flexcomm 6.
- * 0b111..WS for this shared signal set comes from Flexcomm 7.
- */
-#define SYSCTL_SHAREDCTRLSET_SHAREDWSSEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_SHAREDWSSEL_SHIFT)) & SYSCTL_SHAREDCTRLSET_SHAREDWSSEL_MASK)
-#define SYSCTL_SHAREDCTRLSET_SHAREDDATASEL_MASK (0x700U)
-#define SYSCTL_SHAREDCTRLSET_SHAREDDATASEL_SHIFT (8U)
-/*! SHAREDDATASEL - Selects the source for DATA input for this shared signal set.
- * 0b000..DATA input for this shared signal set comes from Flexcomm 0.
- * 0b001..DATA input for this shared signal set comes from Flexcomm 1.
- * 0b010..DATA input for this shared signal set comes from Flexcomm 2.
- * 0b011..DATA input for this shared signal set comes from Flexcomm 3.
- * 0b100..DATA input for this shared signal set comes from Flexcomm 4.
- * 0b101..DATA input for this shared signal set comes from Flexcomm 5.
- * 0b110..DATA input for this shared signal set comes from Flexcomm 6.
- * 0b111..DATA input for this shared signal set comes from Flexcomm 7.
- */
-#define SYSCTL_SHAREDCTRLSET_SHAREDDATASEL(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_SHAREDDATASEL_SHIFT)) & SYSCTL_SHAREDCTRLSET_SHAREDDATASEL_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC0DATAOUTEN_MASK (0x10000U)
-#define SYSCTL_SHAREDCTRLSET_FC0DATAOUTEN_SHIFT (16U)
-/*! FC0DATAOUTEN - Controls FC0 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC0 does not contribute to this shared set.
- * 0b1..Data output from FC0 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC0DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC0DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC0DATAOUTEN_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC1DATAOUTEN_MASK (0x20000U)
-#define SYSCTL_SHAREDCTRLSET_FC1DATAOUTEN_SHIFT (17U)
-/*! FC1DATAOUTEN - Controls FC1 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC1 does not contribute to this shared set.
- * 0b1..Data output from FC1 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC1DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC1DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC1DATAOUTEN_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC2DATAOUTEN_MASK (0x40000U)
-#define SYSCTL_SHAREDCTRLSET_FC2DATAOUTEN_SHIFT (18U)
-/*! FC2DATAOUTEN - Controls FC2 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC2 does not contribute to this shared set.
- * 0b1..Data output from FC2 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC2DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC2DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC2DATAOUTEN_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC4DATAOUTEN_MASK (0x100000U)
-#define SYSCTL_SHAREDCTRLSET_FC4DATAOUTEN_SHIFT (20U)
-/*! FC4DATAOUTEN - Controls FC4 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC4 does not contribute to this shared set.
- * 0b1..Data output from FC4 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC4DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC4DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC4DATAOUTEN_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC5DATAOUTEN_MASK (0x200000U)
-#define SYSCTL_SHAREDCTRLSET_FC5DATAOUTEN_SHIFT (21U)
-/*! FC5DATAOUTEN - Controls FC5 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC5 does not contribute to this shared set.
- * 0b1..Data output from FC5 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC5DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC5DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC5DATAOUTEN_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC6DATAOUTEN_MASK (0x400000U)
-#define SYSCTL_SHAREDCTRLSET_FC6DATAOUTEN_SHIFT (22U)
-/*! FC6DATAOUTEN - Controls FC6 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC6 does not contribute to this shared set.
- * 0b1..Data output from FC6 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC6DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC6DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC6DATAOUTEN_MASK)
-#define SYSCTL_SHAREDCTRLSET_FC7DATAOUTEN_MASK (0x800000U)
-#define SYSCTL_SHAREDCTRLSET_FC7DATAOUTEN_SHIFT (23U)
-/*! FC7DATAOUTEN - Controls FC7 contribution to SHAREDDATAOUT for this shared set.
- * 0b0..Data output from FC7 does not contribute to this shared set.
- * 0b1..Data output from FC7 does contribute to this shared set.
- */
-#define SYSCTL_SHAREDCTRLSET_FC7DATAOUTEN(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_SHAREDCTRLSET_FC7DATAOUTEN_SHIFT)) & SYSCTL_SHAREDCTRLSET_FC7DATAOUTEN_MASK)
-/*! @} */
-
-/* The count of SYSCTL_SHAREDCTRLSET */
-#define SYSCTL_SHAREDCTRLSET_COUNT (2U)
-
-/*! @name USB_HS_STATUS - Status register for USB HS */
-/*! @{ */
-#define SYSCTL_USB_HS_STATUS_USBHS_3V_NOK_MASK (0x1U)
-#define SYSCTL_USB_HS_STATUS_USBHS_3V_NOK_SHIFT (0U)
-/*! USBHS_3V_NOK - USB_HS: Low voltage detection on 3.3V supply.
- * 0b0..3v3 supply is good.
- * 0b1..3v3 supply is too low.
- */
-#define SYSCTL_USB_HS_STATUS_USBHS_3V_NOK(x) (((uint32_t)(((uint32_t)(x)) << SYSCTL_USB_HS_STATUS_USBHS_3V_NOK_SHIFT)) & SYSCTL_USB_HS_STATUS_USBHS_3V_NOK_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group SYSCTL_Register_Masks */
-
-
-/* SYSCTL - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral SYSCTL base address */
- #define SYSCTL_BASE (0x50023000u)
- /** Peripheral SYSCTL base address */
- #define SYSCTL_BASE_NS (0x40023000u)
- /** Peripheral SYSCTL base pointer */
- #define SYSCTL ((SYSCTL_Type *)SYSCTL_BASE)
- /** Peripheral SYSCTL base pointer */
- #define SYSCTL_NS ((SYSCTL_Type *)SYSCTL_BASE_NS)
- /** Array initializer of SYSCTL peripheral base addresses */
- #define SYSCTL_BASE_ADDRS { SYSCTL_BASE }
- /** Array initializer of SYSCTL peripheral base pointers */
- #define SYSCTL_BASE_PTRS { SYSCTL }
- /** Array initializer of SYSCTL peripheral base addresses */
- #define SYSCTL_BASE_ADDRS_NS { SYSCTL_BASE_NS }
- /** Array initializer of SYSCTL peripheral base pointers */
- #define SYSCTL_BASE_PTRS_NS { SYSCTL_NS }
-#else
- /** Peripheral SYSCTL base address */
- #define SYSCTL_BASE (0x40023000u)
- /** Peripheral SYSCTL base pointer */
- #define SYSCTL ((SYSCTL_Type *)SYSCTL_BASE)
- /** Array initializer of SYSCTL peripheral base addresses */
- #define SYSCTL_BASE_ADDRS { SYSCTL_BASE }
- /** Array initializer of SYSCTL peripheral base pointers */
- #define SYSCTL_BASE_PTRS { SYSCTL }
-#endif
-
-/*!
- * @}
- */ /* end of group SYSCTL_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- USART Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USART_Peripheral_Access_Layer USART Peripheral Access Layer
- * @{
- */
-
-/** USART - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CFG; /**< USART Configuration register. Basic USART configuration settings that typically are not changed during operation., offset: 0x0 */
- __IO uint32_t CTL; /**< USART Control register. USART control settings that are more likely to change during operation., offset: 0x4 */
- __IO uint32_t STAT; /**< USART Status register. The complete status value can be read here. Writing ones clears some bits in the register. Some bits can be cleared by writing a 1 to them., offset: 0x8 */
- __IO uint32_t INTENSET; /**< Interrupt Enable read and Set register for USART (not FIFO) status. Contains individual interrupt enable bits for each potential USART interrupt. A complete value may be read from this register. Writing a 1 to any implemented bit position causes that bit to be set., offset: 0xC */
- __O uint32_t INTENCLR; /**< Interrupt Enable Clear register. Allows clearing any combination of bits in the INTENSET register. Writing a 1 to any implemented bit position causes the corresponding bit to be cleared., offset: 0x10 */
- uint8_t RESERVED_0[12];
- __IO uint32_t BRG; /**< Baud Rate Generator register. 16-bit integer baud rate divisor value., offset: 0x20 */
- __I uint32_t INTSTAT; /**< Interrupt status register. Reflects interrupts that are currently enabled., offset: 0x24 */
- __IO uint32_t OSR; /**< Oversample selection register for asynchronous communication., offset: 0x28 */
- __IO uint32_t ADDR; /**< Address register for automatic address matching., offset: 0x2C */
- uint8_t RESERVED_1[3536];
- __IO uint32_t FIFOCFG; /**< FIFO configuration and enable register., offset: 0xE00 */
- __IO uint32_t FIFOSTAT; /**< FIFO status register., offset: 0xE04 */
- __IO uint32_t FIFOTRIG; /**< FIFO trigger settings for interrupt and DMA request., offset: 0xE08 */
- uint8_t RESERVED_2[4];
- __IO uint32_t FIFOINTENSET; /**< FIFO interrupt enable set (enable) and read register., offset: 0xE10 */
- __IO uint32_t FIFOINTENCLR; /**< FIFO interrupt enable clear (disable) and read register., offset: 0xE14 */
- __I uint32_t FIFOINTSTAT; /**< FIFO interrupt status register., offset: 0xE18 */
- uint8_t RESERVED_3[4];
- __O uint32_t FIFOWR; /**< FIFO write data., offset: 0xE20 */
- uint8_t RESERVED_4[12];
- __I uint32_t FIFORD; /**< FIFO read data., offset: 0xE30 */
- uint8_t RESERVED_5[12];
- __I uint32_t FIFORDNOPOP; /**< FIFO data read with no FIFO pop., offset: 0xE40 */
- uint8_t RESERVED_6[440];
- __I uint32_t ID; /**< Peripheral identification register., offset: 0xFFC */
-} USART_Type;
-
-/* ----------------------------------------------------------------------------
- -- USART Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USART_Register_Masks USART Register Masks
- * @{
- */
-
-/*! @name CFG - USART Configuration register. Basic USART configuration settings that typically are not changed during operation. */
-/*! @{ */
-#define USART_CFG_ENABLE_MASK (0x1U)
-#define USART_CFG_ENABLE_SHIFT (0U)
-/*! ENABLE - USART Enable.
- * 0b0..Disabled. The USART is disabled and the internal state machine and counters are reset. While Enable = 0,
- * all USART interrupts and DMA transfers are disabled. When Enable is set again, CFG and most other control
- * bits remain unchanged. When re-enabled, the USART will immediately be ready to transmit because the
- * transmitter has been reset and is therefore available.
- * 0b1..Enabled. The USART is enabled for operation.
- */
-#define USART_CFG_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_ENABLE_SHIFT)) & USART_CFG_ENABLE_MASK)
-#define USART_CFG_DATALEN_MASK (0xCU)
-#define USART_CFG_DATALEN_SHIFT (2U)
-/*! DATALEN - Selects the data size for the USART.
- * 0b00..7 bit Data length.
- * 0b01..8 bit Data length.
- * 0b10..9 bit data length. The 9th bit is commonly used for addressing in multidrop mode. See the ADDRDET bit in the CTL register.
- * 0b11..Reserved.
- */
-#define USART_CFG_DATALEN(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_DATALEN_SHIFT)) & USART_CFG_DATALEN_MASK)
-#define USART_CFG_PARITYSEL_MASK (0x30U)
-#define USART_CFG_PARITYSEL_SHIFT (4U)
-/*! PARITYSEL - Selects what type of parity is used by the USART.
- * 0b00..No parity.
- * 0b01..Reserved.
- * 0b10..Even parity. Adds a bit to each character such that the number of 1s in a transmitted character is even,
- * and the number of 1s in a received character is expected to be even.
- * 0b11..Odd parity. Adds a bit to each character such that the number of 1s in a transmitted character is odd,
- * and the number of 1s in a received character is expected to be odd.
- */
-#define USART_CFG_PARITYSEL(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_PARITYSEL_SHIFT)) & USART_CFG_PARITYSEL_MASK)
-#define USART_CFG_STOPLEN_MASK (0x40U)
-#define USART_CFG_STOPLEN_SHIFT (6U)
-/*! STOPLEN - Number of stop bits appended to transmitted data. Only a single stop bit is required for received data.
- * 0b0..1 stop bit.
- * 0b1..2 stop bits. This setting should only be used for asynchronous communication.
- */
-#define USART_CFG_STOPLEN(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_STOPLEN_SHIFT)) & USART_CFG_STOPLEN_MASK)
-#define USART_CFG_MODE32K_MASK (0x80U)
-#define USART_CFG_MODE32K_SHIFT (7U)
-/*! MODE32K - Selects standard or 32 kHz clocking mode.
- * 0b0..Disabled. USART uses standard clocking.
- * 0b1..Enabled. USART uses the 32 kHz clock from the RTC oscillator as the clock source to the BRG, and uses a special bit clocking scheme.
- */
-#define USART_CFG_MODE32K(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_MODE32K_SHIFT)) & USART_CFG_MODE32K_MASK)
-#define USART_CFG_LINMODE_MASK (0x100U)
-#define USART_CFG_LINMODE_SHIFT (8U)
-/*! LINMODE - LIN break mode enable.
- * 0b0..Disabled. Break detect and generate is configured for normal operation.
- * 0b1..Enabled. Break detect and generate is configured for LIN bus operation.
- */
-#define USART_CFG_LINMODE(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_LINMODE_SHIFT)) & USART_CFG_LINMODE_MASK)
-#define USART_CFG_CTSEN_MASK (0x200U)
-#define USART_CFG_CTSEN_SHIFT (9U)
-/*! CTSEN - CTS Enable. Determines whether CTS is used for flow control. CTS can be from the input
- * pin, or from the USART's own RTS if loopback mode is enabled.
- * 0b0..No flow control. The transmitter does not receive any automatic flow control signal.
- * 0b1..Flow control enabled. The transmitter uses the CTS input (or RTS output in loopback mode) for flow control purposes.
- */
-#define USART_CFG_CTSEN(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_CTSEN_SHIFT)) & USART_CFG_CTSEN_MASK)
-#define USART_CFG_SYNCEN_MASK (0x800U)
-#define USART_CFG_SYNCEN_SHIFT (11U)
-/*! SYNCEN - Selects synchronous or asynchronous operation.
- * 0b0..Asynchronous mode.
- * 0b1..Synchronous mode.
- */
-#define USART_CFG_SYNCEN(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_SYNCEN_SHIFT)) & USART_CFG_SYNCEN_MASK)
-#define USART_CFG_CLKPOL_MASK (0x1000U)
-#define USART_CFG_CLKPOL_SHIFT (12U)
-/*! CLKPOL - Selects the clock polarity and sampling edge of received data in synchronous mode.
- * 0b0..Falling edge. Un_RXD is sampled on the falling edge of SCLK.
- * 0b1..Rising edge. Un_RXD is sampled on the rising edge of SCLK.
- */
-#define USART_CFG_CLKPOL(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_CLKPOL_SHIFT)) & USART_CFG_CLKPOL_MASK)
-#define USART_CFG_SYNCMST_MASK (0x4000U)
-#define USART_CFG_SYNCMST_SHIFT (14U)
-/*! SYNCMST - Synchronous mode Master select.
- * 0b0..Slave. When synchronous mode is enabled, the USART is a slave.
- * 0b1..Master. When synchronous mode is enabled, the USART is a master.
- */
-#define USART_CFG_SYNCMST(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_SYNCMST_SHIFT)) & USART_CFG_SYNCMST_MASK)
-#define USART_CFG_LOOP_MASK (0x8000U)
-#define USART_CFG_LOOP_SHIFT (15U)
-/*! LOOP - Selects data loopback mode.
- * 0b0..Normal operation.
- * 0b1..Loopback mode. This provides a mechanism to perform diagnostic loopback testing for USART data. Serial
- * data from the transmitter (Un_TXD) is connected internally to serial input of the receive (Un_RXD). Un_TXD
- * and Un_RTS activity will also appear on external pins if these functions are configured to appear on device
- * pins. The receiver RTS signal is also looped back to CTS and performs flow control if enabled by CTSEN.
- */
-#define USART_CFG_LOOP(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_LOOP_SHIFT)) & USART_CFG_LOOP_MASK)
-#define USART_CFG_OETA_MASK (0x40000U)
-#define USART_CFG_OETA_SHIFT (18U)
-/*! OETA - Output Enable Turnaround time enable for RS-485 operation.
- * 0b0..Disabled. If selected by OESEL, the Output Enable signal deasserted at the end of the last stop bit of a transmission.
- * 0b1..Enabled. If selected by OESEL, the Output Enable signal remains asserted for one character time after the
- * end of the last stop bit of a transmission. OE will also remain asserted if another transmit begins
- * before it is deasserted.
- */
-#define USART_CFG_OETA(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_OETA_SHIFT)) & USART_CFG_OETA_MASK)
-#define USART_CFG_AUTOADDR_MASK (0x80000U)
-#define USART_CFG_AUTOADDR_SHIFT (19U)
-/*! AUTOADDR - Automatic Address matching enable.
- * 0b0..Disabled. When addressing is enabled by ADDRDET, address matching is done by software. This provides the
- * possibility of versatile addressing (e.g. respond to more than one address).
- * 0b1..Enabled. When addressing is enabled by ADDRDET, address matching is done by hardware, using the value in
- * the ADDR register as the address to match.
- */
-#define USART_CFG_AUTOADDR(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_AUTOADDR_SHIFT)) & USART_CFG_AUTOADDR_MASK)
-#define USART_CFG_OESEL_MASK (0x100000U)
-#define USART_CFG_OESEL_SHIFT (20U)
-/*! OESEL - Output Enable Select.
- * 0b0..Standard. The RTS signal is used as the standard flow control function.
- * 0b1..RS-485. The RTS signal configured to provide an output enable signal to control an RS-485 transceiver.
- */
-#define USART_CFG_OESEL(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_OESEL_SHIFT)) & USART_CFG_OESEL_MASK)
-#define USART_CFG_OEPOL_MASK (0x200000U)
-#define USART_CFG_OEPOL_SHIFT (21U)
-/*! OEPOL - Output Enable Polarity.
- * 0b0..Low. If selected by OESEL, the output enable is active low.
- * 0b1..High. If selected by OESEL, the output enable is active high.
- */
-#define USART_CFG_OEPOL(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_OEPOL_SHIFT)) & USART_CFG_OEPOL_MASK)
-#define USART_CFG_RXPOL_MASK (0x400000U)
-#define USART_CFG_RXPOL_SHIFT (22U)
-/*! RXPOL - Receive data polarity.
- * 0b0..Standard. The RX signal is used as it arrives from the pin. This means that the RX rest value is 1, start
- * bit is 0, data is not inverted, and the stop bit is 1.
- * 0b1..Inverted. The RX signal is inverted before being used by the USART. This means that the RX rest value is
- * 0, start bit is 1, data is inverted, and the stop bit is 0.
- */
-#define USART_CFG_RXPOL(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_RXPOL_SHIFT)) & USART_CFG_RXPOL_MASK)
-#define USART_CFG_TXPOL_MASK (0x800000U)
-#define USART_CFG_TXPOL_SHIFT (23U)
-/*! TXPOL - Transmit data polarity.
- * 0b0..Standard. The TX signal is sent out without change. This means that the TX rest value is 1, start bit is
- * 0, data is not inverted, and the stop bit is 1.
- * 0b1..Inverted. The TX signal is inverted by the USART before being sent out. This means that the TX rest value
- * is 0, start bit is 1, data is inverted, and the stop bit is 0.
- */
-#define USART_CFG_TXPOL(x) (((uint32_t)(((uint32_t)(x)) << USART_CFG_TXPOL_SHIFT)) & USART_CFG_TXPOL_MASK)
-/*! @} */
-
-/*! @name CTL - USART Control register. USART control settings that are more likely to change during operation. */
-/*! @{ */
-#define USART_CTL_TXBRKEN_MASK (0x2U)
-#define USART_CTL_TXBRKEN_SHIFT (1U)
-/*! TXBRKEN - Break Enable.
- * 0b0..Normal operation.
- * 0b1..Continuous break. Continuous break is sent immediately when this bit is set, and remains until this bit
- * is cleared. A break may be sent without danger of corrupting any currently transmitting character if the
- * transmitter is first disabled (TXDIS in CTL is set) and then waiting for the transmitter to be disabled
- * (TXDISINT in STAT = 1) before writing 1 to TXBRKEN.
- */
-#define USART_CTL_TXBRKEN(x) (((uint32_t)(((uint32_t)(x)) << USART_CTL_TXBRKEN_SHIFT)) & USART_CTL_TXBRKEN_MASK)
-#define USART_CTL_ADDRDET_MASK (0x4U)
-#define USART_CTL_ADDRDET_SHIFT (2U)
-/*! ADDRDET - Enable address detect mode.
- * 0b0..Disabled. The USART presents all incoming data.
- * 0b1..Enabled. The USART receiver ignores incoming data that does not have the most significant bit of the data
- * (typically the 9th bit) = 1. When the data MSB bit = 1, the receiver treats the incoming data normally,
- * generating a received data interrupt. Software can then check the data to see if this is an address that
- * should be handled. If it is, the ADDRDET bit is cleared by software and further incoming data is handled
- * normally.
- */
-#define USART_CTL_ADDRDET(x) (((uint32_t)(((uint32_t)(x)) << USART_CTL_ADDRDET_SHIFT)) & USART_CTL_ADDRDET_MASK)
-#define USART_CTL_TXDIS_MASK (0x40U)
-#define USART_CTL_TXDIS_SHIFT (6U)
-/*! TXDIS - Transmit Disable.
- * 0b0..Not disabled. USART transmitter is not disabled.
- * 0b1..Disabled. USART transmitter is disabled after any character currently being transmitted is complete. This
- * feature can be used to facilitate software flow control.
- */
-#define USART_CTL_TXDIS(x) (((uint32_t)(((uint32_t)(x)) << USART_CTL_TXDIS_SHIFT)) & USART_CTL_TXDIS_MASK)
-#define USART_CTL_CC_MASK (0x100U)
-#define USART_CTL_CC_SHIFT (8U)
-/*! CC - Continuous Clock generation. By default, SCLK is only output while data is being transmitted in synchronous mode.
- * 0b0..Clock on character. In synchronous mode, SCLK cycles only when characters are being sent on Un_TXD or to
- * complete a character that is being received.
- * 0b1..Continuous clock. SCLK runs continuously in synchronous mode, allowing characters to be received on
- * Un_RxD independently from transmission on Un_TXD).
- */
-#define USART_CTL_CC(x) (((uint32_t)(((uint32_t)(x)) << USART_CTL_CC_SHIFT)) & USART_CTL_CC_MASK)
-#define USART_CTL_CLRCCONRX_MASK (0x200U)
-#define USART_CTL_CLRCCONRX_SHIFT (9U)
-/*! CLRCCONRX - Clear Continuous Clock.
- * 0b0..No effect. No effect on the CC bit.
- * 0b1..Auto-clear. The CC bit is automatically cleared when a complete character has been received. This bit is cleared at the same time.
- */
-#define USART_CTL_CLRCCONRX(x) (((uint32_t)(((uint32_t)(x)) << USART_CTL_CLRCCONRX_SHIFT)) & USART_CTL_CLRCCONRX_MASK)
-#define USART_CTL_AUTOBAUD_MASK (0x10000U)
-#define USART_CTL_AUTOBAUD_SHIFT (16U)
-/*! AUTOBAUD - Autobaud enable.
- * 0b0..Disabled. USART is in normal operating mode.
- * 0b1..Enabled. USART is in autobaud mode. This bit should only be set when the USART receiver is idle. The
- * first start bit of RX is measured and used the update the BRG register to match the received data rate.
- * AUTOBAUD is cleared once this process is complete, or if there is an AERR.
- */
-#define USART_CTL_AUTOBAUD(x) (((uint32_t)(((uint32_t)(x)) << USART_CTL_AUTOBAUD_SHIFT)) & USART_CTL_AUTOBAUD_MASK)
-/*! @} */
-
-/*! @name STAT - USART Status register. The complete status value can be read here. Writing ones clears some bits in the register. Some bits can be cleared by writing a 1 to them. */
-/*! @{ */
-#define USART_STAT_RXIDLE_MASK (0x2U)
-#define USART_STAT_RXIDLE_SHIFT (1U)
-/*! RXIDLE - Receiver Idle. When 0, indicates that the receiver is currently in the process of
- * receiving data. When 1, indicates that the receiver is not currently in the process of receiving
- * data.
- */
-#define USART_STAT_RXIDLE(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_RXIDLE_SHIFT)) & USART_STAT_RXIDLE_MASK)
-#define USART_STAT_TXIDLE_MASK (0x8U)
-#define USART_STAT_TXIDLE_SHIFT (3U)
-/*! TXIDLE - Transmitter Idle. When 0, indicates that the transmitter is currently in the process of
- * sending data.When 1, indicate that the transmitter is not currently in the process of sending
- * data.
- */
-#define USART_STAT_TXIDLE(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_TXIDLE_SHIFT)) & USART_STAT_TXIDLE_MASK)
-#define USART_STAT_CTS_MASK (0x10U)
-#define USART_STAT_CTS_SHIFT (4U)
-/*! CTS - This bit reflects the current state of the CTS signal, regardless of the setting of the
- * CTSEN bit in the CFG register. This will be the value of the CTS input pin unless loopback mode
- * is enabled.
- */
-#define USART_STAT_CTS(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_CTS_SHIFT)) & USART_STAT_CTS_MASK)
-#define USART_STAT_DELTACTS_MASK (0x20U)
-#define USART_STAT_DELTACTS_SHIFT (5U)
-/*! DELTACTS - This bit is set when a change in the state is detected for the CTS flag above. This bit is cleared by software.
- */
-#define USART_STAT_DELTACTS(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_DELTACTS_SHIFT)) & USART_STAT_DELTACTS_MASK)
-#define USART_STAT_TXDISSTAT_MASK (0x40U)
-#define USART_STAT_TXDISSTAT_SHIFT (6U)
-/*! TXDISSTAT - Transmitter Disabled Status flag. When 1, this bit indicates that the USART
- * transmitter is fully idle after being disabled via the TXDIS bit in the CFG register (TXDIS = 1).
- */
-#define USART_STAT_TXDISSTAT(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_TXDISSTAT_SHIFT)) & USART_STAT_TXDISSTAT_MASK)
-#define USART_STAT_RXBRK_MASK (0x400U)
-#define USART_STAT_RXBRK_SHIFT (10U)
-/*! RXBRK - Received Break. This bit reflects the current state of the receiver break detection
- * logic. It is set when the Un_RXD pin remains low for 16 bit times. Note that FRAMERRINT will also
- * be set when this condition occurs because the stop bit(s) for the character would be missing.
- * RXBRK is cleared when the Un_RXD pin goes high.
- */
-#define USART_STAT_RXBRK(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_RXBRK_SHIFT)) & USART_STAT_RXBRK_MASK)
-#define USART_STAT_DELTARXBRK_MASK (0x800U)
-#define USART_STAT_DELTARXBRK_SHIFT (11U)
-/*! DELTARXBRK - This bit is set when a change in the state of receiver break detection occurs. Cleared by software.
- */
-#define USART_STAT_DELTARXBRK(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_DELTARXBRK_SHIFT)) & USART_STAT_DELTARXBRK_MASK)
-#define USART_STAT_START_MASK (0x1000U)
-#define USART_STAT_START_SHIFT (12U)
-/*! START - This bit is set when a start is detected on the receiver input. Its purpose is primarily
- * to allow wake-up from Deep-sleep or Power-down mode immediately when a start is detected.
- * Cleared by software.
- */
-#define USART_STAT_START(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_START_SHIFT)) & USART_STAT_START_MASK)
-#define USART_STAT_FRAMERRINT_MASK (0x2000U)
-#define USART_STAT_FRAMERRINT_SHIFT (13U)
-/*! FRAMERRINT - Framing Error interrupt flag. This flag is set when a character is received with a
- * missing stop bit at the expected location. This could be an indication of a baud rate or
- * configuration mismatch with the transmitting source.
- */
-#define USART_STAT_FRAMERRINT(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_FRAMERRINT_SHIFT)) & USART_STAT_FRAMERRINT_MASK)
-#define USART_STAT_PARITYERRINT_MASK (0x4000U)
-#define USART_STAT_PARITYERRINT_SHIFT (14U)
-/*! PARITYERRINT - Parity Error interrupt flag. This flag is set when a parity error is detected in a received character.
- */
-#define USART_STAT_PARITYERRINT(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_PARITYERRINT_SHIFT)) & USART_STAT_PARITYERRINT_MASK)
-#define USART_STAT_RXNOISEINT_MASK (0x8000U)
-#define USART_STAT_RXNOISEINT_SHIFT (15U)
-/*! RXNOISEINT - Received Noise interrupt flag. Three samples of received data are taken in order to
- * determine the value of each received data bit, except in synchronous mode. This acts as a
- * noise filter if one sample disagrees. This flag is set when a received data bit contains one
- * disagreeing sample. This could indicate line noise, a baud rate or character format mismatch, or
- * loss of synchronization during data reception.
- */
-#define USART_STAT_RXNOISEINT(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_RXNOISEINT_SHIFT)) & USART_STAT_RXNOISEINT_MASK)
-#define USART_STAT_ABERR_MASK (0x10000U)
-#define USART_STAT_ABERR_SHIFT (16U)
-/*! ABERR - Auto baud Error. An auto baud error can occur if the BRG counts to its limit before the
- * end of the start bit that is being measured, essentially an auto baud time-out.
- */
-#define USART_STAT_ABERR(x) (((uint32_t)(((uint32_t)(x)) << USART_STAT_ABERR_SHIFT)) & USART_STAT_ABERR_MASK)
-/*! @} */
-
-/*! @name INTENSET - Interrupt Enable read and Set register for USART (not FIFO) status. Contains individual interrupt enable bits for each potential USART interrupt. A complete value may be read from this register. Writing a 1 to any implemented bit position causes that bit to be set. */
-/*! @{ */
-#define USART_INTENSET_TXIDLEEN_MASK (0x8U)
-#define USART_INTENSET_TXIDLEEN_SHIFT (3U)
-/*! TXIDLEEN - When 1, enables an interrupt when the transmitter becomes idle (TXIDLE = 1).
- */
-#define USART_INTENSET_TXIDLEEN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_TXIDLEEN_SHIFT)) & USART_INTENSET_TXIDLEEN_MASK)
-#define USART_INTENSET_DELTACTSEN_MASK (0x20U)
-#define USART_INTENSET_DELTACTSEN_SHIFT (5U)
-/*! DELTACTSEN - When 1, enables an interrupt when there is a change in the state of the CTS input.
- */
-#define USART_INTENSET_DELTACTSEN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_DELTACTSEN_SHIFT)) & USART_INTENSET_DELTACTSEN_MASK)
-#define USART_INTENSET_TXDISEN_MASK (0x40U)
-#define USART_INTENSET_TXDISEN_SHIFT (6U)
-/*! TXDISEN - When 1, enables an interrupt when the transmitter is fully disabled as indicated by
- * the TXDISINT flag in STAT. See description of the TXDISINT bit for details.
- */
-#define USART_INTENSET_TXDISEN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_TXDISEN_SHIFT)) & USART_INTENSET_TXDISEN_MASK)
-#define USART_INTENSET_DELTARXBRKEN_MASK (0x800U)
-#define USART_INTENSET_DELTARXBRKEN_SHIFT (11U)
-/*! DELTARXBRKEN - When 1, enables an interrupt when a change of state has occurred in the detection
- * of a received break condition (break condition asserted or deasserted).
- */
-#define USART_INTENSET_DELTARXBRKEN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_DELTARXBRKEN_SHIFT)) & USART_INTENSET_DELTARXBRKEN_MASK)
-#define USART_INTENSET_STARTEN_MASK (0x1000U)
-#define USART_INTENSET_STARTEN_SHIFT (12U)
-/*! STARTEN - When 1, enables an interrupt when a received start bit has been detected.
- */
-#define USART_INTENSET_STARTEN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_STARTEN_SHIFT)) & USART_INTENSET_STARTEN_MASK)
-#define USART_INTENSET_FRAMERREN_MASK (0x2000U)
-#define USART_INTENSET_FRAMERREN_SHIFT (13U)
-/*! FRAMERREN - When 1, enables an interrupt when a framing error has been detected.
- */
-#define USART_INTENSET_FRAMERREN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_FRAMERREN_SHIFT)) & USART_INTENSET_FRAMERREN_MASK)
-#define USART_INTENSET_PARITYERREN_MASK (0x4000U)
-#define USART_INTENSET_PARITYERREN_SHIFT (14U)
-/*! PARITYERREN - When 1, enables an interrupt when a parity error has been detected.
- */
-#define USART_INTENSET_PARITYERREN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_PARITYERREN_SHIFT)) & USART_INTENSET_PARITYERREN_MASK)
-#define USART_INTENSET_RXNOISEEN_MASK (0x8000U)
-#define USART_INTENSET_RXNOISEEN_SHIFT (15U)
-/*! RXNOISEEN - When 1, enables an interrupt when noise is detected. See description of the RXNOISEINT bit in Table 354.
- */
-#define USART_INTENSET_RXNOISEEN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_RXNOISEEN_SHIFT)) & USART_INTENSET_RXNOISEEN_MASK)
-#define USART_INTENSET_ABERREN_MASK (0x10000U)
-#define USART_INTENSET_ABERREN_SHIFT (16U)
-/*! ABERREN - When 1, enables an interrupt when an auto baud error occurs.
- */
-#define USART_INTENSET_ABERREN(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENSET_ABERREN_SHIFT)) & USART_INTENSET_ABERREN_MASK)
-/*! @} */
-
-/*! @name INTENCLR - Interrupt Enable Clear register. Allows clearing any combination of bits in the INTENSET register. Writing a 1 to any implemented bit position causes the corresponding bit to be cleared. */
-/*! @{ */
-#define USART_INTENCLR_TXIDLECLR_MASK (0x8U)
-#define USART_INTENCLR_TXIDLECLR_SHIFT (3U)
-/*! TXIDLECLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_TXIDLECLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_TXIDLECLR_SHIFT)) & USART_INTENCLR_TXIDLECLR_MASK)
-#define USART_INTENCLR_DELTACTSCLR_MASK (0x20U)
-#define USART_INTENCLR_DELTACTSCLR_SHIFT (5U)
-/*! DELTACTSCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_DELTACTSCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_DELTACTSCLR_SHIFT)) & USART_INTENCLR_DELTACTSCLR_MASK)
-#define USART_INTENCLR_TXDISCLR_MASK (0x40U)
-#define USART_INTENCLR_TXDISCLR_SHIFT (6U)
-/*! TXDISCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_TXDISCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_TXDISCLR_SHIFT)) & USART_INTENCLR_TXDISCLR_MASK)
-#define USART_INTENCLR_DELTARXBRKCLR_MASK (0x800U)
-#define USART_INTENCLR_DELTARXBRKCLR_SHIFT (11U)
-/*! DELTARXBRKCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_DELTARXBRKCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_DELTARXBRKCLR_SHIFT)) & USART_INTENCLR_DELTARXBRKCLR_MASK)
-#define USART_INTENCLR_STARTCLR_MASK (0x1000U)
-#define USART_INTENCLR_STARTCLR_SHIFT (12U)
-/*! STARTCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_STARTCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_STARTCLR_SHIFT)) & USART_INTENCLR_STARTCLR_MASK)
-#define USART_INTENCLR_FRAMERRCLR_MASK (0x2000U)
-#define USART_INTENCLR_FRAMERRCLR_SHIFT (13U)
-/*! FRAMERRCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_FRAMERRCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_FRAMERRCLR_SHIFT)) & USART_INTENCLR_FRAMERRCLR_MASK)
-#define USART_INTENCLR_PARITYERRCLR_MASK (0x4000U)
-#define USART_INTENCLR_PARITYERRCLR_SHIFT (14U)
-/*! PARITYERRCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_PARITYERRCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_PARITYERRCLR_SHIFT)) & USART_INTENCLR_PARITYERRCLR_MASK)
-#define USART_INTENCLR_RXNOISECLR_MASK (0x8000U)
-#define USART_INTENCLR_RXNOISECLR_SHIFT (15U)
-/*! RXNOISECLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_RXNOISECLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_RXNOISECLR_SHIFT)) & USART_INTENCLR_RXNOISECLR_MASK)
-#define USART_INTENCLR_ABERRCLR_MASK (0x10000U)
-#define USART_INTENCLR_ABERRCLR_SHIFT (16U)
-/*! ABERRCLR - Writing 1 clears the corresponding bit in the INTENSET register.
- */
-#define USART_INTENCLR_ABERRCLR(x) (((uint32_t)(((uint32_t)(x)) << USART_INTENCLR_ABERRCLR_SHIFT)) & USART_INTENCLR_ABERRCLR_MASK)
-/*! @} */
-
-/*! @name BRG - Baud Rate Generator register. 16-bit integer baud rate divisor value. */
-/*! @{ */
-#define USART_BRG_BRGVAL_MASK (0xFFFFU)
-#define USART_BRG_BRGVAL_SHIFT (0U)
-/*! BRGVAL - This value is used to divide the USART input clock to determine the baud rate, based on
- * the input clock from the FRG. 0 = FCLK is used directly by the USART function. 1 = FCLK is
- * divided by 2 before use by the USART function. 2 = FCLK is divided by 3 before use by the USART
- * function. 0xFFFF = FCLK is divided by 65,536 before use by the USART function.
- */
-#define USART_BRG_BRGVAL(x) (((uint32_t)(((uint32_t)(x)) << USART_BRG_BRGVAL_SHIFT)) & USART_BRG_BRGVAL_MASK)
-/*! @} */
-
-/*! @name INTSTAT - Interrupt status register. Reflects interrupts that are currently enabled. */
-/*! @{ */
-#define USART_INTSTAT_TXIDLE_MASK (0x8U)
-#define USART_INTSTAT_TXIDLE_SHIFT (3U)
-/*! TXIDLE - Transmitter Idle status.
- */
-#define USART_INTSTAT_TXIDLE(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_TXIDLE_SHIFT)) & USART_INTSTAT_TXIDLE_MASK)
-#define USART_INTSTAT_DELTACTS_MASK (0x20U)
-#define USART_INTSTAT_DELTACTS_SHIFT (5U)
-/*! DELTACTS - This bit is set when a change in the state of the CTS input is detected.
- */
-#define USART_INTSTAT_DELTACTS(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_DELTACTS_SHIFT)) & USART_INTSTAT_DELTACTS_MASK)
-#define USART_INTSTAT_TXDISINT_MASK (0x40U)
-#define USART_INTSTAT_TXDISINT_SHIFT (6U)
-/*! TXDISINT - Transmitter Disabled Interrupt flag.
- */
-#define USART_INTSTAT_TXDISINT(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_TXDISINT_SHIFT)) & USART_INTSTAT_TXDISINT_MASK)
-#define USART_INTSTAT_DELTARXBRK_MASK (0x800U)
-#define USART_INTSTAT_DELTARXBRK_SHIFT (11U)
-/*! DELTARXBRK - This bit is set when a change in the state of receiver break detection occurs.
- */
-#define USART_INTSTAT_DELTARXBRK(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_DELTARXBRK_SHIFT)) & USART_INTSTAT_DELTARXBRK_MASK)
-#define USART_INTSTAT_START_MASK (0x1000U)
-#define USART_INTSTAT_START_SHIFT (12U)
-/*! START - This bit is set when a start is detected on the receiver input.
- */
-#define USART_INTSTAT_START(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_START_SHIFT)) & USART_INTSTAT_START_MASK)
-#define USART_INTSTAT_FRAMERRINT_MASK (0x2000U)
-#define USART_INTSTAT_FRAMERRINT_SHIFT (13U)
-/*! FRAMERRINT - Framing Error interrupt flag.
- */
-#define USART_INTSTAT_FRAMERRINT(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_FRAMERRINT_SHIFT)) & USART_INTSTAT_FRAMERRINT_MASK)
-#define USART_INTSTAT_PARITYERRINT_MASK (0x4000U)
-#define USART_INTSTAT_PARITYERRINT_SHIFT (14U)
-/*! PARITYERRINT - Parity Error interrupt flag.
- */
-#define USART_INTSTAT_PARITYERRINT(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_PARITYERRINT_SHIFT)) & USART_INTSTAT_PARITYERRINT_MASK)
-#define USART_INTSTAT_RXNOISEINT_MASK (0x8000U)
-#define USART_INTSTAT_RXNOISEINT_SHIFT (15U)
-/*! RXNOISEINT - Received Noise interrupt flag.
- */
-#define USART_INTSTAT_RXNOISEINT(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_RXNOISEINT_SHIFT)) & USART_INTSTAT_RXNOISEINT_MASK)
-#define USART_INTSTAT_ABERRINT_MASK (0x10000U)
-#define USART_INTSTAT_ABERRINT_SHIFT (16U)
-/*! ABERRINT - Auto baud Error Interrupt flag.
- */
-#define USART_INTSTAT_ABERRINT(x) (((uint32_t)(((uint32_t)(x)) << USART_INTSTAT_ABERRINT_SHIFT)) & USART_INTSTAT_ABERRINT_MASK)
-/*! @} */
-
-/*! @name OSR - Oversample selection register for asynchronous communication. */
-/*! @{ */
-#define USART_OSR_OSRVAL_MASK (0xFU)
-#define USART_OSR_OSRVAL_SHIFT (0U)
-/*! OSRVAL - Oversample Selection Value. 0 to 3 = not supported 0x4 = 5 function clocks are used to
- * transmit and receive each data bit. 0x5 = 6 function clocks are used to transmit and receive
- * each data bit. 0xF= 16 function clocks are used to transmit and receive each data bit.
- */
-#define USART_OSR_OSRVAL(x) (((uint32_t)(((uint32_t)(x)) << USART_OSR_OSRVAL_SHIFT)) & USART_OSR_OSRVAL_MASK)
-/*! @} */
-
-/*! @name ADDR - Address register for automatic address matching. */
-/*! @{ */
-#define USART_ADDR_ADDRESS_MASK (0xFFU)
-#define USART_ADDR_ADDRESS_SHIFT (0U)
-/*! ADDRESS - 8-bit address used with automatic address matching. Used when address detection is
- * enabled (ADDRDET in CTL = 1) and automatic address matching is enabled (AUTOADDR in CFG = 1).
- */
-#define USART_ADDR_ADDRESS(x) (((uint32_t)(((uint32_t)(x)) << USART_ADDR_ADDRESS_SHIFT)) & USART_ADDR_ADDRESS_MASK)
-/*! @} */
-
-/*! @name FIFOCFG - FIFO configuration and enable register. */
-/*! @{ */
-#define USART_FIFOCFG_ENABLETX_MASK (0x1U)
-#define USART_FIFOCFG_ENABLETX_SHIFT (0U)
-/*! ENABLETX - Enable the transmit FIFO.
- * 0b0..The transmit FIFO is not enabled.
- * 0b1..The transmit FIFO is enabled.
- */
-#define USART_FIFOCFG_ENABLETX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_ENABLETX_SHIFT)) & USART_FIFOCFG_ENABLETX_MASK)
-#define USART_FIFOCFG_ENABLERX_MASK (0x2U)
-#define USART_FIFOCFG_ENABLERX_SHIFT (1U)
-/*! ENABLERX - Enable the receive FIFO.
- * 0b0..The receive FIFO is not enabled.
- * 0b1..The receive FIFO is enabled.
- */
-#define USART_FIFOCFG_ENABLERX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_ENABLERX_SHIFT)) & USART_FIFOCFG_ENABLERX_MASK)
-#define USART_FIFOCFG_SIZE_MASK (0x30U)
-#define USART_FIFOCFG_SIZE_SHIFT (4U)
-/*! SIZE - FIFO size configuration. This is a read-only field. 0x0 = FIFO is configured as 16
- * entries of 8 bits. 0x1, 0x2, 0x3 = not applicable to USART.
- */
-#define USART_FIFOCFG_SIZE(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_SIZE_SHIFT)) & USART_FIFOCFG_SIZE_MASK)
-#define USART_FIFOCFG_DMATX_MASK (0x1000U)
-#define USART_FIFOCFG_DMATX_SHIFT (12U)
-/*! DMATX - DMA configuration for transmit.
- * 0b0..DMA is not used for the transmit function.
- * 0b1..Trigger DMA for the transmit function if the FIFO is not full. Generally, data interrupts would be disabled if DMA is enabled.
- */
-#define USART_FIFOCFG_DMATX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_DMATX_SHIFT)) & USART_FIFOCFG_DMATX_MASK)
-#define USART_FIFOCFG_DMARX_MASK (0x2000U)
-#define USART_FIFOCFG_DMARX_SHIFT (13U)
-/*! DMARX - DMA configuration for receive.
- * 0b0..DMA is not used for the receive function.
- * 0b1..Trigger DMA for the receive function if the FIFO is not empty. Generally, data interrupts would be disabled if DMA is enabled.
- */
-#define USART_FIFOCFG_DMARX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_DMARX_SHIFT)) & USART_FIFOCFG_DMARX_MASK)
-#define USART_FIFOCFG_WAKETX_MASK (0x4000U)
-#define USART_FIFOCFG_WAKETX_SHIFT (14U)
-/*! WAKETX - Wake-up for transmit FIFO level. This allows the device to be woken from reduced power
- * modes (up to power-down, as long as the peripheral function works in that power mode) without
- * enabling the TXLVL interrupt. Only DMA wakes up, processes data, and goes back to sleep. The
- * CPU will remain stopped until woken by another cause, such as DMA completion. See Hardware
- * Wake-up control register.
- * 0b0..Only enabled interrupts will wake up the device form reduced power modes.
- * 0b1..A device wake-up for DMA will occur if the transmit FIFO level reaches the value specified by TXLVL in
- * FIFOTRIG, even when the TXLVL interrupt is not enabled.
- */
-#define USART_FIFOCFG_WAKETX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_WAKETX_SHIFT)) & USART_FIFOCFG_WAKETX_MASK)
-#define USART_FIFOCFG_WAKERX_MASK (0x8000U)
-#define USART_FIFOCFG_WAKERX_SHIFT (15U)
-/*! WAKERX - Wake-up for receive FIFO level. This allows the device to be woken from reduced power
- * modes (up to power-down, as long as the peripheral function works in that power mode) without
- * enabling the TXLVL interrupt. Only DMA wakes up, processes data, and goes back to sleep. The
- * CPU will remain stopped until woken by another cause, such as DMA completion. See Hardware
- * Wake-up control register.
- * 0b0..Only enabled interrupts will wake up the device form reduced power modes.
- * 0b1..A device wake-up for DMA will occur if the receive FIFO level reaches the value specified by RXLVL in
- * FIFOTRIG, even when the RXLVL interrupt is not enabled.
- */
-#define USART_FIFOCFG_WAKERX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_WAKERX_SHIFT)) & USART_FIFOCFG_WAKERX_MASK)
-#define USART_FIFOCFG_EMPTYTX_MASK (0x10000U)
-#define USART_FIFOCFG_EMPTYTX_SHIFT (16U)
-/*! EMPTYTX - Empty command for the transmit FIFO. When a 1 is written to this bit, the TX FIFO is emptied.
- */
-#define USART_FIFOCFG_EMPTYTX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_EMPTYTX_SHIFT)) & USART_FIFOCFG_EMPTYTX_MASK)
-#define USART_FIFOCFG_EMPTYRX_MASK (0x20000U)
-#define USART_FIFOCFG_EMPTYRX_SHIFT (17U)
-/*! EMPTYRX - Empty command for the receive FIFO. When a 1 is written to this bit, the RX FIFO is emptied.
- */
-#define USART_FIFOCFG_EMPTYRX(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOCFG_EMPTYRX_SHIFT)) & USART_FIFOCFG_EMPTYRX_MASK)
-/*! @} */
-
-/*! @name FIFOSTAT - FIFO status register. */
-/*! @{ */
-#define USART_FIFOSTAT_TXERR_MASK (0x1U)
-#define USART_FIFOSTAT_TXERR_SHIFT (0U)
-/*! TXERR - TX FIFO error. Will be set if a transmit FIFO error occurs. This could be an overflow
- * caused by pushing data into a full FIFO, or by an underflow if the FIFO is empty when data is
- * needed. Cleared by writing a 1 to this bit.
- */
-#define USART_FIFOSTAT_TXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_TXERR_SHIFT)) & USART_FIFOSTAT_TXERR_MASK)
-#define USART_FIFOSTAT_RXERR_MASK (0x2U)
-#define USART_FIFOSTAT_RXERR_SHIFT (1U)
-/*! RXERR - RX FIFO error. Will be set if a receive FIFO overflow occurs, caused by software or DMA
- * not emptying the FIFO fast enough. Cleared by writing a 1 to this bit.
- */
-#define USART_FIFOSTAT_RXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_RXERR_SHIFT)) & USART_FIFOSTAT_RXERR_MASK)
-#define USART_FIFOSTAT_PERINT_MASK (0x8U)
-#define USART_FIFOSTAT_PERINT_SHIFT (3U)
-/*! PERINT - Peripheral interrupt. When 1, this indicates that the peripheral function has asserted
- * an interrupt. The details can be found by reading the peripheral's STAT register.
- */
-#define USART_FIFOSTAT_PERINT(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_PERINT_SHIFT)) & USART_FIFOSTAT_PERINT_MASK)
-#define USART_FIFOSTAT_TXEMPTY_MASK (0x10U)
-#define USART_FIFOSTAT_TXEMPTY_SHIFT (4U)
-/*! TXEMPTY - Transmit FIFO empty. When 1, the transmit FIFO is empty. The peripheral may still be processing the last piece of data.
- */
-#define USART_FIFOSTAT_TXEMPTY(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_TXEMPTY_SHIFT)) & USART_FIFOSTAT_TXEMPTY_MASK)
-#define USART_FIFOSTAT_TXNOTFULL_MASK (0x20U)
-#define USART_FIFOSTAT_TXNOTFULL_SHIFT (5U)
-/*! TXNOTFULL - Transmit FIFO not full. When 1, the transmit FIFO is not full, so more data can be
- * written. When 0, the transmit FIFO is full and another write would cause it to overflow.
- */
-#define USART_FIFOSTAT_TXNOTFULL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_TXNOTFULL_SHIFT)) & USART_FIFOSTAT_TXNOTFULL_MASK)
-#define USART_FIFOSTAT_RXNOTEMPTY_MASK (0x40U)
-#define USART_FIFOSTAT_RXNOTEMPTY_SHIFT (6U)
-/*! RXNOTEMPTY - Receive FIFO not empty. When 1, the receive FIFO is not empty, so data can be read. When 0, the receive FIFO is empty.
- */
-#define USART_FIFOSTAT_RXNOTEMPTY(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_RXNOTEMPTY_SHIFT)) & USART_FIFOSTAT_RXNOTEMPTY_MASK)
-#define USART_FIFOSTAT_RXFULL_MASK (0x80U)
-#define USART_FIFOSTAT_RXFULL_SHIFT (7U)
-/*! RXFULL - Receive FIFO full. When 1, the receive FIFO is full. Data needs to be read out to
- * prevent the peripheral from causing an overflow.
- */
-#define USART_FIFOSTAT_RXFULL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_RXFULL_SHIFT)) & USART_FIFOSTAT_RXFULL_MASK)
-#define USART_FIFOSTAT_TXLVL_MASK (0x1F00U)
-#define USART_FIFOSTAT_TXLVL_SHIFT (8U)
-/*! TXLVL - Transmit FIFO current level. A 0 means the TX FIFO is currently empty, and the TXEMPTY
- * and TXNOTFULL flags will be 1. Other values tell how much data is actually in the TX FIFO at
- * the point where the read occurs. If the TX FIFO is full, the TXEMPTY and TXNOTFULL flags will be
- * 0.
- */
-#define USART_FIFOSTAT_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_TXLVL_SHIFT)) & USART_FIFOSTAT_TXLVL_MASK)
-#define USART_FIFOSTAT_RXLVL_MASK (0x1F0000U)
-#define USART_FIFOSTAT_RXLVL_SHIFT (16U)
-/*! RXLVL - Receive FIFO current level. A 0 means the RX FIFO is currently empty, and the RXFULL and
- * RXNOTEMPTY flags will be 0. Other values tell how much data is actually in the RX FIFO at the
- * point where the read occurs. If the RX FIFO is full, the RXFULL and RXNOTEMPTY flags will be
- * 1.
- */
-#define USART_FIFOSTAT_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOSTAT_RXLVL_SHIFT)) & USART_FIFOSTAT_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOTRIG - FIFO trigger settings for interrupt and DMA request. */
-/*! @{ */
-#define USART_FIFOTRIG_TXLVLENA_MASK (0x1U)
-#define USART_FIFOTRIG_TXLVLENA_SHIFT (0U)
-/*! TXLVLENA - Transmit FIFO level trigger enable. This trigger will become an interrupt if enabled
- * in FIFOINTENSET, or a DMA trigger if DMATX in FIFOCFG is set.
- * 0b0..Transmit FIFO level does not generate a FIFO level trigger.
- * 0b1..An trigger will be generated if the transmit FIFO level reaches the value specified by the TXLVL field in this register.
- */
-#define USART_FIFOTRIG_TXLVLENA(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOTRIG_TXLVLENA_SHIFT)) & USART_FIFOTRIG_TXLVLENA_MASK)
-#define USART_FIFOTRIG_RXLVLENA_MASK (0x2U)
-#define USART_FIFOTRIG_RXLVLENA_SHIFT (1U)
-/*! RXLVLENA - Receive FIFO level trigger enable. This trigger will become an interrupt if enabled
- * in FIFOINTENSET, or a DMA trigger if DMARX in FIFOCFG is set.
- * 0b0..Receive FIFO level does not generate a FIFO level trigger.
- * 0b1..An trigger will be generated if the receive FIFO level reaches the value specified by the RXLVL field in this register.
- */
-#define USART_FIFOTRIG_RXLVLENA(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOTRIG_RXLVLENA_SHIFT)) & USART_FIFOTRIG_RXLVLENA_MASK)
-#define USART_FIFOTRIG_TXLVL_MASK (0xF00U)
-#define USART_FIFOTRIG_TXLVL_SHIFT (8U)
-/*! TXLVL - Transmit FIFO level trigger point. This field is used only when TXLVLENA = 1. If enabled
- * to do so, the FIFO level can wake up the device just enough to perform DMA, then return to
- * the reduced power mode. See Hardware Wake-up control register. 0 = trigger when the TX FIFO
- * becomes empty. 1 = trigger when the TX FIFO level decreases to one entry. 15 = trigger when the TX
- * FIFO level decreases to 15 entries (is no longer full).
- */
-#define USART_FIFOTRIG_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOTRIG_TXLVL_SHIFT)) & USART_FIFOTRIG_TXLVL_MASK)
-#define USART_FIFOTRIG_RXLVL_MASK (0xF0000U)
-#define USART_FIFOTRIG_RXLVL_SHIFT (16U)
-/*! RXLVL - Receive FIFO level trigger point. The RX FIFO level is checked when a new piece of data
- * is received. This field is used only when RXLVLENA = 1. If enabled to do so, the FIFO level
- * can wake up the device just enough to perform DMA, then return to the reduced power mode. See
- * Hardware Wake-up control register. 0 = trigger when the RX FIFO has received one entry (is no
- * longer empty). 1 = trigger when the RX FIFO has received two entries. 15 = trigger when the RX
- * FIFO has received 16 entries (has become full).
- */
-#define USART_FIFOTRIG_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOTRIG_RXLVL_SHIFT)) & USART_FIFOTRIG_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTENSET - FIFO interrupt enable set (enable) and read register. */
-/*! @{ */
-#define USART_FIFOINTENSET_TXERR_MASK (0x1U)
-#define USART_FIFOINTENSET_TXERR_SHIFT (0U)
-/*! TXERR - Determines whether an interrupt occurs when a transmit error occurs, based on the TXERR flag in the FIFOSTAT register.
- * 0b0..No interrupt will be generated for a transmit error.
- * 0b1..An interrupt will be generated when a transmit error occurs.
- */
-#define USART_FIFOINTENSET_TXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENSET_TXERR_SHIFT)) & USART_FIFOINTENSET_TXERR_MASK)
-#define USART_FIFOINTENSET_RXERR_MASK (0x2U)
-#define USART_FIFOINTENSET_RXERR_SHIFT (1U)
-/*! RXERR - Determines whether an interrupt occurs when a receive error occurs, based on the RXERR flag in the FIFOSTAT register.
- * 0b0..No interrupt will be generated for a receive error.
- * 0b1..An interrupt will be generated when a receive error occurs.
- */
-#define USART_FIFOINTENSET_RXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENSET_RXERR_SHIFT)) & USART_FIFOINTENSET_RXERR_MASK)
-#define USART_FIFOINTENSET_TXLVL_MASK (0x4U)
-#define USART_FIFOINTENSET_TXLVL_SHIFT (2U)
-/*! TXLVL - Determines whether an interrupt occurs when a the transmit FIFO reaches the level
- * specified by the TXLVL field in the FIFOTRIG register.
- * 0b0..No interrupt will be generated based on the TX FIFO level.
- * 0b1..If TXLVLENA in the FIFOTRIG register = 1, an interrupt will be generated when the TX FIFO level decreases
- * to the level specified by TXLVL in the FIFOTRIG register.
- */
-#define USART_FIFOINTENSET_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENSET_TXLVL_SHIFT)) & USART_FIFOINTENSET_TXLVL_MASK)
-#define USART_FIFOINTENSET_RXLVL_MASK (0x8U)
-#define USART_FIFOINTENSET_RXLVL_SHIFT (3U)
-/*! RXLVL - Determines whether an interrupt occurs when a the receive FIFO reaches the level
- * specified by the TXLVL field in the FIFOTRIG register.
- * 0b0..No interrupt will be generated based on the RX FIFO level.
- * 0b1..If RXLVLENA in the FIFOTRIG register = 1, an interrupt will be generated when the when the RX FIFO level
- * increases to the level specified by RXLVL in the FIFOTRIG register.
- */
-#define USART_FIFOINTENSET_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENSET_RXLVL_SHIFT)) & USART_FIFOINTENSET_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTENCLR - FIFO interrupt enable clear (disable) and read register. */
-/*! @{ */
-#define USART_FIFOINTENCLR_TXERR_MASK (0x1U)
-#define USART_FIFOINTENCLR_TXERR_SHIFT (0U)
-/*! TXERR - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define USART_FIFOINTENCLR_TXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENCLR_TXERR_SHIFT)) & USART_FIFOINTENCLR_TXERR_MASK)
-#define USART_FIFOINTENCLR_RXERR_MASK (0x2U)
-#define USART_FIFOINTENCLR_RXERR_SHIFT (1U)
-/*! RXERR - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define USART_FIFOINTENCLR_RXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENCLR_RXERR_SHIFT)) & USART_FIFOINTENCLR_RXERR_MASK)
-#define USART_FIFOINTENCLR_TXLVL_MASK (0x4U)
-#define USART_FIFOINTENCLR_TXLVL_SHIFT (2U)
-/*! TXLVL - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define USART_FIFOINTENCLR_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENCLR_TXLVL_SHIFT)) & USART_FIFOINTENCLR_TXLVL_MASK)
-#define USART_FIFOINTENCLR_RXLVL_MASK (0x8U)
-#define USART_FIFOINTENCLR_RXLVL_SHIFT (3U)
-/*! RXLVL - Writing one clears the corresponding bits in the FIFOINTENSET register.
- */
-#define USART_FIFOINTENCLR_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTENCLR_RXLVL_SHIFT)) & USART_FIFOINTENCLR_RXLVL_MASK)
-/*! @} */
-
-/*! @name FIFOINTSTAT - FIFO interrupt status register. */
-/*! @{ */
-#define USART_FIFOINTSTAT_TXERR_MASK (0x1U)
-#define USART_FIFOINTSTAT_TXERR_SHIFT (0U)
-/*! TXERR - TX FIFO error.
- */
-#define USART_FIFOINTSTAT_TXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTSTAT_TXERR_SHIFT)) & USART_FIFOINTSTAT_TXERR_MASK)
-#define USART_FIFOINTSTAT_RXERR_MASK (0x2U)
-#define USART_FIFOINTSTAT_RXERR_SHIFT (1U)
-/*! RXERR - RX FIFO error.
- */
-#define USART_FIFOINTSTAT_RXERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTSTAT_RXERR_SHIFT)) & USART_FIFOINTSTAT_RXERR_MASK)
-#define USART_FIFOINTSTAT_TXLVL_MASK (0x4U)
-#define USART_FIFOINTSTAT_TXLVL_SHIFT (2U)
-/*! TXLVL - Transmit FIFO level interrupt.
- */
-#define USART_FIFOINTSTAT_TXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTSTAT_TXLVL_SHIFT)) & USART_FIFOINTSTAT_TXLVL_MASK)
-#define USART_FIFOINTSTAT_RXLVL_MASK (0x8U)
-#define USART_FIFOINTSTAT_RXLVL_SHIFT (3U)
-/*! RXLVL - Receive FIFO level interrupt.
- */
-#define USART_FIFOINTSTAT_RXLVL(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTSTAT_RXLVL_SHIFT)) & USART_FIFOINTSTAT_RXLVL_MASK)
-#define USART_FIFOINTSTAT_PERINT_MASK (0x10U)
-#define USART_FIFOINTSTAT_PERINT_SHIFT (4U)
-/*! PERINT - Peripheral interrupt.
- */
-#define USART_FIFOINTSTAT_PERINT(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOINTSTAT_PERINT_SHIFT)) & USART_FIFOINTSTAT_PERINT_MASK)
-/*! @} */
-
-/*! @name FIFOWR - FIFO write data. */
-/*! @{ */
-#define USART_FIFOWR_TXDATA_MASK (0x1FFU)
-#define USART_FIFOWR_TXDATA_SHIFT (0U)
-/*! TXDATA - Transmit data to the FIFO.
- */
-#define USART_FIFOWR_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFOWR_TXDATA_SHIFT)) & USART_FIFOWR_TXDATA_MASK)
-/*! @} */
-
-/*! @name FIFORD - FIFO read data. */
-/*! @{ */
-#define USART_FIFORD_RXDATA_MASK (0x1FFU)
-#define USART_FIFORD_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO. The number of bits used depends on the DATALEN and PARITYSEL settings.
- */
-#define USART_FIFORD_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORD_RXDATA_SHIFT)) & USART_FIFORD_RXDATA_MASK)
-#define USART_FIFORD_FRAMERR_MASK (0x2000U)
-#define USART_FIFORD_FRAMERR_SHIFT (13U)
-/*! FRAMERR - Framing Error status flag. This bit reflects the status for the data it is read along
- * with from the FIFO, and indicates that the character was received with a missing stop bit at
- * the expected location. This could be an indication of a baud rate or configuration mismatch
- * with the transmitting source.
- */
-#define USART_FIFORD_FRAMERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORD_FRAMERR_SHIFT)) & USART_FIFORD_FRAMERR_MASK)
-#define USART_FIFORD_PARITYERR_MASK (0x4000U)
-#define USART_FIFORD_PARITYERR_SHIFT (14U)
-/*! PARITYERR - Parity Error status flag. This bit reflects the status for the data it is read along
- * with from the FIFO. This bit will be set when a parity error is detected in a received
- * character.
- */
-#define USART_FIFORD_PARITYERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORD_PARITYERR_SHIFT)) & USART_FIFORD_PARITYERR_MASK)
-#define USART_FIFORD_RXNOISE_MASK (0x8000U)
-#define USART_FIFORD_RXNOISE_SHIFT (15U)
-/*! RXNOISE - Received Noise flag. See description of the RxNoiseInt bit in Table 354.
- */
-#define USART_FIFORD_RXNOISE(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORD_RXNOISE_SHIFT)) & USART_FIFORD_RXNOISE_MASK)
-/*! @} */
-
-/*! @name FIFORDNOPOP - FIFO data read with no FIFO pop. */
-/*! @{ */
-#define USART_FIFORDNOPOP_RXDATA_MASK (0x1FFU)
-#define USART_FIFORDNOPOP_RXDATA_SHIFT (0U)
-/*! RXDATA - Received data from the FIFO. The number of bits used depends on the DATALEN and PARITYSEL settings.
- */
-#define USART_FIFORDNOPOP_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORDNOPOP_RXDATA_SHIFT)) & USART_FIFORDNOPOP_RXDATA_MASK)
-#define USART_FIFORDNOPOP_FRAMERR_MASK (0x2000U)
-#define USART_FIFORDNOPOP_FRAMERR_SHIFT (13U)
-/*! FRAMERR - Framing Error status flag. This bit reflects the status for the data it is read along
- * with from the FIFO, and indicates that the character was received with a missing stop bit at
- * the expected location. This could be an indication of a baud rate or configuration mismatch
- * with the transmitting source.
- */
-#define USART_FIFORDNOPOP_FRAMERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORDNOPOP_FRAMERR_SHIFT)) & USART_FIFORDNOPOP_FRAMERR_MASK)
-#define USART_FIFORDNOPOP_PARITYERR_MASK (0x4000U)
-#define USART_FIFORDNOPOP_PARITYERR_SHIFT (14U)
-/*! PARITYERR - Parity Error status flag. This bit reflects the status for the data it is read along
- * with from the FIFO. This bit will be set when a parity error is detected in a received
- * character.
- */
-#define USART_FIFORDNOPOP_PARITYERR(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORDNOPOP_PARITYERR_SHIFT)) & USART_FIFORDNOPOP_PARITYERR_MASK)
-#define USART_FIFORDNOPOP_RXNOISE_MASK (0x8000U)
-#define USART_FIFORDNOPOP_RXNOISE_SHIFT (15U)
-/*! RXNOISE - Received Noise flag. See description of the RxNoiseInt bit in Table 354.
- */
-#define USART_FIFORDNOPOP_RXNOISE(x) (((uint32_t)(((uint32_t)(x)) << USART_FIFORDNOPOP_RXNOISE_SHIFT)) & USART_FIFORDNOPOP_RXNOISE_MASK)
-/*! @} */
-
-/*! @name ID - Peripheral identification register. */
-/*! @{ */
-#define USART_ID_APERTURE_MASK (0xFFU)
-#define USART_ID_APERTURE_SHIFT (0U)
-/*! APERTURE - Aperture: encoded as (aperture size/4K) -1, so 0x00 means a 4K aperture.
- */
-#define USART_ID_APERTURE(x) (((uint32_t)(((uint32_t)(x)) << USART_ID_APERTURE_SHIFT)) & USART_ID_APERTURE_MASK)
-#define USART_ID_MINOR_REV_MASK (0xF00U)
-#define USART_ID_MINOR_REV_SHIFT (8U)
-/*! MINOR_REV - Minor revision of module implementation.
- */
-#define USART_ID_MINOR_REV(x) (((uint32_t)(((uint32_t)(x)) << USART_ID_MINOR_REV_SHIFT)) & USART_ID_MINOR_REV_MASK)
-#define USART_ID_MAJOR_REV_MASK (0xF000U)
-#define USART_ID_MAJOR_REV_SHIFT (12U)
-/*! MAJOR_REV - Major revision of module implementation.
- */
-#define USART_ID_MAJOR_REV(x) (((uint32_t)(((uint32_t)(x)) << USART_ID_MAJOR_REV_SHIFT)) & USART_ID_MAJOR_REV_MASK)
-#define USART_ID_ID_MASK (0xFFFF0000U)
-#define USART_ID_ID_SHIFT (16U)
-/*! ID - Module identifier for the selected function.
- */
-#define USART_ID_ID(x) (((uint32_t)(((uint32_t)(x)) << USART_ID_ID_SHIFT)) & USART_ID_ID_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group USART_Register_Masks */
-
-
-/* USART - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral USART0 base address */
- #define USART0_BASE (0x50086000u)
- /** Peripheral USART0 base address */
- #define USART0_BASE_NS (0x40086000u)
- /** Peripheral USART0 base pointer */
- #define USART0 ((USART_Type *)USART0_BASE)
- /** Peripheral USART0 base pointer */
- #define USART0_NS ((USART_Type *)USART0_BASE_NS)
- /** Peripheral USART1 base address */
- #define USART1_BASE (0x50087000u)
- /** Peripheral USART1 base address */
- #define USART1_BASE_NS (0x40087000u)
- /** Peripheral USART1 base pointer */
- #define USART1 ((USART_Type *)USART1_BASE)
- /** Peripheral USART1 base pointer */
- #define USART1_NS ((USART_Type *)USART1_BASE_NS)
- /** Peripheral USART2 base address */
- #define USART2_BASE (0x50088000u)
- /** Peripheral USART2 base address */
- #define USART2_BASE_NS (0x40088000u)
- /** Peripheral USART2 base pointer */
- #define USART2 ((USART_Type *)USART2_BASE)
- /** Peripheral USART2 base pointer */
- #define USART2_NS ((USART_Type *)USART2_BASE_NS)
- /** Peripheral USART3 base address */
- #define USART3_BASE (0x50089000u)
- /** Peripheral USART3 base address */
- #define USART3_BASE_NS (0x40089000u)
- /** Peripheral USART3 base pointer */
- #define USART3 ((USART_Type *)USART3_BASE)
- /** Peripheral USART3 base pointer */
- #define USART3_NS ((USART_Type *)USART3_BASE_NS)
- /** Peripheral USART4 base address */
- #define USART4_BASE (0x5008A000u)
- /** Peripheral USART4 base address */
- #define USART4_BASE_NS (0x4008A000u)
- /** Peripheral USART4 base pointer */
- #define USART4 ((USART_Type *)USART4_BASE)
- /** Peripheral USART4 base pointer */
- #define USART4_NS ((USART_Type *)USART4_BASE_NS)
- /** Peripheral USART5 base address */
- #define USART5_BASE (0x50096000u)
- /** Peripheral USART5 base address */
- #define USART5_BASE_NS (0x40096000u)
- /** Peripheral USART5 base pointer */
- #define USART5 ((USART_Type *)USART5_BASE)
- /** Peripheral USART5 base pointer */
- #define USART5_NS ((USART_Type *)USART5_BASE_NS)
- /** Peripheral USART6 base address */
- #define USART6_BASE (0x50097000u)
- /** Peripheral USART6 base address */
- #define USART6_BASE_NS (0x40097000u)
- /** Peripheral USART6 base pointer */
- #define USART6 ((USART_Type *)USART6_BASE)
- /** Peripheral USART6 base pointer */
- #define USART6_NS ((USART_Type *)USART6_BASE_NS)
- /** Peripheral USART7 base address */
- #define USART7_BASE (0x50098000u)
- /** Peripheral USART7 base address */
- #define USART7_BASE_NS (0x40098000u)
- /** Peripheral USART7 base pointer */
- #define USART7 ((USART_Type *)USART7_BASE)
- /** Peripheral USART7 base pointer */
- #define USART7_NS ((USART_Type *)USART7_BASE_NS)
- /** Array initializer of USART peripheral base addresses */
- #define USART_BASE_ADDRS { USART0_BASE, USART1_BASE, USART2_BASE, USART3_BASE, USART4_BASE, USART5_BASE, USART6_BASE, USART7_BASE }
- /** Array initializer of USART peripheral base pointers */
- #define USART_BASE_PTRS { USART0, USART1, USART2, USART3, USART4, USART5, USART6, USART7 }
- /** Array initializer of USART peripheral base addresses */
- #define USART_BASE_ADDRS_NS { USART0_BASE_NS, USART1_BASE_NS, USART2_BASE_NS, USART3_BASE_NS, USART4_BASE_NS, USART5_BASE_NS, USART6_BASE_NS, USART7_BASE_NS }
- /** Array initializer of USART peripheral base pointers */
- #define USART_BASE_PTRS_NS { USART0_NS, USART1_NS, USART2_NS, USART3_NS, USART4_NS, USART5_NS, USART6_NS, USART7_NS }
-#else
- /** Peripheral USART0 base address */
- #define USART0_BASE (0x40086000u)
- /** Peripheral USART0 base pointer */
- #define USART0 ((USART_Type *)USART0_BASE)
- /** Peripheral USART1 base address */
- #define USART1_BASE (0x40087000u)
- /** Peripheral USART1 base pointer */
- #define USART1 ((USART_Type *)USART1_BASE)
- /** Peripheral USART2 base address */
- #define USART2_BASE (0x40088000u)
- /** Peripheral USART2 base pointer */
- #define USART2 ((USART_Type *)USART2_BASE)
- /** Peripheral USART3 base address */
- #define USART3_BASE (0x40089000u)
- /** Peripheral USART3 base pointer */
- #define USART3 ((USART_Type *)USART3_BASE)
- /** Peripheral USART4 base address */
- #define USART4_BASE (0x4008A000u)
- /** Peripheral USART4 base pointer */
- #define USART4 ((USART_Type *)USART4_BASE)
- /** Peripheral USART5 base address */
- #define USART5_BASE (0x40096000u)
- /** Peripheral USART5 base pointer */
- #define USART5 ((USART_Type *)USART5_BASE)
- /** Peripheral USART6 base address */
- #define USART6_BASE (0x40097000u)
- /** Peripheral USART6 base pointer */
- #define USART6 ((USART_Type *)USART6_BASE)
- /** Peripheral USART7 base address */
- #define USART7_BASE (0x40098000u)
- /** Peripheral USART7 base pointer */
- #define USART7 ((USART_Type *)USART7_BASE)
- /** Array initializer of USART peripheral base addresses */
- #define USART_BASE_ADDRS { USART0_BASE, USART1_BASE, USART2_BASE, USART3_BASE, USART4_BASE, USART5_BASE, USART6_BASE, USART7_BASE }
- /** Array initializer of USART peripheral base pointers */
- #define USART_BASE_PTRS { USART0, USART1, USART2, USART3, USART4, USART5, USART6, USART7 }
-#endif
-/** Interrupt vectors for the USART peripheral type */
-#define USART_IRQS { FLEXCOMM0_IRQn, FLEXCOMM1_IRQn, FLEXCOMM2_IRQn, FLEXCOMM3_IRQn, FLEXCOMM4_IRQn, FLEXCOMM5_IRQn, FLEXCOMM6_IRQn, FLEXCOMM7_IRQn }
-
-/*!
- * @}
- */ /* end of group USART_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- USB Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USB_Peripheral_Access_Layer USB Peripheral Access Layer
- * @{
- */
-
-/** USB - Register Layout Typedef */
-typedef struct {
- __IO uint32_t DEVCMDSTAT; /**< USB Device Command/Status register, offset: 0x0 */
- __IO uint32_t INFO; /**< USB Info register, offset: 0x4 */
- __IO uint32_t EPLISTSTART; /**< USB EP Command/Status List start address, offset: 0x8 */
- __IO uint32_t DATABUFSTART; /**< USB Data buffer start address, offset: 0xC */
- __IO uint32_t LPM; /**< USB Link Power Management register, offset: 0x10 */
- __IO uint32_t EPSKIP; /**< USB Endpoint skip, offset: 0x14 */
- __IO uint32_t EPINUSE; /**< USB Endpoint Buffer in use, offset: 0x18 */
- __IO uint32_t EPBUFCFG; /**< USB Endpoint Buffer Configuration register, offset: 0x1C */
- __IO uint32_t INTSTAT; /**< USB interrupt status register, offset: 0x20 */
- __IO uint32_t INTEN; /**< USB interrupt enable register, offset: 0x24 */
- __IO uint32_t INTSETSTAT; /**< USB set interrupt status register, offset: 0x28 */
- uint8_t RESERVED_0[8];
- __IO uint32_t EPTOGGLE; /**< USB Endpoint toggle register, offset: 0x34 */
-} USB_Type;
-
-/* ----------------------------------------------------------------------------
- -- USB Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USB_Register_Masks USB Register Masks
- * @{
- */
-
-/*! @name DEVCMDSTAT - USB Device Command/Status register */
-/*! @{ */
-#define USB_DEVCMDSTAT_DEV_ADDR_MASK (0x7FU)
-#define USB_DEVCMDSTAT_DEV_ADDR_SHIFT (0U)
-/*! DEV_ADDR - USB device address. After bus reset, the address is reset to 0x00. If the enable bit
- * is set, the device will respond on packets for function address DEV_ADDR. When receiving a
- * SetAddress Control Request from the USB host, software must program the new address before
- * completing the status phase of the SetAddress Control Request.
- */
-#define USB_DEVCMDSTAT_DEV_ADDR(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DEV_ADDR_SHIFT)) & USB_DEVCMDSTAT_DEV_ADDR_MASK)
-#define USB_DEVCMDSTAT_DEV_EN_MASK (0x80U)
-#define USB_DEVCMDSTAT_DEV_EN_SHIFT (7U)
-/*! DEV_EN - USB device enable. If this bit is set, the HW will start responding on packets for function address DEV_ADDR.
- */
-#define USB_DEVCMDSTAT_DEV_EN(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DEV_EN_SHIFT)) & USB_DEVCMDSTAT_DEV_EN_MASK)
-#define USB_DEVCMDSTAT_SETUP_MASK (0x100U)
-#define USB_DEVCMDSTAT_SETUP_SHIFT (8U)
-/*! SETUP - SETUP token received. If a SETUP token is received and acknowledged by the device, this
- * bit is set. As long as this bit is set all received IN and OUT tokens will be NAKed by HW. SW
- * must clear this bit by writing a one. If this bit is zero, HW will handle the tokens to the
- * CTRL EP0 as indicated by the CTRL EP0 IN and OUT data information programmed by SW.
- */
-#define USB_DEVCMDSTAT_SETUP(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_SETUP_SHIFT)) & USB_DEVCMDSTAT_SETUP_MASK)
-#define USB_DEVCMDSTAT_FORCE_NEEDCLK_MASK (0x200U)
-#define USB_DEVCMDSTAT_FORCE_NEEDCLK_SHIFT (9U)
-/*! FORCE_NEEDCLK - Forces the NEEDCLK output to always be on:
- * 0b0..USB_NEEDCLK has normal function.
- * 0b1..USB_NEEDCLK always 1. Clock will not be stopped in case of suspend.
- */
-#define USB_DEVCMDSTAT_FORCE_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_FORCE_NEEDCLK_SHIFT)) & USB_DEVCMDSTAT_FORCE_NEEDCLK_MASK)
-#define USB_DEVCMDSTAT_LPM_SUP_MASK (0x800U)
-#define USB_DEVCMDSTAT_LPM_SUP_SHIFT (11U)
-/*! LPM_SUP - LPM Supported:
- * 0b0..LPM not supported.
- * 0b1..LPM supported.
- */
-#define USB_DEVCMDSTAT_LPM_SUP(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_LPM_SUP_SHIFT)) & USB_DEVCMDSTAT_LPM_SUP_MASK)
-#define USB_DEVCMDSTAT_INTONNAK_AO_MASK (0x1000U)
-#define USB_DEVCMDSTAT_INTONNAK_AO_SHIFT (12U)
-/*! INTONNAK_AO - Interrupt on NAK for interrupt and bulk OUT EP
- * 0b0..Only acknowledged packets generate an interrupt
- * 0b1..Both acknowledged and NAKed packets generate interrupts.
- */
-#define USB_DEVCMDSTAT_INTONNAK_AO(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_INTONNAK_AO_SHIFT)) & USB_DEVCMDSTAT_INTONNAK_AO_MASK)
-#define USB_DEVCMDSTAT_INTONNAK_AI_MASK (0x2000U)
-#define USB_DEVCMDSTAT_INTONNAK_AI_SHIFT (13U)
-/*! INTONNAK_AI - Interrupt on NAK for interrupt and bulk IN EP
- * 0b0..Only acknowledged packets generate an interrupt
- * 0b1..Both acknowledged and NAKed packets generate interrupts.
- */
-#define USB_DEVCMDSTAT_INTONNAK_AI(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_INTONNAK_AI_SHIFT)) & USB_DEVCMDSTAT_INTONNAK_AI_MASK)
-#define USB_DEVCMDSTAT_INTONNAK_CO_MASK (0x4000U)
-#define USB_DEVCMDSTAT_INTONNAK_CO_SHIFT (14U)
-/*! INTONNAK_CO - Interrupt on NAK for control OUT EP
- * 0b0..Only acknowledged packets generate an interrupt
- * 0b1..Both acknowledged and NAKed packets generate interrupts.
- */
-#define USB_DEVCMDSTAT_INTONNAK_CO(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_INTONNAK_CO_SHIFT)) & USB_DEVCMDSTAT_INTONNAK_CO_MASK)
-#define USB_DEVCMDSTAT_INTONNAK_CI_MASK (0x8000U)
-#define USB_DEVCMDSTAT_INTONNAK_CI_SHIFT (15U)
-/*! INTONNAK_CI - Interrupt on NAK for control IN EP
- * 0b0..Only acknowledged packets generate an interrupt
- * 0b1..Both acknowledged and NAKed packets generate interrupts.
- */
-#define USB_DEVCMDSTAT_INTONNAK_CI(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_INTONNAK_CI_SHIFT)) & USB_DEVCMDSTAT_INTONNAK_CI_MASK)
-#define USB_DEVCMDSTAT_DCON_MASK (0x10000U)
-#define USB_DEVCMDSTAT_DCON_SHIFT (16U)
-/*! DCON - Device status - connect. The connect bit must be set by SW to indicate that the device
- * must signal a connect. The pull-up resistor on USB_DP will be enabled when this bit is set and
- * the VBUSDEBOUNCED bit is one.
- */
-#define USB_DEVCMDSTAT_DCON(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DCON_SHIFT)) & USB_DEVCMDSTAT_DCON_MASK)
-#define USB_DEVCMDSTAT_DSUS_MASK (0x20000U)
-#define USB_DEVCMDSTAT_DSUS_SHIFT (17U)
-/*! DSUS - Device status - suspend. The suspend bit indicates the current suspend state. It is set
- * to 1 when the device hasn't seen any activity on its upstream port for more than 3
- * milliseconds. It is reset to 0 on any activity. When the device is suspended (Suspend bit DSUS = 1) and
- * the software writes a 0 to it, the device will generate a remote wake-up. This will only happen
- * when the device is connected (Connect bit = 1). When the device is not connected or not
- * suspended, a writing a 0 has no effect. Writing a 1 never has an effect.
- */
-#define USB_DEVCMDSTAT_DSUS(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DSUS_SHIFT)) & USB_DEVCMDSTAT_DSUS_MASK)
-#define USB_DEVCMDSTAT_LPM_SUS_MASK (0x80000U)
-#define USB_DEVCMDSTAT_LPM_SUS_SHIFT (19U)
-/*! LPM_SUS - Device status - LPM Suspend. This bit represents the current LPM suspend state. It is
- * set to 1 by HW when the device has acknowledged the LPM request from the USB host and the
- * Token Retry Time of 10 ms has elapsed. When the device is in the LPM suspended state (LPM suspend
- * bit = 1) and the software writes a zero to this bit, the device will generate a remote
- * walk-up. Software can only write a zero to this bit when the LPM_REWP bit is set to 1. HW resets this
- * bit when it receives a host initiated resume. HW only updates the LPM_SUS bit when the
- * LPM_SUPP bit is equal to one.
- */
-#define USB_DEVCMDSTAT_LPM_SUS(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_LPM_SUS_SHIFT)) & USB_DEVCMDSTAT_LPM_SUS_MASK)
-#define USB_DEVCMDSTAT_LPM_REWP_MASK (0x100000U)
-#define USB_DEVCMDSTAT_LPM_REWP_SHIFT (20U)
-/*! LPM_REWP - LPM Remote Wake-up Enabled by USB host. HW sets this bit to one when the bRemoteWake
- * bit in the LPM extended token is set to 1. HW will reset this bit to 0 when it receives the
- * host initiated LPM resume, when a remote wake-up is sent by the device or when a USB bus reset
- * is received. Software can use this bit to check if the remote wake-up feature is enabled by the
- * host for the LPM transaction.
- */
-#define USB_DEVCMDSTAT_LPM_REWP(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_LPM_REWP_SHIFT)) & USB_DEVCMDSTAT_LPM_REWP_MASK)
-#define USB_DEVCMDSTAT_DCON_C_MASK (0x1000000U)
-#define USB_DEVCMDSTAT_DCON_C_SHIFT (24U)
-/*! DCON_C - Device status - connect change. The Connect Change bit is set when the device's pull-up
- * resistor is disconnected because VBus disappeared. The bit is reset by writing a one to it.
- */
-#define USB_DEVCMDSTAT_DCON_C(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DCON_C_SHIFT)) & USB_DEVCMDSTAT_DCON_C_MASK)
-#define USB_DEVCMDSTAT_DSUS_C_MASK (0x2000000U)
-#define USB_DEVCMDSTAT_DSUS_C_SHIFT (25U)
-/*! DSUS_C - Device status - suspend change. The suspend change bit is set to 1 when the suspend bit
- * toggles. The suspend bit can toggle because: - The device goes in the suspended state - The
- * device is disconnected - The device receives resume signaling on its upstream port. The bit is
- * reset by writing a one to it.
- */
-#define USB_DEVCMDSTAT_DSUS_C(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DSUS_C_SHIFT)) & USB_DEVCMDSTAT_DSUS_C_MASK)
-#define USB_DEVCMDSTAT_DRES_C_MASK (0x4000000U)
-#define USB_DEVCMDSTAT_DRES_C_SHIFT (26U)
-/*! DRES_C - Device status - reset change. This bit is set when the device received a bus reset. On
- * a bus reset the device will automatically go to the default state (unconfigured and responding
- * to address 0). The bit is reset by writing a one to it.
- */
-#define USB_DEVCMDSTAT_DRES_C(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_DRES_C_SHIFT)) & USB_DEVCMDSTAT_DRES_C_MASK)
-#define USB_DEVCMDSTAT_VBUSDEBOUNCED_MASK (0x10000000U)
-#define USB_DEVCMDSTAT_VBUSDEBOUNCED_SHIFT (28U)
-/*! VBUSDEBOUNCED - This bit indicates if Vbus is detected or not. The bit raises immediately when
- * Vbus becomes high. It drops to zero if Vbus is low for at least 3 ms. If this bit is high and
- * the DCon bit is set, the HW will enable the pull-up resistor to signal a connect.
- */
-#define USB_DEVCMDSTAT_VBUSDEBOUNCED(x) (((uint32_t)(((uint32_t)(x)) << USB_DEVCMDSTAT_VBUSDEBOUNCED_SHIFT)) & USB_DEVCMDSTAT_VBUSDEBOUNCED_MASK)
-/*! @} */
-
-/*! @name INFO - USB Info register */
-/*! @{ */
-#define USB_INFO_FRAME_NR_MASK (0x7FFU)
-#define USB_INFO_FRAME_NR_SHIFT (0U)
-/*! FRAME_NR - Frame number. This contains the frame number of the last successfully received SOF.
- * In case no SOF was received by the device at the beginning of a frame, the frame number
- * returned is that of the last successfully received SOF. In case the SOF frame number contained a CRC
- * error, the frame number returned will be the corrupted frame number as received by the device.
- */
-#define USB_INFO_FRAME_NR(x) (((uint32_t)(((uint32_t)(x)) << USB_INFO_FRAME_NR_SHIFT)) & USB_INFO_FRAME_NR_MASK)
-#define USB_INFO_ERR_CODE_MASK (0x7800U)
-#define USB_INFO_ERR_CODE_SHIFT (11U)
-/*! ERR_CODE - The error code which last occurred:
- * 0b0000..No error
- * 0b0001..PID encoding error
- * 0b0010..PID unknown
- * 0b0011..Packet unexpected
- * 0b0100..Token CRC error
- * 0b0101..Data CRC error
- * 0b0110..Time out
- * 0b0111..Babble
- * 0b1000..Truncated EOP
- * 0b1001..Sent/Received NAK
- * 0b1010..Sent Stall
- * 0b1011..Overrun
- * 0b1100..Sent empty packet
- * 0b1101..Bitstuff error
- * 0b1110..Sync error
- * 0b1111..Wrong data toggle
- */
-#define USB_INFO_ERR_CODE(x) (((uint32_t)(((uint32_t)(x)) << USB_INFO_ERR_CODE_SHIFT)) & USB_INFO_ERR_CODE_MASK)
-#define USB_INFO_MINREV_MASK (0xFF0000U)
-#define USB_INFO_MINREV_SHIFT (16U)
-/*! MINREV - Minor Revision.
- */
-#define USB_INFO_MINREV(x) (((uint32_t)(((uint32_t)(x)) << USB_INFO_MINREV_SHIFT)) & USB_INFO_MINREV_MASK)
-#define USB_INFO_MAJREV_MASK (0xFF000000U)
-#define USB_INFO_MAJREV_SHIFT (24U)
-/*! MAJREV - Major Revision.
- */
-#define USB_INFO_MAJREV(x) (((uint32_t)(((uint32_t)(x)) << USB_INFO_MAJREV_SHIFT)) & USB_INFO_MAJREV_MASK)
-/*! @} */
-
-/*! @name EPLISTSTART - USB EP Command/Status List start address */
-/*! @{ */
-#define USB_EPLISTSTART_EP_LIST_MASK (0xFFFFFF00U)
-#define USB_EPLISTSTART_EP_LIST_SHIFT (8U)
-/*! EP_LIST - Start address of the USB EP Command/Status List.
- */
-#define USB_EPLISTSTART_EP_LIST(x) (((uint32_t)(((uint32_t)(x)) << USB_EPLISTSTART_EP_LIST_SHIFT)) & USB_EPLISTSTART_EP_LIST_MASK)
-/*! @} */
-
-/*! @name DATABUFSTART - USB Data buffer start address */
-/*! @{ */
-#define USB_DATABUFSTART_DA_BUF_MASK (0xFFC00000U)
-#define USB_DATABUFSTART_DA_BUF_SHIFT (22U)
-/*! DA_BUF - Start address of the buffer pointer page where all endpoint data buffers are located.
- */
-#define USB_DATABUFSTART_DA_BUF(x) (((uint32_t)(((uint32_t)(x)) << USB_DATABUFSTART_DA_BUF_SHIFT)) & USB_DATABUFSTART_DA_BUF_MASK)
-/*! @} */
-
-/*! @name LPM - USB Link Power Management register */
-/*! @{ */
-#define USB_LPM_HIRD_HW_MASK (0xFU)
-#define USB_LPM_HIRD_HW_SHIFT (0U)
-/*! HIRD_HW - Host Initiated Resume Duration - HW. This is the HIRD value from the last received LPM token
- */
-#define USB_LPM_HIRD_HW(x) (((uint32_t)(((uint32_t)(x)) << USB_LPM_HIRD_HW_SHIFT)) & USB_LPM_HIRD_HW_MASK)
-#define USB_LPM_HIRD_SW_MASK (0xF0U)
-#define USB_LPM_HIRD_SW_SHIFT (4U)
-/*! HIRD_SW - Host Initiated Resume Duration - SW. This is the time duration required by the USB
- * device system to come out of LPM initiated suspend after receiving the host initiated LPM resume.
- */
-#define USB_LPM_HIRD_SW(x) (((uint32_t)(((uint32_t)(x)) << USB_LPM_HIRD_SW_SHIFT)) & USB_LPM_HIRD_SW_MASK)
-#define USB_LPM_DATA_PENDING_MASK (0x100U)
-#define USB_LPM_DATA_PENDING_SHIFT (8U)
-/*! DATA_PENDING - As long as this bit is set to one and LPM supported bit is set to one, HW will
- * return a NYET handshake on every LPM token it receives. If LPM supported bit is set to one and
- * this bit is zero, HW will return an ACK handshake on every LPM token it receives. If SW has
- * still data pending and LPM is supported, it must set this bit to 1.
- */
-#define USB_LPM_DATA_PENDING(x) (((uint32_t)(((uint32_t)(x)) << USB_LPM_DATA_PENDING_SHIFT)) & USB_LPM_DATA_PENDING_MASK)
-/*! @} */
-
-/*! @name EPSKIP - USB Endpoint skip */
-/*! @{ */
-#define USB_EPSKIP_SKIP_MASK (0x3FFU)
-#define USB_EPSKIP_SKIP_SHIFT (0U)
-/*! SKIP - Endpoint skip: Writing 1 to one of these bits, will indicate to HW that it must
- * deactivate the buffer assigned to this endpoint and return control back to software. When HW has
- * deactivated the endpoint, it will clear this bit, but it will not modify the EPINUSE bit. An
- * interrupt will be generated when the Active bit goes from 1 to 0. Note: In case of double-buffering,
- * HW will only clear the Active bit of the buffer indicated by the EPINUSE bit.
- */
-#define USB_EPSKIP_SKIP(x) (((uint32_t)(((uint32_t)(x)) << USB_EPSKIP_SKIP_SHIFT)) & USB_EPSKIP_SKIP_MASK)
-/*! @} */
-
-/*! @name EPINUSE - USB Endpoint Buffer in use */
-/*! @{ */
-#define USB_EPINUSE_BUF_MASK (0x3FCU)
-#define USB_EPINUSE_BUF_SHIFT (2U)
-/*! BUF - Buffer in use: This register has one bit per physical endpoint. 0: HW is accessing buffer
- * 0. 1: HW is accessing buffer 1.
- */
-#define USB_EPINUSE_BUF(x) (((uint32_t)(((uint32_t)(x)) << USB_EPINUSE_BUF_SHIFT)) & USB_EPINUSE_BUF_MASK)
-/*! @} */
-
-/*! @name EPBUFCFG - USB Endpoint Buffer Configuration register */
-/*! @{ */
-#define USB_EPBUFCFG_BUF_SB_MASK (0x3FCU)
-#define USB_EPBUFCFG_BUF_SB_SHIFT (2U)
-/*! BUF_SB - Buffer usage: This register has one bit per physical endpoint. 0: Single-buffer. 1:
- * Double-buffer. If the bit is set to single-buffer (0), it will not toggle the corresponding
- * EPINUSE bit when it clears the active bit. If the bit is set to double-buffer (1), HW will toggle
- * the EPINUSE bit when it clears the Active bit for the buffer.
- */
-#define USB_EPBUFCFG_BUF_SB(x) (((uint32_t)(((uint32_t)(x)) << USB_EPBUFCFG_BUF_SB_SHIFT)) & USB_EPBUFCFG_BUF_SB_MASK)
-/*! @} */
-
-/*! @name INTSTAT - USB interrupt status register */
-/*! @{ */
-#define USB_INTSTAT_EP0OUT_MASK (0x1U)
-#define USB_INTSTAT_EP0OUT_SHIFT (0U)
-/*! EP0OUT - Interrupt status register bit for the Control EP0 OUT direction. This bit will be set
- * if NBytes transitions to zero or the skip bit is set by software or a SETUP packet is
- * successfully received for the control EP0. If the IntOnNAK_CO is set, this bit will also be set when a
- * NAK is transmitted for the Control EP0 OUT direction. Software can clear this bit by writing a
- * one to it.
- */
-#define USB_INTSTAT_EP0OUT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP0OUT_SHIFT)) & USB_INTSTAT_EP0OUT_MASK)
-#define USB_INTSTAT_EP0IN_MASK (0x2U)
-#define USB_INTSTAT_EP0IN_SHIFT (1U)
-/*! EP0IN - Interrupt status register bit for the Control EP0 IN direction. This bit will be set if
- * NBytes transitions to zero or the skip bit is set by software. If the IntOnNAK_CI is set, this
- * bit will also be set when a NAK is transmitted for the Control EP0 IN direction. Software can
- * clear this bit by writing a one to it.
- */
-#define USB_INTSTAT_EP0IN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP0IN_SHIFT)) & USB_INTSTAT_EP0IN_MASK)
-#define USB_INTSTAT_EP1OUT_MASK (0x4U)
-#define USB_INTSTAT_EP1OUT_SHIFT (2U)
-/*! EP1OUT - Interrupt status register bit for the EP1 OUT direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes
- * transitions to zero or the skip bit is set by software. If the IntOnNAK_AO is set, this bit will also be
- * set when a NAK is transmitted for the EP1 OUT direction. Software can clear this bit by
- * writing a one to it.
- */
-#define USB_INTSTAT_EP1OUT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP1OUT_SHIFT)) & USB_INTSTAT_EP1OUT_MASK)
-#define USB_INTSTAT_EP1IN_MASK (0x8U)
-#define USB_INTSTAT_EP1IN_SHIFT (3U)
-/*! EP1IN - Interrupt status register bit for the EP1 IN direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes transitions
- * to zero or the skip bit is set by software. If the IntOnNAK_AI is set, this bit will also be
- * set when a NAK is transmitted for the EP1 IN direction. Software can clear this bit by writing
- * a one to it.
- */
-#define USB_INTSTAT_EP1IN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP1IN_SHIFT)) & USB_INTSTAT_EP1IN_MASK)
-#define USB_INTSTAT_EP2OUT_MASK (0x10U)
-#define USB_INTSTAT_EP2OUT_SHIFT (4U)
-/*! EP2OUT - Interrupt status register bit for the EP2 OUT direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes
- * transitions to zero or the skip bit is set by software. If the IntOnNAK_AO is set, this bit will also be
- * set when a NAK is transmitted for the EP2 OUT direction. Software can clear this bit by
- * writing a one to it.
- */
-#define USB_INTSTAT_EP2OUT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP2OUT_SHIFT)) & USB_INTSTAT_EP2OUT_MASK)
-#define USB_INTSTAT_EP2IN_MASK (0x20U)
-#define USB_INTSTAT_EP2IN_SHIFT (5U)
-/*! EP2IN - Interrupt status register bit for the EP2 IN direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes transitions
- * to zero or the skip bit is set by software. If the IntOnNAK_AI is set, this bit will also be
- * set when a NAK is transmitted for the EP2 IN direction. Software can clear this bit by writing
- * a one to it.
- */
-#define USB_INTSTAT_EP2IN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP2IN_SHIFT)) & USB_INTSTAT_EP2IN_MASK)
-#define USB_INTSTAT_EP3OUT_MASK (0x40U)
-#define USB_INTSTAT_EP3OUT_SHIFT (6U)
-/*! EP3OUT - Interrupt status register bit for the EP3 OUT direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes
- * transitions to zero or the skip bit is set by software. If the IntOnNAK_AO is set, this bit will also be
- * set when a NAK is transmitted for the EP3 OUT direction. Software can clear this bit by
- * writing a one to it.
- */
-#define USB_INTSTAT_EP3OUT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP3OUT_SHIFT)) & USB_INTSTAT_EP3OUT_MASK)
-#define USB_INTSTAT_EP3IN_MASK (0x80U)
-#define USB_INTSTAT_EP3IN_SHIFT (7U)
-/*! EP3IN - Interrupt status register bit for the EP3 IN direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes transitions
- * to zero or the skip bit is set by software. If the IntOnNAK_AI is set, this bit will also be
- * set when a NAK is transmitted for the EP3 IN direction. Software can clear this bit by writing
- * a one to it.
- */
-#define USB_INTSTAT_EP3IN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP3IN_SHIFT)) & USB_INTSTAT_EP3IN_MASK)
-#define USB_INTSTAT_EP4OUT_MASK (0x100U)
-#define USB_INTSTAT_EP4OUT_SHIFT (8U)
-/*! EP4OUT - Interrupt status register bit for the EP4 OUT direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes
- * transitions to zero or the skip bit is set by software. If the IntOnNAK_AO is set, this bit will also be
- * set when a NAK is transmitted for the EP4 OUT direction. Software can clear this bit by
- * writing a one to it.
- */
-#define USB_INTSTAT_EP4OUT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP4OUT_SHIFT)) & USB_INTSTAT_EP4OUT_MASK)
-#define USB_INTSTAT_EP4IN_MASK (0x200U)
-#define USB_INTSTAT_EP4IN_SHIFT (9U)
-/*! EP4IN - Interrupt status register bit for the EP4 IN direction. This bit will be set if the
- * corresponding Active bit is cleared by HW. This is done in case the programmed NBytes transitions
- * to zero or the skip bit is set by software. If the IntOnNAK_AI is set, this bit will also be
- * set when a NAK is transmitted for the EP4 IN direction. Software can clear this bit by writing
- * a one to it.
- */
-#define USB_INTSTAT_EP4IN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_EP4IN_SHIFT)) & USB_INTSTAT_EP4IN_MASK)
-#define USB_INTSTAT_FRAME_INT_MASK (0x40000000U)
-#define USB_INTSTAT_FRAME_INT_SHIFT (30U)
-/*! FRAME_INT - Frame interrupt. This bit is set to one every millisecond when the VbusDebounced bit
- * and the DCON bit are set. This bit can be used by software when handling isochronous
- * endpoints. Software can clear this bit by writing a one to it.
- */
-#define USB_INTSTAT_FRAME_INT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_FRAME_INT_SHIFT)) & USB_INTSTAT_FRAME_INT_MASK)
-#define USB_INTSTAT_DEV_INT_MASK (0x80000000U)
-#define USB_INTSTAT_DEV_INT_SHIFT (31U)
-/*! DEV_INT - Device status interrupt. This bit is set by HW when one of the bits in the Device
- * Status Change register are set. Software can clear this bit by writing a one to it.
- */
-#define USB_INTSTAT_DEV_INT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSTAT_DEV_INT_SHIFT)) & USB_INTSTAT_DEV_INT_MASK)
-/*! @} */
-
-/*! @name INTEN - USB interrupt enable register */
-/*! @{ */
-#define USB_INTEN_EP_INT_EN_MASK (0x3FFU)
-#define USB_INTEN_EP_INT_EN_SHIFT (0U)
-/*! EP_INT_EN - If this bit is set and the corresponding USB interrupt status bit is set, a HW
- * interrupt is generated on the interrupt line indicated by the corresponding USB interrupt routing
- * bit.
- */
-#define USB_INTEN_EP_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTEN_EP_INT_EN_SHIFT)) & USB_INTEN_EP_INT_EN_MASK)
-#define USB_INTEN_FRAME_INT_EN_MASK (0x40000000U)
-#define USB_INTEN_FRAME_INT_EN_SHIFT (30U)
-/*! FRAME_INT_EN - If this bit is set and the corresponding USB interrupt status bit is set, a HW
- * interrupt is generated on the interrupt line indicated by the corresponding USB interrupt
- * routing bit.
- */
-#define USB_INTEN_FRAME_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTEN_FRAME_INT_EN_SHIFT)) & USB_INTEN_FRAME_INT_EN_MASK)
-#define USB_INTEN_DEV_INT_EN_MASK (0x80000000U)
-#define USB_INTEN_DEV_INT_EN_SHIFT (31U)
-/*! DEV_INT_EN - If this bit is set and the corresponding USB interrupt status bit is set, a HW
- * interrupt is generated on the interrupt line indicated by the corresponding USB interrupt routing
- * bit.
- */
-#define USB_INTEN_DEV_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USB_INTEN_DEV_INT_EN_SHIFT)) & USB_INTEN_DEV_INT_EN_MASK)
-/*! @} */
-
-/*! @name INTSETSTAT - USB set interrupt status register */
-/*! @{ */
-#define USB_INTSETSTAT_EP_SET_INT_MASK (0x3FFU)
-#define USB_INTSETSTAT_EP_SET_INT_SHIFT (0U)
-/*! EP_SET_INT - If software writes a one to one of these bits, the corresponding USB interrupt
- * status bit is set. When this register is read, the same value as the USB interrupt status register
- * is returned.
- */
-#define USB_INTSETSTAT_EP_SET_INT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSETSTAT_EP_SET_INT_SHIFT)) & USB_INTSETSTAT_EP_SET_INT_MASK)
-#define USB_INTSETSTAT_FRAME_SET_INT_MASK (0x40000000U)
-#define USB_INTSETSTAT_FRAME_SET_INT_SHIFT (30U)
-/*! FRAME_SET_INT - If software writes a one to one of these bits, the corresponding USB interrupt
- * status bit is set. When this register is read, the same value as the USB interrupt status
- * register is returned.
- */
-#define USB_INTSETSTAT_FRAME_SET_INT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSETSTAT_FRAME_SET_INT_SHIFT)) & USB_INTSETSTAT_FRAME_SET_INT_MASK)
-#define USB_INTSETSTAT_DEV_SET_INT_MASK (0x80000000U)
-#define USB_INTSETSTAT_DEV_SET_INT_SHIFT (31U)
-/*! DEV_SET_INT - If software writes a one to one of these bits, the corresponding USB interrupt
- * status bit is set. When this register is read, the same value as the USB interrupt status
- * register is returned.
- */
-#define USB_INTSETSTAT_DEV_SET_INT(x) (((uint32_t)(((uint32_t)(x)) << USB_INTSETSTAT_DEV_SET_INT_SHIFT)) & USB_INTSETSTAT_DEV_SET_INT_MASK)
-/*! @} */
-
-/*! @name EPTOGGLE - USB Endpoint toggle register */
-/*! @{ */
-#define USB_EPTOGGLE_TOGGLE_MASK (0x3FFU)
-#define USB_EPTOGGLE_TOGGLE_SHIFT (0U)
-/*! TOGGLE - Endpoint data toggle: This field indicates the current value of the data toggle for the corresponding endpoint.
- */
-#define USB_EPTOGGLE_TOGGLE(x) (((uint32_t)(((uint32_t)(x)) << USB_EPTOGGLE_TOGGLE_SHIFT)) & USB_EPTOGGLE_TOGGLE_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group USB_Register_Masks */
-
-
-/* USB - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral USB0 base address */
- #define USB0_BASE (0x50084000u)
- /** Peripheral USB0 base address */
- #define USB0_BASE_NS (0x40084000u)
- /** Peripheral USB0 base pointer */
- #define USB0 ((USB_Type *)USB0_BASE)
- /** Peripheral USB0 base pointer */
- #define USB0_NS ((USB_Type *)USB0_BASE_NS)
- /** Array initializer of USB peripheral base addresses */
- #define USB_BASE_ADDRS { USB0_BASE }
- /** Array initializer of USB peripheral base pointers */
- #define USB_BASE_PTRS { USB0 }
- /** Array initializer of USB peripheral base addresses */
- #define USB_BASE_ADDRS_NS { USB0_BASE_NS }
- /** Array initializer of USB peripheral base pointers */
- #define USB_BASE_PTRS_NS { USB0_NS }
-#else
- /** Peripheral USB0 base address */
- #define USB0_BASE (0x40084000u)
- /** Peripheral USB0 base pointer */
- #define USB0 ((USB_Type *)USB0_BASE)
- /** Array initializer of USB peripheral base addresses */
- #define USB_BASE_ADDRS { USB0_BASE }
- /** Array initializer of USB peripheral base pointers */
- #define USB_BASE_PTRS { USB0 }
-#endif
-/** Interrupt vectors for the USB peripheral type */
-#define USB_IRQS { USB0_IRQn }
-#define USB_NEEDCLK_IRQS { USB0_NEEDCLK_IRQn }
-
-/*!
- * @}
- */ /* end of group USB_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- USBFSH Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBFSH_Peripheral_Access_Layer USBFSH Peripheral Access Layer
- * @{
- */
-
-/** USBFSH - Register Layout Typedef */
-typedef struct {
- __I uint32_t HCREVISION; /**< BCD representation of the version of the HCI specification that is implemented by the Host Controller (HC), offset: 0x0 */
- __IO uint32_t HCCONTROL; /**< Defines the operating modes of the HC, offset: 0x4 */
- __IO uint32_t HCCOMMANDSTATUS; /**< This register is used to receive the commands from the Host Controller Driver (HCD), offset: 0x8 */
- __IO uint32_t HCINTERRUPTSTATUS; /**< Indicates the status on various events that cause hardware interrupts by setting the appropriate bits, offset: 0xC */
- __IO uint32_t HCINTERRUPTENABLE; /**< Controls the bits in the HcInterruptStatus register and indicates which events will generate a hardware interrupt, offset: 0x10 */
- __IO uint32_t HCINTERRUPTDISABLE; /**< The bits in this register are used to disable corresponding bits in the HCInterruptStatus register and in turn disable that event leading to hardware interrupt, offset: 0x14 */
- __IO uint32_t HCHCCA; /**< Contains the physical address of the host controller communication area, offset: 0x18 */
- __I uint32_t HCPERIODCURRENTED; /**< Contains the physical address of the current isochronous or interrupt endpoint descriptor, offset: 0x1C */
- __IO uint32_t HCCONTROLHEADED; /**< Contains the physical address of the first endpoint descriptor of the control list, offset: 0x20 */
- __IO uint32_t HCCONTROLCURRENTED; /**< Contains the physical address of the current endpoint descriptor of the control list, offset: 0x24 */
- __IO uint32_t HCBULKHEADED; /**< Contains the physical address of the first endpoint descriptor of the bulk list, offset: 0x28 */
- __IO uint32_t HCBULKCURRENTED; /**< Contains the physical address of the current endpoint descriptor of the bulk list, offset: 0x2C */
- __I uint32_t HCDONEHEAD; /**< Contains the physical address of the last transfer descriptor added to the 'Done' queue, offset: 0x30 */
- __IO uint32_t HCFMINTERVAL; /**< Defines the bit time interval in a frame and the full speed maximum packet size which would not cause an overrun, offset: 0x34 */
- __I uint32_t HCFMREMAINING; /**< A 14-bit counter showing the bit time remaining in the current frame, offset: 0x38 */
- __I uint32_t HCFMNUMBER; /**< Contains a 16-bit counter and provides the timing reference among events happening in the HC and the HCD, offset: 0x3C */
- __IO uint32_t HCPERIODICSTART; /**< Contains a programmable 14-bit value which determines the earliest time HC should start processing a periodic list, offset: 0x40 */
- __IO uint32_t HCLSTHRESHOLD; /**< Contains 11-bit value which is used by the HC to determine whether to commit to transfer a maximum of 8-byte LS packet before EOF, offset: 0x44 */
- __IO uint32_t HCRHDESCRIPTORA; /**< First of the two registers which describes the characteristics of the root hub, offset: 0x48 */
- __IO uint32_t HCRHDESCRIPTORB; /**< Second of the two registers which describes the characteristics of the Root Hub, offset: 0x4C */
- __IO uint32_t HCRHSTATUS; /**< This register is divided into two parts, offset: 0x50 */
- __IO uint32_t HCRHPORTSTATUS; /**< Controls and reports the port events on a per-port basis, offset: 0x54 */
- uint8_t RESERVED_0[4];
- __IO uint32_t PORTMODE; /**< Controls the port if it is attached to the host block or the device block, offset: 0x5C */
-} USBFSH_Type;
-
-/* ----------------------------------------------------------------------------
- -- USBFSH Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBFSH_Register_Masks USBFSH Register Masks
- * @{
- */
-
-/*! @name HCREVISION - BCD representation of the version of the HCI specification that is implemented by the Host Controller (HC) */
-/*! @{ */
-#define USBFSH_HCREVISION_REV_MASK (0xFFU)
-#define USBFSH_HCREVISION_REV_SHIFT (0U)
-/*! REV - Revision.
- */
-#define USBFSH_HCREVISION_REV(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCREVISION_REV_SHIFT)) & USBFSH_HCREVISION_REV_MASK)
-/*! @} */
-
-/*! @name HCCONTROL - Defines the operating modes of the HC */
-/*! @{ */
-#define USBFSH_HCCONTROL_CBSR_MASK (0x3U)
-#define USBFSH_HCCONTROL_CBSR_SHIFT (0U)
-/*! CBSR - ControlBulkServiceRatio.
- */
-#define USBFSH_HCCONTROL_CBSR(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_CBSR_SHIFT)) & USBFSH_HCCONTROL_CBSR_MASK)
-#define USBFSH_HCCONTROL_PLE_MASK (0x4U)
-#define USBFSH_HCCONTROL_PLE_SHIFT (2U)
-/*! PLE - PeriodicListEnable.
- */
-#define USBFSH_HCCONTROL_PLE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_PLE_SHIFT)) & USBFSH_HCCONTROL_PLE_MASK)
-#define USBFSH_HCCONTROL_IE_MASK (0x8U)
-#define USBFSH_HCCONTROL_IE_SHIFT (3U)
-/*! IE - IsochronousEnable.
- */
-#define USBFSH_HCCONTROL_IE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_IE_SHIFT)) & USBFSH_HCCONTROL_IE_MASK)
-#define USBFSH_HCCONTROL_CLE_MASK (0x10U)
-#define USBFSH_HCCONTROL_CLE_SHIFT (4U)
-/*! CLE - ControlListEnable.
- */
-#define USBFSH_HCCONTROL_CLE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_CLE_SHIFT)) & USBFSH_HCCONTROL_CLE_MASK)
-#define USBFSH_HCCONTROL_BLE_MASK (0x20U)
-#define USBFSH_HCCONTROL_BLE_SHIFT (5U)
-/*! BLE - BulkListEnable This bit is set to enable the processing of the Bulk list in the next Frame.
- */
-#define USBFSH_HCCONTROL_BLE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_BLE_SHIFT)) & USBFSH_HCCONTROL_BLE_MASK)
-#define USBFSH_HCCONTROL_HCFS_MASK (0xC0U)
-#define USBFSH_HCCONTROL_HCFS_SHIFT (6U)
-/*! HCFS - HostControllerFunctionalState for USB 00b: USBRESET 01b: USBRESUME 10b: USBOPERATIONAL
- * 11b: USBSUSPEND A transition to USBOPERATIONAL from another state causes SOFgeneration to begin
- * 1 ms later.
- */
-#define USBFSH_HCCONTROL_HCFS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_HCFS_SHIFT)) & USBFSH_HCCONTROL_HCFS_MASK)
-#define USBFSH_HCCONTROL_IR_MASK (0x100U)
-#define USBFSH_HCCONTROL_IR_SHIFT (8U)
-/*! IR - InterruptRouting This bit determines the routing of interrupts generated by events registered in HcInterruptStatus.
- */
-#define USBFSH_HCCONTROL_IR(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_IR_SHIFT)) & USBFSH_HCCONTROL_IR_MASK)
-#define USBFSH_HCCONTROL_RWC_MASK (0x200U)
-#define USBFSH_HCCONTROL_RWC_SHIFT (9U)
-/*! RWC - RemoteWakeupConnected This bit indicates whether HC supports remote wake-up signaling.
- */
-#define USBFSH_HCCONTROL_RWC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_RWC_SHIFT)) & USBFSH_HCCONTROL_RWC_MASK)
-#define USBFSH_HCCONTROL_RWE_MASK (0x400U)
-#define USBFSH_HCCONTROL_RWE_SHIFT (10U)
-/*! RWE - RemoteWakeupEnable This bit is used by HCD to enable or disable the remote wake-up feature
- * upon the detection of upstream resume signaling.
- */
-#define USBFSH_HCCONTROL_RWE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROL_RWE_SHIFT)) & USBFSH_HCCONTROL_RWE_MASK)
-/*! @} */
-
-/*! @name HCCOMMANDSTATUS - This register is used to receive the commands from the Host Controller Driver (HCD) */
-/*! @{ */
-#define USBFSH_HCCOMMANDSTATUS_HCR_MASK (0x1U)
-#define USBFSH_HCCOMMANDSTATUS_HCR_SHIFT (0U)
-/*! HCR - HostControllerReset This bit is set by HCD to initiate a software reset of HC.
- */
-#define USBFSH_HCCOMMANDSTATUS_HCR(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCOMMANDSTATUS_HCR_SHIFT)) & USBFSH_HCCOMMANDSTATUS_HCR_MASK)
-#define USBFSH_HCCOMMANDSTATUS_CLF_MASK (0x2U)
-#define USBFSH_HCCOMMANDSTATUS_CLF_SHIFT (1U)
-/*! CLF - ControlListFilled This bit is used to indicate whether there are any TDs on the Control list.
- */
-#define USBFSH_HCCOMMANDSTATUS_CLF(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCOMMANDSTATUS_CLF_SHIFT)) & USBFSH_HCCOMMANDSTATUS_CLF_MASK)
-#define USBFSH_HCCOMMANDSTATUS_BLF_MASK (0x4U)
-#define USBFSH_HCCOMMANDSTATUS_BLF_SHIFT (2U)
-/*! BLF - BulkListFilled This bit is used to indicate whether there are any TDs on the Bulk list.
- */
-#define USBFSH_HCCOMMANDSTATUS_BLF(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCOMMANDSTATUS_BLF_SHIFT)) & USBFSH_HCCOMMANDSTATUS_BLF_MASK)
-#define USBFSH_HCCOMMANDSTATUS_OCR_MASK (0x8U)
-#define USBFSH_HCCOMMANDSTATUS_OCR_SHIFT (3U)
-/*! OCR - OwnershipChangeRequest This bit is set by an OS HCD to request a change of control of the HC.
- */
-#define USBFSH_HCCOMMANDSTATUS_OCR(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCOMMANDSTATUS_OCR_SHIFT)) & USBFSH_HCCOMMANDSTATUS_OCR_MASK)
-#define USBFSH_HCCOMMANDSTATUS_SOC_MASK (0xC0U)
-#define USBFSH_HCCOMMANDSTATUS_SOC_SHIFT (6U)
-/*! SOC - SchedulingOverrunCount These bits are incremented on each scheduling overrun error.
- */
-#define USBFSH_HCCOMMANDSTATUS_SOC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCOMMANDSTATUS_SOC_SHIFT)) & USBFSH_HCCOMMANDSTATUS_SOC_MASK)
-/*! @} */
-
-/*! @name HCINTERRUPTSTATUS - Indicates the status on various events that cause hardware interrupts by setting the appropriate bits */
-/*! @{ */
-#define USBFSH_HCINTERRUPTSTATUS_SO_MASK (0x1U)
-#define USBFSH_HCINTERRUPTSTATUS_SO_SHIFT (0U)
-/*! SO - SchedulingOverrun This bit is set when the USB schedule for the current Frame overruns and
- * after the update of HccaFrameNumber.
- */
-#define USBFSH_HCINTERRUPTSTATUS_SO(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_SO_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_SO_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_WDH_MASK (0x2U)
-#define USBFSH_HCINTERRUPTSTATUS_WDH_SHIFT (1U)
-/*! WDH - WritebackDoneHead This bit is set immediately after HC has written HcDoneHead to HccaDoneHead.
- */
-#define USBFSH_HCINTERRUPTSTATUS_WDH(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_WDH_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_WDH_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_SF_MASK (0x4U)
-#define USBFSH_HCINTERRUPTSTATUS_SF_SHIFT (2U)
-/*! SF - StartofFrame This bit is set by HC at each start of a frame and after the update of HccaFrameNumber.
- */
-#define USBFSH_HCINTERRUPTSTATUS_SF(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_SF_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_SF_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_RD_MASK (0x8U)
-#define USBFSH_HCINTERRUPTSTATUS_RD_SHIFT (3U)
-/*! RD - ResumeDetected This bit is set when HC detects that a device on the USB is asserting resume signaling.
- */
-#define USBFSH_HCINTERRUPTSTATUS_RD(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_RD_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_RD_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_UE_MASK (0x10U)
-#define USBFSH_HCINTERRUPTSTATUS_UE_SHIFT (4U)
-/*! UE - UnrecoverableError This bit is set when HC detects a system error not related to USB.
- */
-#define USBFSH_HCINTERRUPTSTATUS_UE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_UE_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_UE_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_FNO_MASK (0x20U)
-#define USBFSH_HCINTERRUPTSTATUS_FNO_SHIFT (5U)
-/*! FNO - FrameNumberOverflow This bit is set when the MSb of HcFmNumber (bit 15) changes value,
- * from 0 to 1 or from 1 to 0, and after HccaFrameNumber has been updated.
- */
-#define USBFSH_HCINTERRUPTSTATUS_FNO(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_FNO_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_FNO_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_RHSC_MASK (0x40U)
-#define USBFSH_HCINTERRUPTSTATUS_RHSC_SHIFT (6U)
-/*! RHSC - RootHubStatusChange This bit is set when the content of HcRhStatus or the content of any
- * of HcRhPortStatus[NumberofDownstreamPort] has changed.
- */
-#define USBFSH_HCINTERRUPTSTATUS_RHSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_RHSC_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_RHSC_MASK)
-#define USBFSH_HCINTERRUPTSTATUS_OC_MASK (0xFFFFFC00U)
-#define USBFSH_HCINTERRUPTSTATUS_OC_SHIFT (10U)
-/*! OC - OwnershipChange This bit is set by HC when HCD sets the OwnershipChangeRequest field in HcCommandStatus.
- */
-#define USBFSH_HCINTERRUPTSTATUS_OC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTSTATUS_OC_SHIFT)) & USBFSH_HCINTERRUPTSTATUS_OC_MASK)
-/*! @} */
-
-/*! @name HCINTERRUPTENABLE - Controls the bits in the HcInterruptStatus register and indicates which events will generate a hardware interrupt */
-/*! @{ */
-#define USBFSH_HCINTERRUPTENABLE_SO_MASK (0x1U)
-#define USBFSH_HCINTERRUPTENABLE_SO_SHIFT (0U)
-/*! SO - Scheduling Overrun interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_SO(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_SO_SHIFT)) & USBFSH_HCINTERRUPTENABLE_SO_MASK)
-#define USBFSH_HCINTERRUPTENABLE_WDH_MASK (0x2U)
-#define USBFSH_HCINTERRUPTENABLE_WDH_SHIFT (1U)
-/*! WDH - HcDoneHead Writeback interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_WDH(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_WDH_SHIFT)) & USBFSH_HCINTERRUPTENABLE_WDH_MASK)
-#define USBFSH_HCINTERRUPTENABLE_SF_MASK (0x4U)
-#define USBFSH_HCINTERRUPTENABLE_SF_SHIFT (2U)
-/*! SF - Start of Frame interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_SF(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_SF_SHIFT)) & USBFSH_HCINTERRUPTENABLE_SF_MASK)
-#define USBFSH_HCINTERRUPTENABLE_RD_MASK (0x8U)
-#define USBFSH_HCINTERRUPTENABLE_RD_SHIFT (3U)
-/*! RD - Resume Detect interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_RD(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_RD_SHIFT)) & USBFSH_HCINTERRUPTENABLE_RD_MASK)
-#define USBFSH_HCINTERRUPTENABLE_UE_MASK (0x10U)
-#define USBFSH_HCINTERRUPTENABLE_UE_SHIFT (4U)
-/*! UE - Unrecoverable Error interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_UE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_UE_SHIFT)) & USBFSH_HCINTERRUPTENABLE_UE_MASK)
-#define USBFSH_HCINTERRUPTENABLE_FNO_MASK (0x20U)
-#define USBFSH_HCINTERRUPTENABLE_FNO_SHIFT (5U)
-/*! FNO - Frame Number Overflow interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_FNO(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_FNO_SHIFT)) & USBFSH_HCINTERRUPTENABLE_FNO_MASK)
-#define USBFSH_HCINTERRUPTENABLE_RHSC_MASK (0x40U)
-#define USBFSH_HCINTERRUPTENABLE_RHSC_SHIFT (6U)
-/*! RHSC - Root Hub Status Change interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_RHSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_RHSC_SHIFT)) & USBFSH_HCINTERRUPTENABLE_RHSC_MASK)
-#define USBFSH_HCINTERRUPTENABLE_OC_MASK (0x40000000U)
-#define USBFSH_HCINTERRUPTENABLE_OC_SHIFT (30U)
-/*! OC - Ownership Change interrupt.
- */
-#define USBFSH_HCINTERRUPTENABLE_OC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_OC_SHIFT)) & USBFSH_HCINTERRUPTENABLE_OC_MASK)
-#define USBFSH_HCINTERRUPTENABLE_MIE_MASK (0x80000000U)
-#define USBFSH_HCINTERRUPTENABLE_MIE_SHIFT (31U)
-/*! MIE - Master Interrupt Enable.
- */
-#define USBFSH_HCINTERRUPTENABLE_MIE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTENABLE_MIE_SHIFT)) & USBFSH_HCINTERRUPTENABLE_MIE_MASK)
-/*! @} */
-
-/*! @name HCINTERRUPTDISABLE - The bits in this register are used to disable corresponding bits in the HCInterruptStatus register and in turn disable that event leading to hardware interrupt */
-/*! @{ */
-#define USBFSH_HCINTERRUPTDISABLE_SO_MASK (0x1U)
-#define USBFSH_HCINTERRUPTDISABLE_SO_SHIFT (0U)
-/*! SO - Scheduling Overrun interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_SO(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_SO_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_SO_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_WDH_MASK (0x2U)
-#define USBFSH_HCINTERRUPTDISABLE_WDH_SHIFT (1U)
-/*! WDH - HcDoneHead Writeback interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_WDH(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_WDH_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_WDH_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_SF_MASK (0x4U)
-#define USBFSH_HCINTERRUPTDISABLE_SF_SHIFT (2U)
-/*! SF - Start of Frame interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_SF(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_SF_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_SF_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_RD_MASK (0x8U)
-#define USBFSH_HCINTERRUPTDISABLE_RD_SHIFT (3U)
-/*! RD - Resume Detect interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_RD(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_RD_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_RD_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_UE_MASK (0x10U)
-#define USBFSH_HCINTERRUPTDISABLE_UE_SHIFT (4U)
-/*! UE - Unrecoverable Error interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_UE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_UE_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_UE_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_FNO_MASK (0x20U)
-#define USBFSH_HCINTERRUPTDISABLE_FNO_SHIFT (5U)
-/*! FNO - Frame Number Overflow interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_FNO(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_FNO_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_FNO_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_RHSC_MASK (0x40U)
-#define USBFSH_HCINTERRUPTDISABLE_RHSC_SHIFT (6U)
-/*! RHSC - Root Hub Status Change interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_RHSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_RHSC_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_RHSC_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_OC_MASK (0x40000000U)
-#define USBFSH_HCINTERRUPTDISABLE_OC_SHIFT (30U)
-/*! OC - Ownership Change interrupt.
- */
-#define USBFSH_HCINTERRUPTDISABLE_OC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_OC_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_OC_MASK)
-#define USBFSH_HCINTERRUPTDISABLE_MIE_MASK (0x80000000U)
-#define USBFSH_HCINTERRUPTDISABLE_MIE_SHIFT (31U)
-/*! MIE - A 0 written to this field is ignored by HC.
- */
-#define USBFSH_HCINTERRUPTDISABLE_MIE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCINTERRUPTDISABLE_MIE_SHIFT)) & USBFSH_HCINTERRUPTDISABLE_MIE_MASK)
-/*! @} */
-
-/*! @name HCHCCA - Contains the physical address of the host controller communication area */
-/*! @{ */
-#define USBFSH_HCHCCA_HCCA_MASK (0xFFFFFF00U)
-#define USBFSH_HCHCCA_HCCA_SHIFT (8U)
-/*! HCCA - Base address of the Host Controller Communication Area.
- */
-#define USBFSH_HCHCCA_HCCA(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCHCCA_HCCA_SHIFT)) & USBFSH_HCHCCA_HCCA_MASK)
-/*! @} */
-
-/*! @name HCPERIODCURRENTED - Contains the physical address of the current isochronous or interrupt endpoint descriptor */
-/*! @{ */
-#define USBFSH_HCPERIODCURRENTED_PCED_MASK (0xFFFFFFF0U)
-#define USBFSH_HCPERIODCURRENTED_PCED_SHIFT (4U)
-/*! PCED - The content of this register is updated by HC after a periodic ED is processed.
- */
-#define USBFSH_HCPERIODCURRENTED_PCED(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCPERIODCURRENTED_PCED_SHIFT)) & USBFSH_HCPERIODCURRENTED_PCED_MASK)
-/*! @} */
-
-/*! @name HCCONTROLHEADED - Contains the physical address of the first endpoint descriptor of the control list */
-/*! @{ */
-#define USBFSH_HCCONTROLHEADED_CHED_MASK (0xFFFFFFF0U)
-#define USBFSH_HCCONTROLHEADED_CHED_SHIFT (4U)
-/*! CHED - HC traverses the Control list starting with the HcControlHeadED pointer.
- */
-#define USBFSH_HCCONTROLHEADED_CHED(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROLHEADED_CHED_SHIFT)) & USBFSH_HCCONTROLHEADED_CHED_MASK)
-/*! @} */
-
-/*! @name HCCONTROLCURRENTED - Contains the physical address of the current endpoint descriptor of the control list */
-/*! @{ */
-#define USBFSH_HCCONTROLCURRENTED_CCED_MASK (0xFFFFFFF0U)
-#define USBFSH_HCCONTROLCURRENTED_CCED_SHIFT (4U)
-/*! CCED - ControlCurrentED.
- */
-#define USBFSH_HCCONTROLCURRENTED_CCED(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCCONTROLCURRENTED_CCED_SHIFT)) & USBFSH_HCCONTROLCURRENTED_CCED_MASK)
-/*! @} */
-
-/*! @name HCBULKHEADED - Contains the physical address of the first endpoint descriptor of the bulk list */
-/*! @{ */
-#define USBFSH_HCBULKHEADED_BHED_MASK (0xFFFFFFF0U)
-#define USBFSH_HCBULKHEADED_BHED_SHIFT (4U)
-/*! BHED - BulkHeadED HC traverses the bulk list starting with the HcBulkHeadED pointer.
- */
-#define USBFSH_HCBULKHEADED_BHED(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCBULKHEADED_BHED_SHIFT)) & USBFSH_HCBULKHEADED_BHED_MASK)
-/*! @} */
-
-/*! @name HCBULKCURRENTED - Contains the physical address of the current endpoint descriptor of the bulk list */
-/*! @{ */
-#define USBFSH_HCBULKCURRENTED_BCED_MASK (0xFFFFFFF0U)
-#define USBFSH_HCBULKCURRENTED_BCED_SHIFT (4U)
-/*! BCED - BulkCurrentED This is advanced to the next ED after the HC has served the current one.
- */
-#define USBFSH_HCBULKCURRENTED_BCED(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCBULKCURRENTED_BCED_SHIFT)) & USBFSH_HCBULKCURRENTED_BCED_MASK)
-/*! @} */
-
-/*! @name HCDONEHEAD - Contains the physical address of the last transfer descriptor added to the 'Done' queue */
-/*! @{ */
-#define USBFSH_HCDONEHEAD_DH_MASK (0xFFFFFFF0U)
-#define USBFSH_HCDONEHEAD_DH_SHIFT (4U)
-/*! DH - DoneHead When a TD is completed, HC writes the content of HcDoneHead to the NextTD field of the TD.
- */
-#define USBFSH_HCDONEHEAD_DH(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCDONEHEAD_DH_SHIFT)) & USBFSH_HCDONEHEAD_DH_MASK)
-/*! @} */
-
-/*! @name HCFMINTERVAL - Defines the bit time interval in a frame and the full speed maximum packet size which would not cause an overrun */
-/*! @{ */
-#define USBFSH_HCFMINTERVAL_FI_MASK (0x3FFFU)
-#define USBFSH_HCFMINTERVAL_FI_SHIFT (0U)
-/*! FI - FrameInterval This specifies the interval between two consecutive SOFs in bit times.
- */
-#define USBFSH_HCFMINTERVAL_FI(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCFMINTERVAL_FI_SHIFT)) & USBFSH_HCFMINTERVAL_FI_MASK)
-#define USBFSH_HCFMINTERVAL_FSMPS_MASK (0x7FFF0000U)
-#define USBFSH_HCFMINTERVAL_FSMPS_SHIFT (16U)
-/*! FSMPS - FSLargestDataPacket This field specifies a value which is loaded into the Largest Data
- * Packet Counter at the beginning of each frame.
- */
-#define USBFSH_HCFMINTERVAL_FSMPS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCFMINTERVAL_FSMPS_SHIFT)) & USBFSH_HCFMINTERVAL_FSMPS_MASK)
-#define USBFSH_HCFMINTERVAL_FIT_MASK (0x80000000U)
-#define USBFSH_HCFMINTERVAL_FIT_SHIFT (31U)
-/*! FIT - FrameIntervalToggle HCD toggles this bit whenever it loads a new value to FrameInterval.
- */
-#define USBFSH_HCFMINTERVAL_FIT(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCFMINTERVAL_FIT_SHIFT)) & USBFSH_HCFMINTERVAL_FIT_MASK)
-/*! @} */
-
-/*! @name HCFMREMAINING - A 14-bit counter showing the bit time remaining in the current frame */
-/*! @{ */
-#define USBFSH_HCFMREMAINING_FR_MASK (0x3FFFU)
-#define USBFSH_HCFMREMAINING_FR_SHIFT (0U)
-/*! FR - FrameRemaining This counter is decremented at each bit time.
- */
-#define USBFSH_HCFMREMAINING_FR(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCFMREMAINING_FR_SHIFT)) & USBFSH_HCFMREMAINING_FR_MASK)
-#define USBFSH_HCFMREMAINING_FRT_MASK (0x80000000U)
-#define USBFSH_HCFMREMAINING_FRT_SHIFT (31U)
-/*! FRT - FrameRemainingToggle This bit is loaded from the FrameIntervalToggle field of HcFmInterval
- * whenever FrameRemaining reaches 0.
- */
-#define USBFSH_HCFMREMAINING_FRT(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCFMREMAINING_FRT_SHIFT)) & USBFSH_HCFMREMAINING_FRT_MASK)
-/*! @} */
-
-/*! @name HCFMNUMBER - Contains a 16-bit counter and provides the timing reference among events happening in the HC and the HCD */
-/*! @{ */
-#define USBFSH_HCFMNUMBER_FN_MASK (0xFFFFU)
-#define USBFSH_HCFMNUMBER_FN_SHIFT (0U)
-/*! FN - FrameNumber This is incremented when HcFmRemaining is re-loaded.
- */
-#define USBFSH_HCFMNUMBER_FN(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCFMNUMBER_FN_SHIFT)) & USBFSH_HCFMNUMBER_FN_MASK)
-/*! @} */
-
-/*! @name HCPERIODICSTART - Contains a programmable 14-bit value which determines the earliest time HC should start processing a periodic list */
-/*! @{ */
-#define USBFSH_HCPERIODICSTART_PS_MASK (0x3FFFU)
-#define USBFSH_HCPERIODICSTART_PS_SHIFT (0U)
-/*! PS - PeriodicStart After a hardware reset, this field is cleared and then set by HCD during the HC initialization.
- */
-#define USBFSH_HCPERIODICSTART_PS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCPERIODICSTART_PS_SHIFT)) & USBFSH_HCPERIODICSTART_PS_MASK)
-/*! @} */
-
-/*! @name HCLSTHRESHOLD - Contains 11-bit value which is used by the HC to determine whether to commit to transfer a maximum of 8-byte LS packet before EOF */
-/*! @{ */
-#define USBFSH_HCLSTHRESHOLD_LST_MASK (0xFFFU)
-#define USBFSH_HCLSTHRESHOLD_LST_SHIFT (0U)
-/*! LST - LSThreshold This field contains a value which is compared to the FrameRemaining field
- * prior to initiating a Low Speed transaction.
- */
-#define USBFSH_HCLSTHRESHOLD_LST(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCLSTHRESHOLD_LST_SHIFT)) & USBFSH_HCLSTHRESHOLD_LST_MASK)
-/*! @} */
-
-/*! @name HCRHDESCRIPTORA - First of the two registers which describes the characteristics of the root hub */
-/*! @{ */
-#define USBFSH_HCRHDESCRIPTORA_NDP_MASK (0xFFU)
-#define USBFSH_HCRHDESCRIPTORA_NDP_SHIFT (0U)
-/*! NDP - NumberDownstreamPorts These bits specify the number of downstream ports supported by the root hub.
- */
-#define USBFSH_HCRHDESCRIPTORA_NDP(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_NDP_SHIFT)) & USBFSH_HCRHDESCRIPTORA_NDP_MASK)
-#define USBFSH_HCRHDESCRIPTORA_PSM_MASK (0x100U)
-#define USBFSH_HCRHDESCRIPTORA_PSM_SHIFT (8U)
-/*! PSM - PowerSwitchingMode This bit is used to specify how the power switching of the root hub ports is controlled.
- */
-#define USBFSH_HCRHDESCRIPTORA_PSM(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_PSM_SHIFT)) & USBFSH_HCRHDESCRIPTORA_PSM_MASK)
-#define USBFSH_HCRHDESCRIPTORA_NPS_MASK (0x200U)
-#define USBFSH_HCRHDESCRIPTORA_NPS_SHIFT (9U)
-/*! NPS - NoPowerSwitching These bits are used to specify whether power switching is supported or port are always powered.
- */
-#define USBFSH_HCRHDESCRIPTORA_NPS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_NPS_SHIFT)) & USBFSH_HCRHDESCRIPTORA_NPS_MASK)
-#define USBFSH_HCRHDESCRIPTORA_DT_MASK (0x400U)
-#define USBFSH_HCRHDESCRIPTORA_DT_SHIFT (10U)
-/*! DT - DeviceType This bit specifies that the root hub is not a compound device.
- */
-#define USBFSH_HCRHDESCRIPTORA_DT(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_DT_SHIFT)) & USBFSH_HCRHDESCRIPTORA_DT_MASK)
-#define USBFSH_HCRHDESCRIPTORA_OCPM_MASK (0x800U)
-#define USBFSH_HCRHDESCRIPTORA_OCPM_SHIFT (11U)
-/*! OCPM - OverCurrentProtectionMode This bit describes how the overcurrent status for the root hub ports are reported.
- */
-#define USBFSH_HCRHDESCRIPTORA_OCPM(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_OCPM_SHIFT)) & USBFSH_HCRHDESCRIPTORA_OCPM_MASK)
-#define USBFSH_HCRHDESCRIPTORA_NOCP_MASK (0x1000U)
-#define USBFSH_HCRHDESCRIPTORA_NOCP_SHIFT (12U)
-/*! NOCP - NoOverCurrentProtection This bit describes how the overcurrent status for the root hub ports are reported.
- */
-#define USBFSH_HCRHDESCRIPTORA_NOCP(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_NOCP_SHIFT)) & USBFSH_HCRHDESCRIPTORA_NOCP_MASK)
-#define USBFSH_HCRHDESCRIPTORA_POTPGT_MASK (0xFF000000U)
-#define USBFSH_HCRHDESCRIPTORA_POTPGT_SHIFT (24U)
-/*! POTPGT - PowerOnToPowerGoodTime This byte specifies the duration the HCD has to wait before
- * accessing a powered-on port of the root hub.
- */
-#define USBFSH_HCRHDESCRIPTORA_POTPGT(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORA_POTPGT_SHIFT)) & USBFSH_HCRHDESCRIPTORA_POTPGT_MASK)
-/*! @} */
-
-/*! @name HCRHDESCRIPTORB - Second of the two registers which describes the characteristics of the Root Hub */
-/*! @{ */
-#define USBFSH_HCRHDESCRIPTORB_DR_MASK (0xFFFFU)
-#define USBFSH_HCRHDESCRIPTORB_DR_SHIFT (0U)
-/*! DR - DeviceRemovable Each bit is dedicated to a port of the Root Hub.
- */
-#define USBFSH_HCRHDESCRIPTORB_DR(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORB_DR_SHIFT)) & USBFSH_HCRHDESCRIPTORB_DR_MASK)
-#define USBFSH_HCRHDESCRIPTORB_PPCM_MASK (0xFFFF0000U)
-#define USBFSH_HCRHDESCRIPTORB_PPCM_SHIFT (16U)
-/*! PPCM - PortPowerControlMask Each bit indicates if a port is affected by a global power control
- * command when PowerSwitchingMode is set.
- */
-#define USBFSH_HCRHDESCRIPTORB_PPCM(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHDESCRIPTORB_PPCM_SHIFT)) & USBFSH_HCRHDESCRIPTORB_PPCM_MASK)
-/*! @} */
-
-/*! @name HCRHSTATUS - This register is divided into two parts */
-/*! @{ */
-#define USBFSH_HCRHSTATUS_LPS_MASK (0x1U)
-#define USBFSH_HCRHSTATUS_LPS_SHIFT (0U)
-/*! LPS - (read) LocalPowerStatus The Root Hub does not support the local power status feature;
- * thus, this bit is always read as 0.
- */
-#define USBFSH_HCRHSTATUS_LPS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHSTATUS_LPS_SHIFT)) & USBFSH_HCRHSTATUS_LPS_MASK)
-#define USBFSH_HCRHSTATUS_OCI_MASK (0x2U)
-#define USBFSH_HCRHSTATUS_OCI_SHIFT (1U)
-/*! OCI - OverCurrentIndicator This bit reports overcurrent conditions when the global reporting is implemented.
- */
-#define USBFSH_HCRHSTATUS_OCI(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHSTATUS_OCI_SHIFT)) & USBFSH_HCRHSTATUS_OCI_MASK)
-#define USBFSH_HCRHSTATUS_DRWE_MASK (0x8000U)
-#define USBFSH_HCRHSTATUS_DRWE_SHIFT (15U)
-/*! DRWE - (read) DeviceRemoteWakeupEnable This bit enables a ConnectStatusChange bit as a resume
- * event, causing a USBSUSPEND to USBRESUME state transition and setting the ResumeDetected
- * interrupt.
- */
-#define USBFSH_HCRHSTATUS_DRWE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHSTATUS_DRWE_SHIFT)) & USBFSH_HCRHSTATUS_DRWE_MASK)
-#define USBFSH_HCRHSTATUS_LPSC_MASK (0x10000U)
-#define USBFSH_HCRHSTATUS_LPSC_SHIFT (16U)
-/*! LPSC - (read) LocalPowerStatusChange The root hub does not support the local power status feature.
- */
-#define USBFSH_HCRHSTATUS_LPSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHSTATUS_LPSC_SHIFT)) & USBFSH_HCRHSTATUS_LPSC_MASK)
-#define USBFSH_HCRHSTATUS_OCIC_MASK (0x20000U)
-#define USBFSH_HCRHSTATUS_OCIC_SHIFT (17U)
-/*! OCIC - OverCurrentIndicatorChange This bit is set by hardware when a change has occurred to the OCI field of this register.
- */
-#define USBFSH_HCRHSTATUS_OCIC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHSTATUS_OCIC_SHIFT)) & USBFSH_HCRHSTATUS_OCIC_MASK)
-#define USBFSH_HCRHSTATUS_CRWE_MASK (0x80000000U)
-#define USBFSH_HCRHSTATUS_CRWE_SHIFT (31U)
-/*! CRWE - (write) ClearRemoteWakeupEnable Writing a 1 clears DeviceRemoveWakeupEnable.
- */
-#define USBFSH_HCRHSTATUS_CRWE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHSTATUS_CRWE_SHIFT)) & USBFSH_HCRHSTATUS_CRWE_MASK)
-/*! @} */
-
-/*! @name HCRHPORTSTATUS - Controls and reports the port events on a per-port basis */
-/*! @{ */
-#define USBFSH_HCRHPORTSTATUS_CCS_MASK (0x1U)
-#define USBFSH_HCRHPORTSTATUS_CCS_SHIFT (0U)
-/*! CCS - (read) CurrentConnectStatus This bit reflects the current state of the downstream port.
- */
-#define USBFSH_HCRHPORTSTATUS_CCS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_CCS_SHIFT)) & USBFSH_HCRHPORTSTATUS_CCS_MASK)
-#define USBFSH_HCRHPORTSTATUS_PES_MASK (0x2U)
-#define USBFSH_HCRHPORTSTATUS_PES_SHIFT (1U)
-/*! PES - (read) PortEnableStatus This bit indicates whether the port is enabled or disabled.
- */
-#define USBFSH_HCRHPORTSTATUS_PES(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PES_SHIFT)) & USBFSH_HCRHPORTSTATUS_PES_MASK)
-#define USBFSH_HCRHPORTSTATUS_PSS_MASK (0x4U)
-#define USBFSH_HCRHPORTSTATUS_PSS_SHIFT (2U)
-/*! PSS - (read) PortSuspendStatus This bit indicates the port is suspended or in the resume sequence.
- */
-#define USBFSH_HCRHPORTSTATUS_PSS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PSS_SHIFT)) & USBFSH_HCRHPORTSTATUS_PSS_MASK)
-#define USBFSH_HCRHPORTSTATUS_POCI_MASK (0x8U)
-#define USBFSH_HCRHPORTSTATUS_POCI_SHIFT (3U)
-/*! POCI - (read) PortOverCurrentIndicator This bit is only valid when the Root Hub is configured in
- * such a way that overcurrent conditions are reported on a per-port basis.
- */
-#define USBFSH_HCRHPORTSTATUS_POCI(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_POCI_SHIFT)) & USBFSH_HCRHPORTSTATUS_POCI_MASK)
-#define USBFSH_HCRHPORTSTATUS_PRS_MASK (0x10U)
-#define USBFSH_HCRHPORTSTATUS_PRS_SHIFT (4U)
-/*! PRS - (read) PortResetStatus When this bit is set by a write to SetPortReset, port reset signaling is asserted.
- */
-#define USBFSH_HCRHPORTSTATUS_PRS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PRS_SHIFT)) & USBFSH_HCRHPORTSTATUS_PRS_MASK)
-#define USBFSH_HCRHPORTSTATUS_PPS_MASK (0x100U)
-#define USBFSH_HCRHPORTSTATUS_PPS_SHIFT (8U)
-/*! PPS - (read) PortPowerStatus This bit reflects the porta's power status, regardless of the type
- * of power switching implemented.
- */
-#define USBFSH_HCRHPORTSTATUS_PPS(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PPS_SHIFT)) & USBFSH_HCRHPORTSTATUS_PPS_MASK)
-#define USBFSH_HCRHPORTSTATUS_LSDA_MASK (0x200U)
-#define USBFSH_HCRHPORTSTATUS_LSDA_SHIFT (9U)
-/*! LSDA - (read) LowSpeedDeviceAttached This bit indicates the speed of the device attached to this port.
- */
-#define USBFSH_HCRHPORTSTATUS_LSDA(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_LSDA_SHIFT)) & USBFSH_HCRHPORTSTATUS_LSDA_MASK)
-#define USBFSH_HCRHPORTSTATUS_CSC_MASK (0x10000U)
-#define USBFSH_HCRHPORTSTATUS_CSC_SHIFT (16U)
-/*! CSC - ConnectStatusChange This bit is set whenever a connect or disconnect event occurs.
- */
-#define USBFSH_HCRHPORTSTATUS_CSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_CSC_SHIFT)) & USBFSH_HCRHPORTSTATUS_CSC_MASK)
-#define USBFSH_HCRHPORTSTATUS_PESC_MASK (0x20000U)
-#define USBFSH_HCRHPORTSTATUS_PESC_SHIFT (17U)
-/*! PESC - PortEnableStatusChange This bit is set when hardware events cause the PortEnableStatus bit to be cleared.
- */
-#define USBFSH_HCRHPORTSTATUS_PESC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PESC_SHIFT)) & USBFSH_HCRHPORTSTATUS_PESC_MASK)
-#define USBFSH_HCRHPORTSTATUS_PSSC_MASK (0x40000U)
-#define USBFSH_HCRHPORTSTATUS_PSSC_SHIFT (18U)
-/*! PSSC - PortSuspendStatusChange This bit is set when the full resume sequence is completed.
- */
-#define USBFSH_HCRHPORTSTATUS_PSSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PSSC_SHIFT)) & USBFSH_HCRHPORTSTATUS_PSSC_MASK)
-#define USBFSH_HCRHPORTSTATUS_OCIC_MASK (0x80000U)
-#define USBFSH_HCRHPORTSTATUS_OCIC_SHIFT (19U)
-/*! OCIC - PortOverCurrentIndicatorChange This bit is valid only if overcurrent conditions are reported on a per-port basis.
- */
-#define USBFSH_HCRHPORTSTATUS_OCIC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_OCIC_SHIFT)) & USBFSH_HCRHPORTSTATUS_OCIC_MASK)
-#define USBFSH_HCRHPORTSTATUS_PRSC_MASK (0x100000U)
-#define USBFSH_HCRHPORTSTATUS_PRSC_SHIFT (20U)
-/*! PRSC - PortResetStatusChange This bit is set at the end of the 10 ms port reset signal.
- */
-#define USBFSH_HCRHPORTSTATUS_PRSC(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_HCRHPORTSTATUS_PRSC_SHIFT)) & USBFSH_HCRHPORTSTATUS_PRSC_MASK)
-/*! @} */
-
-/*! @name PORTMODE - Controls the port if it is attached to the host block or the device block */
-/*! @{ */
-#define USBFSH_PORTMODE_ID_MASK (0x1U)
-#define USBFSH_PORTMODE_ID_SHIFT (0U)
-/*! ID - Port ID pin value.
- */
-#define USBFSH_PORTMODE_ID(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_PORTMODE_ID_SHIFT)) & USBFSH_PORTMODE_ID_MASK)
-#define USBFSH_PORTMODE_ID_EN_MASK (0x100U)
-#define USBFSH_PORTMODE_ID_EN_SHIFT (8U)
-/*! ID_EN - Port ID pin pull-up enable.
- */
-#define USBFSH_PORTMODE_ID_EN(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_PORTMODE_ID_EN_SHIFT)) & USBFSH_PORTMODE_ID_EN_MASK)
-#define USBFSH_PORTMODE_DEV_ENABLE_MASK (0x10000U)
-#define USBFSH_PORTMODE_DEV_ENABLE_SHIFT (16U)
-/*! DEV_ENABLE - 1: device 0: host.
- */
-#define USBFSH_PORTMODE_DEV_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBFSH_PORTMODE_DEV_ENABLE_SHIFT)) & USBFSH_PORTMODE_DEV_ENABLE_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group USBFSH_Register_Masks */
-
-
-/* USBFSH - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral USBFSH base address */
- #define USBFSH_BASE (0x500A2000u)
- /** Peripheral USBFSH base address */
- #define USBFSH_BASE_NS (0x400A2000u)
- /** Peripheral USBFSH base pointer */
- #define USBFSH ((USBFSH_Type *)USBFSH_BASE)
- /** Peripheral USBFSH base pointer */
- #define USBFSH_NS ((USBFSH_Type *)USBFSH_BASE_NS)
- /** Array initializer of USBFSH peripheral base addresses */
- #define USBFSH_BASE_ADDRS { USBFSH_BASE }
- /** Array initializer of USBFSH peripheral base pointers */
- #define USBFSH_BASE_PTRS { USBFSH }
- /** Array initializer of USBFSH peripheral base addresses */
- #define USBFSH_BASE_ADDRS_NS { USBFSH_BASE_NS }
- /** Array initializer of USBFSH peripheral base pointers */
- #define USBFSH_BASE_PTRS_NS { USBFSH_NS }
-#else
- /** Peripheral USBFSH base address */
- #define USBFSH_BASE (0x400A2000u)
- /** Peripheral USBFSH base pointer */
- #define USBFSH ((USBFSH_Type *)USBFSH_BASE)
- /** Array initializer of USBFSH peripheral base addresses */
- #define USBFSH_BASE_ADDRS { USBFSH_BASE }
- /** Array initializer of USBFSH peripheral base pointers */
- #define USBFSH_BASE_PTRS { USBFSH }
-#endif
-/** Interrupt vectors for the USBFSH peripheral type */
-#define USBFSH_IRQS { USB0_IRQn }
-#define USBFSH_NEEDCLK_IRQS { USB0_NEEDCLK_IRQn }
-
-/*!
- * @}
- */ /* end of group USBFSH_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- USBHSD Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBHSD_Peripheral_Access_Layer USBHSD Peripheral Access Layer
- * @{
- */
-
-/** USBHSD - Register Layout Typedef */
-typedef struct {
- __IO uint32_t DEVCMDSTAT; /**< USB Device Command/Status register, offset: 0x0 */
- __I uint32_t INFO; /**< USB Info register, offset: 0x4 */
- __IO uint32_t EPLISTSTART; /**< USB EP Command/Status List start address, offset: 0x8 */
- __IO uint32_t DATABUFSTART; /**< USB Data buffer start address, offset: 0xC */
- __IO uint32_t LPM; /**< USB Link Power Management register, offset: 0x10 */
- __IO uint32_t EPSKIP; /**< USB Endpoint skip, offset: 0x14 */
- __IO uint32_t EPINUSE; /**< USB Endpoint Buffer in use, offset: 0x18 */
- __IO uint32_t EPBUFCFG; /**< USB Endpoint Buffer Configuration register, offset: 0x1C */
- __IO uint32_t INTSTAT; /**< USB interrupt status register, offset: 0x20 */
- __IO uint32_t INTEN; /**< USB interrupt enable register, offset: 0x24 */
- __IO uint32_t INTSETSTAT; /**< USB set interrupt status register, offset: 0x28 */
- uint8_t RESERVED_0[8];
- __I uint32_t EPTOGGLE; /**< USB Endpoint toggle register, offset: 0x34 */
-} USBHSD_Type;
-
-/* ----------------------------------------------------------------------------
- -- USBHSD Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBHSD_Register_Masks USBHSD Register Masks
- * @{
- */
-
-/*! @name DEVCMDSTAT - USB Device Command/Status register */
-/*! @{ */
-#define USBHSD_DEVCMDSTAT_DEV_ADDR_MASK (0x7FU)
-#define USBHSD_DEVCMDSTAT_DEV_ADDR_SHIFT (0U)
-/*! DEV_ADDR - USB device address.
- */
-#define USBHSD_DEVCMDSTAT_DEV_ADDR(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DEV_ADDR_SHIFT)) & USBHSD_DEVCMDSTAT_DEV_ADDR_MASK)
-#define USBHSD_DEVCMDSTAT_DEV_EN_MASK (0x80U)
-#define USBHSD_DEVCMDSTAT_DEV_EN_SHIFT (7U)
-/*! DEV_EN - USB device enable.
- */
-#define USBHSD_DEVCMDSTAT_DEV_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DEV_EN_SHIFT)) & USBHSD_DEVCMDSTAT_DEV_EN_MASK)
-#define USBHSD_DEVCMDSTAT_SETUP_MASK (0x100U)
-#define USBHSD_DEVCMDSTAT_SETUP_SHIFT (8U)
-/*! SETUP - SETUP token received.
- */
-#define USBHSD_DEVCMDSTAT_SETUP(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_SETUP_SHIFT)) & USBHSD_DEVCMDSTAT_SETUP_MASK)
-#define USBHSD_DEVCMDSTAT_FORCE_NEEDCLK_MASK (0x200U)
-#define USBHSD_DEVCMDSTAT_FORCE_NEEDCLK_SHIFT (9U)
-/*! FORCE_NEEDCLK - Forces the NEEDCLK output to always be on:.
- */
-#define USBHSD_DEVCMDSTAT_FORCE_NEEDCLK(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_FORCE_NEEDCLK_SHIFT)) & USBHSD_DEVCMDSTAT_FORCE_NEEDCLK_MASK)
-#define USBHSD_DEVCMDSTAT_LPM_SUP_MASK (0x800U)
-#define USBHSD_DEVCMDSTAT_LPM_SUP_SHIFT (11U)
-/*! LPM_SUP - LPM Supported:.
- */
-#define USBHSD_DEVCMDSTAT_LPM_SUP(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_LPM_SUP_SHIFT)) & USBHSD_DEVCMDSTAT_LPM_SUP_MASK)
-#define USBHSD_DEVCMDSTAT_INTONNAK_AO_MASK (0x1000U)
-#define USBHSD_DEVCMDSTAT_INTONNAK_AO_SHIFT (12U)
-/*! INTONNAK_AO - Interrupt on NAK for interrupt and bulk OUT EP:.
- */
-#define USBHSD_DEVCMDSTAT_INTONNAK_AO(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_INTONNAK_AO_SHIFT)) & USBHSD_DEVCMDSTAT_INTONNAK_AO_MASK)
-#define USBHSD_DEVCMDSTAT_INTONNAK_AI_MASK (0x2000U)
-#define USBHSD_DEVCMDSTAT_INTONNAK_AI_SHIFT (13U)
-/*! INTONNAK_AI - Interrupt on NAK for interrupt and bulk IN EP:.
- */
-#define USBHSD_DEVCMDSTAT_INTONNAK_AI(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_INTONNAK_AI_SHIFT)) & USBHSD_DEVCMDSTAT_INTONNAK_AI_MASK)
-#define USBHSD_DEVCMDSTAT_INTONNAK_CO_MASK (0x4000U)
-#define USBHSD_DEVCMDSTAT_INTONNAK_CO_SHIFT (14U)
-/*! INTONNAK_CO - Interrupt on NAK for control OUT EP:.
- */
-#define USBHSD_DEVCMDSTAT_INTONNAK_CO(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_INTONNAK_CO_SHIFT)) & USBHSD_DEVCMDSTAT_INTONNAK_CO_MASK)
-#define USBHSD_DEVCMDSTAT_INTONNAK_CI_MASK (0x8000U)
-#define USBHSD_DEVCMDSTAT_INTONNAK_CI_SHIFT (15U)
-/*! INTONNAK_CI - Interrupt on NAK for control IN EP:.
- */
-#define USBHSD_DEVCMDSTAT_INTONNAK_CI(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_INTONNAK_CI_SHIFT)) & USBHSD_DEVCMDSTAT_INTONNAK_CI_MASK)
-#define USBHSD_DEVCMDSTAT_DCON_MASK (0x10000U)
-#define USBHSD_DEVCMDSTAT_DCON_SHIFT (16U)
-/*! DCON - Device status - connect.
- */
-#define USBHSD_DEVCMDSTAT_DCON(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DCON_SHIFT)) & USBHSD_DEVCMDSTAT_DCON_MASK)
-#define USBHSD_DEVCMDSTAT_DSUS_MASK (0x20000U)
-#define USBHSD_DEVCMDSTAT_DSUS_SHIFT (17U)
-/*! DSUS - Device status - suspend.
- */
-#define USBHSD_DEVCMDSTAT_DSUS(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DSUS_SHIFT)) & USBHSD_DEVCMDSTAT_DSUS_MASK)
-#define USBHSD_DEVCMDSTAT_LPM_SUS_MASK (0x80000U)
-#define USBHSD_DEVCMDSTAT_LPM_SUS_SHIFT (19U)
-/*! LPM_SUS - Device status - LPM Suspend.
- */
-#define USBHSD_DEVCMDSTAT_LPM_SUS(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_LPM_SUS_SHIFT)) & USBHSD_DEVCMDSTAT_LPM_SUS_MASK)
-#define USBHSD_DEVCMDSTAT_LPM_REWP_MASK (0x100000U)
-#define USBHSD_DEVCMDSTAT_LPM_REWP_SHIFT (20U)
-/*! LPM_REWP - LPM Remote Wake-up Enabled by USB host.
- */
-#define USBHSD_DEVCMDSTAT_LPM_REWP(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_LPM_REWP_SHIFT)) & USBHSD_DEVCMDSTAT_LPM_REWP_MASK)
-#define USBHSD_DEVCMDSTAT_Speed_MASK (0xC00000U)
-#define USBHSD_DEVCMDSTAT_Speed_SHIFT (22U)
-/*! Speed - This field indicates the speed at which the device operates: 00b: reserved 01b:
- * full-speed 10b: high-speed 11b: super-speed (reserved for future use).
- */
-#define USBHSD_DEVCMDSTAT_Speed(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_Speed_SHIFT)) & USBHSD_DEVCMDSTAT_Speed_MASK)
-#define USBHSD_DEVCMDSTAT_DCON_C_MASK (0x1000000U)
-#define USBHSD_DEVCMDSTAT_DCON_C_SHIFT (24U)
-/*! DCON_C - Device status - connect change.
- */
-#define USBHSD_DEVCMDSTAT_DCON_C(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DCON_C_SHIFT)) & USBHSD_DEVCMDSTAT_DCON_C_MASK)
-#define USBHSD_DEVCMDSTAT_DSUS_C_MASK (0x2000000U)
-#define USBHSD_DEVCMDSTAT_DSUS_C_SHIFT (25U)
-/*! DSUS_C - Device status - suspend change.
- */
-#define USBHSD_DEVCMDSTAT_DSUS_C(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DSUS_C_SHIFT)) & USBHSD_DEVCMDSTAT_DSUS_C_MASK)
-#define USBHSD_DEVCMDSTAT_DRES_C_MASK (0x4000000U)
-#define USBHSD_DEVCMDSTAT_DRES_C_SHIFT (26U)
-/*! DRES_C - Device status - reset change.
- */
-#define USBHSD_DEVCMDSTAT_DRES_C(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_DRES_C_SHIFT)) & USBHSD_DEVCMDSTAT_DRES_C_MASK)
-#define USBHSD_DEVCMDSTAT_VBUS_DEBOUNCED_MASK (0x10000000U)
-#define USBHSD_DEVCMDSTAT_VBUS_DEBOUNCED_SHIFT (28U)
-/*! VBUS_DEBOUNCED - This bit indicates if VBUS is detected or not.
- */
-#define USBHSD_DEVCMDSTAT_VBUS_DEBOUNCED(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_VBUS_DEBOUNCED_SHIFT)) & USBHSD_DEVCMDSTAT_VBUS_DEBOUNCED_MASK)
-#define USBHSD_DEVCMDSTAT_PHY_TEST_MODE_MASK (0xE0000000U)
-#define USBHSD_DEVCMDSTAT_PHY_TEST_MODE_SHIFT (29U)
-/*! PHY_TEST_MODE - This field is written by firmware to put the PHY into a test mode as defined by the USB2.0 specification
- */
-#define USBHSD_DEVCMDSTAT_PHY_TEST_MODE(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DEVCMDSTAT_PHY_TEST_MODE_SHIFT)) & USBHSD_DEVCMDSTAT_PHY_TEST_MODE_MASK)
-/*! @} */
-
-/*! @name INFO - USB Info register */
-/*! @{ */
-#define USBHSD_INFO_FRAME_NR_MASK (0x7FFU)
-#define USBHSD_INFO_FRAME_NR_SHIFT (0U)
-/*! FRAME_NR - Frame number.
- */
-#define USBHSD_INFO_FRAME_NR(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INFO_FRAME_NR_SHIFT)) & USBHSD_INFO_FRAME_NR_MASK)
-#define USBHSD_INFO_ERR_CODE_MASK (0x7800U)
-#define USBHSD_INFO_ERR_CODE_SHIFT (11U)
-/*! ERR_CODE - The error code which last occurred:.
- */
-#define USBHSD_INFO_ERR_CODE(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INFO_ERR_CODE_SHIFT)) & USBHSD_INFO_ERR_CODE_MASK)
-#define USBHSD_INFO_MINREV_MASK (0xFF0000U)
-#define USBHSD_INFO_MINREV_SHIFT (16U)
-/*! MINREV - Minor revision.
- */
-#define USBHSD_INFO_MINREV(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INFO_MINREV_SHIFT)) & USBHSD_INFO_MINREV_MASK)
-#define USBHSD_INFO_MAJREV_MASK (0xFF000000U)
-#define USBHSD_INFO_MAJREV_SHIFT (24U)
-/*! MAJREV - Major revision.
- */
-#define USBHSD_INFO_MAJREV(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INFO_MAJREV_SHIFT)) & USBHSD_INFO_MAJREV_MASK)
-/*! @} */
-
-/*! @name EPLISTSTART - USB EP Command/Status List start address */
-/*! @{ */
-#define USBHSD_EPLISTSTART_EP_LIST_PRG_MASK (0xFFF00U)
-#define USBHSD_EPLISTSTART_EP_LIST_PRG_SHIFT (8U)
-/*! EP_LIST_PRG - Programmable portion of the USB EP Command/Status List address.
- */
-#define USBHSD_EPLISTSTART_EP_LIST_PRG(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_EPLISTSTART_EP_LIST_PRG_SHIFT)) & USBHSD_EPLISTSTART_EP_LIST_PRG_MASK)
-#define USBHSD_EPLISTSTART_EP_LIST_FIXED_MASK (0xFFF00000U)
-#define USBHSD_EPLISTSTART_EP_LIST_FIXED_SHIFT (20U)
-/*! EP_LIST_FIXED - Fixed portion of USB EP Command/Status List address.
- */
-#define USBHSD_EPLISTSTART_EP_LIST_FIXED(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_EPLISTSTART_EP_LIST_FIXED_SHIFT)) & USBHSD_EPLISTSTART_EP_LIST_FIXED_MASK)
-/*! @} */
-
-/*! @name DATABUFSTART - USB Data buffer start address */
-/*! @{ */
-#define USBHSD_DATABUFSTART_DA_BUF_MASK (0xFFFFFFFFU)
-#define USBHSD_DATABUFSTART_DA_BUF_SHIFT (0U)
-/*! DA_BUF - Start address of the memory page where all endpoint data buffers are located.
- */
-#define USBHSD_DATABUFSTART_DA_BUF(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_DATABUFSTART_DA_BUF_SHIFT)) & USBHSD_DATABUFSTART_DA_BUF_MASK)
-/*! @} */
-
-/*! @name LPM - USB Link Power Management register */
-/*! @{ */
-#define USBHSD_LPM_HIRD_HW_MASK (0xFU)
-#define USBHSD_LPM_HIRD_HW_SHIFT (0U)
-/*! HIRD_HW - Host Initiated Resume Duration - HW.
- */
-#define USBHSD_LPM_HIRD_HW(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_LPM_HIRD_HW_SHIFT)) & USBHSD_LPM_HIRD_HW_MASK)
-#define USBHSD_LPM_HIRD_SW_MASK (0xF0U)
-#define USBHSD_LPM_HIRD_SW_SHIFT (4U)
-/*! HIRD_SW - Host Initiated Resume Duration - SW.
- */
-#define USBHSD_LPM_HIRD_SW(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_LPM_HIRD_SW_SHIFT)) & USBHSD_LPM_HIRD_SW_MASK)
-#define USBHSD_LPM_DATA_PENDING_MASK (0x100U)
-#define USBHSD_LPM_DATA_PENDING_SHIFT (8U)
-/*! DATA_PENDING - As long as this bit is set to one and LPM supported bit is set to one, HW will
- * return a NYET handshake on every LPM token it receives.
- */
-#define USBHSD_LPM_DATA_PENDING(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_LPM_DATA_PENDING_SHIFT)) & USBHSD_LPM_DATA_PENDING_MASK)
-/*! @} */
-
-/*! @name EPSKIP - USB Endpoint skip */
-/*! @{ */
-#define USBHSD_EPSKIP_SKIP_MASK (0xFFFU)
-#define USBHSD_EPSKIP_SKIP_SHIFT (0U)
-/*! SKIP - Endpoint skip: Writing 1 to one of these bits, will indicate to HW that it must
- * deactivate the buffer assigned to this endpoint and return control back to software.
- */
-#define USBHSD_EPSKIP_SKIP(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_EPSKIP_SKIP_SHIFT)) & USBHSD_EPSKIP_SKIP_MASK)
-/*! @} */
-
-/*! @name EPINUSE - USB Endpoint Buffer in use */
-/*! @{ */
-#define USBHSD_EPINUSE_BUF_MASK (0xFFCU)
-#define USBHSD_EPINUSE_BUF_SHIFT (2U)
-/*! BUF - Buffer in use: This register has one bit per physical endpoint.
- */
-#define USBHSD_EPINUSE_BUF(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_EPINUSE_BUF_SHIFT)) & USBHSD_EPINUSE_BUF_MASK)
-/*! @} */
-
-/*! @name EPBUFCFG - USB Endpoint Buffer Configuration register */
-/*! @{ */
-#define USBHSD_EPBUFCFG_BUF_SB_MASK (0xFFCU)
-#define USBHSD_EPBUFCFG_BUF_SB_SHIFT (2U)
-/*! BUF_SB - Buffer usage: This register has one bit per physical endpoint.
- */
-#define USBHSD_EPBUFCFG_BUF_SB(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_EPBUFCFG_BUF_SB_SHIFT)) & USBHSD_EPBUFCFG_BUF_SB_MASK)
-/*! @} */
-
-/*! @name INTSTAT - USB interrupt status register */
-/*! @{ */
-#define USBHSD_INTSTAT_EP0OUT_MASK (0x1U)
-#define USBHSD_INTSTAT_EP0OUT_SHIFT (0U)
-/*! EP0OUT - Interrupt status register bit for the Control EP0 OUT direction.
- */
-#define USBHSD_INTSTAT_EP0OUT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP0OUT_SHIFT)) & USBHSD_INTSTAT_EP0OUT_MASK)
-#define USBHSD_INTSTAT_EP0IN_MASK (0x2U)
-#define USBHSD_INTSTAT_EP0IN_SHIFT (1U)
-/*! EP0IN - Interrupt status register bit for the Control EP0 IN direction.
- */
-#define USBHSD_INTSTAT_EP0IN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP0IN_SHIFT)) & USBHSD_INTSTAT_EP0IN_MASK)
-#define USBHSD_INTSTAT_EP1OUT_MASK (0x4U)
-#define USBHSD_INTSTAT_EP1OUT_SHIFT (2U)
-/*! EP1OUT - Interrupt status register bit for the EP1 OUT direction.
- */
-#define USBHSD_INTSTAT_EP1OUT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP1OUT_SHIFT)) & USBHSD_INTSTAT_EP1OUT_MASK)
-#define USBHSD_INTSTAT_EP1IN_MASK (0x8U)
-#define USBHSD_INTSTAT_EP1IN_SHIFT (3U)
-/*! EP1IN - Interrupt status register bit for the EP1 IN direction.
- */
-#define USBHSD_INTSTAT_EP1IN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP1IN_SHIFT)) & USBHSD_INTSTAT_EP1IN_MASK)
-#define USBHSD_INTSTAT_EP2OUT_MASK (0x10U)
-#define USBHSD_INTSTAT_EP2OUT_SHIFT (4U)
-/*! EP2OUT - Interrupt status register bit for the EP2 OUT direction.
- */
-#define USBHSD_INTSTAT_EP2OUT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP2OUT_SHIFT)) & USBHSD_INTSTAT_EP2OUT_MASK)
-#define USBHSD_INTSTAT_EP2IN_MASK (0x20U)
-#define USBHSD_INTSTAT_EP2IN_SHIFT (5U)
-/*! EP2IN - Interrupt status register bit for the EP2 IN direction.
- */
-#define USBHSD_INTSTAT_EP2IN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP2IN_SHIFT)) & USBHSD_INTSTAT_EP2IN_MASK)
-#define USBHSD_INTSTAT_EP3OUT_MASK (0x40U)
-#define USBHSD_INTSTAT_EP3OUT_SHIFT (6U)
-/*! EP3OUT - Interrupt status register bit for the EP3 OUT direction.
- */
-#define USBHSD_INTSTAT_EP3OUT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP3OUT_SHIFT)) & USBHSD_INTSTAT_EP3OUT_MASK)
-#define USBHSD_INTSTAT_EP3IN_MASK (0x80U)
-#define USBHSD_INTSTAT_EP3IN_SHIFT (7U)
-/*! EP3IN - Interrupt status register bit for the EP3 IN direction.
- */
-#define USBHSD_INTSTAT_EP3IN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP3IN_SHIFT)) & USBHSD_INTSTAT_EP3IN_MASK)
-#define USBHSD_INTSTAT_EP4OUT_MASK (0x100U)
-#define USBHSD_INTSTAT_EP4OUT_SHIFT (8U)
-/*! EP4OUT - Interrupt status register bit for the EP4 OUT direction.
- */
-#define USBHSD_INTSTAT_EP4OUT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP4OUT_SHIFT)) & USBHSD_INTSTAT_EP4OUT_MASK)
-#define USBHSD_INTSTAT_EP4IN_MASK (0x200U)
-#define USBHSD_INTSTAT_EP4IN_SHIFT (9U)
-/*! EP4IN - Interrupt status register bit for the EP4 IN direction.
- */
-#define USBHSD_INTSTAT_EP4IN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP4IN_SHIFT)) & USBHSD_INTSTAT_EP4IN_MASK)
-#define USBHSD_INTSTAT_EP5OUT_MASK (0x400U)
-#define USBHSD_INTSTAT_EP5OUT_SHIFT (10U)
-/*! EP5OUT - Interrupt status register bit for the EP5 OUT direction.
- */
-#define USBHSD_INTSTAT_EP5OUT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP5OUT_SHIFT)) & USBHSD_INTSTAT_EP5OUT_MASK)
-#define USBHSD_INTSTAT_EP5IN_MASK (0x800U)
-#define USBHSD_INTSTAT_EP5IN_SHIFT (11U)
-/*! EP5IN - Interrupt status register bit for the EP5 IN direction.
- */
-#define USBHSD_INTSTAT_EP5IN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_EP5IN_SHIFT)) & USBHSD_INTSTAT_EP5IN_MASK)
-#define USBHSD_INTSTAT_FRAME_INT_MASK (0x40000000U)
-#define USBHSD_INTSTAT_FRAME_INT_SHIFT (30U)
-/*! FRAME_INT - Frame interrupt.
- */
-#define USBHSD_INTSTAT_FRAME_INT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_FRAME_INT_SHIFT)) & USBHSD_INTSTAT_FRAME_INT_MASK)
-#define USBHSD_INTSTAT_DEV_INT_MASK (0x80000000U)
-#define USBHSD_INTSTAT_DEV_INT_SHIFT (31U)
-/*! DEV_INT - Device status interrupt.
- */
-#define USBHSD_INTSTAT_DEV_INT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSTAT_DEV_INT_SHIFT)) & USBHSD_INTSTAT_DEV_INT_MASK)
-/*! @} */
-
-/*! @name INTEN - USB interrupt enable register */
-/*! @{ */
-#define USBHSD_INTEN_EP_INT_EN_MASK (0xFFFU)
-#define USBHSD_INTEN_EP_INT_EN_SHIFT (0U)
-/*! EP_INT_EN - If this bit is set and the corresponding USB interrupt status bit is set, a HW
- * interrupt is generated on the interrupt line.
- */
-#define USBHSD_INTEN_EP_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTEN_EP_INT_EN_SHIFT)) & USBHSD_INTEN_EP_INT_EN_MASK)
-#define USBHSD_INTEN_FRAME_INT_EN_MASK (0x40000000U)
-#define USBHSD_INTEN_FRAME_INT_EN_SHIFT (30U)
-/*! FRAME_INT_EN - If this bit is set and the corresponding USB interrupt status bit is set, a HW
- * interrupt is generated on the interrupt line.
- */
-#define USBHSD_INTEN_FRAME_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTEN_FRAME_INT_EN_SHIFT)) & USBHSD_INTEN_FRAME_INT_EN_MASK)
-#define USBHSD_INTEN_DEV_INT_EN_MASK (0x80000000U)
-#define USBHSD_INTEN_DEV_INT_EN_SHIFT (31U)
-/*! DEV_INT_EN - If this bit is set and the corresponding USB interrupt status bit is set, a HW
- * interrupt is generated on the interrupt line.
- */
-#define USBHSD_INTEN_DEV_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTEN_DEV_INT_EN_SHIFT)) & USBHSD_INTEN_DEV_INT_EN_MASK)
-/*! @} */
-
-/*! @name INTSETSTAT - USB set interrupt status register */
-/*! @{ */
-#define USBHSD_INTSETSTAT_EP_SET_INT_MASK (0xFFFU)
-#define USBHSD_INTSETSTAT_EP_SET_INT_SHIFT (0U)
-/*! EP_SET_INT - If software writes a one to one of these bits, the corresponding USB interrupt status bit is set.
- */
-#define USBHSD_INTSETSTAT_EP_SET_INT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSETSTAT_EP_SET_INT_SHIFT)) & USBHSD_INTSETSTAT_EP_SET_INT_MASK)
-#define USBHSD_INTSETSTAT_FRAME_SET_INT_MASK (0x40000000U)
-#define USBHSD_INTSETSTAT_FRAME_SET_INT_SHIFT (30U)
-/*! FRAME_SET_INT - If software writes a one to one of these bits, the corresponding USB interrupt status bit is set.
- */
-#define USBHSD_INTSETSTAT_FRAME_SET_INT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSETSTAT_FRAME_SET_INT_SHIFT)) & USBHSD_INTSETSTAT_FRAME_SET_INT_MASK)
-#define USBHSD_INTSETSTAT_DEV_SET_INT_MASK (0x80000000U)
-#define USBHSD_INTSETSTAT_DEV_SET_INT_SHIFT (31U)
-/*! DEV_SET_INT - If software writes a one to one of these bits, the corresponding USB interrupt status bit is set.
- */
-#define USBHSD_INTSETSTAT_DEV_SET_INT(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_INTSETSTAT_DEV_SET_INT_SHIFT)) & USBHSD_INTSETSTAT_DEV_SET_INT_MASK)
-/*! @} */
-
-/*! @name EPTOGGLE - USB Endpoint toggle register */
-/*! @{ */
-#define USBHSD_EPTOGGLE_TOGGLE_MASK (0x3FFFFFFFU)
-#define USBHSD_EPTOGGLE_TOGGLE_SHIFT (0U)
-/*! TOGGLE - Endpoint data toggle: This field indicates the current value of the data toggle for the corresponding endpoint.
- */
-#define USBHSD_EPTOGGLE_TOGGLE(x) (((uint32_t)(((uint32_t)(x)) << USBHSD_EPTOGGLE_TOGGLE_SHIFT)) & USBHSD_EPTOGGLE_TOGGLE_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group USBHSD_Register_Masks */
-
-
-/* USBHSD - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral USBHSD base address */
- #define USBHSD_BASE (0x50094000u)
- /** Peripheral USBHSD base address */
- #define USBHSD_BASE_NS (0x40094000u)
- /** Peripheral USBHSD base pointer */
- #define USBHSD ((USBHSD_Type *)USBHSD_BASE)
- /** Peripheral USBHSD base pointer */
- #define USBHSD_NS ((USBHSD_Type *)USBHSD_BASE_NS)
- /** Array initializer of USBHSD peripheral base addresses */
- #define USBHSD_BASE_ADDRS { USBHSD_BASE }
- /** Array initializer of USBHSD peripheral base pointers */
- #define USBHSD_BASE_PTRS { USBHSD }
- /** Array initializer of USBHSD peripheral base addresses */
- #define USBHSD_BASE_ADDRS_NS { USBHSD_BASE_NS }
- /** Array initializer of USBHSD peripheral base pointers */
- #define USBHSD_BASE_PTRS_NS { USBHSD_NS }
-#else
- /** Peripheral USBHSD base address */
- #define USBHSD_BASE (0x40094000u)
- /** Peripheral USBHSD base pointer */
- #define USBHSD ((USBHSD_Type *)USBHSD_BASE)
- /** Array initializer of USBHSD peripheral base addresses */
- #define USBHSD_BASE_ADDRS { USBHSD_BASE }
- /** Array initializer of USBHSD peripheral base pointers */
- #define USBHSD_BASE_PTRS { USBHSD }
-#endif
-/** Interrupt vectors for the USBHSD peripheral type */
-#define USBHSD_IRQS { USB1_IRQn }
-#define USBHSD_NEEDCLK_IRQS { USB1_NEEDCLK_IRQn }
-
-/*!
- * @}
- */ /* end of group USBHSD_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- USBHSH Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBHSH_Peripheral_Access_Layer USBHSH Peripheral Access Layer
- * @{
- */
-
-/** USBHSH - Register Layout Typedef */
-typedef struct {
- __I uint32_t CAPLENGTH_CHIPID; /**< This register contains the offset value towards the start of the operational register space and the version number of the IP block, offset: 0x0 */
- __I uint32_t HCSPARAMS; /**< Host Controller Structural Parameters, offset: 0x4 */
- uint8_t RESERVED_0[4];
- __IO uint32_t FLADJ_FRINDEX; /**< Frame Length Adjustment, offset: 0xC */
- __IO uint32_t ATLPTD; /**< Memory base address where ATL PTD0 is stored, offset: 0x10 */
- __IO uint32_t ISOPTD; /**< Memory base address where ISO PTD0 is stored, offset: 0x14 */
- __IO uint32_t INTPTD; /**< Memory base address where INT PTD0 is stored, offset: 0x18 */
- __IO uint32_t DATAPAYLOAD; /**< Memory base address that indicates the start of the data payload buffers, offset: 0x1C */
- __IO uint32_t USBCMD; /**< USB Command register, offset: 0x20 */
- __IO uint32_t USBSTS; /**< USB Interrupt Status register, offset: 0x24 */
- __IO uint32_t USBINTR; /**< USB Interrupt Enable register, offset: 0x28 */
- __IO uint32_t PORTSC1; /**< Port Status and Control register, offset: 0x2C */
- __IO uint32_t ATLPTDD; /**< Done map for each ATL PTD, offset: 0x30 */
- __IO uint32_t ATLPTDS; /**< Skip map for each ATL PTD, offset: 0x34 */
- __IO uint32_t ISOPTDD; /**< Done map for each ISO PTD, offset: 0x38 */
- __IO uint32_t ISOPTDS; /**< Skip map for each ISO PTD, offset: 0x3C */
- __IO uint32_t INTPTDD; /**< Done map for each INT PTD, offset: 0x40 */
- __IO uint32_t INTPTDS; /**< Skip map for each INT PTD, offset: 0x44 */
- __IO uint32_t LASTPTD; /**< Marks the last PTD in the list for ISO, INT and ATL, offset: 0x48 */
- uint8_t RESERVED_1[4];
- __IO uint32_t PORTMODE; /**< Controls the port if it is attached to the host block or the device block, offset: 0x50 */
-} USBHSH_Type;
-
-/* ----------------------------------------------------------------------------
- -- USBHSH Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBHSH_Register_Masks USBHSH Register Masks
- * @{
- */
-
-/*! @name CAPLENGTH_CHIPID - This register contains the offset value towards the start of the operational register space and the version number of the IP block */
-/*! @{ */
-#define USBHSH_CAPLENGTH_CHIPID_CAPLENGTH_MASK (0xFFU)
-#define USBHSH_CAPLENGTH_CHIPID_CAPLENGTH_SHIFT (0U)
-/*! CAPLENGTH - Capability Length: This is used as an offset.
- */
-#define USBHSH_CAPLENGTH_CHIPID_CAPLENGTH(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_CAPLENGTH_CHIPID_CAPLENGTH_SHIFT)) & USBHSH_CAPLENGTH_CHIPID_CAPLENGTH_MASK)
-#define USBHSH_CAPLENGTH_CHIPID_CHIPID_MASK (0xFFFF0000U)
-#define USBHSH_CAPLENGTH_CHIPID_CHIPID_SHIFT (16U)
-/*! CHIPID - Chip identification: indicates major and minor revision of the IP: [31:24] = Major
- * revision [23:16] = Minor revision Major revisions used: 0x01: USB2.
- */
-#define USBHSH_CAPLENGTH_CHIPID_CHIPID(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_CAPLENGTH_CHIPID_CHIPID_SHIFT)) & USBHSH_CAPLENGTH_CHIPID_CHIPID_MASK)
-/*! @} */
-
-/*! @name HCSPARAMS - Host Controller Structural Parameters */
-/*! @{ */
-#define USBHSH_HCSPARAMS_N_PORTS_MASK (0xFU)
-#define USBHSH_HCSPARAMS_N_PORTS_SHIFT (0U)
-/*! N_PORTS - This register specifies the number of physical downstream ports implemented on this host controller.
- */
-#define USBHSH_HCSPARAMS_N_PORTS(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_HCSPARAMS_N_PORTS_SHIFT)) & USBHSH_HCSPARAMS_N_PORTS_MASK)
-#define USBHSH_HCSPARAMS_PPC_MASK (0x10U)
-#define USBHSH_HCSPARAMS_PPC_SHIFT (4U)
-/*! PPC - This field indicates whether the host controller implementation includes port power control.
- */
-#define USBHSH_HCSPARAMS_PPC(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_HCSPARAMS_PPC_SHIFT)) & USBHSH_HCSPARAMS_PPC_MASK)
-#define USBHSH_HCSPARAMS_P_INDICATOR_MASK (0x10000U)
-#define USBHSH_HCSPARAMS_P_INDICATOR_SHIFT (16U)
-/*! P_INDICATOR - This bit indicates whether the ports support port indicator control.
- */
-#define USBHSH_HCSPARAMS_P_INDICATOR(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_HCSPARAMS_P_INDICATOR_SHIFT)) & USBHSH_HCSPARAMS_P_INDICATOR_MASK)
-/*! @} */
-
-/*! @name FLADJ_FRINDEX - Frame Length Adjustment */
-/*! @{ */
-#define USBHSH_FLADJ_FRINDEX_FLADJ_MASK (0x3FU)
-#define USBHSH_FLADJ_FRINDEX_FLADJ_SHIFT (0U)
-/*! FLADJ - Frame Length Timing Value.
- */
-#define USBHSH_FLADJ_FRINDEX_FLADJ(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_FLADJ_FRINDEX_FLADJ_SHIFT)) & USBHSH_FLADJ_FRINDEX_FLADJ_MASK)
-#define USBHSH_FLADJ_FRINDEX_FRINDEX_MASK (0x3FFF0000U)
-#define USBHSH_FLADJ_FRINDEX_FRINDEX_SHIFT (16U)
-/*! FRINDEX - Frame Index: Bits 29 to16 in this register are used for the frame number field in the SOF packet.
- */
-#define USBHSH_FLADJ_FRINDEX_FRINDEX(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_FLADJ_FRINDEX_FRINDEX_SHIFT)) & USBHSH_FLADJ_FRINDEX_FRINDEX_MASK)
-/*! @} */
-
-/*! @name ATLPTD - Memory base address where ATL PTD0 is stored */
-/*! @{ */
-#define USBHSH_ATLPTD_ATL_CUR_MASK (0x1F0U)
-#define USBHSH_ATLPTD_ATL_CUR_SHIFT (4U)
-/*! ATL_CUR - This indicates the current PTD that is used by the hardware when it is processing the ATL list.
- */
-#define USBHSH_ATLPTD_ATL_CUR(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ATLPTD_ATL_CUR_SHIFT)) & USBHSH_ATLPTD_ATL_CUR_MASK)
-#define USBHSH_ATLPTD_ATL_BASE_MASK (0xFFFFFE00U)
-#define USBHSH_ATLPTD_ATL_BASE_SHIFT (9U)
-/*! ATL_BASE - Base address to be used by the hardware to find the start of the ATL list.
- */
-#define USBHSH_ATLPTD_ATL_BASE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ATLPTD_ATL_BASE_SHIFT)) & USBHSH_ATLPTD_ATL_BASE_MASK)
-/*! @} */
-
-/*! @name ISOPTD - Memory base address where ISO PTD0 is stored */
-/*! @{ */
-#define USBHSH_ISOPTD_ISO_FIRST_MASK (0x3E0U)
-#define USBHSH_ISOPTD_ISO_FIRST_SHIFT (5U)
-/*! ISO_FIRST - This indicates the first PTD that is used by the hardware when it is processing the ISO list.
- */
-#define USBHSH_ISOPTD_ISO_FIRST(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ISOPTD_ISO_FIRST_SHIFT)) & USBHSH_ISOPTD_ISO_FIRST_MASK)
-#define USBHSH_ISOPTD_ISO_BASE_MASK (0xFFFFFC00U)
-#define USBHSH_ISOPTD_ISO_BASE_SHIFT (10U)
-/*! ISO_BASE - Base address to be used by the hardware to find the start of the ISO list.
- */
-#define USBHSH_ISOPTD_ISO_BASE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ISOPTD_ISO_BASE_SHIFT)) & USBHSH_ISOPTD_ISO_BASE_MASK)
-/*! @} */
-
-/*! @name INTPTD - Memory base address where INT PTD0 is stored */
-/*! @{ */
-#define USBHSH_INTPTD_INT_FIRST_MASK (0x3E0U)
-#define USBHSH_INTPTD_INT_FIRST_SHIFT (5U)
-/*! INT_FIRST - This indicates the first PTD that is used by the hardware when it is processing the INT list.
- */
-#define USBHSH_INTPTD_INT_FIRST(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_INTPTD_INT_FIRST_SHIFT)) & USBHSH_INTPTD_INT_FIRST_MASK)
-#define USBHSH_INTPTD_INT_BASE_MASK (0xFFFFFC00U)
-#define USBHSH_INTPTD_INT_BASE_SHIFT (10U)
-/*! INT_BASE - Base address to be used by the hardware to find the start of the INT list.
- */
-#define USBHSH_INTPTD_INT_BASE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_INTPTD_INT_BASE_SHIFT)) & USBHSH_INTPTD_INT_BASE_MASK)
-/*! @} */
-
-/*! @name DATAPAYLOAD - Memory base address that indicates the start of the data payload buffers */
-/*! @{ */
-#define USBHSH_DATAPAYLOAD_DAT_BASE_MASK (0xFFFF0000U)
-#define USBHSH_DATAPAYLOAD_DAT_BASE_SHIFT (16U)
-/*! DAT_BASE - Base address to be used by the hardware to find the start of the data payload section.
- */
-#define USBHSH_DATAPAYLOAD_DAT_BASE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_DATAPAYLOAD_DAT_BASE_SHIFT)) & USBHSH_DATAPAYLOAD_DAT_BASE_MASK)
-/*! @} */
-
-/*! @name USBCMD - USB Command register */
-/*! @{ */
-#define USBHSH_USBCMD_RS_MASK (0x1U)
-#define USBHSH_USBCMD_RS_SHIFT (0U)
-/*! RS - Run/Stop: 1b = Run.
- */
-#define USBHSH_USBCMD_RS(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_RS_SHIFT)) & USBHSH_USBCMD_RS_MASK)
-#define USBHSH_USBCMD_HCRESET_MASK (0x2U)
-#define USBHSH_USBCMD_HCRESET_SHIFT (1U)
-/*! HCRESET - Host Controller Reset: This control bit is used by the software to reset the host controller.
- */
-#define USBHSH_USBCMD_HCRESET(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_HCRESET_SHIFT)) & USBHSH_USBCMD_HCRESET_MASK)
-#define USBHSH_USBCMD_FLS_MASK (0xCU)
-#define USBHSH_USBCMD_FLS_SHIFT (2U)
-/*! FLS - Frame List Size: This field specifies the size of the frame list.
- */
-#define USBHSH_USBCMD_FLS(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_FLS_SHIFT)) & USBHSH_USBCMD_FLS_MASK)
-#define USBHSH_USBCMD_LHCR_MASK (0x80U)
-#define USBHSH_USBCMD_LHCR_SHIFT (7U)
-/*! LHCR - Light Host Controller Reset: This bit allows the driver software to reset the host
- * controller without affecting the state of the ports.
- */
-#define USBHSH_USBCMD_LHCR(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_LHCR_SHIFT)) & USBHSH_USBCMD_LHCR_MASK)
-#define USBHSH_USBCMD_ATL_EN_MASK (0x100U)
-#define USBHSH_USBCMD_ATL_EN_SHIFT (8U)
-/*! ATL_EN - ATL List enabled.
- */
-#define USBHSH_USBCMD_ATL_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_ATL_EN_SHIFT)) & USBHSH_USBCMD_ATL_EN_MASK)
-#define USBHSH_USBCMD_ISO_EN_MASK (0x200U)
-#define USBHSH_USBCMD_ISO_EN_SHIFT (9U)
-/*! ISO_EN - ISO List enabled.
- */
-#define USBHSH_USBCMD_ISO_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_ISO_EN_SHIFT)) & USBHSH_USBCMD_ISO_EN_MASK)
-#define USBHSH_USBCMD_INT_EN_MASK (0x400U)
-#define USBHSH_USBCMD_INT_EN_SHIFT (10U)
-/*! INT_EN - INT List enabled.
- */
-#define USBHSH_USBCMD_INT_EN(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBCMD_INT_EN_SHIFT)) & USBHSH_USBCMD_INT_EN_MASK)
-/*! @} */
-
-/*! @name USBSTS - USB Interrupt Status register */
-/*! @{ */
-#define USBHSH_USBSTS_PCD_MASK (0x4U)
-#define USBHSH_USBSTS_PCD_SHIFT (2U)
-/*! PCD - Port Change Detect: The host controller sets this bit to logic 1 when any port has a
- * change bit transition from a 0 to a one or a Force Port Resume bit transition from a 0 to a 1 as a
- * result of a J-K transition detected on a suspended port.
- */
-#define USBHSH_USBSTS_PCD(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBSTS_PCD_SHIFT)) & USBHSH_USBSTS_PCD_MASK)
-#define USBHSH_USBSTS_FLR_MASK (0x8U)
-#define USBHSH_USBSTS_FLR_SHIFT (3U)
-/*! FLR - Frame List Rollover: The host controller sets this bit to logic 1 when the frame list
- * index rolls over its maximum value to 0.
- */
-#define USBHSH_USBSTS_FLR(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBSTS_FLR_SHIFT)) & USBHSH_USBSTS_FLR_MASK)
-#define USBHSH_USBSTS_ATL_IRQ_MASK (0x10000U)
-#define USBHSH_USBSTS_ATL_IRQ_SHIFT (16U)
-/*! ATL_IRQ - ATL IRQ: Indicates that an ATL PTD (with I-bit set) was completed.
- */
-#define USBHSH_USBSTS_ATL_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBSTS_ATL_IRQ_SHIFT)) & USBHSH_USBSTS_ATL_IRQ_MASK)
-#define USBHSH_USBSTS_ISO_IRQ_MASK (0x20000U)
-#define USBHSH_USBSTS_ISO_IRQ_SHIFT (17U)
-/*! ISO_IRQ - ISO IRQ: Indicates that an ISO PTD (with I-bit set) was completed.
- */
-#define USBHSH_USBSTS_ISO_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBSTS_ISO_IRQ_SHIFT)) & USBHSH_USBSTS_ISO_IRQ_MASK)
-#define USBHSH_USBSTS_INT_IRQ_MASK (0x40000U)
-#define USBHSH_USBSTS_INT_IRQ_SHIFT (18U)
-/*! INT_IRQ - INT IRQ: Indicates that an INT PTD (with I-bit set) was completed.
- */
-#define USBHSH_USBSTS_INT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBSTS_INT_IRQ_SHIFT)) & USBHSH_USBSTS_INT_IRQ_MASK)
-#define USBHSH_USBSTS_SOF_IRQ_MASK (0x80000U)
-#define USBHSH_USBSTS_SOF_IRQ_SHIFT (19U)
-/*! SOF_IRQ - SOF interrupt: Every time when the host sends a Start of Frame token on the USB bus, this bit is set.
- */
-#define USBHSH_USBSTS_SOF_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBSTS_SOF_IRQ_SHIFT)) & USBHSH_USBSTS_SOF_IRQ_MASK)
-/*! @} */
-
-/*! @name USBINTR - USB Interrupt Enable register */
-/*! @{ */
-#define USBHSH_USBINTR_PCDE_MASK (0x4U)
-#define USBHSH_USBINTR_PCDE_SHIFT (2U)
-/*! PCDE - Port Change Detect Interrupt Enable: 1: enable 0: disable.
- */
-#define USBHSH_USBINTR_PCDE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBINTR_PCDE_SHIFT)) & USBHSH_USBINTR_PCDE_MASK)
-#define USBHSH_USBINTR_FLRE_MASK (0x8U)
-#define USBHSH_USBINTR_FLRE_SHIFT (3U)
-/*! FLRE - Frame List Rollover Interrupt Enable: 1: enable 0: disable.
- */
-#define USBHSH_USBINTR_FLRE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBINTR_FLRE_SHIFT)) & USBHSH_USBINTR_FLRE_MASK)
-#define USBHSH_USBINTR_ATL_IRQ_E_MASK (0x10000U)
-#define USBHSH_USBINTR_ATL_IRQ_E_SHIFT (16U)
-/*! ATL_IRQ_E - ATL IRQ Enable bit: 1: enable 0: disable.
- */
-#define USBHSH_USBINTR_ATL_IRQ_E(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBINTR_ATL_IRQ_E_SHIFT)) & USBHSH_USBINTR_ATL_IRQ_E_MASK)
-#define USBHSH_USBINTR_ISO_IRQ_E_MASK (0x20000U)
-#define USBHSH_USBINTR_ISO_IRQ_E_SHIFT (17U)
-/*! ISO_IRQ_E - ISO IRQ Enable bit: 1: enable 0: disable.
- */
-#define USBHSH_USBINTR_ISO_IRQ_E(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBINTR_ISO_IRQ_E_SHIFT)) & USBHSH_USBINTR_ISO_IRQ_E_MASK)
-#define USBHSH_USBINTR_INT_IRQ_E_MASK (0x40000U)
-#define USBHSH_USBINTR_INT_IRQ_E_SHIFT (18U)
-/*! INT_IRQ_E - INT IRQ Enable bit: 1: enable 0: disable.
- */
-#define USBHSH_USBINTR_INT_IRQ_E(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBINTR_INT_IRQ_E_SHIFT)) & USBHSH_USBINTR_INT_IRQ_E_MASK)
-#define USBHSH_USBINTR_SOF_E_MASK (0x80000U)
-#define USBHSH_USBINTR_SOF_E_SHIFT (19U)
-/*! SOF_E - SOF Interrupt Enable bit: 1: enable 0: disable.
- */
-#define USBHSH_USBINTR_SOF_E(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_USBINTR_SOF_E_SHIFT)) & USBHSH_USBINTR_SOF_E_MASK)
-/*! @} */
-
-/*! @name PORTSC1 - Port Status and Control register */
-/*! @{ */
-#define USBHSH_PORTSC1_CCS_MASK (0x1U)
-#define USBHSH_PORTSC1_CCS_SHIFT (0U)
-/*! CCS - Current Connect Status: Logic 1 indicates a device is present on the port.
- */
-#define USBHSH_PORTSC1_CCS(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_CCS_SHIFT)) & USBHSH_PORTSC1_CCS_MASK)
-#define USBHSH_PORTSC1_CSC_MASK (0x2U)
-#define USBHSH_PORTSC1_CSC_SHIFT (1U)
-/*! CSC - Connect Status Change: Logic 1 means that the value of CCS has changed.
- */
-#define USBHSH_PORTSC1_CSC(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_CSC_SHIFT)) & USBHSH_PORTSC1_CSC_MASK)
-#define USBHSH_PORTSC1_PED_MASK (0x4U)
-#define USBHSH_PORTSC1_PED_SHIFT (2U)
-/*! PED - Port Enabled/Disabled.
- */
-#define USBHSH_PORTSC1_PED(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PED_SHIFT)) & USBHSH_PORTSC1_PED_MASK)
-#define USBHSH_PORTSC1_PEDC_MASK (0x8U)
-#define USBHSH_PORTSC1_PEDC_SHIFT (3U)
-/*! PEDC - Port Enabled/Disabled Change: Logic 1 means that the value of PED has changed.
- */
-#define USBHSH_PORTSC1_PEDC(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PEDC_SHIFT)) & USBHSH_PORTSC1_PEDC_MASK)
-#define USBHSH_PORTSC1_OCA_MASK (0x10U)
-#define USBHSH_PORTSC1_OCA_SHIFT (4U)
-/*! OCA - Over-current active: Logic 1 means that this port has an over-current condition.
- */
-#define USBHSH_PORTSC1_OCA(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_OCA_SHIFT)) & USBHSH_PORTSC1_OCA_MASK)
-#define USBHSH_PORTSC1_OCC_MASK (0x20U)
-#define USBHSH_PORTSC1_OCC_SHIFT (5U)
-/*! OCC - Over-current change: Logic 1 means that the value of OCA has changed.
- */
-#define USBHSH_PORTSC1_OCC(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_OCC_SHIFT)) & USBHSH_PORTSC1_OCC_MASK)
-#define USBHSH_PORTSC1_FPR_MASK (0x40U)
-#define USBHSH_PORTSC1_FPR_SHIFT (6U)
-/*! FPR - Force Port Resume: Logic 1 means resume (K-state) detected or driven on the port.
- */
-#define USBHSH_PORTSC1_FPR(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_FPR_SHIFT)) & USBHSH_PORTSC1_FPR_MASK)
-#define USBHSH_PORTSC1_SUSP_MASK (0x80U)
-#define USBHSH_PORTSC1_SUSP_SHIFT (7U)
-/*! SUSP - Suspend: Logic 1 means port is in the suspend state.
- */
-#define USBHSH_PORTSC1_SUSP(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_SUSP_SHIFT)) & USBHSH_PORTSC1_SUSP_MASK)
-#define USBHSH_PORTSC1_PR_MASK (0x100U)
-#define USBHSH_PORTSC1_PR_SHIFT (8U)
-/*! PR - Port Reset: Logic 1 means the port is in the reset state.
- */
-#define USBHSH_PORTSC1_PR(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PR_SHIFT)) & USBHSH_PORTSC1_PR_MASK)
-#define USBHSH_PORTSC1_LS_MASK (0xC00U)
-#define USBHSH_PORTSC1_LS_SHIFT (10U)
-/*! LS - Line Status: This field reflects the current logical levels of the DP (bit 11) and DM (bit 10) signal lines.
- */
-#define USBHSH_PORTSC1_LS(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_LS_SHIFT)) & USBHSH_PORTSC1_LS_MASK)
-#define USBHSH_PORTSC1_PP_MASK (0x1000U)
-#define USBHSH_PORTSC1_PP_SHIFT (12U)
-/*! PP - Port Power: The function of this bit depends on the value of the Port Power Control (PPC) bit in the HCSPARAMS register.
- */
-#define USBHSH_PORTSC1_PP(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PP_SHIFT)) & USBHSH_PORTSC1_PP_MASK)
-#define USBHSH_PORTSC1_PIC_MASK (0xC000U)
-#define USBHSH_PORTSC1_PIC_SHIFT (14U)
-/*! PIC - Port Indicator Control : Writing to this field has no effect if the P_INDICATOR bit in the
- * HCSPARAMS register is logic 0.
- */
-#define USBHSH_PORTSC1_PIC(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PIC_SHIFT)) & USBHSH_PORTSC1_PIC_MASK)
-#define USBHSH_PORTSC1_PTC_MASK (0xF0000U)
-#define USBHSH_PORTSC1_PTC_SHIFT (16U)
-/*! PTC - Port Test Control: A non-zero value indicates that the port is operating in the test mode as indicated by the value.
- */
-#define USBHSH_PORTSC1_PTC(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PTC_SHIFT)) & USBHSH_PORTSC1_PTC_MASK)
-#define USBHSH_PORTSC1_PSPD_MASK (0x300000U)
-#define USBHSH_PORTSC1_PSPD_SHIFT (20U)
-/*! PSPD - Port Speed: 00b: Low-speed 01b: Full-speed 10b: High-speed 11b: Reserved.
- */
-#define USBHSH_PORTSC1_PSPD(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_PSPD_SHIFT)) & USBHSH_PORTSC1_PSPD_MASK)
-#define USBHSH_PORTSC1_WOO_MASK (0x400000U)
-#define USBHSH_PORTSC1_WOO_SHIFT (22U)
-/*! WOO - Wake on overcurrent enable: Writing this bit to a one enables the port to be sensitive to
- * overcurrent conditions as wake-up events.
- */
-#define USBHSH_PORTSC1_WOO(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTSC1_WOO_SHIFT)) & USBHSH_PORTSC1_WOO_MASK)
-/*! @} */
-
-/*! @name ATLPTDD - Done map for each ATL PTD */
-/*! @{ */
-#define USBHSH_ATLPTDD_ATL_DONE_MASK (0xFFFFFFFFU)
-#define USBHSH_ATLPTDD_ATL_DONE_SHIFT (0U)
-/*! ATL_DONE - The bit corresponding to a certain PTD will be set to logic 1 as soon as that PTD execution is completed.
- */
-#define USBHSH_ATLPTDD_ATL_DONE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ATLPTDD_ATL_DONE_SHIFT)) & USBHSH_ATLPTDD_ATL_DONE_MASK)
-/*! @} */
-
-/*! @name ATLPTDS - Skip map for each ATL PTD */
-/*! @{ */
-#define USBHSH_ATLPTDS_ATL_SKIP_MASK (0xFFFFFFFFU)
-#define USBHSH_ATLPTDS_ATL_SKIP_SHIFT (0U)
-/*! ATL_SKIP - When a bit in the PTD Skip Map is set to logic 1, the corresponding PTD will be
- * skipped, independent of the V bit setting.
- */
-#define USBHSH_ATLPTDS_ATL_SKIP(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ATLPTDS_ATL_SKIP_SHIFT)) & USBHSH_ATLPTDS_ATL_SKIP_MASK)
-/*! @} */
-
-/*! @name ISOPTDD - Done map for each ISO PTD */
-/*! @{ */
-#define USBHSH_ISOPTDD_ISO_DONE_MASK (0xFFFFFFFFU)
-#define USBHSH_ISOPTDD_ISO_DONE_SHIFT (0U)
-/*! ISO_DONE - The bit corresponding to a certain PTD will be set to logic 1 as soon as that PTD execution is completed.
- */
-#define USBHSH_ISOPTDD_ISO_DONE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ISOPTDD_ISO_DONE_SHIFT)) & USBHSH_ISOPTDD_ISO_DONE_MASK)
-/*! @} */
-
-/*! @name ISOPTDS - Skip map for each ISO PTD */
-/*! @{ */
-#define USBHSH_ISOPTDS_ISO_SKIP_MASK (0xFFFFFFFFU)
-#define USBHSH_ISOPTDS_ISO_SKIP_SHIFT (0U)
-/*! ISO_SKIP - The bit corresponding to a certain PTD will be set to logic 1 as soon as that PTD execution is completed.
- */
-#define USBHSH_ISOPTDS_ISO_SKIP(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_ISOPTDS_ISO_SKIP_SHIFT)) & USBHSH_ISOPTDS_ISO_SKIP_MASK)
-/*! @} */
-
-/*! @name INTPTDD - Done map for each INT PTD */
-/*! @{ */
-#define USBHSH_INTPTDD_INT_DONE_MASK (0xFFFFFFFFU)
-#define USBHSH_INTPTDD_INT_DONE_SHIFT (0U)
-/*! INT_DONE - The bit corresponding to a certain PTD will be set to logic 1 as soon as that PTD execution is completed.
- */
-#define USBHSH_INTPTDD_INT_DONE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_INTPTDD_INT_DONE_SHIFT)) & USBHSH_INTPTDD_INT_DONE_MASK)
-/*! @} */
-
-/*! @name INTPTDS - Skip map for each INT PTD */
-/*! @{ */
-#define USBHSH_INTPTDS_INT_SKIP_MASK (0xFFFFFFFFU)
-#define USBHSH_INTPTDS_INT_SKIP_SHIFT (0U)
-/*! INT_SKIP - When a bit in the PTD Skip Map is set to logic 1, the corresponding PTD will be
- * skipped, independent of the V bit setting.
- */
-#define USBHSH_INTPTDS_INT_SKIP(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_INTPTDS_INT_SKIP_SHIFT)) & USBHSH_INTPTDS_INT_SKIP_MASK)
-/*! @} */
-
-/*! @name LASTPTD - Marks the last PTD in the list for ISO, INT and ATL */
-/*! @{ */
-#define USBHSH_LASTPTD_ATL_LAST_MASK (0x1FU)
-#define USBHSH_LASTPTD_ATL_LAST_SHIFT (0U)
-/*! ATL_LAST - If hardware has reached this PTD and the J bit is not set, it will go to PTD0 as the next PTD to be processed.
- */
-#define USBHSH_LASTPTD_ATL_LAST(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_LASTPTD_ATL_LAST_SHIFT)) & USBHSH_LASTPTD_ATL_LAST_MASK)
-#define USBHSH_LASTPTD_ISO_LAST_MASK (0x1F00U)
-#define USBHSH_LASTPTD_ISO_LAST_SHIFT (8U)
-/*! ISO_LAST - This indicates the last PTD in the ISO list.
- */
-#define USBHSH_LASTPTD_ISO_LAST(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_LASTPTD_ISO_LAST_SHIFT)) & USBHSH_LASTPTD_ISO_LAST_MASK)
-#define USBHSH_LASTPTD_INT_LAST_MASK (0x1F0000U)
-#define USBHSH_LASTPTD_INT_LAST_SHIFT (16U)
-/*! INT_LAST - This indicates the last PTD in the INT list.
- */
-#define USBHSH_LASTPTD_INT_LAST(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_LASTPTD_INT_LAST_SHIFT)) & USBHSH_LASTPTD_INT_LAST_MASK)
-/*! @} */
-
-/*! @name PORTMODE - Controls the port if it is attached to the host block or the device block */
-/*! @{ */
-#define USBHSH_PORTMODE_DEV_ENABLE_MASK (0x10000U)
-#define USBHSH_PORTMODE_DEV_ENABLE_SHIFT (16U)
-/*! DEV_ENABLE - If this bit is set to one, one of the ports will behave as a USB device.
- */
-#define USBHSH_PORTMODE_DEV_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTMODE_DEV_ENABLE_SHIFT)) & USBHSH_PORTMODE_DEV_ENABLE_MASK)
-#define USBHSH_PORTMODE_SW_CTRL_PDCOM_MASK (0x40000U)
-#define USBHSH_PORTMODE_SW_CTRL_PDCOM_SHIFT (18U)
-/*! SW_CTRL_PDCOM - This bit indicates if the PHY power-down input is controlled by software or by hardware.
- */
-#define USBHSH_PORTMODE_SW_CTRL_PDCOM(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTMODE_SW_CTRL_PDCOM_SHIFT)) & USBHSH_PORTMODE_SW_CTRL_PDCOM_MASK)
-#define USBHSH_PORTMODE_SW_PDCOM_MASK (0x80000U)
-#define USBHSH_PORTMODE_SW_PDCOM_SHIFT (19U)
-/*! SW_PDCOM - This bit is only used when SW_CTRL_PDCOM is set to 1b.
- */
-#define USBHSH_PORTMODE_SW_PDCOM(x) (((uint32_t)(((uint32_t)(x)) << USBHSH_PORTMODE_SW_PDCOM_SHIFT)) & USBHSH_PORTMODE_SW_PDCOM_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group USBHSH_Register_Masks */
-
-
-/* USBHSH - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral USBHSH base address */
- #define USBHSH_BASE (0x500A3000u)
- /** Peripheral USBHSH base address */
- #define USBHSH_BASE_NS (0x400A3000u)
- /** Peripheral USBHSH base pointer */
- #define USBHSH ((USBHSH_Type *)USBHSH_BASE)
- /** Peripheral USBHSH base pointer */
- #define USBHSH_NS ((USBHSH_Type *)USBHSH_BASE_NS)
- /** Array initializer of USBHSH peripheral base addresses */
- #define USBHSH_BASE_ADDRS { USBHSH_BASE }
- /** Array initializer of USBHSH peripheral base pointers */
- #define USBHSH_BASE_PTRS { USBHSH }
- /** Array initializer of USBHSH peripheral base addresses */
- #define USBHSH_BASE_ADDRS_NS { USBHSH_BASE_NS }
- /** Array initializer of USBHSH peripheral base pointers */
- #define USBHSH_BASE_PTRS_NS { USBHSH_NS }
-#else
- /** Peripheral USBHSH base address */
- #define USBHSH_BASE (0x400A3000u)
- /** Peripheral USBHSH base pointer */
- #define USBHSH ((USBHSH_Type *)USBHSH_BASE)
- /** Array initializer of USBHSH peripheral base addresses */
- #define USBHSH_BASE_ADDRS { USBHSH_BASE }
- /** Array initializer of USBHSH peripheral base pointers */
- #define USBHSH_BASE_PTRS { USBHSH }
-#endif
-/** Interrupt vectors for the USBHSH peripheral type */
-#define USBHSH_IRQS { USB1_IRQn }
-#define USBHSH_NEEDCLK_IRQS { USB1_NEEDCLK_IRQn }
-
-/*!
- * @}
- */ /* end of group USBHSH_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- USBPHY Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBPHY_Peripheral_Access_Layer USBPHY Peripheral Access Layer
- * @{
- */
-
-/** USBPHY - Register Layout Typedef */
-typedef struct {
- __IO uint32_t PWD; /**< USB PHY Power-Down Register, offset: 0x0 */
- __IO uint32_t PWD_SET; /**< USB PHY Power-Down Register, offset: 0x4 */
- __IO uint32_t PWD_CLR; /**< USB PHY Power-Down Register, offset: 0x8 */
- __IO uint32_t PWD_TOG; /**< USB PHY Power-Down Register, offset: 0xC */
- __IO uint32_t TX; /**< USB PHY Transmitter Control Register, offset: 0x10 */
- __IO uint32_t TX_SET; /**< USB PHY Transmitter Control Register, offset: 0x14 */
- __IO uint32_t TX_CLR; /**< USB PHY Transmitter Control Register, offset: 0x18 */
- __IO uint32_t TX_TOG; /**< USB PHY Transmitter Control Register, offset: 0x1C */
- __IO uint32_t RX; /**< USB PHY Receiver Control Register, offset: 0x20 */
- __IO uint32_t RX_SET; /**< USB PHY Receiver Control Register, offset: 0x24 */
- __IO uint32_t RX_CLR; /**< USB PHY Receiver Control Register, offset: 0x28 */
- __IO uint32_t RX_TOG; /**< USB PHY Receiver Control Register, offset: 0x2C */
- __IO uint32_t CTRL; /**< USB PHY General Control Register, offset: 0x30 */
- __IO uint32_t CTRL_SET; /**< USB PHY General Control Register, offset: 0x34 */
- __IO uint32_t CTRL_CLR; /**< USB PHY General Control Register, offset: 0x38 */
- __IO uint32_t CTRL_TOG; /**< USB PHY General Control Register, offset: 0x3C */
- __I uint32_t STATUS; /**< USB PHY Status Register, offset: 0x40 */
- uint8_t RESERVED_0[92];
- __IO uint32_t PLL_SIC; /**< USB PHY PLL Control/Status Register, offset: 0xA0 */
- __IO uint32_t PLL_SIC_SET; /**< USB PHY PLL Control/Status Register, offset: 0xA4 */
- __IO uint32_t PLL_SIC_CLR; /**< USB PHY PLL Control/Status Register, offset: 0xA8 */
- __IO uint32_t PLL_SIC_TOG; /**< USB PHY PLL Control/Status Register, offset: 0xAC */
- uint8_t RESERVED_1[16];
- __IO uint32_t USB1_VBUS_DETECT; /**< USB PHY VBUS Detect Control Register, offset: 0xC0 */
- __IO uint32_t USB1_VBUS_DETECT_SET; /**< USB PHY VBUS Detect Control Register, offset: 0xC4 */
- __IO uint32_t USB1_VBUS_DETECT_CLR; /**< USB PHY VBUS Detect Control Register, offset: 0xC8 */
- __IO uint32_t USB1_VBUS_DETECT_TOG; /**< USB PHY VBUS Detect Control Register, offset: 0xCC */
- uint8_t RESERVED_2[48];
- __IO uint32_t ANACTRLr; /**< USB PHY Analog Control Register, offset: 0x100 */
- __IO uint32_t ANACTRL_SET; /**< USB PHY Analog Control Register, offset: 0x104 */
- __IO uint32_t ANACTRL_CLR; /**< USB PHY Analog Control Register, offset: 0x108 */
- __IO uint32_t ANACTRL_TOG; /**< USB PHY Analog Control Register, offset: 0x10C */
-} USBPHY_Type;
-
-/* ----------------------------------------------------------------------------
- -- USBPHY Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup USBPHY_Register_Masks USBPHY Register Masks
- * @{
- */
-
-/*! @name PWD - USB PHY Power-Down Register */
-/*! @{ */
-#define USBPHY_PWD_TXPWDFS_MASK (0x400U)
-#define USBPHY_PWD_TXPWDFS_SHIFT (10U)
-/*! TXPWDFS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the
- */
-#define USBPHY_PWD_TXPWDFS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TXPWDFS_SHIFT)) & USBPHY_PWD_TXPWDFS_MASK)
-#define USBPHY_PWD_TXPWDIBIAS_MASK (0x800U)
-#define USBPHY_PWD_TXPWDIBIAS_SHIFT (11U)
-/*! TXPWDIBIAS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the
- */
-#define USBPHY_PWD_TXPWDIBIAS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TXPWDIBIAS_SHIFT)) & USBPHY_PWD_TXPWDIBIAS_MASK)
-#define USBPHY_PWD_TXPWDV2I_MASK (0x1000U)
-#define USBPHY_PWD_TXPWDV2I_SHIFT (12U)
-/*! TXPWDV2I
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY transmit V-to-I converter and the current mirror
- */
-#define USBPHY_PWD_TXPWDV2I(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TXPWDV2I_SHIFT)) & USBPHY_PWD_TXPWDV2I_MASK)
-#define USBPHY_PWD_RXPWDENV_MASK (0x20000U)
-#define USBPHY_PWD_RXPWDENV_SHIFT (17U)
-/*! RXPWDENV
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed receiver envelope detector (squelch signal)
- */
-#define USBPHY_PWD_RXPWDENV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_RXPWDENV_SHIFT)) & USBPHY_PWD_RXPWDENV_MASK)
-#define USBPHY_PWD_RXPWD1PT1_MASK (0x40000U)
-#define USBPHY_PWD_RXPWD1PT1_SHIFT (18U)
-/*! RXPWD1PT1
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed differential receiver.
- */
-#define USBPHY_PWD_RXPWD1PT1(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_RXPWD1PT1_SHIFT)) & USBPHY_PWD_RXPWD1PT1_MASK)
-#define USBPHY_PWD_RXPWDDIFF_MASK (0x80000U)
-#define USBPHY_PWD_RXPWDDIFF_SHIFT (19U)
-/*! RXPWDDIFF
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed differential receive
- */
-#define USBPHY_PWD_RXPWDDIFF(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_RXPWDDIFF_SHIFT)) & USBPHY_PWD_RXPWDDIFF_MASK)
-#define USBPHY_PWD_RXPWDRX_MASK (0x100000U)
-#define USBPHY_PWD_RXPWDRX_SHIFT (20U)
-/*! RXPWDRX
- * 0b0..Normal operation.
- * 0b1..Power-down the entire USB PHY receiver block except for the full-speed differential receiver
- */
-#define USBPHY_PWD_RXPWDRX(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_RXPWDRX_SHIFT)) & USBPHY_PWD_RXPWDRX_MASK)
-/*! @} */
-
-/*! @name PWD_SET - USB PHY Power-Down Register */
-/*! @{ */
-#define USBPHY_PWD_SET_TXPWDFS_MASK (0x400U)
-#define USBPHY_PWD_SET_TXPWDFS_SHIFT (10U)
-/*! TXPWDFS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the
- */
-#define USBPHY_PWD_SET_TXPWDFS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_TXPWDFS_SHIFT)) & USBPHY_PWD_SET_TXPWDFS_MASK)
-#define USBPHY_PWD_SET_TXPWDIBIAS_MASK (0x800U)
-#define USBPHY_PWD_SET_TXPWDIBIAS_SHIFT (11U)
-/*! TXPWDIBIAS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the
- */
-#define USBPHY_PWD_SET_TXPWDIBIAS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_TXPWDIBIAS_SHIFT)) & USBPHY_PWD_SET_TXPWDIBIAS_MASK)
-#define USBPHY_PWD_SET_TXPWDV2I_MASK (0x1000U)
-#define USBPHY_PWD_SET_TXPWDV2I_SHIFT (12U)
-/*! TXPWDV2I
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY transmit V-to-I converter and the current mirror
- */
-#define USBPHY_PWD_SET_TXPWDV2I(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_TXPWDV2I_SHIFT)) & USBPHY_PWD_SET_TXPWDV2I_MASK)
-#define USBPHY_PWD_SET_RXPWDENV_MASK (0x20000U)
-#define USBPHY_PWD_SET_RXPWDENV_SHIFT (17U)
-/*! RXPWDENV
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed receiver envelope detector (squelch signal)
- */
-#define USBPHY_PWD_SET_RXPWDENV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_RXPWDENV_SHIFT)) & USBPHY_PWD_SET_RXPWDENV_MASK)
-#define USBPHY_PWD_SET_RXPWD1PT1_MASK (0x40000U)
-#define USBPHY_PWD_SET_RXPWD1PT1_SHIFT (18U)
-/*! RXPWD1PT1
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed differential receiver.
- */
-#define USBPHY_PWD_SET_RXPWD1PT1(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_RXPWD1PT1_SHIFT)) & USBPHY_PWD_SET_RXPWD1PT1_MASK)
-#define USBPHY_PWD_SET_RXPWDDIFF_MASK (0x80000U)
-#define USBPHY_PWD_SET_RXPWDDIFF_SHIFT (19U)
-/*! RXPWDDIFF
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed differential receive
- */
-#define USBPHY_PWD_SET_RXPWDDIFF(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_RXPWDDIFF_SHIFT)) & USBPHY_PWD_SET_RXPWDDIFF_MASK)
-#define USBPHY_PWD_SET_RXPWDRX_MASK (0x100000U)
-#define USBPHY_PWD_SET_RXPWDRX_SHIFT (20U)
-/*! RXPWDRX
- * 0b0..Normal operation.
- * 0b1..Power-down the entire USB PHY receiver block except for the full-speed differential receiver
- */
-#define USBPHY_PWD_SET_RXPWDRX(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_SET_RXPWDRX_SHIFT)) & USBPHY_PWD_SET_RXPWDRX_MASK)
-/*! @} */
-
-/*! @name PWD_CLR - USB PHY Power-Down Register */
-/*! @{ */
-#define USBPHY_PWD_CLR_TXPWDFS_MASK (0x400U)
-#define USBPHY_PWD_CLR_TXPWDFS_SHIFT (10U)
-/*! TXPWDFS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the
- */
-#define USBPHY_PWD_CLR_TXPWDFS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_TXPWDFS_SHIFT)) & USBPHY_PWD_CLR_TXPWDFS_MASK)
-#define USBPHY_PWD_CLR_TXPWDIBIAS_MASK (0x800U)
-#define USBPHY_PWD_CLR_TXPWDIBIAS_SHIFT (11U)
-/*! TXPWDIBIAS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the
- */
-#define USBPHY_PWD_CLR_TXPWDIBIAS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_TXPWDIBIAS_SHIFT)) & USBPHY_PWD_CLR_TXPWDIBIAS_MASK)
-#define USBPHY_PWD_CLR_TXPWDV2I_MASK (0x1000U)
-#define USBPHY_PWD_CLR_TXPWDV2I_SHIFT (12U)
-/*! TXPWDV2I
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY transmit V-to-I converter and the current mirror
- */
-#define USBPHY_PWD_CLR_TXPWDV2I(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_TXPWDV2I_SHIFT)) & USBPHY_PWD_CLR_TXPWDV2I_MASK)
-#define USBPHY_PWD_CLR_RXPWDENV_MASK (0x20000U)
-#define USBPHY_PWD_CLR_RXPWDENV_SHIFT (17U)
-/*! RXPWDENV
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed receiver envelope detector (squelch signal)
- */
-#define USBPHY_PWD_CLR_RXPWDENV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_RXPWDENV_SHIFT)) & USBPHY_PWD_CLR_RXPWDENV_MASK)
-#define USBPHY_PWD_CLR_RXPWD1PT1_MASK (0x40000U)
-#define USBPHY_PWD_CLR_RXPWD1PT1_SHIFT (18U)
-/*! RXPWD1PT1
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed differential receiver.
- */
-#define USBPHY_PWD_CLR_RXPWD1PT1(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_RXPWD1PT1_SHIFT)) & USBPHY_PWD_CLR_RXPWD1PT1_MASK)
-#define USBPHY_PWD_CLR_RXPWDDIFF_MASK (0x80000U)
-#define USBPHY_PWD_CLR_RXPWDDIFF_SHIFT (19U)
-/*! RXPWDDIFF
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed differential receive
- */
-#define USBPHY_PWD_CLR_RXPWDDIFF(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_RXPWDDIFF_SHIFT)) & USBPHY_PWD_CLR_RXPWDDIFF_MASK)
-#define USBPHY_PWD_CLR_RXPWDRX_MASK (0x100000U)
-#define USBPHY_PWD_CLR_RXPWDRX_SHIFT (20U)
-/*! RXPWDRX
- * 0b0..Normal operation.
- * 0b1..Power-down the entire USB PHY receiver block except for the full-speed differential receiver
- */
-#define USBPHY_PWD_CLR_RXPWDRX(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_CLR_RXPWDRX_SHIFT)) & USBPHY_PWD_CLR_RXPWDRX_MASK)
-/*! @} */
-
-/*! @name PWD_TOG - USB PHY Power-Down Register */
-/*! @{ */
-#define USBPHY_PWD_TOG_TXPWDFS_MASK (0x400U)
-#define USBPHY_PWD_TOG_TXPWDFS_SHIFT (10U)
-/*! TXPWDFS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed drivers. This turns off the current starvation sources and puts the
- */
-#define USBPHY_PWD_TOG_TXPWDFS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_TXPWDFS_SHIFT)) & USBPHY_PWD_TOG_TXPWDFS_MASK)
-#define USBPHY_PWD_TOG_TXPWDIBIAS_MASK (0x800U)
-#define USBPHY_PWD_TOG_TXPWDIBIAS_SHIFT (11U)
-/*! TXPWDIBIAS
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY current bias block for the transmitter. This bit should be set only when the
- */
-#define USBPHY_PWD_TOG_TXPWDIBIAS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_TXPWDIBIAS_SHIFT)) & USBPHY_PWD_TOG_TXPWDIBIAS_MASK)
-#define USBPHY_PWD_TOG_TXPWDV2I_MASK (0x1000U)
-#define USBPHY_PWD_TOG_TXPWDV2I_SHIFT (12U)
-/*! TXPWDV2I
- * 0b0..Normal operation.
- * 0b1..Power-down the USB PHY transmit V-to-I converter and the current mirror
- */
-#define USBPHY_PWD_TOG_TXPWDV2I(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_TXPWDV2I_SHIFT)) & USBPHY_PWD_TOG_TXPWDV2I_MASK)
-#define USBPHY_PWD_TOG_RXPWDENV_MASK (0x20000U)
-#define USBPHY_PWD_TOG_RXPWDENV_SHIFT (17U)
-/*! RXPWDENV
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed receiver envelope detector (squelch signal)
- */
-#define USBPHY_PWD_TOG_RXPWDENV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_RXPWDENV_SHIFT)) & USBPHY_PWD_TOG_RXPWDENV_MASK)
-#define USBPHY_PWD_TOG_RXPWD1PT1_MASK (0x40000U)
-#define USBPHY_PWD_TOG_RXPWD1PT1_SHIFT (18U)
-/*! RXPWD1PT1
- * 0b0..Normal operation.
- * 0b1..Power-down the USB full-speed differential receiver.
- */
-#define USBPHY_PWD_TOG_RXPWD1PT1(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_RXPWD1PT1_SHIFT)) & USBPHY_PWD_TOG_RXPWD1PT1_MASK)
-#define USBPHY_PWD_TOG_RXPWDDIFF_MASK (0x80000U)
-#define USBPHY_PWD_TOG_RXPWDDIFF_SHIFT (19U)
-/*! RXPWDDIFF
- * 0b0..Normal operation.
- * 0b1..Power-down the USB high-speed differential receive
- */
-#define USBPHY_PWD_TOG_RXPWDDIFF(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_RXPWDDIFF_SHIFT)) & USBPHY_PWD_TOG_RXPWDDIFF_MASK)
-#define USBPHY_PWD_TOG_RXPWDRX_MASK (0x100000U)
-#define USBPHY_PWD_TOG_RXPWDRX_SHIFT (20U)
-/*! RXPWDRX
- * 0b0..Normal operation.
- * 0b1..Power-down the entire USB PHY receiver block except for the full-speed differential receiver
- */
-#define USBPHY_PWD_TOG_RXPWDRX(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PWD_TOG_RXPWDRX_SHIFT)) & USBPHY_PWD_TOG_RXPWDRX_MASK)
-/*! @} */
-
-/*! @name TX - USB PHY Transmitter Control Register */
-/*! @{ */
-#define USBPHY_TX_D_CAL_MASK (0xFU)
-#define USBPHY_TX_D_CAL_SHIFT (0U)
-/*! D_CAL
- * 0b0000..Maximum current, approximately 19% above nominal.
- * 0b0111..Nominal
- * 0b1111..Minimum current, approximately 19% below nominal.
- */
-#define USBPHY_TX_D_CAL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_D_CAL_SHIFT)) & USBPHY_TX_D_CAL_MASK)
-#define USBPHY_TX_TXCAL45DM_MASK (0xF00U)
-#define USBPHY_TX_TXCAL45DM_SHIFT (8U)
-#define USBPHY_TX_TXCAL45DM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TXCAL45DM_SHIFT)) & USBPHY_TX_TXCAL45DM_MASK)
-#define USBPHY_TX_TXENCAL45DN_MASK (0x2000U)
-#define USBPHY_TX_TXENCAL45DN_SHIFT (13U)
-#define USBPHY_TX_TXENCAL45DN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TXENCAL45DN_SHIFT)) & USBPHY_TX_TXENCAL45DN_MASK)
-#define USBPHY_TX_TXCAL45DP_MASK (0xF0000U)
-#define USBPHY_TX_TXCAL45DP_SHIFT (16U)
-#define USBPHY_TX_TXCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TXCAL45DP_SHIFT)) & USBPHY_TX_TXCAL45DP_MASK)
-#define USBPHY_TX_TXENCAL45DP_MASK (0x200000U)
-#define USBPHY_TX_TXENCAL45DP_SHIFT (21U)
-#define USBPHY_TX_TXENCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TXENCAL45DP_SHIFT)) & USBPHY_TX_TXENCAL45DP_MASK)
-/*! @} */
-
-/*! @name TX_SET - USB PHY Transmitter Control Register */
-/*! @{ */
-#define USBPHY_TX_SET_D_CAL_MASK (0xFU)
-#define USBPHY_TX_SET_D_CAL_SHIFT (0U)
-/*! D_CAL
- * 0b0000..Maximum current, approximately 19% above nominal.
- * 0b0111..Nominal
- * 0b1111..Minimum current, approximately 19% below nominal.
- */
-#define USBPHY_TX_SET_D_CAL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_SET_D_CAL_SHIFT)) & USBPHY_TX_SET_D_CAL_MASK)
-#define USBPHY_TX_SET_TXCAL45DM_MASK (0xF00U)
-#define USBPHY_TX_SET_TXCAL45DM_SHIFT (8U)
-#define USBPHY_TX_SET_TXCAL45DM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_SET_TXCAL45DM_SHIFT)) & USBPHY_TX_SET_TXCAL45DM_MASK)
-#define USBPHY_TX_SET_TXENCAL45DN_MASK (0x2000U)
-#define USBPHY_TX_SET_TXENCAL45DN_SHIFT (13U)
-#define USBPHY_TX_SET_TXENCAL45DN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_SET_TXENCAL45DN_SHIFT)) & USBPHY_TX_SET_TXENCAL45DN_MASK)
-#define USBPHY_TX_SET_TXCAL45DP_MASK (0xF0000U)
-#define USBPHY_TX_SET_TXCAL45DP_SHIFT (16U)
-#define USBPHY_TX_SET_TXCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_SET_TXCAL45DP_SHIFT)) & USBPHY_TX_SET_TXCAL45DP_MASK)
-#define USBPHY_TX_SET_TXENCAL45DP_MASK (0x200000U)
-#define USBPHY_TX_SET_TXENCAL45DP_SHIFT (21U)
-#define USBPHY_TX_SET_TXENCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_SET_TXENCAL45DP_SHIFT)) & USBPHY_TX_SET_TXENCAL45DP_MASK)
-/*! @} */
-
-/*! @name TX_CLR - USB PHY Transmitter Control Register */
-/*! @{ */
-#define USBPHY_TX_CLR_D_CAL_MASK (0xFU)
-#define USBPHY_TX_CLR_D_CAL_SHIFT (0U)
-/*! D_CAL
- * 0b0000..Maximum current, approximately 19% above nominal.
- * 0b0111..Nominal
- * 0b1111..Minimum current, approximately 19% below nominal.
- */
-#define USBPHY_TX_CLR_D_CAL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_CLR_D_CAL_SHIFT)) & USBPHY_TX_CLR_D_CAL_MASK)
-#define USBPHY_TX_CLR_TXCAL45DM_MASK (0xF00U)
-#define USBPHY_TX_CLR_TXCAL45DM_SHIFT (8U)
-#define USBPHY_TX_CLR_TXCAL45DM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_CLR_TXCAL45DM_SHIFT)) & USBPHY_TX_CLR_TXCAL45DM_MASK)
-#define USBPHY_TX_CLR_TXENCAL45DN_MASK (0x2000U)
-#define USBPHY_TX_CLR_TXENCAL45DN_SHIFT (13U)
-#define USBPHY_TX_CLR_TXENCAL45DN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_CLR_TXENCAL45DN_SHIFT)) & USBPHY_TX_CLR_TXENCAL45DN_MASK)
-#define USBPHY_TX_CLR_TXCAL45DP_MASK (0xF0000U)
-#define USBPHY_TX_CLR_TXCAL45DP_SHIFT (16U)
-#define USBPHY_TX_CLR_TXCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_CLR_TXCAL45DP_SHIFT)) & USBPHY_TX_CLR_TXCAL45DP_MASK)
-#define USBPHY_TX_CLR_TXENCAL45DP_MASK (0x200000U)
-#define USBPHY_TX_CLR_TXENCAL45DP_SHIFT (21U)
-#define USBPHY_TX_CLR_TXENCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_CLR_TXENCAL45DP_SHIFT)) & USBPHY_TX_CLR_TXENCAL45DP_MASK)
-/*! @} */
-
-/*! @name TX_TOG - USB PHY Transmitter Control Register */
-/*! @{ */
-#define USBPHY_TX_TOG_D_CAL_MASK (0xFU)
-#define USBPHY_TX_TOG_D_CAL_SHIFT (0U)
-/*! D_CAL
- * 0b0000..Maximum current, approximately 19% above nominal.
- * 0b0111..Nominal
- * 0b1111..Minimum current, approximately 19% below nominal.
- */
-#define USBPHY_TX_TOG_D_CAL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TOG_D_CAL_SHIFT)) & USBPHY_TX_TOG_D_CAL_MASK)
-#define USBPHY_TX_TOG_TXCAL45DM_MASK (0xF00U)
-#define USBPHY_TX_TOG_TXCAL45DM_SHIFT (8U)
-#define USBPHY_TX_TOG_TXCAL45DM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TOG_TXCAL45DM_SHIFT)) & USBPHY_TX_TOG_TXCAL45DM_MASK)
-#define USBPHY_TX_TOG_TXENCAL45DN_MASK (0x2000U)
-#define USBPHY_TX_TOG_TXENCAL45DN_SHIFT (13U)
-#define USBPHY_TX_TOG_TXENCAL45DN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TOG_TXENCAL45DN_SHIFT)) & USBPHY_TX_TOG_TXENCAL45DN_MASK)
-#define USBPHY_TX_TOG_TXCAL45DP_MASK (0xF0000U)
-#define USBPHY_TX_TOG_TXCAL45DP_SHIFT (16U)
-#define USBPHY_TX_TOG_TXCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TOG_TXCAL45DP_SHIFT)) & USBPHY_TX_TOG_TXCAL45DP_MASK)
-#define USBPHY_TX_TOG_TXENCAL45DP_MASK (0x200000U)
-#define USBPHY_TX_TOG_TXENCAL45DP_SHIFT (21U)
-#define USBPHY_TX_TOG_TXENCAL45DP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_TX_TOG_TXENCAL45DP_SHIFT)) & USBPHY_TX_TOG_TXENCAL45DP_MASK)
-/*! @} */
-
-/*! @name RX - USB PHY Receiver Control Register */
-/*! @{ */
-#define USBPHY_RX_ENVADJ_MASK (0x7U)
-#define USBPHY_RX_ENVADJ_SHIFT (0U)
-/*! ENVADJ
- * 0b000..Trip-Level Voltage is 0.1000 V
- * 0b001..Trip-Level Voltage is 0.1125 V
- * 0b010..Trip-Level Voltage is 0.1250 V
- * 0b011..Trip-Level Voltage is 0.0875 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_ENVADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_ENVADJ_SHIFT)) & USBPHY_RX_ENVADJ_MASK)
-#define USBPHY_RX_DISCONADJ_MASK (0x70U)
-#define USBPHY_RX_DISCONADJ_SHIFT (4U)
-/*! DISCONADJ
- * 0b000..Trip-Level Voltage is 0.56875 V
- * 0b001..Trip-Level Voltage is 0.55000 V
- * 0b010..Trip-Level Voltage is 0.58125 V
- * 0b011..Trip-Level Voltage is 0.60000 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_DISCONADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_DISCONADJ_SHIFT)) & USBPHY_RX_DISCONADJ_MASK)
-#define USBPHY_RX_RXDBYPASS_MASK (0x400000U)
-#define USBPHY_RX_RXDBYPASS_SHIFT (22U)
-/*! RXDBYPASS
- * 0b0..Normal operation.
- * 0b1..Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver
- */
-#define USBPHY_RX_RXDBYPASS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_RXDBYPASS_SHIFT)) & USBPHY_RX_RXDBYPASS_MASK)
-/*! @} */
-
-/*! @name RX_SET - USB PHY Receiver Control Register */
-/*! @{ */
-#define USBPHY_RX_SET_ENVADJ_MASK (0x7U)
-#define USBPHY_RX_SET_ENVADJ_SHIFT (0U)
-/*! ENVADJ
- * 0b000..Trip-Level Voltage is 0.1000 V
- * 0b001..Trip-Level Voltage is 0.1125 V
- * 0b010..Trip-Level Voltage is 0.1250 V
- * 0b011..Trip-Level Voltage is 0.0875 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_SET_ENVADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_SET_ENVADJ_SHIFT)) & USBPHY_RX_SET_ENVADJ_MASK)
-#define USBPHY_RX_SET_DISCONADJ_MASK (0x70U)
-#define USBPHY_RX_SET_DISCONADJ_SHIFT (4U)
-/*! DISCONADJ
- * 0b000..Trip-Level Voltage is 0.56875 V
- * 0b001..Trip-Level Voltage is 0.55000 V
- * 0b010..Trip-Level Voltage is 0.58125 V
- * 0b011..Trip-Level Voltage is 0.60000 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_SET_DISCONADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_SET_DISCONADJ_SHIFT)) & USBPHY_RX_SET_DISCONADJ_MASK)
-#define USBPHY_RX_SET_RXDBYPASS_MASK (0x400000U)
-#define USBPHY_RX_SET_RXDBYPASS_SHIFT (22U)
-/*! RXDBYPASS
- * 0b0..Normal operation.
- * 0b1..Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver
- */
-#define USBPHY_RX_SET_RXDBYPASS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_SET_RXDBYPASS_SHIFT)) & USBPHY_RX_SET_RXDBYPASS_MASK)
-/*! @} */
-
-/*! @name RX_CLR - USB PHY Receiver Control Register */
-/*! @{ */
-#define USBPHY_RX_CLR_ENVADJ_MASK (0x7U)
-#define USBPHY_RX_CLR_ENVADJ_SHIFT (0U)
-/*! ENVADJ
- * 0b000..Trip-Level Voltage is 0.1000 V
- * 0b001..Trip-Level Voltage is 0.1125 V
- * 0b010..Trip-Level Voltage is 0.1250 V
- * 0b011..Trip-Level Voltage is 0.0875 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_CLR_ENVADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_CLR_ENVADJ_SHIFT)) & USBPHY_RX_CLR_ENVADJ_MASK)
-#define USBPHY_RX_CLR_DISCONADJ_MASK (0x70U)
-#define USBPHY_RX_CLR_DISCONADJ_SHIFT (4U)
-/*! DISCONADJ
- * 0b000..Trip-Level Voltage is 0.56875 V
- * 0b001..Trip-Level Voltage is 0.55000 V
- * 0b010..Trip-Level Voltage is 0.58125 V
- * 0b011..Trip-Level Voltage is 0.60000 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_CLR_DISCONADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_CLR_DISCONADJ_SHIFT)) & USBPHY_RX_CLR_DISCONADJ_MASK)
-#define USBPHY_RX_CLR_RXDBYPASS_MASK (0x400000U)
-#define USBPHY_RX_CLR_RXDBYPASS_SHIFT (22U)
-/*! RXDBYPASS
- * 0b0..Normal operation.
- * 0b1..Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver
- */
-#define USBPHY_RX_CLR_RXDBYPASS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_CLR_RXDBYPASS_SHIFT)) & USBPHY_RX_CLR_RXDBYPASS_MASK)
-/*! @} */
-
-/*! @name RX_TOG - USB PHY Receiver Control Register */
-/*! @{ */
-#define USBPHY_RX_TOG_ENVADJ_MASK (0x7U)
-#define USBPHY_RX_TOG_ENVADJ_SHIFT (0U)
-/*! ENVADJ
- * 0b000..Trip-Level Voltage is 0.1000 V
- * 0b001..Trip-Level Voltage is 0.1125 V
- * 0b010..Trip-Level Voltage is 0.1250 V
- * 0b011..Trip-Level Voltage is 0.0875 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_TOG_ENVADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_TOG_ENVADJ_SHIFT)) & USBPHY_RX_TOG_ENVADJ_MASK)
-#define USBPHY_RX_TOG_DISCONADJ_MASK (0x70U)
-#define USBPHY_RX_TOG_DISCONADJ_SHIFT (4U)
-/*! DISCONADJ
- * 0b000..Trip-Level Voltage is 0.56875 V
- * 0b001..Trip-Level Voltage is 0.55000 V
- * 0b010..Trip-Level Voltage is 0.58125 V
- * 0b011..Trip-Level Voltage is 0.60000 V
- * 0b100..reserved
- * 0b101..reserved
- * 0b110..reserved
- * 0b111..reserved
- */
-#define USBPHY_RX_TOG_DISCONADJ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_TOG_DISCONADJ_SHIFT)) & USBPHY_RX_TOG_DISCONADJ_MASK)
-#define USBPHY_RX_TOG_RXDBYPASS_MASK (0x400000U)
-#define USBPHY_RX_TOG_RXDBYPASS_SHIFT (22U)
-/*! RXDBYPASS
- * 0b0..Normal operation.
- * 0b1..Use the output of the USB_DP single-ended receiver in place of the full-speed differential receiver
- */
-#define USBPHY_RX_TOG_RXDBYPASS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_RX_TOG_RXDBYPASS_SHIFT)) & USBPHY_RX_TOG_RXDBYPASS_MASK)
-/*! @} */
-
-/*! @name CTRL - USB PHY General Control Register */
-/*! @{ */
-#define USBPHY_CTRL_ENHOSTDISCONDETECT_MASK (0x2U)
-#define USBPHY_CTRL_ENHOSTDISCONDETECT_SHIFT (1U)
-#define USBPHY_CTRL_ENHOSTDISCONDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENHOSTDISCONDETECT_SHIFT)) & USBPHY_CTRL_ENHOSTDISCONDETECT_MASK)
-#define USBPHY_CTRL_ENIRQHOSTDISCON_MASK (0x4U)
-#define USBPHY_CTRL_ENIRQHOSTDISCON_SHIFT (2U)
-#define USBPHY_CTRL_ENIRQHOSTDISCON(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENIRQHOSTDISCON_SHIFT)) & USBPHY_CTRL_ENIRQHOSTDISCON_MASK)
-#define USBPHY_CTRL_HOSTDISCONDETECT_IRQ_MASK (0x8U)
-#define USBPHY_CTRL_HOSTDISCONDETECT_IRQ_SHIFT (3U)
-#define USBPHY_CTRL_HOSTDISCONDETECT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_HOSTDISCONDETECT_IRQ_SHIFT)) & USBPHY_CTRL_HOSTDISCONDETECT_IRQ_MASK)
-#define USBPHY_CTRL_ENDEVPLUGINDET_MASK (0x10U)
-#define USBPHY_CTRL_ENDEVPLUGINDET_SHIFT (4U)
-/*! ENDEVPLUGINDET
- * 0b0..Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)
- * 0b1..Enables 200kohm pullup resistors on USB_DP and USB_DM pins
- */
-#define USBPHY_CTRL_ENDEVPLUGINDET(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENDEVPLUGINDET_SHIFT)) & USBPHY_CTRL_ENDEVPLUGINDET_MASK)
-#define USBPHY_CTRL_DEVPLUGIN_POLARITY_MASK (0x20U)
-#define USBPHY_CTRL_DEVPLUGIN_POLARITY_SHIFT (5U)
-#define USBPHY_CTRL_DEVPLUGIN_POLARITY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_DEVPLUGIN_POLARITY_SHIFT)) & USBPHY_CTRL_DEVPLUGIN_POLARITY_MASK)
-#define USBPHY_CTRL_RESUMEIRQSTICKY_MASK (0x100U)
-#define USBPHY_CTRL_RESUMEIRQSTICKY_SHIFT (8U)
-#define USBPHY_CTRL_RESUMEIRQSTICKY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_RESUMEIRQSTICKY_SHIFT)) & USBPHY_CTRL_RESUMEIRQSTICKY_MASK)
-#define USBPHY_CTRL_ENIRQRESUMEDETECT_MASK (0x200U)
-#define USBPHY_CTRL_ENIRQRESUMEDETECT_SHIFT (9U)
-#define USBPHY_CTRL_ENIRQRESUMEDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENIRQRESUMEDETECT_SHIFT)) & USBPHY_CTRL_ENIRQRESUMEDETECT_MASK)
-#define USBPHY_CTRL_RESUME_IRQ_MASK (0x400U)
-#define USBPHY_CTRL_RESUME_IRQ_SHIFT (10U)
-#define USBPHY_CTRL_RESUME_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_RESUME_IRQ_SHIFT)) & USBPHY_CTRL_RESUME_IRQ_MASK)
-#define USBPHY_CTRL_DEVPLUGIN_IRQ_MASK (0x1000U)
-#define USBPHY_CTRL_DEVPLUGIN_IRQ_SHIFT (12U)
-#define USBPHY_CTRL_DEVPLUGIN_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_DEVPLUGIN_IRQ_SHIFT)) & USBPHY_CTRL_DEVPLUGIN_IRQ_MASK)
-#define USBPHY_CTRL_ENUTMILEVEL2_MASK (0x4000U)
-#define USBPHY_CTRL_ENUTMILEVEL2_SHIFT (14U)
-#define USBPHY_CTRL_ENUTMILEVEL2(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENUTMILEVEL2_SHIFT)) & USBPHY_CTRL_ENUTMILEVEL2_MASK)
-#define USBPHY_CTRL_ENUTMILEVEL3_MASK (0x8000U)
-#define USBPHY_CTRL_ENUTMILEVEL3_SHIFT (15U)
-#define USBPHY_CTRL_ENUTMILEVEL3(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENUTMILEVEL3_SHIFT)) & USBPHY_CTRL_ENUTMILEVEL3_MASK)
-#define USBPHY_CTRL_ENIRQWAKEUP_MASK (0x10000U)
-#define USBPHY_CTRL_ENIRQWAKEUP_SHIFT (16U)
-#define USBPHY_CTRL_ENIRQWAKEUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENIRQWAKEUP_SHIFT)) & USBPHY_CTRL_ENIRQWAKEUP_MASK)
-#define USBPHY_CTRL_WAKEUP_IRQ_MASK (0x20000U)
-#define USBPHY_CTRL_WAKEUP_IRQ_SHIFT (17U)
-#define USBPHY_CTRL_WAKEUP_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_WAKEUP_IRQ_SHIFT)) & USBPHY_CTRL_WAKEUP_IRQ_MASK)
-#define USBPHY_CTRL_AUTORESUME_EN_MASK (0x40000U)
-#define USBPHY_CTRL_AUTORESUME_EN_SHIFT (18U)
-#define USBPHY_CTRL_AUTORESUME_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_AUTORESUME_EN_SHIFT)) & USBPHY_CTRL_AUTORESUME_EN_MASK)
-#define USBPHY_CTRL_ENAUTOCLR_CLKGATE_MASK (0x80000U)
-#define USBPHY_CTRL_ENAUTOCLR_CLKGATE_SHIFT (19U)
-#define USBPHY_CTRL_ENAUTOCLR_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENAUTOCLR_CLKGATE_SHIFT)) & USBPHY_CTRL_ENAUTOCLR_CLKGATE_MASK)
-#define USBPHY_CTRL_ENAUTOCLR_PHY_PWD_MASK (0x100000U)
-#define USBPHY_CTRL_ENAUTOCLR_PHY_PWD_SHIFT (20U)
-#define USBPHY_CTRL_ENAUTOCLR_PHY_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENAUTOCLR_PHY_PWD_SHIFT)) & USBPHY_CTRL_ENAUTOCLR_PHY_PWD_MASK)
-#define USBPHY_CTRL_ENDPDMCHG_WKUP_MASK (0x200000U)
-#define USBPHY_CTRL_ENDPDMCHG_WKUP_SHIFT (21U)
-#define USBPHY_CTRL_ENDPDMCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENDPDMCHG_WKUP_SHIFT)) & USBPHY_CTRL_ENDPDMCHG_WKUP_MASK)
-#define USBPHY_CTRL_ENVBUSCHG_WKUP_MASK (0x800000U)
-#define USBPHY_CTRL_ENVBUSCHG_WKUP_SHIFT (23U)
-#define USBPHY_CTRL_ENVBUSCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENVBUSCHG_WKUP_SHIFT)) & USBPHY_CTRL_ENVBUSCHG_WKUP_MASK)
-#define USBPHY_CTRL_ENAUTOCLR_USBCLKGATE_MASK (0x2000000U)
-#define USBPHY_CTRL_ENAUTOCLR_USBCLKGATE_SHIFT (25U)
-#define USBPHY_CTRL_ENAUTOCLR_USBCLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENAUTOCLR_USBCLKGATE_SHIFT)) & USBPHY_CTRL_ENAUTOCLR_USBCLKGATE_MASK)
-#define USBPHY_CTRL_ENAUTOSET_USBCLKS_MASK (0x4000000U)
-#define USBPHY_CTRL_ENAUTOSET_USBCLKS_SHIFT (26U)
-#define USBPHY_CTRL_ENAUTOSET_USBCLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_ENAUTOSET_USBCLKS_SHIFT)) & USBPHY_CTRL_ENAUTOSET_USBCLKS_MASK)
-#define USBPHY_CTRL_HOST_FORCE_LS_SE0_MASK (0x10000000U)
-#define USBPHY_CTRL_HOST_FORCE_LS_SE0_SHIFT (28U)
-#define USBPHY_CTRL_HOST_FORCE_LS_SE0(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_HOST_FORCE_LS_SE0_SHIFT)) & USBPHY_CTRL_HOST_FORCE_LS_SE0_MASK)
-#define USBPHY_CTRL_UTMI_SUSPENDM_MASK (0x20000000U)
-#define USBPHY_CTRL_UTMI_SUSPENDM_SHIFT (29U)
-#define USBPHY_CTRL_UTMI_SUSPENDM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_UTMI_SUSPENDM_SHIFT)) & USBPHY_CTRL_UTMI_SUSPENDM_MASK)
-#define USBPHY_CTRL_CLKGATE_MASK (0x40000000U)
-#define USBPHY_CTRL_CLKGATE_SHIFT (30U)
-#define USBPHY_CTRL_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLKGATE_SHIFT)) & USBPHY_CTRL_CLKGATE_MASK)
-#define USBPHY_CTRL_SFTRST_MASK (0x80000000U)
-#define USBPHY_CTRL_SFTRST_SHIFT (31U)
-#define USBPHY_CTRL_SFTRST(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SFTRST_SHIFT)) & USBPHY_CTRL_SFTRST_MASK)
-/*! @} */
-
-/*! @name CTRL_SET - USB PHY General Control Register */
-/*! @{ */
-#define USBPHY_CTRL_SET_ENHOSTDISCONDETECT_MASK (0x2U)
-#define USBPHY_CTRL_SET_ENHOSTDISCONDETECT_SHIFT (1U)
-#define USBPHY_CTRL_SET_ENHOSTDISCONDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENHOSTDISCONDETECT_SHIFT)) & USBPHY_CTRL_SET_ENHOSTDISCONDETECT_MASK)
-#define USBPHY_CTRL_SET_ENIRQHOSTDISCON_MASK (0x4U)
-#define USBPHY_CTRL_SET_ENIRQHOSTDISCON_SHIFT (2U)
-#define USBPHY_CTRL_SET_ENIRQHOSTDISCON(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENIRQHOSTDISCON_SHIFT)) & USBPHY_CTRL_SET_ENIRQHOSTDISCON_MASK)
-#define USBPHY_CTRL_SET_HOSTDISCONDETECT_IRQ_MASK (0x8U)
-#define USBPHY_CTRL_SET_HOSTDISCONDETECT_IRQ_SHIFT (3U)
-#define USBPHY_CTRL_SET_HOSTDISCONDETECT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_HOSTDISCONDETECT_IRQ_SHIFT)) & USBPHY_CTRL_SET_HOSTDISCONDETECT_IRQ_MASK)
-#define USBPHY_CTRL_SET_ENDEVPLUGINDET_MASK (0x10U)
-#define USBPHY_CTRL_SET_ENDEVPLUGINDET_SHIFT (4U)
-/*! ENDEVPLUGINDET
- * 0b0..Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)
- * 0b1..Enables 200kohm pullup resistors on USB_DP and USB_DM pins
- */
-#define USBPHY_CTRL_SET_ENDEVPLUGINDET(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENDEVPLUGINDET_SHIFT)) & USBPHY_CTRL_SET_ENDEVPLUGINDET_MASK)
-#define USBPHY_CTRL_SET_DEVPLUGIN_POLARITY_MASK (0x20U)
-#define USBPHY_CTRL_SET_DEVPLUGIN_POLARITY_SHIFT (5U)
-#define USBPHY_CTRL_SET_DEVPLUGIN_POLARITY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_DEVPLUGIN_POLARITY_SHIFT)) & USBPHY_CTRL_SET_DEVPLUGIN_POLARITY_MASK)
-#define USBPHY_CTRL_SET_RESUMEIRQSTICKY_MASK (0x100U)
-#define USBPHY_CTRL_SET_RESUMEIRQSTICKY_SHIFT (8U)
-#define USBPHY_CTRL_SET_RESUMEIRQSTICKY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_RESUMEIRQSTICKY_SHIFT)) & USBPHY_CTRL_SET_RESUMEIRQSTICKY_MASK)
-#define USBPHY_CTRL_SET_ENIRQRESUMEDETECT_MASK (0x200U)
-#define USBPHY_CTRL_SET_ENIRQRESUMEDETECT_SHIFT (9U)
-#define USBPHY_CTRL_SET_ENIRQRESUMEDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENIRQRESUMEDETECT_SHIFT)) & USBPHY_CTRL_SET_ENIRQRESUMEDETECT_MASK)
-#define USBPHY_CTRL_SET_RESUME_IRQ_MASK (0x400U)
-#define USBPHY_CTRL_SET_RESUME_IRQ_SHIFT (10U)
-#define USBPHY_CTRL_SET_RESUME_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_RESUME_IRQ_SHIFT)) & USBPHY_CTRL_SET_RESUME_IRQ_MASK)
-#define USBPHY_CTRL_SET_DEVPLUGIN_IRQ_MASK (0x1000U)
-#define USBPHY_CTRL_SET_DEVPLUGIN_IRQ_SHIFT (12U)
-#define USBPHY_CTRL_SET_DEVPLUGIN_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_DEVPLUGIN_IRQ_SHIFT)) & USBPHY_CTRL_SET_DEVPLUGIN_IRQ_MASK)
-#define USBPHY_CTRL_SET_ENUTMILEVEL2_MASK (0x4000U)
-#define USBPHY_CTRL_SET_ENUTMILEVEL2_SHIFT (14U)
-#define USBPHY_CTRL_SET_ENUTMILEVEL2(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENUTMILEVEL2_SHIFT)) & USBPHY_CTRL_SET_ENUTMILEVEL2_MASK)
-#define USBPHY_CTRL_SET_ENUTMILEVEL3_MASK (0x8000U)
-#define USBPHY_CTRL_SET_ENUTMILEVEL3_SHIFT (15U)
-#define USBPHY_CTRL_SET_ENUTMILEVEL3(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENUTMILEVEL3_SHIFT)) & USBPHY_CTRL_SET_ENUTMILEVEL3_MASK)
-#define USBPHY_CTRL_SET_ENIRQWAKEUP_MASK (0x10000U)
-#define USBPHY_CTRL_SET_ENIRQWAKEUP_SHIFT (16U)
-#define USBPHY_CTRL_SET_ENIRQWAKEUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENIRQWAKEUP_SHIFT)) & USBPHY_CTRL_SET_ENIRQWAKEUP_MASK)
-#define USBPHY_CTRL_SET_WAKEUP_IRQ_MASK (0x20000U)
-#define USBPHY_CTRL_SET_WAKEUP_IRQ_SHIFT (17U)
-#define USBPHY_CTRL_SET_WAKEUP_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_WAKEUP_IRQ_SHIFT)) & USBPHY_CTRL_SET_WAKEUP_IRQ_MASK)
-#define USBPHY_CTRL_SET_AUTORESUME_EN_MASK (0x40000U)
-#define USBPHY_CTRL_SET_AUTORESUME_EN_SHIFT (18U)
-#define USBPHY_CTRL_SET_AUTORESUME_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_AUTORESUME_EN_SHIFT)) & USBPHY_CTRL_SET_AUTORESUME_EN_MASK)
-#define USBPHY_CTRL_SET_ENAUTOCLR_CLKGATE_MASK (0x80000U)
-#define USBPHY_CTRL_SET_ENAUTOCLR_CLKGATE_SHIFT (19U)
-#define USBPHY_CTRL_SET_ENAUTOCLR_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENAUTOCLR_CLKGATE_SHIFT)) & USBPHY_CTRL_SET_ENAUTOCLR_CLKGATE_MASK)
-#define USBPHY_CTRL_SET_ENAUTOCLR_PHY_PWD_MASK (0x100000U)
-#define USBPHY_CTRL_SET_ENAUTOCLR_PHY_PWD_SHIFT (20U)
-#define USBPHY_CTRL_SET_ENAUTOCLR_PHY_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENAUTOCLR_PHY_PWD_SHIFT)) & USBPHY_CTRL_SET_ENAUTOCLR_PHY_PWD_MASK)
-#define USBPHY_CTRL_SET_ENDPDMCHG_WKUP_MASK (0x200000U)
-#define USBPHY_CTRL_SET_ENDPDMCHG_WKUP_SHIFT (21U)
-#define USBPHY_CTRL_SET_ENDPDMCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENDPDMCHG_WKUP_SHIFT)) & USBPHY_CTRL_SET_ENDPDMCHG_WKUP_MASK)
-#define USBPHY_CTRL_SET_ENVBUSCHG_WKUP_MASK (0x800000U)
-#define USBPHY_CTRL_SET_ENVBUSCHG_WKUP_SHIFT (23U)
-#define USBPHY_CTRL_SET_ENVBUSCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENVBUSCHG_WKUP_SHIFT)) & USBPHY_CTRL_SET_ENVBUSCHG_WKUP_MASK)
-#define USBPHY_CTRL_SET_ENAUTOCLR_USBCLKGATE_MASK (0x2000000U)
-#define USBPHY_CTRL_SET_ENAUTOCLR_USBCLKGATE_SHIFT (25U)
-#define USBPHY_CTRL_SET_ENAUTOCLR_USBCLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENAUTOCLR_USBCLKGATE_SHIFT)) & USBPHY_CTRL_SET_ENAUTOCLR_USBCLKGATE_MASK)
-#define USBPHY_CTRL_SET_ENAUTOSET_USBCLKS_MASK (0x4000000U)
-#define USBPHY_CTRL_SET_ENAUTOSET_USBCLKS_SHIFT (26U)
-#define USBPHY_CTRL_SET_ENAUTOSET_USBCLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_ENAUTOSET_USBCLKS_SHIFT)) & USBPHY_CTRL_SET_ENAUTOSET_USBCLKS_MASK)
-#define USBPHY_CTRL_SET_HOST_FORCE_LS_SE0_MASK (0x10000000U)
-#define USBPHY_CTRL_SET_HOST_FORCE_LS_SE0_SHIFT (28U)
-#define USBPHY_CTRL_SET_HOST_FORCE_LS_SE0(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_HOST_FORCE_LS_SE0_SHIFT)) & USBPHY_CTRL_SET_HOST_FORCE_LS_SE0_MASK)
-#define USBPHY_CTRL_SET_UTMI_SUSPENDM_MASK (0x20000000U)
-#define USBPHY_CTRL_SET_UTMI_SUSPENDM_SHIFT (29U)
-#define USBPHY_CTRL_SET_UTMI_SUSPENDM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_UTMI_SUSPENDM_SHIFT)) & USBPHY_CTRL_SET_UTMI_SUSPENDM_MASK)
-#define USBPHY_CTRL_SET_CLKGATE_MASK (0x40000000U)
-#define USBPHY_CTRL_SET_CLKGATE_SHIFT (30U)
-#define USBPHY_CTRL_SET_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_CLKGATE_SHIFT)) & USBPHY_CTRL_SET_CLKGATE_MASK)
-#define USBPHY_CTRL_SET_SFTRST_MASK (0x80000000U)
-#define USBPHY_CTRL_SET_SFTRST_SHIFT (31U)
-#define USBPHY_CTRL_SET_SFTRST(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_SET_SFTRST_SHIFT)) & USBPHY_CTRL_SET_SFTRST_MASK)
-/*! @} */
-
-/*! @name CTRL_CLR - USB PHY General Control Register */
-/*! @{ */
-#define USBPHY_CTRL_CLR_ENHOSTDISCONDETECT_MASK (0x2U)
-#define USBPHY_CTRL_CLR_ENHOSTDISCONDETECT_SHIFT (1U)
-#define USBPHY_CTRL_CLR_ENHOSTDISCONDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENHOSTDISCONDETECT_SHIFT)) & USBPHY_CTRL_CLR_ENHOSTDISCONDETECT_MASK)
-#define USBPHY_CTRL_CLR_ENIRQHOSTDISCON_MASK (0x4U)
-#define USBPHY_CTRL_CLR_ENIRQHOSTDISCON_SHIFT (2U)
-#define USBPHY_CTRL_CLR_ENIRQHOSTDISCON(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENIRQHOSTDISCON_SHIFT)) & USBPHY_CTRL_CLR_ENIRQHOSTDISCON_MASK)
-#define USBPHY_CTRL_CLR_HOSTDISCONDETECT_IRQ_MASK (0x8U)
-#define USBPHY_CTRL_CLR_HOSTDISCONDETECT_IRQ_SHIFT (3U)
-#define USBPHY_CTRL_CLR_HOSTDISCONDETECT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_HOSTDISCONDETECT_IRQ_SHIFT)) & USBPHY_CTRL_CLR_HOSTDISCONDETECT_IRQ_MASK)
-#define USBPHY_CTRL_CLR_ENDEVPLUGINDET_MASK (0x10U)
-#define USBPHY_CTRL_CLR_ENDEVPLUGINDET_SHIFT (4U)
-/*! ENDEVPLUGINDET
- * 0b0..Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)
- * 0b1..Enables 200kohm pullup resistors on USB_DP and USB_DM pins
- */
-#define USBPHY_CTRL_CLR_ENDEVPLUGINDET(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENDEVPLUGINDET_SHIFT)) & USBPHY_CTRL_CLR_ENDEVPLUGINDET_MASK)
-#define USBPHY_CTRL_CLR_DEVPLUGIN_POLARITY_MASK (0x20U)
-#define USBPHY_CTRL_CLR_DEVPLUGIN_POLARITY_SHIFT (5U)
-#define USBPHY_CTRL_CLR_DEVPLUGIN_POLARITY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_DEVPLUGIN_POLARITY_SHIFT)) & USBPHY_CTRL_CLR_DEVPLUGIN_POLARITY_MASK)
-#define USBPHY_CTRL_CLR_RESUMEIRQSTICKY_MASK (0x100U)
-#define USBPHY_CTRL_CLR_RESUMEIRQSTICKY_SHIFT (8U)
-#define USBPHY_CTRL_CLR_RESUMEIRQSTICKY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_RESUMEIRQSTICKY_SHIFT)) & USBPHY_CTRL_CLR_RESUMEIRQSTICKY_MASK)
-#define USBPHY_CTRL_CLR_ENIRQRESUMEDETECT_MASK (0x200U)
-#define USBPHY_CTRL_CLR_ENIRQRESUMEDETECT_SHIFT (9U)
-#define USBPHY_CTRL_CLR_ENIRQRESUMEDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENIRQRESUMEDETECT_SHIFT)) & USBPHY_CTRL_CLR_ENIRQRESUMEDETECT_MASK)
-#define USBPHY_CTRL_CLR_RESUME_IRQ_MASK (0x400U)
-#define USBPHY_CTRL_CLR_RESUME_IRQ_SHIFT (10U)
-#define USBPHY_CTRL_CLR_RESUME_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_RESUME_IRQ_SHIFT)) & USBPHY_CTRL_CLR_RESUME_IRQ_MASK)
-#define USBPHY_CTRL_CLR_DEVPLUGIN_IRQ_MASK (0x1000U)
-#define USBPHY_CTRL_CLR_DEVPLUGIN_IRQ_SHIFT (12U)
-#define USBPHY_CTRL_CLR_DEVPLUGIN_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_DEVPLUGIN_IRQ_SHIFT)) & USBPHY_CTRL_CLR_DEVPLUGIN_IRQ_MASK)
-#define USBPHY_CTRL_CLR_ENUTMILEVEL2_MASK (0x4000U)
-#define USBPHY_CTRL_CLR_ENUTMILEVEL2_SHIFT (14U)
-#define USBPHY_CTRL_CLR_ENUTMILEVEL2(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENUTMILEVEL2_SHIFT)) & USBPHY_CTRL_CLR_ENUTMILEVEL2_MASK)
-#define USBPHY_CTRL_CLR_ENUTMILEVEL3_MASK (0x8000U)
-#define USBPHY_CTRL_CLR_ENUTMILEVEL3_SHIFT (15U)
-#define USBPHY_CTRL_CLR_ENUTMILEVEL3(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENUTMILEVEL3_SHIFT)) & USBPHY_CTRL_CLR_ENUTMILEVEL3_MASK)
-#define USBPHY_CTRL_CLR_ENIRQWAKEUP_MASK (0x10000U)
-#define USBPHY_CTRL_CLR_ENIRQWAKEUP_SHIFT (16U)
-#define USBPHY_CTRL_CLR_ENIRQWAKEUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENIRQWAKEUP_SHIFT)) & USBPHY_CTRL_CLR_ENIRQWAKEUP_MASK)
-#define USBPHY_CTRL_CLR_WAKEUP_IRQ_MASK (0x20000U)
-#define USBPHY_CTRL_CLR_WAKEUP_IRQ_SHIFT (17U)
-#define USBPHY_CTRL_CLR_WAKEUP_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_WAKEUP_IRQ_SHIFT)) & USBPHY_CTRL_CLR_WAKEUP_IRQ_MASK)
-#define USBPHY_CTRL_CLR_AUTORESUME_EN_MASK (0x40000U)
-#define USBPHY_CTRL_CLR_AUTORESUME_EN_SHIFT (18U)
-#define USBPHY_CTRL_CLR_AUTORESUME_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_AUTORESUME_EN_SHIFT)) & USBPHY_CTRL_CLR_AUTORESUME_EN_MASK)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_CLKGATE_MASK (0x80000U)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_CLKGATE_SHIFT (19U)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENAUTOCLR_CLKGATE_SHIFT)) & USBPHY_CTRL_CLR_ENAUTOCLR_CLKGATE_MASK)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_PHY_PWD_MASK (0x100000U)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_PHY_PWD_SHIFT (20U)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_PHY_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENAUTOCLR_PHY_PWD_SHIFT)) & USBPHY_CTRL_CLR_ENAUTOCLR_PHY_PWD_MASK)
-#define USBPHY_CTRL_CLR_ENDPDMCHG_WKUP_MASK (0x200000U)
-#define USBPHY_CTRL_CLR_ENDPDMCHG_WKUP_SHIFT (21U)
-#define USBPHY_CTRL_CLR_ENDPDMCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENDPDMCHG_WKUP_SHIFT)) & USBPHY_CTRL_CLR_ENDPDMCHG_WKUP_MASK)
-#define USBPHY_CTRL_CLR_ENVBUSCHG_WKUP_MASK (0x800000U)
-#define USBPHY_CTRL_CLR_ENVBUSCHG_WKUP_SHIFT (23U)
-#define USBPHY_CTRL_CLR_ENVBUSCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENVBUSCHG_WKUP_SHIFT)) & USBPHY_CTRL_CLR_ENVBUSCHG_WKUP_MASK)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_USBCLKGATE_MASK (0x2000000U)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_USBCLKGATE_SHIFT (25U)
-#define USBPHY_CTRL_CLR_ENAUTOCLR_USBCLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENAUTOCLR_USBCLKGATE_SHIFT)) & USBPHY_CTRL_CLR_ENAUTOCLR_USBCLKGATE_MASK)
-#define USBPHY_CTRL_CLR_ENAUTOSET_USBCLKS_MASK (0x4000000U)
-#define USBPHY_CTRL_CLR_ENAUTOSET_USBCLKS_SHIFT (26U)
-#define USBPHY_CTRL_CLR_ENAUTOSET_USBCLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_ENAUTOSET_USBCLKS_SHIFT)) & USBPHY_CTRL_CLR_ENAUTOSET_USBCLKS_MASK)
-#define USBPHY_CTRL_CLR_HOST_FORCE_LS_SE0_MASK (0x10000000U)
-#define USBPHY_CTRL_CLR_HOST_FORCE_LS_SE0_SHIFT (28U)
-#define USBPHY_CTRL_CLR_HOST_FORCE_LS_SE0(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_HOST_FORCE_LS_SE0_SHIFT)) & USBPHY_CTRL_CLR_HOST_FORCE_LS_SE0_MASK)
-#define USBPHY_CTRL_CLR_UTMI_SUSPENDM_MASK (0x20000000U)
-#define USBPHY_CTRL_CLR_UTMI_SUSPENDM_SHIFT (29U)
-#define USBPHY_CTRL_CLR_UTMI_SUSPENDM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_UTMI_SUSPENDM_SHIFT)) & USBPHY_CTRL_CLR_UTMI_SUSPENDM_MASK)
-#define USBPHY_CTRL_CLR_CLKGATE_MASK (0x40000000U)
-#define USBPHY_CTRL_CLR_CLKGATE_SHIFT (30U)
-#define USBPHY_CTRL_CLR_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_CLKGATE_SHIFT)) & USBPHY_CTRL_CLR_CLKGATE_MASK)
-#define USBPHY_CTRL_CLR_SFTRST_MASK (0x80000000U)
-#define USBPHY_CTRL_CLR_SFTRST_SHIFT (31U)
-#define USBPHY_CTRL_CLR_SFTRST(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_CLR_SFTRST_SHIFT)) & USBPHY_CTRL_CLR_SFTRST_MASK)
-/*! @} */
-
-/*! @name CTRL_TOG - USB PHY General Control Register */
-/*! @{ */
-#define USBPHY_CTRL_TOG_ENHOSTDISCONDETECT_MASK (0x2U)
-#define USBPHY_CTRL_TOG_ENHOSTDISCONDETECT_SHIFT (1U)
-#define USBPHY_CTRL_TOG_ENHOSTDISCONDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENHOSTDISCONDETECT_SHIFT)) & USBPHY_CTRL_TOG_ENHOSTDISCONDETECT_MASK)
-#define USBPHY_CTRL_TOG_ENIRQHOSTDISCON_MASK (0x4U)
-#define USBPHY_CTRL_TOG_ENIRQHOSTDISCON_SHIFT (2U)
-#define USBPHY_CTRL_TOG_ENIRQHOSTDISCON(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENIRQHOSTDISCON_SHIFT)) & USBPHY_CTRL_TOG_ENIRQHOSTDISCON_MASK)
-#define USBPHY_CTRL_TOG_HOSTDISCONDETECT_IRQ_MASK (0x8U)
-#define USBPHY_CTRL_TOG_HOSTDISCONDETECT_IRQ_SHIFT (3U)
-#define USBPHY_CTRL_TOG_HOSTDISCONDETECT_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_HOSTDISCONDETECT_IRQ_SHIFT)) & USBPHY_CTRL_TOG_HOSTDISCONDETECT_IRQ_MASK)
-#define USBPHY_CTRL_TOG_ENDEVPLUGINDET_MASK (0x10U)
-#define USBPHY_CTRL_TOG_ENDEVPLUGINDET_SHIFT (4U)
-/*! ENDEVPLUGINDET
- * 0b0..Disables 200kohm pullup resistors on USB_DP and USB_DM pins (Default)
- * 0b1..Enables 200kohm pullup resistors on USB_DP and USB_DM pins
- */
-#define USBPHY_CTRL_TOG_ENDEVPLUGINDET(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENDEVPLUGINDET_SHIFT)) & USBPHY_CTRL_TOG_ENDEVPLUGINDET_MASK)
-#define USBPHY_CTRL_TOG_DEVPLUGIN_POLARITY_MASK (0x20U)
-#define USBPHY_CTRL_TOG_DEVPLUGIN_POLARITY_SHIFT (5U)
-#define USBPHY_CTRL_TOG_DEVPLUGIN_POLARITY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_DEVPLUGIN_POLARITY_SHIFT)) & USBPHY_CTRL_TOG_DEVPLUGIN_POLARITY_MASK)
-#define USBPHY_CTRL_TOG_RESUMEIRQSTICKY_MASK (0x100U)
-#define USBPHY_CTRL_TOG_RESUMEIRQSTICKY_SHIFT (8U)
-#define USBPHY_CTRL_TOG_RESUMEIRQSTICKY(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_RESUMEIRQSTICKY_SHIFT)) & USBPHY_CTRL_TOG_RESUMEIRQSTICKY_MASK)
-#define USBPHY_CTRL_TOG_ENIRQRESUMEDETECT_MASK (0x200U)
-#define USBPHY_CTRL_TOG_ENIRQRESUMEDETECT_SHIFT (9U)
-#define USBPHY_CTRL_TOG_ENIRQRESUMEDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENIRQRESUMEDETECT_SHIFT)) & USBPHY_CTRL_TOG_ENIRQRESUMEDETECT_MASK)
-#define USBPHY_CTRL_TOG_RESUME_IRQ_MASK (0x400U)
-#define USBPHY_CTRL_TOG_RESUME_IRQ_SHIFT (10U)
-#define USBPHY_CTRL_TOG_RESUME_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_RESUME_IRQ_SHIFT)) & USBPHY_CTRL_TOG_RESUME_IRQ_MASK)
-#define USBPHY_CTRL_TOG_DEVPLUGIN_IRQ_MASK (0x1000U)
-#define USBPHY_CTRL_TOG_DEVPLUGIN_IRQ_SHIFT (12U)
-#define USBPHY_CTRL_TOG_DEVPLUGIN_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_DEVPLUGIN_IRQ_SHIFT)) & USBPHY_CTRL_TOG_DEVPLUGIN_IRQ_MASK)
-#define USBPHY_CTRL_TOG_ENUTMILEVEL2_MASK (0x4000U)
-#define USBPHY_CTRL_TOG_ENUTMILEVEL2_SHIFT (14U)
-#define USBPHY_CTRL_TOG_ENUTMILEVEL2(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENUTMILEVEL2_SHIFT)) & USBPHY_CTRL_TOG_ENUTMILEVEL2_MASK)
-#define USBPHY_CTRL_TOG_ENUTMILEVEL3_MASK (0x8000U)
-#define USBPHY_CTRL_TOG_ENUTMILEVEL3_SHIFT (15U)
-#define USBPHY_CTRL_TOG_ENUTMILEVEL3(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENUTMILEVEL3_SHIFT)) & USBPHY_CTRL_TOG_ENUTMILEVEL3_MASK)
-#define USBPHY_CTRL_TOG_ENIRQWAKEUP_MASK (0x10000U)
-#define USBPHY_CTRL_TOG_ENIRQWAKEUP_SHIFT (16U)
-#define USBPHY_CTRL_TOG_ENIRQWAKEUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENIRQWAKEUP_SHIFT)) & USBPHY_CTRL_TOG_ENIRQWAKEUP_MASK)
-#define USBPHY_CTRL_TOG_WAKEUP_IRQ_MASK (0x20000U)
-#define USBPHY_CTRL_TOG_WAKEUP_IRQ_SHIFT (17U)
-#define USBPHY_CTRL_TOG_WAKEUP_IRQ(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_WAKEUP_IRQ_SHIFT)) & USBPHY_CTRL_TOG_WAKEUP_IRQ_MASK)
-#define USBPHY_CTRL_TOG_AUTORESUME_EN_MASK (0x40000U)
-#define USBPHY_CTRL_TOG_AUTORESUME_EN_SHIFT (18U)
-#define USBPHY_CTRL_TOG_AUTORESUME_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_AUTORESUME_EN_SHIFT)) & USBPHY_CTRL_TOG_AUTORESUME_EN_MASK)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_CLKGATE_MASK (0x80000U)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_CLKGATE_SHIFT (19U)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENAUTOCLR_CLKGATE_SHIFT)) & USBPHY_CTRL_TOG_ENAUTOCLR_CLKGATE_MASK)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_PHY_PWD_MASK (0x100000U)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_PHY_PWD_SHIFT (20U)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_PHY_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENAUTOCLR_PHY_PWD_SHIFT)) & USBPHY_CTRL_TOG_ENAUTOCLR_PHY_PWD_MASK)
-#define USBPHY_CTRL_TOG_ENDPDMCHG_WKUP_MASK (0x200000U)
-#define USBPHY_CTRL_TOG_ENDPDMCHG_WKUP_SHIFT (21U)
-#define USBPHY_CTRL_TOG_ENDPDMCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENDPDMCHG_WKUP_SHIFT)) & USBPHY_CTRL_TOG_ENDPDMCHG_WKUP_MASK)
-#define USBPHY_CTRL_TOG_ENVBUSCHG_WKUP_MASK (0x800000U)
-#define USBPHY_CTRL_TOG_ENVBUSCHG_WKUP_SHIFT (23U)
-#define USBPHY_CTRL_TOG_ENVBUSCHG_WKUP(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENVBUSCHG_WKUP_SHIFT)) & USBPHY_CTRL_TOG_ENVBUSCHG_WKUP_MASK)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_USBCLKGATE_MASK (0x2000000U)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_USBCLKGATE_SHIFT (25U)
-#define USBPHY_CTRL_TOG_ENAUTOCLR_USBCLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENAUTOCLR_USBCLKGATE_SHIFT)) & USBPHY_CTRL_TOG_ENAUTOCLR_USBCLKGATE_MASK)
-#define USBPHY_CTRL_TOG_ENAUTOSET_USBCLKS_MASK (0x4000000U)
-#define USBPHY_CTRL_TOG_ENAUTOSET_USBCLKS_SHIFT (26U)
-#define USBPHY_CTRL_TOG_ENAUTOSET_USBCLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_ENAUTOSET_USBCLKS_SHIFT)) & USBPHY_CTRL_TOG_ENAUTOSET_USBCLKS_MASK)
-#define USBPHY_CTRL_TOG_HOST_FORCE_LS_SE0_MASK (0x10000000U)
-#define USBPHY_CTRL_TOG_HOST_FORCE_LS_SE0_SHIFT (28U)
-#define USBPHY_CTRL_TOG_HOST_FORCE_LS_SE0(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_HOST_FORCE_LS_SE0_SHIFT)) & USBPHY_CTRL_TOG_HOST_FORCE_LS_SE0_MASK)
-#define USBPHY_CTRL_TOG_UTMI_SUSPENDM_MASK (0x20000000U)
-#define USBPHY_CTRL_TOG_UTMI_SUSPENDM_SHIFT (29U)
-#define USBPHY_CTRL_TOG_UTMI_SUSPENDM(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_UTMI_SUSPENDM_SHIFT)) & USBPHY_CTRL_TOG_UTMI_SUSPENDM_MASK)
-#define USBPHY_CTRL_TOG_CLKGATE_MASK (0x40000000U)
-#define USBPHY_CTRL_TOG_CLKGATE_SHIFT (30U)
-#define USBPHY_CTRL_TOG_CLKGATE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_CLKGATE_SHIFT)) & USBPHY_CTRL_TOG_CLKGATE_MASK)
-#define USBPHY_CTRL_TOG_SFTRST_MASK (0x80000000U)
-#define USBPHY_CTRL_TOG_SFTRST_SHIFT (31U)
-#define USBPHY_CTRL_TOG_SFTRST(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_CTRL_TOG_SFTRST_SHIFT)) & USBPHY_CTRL_TOG_SFTRST_MASK)
-/*! @} */
-
-/*! @name STATUS - USB PHY Status Register */
-/*! @{ */
-#define USBPHY_STATUS_OK_STATUS_3V_MASK (0x1U)
-#define USBPHY_STATUS_OK_STATUS_3V_SHIFT (0U)
-#define USBPHY_STATUS_OK_STATUS_3V(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_STATUS_OK_STATUS_3V_SHIFT)) & USBPHY_STATUS_OK_STATUS_3V_MASK)
-#define USBPHY_STATUS_HOSTDISCONDETECT_STATUS_MASK (0x8U)
-#define USBPHY_STATUS_HOSTDISCONDETECT_STATUS_SHIFT (3U)
-/*! HOSTDISCONDETECT_STATUS
- * 0b0..USB cable disconnect has not been detected at the local host
- * 0b1..USB cable disconnect has been detected at the local host
- */
-#define USBPHY_STATUS_HOSTDISCONDETECT_STATUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_STATUS_HOSTDISCONDETECT_STATUS_SHIFT)) & USBPHY_STATUS_HOSTDISCONDETECT_STATUS_MASK)
-#define USBPHY_STATUS_DEVPLUGIN_STATUS_MASK (0x40U)
-#define USBPHY_STATUS_DEVPLUGIN_STATUS_SHIFT (6U)
-/*! DEVPLUGIN_STATUS
- * 0b0..No attachment to a USB host is detected
- * 0b1..Cable attachment to a USB host is detected
- */
-#define USBPHY_STATUS_DEVPLUGIN_STATUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_STATUS_DEVPLUGIN_STATUS_SHIFT)) & USBPHY_STATUS_DEVPLUGIN_STATUS_MASK)
-#define USBPHY_STATUS_RESUME_STATUS_MASK (0x400U)
-#define USBPHY_STATUS_RESUME_STATUS_SHIFT (10U)
-#define USBPHY_STATUS_RESUME_STATUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_STATUS_RESUME_STATUS_SHIFT)) & USBPHY_STATUS_RESUME_STATUS_MASK)
-/*! @} */
-
-/*! @name PLL_SIC - USB PHY PLL Control/Status Register */
-/*! @{ */
-#define USBPHY_PLL_SIC_PLL_EN_USB_CLKS_MASK (0x40U)
-#define USBPHY_PLL_SIC_PLL_EN_USB_CLKS_SHIFT (6U)
-#define USBPHY_PLL_SIC_PLL_EN_USB_CLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_EN_USB_CLKS_SHIFT)) & USBPHY_PLL_SIC_PLL_EN_USB_CLKS_MASK)
-#define USBPHY_PLL_SIC_PLL_POWER_MASK (0x1000U)
-#define USBPHY_PLL_SIC_PLL_POWER_SHIFT (12U)
-#define USBPHY_PLL_SIC_PLL_POWER(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_POWER_SHIFT)) & USBPHY_PLL_SIC_PLL_POWER_MASK)
-#define USBPHY_PLL_SIC_PLL_ENABLE_MASK (0x2000U)
-#define USBPHY_PLL_SIC_PLL_ENABLE_SHIFT (13U)
-#define USBPHY_PLL_SIC_PLL_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_ENABLE_SHIFT)) & USBPHY_PLL_SIC_PLL_ENABLE_MASK)
-#define USBPHY_PLL_SIC_REFBIAS_PWD_SEL_MASK (0x80000U)
-#define USBPHY_PLL_SIC_REFBIAS_PWD_SEL_SHIFT (19U)
-/*! REFBIAS_PWD_SEL
- * 0b0..Selects PLL_POWER to control the reference bias
- * 0b1..Selects REFBIAS_PWD to control the reference bias
- */
-#define USBPHY_PLL_SIC_REFBIAS_PWD_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_REFBIAS_PWD_SEL_SHIFT)) & USBPHY_PLL_SIC_REFBIAS_PWD_SEL_MASK)
-#define USBPHY_PLL_SIC_REFBIAS_PWD_MASK (0x100000U)
-#define USBPHY_PLL_SIC_REFBIAS_PWD_SHIFT (20U)
-#define USBPHY_PLL_SIC_REFBIAS_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_REFBIAS_PWD_SHIFT)) & USBPHY_PLL_SIC_REFBIAS_PWD_MASK)
-#define USBPHY_PLL_SIC_PLL_REG_ENABLE_MASK (0x200000U)
-#define USBPHY_PLL_SIC_PLL_REG_ENABLE_SHIFT (21U)
-#define USBPHY_PLL_SIC_PLL_REG_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_REG_ENABLE_SHIFT)) & USBPHY_PLL_SIC_PLL_REG_ENABLE_MASK)
-#define USBPHY_PLL_SIC_PLL_DIV_SEL_MASK (0x1C00000U)
-#define USBPHY_PLL_SIC_PLL_DIV_SEL_SHIFT (22U)
-/*! PLL_DIV_SEL
- * 0b000..Divide by 13
- * 0b001..Divide by 15
- * 0b010..Divide by 16
- * 0b011..Divide by 20
- * 0b100..Divide by 22
- * 0b101..Divide by 25
- * 0b110..Divide by 30
- * 0b111..Divide by 240
- */
-#define USBPHY_PLL_SIC_PLL_DIV_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_DIV_SEL_SHIFT)) & USBPHY_PLL_SIC_PLL_DIV_SEL_MASK)
-#define USBPHY_PLL_SIC_PLL_PREDIV_MASK (0x40000000U)
-#define USBPHY_PLL_SIC_PLL_PREDIV_SHIFT (30U)
-#define USBPHY_PLL_SIC_PLL_PREDIV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_PREDIV_SHIFT)) & USBPHY_PLL_SIC_PLL_PREDIV_MASK)
-#define USBPHY_PLL_SIC_PLL_LOCK_MASK (0x80000000U)
-#define USBPHY_PLL_SIC_PLL_LOCK_SHIFT (31U)
-/*! PLL_LOCK
- * 0b0..PLL is not currently locked
- * 0b1..PLL is currently locked
- */
-#define USBPHY_PLL_SIC_PLL_LOCK(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_PLL_LOCK_SHIFT)) & USBPHY_PLL_SIC_PLL_LOCK_MASK)
-/*! @} */
-
-/*! @name PLL_SIC_SET - USB PHY PLL Control/Status Register */
-/*! @{ */
-#define USBPHY_PLL_SIC_SET_PLL_EN_USB_CLKS_MASK (0x40U)
-#define USBPHY_PLL_SIC_SET_PLL_EN_USB_CLKS_SHIFT (6U)
-#define USBPHY_PLL_SIC_SET_PLL_EN_USB_CLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_EN_USB_CLKS_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_EN_USB_CLKS_MASK)
-#define USBPHY_PLL_SIC_SET_PLL_POWER_MASK (0x1000U)
-#define USBPHY_PLL_SIC_SET_PLL_POWER_SHIFT (12U)
-#define USBPHY_PLL_SIC_SET_PLL_POWER(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_POWER_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_POWER_MASK)
-#define USBPHY_PLL_SIC_SET_PLL_ENABLE_MASK (0x2000U)
-#define USBPHY_PLL_SIC_SET_PLL_ENABLE_SHIFT (13U)
-#define USBPHY_PLL_SIC_SET_PLL_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_ENABLE_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_ENABLE_MASK)
-#define USBPHY_PLL_SIC_SET_REFBIAS_PWD_SEL_MASK (0x80000U)
-#define USBPHY_PLL_SIC_SET_REFBIAS_PWD_SEL_SHIFT (19U)
-/*! REFBIAS_PWD_SEL
- * 0b0..Selects PLL_POWER to control the reference bias
- * 0b1..Selects REFBIAS_PWD to control the reference bias
- */
-#define USBPHY_PLL_SIC_SET_REFBIAS_PWD_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_REFBIAS_PWD_SEL_SHIFT)) & USBPHY_PLL_SIC_SET_REFBIAS_PWD_SEL_MASK)
-#define USBPHY_PLL_SIC_SET_REFBIAS_PWD_MASK (0x100000U)
-#define USBPHY_PLL_SIC_SET_REFBIAS_PWD_SHIFT (20U)
-#define USBPHY_PLL_SIC_SET_REFBIAS_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_REFBIAS_PWD_SHIFT)) & USBPHY_PLL_SIC_SET_REFBIAS_PWD_MASK)
-#define USBPHY_PLL_SIC_SET_PLL_REG_ENABLE_MASK (0x200000U)
-#define USBPHY_PLL_SIC_SET_PLL_REG_ENABLE_SHIFT (21U)
-#define USBPHY_PLL_SIC_SET_PLL_REG_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_REG_ENABLE_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_REG_ENABLE_MASK)
-#define USBPHY_PLL_SIC_SET_PLL_DIV_SEL_MASK (0x1C00000U)
-#define USBPHY_PLL_SIC_SET_PLL_DIV_SEL_SHIFT (22U)
-/*! PLL_DIV_SEL
- * 0b000..Divide by 13
- * 0b001..Divide by 15
- * 0b010..Divide by 16
- * 0b011..Divide by 20
- * 0b100..Divide by 22
- * 0b101..Divide by 25
- * 0b110..Divide by 30
- * 0b111..Divide by 240
- */
-#define USBPHY_PLL_SIC_SET_PLL_DIV_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_DIV_SEL_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_DIV_SEL_MASK)
-#define USBPHY_PLL_SIC_SET_PLL_PREDIV_MASK (0x40000000U)
-#define USBPHY_PLL_SIC_SET_PLL_PREDIV_SHIFT (30U)
-#define USBPHY_PLL_SIC_SET_PLL_PREDIV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_PREDIV_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_PREDIV_MASK)
-#define USBPHY_PLL_SIC_SET_PLL_LOCK_MASK (0x80000000U)
-#define USBPHY_PLL_SIC_SET_PLL_LOCK_SHIFT (31U)
-/*! PLL_LOCK
- * 0b0..PLL is not currently locked
- * 0b1..PLL is currently locked
- */
-#define USBPHY_PLL_SIC_SET_PLL_LOCK(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_SET_PLL_LOCK_SHIFT)) & USBPHY_PLL_SIC_SET_PLL_LOCK_MASK)
-/*! @} */
-
-/*! @name PLL_SIC_CLR - USB PHY PLL Control/Status Register */
-/*! @{ */
-#define USBPHY_PLL_SIC_CLR_PLL_EN_USB_CLKS_MASK (0x40U)
-#define USBPHY_PLL_SIC_CLR_PLL_EN_USB_CLKS_SHIFT (6U)
-#define USBPHY_PLL_SIC_CLR_PLL_EN_USB_CLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_EN_USB_CLKS_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_EN_USB_CLKS_MASK)
-#define USBPHY_PLL_SIC_CLR_PLL_POWER_MASK (0x1000U)
-#define USBPHY_PLL_SIC_CLR_PLL_POWER_SHIFT (12U)
-#define USBPHY_PLL_SIC_CLR_PLL_POWER(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_POWER_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_POWER_MASK)
-#define USBPHY_PLL_SIC_CLR_PLL_ENABLE_MASK (0x2000U)
-#define USBPHY_PLL_SIC_CLR_PLL_ENABLE_SHIFT (13U)
-#define USBPHY_PLL_SIC_CLR_PLL_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_ENABLE_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_ENABLE_MASK)
-#define USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SEL_MASK (0x80000U)
-#define USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SEL_SHIFT (19U)
-/*! REFBIAS_PWD_SEL
- * 0b0..Selects PLL_POWER to control the reference bias
- * 0b1..Selects REFBIAS_PWD to control the reference bias
- */
-#define USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SEL_SHIFT)) & USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SEL_MASK)
-#define USBPHY_PLL_SIC_CLR_REFBIAS_PWD_MASK (0x100000U)
-#define USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SHIFT (20U)
-#define USBPHY_PLL_SIC_CLR_REFBIAS_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_REFBIAS_PWD_SHIFT)) & USBPHY_PLL_SIC_CLR_REFBIAS_PWD_MASK)
-#define USBPHY_PLL_SIC_CLR_PLL_REG_ENABLE_MASK (0x200000U)
-#define USBPHY_PLL_SIC_CLR_PLL_REG_ENABLE_SHIFT (21U)
-#define USBPHY_PLL_SIC_CLR_PLL_REG_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_REG_ENABLE_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_REG_ENABLE_MASK)
-#define USBPHY_PLL_SIC_CLR_PLL_DIV_SEL_MASK (0x1C00000U)
-#define USBPHY_PLL_SIC_CLR_PLL_DIV_SEL_SHIFT (22U)
-/*! PLL_DIV_SEL
- * 0b000..Divide by 13
- * 0b001..Divide by 15
- * 0b010..Divide by 16
- * 0b011..Divide by 20
- * 0b100..Divide by 22
- * 0b101..Divide by 25
- * 0b110..Divide by 30
- * 0b111..Divide by 240
- */
-#define USBPHY_PLL_SIC_CLR_PLL_DIV_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_DIV_SEL_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_DIV_SEL_MASK)
-#define USBPHY_PLL_SIC_CLR_PLL_PREDIV_MASK (0x40000000U)
-#define USBPHY_PLL_SIC_CLR_PLL_PREDIV_SHIFT (30U)
-#define USBPHY_PLL_SIC_CLR_PLL_PREDIV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_PREDIV_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_PREDIV_MASK)
-#define USBPHY_PLL_SIC_CLR_PLL_LOCK_MASK (0x80000000U)
-#define USBPHY_PLL_SIC_CLR_PLL_LOCK_SHIFT (31U)
-/*! PLL_LOCK
- * 0b0..PLL is not currently locked
- * 0b1..PLL is currently locked
- */
-#define USBPHY_PLL_SIC_CLR_PLL_LOCK(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_CLR_PLL_LOCK_SHIFT)) & USBPHY_PLL_SIC_CLR_PLL_LOCK_MASK)
-/*! @} */
-
-/*! @name PLL_SIC_TOG - USB PHY PLL Control/Status Register */
-/*! @{ */
-#define USBPHY_PLL_SIC_TOG_PLL_EN_USB_CLKS_MASK (0x40U)
-#define USBPHY_PLL_SIC_TOG_PLL_EN_USB_CLKS_SHIFT (6U)
-#define USBPHY_PLL_SIC_TOG_PLL_EN_USB_CLKS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_EN_USB_CLKS_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_EN_USB_CLKS_MASK)
-#define USBPHY_PLL_SIC_TOG_PLL_POWER_MASK (0x1000U)
-#define USBPHY_PLL_SIC_TOG_PLL_POWER_SHIFT (12U)
-#define USBPHY_PLL_SIC_TOG_PLL_POWER(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_POWER_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_POWER_MASK)
-#define USBPHY_PLL_SIC_TOG_PLL_ENABLE_MASK (0x2000U)
-#define USBPHY_PLL_SIC_TOG_PLL_ENABLE_SHIFT (13U)
-#define USBPHY_PLL_SIC_TOG_PLL_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_ENABLE_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_ENABLE_MASK)
-#define USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SEL_MASK (0x80000U)
-#define USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SEL_SHIFT (19U)
-/*! REFBIAS_PWD_SEL
- * 0b0..Selects PLL_POWER to control the reference bias
- * 0b1..Selects REFBIAS_PWD to control the reference bias
- */
-#define USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SEL_SHIFT)) & USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SEL_MASK)
-#define USBPHY_PLL_SIC_TOG_REFBIAS_PWD_MASK (0x100000U)
-#define USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SHIFT (20U)
-#define USBPHY_PLL_SIC_TOG_REFBIAS_PWD(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_REFBIAS_PWD_SHIFT)) & USBPHY_PLL_SIC_TOG_REFBIAS_PWD_MASK)
-#define USBPHY_PLL_SIC_TOG_PLL_REG_ENABLE_MASK (0x200000U)
-#define USBPHY_PLL_SIC_TOG_PLL_REG_ENABLE_SHIFT (21U)
-#define USBPHY_PLL_SIC_TOG_PLL_REG_ENABLE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_REG_ENABLE_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_REG_ENABLE_MASK)
-#define USBPHY_PLL_SIC_TOG_PLL_DIV_SEL_MASK (0x1C00000U)
-#define USBPHY_PLL_SIC_TOG_PLL_DIV_SEL_SHIFT (22U)
-/*! PLL_DIV_SEL
- * 0b000..Divide by 13
- * 0b001..Divide by 15
- * 0b010..Divide by 16
- * 0b011..Divide by 20
- * 0b100..Divide by 22
- * 0b101..Divide by 25
- * 0b110..Divide by 30
- * 0b111..Divide by 240
- */
-#define USBPHY_PLL_SIC_TOG_PLL_DIV_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_DIV_SEL_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_DIV_SEL_MASK)
-#define USBPHY_PLL_SIC_TOG_PLL_PREDIV_MASK (0x40000000U)
-#define USBPHY_PLL_SIC_TOG_PLL_PREDIV_SHIFT (30U)
-#define USBPHY_PLL_SIC_TOG_PLL_PREDIV(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_PREDIV_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_PREDIV_MASK)
-#define USBPHY_PLL_SIC_TOG_PLL_LOCK_MASK (0x80000000U)
-#define USBPHY_PLL_SIC_TOG_PLL_LOCK_SHIFT (31U)
-/*! PLL_LOCK
- * 0b0..PLL is not currently locked
- * 0b1..PLL is currently locked
- */
-#define USBPHY_PLL_SIC_TOG_PLL_LOCK(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_PLL_SIC_TOG_PLL_LOCK_SHIFT)) & USBPHY_PLL_SIC_TOG_PLL_LOCK_MASK)
-/*! @} */
-
-/*! @name USB1_VBUS_DETECT - USB PHY VBUS Detect Control Register */
-/*! @{ */
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_THRESH_MASK (0x7U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_THRESH_SHIFT (0U)
-/*! VBUSVALID_THRESH
- * 0b000..4.0V
- * 0b001..4.1V
- * 0b010..4.2V
- * 0b011..4.3V
- * 0b100..4.4V(Default)
- * 0b101..4.5V
- * 0b110..4.6V
- * 0b111..4.7V
- */
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_THRESH(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUSVALID_THRESH_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUSVALID_THRESH_MASK)
-#define USBPHY_USB1_VBUS_DETECT_VBUS_OVERRIDE_EN_MASK (0x8U)
-#define USBPHY_USB1_VBUS_DETECT_VBUS_OVERRIDE_EN_SHIFT (3U)
-/*! VBUS_OVERRIDE_EN
- * 0b0..Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)
- * 0b1..Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND
- */
-#define USBPHY_USB1_VBUS_DETECT_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SESSEND_OVERRIDE_MASK (0x10U)
-#define USBPHY_USB1_VBUS_DETECT_SESSEND_OVERRIDE_SHIFT (4U)
-#define USBPHY_USB1_VBUS_DETECT_SESSEND_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SESSEND_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SESSEND_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_BVALID_OVERRIDE_MASK (0x20U)
-#define USBPHY_USB1_VBUS_DETECT_BVALID_OVERRIDE_SHIFT (5U)
-#define USBPHY_USB1_VBUS_DETECT_BVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_BVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_BVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_AVALID_OVERRIDE_MASK (0x40U)
-#define USBPHY_USB1_VBUS_DETECT_AVALID_OVERRIDE_SHIFT (6U)
-#define USBPHY_USB1_VBUS_DETECT_AVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_AVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_AVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_OVERRIDE_MASK (0x80U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_OVERRIDE_SHIFT (7U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUSVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUSVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_SEL_MASK (0x100U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_SEL_SHIFT (8U)
-/*! VBUSVALID_SEL
- * 0b0..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b1..Use the VBUS_VALID_3V detector results for signal reported to the USB controller
- */
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUSVALID_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUSVALID_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_VBUS_SOURCE_SEL_MASK (0x600U)
-#define USBPHY_USB1_VBUS_DETECT_VBUS_SOURCE_SEL_SHIFT (9U)
-/*! VBUS_SOURCE_SEL
- * 0b00..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b01..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b10..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b11..Reserved, do not use
- */
-#define USBPHY_USB1_VBUS_DETECT_VBUS_SOURCE_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUS_SOURCE_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUS_SOURCE_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_EN_MASK (0x800U)
-#define USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_EN_SHIFT (11U)
-#define USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_MASK (0x1000U)
-#define USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_SHIFT (12U)
-#define USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_ID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_EXT_ID_OVERRIDE_EN_MASK (0x2000U)
-#define USBPHY_USB1_VBUS_DETECT_EXT_ID_OVERRIDE_EN_SHIFT (13U)
-/*! EXT_ID_OVERRIDE_EN
- * 0b0..Select the Muxed value chosen using ID_OVERRIDE_EN.
- * 0b1..Select the external ID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_EXT_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_EXT_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_EXT_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_EXT_VBUS_OVERRIDE_EN_MASK (0x4000U)
-#define USBPHY_USB1_VBUS_DETECT_EXT_VBUS_OVERRIDE_EN_SHIFT (14U)
-/*! EXT_VBUS_OVERRIDE_EN
- * 0b0..Select the Muxed value chosen using VBUS_OVERRIDE_EN.
- * 0b1..Select the external VBUS VALID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_EXT_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_EXT_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_EXT_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_MASK (0x40000U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_SHIFT (18U)
-/*! VBUSVALID_TO_SESSVALID
- * 0b0..Use the VBUS_VALID comparator for VBUS_VALID results
- * 0b1..Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V.
- */
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_MASK)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_5VDETECT_MASK (0x80000U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_5VDETECT_SHIFT (19U)
-#define USBPHY_USB1_VBUS_DETECT_VBUSVALID_5VDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_VBUSVALID_5VDETECT_SHIFT)) & USBPHY_USB1_VBUS_DETECT_VBUSVALID_5VDETECT_MASK)
-#define USBPHY_USB1_VBUS_DETECT_PWRUP_CMPS_MASK (0x700000U)
-#define USBPHY_USB1_VBUS_DETECT_PWRUP_CMPS_SHIFT (20U)
-/*! PWRUP_CMPS
- * 0b000..Powers down the VBUS_VALID comparator
- * 0b111..Enables the VBUS_VALID comparator (default)
- */
-#define USBPHY_USB1_VBUS_DETECT_PWRUP_CMPS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_PWRUP_CMPS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_PWRUP_CMPS_MASK)
-#define USBPHY_USB1_VBUS_DETECT_DISCHARGE_VBUS_MASK (0x4000000U)
-#define USBPHY_USB1_VBUS_DETECT_DISCHARGE_VBUS_SHIFT (26U)
-/*! DISCHARGE_VBUS
- * 0b0..VBUS discharge resistor is disabled (Default)
- * 0b1..VBUS discharge resistor is enabled
- */
-#define USBPHY_USB1_VBUS_DETECT_DISCHARGE_VBUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_DISCHARGE_VBUS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_DISCHARGE_VBUS_MASK)
-/*! @} */
-
-/*! @name USB1_VBUS_DETECT_SET - USB PHY VBUS Detect Control Register */
-/*! @{ */
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_THRESH_MASK (0x7U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_THRESH_SHIFT (0U)
-/*! VBUSVALID_THRESH
- * 0b000..4.0V
- * 0b001..4.1V
- * 0b010..4.2V
- * 0b011..4.3V
- * 0b100..4.4V(Default)
- * 0b101..4.5V
- * 0b110..4.6V
- * 0b111..4.7V
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_THRESH(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_THRESH_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_THRESH_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUS_OVERRIDE_EN_MASK (0x8U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUS_OVERRIDE_EN_SHIFT (3U)
-/*! VBUS_OVERRIDE_EN
- * 0b0..Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)
- * 0b1..Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_SESSEND_OVERRIDE_MASK (0x10U)
-#define USBPHY_USB1_VBUS_DETECT_SET_SESSEND_OVERRIDE_SHIFT (4U)
-#define USBPHY_USB1_VBUS_DETECT_SET_SESSEND_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_SESSEND_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_SESSEND_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_BVALID_OVERRIDE_MASK (0x20U)
-#define USBPHY_USB1_VBUS_DETECT_SET_BVALID_OVERRIDE_SHIFT (5U)
-#define USBPHY_USB1_VBUS_DETECT_SET_BVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_BVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_BVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_AVALID_OVERRIDE_MASK (0x40U)
-#define USBPHY_USB1_VBUS_DETECT_SET_AVALID_OVERRIDE_SHIFT (6U)
-#define USBPHY_USB1_VBUS_DETECT_SET_AVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_AVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_AVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_OVERRIDE_MASK (0x80U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_OVERRIDE_SHIFT (7U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_SEL_MASK (0x100U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_SEL_SHIFT (8U)
-/*! VBUSVALID_SEL
- * 0b0..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b1..Use the VBUS_VALID_3V detector results for signal reported to the USB controller
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUS_SOURCE_SEL_MASK (0x600U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUS_SOURCE_SEL_SHIFT (9U)
-/*! VBUS_SOURCE_SEL
- * 0b00..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b01..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b10..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b11..Reserved, do not use
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUS_SOURCE_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUS_SOURCE_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUS_SOURCE_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_EN_MASK (0x800U)
-#define USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_EN_SHIFT (11U)
-#define USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_MASK (0x1000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_SHIFT (12U)
-#define USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_ID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_EXT_ID_OVERRIDE_EN_MASK (0x2000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_EXT_ID_OVERRIDE_EN_SHIFT (13U)
-/*! EXT_ID_OVERRIDE_EN
- * 0b0..Select the Muxed value chosen using ID_OVERRIDE_EN.
- * 0b1..Select the external ID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_EXT_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_EXT_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_EXT_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_EXT_VBUS_OVERRIDE_EN_MASK (0x4000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_EXT_VBUS_OVERRIDE_EN_SHIFT (14U)
-/*! EXT_VBUS_OVERRIDE_EN
- * 0b0..Select the Muxed value chosen using VBUS_OVERRIDE_EN.
- * 0b1..Select the external VBUS VALID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_EXT_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_EXT_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_EXT_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_TO_SESSVALID_MASK (0x40000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_TO_SESSVALID_SHIFT (18U)
-/*! VBUSVALID_TO_SESSVALID
- * 0b0..Use the VBUS_VALID comparator for VBUS_VALID results
- * 0b1..Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V.
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_TO_SESSVALID(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_TO_SESSVALID_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_TO_SESSVALID_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_5VDETECT_MASK (0x80000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_5VDETECT_SHIFT (19U)
-#define USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_5VDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_5VDETECT_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_VBUSVALID_5VDETECT_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_PWRUP_CMPS_MASK (0x700000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_PWRUP_CMPS_SHIFT (20U)
-/*! PWRUP_CMPS
- * 0b000..Powers down the VBUS_VALID comparator
- * 0b111..Enables the VBUS_VALID comparator (default)
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_PWRUP_CMPS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_PWRUP_CMPS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_PWRUP_CMPS_MASK)
-#define USBPHY_USB1_VBUS_DETECT_SET_DISCHARGE_VBUS_MASK (0x4000000U)
-#define USBPHY_USB1_VBUS_DETECT_SET_DISCHARGE_VBUS_SHIFT (26U)
-/*! DISCHARGE_VBUS
- * 0b0..VBUS discharge resistor is disabled (Default)
- * 0b1..VBUS discharge resistor is enabled
- */
-#define USBPHY_USB1_VBUS_DETECT_SET_DISCHARGE_VBUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_SET_DISCHARGE_VBUS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_SET_DISCHARGE_VBUS_MASK)
-/*! @} */
-
-/*! @name USB1_VBUS_DETECT_CLR - USB PHY VBUS Detect Control Register */
-/*! @{ */
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_THRESH_MASK (0x7U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_THRESH_SHIFT (0U)
-/*! VBUSVALID_THRESH
- * 0b000..4.0V
- * 0b001..4.1V
- * 0b010..4.2V
- * 0b011..4.3V
- * 0b100..4.4V(Default)
- * 0b101..4.5V
- * 0b110..4.6V
- * 0b111..4.7V
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_THRESH(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_THRESH_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_THRESH_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUS_OVERRIDE_EN_MASK (0x8U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUS_OVERRIDE_EN_SHIFT (3U)
-/*! VBUS_OVERRIDE_EN
- * 0b0..Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)
- * 0b1..Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_SESSEND_OVERRIDE_MASK (0x10U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_SESSEND_OVERRIDE_SHIFT (4U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_SESSEND_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_SESSEND_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_SESSEND_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_BVALID_OVERRIDE_MASK (0x20U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_BVALID_OVERRIDE_SHIFT (5U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_BVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_BVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_BVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_AVALID_OVERRIDE_MASK (0x40U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_AVALID_OVERRIDE_SHIFT (6U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_AVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_AVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_AVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_OVERRIDE_MASK (0x80U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_OVERRIDE_SHIFT (7U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_SEL_MASK (0x100U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_SEL_SHIFT (8U)
-/*! VBUSVALID_SEL
- * 0b0..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b1..Use the VBUS_VALID_3V detector results for signal reported to the USB controller
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUS_SOURCE_SEL_MASK (0x600U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUS_SOURCE_SEL_SHIFT (9U)
-/*! VBUS_SOURCE_SEL
- * 0b00..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b01..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b10..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b11..Reserved, do not use
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUS_SOURCE_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUS_SOURCE_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUS_SOURCE_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_EN_MASK (0x800U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_EN_SHIFT (11U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_MASK (0x1000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_SHIFT (12U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_ID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_EXT_ID_OVERRIDE_EN_MASK (0x2000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_EXT_ID_OVERRIDE_EN_SHIFT (13U)
-/*! EXT_ID_OVERRIDE_EN
- * 0b0..Select the Muxed value chosen using ID_OVERRIDE_EN.
- * 0b1..Select the external ID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_EXT_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_EXT_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_EXT_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_EXT_VBUS_OVERRIDE_EN_MASK (0x4000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_EXT_VBUS_OVERRIDE_EN_SHIFT (14U)
-/*! EXT_VBUS_OVERRIDE_EN
- * 0b0..Select the muxed value chosen using VBUS_OVERRIDE_EN.
- * 0b1..Select the external VBUS VALID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_EXT_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_EXT_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_EXT_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_TO_SESSVALID_MASK (0x40000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_TO_SESSVALID_SHIFT (18U)
-/*! VBUSVALID_TO_SESSVALID
- * 0b0..Use the VBUS_VALID comparator for VBUS_VALID results
- * 0b1..Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V.
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_TO_SESSVALID(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_TO_SESSVALID_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_TO_SESSVALID_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_5VDETECT_MASK (0x80000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_5VDETECT_SHIFT (19U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_5VDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_5VDETECT_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_VBUSVALID_5VDETECT_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_PWRUP_CMPS_MASK (0x700000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_PWRUP_CMPS_SHIFT (20U)
-/*! PWRUP_CMPS
- * 0b000..Powers down the VBUS_VALID comparator
- * 0b111..Enables the VBUS_VALID comparator (default)
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_PWRUP_CMPS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_PWRUP_CMPS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_PWRUP_CMPS_MASK)
-#define USBPHY_USB1_VBUS_DETECT_CLR_DISCHARGE_VBUS_MASK (0x4000000U)
-#define USBPHY_USB1_VBUS_DETECT_CLR_DISCHARGE_VBUS_SHIFT (26U)
-/*! DISCHARGE_VBUS
- * 0b0..VBUS discharge resistor is disabled (Default)
- * 0b1..VBUS discharge resistor is enabled
- */
-#define USBPHY_USB1_VBUS_DETECT_CLR_DISCHARGE_VBUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_CLR_DISCHARGE_VBUS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_CLR_DISCHARGE_VBUS_MASK)
-/*! @} */
-
-/*! @name USB1_VBUS_DETECT_TOG - USB PHY VBUS Detect Control Register */
-/*! @{ */
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_THRESH_MASK (0x7U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_THRESH_SHIFT (0U)
-/*! VBUSVALID_THRESH
- * 0b000..4.0V
- * 0b001..4.1V
- * 0b010..4.2V
- * 0b011..4.3V
- * 0b100..4.4V(Default)
- * 0b101..4.5V
- * 0b110..4.6V
- * 0b111..4.7V
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_THRESH(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_THRESH_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_THRESH_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUS_OVERRIDE_EN_MASK (0x8U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUS_OVERRIDE_EN_SHIFT (3U)
-/*! VBUS_OVERRIDE_EN
- * 0b0..Use the results of the internal VBUS_VALID and Session Valid comparators for VBUS_VALID, AVALID, BVALID, and SESSEND (Default)
- * 0b1..Use the override values for VBUS_VALID, AVALID, BVALID, and SESSEND
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_SESSEND_OVERRIDE_MASK (0x10U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_SESSEND_OVERRIDE_SHIFT (4U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_SESSEND_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_SESSEND_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_SESSEND_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_BVALID_OVERRIDE_MASK (0x20U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_BVALID_OVERRIDE_SHIFT (5U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_BVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_BVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_BVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_AVALID_OVERRIDE_MASK (0x40U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_AVALID_OVERRIDE_SHIFT (6U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_AVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_AVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_AVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_OVERRIDE_MASK (0x80U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_OVERRIDE_SHIFT (7U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_SEL_MASK (0x100U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_SEL_SHIFT (8U)
-/*! VBUSVALID_SEL
- * 0b0..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b1..Use the VBUS_VALID_3V detector results for signal reported to the USB controller
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUS_SOURCE_SEL_MASK (0x600U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUS_SOURCE_SEL_SHIFT (9U)
-/*! VBUS_SOURCE_SEL
- * 0b00..Use the VBUS_VALID comparator results for signal reported to the USB controller (Default)
- * 0b01..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b10..Use the Session Valid comparator results for signal reported to the USB controller
- * 0b11..Reserved, do not use
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUS_SOURCE_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUS_SOURCE_SEL_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUS_SOURCE_SEL_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_EN_MASK (0x800U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_EN_SHIFT (11U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_MASK (0x1000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_SHIFT (12U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_ID_OVERRIDE_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_EXT_ID_OVERRIDE_EN_MASK (0x2000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_EXT_ID_OVERRIDE_EN_SHIFT (13U)
-/*! EXT_ID_OVERRIDE_EN
- * 0b0..Select the muxed value chosen using ID_OVERRIDE_EN.
- * 0b1..Select the external ID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_EXT_ID_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_EXT_ID_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_EXT_ID_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_EXT_VBUS_OVERRIDE_EN_MASK (0x4000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_EXT_VBUS_OVERRIDE_EN_SHIFT (14U)
-/*! EXT_VBUS_OVERRIDE_EN
- * 0b0..Select the Muxed value chosen using VBUS_OVERRIDE_EN.
- * 0b1..Select the external VBUS VALID value.
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_EXT_VBUS_OVERRIDE_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_EXT_VBUS_OVERRIDE_EN_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_EXT_VBUS_OVERRIDE_EN_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_TO_SESSVALID_MASK (0x40000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_TO_SESSVALID_SHIFT (18U)
-/*! VBUSVALID_TO_SESSVALID
- * 0b0..Use the VBUS_VALID comparator for VBUS_VALID results
- * 0b1..Use the Session End comparator for VBUS_VALID results. The Session End threshold is >0.8V and <4.0V.
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_TO_SESSVALID(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_TO_SESSVALID_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_TO_SESSVALID_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_5VDETECT_MASK (0x80000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_5VDETECT_SHIFT (19U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_5VDETECT(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_5VDETECT_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_VBUSVALID_5VDETECT_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_PWRUP_CMPS_MASK (0x700000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_PWRUP_CMPS_SHIFT (20U)
-/*! PWRUP_CMPS
- * 0b000..Powers down the VBUS_VALID comparator
- * 0b111..Enables the VBUS_VALID comparator (default)
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_PWRUP_CMPS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_PWRUP_CMPS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_PWRUP_CMPS_MASK)
-#define USBPHY_USB1_VBUS_DETECT_TOG_DISCHARGE_VBUS_MASK (0x4000000U)
-#define USBPHY_USB1_VBUS_DETECT_TOG_DISCHARGE_VBUS_SHIFT (26U)
-/*! DISCHARGE_VBUS
- * 0b0..VBUS discharge resistor is disabled (Default)
- * 0b1..VBUS discharge resistor is enabled
- */
-#define USBPHY_USB1_VBUS_DETECT_TOG_DISCHARGE_VBUS(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_USB1_VBUS_DETECT_TOG_DISCHARGE_VBUS_SHIFT)) & USBPHY_USB1_VBUS_DETECT_TOG_DISCHARGE_VBUS_MASK)
-/*! @} */
-
-/*! @name ANACTRL - USB PHY Analog Control Register */
-/*! @{ */
-#define USBPHY_ANACTRL_LVI_EN_MASK (0x2U)
-#define USBPHY_ANACTRL_LVI_EN_SHIFT (1U)
-#define USBPHY_ANACTRL_LVI_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_LVI_EN_SHIFT)) & USBPHY_ANACTRL_LVI_EN_MASK)
-#define USBPHY_ANACTRL_PFD_CLK_SEL_MASK (0xCU)
-#define USBPHY_ANACTRL_PFD_CLK_SEL_SHIFT (2U)
-#define USBPHY_ANACTRL_PFD_CLK_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_PFD_CLK_SEL_SHIFT)) & USBPHY_ANACTRL_PFD_CLK_SEL_MASK)
-#define USBPHY_ANACTRL_DEV_PULLDOWN_MASK (0x400U)
-#define USBPHY_ANACTRL_DEV_PULLDOWN_SHIFT (10U)
-/*! DEV_PULLDOWN
- * 0b0..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode.
- * 0b1..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode.
- */
-#define USBPHY_ANACTRL_DEV_PULLDOWN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_DEV_PULLDOWN_SHIFT)) & USBPHY_ANACTRL_DEV_PULLDOWN_MASK)
-/*! @} */
-
-/*! @name ANACTRL_SET - USB PHY Analog Control Register */
-/*! @{ */
-#define USBPHY_ANACTRL_SET_LVI_EN_MASK (0x2U)
-#define USBPHY_ANACTRL_SET_LVI_EN_SHIFT (1U)
-#define USBPHY_ANACTRL_SET_LVI_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_SET_LVI_EN_SHIFT)) & USBPHY_ANACTRL_SET_LVI_EN_MASK)
-#define USBPHY_ANACTRL_SET_PFD_CLK_SEL_MASK (0xCU)
-#define USBPHY_ANACTRL_SET_PFD_CLK_SEL_SHIFT (2U)
-#define USBPHY_ANACTRL_SET_PFD_CLK_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_SET_PFD_CLK_SEL_SHIFT)) & USBPHY_ANACTRL_SET_PFD_CLK_SEL_MASK)
-#define USBPHY_ANACTRL_SET_DEV_PULLDOWN_MASK (0x400U)
-#define USBPHY_ANACTRL_SET_DEV_PULLDOWN_SHIFT (10U)
-/*! DEV_PULLDOWN
- * 0b0..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode.
- * 0b1..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode.
- */
-#define USBPHY_ANACTRL_SET_DEV_PULLDOWN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_SET_DEV_PULLDOWN_SHIFT)) & USBPHY_ANACTRL_SET_DEV_PULLDOWN_MASK)
-/*! @} */
-
-/*! @name ANACTRL_CLR - USB PHY Analog Control Register */
-/*! @{ */
-#define USBPHY_ANACTRL_CLR_LVI_EN_MASK (0x2U)
-#define USBPHY_ANACTRL_CLR_LVI_EN_SHIFT (1U)
-#define USBPHY_ANACTRL_CLR_LVI_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_CLR_LVI_EN_SHIFT)) & USBPHY_ANACTRL_CLR_LVI_EN_MASK)
-#define USBPHY_ANACTRL_CLR_PFD_CLK_SEL_MASK (0xCU)
-#define USBPHY_ANACTRL_CLR_PFD_CLK_SEL_SHIFT (2U)
-#define USBPHY_ANACTRL_CLR_PFD_CLK_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_CLR_PFD_CLK_SEL_SHIFT)) & USBPHY_ANACTRL_CLR_PFD_CLK_SEL_MASK)
-#define USBPHY_ANACTRL_CLR_DEV_PULLDOWN_MASK (0x400U)
-#define USBPHY_ANACTRL_CLR_DEV_PULLDOWN_SHIFT (10U)
-/*! DEV_PULLDOWN
- * 0b0..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode.
- * 0b1..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode.
- */
-#define USBPHY_ANACTRL_CLR_DEV_PULLDOWN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_CLR_DEV_PULLDOWN_SHIFT)) & USBPHY_ANACTRL_CLR_DEV_PULLDOWN_MASK)
-/*! @} */
-
-/*! @name ANACTRL_TOG - USB PHY Analog Control Register */
-/*! @{ */
-#define USBPHY_ANACTRL_TOG_LVI_EN_MASK (0x2U)
-#define USBPHY_ANACTRL_TOG_LVI_EN_SHIFT (1U)
-#define USBPHY_ANACTRL_TOG_LVI_EN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_TOG_LVI_EN_SHIFT)) & USBPHY_ANACTRL_TOG_LVI_EN_MASK)
-#define USBPHY_ANACTRL_TOG_PFD_CLK_SEL_MASK (0xCU)
-#define USBPHY_ANACTRL_TOG_PFD_CLK_SEL_SHIFT (2U)
-#define USBPHY_ANACTRL_TOG_PFD_CLK_SEL(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_TOG_PFD_CLK_SEL_SHIFT)) & USBPHY_ANACTRL_TOG_PFD_CLK_SEL_MASK)
-#define USBPHY_ANACTRL_TOG_DEV_PULLDOWN_MASK (0x400U)
-#define USBPHY_ANACTRL_TOG_DEV_PULLDOWN_SHIFT (10U)
-/*! DEV_PULLDOWN
- * 0b0..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare disabled in device mode.
- * 0b1..The 15kohm nominal pulldowns on the USB_DP and USB_DM pinsare enabled in device mode.
- */
-#define USBPHY_ANACTRL_TOG_DEV_PULLDOWN(x) (((uint32_t)(((uint32_t)(x)) << USBPHY_ANACTRL_TOG_DEV_PULLDOWN_SHIFT)) & USBPHY_ANACTRL_TOG_DEV_PULLDOWN_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group USBPHY_Register_Masks */
-
-
-/* USBPHY - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral USBPHY base address */
- #define USBPHY_BASE (0x50038000u)
- /** Peripheral USBPHY base address */
- #define USBPHY_BASE_NS (0x40038000u)
- /** Peripheral USBPHY base pointer */
- #define USBPHY ((USBPHY_Type *)USBPHY_BASE)
- /** Peripheral USBPHY base pointer */
- #define USBPHY_NS ((USBPHY_Type *)USBPHY_BASE_NS)
- /** Array initializer of USBPHY peripheral base addresses */
- #define USBPHY_BASE_ADDRS { USBPHY_BASE }
- /** Array initializer of USBPHY peripheral base pointers */
- #define USBPHY_BASE_PTRS { USBPHY }
- /** Array initializer of USBPHY peripheral base addresses */
- #define USBPHY_BASE_ADDRS_NS { USBPHY_BASE_NS }
- /** Array initializer of USBPHY peripheral base pointers */
- #define USBPHY_BASE_PTRS_NS { USBPHY_NS }
-#else
- /** Peripheral USBPHY base address */
- #define USBPHY_BASE (0x40038000u)
- /** Peripheral USBPHY base pointer */
- #define USBPHY ((USBPHY_Type *)USBPHY_BASE)
- /** Array initializer of USBPHY peripheral base addresses */
- #define USBPHY_BASE_ADDRS { USBPHY_BASE }
- /** Array initializer of USBPHY peripheral base pointers */
- #define USBPHY_BASE_PTRS { USBPHY }
-#endif
-/** Interrupt vectors for the USBPHY peripheral type */
-#define USBPHY_IRQS { USB1_PHY_IRQn }
-
-/*!
- * @}
- */ /* end of group USBPHY_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- UTICK Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup UTICK_Peripheral_Access_Layer UTICK Peripheral Access Layer
- * @{
- */
-
-/** UTICK - Register Layout Typedef */
-typedef struct {
- __IO uint32_t CTRL; /**< Control register., offset: 0x0 */
- __IO uint32_t STAT; /**< Status register., offset: 0x4 */
- __IO uint32_t CFG; /**< Capture configuration register., offset: 0x8 */
- __O uint32_t CAPCLR; /**< Capture clear register., offset: 0xC */
- __I uint32_t CAP[4]; /**< Capture register ., array offset: 0x10, array step: 0x4 */
-} UTICK_Type;
-
-/* ----------------------------------------------------------------------------
- -- UTICK Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup UTICK_Register_Masks UTICK Register Masks
- * @{
- */
-
-/*! @name CTRL - Control register. */
-/*! @{ */
-#define UTICK_CTRL_DELAYVAL_MASK (0x7FFFFFFFU)
-#define UTICK_CTRL_DELAYVAL_SHIFT (0U)
-/*! DELAYVAL - Tick interval value. The delay will be equal to DELAYVAL + 1 periods of the timer
- * clock. The minimum usable value is 1, for a delay of 2 timer clocks. A value of 0 stops the timer.
- */
-#define UTICK_CTRL_DELAYVAL(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CTRL_DELAYVAL_SHIFT)) & UTICK_CTRL_DELAYVAL_MASK)
-#define UTICK_CTRL_REPEAT_MASK (0x80000000U)
-#define UTICK_CTRL_REPEAT_SHIFT (31U)
-/*! REPEAT - Repeat delay. 0 = One-time delay. 1 = Delay repeats continuously.
- */
-#define UTICK_CTRL_REPEAT(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CTRL_REPEAT_SHIFT)) & UTICK_CTRL_REPEAT_MASK)
-/*! @} */
-
-/*! @name STAT - Status register. */
-/*! @{ */
-#define UTICK_STAT_INTR_MASK (0x1U)
-#define UTICK_STAT_INTR_SHIFT (0U)
-/*! INTR - Interrupt flag. 0 = No interrupt is pending. 1 = An interrupt is pending. A write of any
- * value to this register clears this flag.
- */
-#define UTICK_STAT_INTR(x) (((uint32_t)(((uint32_t)(x)) << UTICK_STAT_INTR_SHIFT)) & UTICK_STAT_INTR_MASK)
-#define UTICK_STAT_ACTIVE_MASK (0x2U)
-#define UTICK_STAT_ACTIVE_SHIFT (1U)
-/*! ACTIVE - Active flag. 0 = The Micro-Tick Timer is stopped. 1 = The Micro-Tick Timer is currently active.
- */
-#define UTICK_STAT_ACTIVE(x) (((uint32_t)(((uint32_t)(x)) << UTICK_STAT_ACTIVE_SHIFT)) & UTICK_STAT_ACTIVE_MASK)
-/*! @} */
-
-/*! @name CFG - Capture configuration register. */
-/*! @{ */
-#define UTICK_CFG_CAPEN0_MASK (0x1U)
-#define UTICK_CFG_CAPEN0_SHIFT (0U)
-/*! CAPEN0 - Enable Capture 0. 1 = Enabled, 0 = Disabled.
- */
-#define UTICK_CFG_CAPEN0(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPEN0_SHIFT)) & UTICK_CFG_CAPEN0_MASK)
-#define UTICK_CFG_CAPEN1_MASK (0x2U)
-#define UTICK_CFG_CAPEN1_SHIFT (1U)
-/*! CAPEN1 - Enable Capture 1. 1 = Enabled, 0 = Disabled.
- */
-#define UTICK_CFG_CAPEN1(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPEN1_SHIFT)) & UTICK_CFG_CAPEN1_MASK)
-#define UTICK_CFG_CAPEN2_MASK (0x4U)
-#define UTICK_CFG_CAPEN2_SHIFT (2U)
-/*! CAPEN2 - Enable Capture 2. 1 = Enabled, 0 = Disabled.
- */
-#define UTICK_CFG_CAPEN2(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPEN2_SHIFT)) & UTICK_CFG_CAPEN2_MASK)
-#define UTICK_CFG_CAPEN3_MASK (0x8U)
-#define UTICK_CFG_CAPEN3_SHIFT (3U)
-/*! CAPEN3 - Enable Capture 3. 1 = Enabled, 0 = Disabled.
- */
-#define UTICK_CFG_CAPEN3(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPEN3_SHIFT)) & UTICK_CFG_CAPEN3_MASK)
-#define UTICK_CFG_CAPPOL0_MASK (0x100U)
-#define UTICK_CFG_CAPPOL0_SHIFT (8U)
-/*! CAPPOL0 - Capture Polarity 0. 0 = Positive edge capture, 1 = Negative edge capture.
- */
-#define UTICK_CFG_CAPPOL0(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPPOL0_SHIFT)) & UTICK_CFG_CAPPOL0_MASK)
-#define UTICK_CFG_CAPPOL1_MASK (0x200U)
-#define UTICK_CFG_CAPPOL1_SHIFT (9U)
-/*! CAPPOL1 - Capture Polarity 1. 0 = Positive edge capture, 1 = Negative edge capture.
- */
-#define UTICK_CFG_CAPPOL1(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPPOL1_SHIFT)) & UTICK_CFG_CAPPOL1_MASK)
-#define UTICK_CFG_CAPPOL2_MASK (0x400U)
-#define UTICK_CFG_CAPPOL2_SHIFT (10U)
-/*! CAPPOL2 - Capture Polarity 2. 0 = Positive edge capture, 1 = Negative edge capture.
- */
-#define UTICK_CFG_CAPPOL2(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPPOL2_SHIFT)) & UTICK_CFG_CAPPOL2_MASK)
-#define UTICK_CFG_CAPPOL3_MASK (0x800U)
-#define UTICK_CFG_CAPPOL3_SHIFT (11U)
-/*! CAPPOL3 - Capture Polarity 3. 0 = Positive edge capture, 1 = Negative edge capture.
- */
-#define UTICK_CFG_CAPPOL3(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CFG_CAPPOL3_SHIFT)) & UTICK_CFG_CAPPOL3_MASK)
-/*! @} */
-
-/*! @name CAPCLR - Capture clear register. */
-/*! @{ */
-#define UTICK_CAPCLR_CAPCLR0_MASK (0x1U)
-#define UTICK_CAPCLR_CAPCLR0_SHIFT (0U)
-/*! CAPCLR0 - Clear capture 0. Writing 1 to this bit clears the CAP0 register value.
- */
-#define UTICK_CAPCLR_CAPCLR0(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CAPCLR_CAPCLR0_SHIFT)) & UTICK_CAPCLR_CAPCLR0_MASK)
-#define UTICK_CAPCLR_CAPCLR1_MASK (0x2U)
-#define UTICK_CAPCLR_CAPCLR1_SHIFT (1U)
-/*! CAPCLR1 - Clear capture 1. Writing 1 to this bit clears the CAP1 register value.
- */
-#define UTICK_CAPCLR_CAPCLR1(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CAPCLR_CAPCLR1_SHIFT)) & UTICK_CAPCLR_CAPCLR1_MASK)
-#define UTICK_CAPCLR_CAPCLR2_MASK (0x4U)
-#define UTICK_CAPCLR_CAPCLR2_SHIFT (2U)
-/*! CAPCLR2 - Clear capture 2. Writing 1 to this bit clears the CAP2 register value.
- */
-#define UTICK_CAPCLR_CAPCLR2(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CAPCLR_CAPCLR2_SHIFT)) & UTICK_CAPCLR_CAPCLR2_MASK)
-#define UTICK_CAPCLR_CAPCLR3_MASK (0x8U)
-#define UTICK_CAPCLR_CAPCLR3_SHIFT (3U)
-/*! CAPCLR3 - Clear capture 3. Writing 1 to this bit clears the CAP3 register value.
- */
-#define UTICK_CAPCLR_CAPCLR3(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CAPCLR_CAPCLR3_SHIFT)) & UTICK_CAPCLR_CAPCLR3_MASK)
-/*! @} */
-
-/*! @name CAP - Capture register . */
-/*! @{ */
-#define UTICK_CAP_CAP_VALUE_MASK (0x7FFFFFFFU)
-#define UTICK_CAP_CAP_VALUE_SHIFT (0U)
-/*! CAP_VALUE - Capture value for the related capture event (UTICK_CAPn. Note: the value is 1 lower
- * than the actual value of the Micro-tick Timer at the moment of the capture event.
- */
-#define UTICK_CAP_CAP_VALUE(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CAP_CAP_VALUE_SHIFT)) & UTICK_CAP_CAP_VALUE_MASK)
-#define UTICK_CAP_VALID_MASK (0x80000000U)
-#define UTICK_CAP_VALID_SHIFT (31U)
-/*! VALID - Capture Valid. When 1, a value has been captured based on a transition of the related
- * UTICK_CAPn pin. Cleared by writing to the related bit in the CAPCLR register.
- */
-#define UTICK_CAP_VALID(x) (((uint32_t)(((uint32_t)(x)) << UTICK_CAP_VALID_SHIFT)) & UTICK_CAP_VALID_MASK)
-/*! @} */
-
-/* The count of UTICK_CAP */
-#define UTICK_CAP_COUNT (4U)
-
-
-/*!
- * @}
- */ /* end of group UTICK_Register_Masks */
-
-
-/* UTICK - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral UTICK0 base address */
- #define UTICK0_BASE (0x5000E000u)
- /** Peripheral UTICK0 base address */
- #define UTICK0_BASE_NS (0x4000E000u)
- /** Peripheral UTICK0 base pointer */
- #define UTICK0 ((UTICK_Type *)UTICK0_BASE)
- /** Peripheral UTICK0 base pointer */
- #define UTICK0_NS ((UTICK_Type *)UTICK0_BASE_NS)
- /** Array initializer of UTICK peripheral base addresses */
- #define UTICK_BASE_ADDRS { UTICK0_BASE }
- /** Array initializer of UTICK peripheral base pointers */
- #define UTICK_BASE_PTRS { UTICK0 }
- /** Array initializer of UTICK peripheral base addresses */
- #define UTICK_BASE_ADDRS_NS { UTICK0_BASE_NS }
- /** Array initializer of UTICK peripheral base pointers */
- #define UTICK_BASE_PTRS_NS { UTICK0_NS }
-#else
- /** Peripheral UTICK0 base address */
- #define UTICK0_BASE (0x4000E000u)
- /** Peripheral UTICK0 base pointer */
- #define UTICK0 ((UTICK_Type *)UTICK0_BASE)
- /** Array initializer of UTICK peripheral base addresses */
- #define UTICK_BASE_ADDRS { UTICK0_BASE }
- /** Array initializer of UTICK peripheral base pointers */
- #define UTICK_BASE_PTRS { UTICK0 }
-#endif
-/** Interrupt vectors for the UTICK peripheral type */
-#define UTICK_IRQS { UTICK0_IRQn }
-
-/*!
- * @}
- */ /* end of group UTICK_Peripheral_Access_Layer */
-
-
-/* ----------------------------------------------------------------------------
- -- WWDT Peripheral Access Layer
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup WWDT_Peripheral_Access_Layer WWDT Peripheral Access Layer
- * @{
- */
-
-/** WWDT - Register Layout Typedef */
-typedef struct {
- __IO uint32_t MOD; /**< Watchdog mode register. This register contains the basic mode and status of the Watchdog Timer., offset: 0x0 */
- __IO uint32_t TC; /**< Watchdog timer constant register. This 24-bit register determines the time-out value., offset: 0x4 */
- __O uint32_t FEED; /**< Watchdog feed sequence register. Writing 0xAA followed by 0x55 to this register reloads the Watchdog timer with the value contained in TC., offset: 0x8 */
- __I uint32_t TV; /**< Watchdog timer value register. This 24-bit register reads out the current value of the Watchdog timer., offset: 0xC */
- uint8_t RESERVED_0[4];
- __IO uint32_t WARNINT; /**< Watchdog Warning Interrupt compare value., offset: 0x14 */
- __IO uint32_t WINDOW; /**< Watchdog Window compare value., offset: 0x18 */
-} WWDT_Type;
-
-/* ----------------------------------------------------------------------------
- -- WWDT Register Masks
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup WWDT_Register_Masks WWDT Register Masks
- * @{
- */
-
-/*! @name MOD - Watchdog mode register. This register contains the basic mode and status of the Watchdog Timer. */
-/*! @{ */
-#define WWDT_MOD_WDEN_MASK (0x1U)
-#define WWDT_MOD_WDEN_SHIFT (0U)
-/*! WDEN - Watchdog enable bit. Once this bit is set to one and a watchdog feed is performed, the
- * watchdog timer will run permanently.
- * 0b0..Stop. The watchdog timer is stopped.
- * 0b1..Run. The watchdog timer is running.
- */
-#define WWDT_MOD_WDEN(x) (((uint32_t)(((uint32_t)(x)) << WWDT_MOD_WDEN_SHIFT)) & WWDT_MOD_WDEN_MASK)
-#define WWDT_MOD_WDRESET_MASK (0x2U)
-#define WWDT_MOD_WDRESET_SHIFT (1U)
-/*! WDRESET - Watchdog reset enable bit. Once this bit has been written with a 1 it cannot be re-written with a 0.
- * 0b0..Interrupt. A watchdog time-out will not cause a chip reset.
- * 0b1..Reset. A watchdog time-out will cause a chip reset.
- */
-#define WWDT_MOD_WDRESET(x) (((uint32_t)(((uint32_t)(x)) << WWDT_MOD_WDRESET_SHIFT)) & WWDT_MOD_WDRESET_MASK)
-#define WWDT_MOD_WDTOF_MASK (0x4U)
-#define WWDT_MOD_WDTOF_SHIFT (2U)
-/*! WDTOF - Watchdog time-out flag. Set when the watchdog timer times out, by a feed error, or by
- * events associated with WDPROTECT. Cleared by software writing a 0 to this bit position. Causes a
- * chip reset if WDRESET = 1.
- */
-#define WWDT_MOD_WDTOF(x) (((uint32_t)(((uint32_t)(x)) << WWDT_MOD_WDTOF_SHIFT)) & WWDT_MOD_WDTOF_MASK)
-#define WWDT_MOD_WDINT_MASK (0x8U)
-#define WWDT_MOD_WDINT_SHIFT (3U)
-/*! WDINT - Warning interrupt flag. Set when the timer is at or below the value in WDWARNINT.
- * Cleared by software writing a 1 to this bit position. Note that this bit cannot be cleared while the
- * WARNINT value is equal to the value of the TV register. This can occur if the value of
- * WARNINT is 0 and the WDRESET bit is 0 when TV decrements to 0.
- */
-#define WWDT_MOD_WDINT(x) (((uint32_t)(((uint32_t)(x)) << WWDT_MOD_WDINT_SHIFT)) & WWDT_MOD_WDINT_MASK)
-#define WWDT_MOD_WDPROTECT_MASK (0x10U)
-#define WWDT_MOD_WDPROTECT_SHIFT (4U)
-/*! WDPROTECT - Watchdog update mode. This bit can be set once by software and is only cleared by a reset.
- * 0b0..Flexible. The watchdog time-out value (TC) can be changed at any time.
- * 0b1..Threshold. The watchdog time-out value (TC) can be changed only after the counter is below the value of WDWARNINT and WDWINDOW.
- */
-#define WWDT_MOD_WDPROTECT(x) (((uint32_t)(((uint32_t)(x)) << WWDT_MOD_WDPROTECT_SHIFT)) & WWDT_MOD_WDPROTECT_MASK)
-/*! @} */
-
-/*! @name TC - Watchdog timer constant register. This 24-bit register determines the time-out value. */
-/*! @{ */
-#define WWDT_TC_COUNT_MASK (0xFFFFFFU)
-#define WWDT_TC_COUNT_SHIFT (0U)
-/*! COUNT - Watchdog time-out value.
- */
-#define WWDT_TC_COUNT(x) (((uint32_t)(((uint32_t)(x)) << WWDT_TC_COUNT_SHIFT)) & WWDT_TC_COUNT_MASK)
-/*! @} */
-
-/*! @name FEED - Watchdog feed sequence register. Writing 0xAA followed by 0x55 to this register reloads the Watchdog timer with the value contained in TC. */
-/*! @{ */
-#define WWDT_FEED_FEED_MASK (0xFFU)
-#define WWDT_FEED_FEED_SHIFT (0U)
-/*! FEED - Feed value should be 0xAA followed by 0x55.
- */
-#define WWDT_FEED_FEED(x) (((uint32_t)(((uint32_t)(x)) << WWDT_FEED_FEED_SHIFT)) & WWDT_FEED_FEED_MASK)
-/*! @} */
-
-/*! @name TV - Watchdog timer value register. This 24-bit register reads out the current value of the Watchdog timer. */
-/*! @{ */
-#define WWDT_TV_COUNT_MASK (0xFFFFFFU)
-#define WWDT_TV_COUNT_SHIFT (0U)
-/*! COUNT - Counter timer value.
- */
-#define WWDT_TV_COUNT(x) (((uint32_t)(((uint32_t)(x)) << WWDT_TV_COUNT_SHIFT)) & WWDT_TV_COUNT_MASK)
-/*! @} */
-
-/*! @name WARNINT - Watchdog Warning Interrupt compare value. */
-/*! @{ */
-#define WWDT_WARNINT_WARNINT_MASK (0x3FFU)
-#define WWDT_WARNINT_WARNINT_SHIFT (0U)
-/*! WARNINT - Watchdog warning interrupt compare value.
- */
-#define WWDT_WARNINT_WARNINT(x) (((uint32_t)(((uint32_t)(x)) << WWDT_WARNINT_WARNINT_SHIFT)) & WWDT_WARNINT_WARNINT_MASK)
-/*! @} */
-
-/*! @name WINDOW - Watchdog Window compare value. */
-/*! @{ */
-#define WWDT_WINDOW_WINDOW_MASK (0xFFFFFFU)
-#define WWDT_WINDOW_WINDOW_SHIFT (0U)
-/*! WINDOW - Watchdog window value.
- */
-#define WWDT_WINDOW_WINDOW(x) (((uint32_t)(((uint32_t)(x)) << WWDT_WINDOW_WINDOW_SHIFT)) & WWDT_WINDOW_WINDOW_MASK)
-/*! @} */
-
-
-/*!
- * @}
- */ /* end of group WWDT_Register_Masks */
-
-
-/* WWDT - Peripheral instance base addresses */
-#if (__ARM_FEATURE_CMSE & 0x2)
- /** Peripheral WWDT base address */
- #define WWDT_BASE (0x5000C000u)
- /** Peripheral WWDT base address */
- #define WWDT_BASE_NS (0x4000C000u)
- /** Peripheral WWDT base pointer */
- #define WWDT ((WWDT_Type *)WWDT_BASE)
- /** Peripheral WWDT base pointer */
- #define WWDT_NS ((WWDT_Type *)WWDT_BASE_NS)
- /** Array initializer of WWDT peripheral base addresses */
- #define WWDT_BASE_ADDRS { WWDT_BASE }
- /** Array initializer of WWDT peripheral base pointers */
- #define WWDT_BASE_PTRS { WWDT }
- /** Array initializer of WWDT peripheral base addresses */
- #define WWDT_BASE_ADDRS_NS { WWDT_BASE_NS }
- /** Array initializer of WWDT peripheral base pointers */
- #define WWDT_BASE_PTRS_NS { WWDT_NS }
-#else
- /** Peripheral WWDT base address */
- #define WWDT_BASE (0x4000C000u)
- /** Peripheral WWDT base pointer */
- #define WWDT ((WWDT_Type *)WWDT_BASE)
- /** Array initializer of WWDT peripheral base addresses */
- #define WWDT_BASE_ADDRS { WWDT_BASE }
- /** Array initializer of WWDT peripheral base pointers */
- #define WWDT_BASE_PTRS { WWDT }
-#endif
-/** Interrupt vectors for the WWDT peripheral type */
-#define WWDT_IRQS { WDT_BOD_IRQn }
-
-/*!
- * @}
- */ /* end of group WWDT_Peripheral_Access_Layer */
-
-
-/*
-** End of section using anonymous unions
-*/
-
-#if defined(__ARMCC_VERSION)
- #if (__ARMCC_VERSION >= 6010050)
- #pragma clang diagnostic pop
- #else
- #pragma pop
- #endif
-#elif defined(__GNUC__)
- /* leave anonymous unions enabled */
-#elif defined(__IAR_SYSTEMS_ICC__)
- #pragma language=default
-#else
- #error Not supported compiler type
-#endif
-
-/*!
- * @}
- */ /* end of group Peripheral_access_layer */
-
-
-/* ----------------------------------------------------------------------------
- -- Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK).
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup Bit_Field_Generic_Macros Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK).
- * @{
- */
-
-#if defined(__ARMCC_VERSION)
- #if (__ARMCC_VERSION >= 6010050)
- #pragma clang system_header
- #endif
-#elif defined(__IAR_SYSTEMS_ICC__)
- #pragma system_include
-#endif
-
-/**
- * @brief Mask and left-shift a bit field value for use in a register bit range.
- * @param field Name of the register bit field.
- * @param value Value of the bit field.
- * @return Masked and shifted value.
- */
-#define NXP_VAL2FLD(field, value) (((value) << (field ## _SHIFT)) & (field ## _MASK))
-/**
- * @brief Mask and right-shift a register value to extract a bit field value.
- * @param field Name of the register bit field.
- * @param value Value of the register.
- * @return Masked and shifted bit field value.
- */
-#define NXP_FLD2VAL(field, value) (((value) & (field ## _MASK)) >> (field ## _SHIFT))
-
-/*!
- * @}
- */ /* end of group Bit_Field_Generic_Macros */
-
-
-/* ----------------------------------------------------------------------------
- -- SDK Compatibility
- ---------------------------------------------------------------------------- */
-
-/*!
- * @addtogroup SDK_Compatibility_Symbols SDK Compatibility
- * @{
- */
-
-/** High Speed SPI (Flexcomm 8) interrupt name */
-#define LSPI_HS_IRQn FLEXCOMM8_IRQn
-
-/*!
- * @brief Get the chip value.
- *
- * @return chip version, 0x0: A0 version chip, 0x1: A1 version chip, 0xFF: invalid version.
- */
-static inline uint32_t Chip_GetVersion(void)
-{
- uint32_t deviceRevision;
-
- deviceRevision = SYSCON->DIEID & SYSCON_DIEID_REV_ID_MASK;
-
- if(0UL == deviceRevision) /* A0 device revision is 0 */
- {
- return 0x0;
- }
- else if(1UL == deviceRevision) /* A1 device revision is 1 */
- {
- return 0x1;
- }
- else
- {
- return 0xFF;
- }
-}
-
-
-/*!
- * @}
- */ /* end of group SDK_Compatibility_Symbols */
-
-
-#endif /* _LPC55S69_CM33_CORE1_H_ */
-
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core1_features.h b/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core1_features.h
deleted file mode 100755
index a758af9619..0000000000
--- a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core1_features.h
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
-** ###################################################################
-** Version: rev. 1.1, 2019-05-16
-** Build: b200317
-**
-** Abstract:
-** Chip specific module features.
-**
-** Copyright 2016 Freescale Semiconductor, Inc.
-** Copyright 2016-2020 NXP
-** All rights reserved.
-**
-** SPDX-License-Identifier: BSD-3-Clause
-**
-** http: www.nxp.com
-** mail: support@nxp.com
-**
-** Revisions:
-** - rev. 1.0 (2018-08-22)
-** Initial version based on v0.2UM
-** - rev. 1.1 (2019-05-16)
-** Initial A1 version based on v1.3UM
-**
-** ###################################################################
-*/
-
-#ifndef _LPC55S69_cm33_core1_FEATURES_H_
-#define _LPC55S69_cm33_core1_FEATURES_H_
-
-/* SOC module features */
-
-/* @brief CASPER availability on the SoC. */
-#define FSL_FEATURE_SOC_CASPER_COUNT (1)
-/* @brief CRC availability on the SoC. */
-#define FSL_FEATURE_SOC_CRC_COUNT (1)
-/* @brief CTIMER availability on the SoC. */
-#define FSL_FEATURE_SOC_CTIMER_COUNT (5)
-/* @brief DMA availability on the SoC. */
-#define FSL_FEATURE_SOC_DMA_COUNT (2)
-/* @brief FLASH availability on the SoC. */
-#define FSL_FEATURE_SOC_FLASH_COUNT (1)
-/* @brief FLEXCOMM availability on the SoC. */
-#define FSL_FEATURE_SOC_FLEXCOMM_COUNT (9)
-/* @brief GINT availability on the SoC. */
-#define FSL_FEATURE_SOC_GINT_COUNT (2)
-/* @brief GPIO availability on the SoC. */
-#define FSL_FEATURE_SOC_GPIO_COUNT (1)
-/* @brief SECGPIO availability on the SoC. */
-#define FSL_FEATURE_SOC_SECGPIO_COUNT (1)
-/* @brief HASHCRYPT availability on the SoC. */
-#define FSL_FEATURE_SOC_HASHCRYPT_COUNT (1)
-/* @brief I2C availability on the SoC. */
-#define FSL_FEATURE_SOC_I2C_COUNT (8)
-/* @brief I2S availability on the SoC. */
-#define FSL_FEATURE_SOC_I2S_COUNT (8)
-/* @brief INPUTMUX availability on the SoC. */
-#define FSL_FEATURE_SOC_INPUTMUX_COUNT (1)
-/* @brief IOCON availability on the SoC. */
-#define FSL_FEATURE_SOC_IOCON_COUNT (1)
-/* @brief LPADC availability on the SoC. */
-#define FSL_FEATURE_SOC_LPADC_COUNT (1)
-/* @brief MAILBOX availability on the SoC. */
-#define FSL_FEATURE_SOC_MAILBOX_COUNT (1)
-/* @brief MRT availability on the SoC. */
-#define FSL_FEATURE_SOC_MRT_COUNT (1)
-/* @brief OSTIMER availability on the SoC. */
-#define FSL_FEATURE_SOC_OSTIMER_COUNT (1)
-/* @brief PINT availability on the SoC. */
-#define FSL_FEATURE_SOC_PINT_COUNT (1)
-/* @brief SECPINT availability on the SoC. */
-#define FSL_FEATURE_SOC_SECPINT_COUNT (1)
-/* @brief PMC availability on the SoC. */
-#define FSL_FEATURE_SOC_PMC_COUNT (1)
-/* @brief POWERQUAD availability on the SoC. */
-#define FSL_FEATURE_SOC_POWERQUAD_COUNT (1)
-/* @brief PUF availability on the SoC. */
-#define FSL_FEATURE_SOC_PUF_COUNT (1)
-/* @brief LPC_RNG1 availability on the SoC. */
-#define FSL_FEATURE_SOC_LPC_RNG1_COUNT (1)
-/* @brief RTC availability on the SoC. */
-#define FSL_FEATURE_SOC_RTC_COUNT (1)
-/* @brief SCT availability on the SoC. */
-#define FSL_FEATURE_SOC_SCT_COUNT (1)
-/* @brief SDIF availability on the SoC. */
-#define FSL_FEATURE_SOC_SDIF_COUNT (1)
-/* @brief SPI availability on the SoC. */
-#define FSL_FEATURE_SOC_SPI_COUNT (9)
-/* @brief SYSCON availability on the SoC. */
-#define FSL_FEATURE_SOC_SYSCON_COUNT (1)
-/* @brief SYSCTL1 availability on the SoC. */
-#define FSL_FEATURE_SOC_SYSCTL1_COUNT (1)
-/* @brief USART availability on the SoC. */
-#define FSL_FEATURE_SOC_USART_COUNT (8)
-/* @brief USB availability on the SoC. */
-#define FSL_FEATURE_SOC_USB_COUNT (1)
-/* @brief USBFSH availability on the SoC. */
-#define FSL_FEATURE_SOC_USBFSH_COUNT (1)
-/* @brief USBHSD availability on the SoC. */
-#define FSL_FEATURE_SOC_USBHSD_COUNT (1)
-/* @brief USBHSH availability on the SoC. */
-#define FSL_FEATURE_SOC_USBHSH_COUNT (1)
-/* @brief USBPHY availability on the SoC. */
-#define FSL_FEATURE_SOC_USBPHY_COUNT (1)
-/* @brief UTICK availability on the SoC. */
-#define FSL_FEATURE_SOC_UTICK_COUNT (1)
-/* @brief WWDT availability on the SoC. */
-#define FSL_FEATURE_SOC_WWDT_COUNT (1)
-
-/* LPADC module features */
-
-/* @brief FIFO availability on the SoC. */
-#define FSL_FEATURE_LPADC_FIFO_COUNT (2)
-/* @brief Has subsequent trigger priority (bitfield CFG[TPRICTRL]). */
-#define FSL_FEATURE_LPADC_HAS_CFG_SUBSEQUENT_PRIORITY (1)
-/* @brief Has differential mode (bitfield CMDLn[DIFF]). */
-#define FSL_FEATURE_LPADC_HAS_CMDL_DIFF (0)
-/* @brief Has channel scale (bitfield CMDLn[CSCALE]). */
-#define FSL_FEATURE_LPADC_HAS_CMDL_CSCALE (0)
-/* @brief Has conversion type select (bitfield CMDLn[CTYPE]). */
-#define FSL_FEATURE_LPADC_HAS_CMDL_CTYPE (1)
-/* @brief Has conversion resolution select (bitfield CMDLn[MODE]). */
-#define FSL_FEATURE_LPADC_HAS_CMDL_MODE (1)
-/* @brief Has compare function enable (bitfield CMDHn[CMPEN]). */
-#define FSL_FEATURE_LPADC_HAS_CMDH_CMPEN (1)
-/* @brief Has Wait for trigger assertion before execution (bitfield CMDHn[WAIT_TRIG]). */
-#define FSL_FEATURE_LPADC_HAS_CMDH_WAIT_TRIG (1)
-/* @brief Has offset calibration (bitfield CTRL[CALOFS]). */
-#define FSL_FEATURE_LPADC_HAS_CTRL_CALOFS (1)
-/* @brief Has gain calibration (bitfield CTRL[CAL_REQ]). */
-#define FSL_FEATURE_LPADC_HAS_CTRL_CAL_REQ (1)
-/* @brief Has calibration average (bitfield CTRL[CAL_AVGS]). */
-#define FSL_FEATURE_LPADC_HAS_CTRL_CAL_AVGS (1)
-/* @brief Has internal clock (bitfield CFG[ADCKEN]). */
-#define FSL_FEATURE_LPADC_HAS_CFG_ADCKEN (0)
-/* @brief Enable support for low voltage reference on option 1 reference (bitfield CFG[VREF1RNG]). */
-#define FSL_FEATURE_LPADC_HAS_CFG_VREF1RNG (0)
-/* @brief Has calibration (bitfield CFG[CALOFS]). */
-#define FSL_FEATURE_LPADC_HAS_CFG_CALOFS (0)
-/* @brief Has offset trim (register OFSTRIM). */
-#define FSL_FEATURE_LPADC_HAS_OFSTRIM (1)
-/* @brief Has internal temperature sensor. */
-#define FSL_FEATURE_LPADC_HAS_INTERNAL_TEMP_SENSOR (1)
-/* @brief Temperature sensor parameter A (slope). */
-#define FSL_FEATURE_LPADC_TEMP_PARAMETER_A (744.6f)
-/* @brief Temperature sensor parameter B (offset). */
-#define FSL_FEATURE_LPADC_TEMP_PARAMETER_B (313.7f)
-/* @brief Temperature sensor parameter Alpha. */
-#define FSL_FEATURE_LPADC_TEMP_PARAMETER_ALPHA (11.5f)
-
-/* CASPER module features */
-
-/* @brief Base address of the CASPER dedicated RAM */
-#define FSL_FEATURE_CASPER_RAM_BASE_ADDRESS (0x04000000)
-/* @brief Interleaving of the CASPER dedicated RAM */
-#define FSL_FEATURE_CASPER_RAM_IS_INTERLEAVED (1)
-/* @brief CASPER dedicated RAM offset */
-#define FSL_FEATURE_CASPER_RAM_OFFSET (0xE)
-
-/* DMA module features */
-
-/* @brief Number of channels */
-#define FSL_FEATURE_DMA_NUMBER_OF_CHANNELS (23)
-/* @brief Align size of DMA descriptor */
-#define FSL_FEATURE_DMA_DESCRIPTOR_ALIGN_SIZE (512)
-/* @brief DMA head link descriptor table align size */
-#define FSL_FEATURE_DMA_LINK_DESCRIPTOR_ALIGN_SIZE (16U)
-
-/* FLEXCOMM module features */
-
-/* @brief FLEXCOMM0 USART INDEX 0 */
-#define FSL_FEATURE_FLEXCOMM0_USART_INDEX (0)
-/* @brief FLEXCOMM0 SPI INDEX 0 */
-#define FSL_FEATURE_FLEXCOMM0_SPI_INDEX (0)
-/* @brief FLEXCOMM0 I2C INDEX 0 */
-#define FSL_FEATURE_FLEXCOMM0_I2C_INDEX (0)
-/* @brief FLEXCOMM0 I2S INDEX 0 */
-#define FSL_FEATURE_FLEXCOMM0_I2S_INDEX (0)
-/* @brief FLEXCOMM1 USART INDEX 1 */
-#define FSL_FEATURE_FLEXCOMM1_USART_INDEX (1)
-/* @brief FLEXCOMM1 SPI INDEX 1 */
-#define FSL_FEATURE_FLEXCOMM1_SPI_INDEX (1)
-/* @brief FLEXCOMM1 I2C INDEX 1 */
-#define FSL_FEATURE_FLEXCOMM1_I2C_INDEX (1)
-/* @brief FLEXCOMM1 I2S INDEX 1 */
-#define FSL_FEATURE_FLEXCOMM1_I2S_INDEX (1)
-/* @brief FLEXCOMM2 USART INDEX 2 */
-#define FSL_FEATURE_FLEXCOMM2_USART_INDEX (2)
-/* @brief FLEXCOMM2 SPI INDEX 2 */
-#define FSL_FEATURE_FLEXCOMM2_SPI_INDEX (2)
-/* @brief FLEXCOMM2 I2C INDEX 2 */
-#define FSL_FEATURE_FLEXCOMM2_I2C_INDEX (2)
-/* @brief FLEXCOMM2 I2S INDEX 2 */
-#define FSL_FEATURE_FLEXCOMM2_I2S_INDEX (2)
-/* @brief FLEXCOMM3 USART INDEX 3 */
-#define FSL_FEATURE_FLEXCOMM3_USART_INDEX (3)
-/* @brief FLEXCOMM3 SPI INDEX 3 */
-#define FSL_FEATURE_FLEXCOMM3_SPI_INDEX (3)
-/* @brief FLEXCOMM3 I2C INDEX 3 */
-#define FSL_FEATURE_FLEXCOMM3_I2C_INDEX (3)
-/* @brief FLEXCOMM3 I2S INDEX 3 */
-#define FSL_FEATURE_FLEXCOMM3_I2S_INDEX (3)
-/* @brief FLEXCOMM4 USART INDEX 4 */
-#define FSL_FEATURE_FLEXCOMM4_USART_INDEX (4)
-/* @brief FLEXCOMM4 SPI INDEX 4 */
-#define FSL_FEATURE_FLEXCOMM4_SPI_INDEX (4)
-/* @brief FLEXCOMM4 I2C INDEX 4 */
-#define FSL_FEATURE_FLEXCOMM4_I2C_INDEX (4)
-/* @brief FLEXCOMM4 I2S INDEX 4 */
-#define FSL_FEATURE_FLEXCOMM4_I2S_INDEX (4)
-/* @brief FLEXCOMM5 USART INDEX 5 */
-#define FSL_FEATURE_FLEXCOMM5_USART_INDEX (5)
-/* @brief FLEXCOMM5 SPI INDEX 5 */
-#define FSL_FEATURE_FLEXCOMM5_SPI_INDEX (5)
-/* @brief FLEXCOMM5 I2C INDEX 5 */
-#define FSL_FEATURE_FLEXCOMM5_I2C_INDEX (5)
-/* @brief FLEXCOMM5 I2S INDEX 5 */
-#define FSL_FEATURE_FLEXCOMM5_I2S_INDEX (5)
-/* @brief FLEXCOMM6 USART INDEX 6 */
-#define FSL_FEATURE_FLEXCOMM6_USART_INDEX (6)
-/* @brief FLEXCOMM6 SPI INDEX 6 */
-#define FSL_FEATURE_FLEXCOMM6_SPI_INDEX (6)
-/* @brief FLEXCOMM6 I2C INDEX 6 */
-#define FSL_FEATURE_FLEXCOMM6_I2C_INDEX (6)
-/* @brief FLEXCOMM6 I2S INDEX 6 */
-#define FSL_FEATURE_FLEXCOMM6_I2S_INDEX (6)
-/* @brief FLEXCOMM7 USART INDEX 7 */
-#define FSL_FEATURE_FLEXCOMM7_USART_INDEX (7)
-/* @brief FLEXCOMM7 SPI INDEX 7 */
-#define FSL_FEATURE_FLEXCOMM7_SPI_INDEX (7)
-/* @brief FLEXCOMM7 I2C INDEX 7 */
-#define FSL_FEATURE_FLEXCOMM7_I2C_INDEX (7)
-/* @brief FLEXCOMM7 I2S INDEX 7 */
-#define FSL_FEATURE_FLEXCOMM7_I2S_INDEX (7)
-/* @brief FLEXCOMM8 SPI(HS_SPI) INDEX 8 */
-#define FSL_FEATURE_FLEXCOMM8_SPI_INDEX (8)
-/* @brief I2S has DMIC interconnection */
-#define FSL_FEATURE_FLEXCOMM_INSTANCE_I2S_HAS_DMIC_INTERCONNECTIONn(x) (0)
-
-/* HASHCRYPT module features */
-
-/* @brief the address of alias offset */
-#define FSL_FEATURE_HASHCRYPT_ALIAS_OFFSET (0x00000000)
-
-/* I2S module features */
-
-/* @brief I2S support dual channel transfer. */
-#define FSL_FEATURE_I2S_SUPPORT_SECONDARY_CHANNEL (0)
-/* @brief I2S has DMIC interconnection. */
-#define FSL_FEATURE_FLEXCOMM_I2S_HAS_DMIC_INTERCONNECTION (0)
-
-/* IOCON module features */
-
-/* @brief Func bit field width */
-#define FSL_FEATURE_IOCON_FUNC_FIELD_WIDTH (4)
-
-/* MAILBOX module features */
-
-/* @brief Mailbox side for current core */
-#define FSL_FEATURE_MAILBOX_SIDE_B (1)
-
-/* MRT module features */
-
-/* @brief number of channels. */
-#define FSL_FEATURE_MRT_NUMBER_OF_CHANNELS (4)
-
-/* PINT module features */
-
-/* @brief Number of connected outputs */
-#define FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS (8)
-
-/* PLU module features */
-
-/* @brief Has WAKEINT_CTRL register. */
-#define FSL_FEATURE_PLU_HAS_WAKEINT_CTRL_REG (1)
-
-/* POWERLIB module features */
-
-/* @brief Powerlib API is different with other LPC series devices. */
-#define FSL_FEATURE_POWERLIB_EXTEND (1)
-
-/* POWERQUAD module features */
-
-/* @brief Sine and Cossine fix errata */
-#define FSL_FEATURE_POWERQUAD_SIN_COS_FIX_ERRATA (1)
-
-/* PUF module features */
-
-/* @brief Number of PUF key slots available on device. */
-#define FSL_FEATURE_PUF_HAS_KEYSLOTS (4)
-/* @brief the shift status value */
-#define FSL_FEATURE_PUF_HAS_SHIFT_STATUS (1)
-
-/* SCT module features */
-
-/* @brief Number of events */
-#define FSL_FEATURE_SCT_NUMBER_OF_EVENTS (16)
-/* @brief Number of states */
-#define FSL_FEATURE_SCT_NUMBER_OF_STATES (32)
-/* @brief Number of match capture */
-#define FSL_FEATURE_SCT_NUMBER_OF_MATCH_CAPTURE (16)
-/* @brief Number of outputs */
-#define FSL_FEATURE_SCT_NUMBER_OF_OUTPUTS (10)
-
-/* SDIF module features */
-
-/* @brief FIFO depth, every location is a WORD */
-#define FSL_FEATURE_SDIF_FIFO_DEPTH_64_32BITS (64)
-/* @brief Max DMA buffer size */
-#define FSL_FEATURE_SDIF_INTERNAL_DMA_MAX_BUFFER_SIZE (4096)
-/* @brief Max source clock in HZ */
-#define FSL_FEATURE_SDIF_MAX_SOURCE_CLOCK (52000000)
-/* @brief support 2 cards */
-#define FSL_FEATURE_SDIF_ONE_INSTANCE_SUPPORT_TWO_CARD (1)
-
-/* SECPINT module features */
-
-/* @brief Number of connected outputs */
-#define FSL_FEATURE_SECPINT_NUMBER_OF_CONNECTED_OUTPUTS (2)
-
-/* SYSCON module features */
-
-/* @brief Flash page size in bytes */
-#define FSL_FEATURE_SYSCON_FLASH_PAGE_SIZE_BYTES (512)
-/* @brief Flash sector size in bytes */
-#define FSL_FEATURE_SYSCON_FLASH_SECTOR_SIZE_BYTES (32768)
-/* @brief Flash size in bytes */
-#define FSL_FEATURE_SYSCON_FLASH_SIZE_BYTES (622592)
-/* @brief Has Power Down mode */
-#define FSL_FEATURE_SYSCON_HAS_POWERDOWN_MODE (1)
-/* @brief CCM_ANALOG availability on the SoC. */
-#define FSL_FEATURE_SOC_CCM_ANALOG_COUNT (1)
-/* @brief Starter register discontinuous. */
-#define FSL_FEATURE_SYSCON_STARTER_DISCONTINUOUS (1)
-
-/* USB module features */
-
-/* @brief Size of the USB dedicated RAM */
-#define FSL_FEATURE_USB_USB_RAM (0x00004000)
-/* @brief Base address of the USB dedicated RAM */
-#define FSL_FEATURE_USB_USB_RAM_BASE_ADDRESS (0x40100000)
-/* @brief USB version */
-#define FSL_FEATURE_USB_VERSION (200)
-/* @brief Number of the endpoint in USB FS */
-#define FSL_FEATURE_USB_EP_NUM (5)
-
-/* USBFSH module features */
-
-/* @brief Size of the USB dedicated RAM */
-#define FSL_FEATURE_USBFSH_USB_RAM (0x00004000)
-/* @brief Base address of the USB dedicated RAM */
-#define FSL_FEATURE_USBFSH_USB_RAM_BASE_ADDRESS (0x40100000)
-/* @brief USBFSH version */
-#define FSL_FEATURE_USBFSH_VERSION (200)
-
-/* USBHSD module features */
-
-/* @brief Size of the USB dedicated RAM */
-#define FSL_FEATURE_USBHSD_USB_RAM (0x00004000)
-/* @brief Base address of the USB dedicated RAM */
-#define FSL_FEATURE_USBHSD_USB_RAM_BASE_ADDRESS (0x40100000)
-/* @brief USBHSD version */
-#define FSL_FEATURE_USBHSD_VERSION (300)
-/* @brief Number of the endpoint in USB HS */
-#define FSL_FEATURE_USBHSD_EP_NUM (6)
-
-/* USBHSH module features */
-
-/* @brief Size of the USB dedicated RAM */
-#define FSL_FEATURE_USBHSH_USB_RAM (0x00004000)
-/* @brief Base address of the USB dedicated RAM */
-#define FSL_FEATURE_USBHSH_USB_RAM_BASE_ADDRESS (0x40100000)
-/* @brief USBHSH version */
-#define FSL_FEATURE_USBHSH_VERSION (300)
-
-/* UTICK module features */
-
-/* @brief UTICK does not support PD configure. */
-#define FSL_FEATURE_UTICK_HAS_NO_PDCFG (1)
-
-/* WWDT module features */
-
-/* @brief WWDT does not support oscillator lock. */
-#define FSL_FEATURE_WWDT_HAS_NO_OSCILLATOR_LOCK (1)
-/* @brief WWDT does not support power down configure */
-#define FSL_FEATURE_WWDT_HAS_NO_PDCFG (1)
-
-#endif /* _LPC55S69_cm33_core1_FEATURES_H_ */
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/fsl_device_registers.h b/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/fsl_device_registers.h
deleted file mode 100755
index d75a93b2d7..0000000000
--- a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/fsl_device_registers.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2014-2016 Freescale Semiconductor, Inc.
- * Copyright 2016-2019 NXP
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#ifndef __FSL_DEVICE_REGISTERS_H__
-#define __FSL_DEVICE_REGISTERS_H__
-
-/*
- * Include the cpu specific register header files.
- *
- * The CPU macro should be declared in the project or makefile.
- */
-#if (defined(CPU_LPC55S69JBD100_cm33_core0) || defined(CPU_LPC55S69JBD64_cm33_core0) || \
- defined(CPU_LPC55S69JEV98_cm33_core0))
-
-#define LPC55S69_cm33_core0_SERIES
-
-/* CMSIS-style register definitions */
-#include "LPC55S69_cm33_core0.h"
-/* CPU specific feature definitions */
-#include "LPC55S69_cm33_core0_features.h"
-
-#elif (defined(CPU_LPC55S69JBD100_cm33_core1) || defined(CPU_LPC55S69JBD64_cm33_core1) || \
- defined(CPU_LPC55S69JEV98_cm33_core1))
-
-#define LPC55S69_cm33_core1_SERIES
-
-/* CMSIS-style register definitions */
-#include "LPC55S69_cm33_core1.h"
-/* CPU specific feature definitions */
-#include "LPC55S69_cm33_core1_features.h"
-
-#else
-#error "No valid CPU defined!"
-#endif
-
-#endif /* __FSL_DEVICE_REGISTERS_H__ */
-
-/*******************************************************************************
- * EOF
- ******************************************************************************/
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/system_LPC55S69_cm33_core0.c b/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/system_LPC55S69_cm33_core0.c
deleted file mode 100755
index 5553655831..0000000000
--- a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/system_LPC55S69_cm33_core0.c
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
-** ###################################################################
-** Processors: LPC55S69JBD100_cm33_core0
-** LPC55S69JBD64_cm33_core0
-** LPC55S69JEV98_cm33_core0
-**
-** Compilers: GNU C Compiler
-** IAR ANSI C/C++ Compiler for ARM
-** Keil ARM C/C++ Compiler
-** MCUXpresso Compiler
-**
-** Reference manual: LPC55S6x/LPC55S2x/LPC552x User manual(UM11126) Rev.1.3 16 May 2019
-** Version: rev. 1.1, 2019-05-16
-** Build: b190830
-**
-** Abstract:
-** Provides a system configuration function and a global variable that
-** contains the system frequency. It configures the device and initializes
-** the oscillator (PLL) that is part of the microcontroller device.
-**
-** Copyright 2016 Freescale Semiconductor, Inc.
-** Copyright 2016-2019 NXP
-** All rights reserved.
-**
-** SPDX-License-Identifier: BSD-3-Clause
-**
-** http: www.nxp.com
-** mail: support@nxp.com
-**
-** Revisions:
-** - rev. 1.0 (2018-08-22)
-** Initial version based on v0.2UM
-** - rev. 1.1 (2019-05-16)
-** Initial A1 version based on v1.3UM
-**
-** ###################################################################
-*/
-
-/*!
- * @file LPC55S69_cm33_core0
- * @version 1.1
- * @date 2019-05-16
- * @brief Device specific configuration file for LPC55S69_cm33_core0
- * (implementation file)
- *
- * Provides a system configuration function and a global variable that contains
- * the system frequency. It configures the device and initializes the oscillator
- * (PLL) that is part of the microcontroller device.
- */
-
-#include <stdint.h>
-#include "fsl_device_registers.h"
-
-/* PLL0 SSCG control1 */
-#define PLL_SSCG_MD_FRACT_P 0U
-#define PLL_SSCG_MD_INT_P 25U
-#define PLL_SSCG_MD_FRACT_M (0x1FFFFFFUL << PLL_SSCG_MD_FRACT_P)
-#define PLL_SSCG_MD_INT_M ((uint64_t)0xFFUL << PLL_SSCG_MD_INT_P)
-
-/* Get predivider (N) from PLL0 NDEC setting */
-static uint32_t findPll0PreDiv(void)
-{
- uint32_t preDiv = 1;
-
- /* Direct input is not used? */
- if ((SYSCON->PLL0CTRL & SYSCON_PLL0CTRL_BYPASSPREDIV_MASK) == 0)
- {
- preDiv = SYSCON->PLL0NDEC & SYSCON_PLL0NDEC_NDIV_MASK;
- if (preDiv == 0)
- {
- preDiv = 1;
- }
- }
- return preDiv;
-}
-
-/* Get postdivider (P) from PLL0 PDEC setting */
-static uint32_t findPll0PostDiv(void)
-{
- uint32_t postDiv = 1;
-
- if ((SYSCON->PLL0CTRL & SYSCON_PLL0CTRL_BYPASSPOSTDIV_MASK) == 0)
- {
- if (SYSCON->PLL0CTRL & SYSCON_PLL0CTRL_BYPASSPOSTDIV2_MASK)
- {
- postDiv = SYSCON->PLL0PDEC & SYSCON_PLL0PDEC_PDIV_MASK;
- }
- else
- {
- postDiv = 2 * (SYSCON->PLL0PDEC & SYSCON_PLL0PDEC_PDIV_MASK);
- }
- if (postDiv == 0)
- {
- postDiv = 2;
- }
- }
- return postDiv;
-}
-
-/* Get multiplier (M) from PLL0 SSCG and SEL_EXT settings */
-static float findPll0MMult(void)
-{
- float mMult = 1;
- float mMult_fract;
- uint32_t mMult_int;
-
- if (SYSCON->PLL0SSCG1 & SYSCON_PLL0SSCG1_SEL_EXT_MASK)
- {
- mMult = (SYSCON->PLL0SSCG1 & SYSCON_PLL0SSCG1_MDIV_EXT_MASK) >> SYSCON_PLL0SSCG1_MDIV_EXT_SHIFT;
- }
- else
- {
- mMult_int =
- ((SYSCON->PLL0SSCG1 & SYSCON_PLL0SSCG1_MD_MBS_MASK) << 7U) | ((SYSCON->PLL0SSCG0) >> PLL_SSCG_MD_INT_P);
- mMult_fract = ((float)((SYSCON->PLL0SSCG0) & PLL_SSCG_MD_FRACT_M) / (1 << PLL_SSCG_MD_INT_P));
- mMult = (float)mMult_int + mMult_fract;
- }
- if (mMult == 0)
- {
- mMult = 1;
- }
- return mMult;
-}
-
-/* Get predivider (N) from PLL1 NDEC setting */
-static uint32_t findPll1PreDiv(void)
-{
- uint32_t preDiv = 1;
-
- /* Direct input is not used? */
- if ((SYSCON->PLL1CTRL & SYSCON_PLL1CTRL_BYPASSPREDIV_MASK) == 0)
- {
- preDiv = SYSCON->PLL1NDEC & SYSCON_PLL1NDEC_NDIV_MASK;
- if (preDiv == 0)
- {
- preDiv = 1;
- }
- }
- return preDiv;
-}
-
-/* Get postdivider (P) from PLL1 PDEC setting */
-static uint32_t findPll1PostDiv(void)
-{
- uint32_t postDiv = 1;
-
- if ((SYSCON->PLL1CTRL & SYSCON_PLL1CTRL_BYPASSPOSTDIV_MASK) == 0)
- {
- if (SYSCON->PLL1CTRL & SYSCON_PLL1CTRL_BYPASSPOSTDIV2_MASK)
- {
- postDiv = SYSCON->PLL1PDEC & SYSCON_PLL1PDEC_PDIV_MASK;
- }
- else
- {
- postDiv = 2 * (SYSCON->PLL1PDEC & SYSCON_PLL1PDEC_PDIV_MASK);
- }
- if (postDiv == 0)
- {
- postDiv = 2;
- }
- }
- return postDiv;
-}
-
-/* Get multiplier (M) from PLL1 MDEC settings */
-static uint32_t findPll1MMult(void)
-{
- uint32_t mMult = 1;
-
- mMult = SYSCON->PLL1MDEC & SYSCON_PLL1MDEC_MDIV_MASK;
-
- if (mMult == 0)
- {
- mMult = 1;
- }
- return mMult;
-}
-
-/* Get FRO 12M Clk */
-/*! brief Return Frequency of FRO 12MHz
- * return Frequency of FRO 12MHz
- */
-static uint32_t CLOCK_GetFro12MFreq(void)
-{
- return (ANACTRL->FRO192M_CTRL & ANACTRL_FRO192M_CTRL_ENA_12MHZCLK_MASK) ? 12000000U : 0U;
-}
-
-/* Get FRO 1M Clk */
-/*! brief Return Frequency of FRO 1MHz
- * return Frequency of FRO 1MHz
- */
-static uint32_t CLOCK_GetFro1MFreq(void)
-{
- return (SYSCON->CLOCK_CTRL & SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_MASK) ? 1000000U : 0U;
-}
-
-/* Get EXT OSC Clk */
-/*! brief Return Frequency of External Clock
- * return Frequency of External Clock. If no external clock is used returns 0.
- */
-static uint32_t CLOCK_GetExtClkFreq(void)
-{
- return (ANACTRL->XO32M_CTRL & ANACTRL_XO32M_CTRL_ENABLE_SYSTEM_CLK_OUT_MASK) ? CLK_CLK_IN : 0U;
-}
-
-/* Get HF FRO Clk */
-/*! brief Return Frequency of High-Freq output of FRO
- * return Frequency of High-Freq output of FRO
- */
-static uint32_t CLOCK_GetFroHfFreq(void)
-{
- return (ANACTRL->FRO192M_CTRL & ANACTRL_FRO192M_CTRL_ENA_96MHZCLK_MASK) ? 96000000U : 0U;
-}
-
-/* Get RTC OSC Clk */
-/*! brief Return Frequency of 32kHz osc
- * return Frequency of 32kHz osc
- */
-static uint32_t CLOCK_GetOsc32KFreq(void)
-{
- return ((!(PMC->PDRUNCFG0 & PMC_PDRUNCFG0_PDEN_FRO32K_MASK)) && (!(PMC->RTCOSC32K & PMC_RTCOSC32K_SEL_MASK))) ?
- CLK_RTC_32K_CLK :
- ((!(PMC->PDRUNCFG0 & PMC_PDRUNCFG0_PDEN_XTAL32K_MASK)) && (PMC->RTCOSC32K & PMC_RTCOSC32K_SEL_MASK)) ?
- CLK_RTC_32K_CLK :
- 0U;
-}
-
-/* ----------------------------------------------------------------------------
- -- Core clock
- ---------------------------------------------------------------------------- */
-
-uint32_t SystemCoreClock = DEFAULT_SYSTEM_CLOCK;
-
-/* ----------------------------------------------------------------------------
- -- SystemInit()
- ---------------------------------------------------------------------------- */
-
-__attribute__((weak)) void SystemInit(void)
-{
- SCB->CPACR |= ((3UL << 0 * 2) | (3UL << 1 * 2)); /* set CP0, CP1 Full Access in Secure mode (enable PowerQuad) */
-#if defined(__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
- SCB_NS->CPACR |= ((3UL << 0 * 2) | (3UL << 1 * 2)); /* set CP0, CP1 Full Access in Normal mode (enable PowerQuad) */
-#endif /* (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */
-
- SCB->NSACR |= (3UL << 0); /* enable CP0, CP1 Non-secure Access */
-
-#if defined(__MCUXPRESSO)
- extern void (*const g_pfnVectors[])(void);
- SCB->VTOR = (uint32_t)&g_pfnVectors;
-#else
- extern void *__Vectors;
- SCB->VTOR = (uint32_t)&__Vectors;
-#endif
- SYSCON->TRACECLKDIV = 0;
-/* Optionally enable RAM banks that may be off by default at reset */
-#if !defined(DONT_ENABLE_DISABLED_RAMBANKS)
- SYSCON->AHBCLKCTRLSET[0] = SYSCON_AHBCLKCTRL0_SRAM_CTRL1_MASK | SYSCON_AHBCLKCTRL0_SRAM_CTRL2_MASK |
- SYSCON_AHBCLKCTRL0_SRAM_CTRL3_MASK | SYSCON_AHBCLKCTRL0_SRAM_CTRL4_MASK;
-#endif
- SystemInitHook();
-}
-
-/* ----------------------------------------------------------------------------
- -- SystemCoreClockUpdate()
- ---------------------------------------------------------------------------- */
-
-void SystemCoreClockUpdate(void)
-{
- uint32_t clkRate = 0;
- uint32_t prediv, postdiv;
- float workRate;
- uint64_t workRate1;
-
- switch (SYSCON->MAINCLKSELB & SYSCON_MAINCLKSELB_SEL_MASK)
- {
- case 0x00: /* MAINCLKSELA clock (main_clk_a)*/
- switch (SYSCON->MAINCLKSELA & SYSCON_MAINCLKSELA_SEL_MASK)
- {
- case 0x00: /* FRO 12 MHz (fro_12m) */
- clkRate = CLOCK_GetFro12MFreq();
- break;
- case 0x01: /* CLKIN (clk_in) */
- clkRate = CLOCK_GetExtClkFreq();
- break;
- case 0x02: /* Fro 1MHz (fro_1m) */
- clkRate = CLOCK_GetFro1MFreq();
- break;
- default: /* = 0x03 = FRO 96 MHz (fro_hf) */
- clkRate = CLOCK_GetFroHfFreq();
- break;
- }
- break;
- case 0x01: /* PLL0 clock (pll0_clk)*/
- switch (SYSCON->PLL0CLKSEL & SYSCON_PLL0CLKSEL_SEL_MASK)
- {
- case 0x00: /* FRO 12 MHz (fro_12m) */
- clkRate = CLOCK_GetFro12MFreq();
- break;
- case 0x01: /* CLKIN (clk_in) */
- clkRate = CLOCK_GetExtClkFreq();
- break;
- case 0x02: /* Fro 1MHz (fro_1m) */
- clkRate = CLOCK_GetFro1MFreq();
- break;
- case 0x03: /* RTC oscillator 32 kHz output (32k_clk) */
- clkRate = CLOCK_GetOsc32KFreq();
- break;
- default:
- break;
- }
- if (((SYSCON->PLL0CTRL & SYSCON_PLL0CTRL_BYPASSPLL_MASK) == 0) &&
- (SYSCON->PLL0CTRL & SYSCON_PLL0CTRL_CLKEN_MASK) &&
- ((PMC->PDRUNCFG0 & PMC_PDRUNCFG0_PDEN_PLL0_MASK) == 0) &&
- ((PMC->PDRUNCFG0 & PMC_PDRUNCFG0_PDEN_PLL0_SSCG_MASK) == 0))
- {
- prediv = findPll0PreDiv();
- postdiv = findPll0PostDiv();
- /* Adjust input clock */
- clkRate = clkRate / prediv;
- /* MDEC used for rate */
- workRate = (float)clkRate * (float)findPll0MMult();
- clkRate = (uint32_t)(workRate / ((float)postdiv));
- }
- break;
- case 0x02: /* PLL1 clock (pll1_clk)*/
- switch (SYSCON->PLL1CLKSEL & SYSCON_PLL1CLKSEL_SEL_MASK)
- {
- case 0x00: /* FRO 12 MHz (fro_12m) */
- clkRate = CLOCK_GetFro12MFreq();
- break;
- case 0x01: /* CLKIN (clk_in) */
- clkRate = CLOCK_GetExtClkFreq();
- break;
- case 0x02: /* Fro 1MHz (fro_1m) */
- clkRate = CLOCK_GetFro1MFreq();
- break;
- case 0x03: /* RTC oscillator 32 kHz output (32k_clk) */
- clkRate = CLOCK_GetOsc32KFreq();
- break;
- default:
- break;
- }
- if (((SYSCON->PLL1CTRL & SYSCON_PLL1CTRL_BYPASSPLL_MASK) == 0) &&
- (SYSCON->PLL1CTRL & SYSCON_PLL1CTRL_CLKEN_MASK) &&
- ((PMC->PDRUNCFG0 & PMC_PDRUNCFG0_PDEN_PLL1_MASK) == 0))
- {
- /* PLL is not in bypass mode, get pre-divider, post-divider, and M divider */
- prediv = findPll1PreDiv();
- postdiv = findPll1PostDiv();
- /* Adjust input clock */
- clkRate = clkRate / prediv;
-
- /* MDEC used for rate */
- workRate1 = (uint64_t)clkRate * (uint64_t)findPll1MMult();
- clkRate = workRate1 / ((uint64_t)postdiv);
- }
- break;
- case 0x03: /* RTC oscillator 32 kHz output (32k_clk) */
- clkRate = CLOCK_GetOsc32KFreq();
- break;
- default:
- break;
- }
- SystemCoreClock = clkRate / ((SYSCON->AHBCLKDIV & 0xFF) + 1);
-}
-
-/* ----------------------------------------------------------------------------
- -- SystemInitHook()
- ---------------------------------------------------------------------------- */
-
-__attribute__((weak)) void SystemInitHook(void)
-{
- /* Void implementation of the weak function. */
-}
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/system_LPC55S69_cm33_core0.h b/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/system_LPC55S69_cm33_core0.h
deleted file mode 100755
index 25204afcdc..0000000000
--- a/platform/ext/target/nxp/lpcxpresso55s69/Native_Driver/system_LPC55S69_cm33_core0.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-** ###################################################################
-** Processors: LPC55S69JBD100_cm33_core0
-** LPC55S69JBD64_cm33_core0
-** LPC55S69JEV98_cm33_core0
-**
-** Compilers: GNU C Compiler
-** IAR ANSI C/C++ Compiler for ARM
-** Keil ARM C/C++ Compiler
-** MCUXpresso Compiler
-**
-** Reference manual: LPC55S6x/LPC55S2x/LPC552x User manual(UM11126) Rev.1.3 16 May 2019
-** Version: rev. 1.1, 2019-05-16
-** Build: b190830
-**
-** Abstract:
-** Provides a system configuration function and a global variable that
-** contains the system frequency. It configures the device and initializes
-** the oscillator (PLL) that is part of the microcontroller device.
-**
-** Copyright 2016 Freescale Semiconductor, Inc.
-** Copyright 2016-2019 NXP
-** All rights reserved.
-**
-** SPDX-License-Identifier: BSD-3-Clause
-**
-** http: www.nxp.com
-** mail: support@nxp.com
-**
-** Revisions:
-** - rev. 1.0 (2018-08-22)
-** Initial version based on v0.2UM
-** - rev. 1.1 (2019-05-16)
-** Initial A1 version based on v1.3UM
-**
-** ###################################################################
-*/
-
-/*!
- * @file LPC55S69_cm33_core0
- * @version 1.1
- * @date 2019-05-16
- * @brief Device specific configuration file for LPC55S69_cm33_core0 (header
- * file)
- *
- * Provides a system configuration function and a global variable that contains
- * the system frequency. It configures the device and initializes the oscillator
- * (PLL) that is part of the microcontroller device.
- */
-
-#ifndef _SYSTEM_LPC55S69_cm33_core0_H_
-#define _SYSTEM_LPC55S69_cm33_core0_H_ /**< Symbol preventing repeated inclusion */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-
-#define DEFAULT_SYSTEM_CLOCK 12000000u /* Default System clock value */
-#define CLK_RTC_32K_CLK 32768u /* RTC oscillator 32 kHz output (32k_clk */
-#define CLK_FRO_12MHZ 12000000u /* FRO 12 MHz (fro_12m) */
-#define CLK_FRO_48MHZ 48000000u /* FRO 48 MHz (fro_48m) */
-#define CLK_FRO_96MHZ 96000000u /* FRO 96 MHz (fro_96m) */
-#define CLK_CLK_IN 16000000u /* Default CLK_IN pin clock */
-
-/**
- * @brief System clock frequency (core clock)
- *
- * The system clock frequency supplied to the SysTick timer and the processor
- * core clock. This variable can be used by the user application to setup the
- * SysTick timer or configure other parameters. It may also be used by debugger to
- * query the frequency of the debug timer or configure the trace clock speed
- * SystemCoreClock is initialized with a correct predefined value.
- */
-extern uint32_t SystemCoreClock;
-
-/**
- * @brief Setup the microcontroller system.
- *
- * Typically this function configures the oscillator (PLL) that is part of the
- * microcontroller device. For systems with variable clock speed it also updates
- * the variable SystemCoreClock. SystemInit is called from startup_device file.
- */
-void SystemInit(void);
-
-/**
- * @brief Updates the SystemCoreClock variable.
- *
- * It must be called whenever the core clock is changed during program
- * execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates
- * the current core clock.
- */
-void SystemCoreClockUpdate(void);
-
-/**
- * @brief SystemInit function hook.
- *
- * This weak function allows to call specific initialization code during the
- * SystemInit() execution.This can be used when an application specific code needs
- * to be called as close to the reset entry as possible (for example the Multicore
- * Manager MCMGR_EarlyInit() function call).
- * NOTE: No global r/w variables can be used in this hook function because the
- * initialization of these variables happens after this function.
- */
-void SystemInitHook(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SYSTEM_LPC55S69_cm33_core0_H_ */
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/config.cmake b/platform/ext/target/nxp/lpcxpresso55s69/config.cmake
index 3d6f0e9eaf..670d6d3272 100644
--- a/platform/ext/target/nxp/lpcxpresso55s69/config.cmake
+++ b/platform/ext/target/nxp/lpcxpresso55s69/config.cmake
@@ -5,4 +5,6 @@
#
#-------------------------------------------------------------------------------
+
set(PS_NUM_ASSETS "5" CACHE STRING "The maximum number of assets to be stored in the Protected Storage area")
+set(PS_MAX_ASSET_SIZE "512" CACHE STRING "The maximum asset size to be stored in the Protected Storage area") \ No newline at end of file
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/partition/flash_layout.h b/platform/ext/target/nxp/lpcxpresso55s69/partition/flash_layout.h
index eca6c81bf9..55701f5264 100755
--- a/platform/ext/target/nxp/lpcxpresso55s69/partition/flash_layout.h
+++ b/platform/ext/target/nxp/lpcxpresso55s69/partition/flash_layout.h
@@ -1,7 +1,6 @@
/*
* Copyright (c) 2018-2021 Arm Limited. All rights reserved.
- * Copyright (c) 2020 Cypress Semiconductor Corporation. All rights reserved.
- * Copyright (c) 2020 Linaro. All rights reserved.
+ * Copyright 2019-2021 NXP. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,13 +42,15 @@
*
* Flash layout on LPC55S69 without BL2:
*
- * 0x0000_0000 Secure + Non-secure image area (512 KB):
- * 0x0000_0000 Secure image (256 KB)
- * 0x0004_0000 Non-secure image (256 KB)
- * 0x0008_0000 Protected Storage Area (10 KB)
- * 0x0008_2800 Internal Trusted Storage Area (8 KB)
- * 0x0008_4800 NV counters area (512 B)
- * 0x0008_4A00 Unused (77.5 KB)
+ * 0x0000_0000 Primary image area(576 kB):
+ * 0x0000_0000 Secure image primary (320 kB)
+ * 0x0005_0000 Non-secure image primary (256 kB)
+ * Reserved area:
+ * 0xXXXX_XXXX Secure Binary tail Area (4 KB), if SB is used.
+ * 0xXXXX_XXXX Protected Storage Area (3 KB)
+ * 0xXXXX_XXXX Internal Trusted Storage Area (3 KB)
+ * 0xXXXX_XXXX NV counters area (512 B)
+ * 0xXXXX_XXXX Unused
*/
/* This header file is included from linker scatter file as well, where only a
@@ -64,7 +65,7 @@
#define FLASH_S_PARTITION_SIZE (0x28000) /* S partition: 160 KB */
#define FLASH_NS_PARTITION_SIZE (0x18000) /* NS partition: 96 KB */
#else
-#define FLASH_S_PARTITION_SIZE (0x40000) /* S partition: 256 KB*/
+#define FLASH_S_PARTITION_SIZE (0x50000) /* S partition: 320 kB*/
#define FLASH_NS_PARTITION_SIZE (0x40000) /* NS partition: 256 KB*/
#endif /* BL2 */
#define FLASH_MAX_PARTITION_SIZE ((FLASH_S_PARTITION_SIZE > \
@@ -73,13 +74,13 @@
FLASH_NS_PARTITION_SIZE)
/* Sector size of the embedded flash hardware (erase/program) */
-#define FLASH_AREA_IMAGE_SECTOR_SIZE (512) /* 512 B. Flash memory program/erase operations have a page granularity. */
-
-/* Flash size, same as FLASH0_SIZE */
-#define FLASH_TOTAL_SIZE (0x00098000) /* 608 KB. The last 17 pages (10 KB) are reserved on the 640 KB flash. Sub-region is 32KB, so available for application is 608 KB. */
+#define FLASH_AREA_IMAGE_SECTOR_SIZE (512) /* 512 B. Flash memory program/erase operations have a page granularity. */
+/* FLASH size */
+#define FLASH_TOTAL_SIZE (0x000A0000-(17*FLASH_AREA_IMAGE_SECTOR_SIZE)) /* 631.5 kB. The last 17 pages (8.5KB) are reserved for PFR on the 640KB flash. */
+
/* Flash layout info for BL2 bootloader */
-#define FLASH_BASE_ADDRESS (0x00000000)
+#define FLASH_BASE_ADDRESS (0x00000000)
#ifdef BL2
/* Offset and size definitions of the flash partitions that are handled by the
@@ -164,14 +165,16 @@
* FLASH_NV_COUNTERS_AREA_OFFSET point to offsets in flash, but reads and writes
* to these addresses are redirected to Code SRAM by Driver_Flash.c.
*/
+
+/* Protected Storage (PS) Service definitions */
#define FLASH_PS_AREA_OFFSET (FLASH_AREA_SCRATCH_OFFSET + \
FLASH_AREA_SCRATCH_SIZE)
-#define FLASH_PS_AREA_SIZE (0x2800) /* 10 KB */
+#define FLASH_PS_AREA_SIZE (0xC00) /* 3 KB */
/* Internal Trusted Storage (ITS) Service definitions */
#define FLASH_ITS_AREA_OFFSET (FLASH_PS_AREA_OFFSET + \
FLASH_PS_AREA_SIZE)
-#define FLASH_ITS_AREA_SIZE (0x2000) /* 8 KB */
+#define FLASH_ITS_AREA_SIZE (0xC00) /* 3 KB */
/* NV Counters definitions */
#define FLASH_NV_COUNTERS_AREA_OFFSET (FLASH_ITS_AREA_OFFSET + \
@@ -201,16 +204,17 @@
* address instead of the full memory address.
*/
/* Base address of dedicated flash area for PS */
-#define TFM_HAL_PS_FLASH_AREA_ADDR FLASH_PS_AREA_OFFSET
+#define TFM_HAL_PS_FLASH_AREA_ADDR FLASH_PS_AREA_OFFSET
/* Size of dedicated flash area for PS */
-#define TFM_HAL_PS_FLASH_AREA_SIZE FLASH_PS_AREA_SIZE
-#define PS_RAM_FS_SIZE TFM_HAL_PS_FLASH_AREA_SIZE
+#define TFM_HAL_PS_FLASH_AREA_SIZE FLASH_PS_AREA_SIZE
+#define PS_RAM_FS_SIZE TFM_HAL_PS_FLASH_AREA_SIZE
/* Number of physical erase sectors per logical FS block */
-#define TFM_HAL_PS_SECTORS_PER_BLOCK (8)
+#define TFM_HAL_PS_SECTORS_PER_BLOCK 3
+
/* Smallest flash programmable unit in bytes */
-#define TFM_HAL_PS_PROGRAM_UNIT FLASH_AREA_IMAGE_SECTOR_SIZE
-#define PS_FLASH_NAND_BUF_SIZE (FLASH_AREA_IMAGE_SECTOR_SIZE * \
- TFM_HAL_PS_SECTORS_PER_BLOCK)
+#define TFM_HAL_PS_PROGRAM_UNIT FLASH_AREA_IMAGE_SECTOR_SIZE
+#define PS_FLASH_NAND_BUF_SIZE (FLASH_AREA_IMAGE_SECTOR_SIZE * \
+ TFM_HAL_ITS_SECTORS_PER_BLOCK)
/* Internal Trusted Storage (ITS) Service definitions
* Note: Further documentation of these definitions can be found in the
@@ -229,9 +233,10 @@
#define TFM_HAL_ITS_FLASH_AREA_SIZE FLASH_ITS_AREA_SIZE
#define ITS_RAM_FS_SIZE TFM_HAL_ITS_FLASH_AREA_SIZE
/* Number of physical erase sectors per logical FS block */
-#define TFM_HAL_ITS_SECTORS_PER_BLOCK (8)
+#define TFM_HAL_ITS_SECTORS_PER_BLOCK 3
+
/* Smallest flash programmable unit in bytes */
-#define TFM_HAL_ITS_PROGRAM_UNIT FLASH_AREA_IMAGE_SECTOR_SIZE
+#define TFM_HAL_ITS_PROGRAM_UNIT FLASH_AREA_IMAGE_SECTOR_SIZE
#define ITS_FLASH_NAND_BUF_SIZE (FLASH_AREA_IMAGE_SECTOR_SIZE * \
TFM_HAL_ITS_SECTORS_PER_BLOCK)
@@ -242,14 +247,14 @@
#define TFM_NV_COUNTERS_SECTOR_SIZE FLASH_AREA_IMAGE_SECTOR_SIZE
/* Use Flash memory to store Code data */
-#define S_ROM_ALIAS_BASE (0x10000000)
-#define NS_ROM_ALIAS_BASE (0x00000000)
+#define S_ROM_ALIAS_BASE (0x10000000)
+#define NS_ROM_ALIAS_BASE (0x00000000)
/* Use SRAM[0-4] memory to store RW data */
-#define S_RAM_ALIAS_BASE (0x30000000)
-#define NS_RAM_ALIAS_BASE (0x20000000)
+#define S_RAM_ALIAS_BASE (0x30000000)
+#define NS_RAM_ALIAS_BASE (0x20000000)
-#define TOTAL_ROM_SIZE FLASH_TOTAL_SIZE
-#define TOTAL_RAM_SIZE (0x00044000) /* RAM 0-4. 272 KB RAM for data (without SRAM X for code)*/
+#define TOTAL_ROM_SIZE FLASH_TOTAL_SIZE
+#define TOTAL_RAM_SIZE (0x00044000) /* RAM 0-4. 272 KB RAM for data (without SRAM X for code)*/
#endif /* __FLASH_LAYOUT_H__ */
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/partition/region_defs.h b/platform/ext/target/nxp/lpcxpresso55s69/partition/region_defs.h
index f47cfea037..215858122a 100755
--- a/platform/ext/target/nxp/lpcxpresso55s69/partition/region_defs.h
+++ b/platform/ext/target/nxp/lpcxpresso55s69/partition/region_defs.h
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 2017-2019 Arm Limited. All rights reserved.
+ * Copyright (c) 2017-2020 Arm Limited. All rights reserved.
+ * Copyright 2019-2020 NXP. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,8 +29,8 @@
#define S_PSP_STACK_SIZE (0x0000800)
#define NS_HEAP_SIZE (0x0001000)
-#define NS_MSP_STACK_SIZE (0x0000400)
-#define NS_PSP_STACK_SIZE (0x0000C00)
+#define NS_MSP_STACK_SIZE (0x00000A0)
+#define NS_PSP_STACK_SIZE (0x0000140)
/* This size of buffer is big enough to store an attestation
* token produced by initial attestation service
@@ -117,19 +118,14 @@
#define NS_DATA_SIZE (TOTAL_RAM_SIZE - S_DATA_SIZE)
#define NS_DATA_LIMIT (NS_DATA_START + NS_DATA_SIZE - 1)
-
/* Flash is divided into 32 kB sub-regions. Each sub-region can be assigned individual
security tier by programing corresponding registers in secure AHB controller.*/
#define FLASH_SUBREGION_SIZE (0x8000) /* 32 kB */
-
-
/* RAM is divided into 4 kB sub-regions. Each sub-region can be assigned individual
security tier by programing corresponding registers in secure AHB controller. */
#define DATA_SUBREGION_SIZE 0x1000 /* 4 KB*/
-
-
/* NS partition information is used for MPC and SAU configuration */
#define NS_PARTITION_START \
(NS_ROM_ALIAS(NS_IMAGE_PRIMARY_PARTITION_OFFSET))
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/pull_drivers.cmake b/platform/ext/target/nxp/lpcxpresso55s69/pull_drivers.cmake
new file mode 100644
index 0000000000..f10be4a64c
--- /dev/null
+++ b/platform/ext/target/nxp/lpcxpresso55s69/pull_drivers.cmake
@@ -0,0 +1,97 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+# Copyright (c) 2021, NXP Semiconductors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+#========================= Pull MCUxpresso NXP SDK drivers from https://github.com/NXPmicro/mcux-sdk =========================#
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/casper/fsl_casper.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_casper.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/casper/fsl_casper.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_casper.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/common/fsl_common.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_common.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/common/fsl_common.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_common.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/ctimer/fsl_ctimer.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_ctimer.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/ctimer/fsl_ctimer.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_ctimer.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/flexcomm/fsl_flexcomm.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_flexcomm.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/flexcomm/fsl_flexcomm.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_flexcomm.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/lpc_gpio/fsl_gpio.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_gpio.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/lpc_gpio/fsl_gpio.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_gpio.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/hashcrypt/fsl_hashcrypt.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_hashcrypt.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/hashcrypt/fsl_hashcrypt.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_hashcrypt.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/iap1/fsl_iap.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_iap.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/iap1/fsl_iap.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_iap.h)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/iap1/fsl_iap_kbp.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_iap_kbp.h)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/iap1/fsl_iap_skboot_authenticate.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_iap_skboot_authenticate.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/iap1/fsl_iap_ffr.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_iap_ffr.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/lpc_iocon/fsl_iocon.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_iocon.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/rng_1/fsl_rng.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_rng.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/rng_1/fsl_rng.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_rng.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/flexcomm/fsl_usart.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_usart.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/drivers/flexcomm/fsl_usart.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/drivers/fsl_usart.h)
+
+#========================= Pull MCUxpresso NXP SDK components from https://github.com/NXPmicro/mcux-sdk =========================#
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/components/lists/fsl_component_generic_list.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/lists/fsl_component_generic_list.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/components/lists/fsl_component_generic_list.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/lists/fsl_component_generic_list.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/components/serial_manager/fsl_component_serial_manager.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/serial_manager/fsl_component_serial_manager.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/components/serial_manager/fsl_component_serial_manager.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/serial_manager/fsl_component_serial_manager.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/components/serial_manager/fsl_component_serial_port_internal.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/serial_manager/fsl_component_serial_port_internal.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/components/serial_manager/fsl_component_serial_port_uart.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/serial_manager/fsl_component_serial_port_uart.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/components/serial_manager/fsl_component_serial_port_uart.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/serial_manager/fsl_component_serial_port_uart.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/components/uart/fsl_adapter_uart.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/uart/fsl_adapter_uart.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/components/uart/fsl_adapter_usart.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/components/uart/fsl_adapter_usart.c)
+
+#========================= Pull MCUxpresso NXP SDK utilities from https://github.com/NXPmicro/mcux-sdk =========================#
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/utilities/debug_console/debug_console/fsl_debug_console.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/utilities/debug_console/debug_console/fsl_debug_console.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console.h)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/utilities/debug_console/debug_console/fsl_debug_console_conf.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/utilities/debug_console/fsl_debug_console_conf.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/utilities/debug_console/str/fsl_str.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/utilities/str/fsl_str.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/utilities/debug_console/str/fsl_str.h ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/utilities/str/fsl_str.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/utilities/assert/fsl_assert.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/utilities/fsl_assert.c)
+
+
+#========================= Pull MCUxpresso NXP SDK devices from https://github.com/NXPmicro/mcux-sdk =========================#
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/fsl_device_registers.h ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/fsl_device_registers.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/LPC55S69_cm33_core0.h ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core0.h)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/LPC55S69_cm33_core0_features.h ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core0_features.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/LPC55S69_cm33_core1.h ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core1.h)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/LPC55S69_cm33_core1_features.h ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/LPC55S69_cm33_core1_features.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/system_LPC55S69_cm33_core0.c ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/system_LPC55S69_cm33_core0.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/system_LPC55S69_cm33_core0.h ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/system_LPC55S69_cm33_core0.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/utilities/fsl_notifier.c ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/utilities/fsl_notifier.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/utilities/fsl_notifier.h ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/utilities/fsl_notifier.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/utilities/misc_utilities/fsl_sbrk.c ${PLATFORM_DIR}/ext/target/nxp/common/Native_Driver/utilities/fsl_sbrk.c)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/utilities/fsl_shell.c ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/utilities/fsl_shell.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/utilities/fsl_shell.h ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/utilities/fsl_shell.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/drivers/fsl_power.c ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/drivers/fsl_power.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/drivers/fsl_power.h ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/drivers/fsl_power.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/drivers/fsl_reset.c ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/drivers/fsl_reset.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/drivers/fsl_reset.h ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/drivers/fsl_reset.h)
+
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/drivers/fsl_clock.c ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/drivers/fsl_clock.c)
+file(DOWNLOAD https://raw.githubusercontent.com/NXPmicro/mcux-sdk/MCUX_2.9.0/devices/LPC55S69/drivers/fsl_clock.h ${PLATFORM_DIR}/ext/target/nxp/lpcxpresso55s69/Native_Driver/drivers/fsl_clock.h) \ No newline at end of file
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.c b/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.c
index 153b6d6635..9a27464a34 100755
--- a/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.c
+++ b/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.c
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2018-2020 Arm Limited. All rights reserved.
- * Copyright (c) 2021 IAR Systems AB
+ * Copyright (c) 2019-2020 NXP. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,15 +15,16 @@
* limitations under the License.
*/
-#include "device_definition.h"
+#include "target_cfg.h"
#include "Driver_Common.h"
#include "platform_description.h"
+#include "device_definition.h"
#include "region_defs.h"
-#include "tfm_assert.h"
-#include "target_cfg.h"
+#include "tfm_secure_api.h"
#include "tfm_plat_defs.h"
-#include "tfm_spm_log.h"
#include "region.h"
+#include "tfm_assert.h"
+#include "log/tfm_log.h"
/* The section names come from the scatter file */
REGION_DECLARE(Load$$LR$$, LR_NS_PARTITION, $$Base);
@@ -66,7 +67,7 @@ const struct memory_region_limits memory_regions = {
/* Define Peripherals NS address range for the platform */
#define PERIPHERALS_BASE_NS_START (0x40000000)
-#define PERIPHERALS_BASE_NS_END (0x4010FFFF)
+#define PERIPHERALS_BASE_NS_END (0x4FFFFFFF)
/* Enable system reset request for CPU 0 */
#define ENABLE_CPU0_SYSTEM_RESET_REQUEST (1U << 4U)
@@ -167,12 +168,10 @@ void sau_and_idau_cfg(void)
& SAU_RLAR_LADDR_Msk)
| SAU_RLAR_ENABLE_Msk;
-
SAU->RNR = 1U;
SAU->RBAR = (NS_DATA_START & SAU_RBAR_BADDR_Msk);
SAU->RLAR = (NS_DATA_LIMIT & SAU_RLAR_LADDR_Msk) | SAU_RLAR_ENABLE_Msk;
-
/* Configures veneers region to be non-secure callable */
SAU->RNR = 2U;
SAU->RBAR = (memory_regions.veneer_base & SAU_RBAR_BADDR_Msk);
@@ -194,19 +193,18 @@ void sau_and_idau_cfg(void)
| SAU_RLAR_ENABLE_Msk;
#endif /* BL2 */
- SPMLOG_INFMSG("=== [SAU NS] =======\r\n");
- SPMLOG_INFMSGVAL("NS ROM Base: ", memory_regions.non_secure_partition_base);
- SPMLOG_INFMSGVAL("NS ROM Limit: ", memory_regions.non_secure_partition_limit);
- SPMLOG_INFMSGVAL("NS DATA Base: ", NS_DATA_START);
- SPMLOG_INFMSGVAL("NS DATA Limit: ", NS_DATA_LIMIT);
- SPMLOG_INFMSGVAL("NSC Base: ", memory_regions.veneer_base);
- SPMLOG_INFMSGVAL("NSC Limit: ", memory_regions.veneer_limit);
- SPMLOG_INFMSGVAL("PERIPHERALS Base: ", PERIPHERALS_BASE_NS_START);
- SPMLOG_INFMSGVAL("PERIPHERALS Limit: ", PERIPHERALS_BASE_NS_END);
+#if TARGET_DEBUG_LOG
+ LOG_MSG("=== [SAU NS] =======\r\n");
+ LOG_MSG("NS ROM [0x%x, 0x%x]\r\n", memory_regions.non_secure_partition_base, memory_regions.non_secure_partition_limit);
+ LOG_MSG("NS DATA [0x%x, 0x%x]\r\n", NS_DATA_START, NS_DATA_LIMIT);
+ LOG_MSG("NSC [0x%x, 0x%x]\r\n", memory_regions.veneer_base, memory_regions.veneer_limit);
+ LOG_MSG("PERIPHERALS [0x%x, 0x%x]\r\n", PERIPHERALS_BASE_NS_START, PERIPHERALS_BASE_NS_END);
+#endif
}
+
/*------------------- Memory configuration functions -------------------------*/
-int32_t ahb_secure_control_memory_init(void)
+int32_t mpc_init_cfg(void)
{
uint32_t ns_region_id = 0;
uint32_t ns_region_start_id = 0;
@@ -218,18 +216,25 @@ int32_t ahb_secure_control_memory_init(void)
*/
__DMB();
+ /* Configuration of AHB Secure Controller
+ * Possible values for every memory sector or peripheral rule:
+ * 0 Non-secure, user access allowed.
+ * 1 Non-secure, privileged access allowed.
+ * 2 Secure, user access allowed.
+ * 3 Secure, privileged access allowed. */
+
/* == Flash region == */
+ /* The regions have to be alligned to 32 kB to cover the AHB Flash Region. */
+ TFM_ASSERT((memory_regions.non_secure_partition_base % FLASH_SUBREGION_SIZE) == 0);
+ TFM_ASSERT(((memory_regions.non_secure_partition_limit+1) % FLASH_SUBREGION_SIZE) == 0);
+
/* Flash region is divided into 20 sub-regions (sector). Each flash sub-regions (sector) is 32 kbytes. */
/* 1) Set FLASH memory security access rule configuration to init value (0x3 = all regions set to secure and privileged user access) */
AHB_SECURE_CTRL->SEC_CTRL_FLASH_ROM[0].SEC_CTRL_FLASH_MEM_RULE[0] = 0x33333333U;
AHB_SECURE_CTRL->SEC_CTRL_FLASH_ROM[0].SEC_CTRL_FLASH_MEM_RULE[1] = 0x33333333U;
AHB_SECURE_CTRL->SEC_CTRL_FLASH_ROM[0].SEC_CTRL_FLASH_MEM_RULE[2] = 0x33333333U;
- /* The regions have to be alligned to 32 kB to cover the AHB Flash Region. */
- TFM_ASSERT((memory_regions.non_secure_partition_base % FLASH_SUBREGION_SIZE) == 0);
- TFM_ASSERT(((memory_regions.non_secure_partition_limit+1) % FLASH_SUBREGION_SIZE) == 0);
-
/* 2) Set FLASH memory security access rule configuration (set to non-secure and non-privileged user access allowed).*/
ns_region_start_id = memory_regions.non_secure_partition_base/FLASH_SUBREGION_SIZE;
ns_region_end_id = (memory_regions.non_secure_partition_limit+1)/FLASH_SUBREGION_SIZE;
@@ -291,7 +296,6 @@ int32_t ahb_secure_control_memory_init(void)
AHB_SECURE_CTRL->SEC_CTRL_FLASH_ROM[0].SEC_CTRL_ROM_MEM_RULE[2] = 0x33333333U;
AHB_SECURE_CTRL->SEC_CTRL_FLASH_ROM[0].SEC_CTRL_ROM_MEM_RULE[3] = 0x33333333U;
-
/* == RAMX region == */
/* Each RAMX sub region is 4 kbytes.*/
@@ -300,6 +304,10 @@ int32_t ahb_secure_control_memory_init(void)
/* == SRAM region == */
+ /* The regions have to be alligned to 4 kB to cover the AHB RAM Region */
+ TFM_ASSERT((S_DATA_SIZE % DATA_SUBREGION_SIZE) == 0);
+ TFM_ASSERT(((S_DATA_SIZE + NS_DATA_SIZE) % DATA_SUBREGION_SIZE) == 0);
+
/* Security access rules for RAM (0x3 = all regions set to secure and privileged user access*/
AHB_SECURE_CTRL->SEC_CTRL_RAM0[0].MEM_RULE[0]= 0x33333333U; /* 0x2000_0000 - 0x2000_7FFF */
AHB_SECURE_CTRL->SEC_CTRL_RAM0[0].MEM_RULE[1]= 0x33333333U; /* 0x2000_8000 - 0x2000_FFFF */
@@ -311,10 +319,6 @@ int32_t ahb_secure_control_memory_init(void)
AHB_SECURE_CTRL->SEC_CTRL_RAM3[0].MEM_RULE[1]= 0x33333333U; /* 0x2003_8000 - 0x2003_FFFF */
AHB_SECURE_CTRL->SEC_CTRL_RAM4[0].MEM_RULE[0]= 0x33333333U; /* 0x2004_0000 - 0x2004_3FFF */
- /* The regions have to be alligned to 4 kB to cover the AHB RAM Region */
- TFM_ASSERT((S_DATA_SIZE % DATA_SUBREGION_SIZE) == 0);
- TFM_ASSERT(((S_DATA_SIZE + NS_DATA_SIZE) % DATA_SUBREGION_SIZE) == 0);
-
/* RAM memory configuration (set according to region_defs.h and flash_layout.h) */
ns_region_start_id = S_DATA_SIZE/DATA_SUBREGION_SIZE; /* NS starts after S */
ns_region_end_id = (S_DATA_SIZE + NS_DATA_SIZE)/DATA_SUBREGION_SIZE;
@@ -358,13 +362,20 @@ int32_t ahb_secure_control_memory_init(void)
AHB_SECURE_CTRL->SEC_CTRL_RAM4[0].MEM_RULE[0] &= ~(0xF << ((ns_region_id-64)*4));
}
}
-
- SPMLOG_INFMSG("=== [AHB MPC NS] =======\r\n");
- SPMLOG_INFMSGVAL("NS ROM Base: ", memory_regions.non_secure_partition_base);
- SPMLOG_INFMSGVAL("NS ROM Limit: ", memory_regions.non_secure_partition_limit);
- SPMLOG_INFMSGVAL("NS DATA Base: ", NS_DATA_START);
- SPMLOG_INFMSGVAL("NS DATA Limit: ", NS_DATA_LIMIT);
-
+
+ /* Security access rules for USB-HS RAM sub region 0_0 to 0_3. Each USB-HS RAM sub region is 4 kbytes */
+ AHB_SECURE_CTRL->SEC_CTRL_USB_HS[0].MEM_RULE[0] =
+ AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_0_RULE(0x0U) | /* Address space: 0x4010_0000 - 0x4010_0FFF */
+ AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_1_RULE(0x0U) | /* Address space: 0x4010_1000 - 0x4010_1FFF */
+ AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_2_RULE(0x0U) | /* Address space: 0x4010_2000 - 0x4010_2FFF */
+ AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_3_RULE(0x0U); /* Address space: 0x4010_3000 - 0x4010_3FFF */
+
+#if TARGET_DEBUG_LOG
+ LOG_MSG("=== [AHB MPC NS] =======\r\n");
+ LOG_MSG("NS ROM [0x%x, 0x%x]\r\n", memory_regions.non_secure_partition_base, memory_regions.non_secure_partition_limit);
+ LOG_MSG("NS DATA [0x%x, 0x%x]\r\n", NS_DATA_START, NS_DATA_LIMIT);
+#endif
+
/* Add barriers to assure the MPC configuration is done before continue
* the execution.
*/
@@ -376,11 +387,18 @@ int32_t ahb_secure_control_memory_init(void)
/*---------------------- PPC configuration functions -------------------------*/
-int32_t ahb_secure_control_peripheral_init(void)
+int32_t ppc_init_cfg(void)
{
- /* == Grant non-secure and non-privileged user access access to peripherals (reset value) == */
+ /* Configuration of AHB Secure Controller. Grant user access to peripherals.
+ * Possible values for every memory sector or peripheral rule:
+ * 0 Non-secure, user access allowed.
+ * 1 Non-secure, privileged access allowed.
+ * 2 Secure, user access allowed.
+ * 3 Secure, privileged access allowed. */
+
/* Security access rules for APB Bridge 0 peripherals. */
AHB_SECURE_CTRL->SEC_CTRL_APB_BRIDGE[0].SEC_CTRL_APB_BRIDGE0_MEM_CTRL0 =
+ (0x30000000U) | /* Bits have to be set to '1' according to UM.*/
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_SYSCON_RULE(0x0U) | /* System configuration */
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_IOCON_RULE(0x0U) | /* I/O configuration */
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_GINT0_RULE(0x0U) | /* GPIO input Interrupt 0 */
@@ -390,6 +408,7 @@ int32_t ahb_secure_control_peripheral_init(void)
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL0_INPUTMUX_RULE(0x0U); /* Peripheral Input Multiplexing. */
AHB_SECURE_CTRL->SEC_CTRL_APB_BRIDGE[0].SEC_CTRL_APB_BRIDGE0_MEM_CTRL1 =
+ (0x30003300U) | /* Bits have to be set to '1' according to UM.*/
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER0_RULE(0x0U) | /* Standard counter/Timer 0 */
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_CTIMER1_RULE(0x0U) | /* Standard counter/Timer 1 */
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_WWDT_RULE(0x0U) | /* Windowed watchdog Timer */
@@ -397,14 +416,17 @@ int32_t ahb_secure_control_peripheral_init(void)
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL1_UTICK_RULE(0x0U); /* Micro-Timer */
AHB_SECURE_CTRL->SEC_CTRL_APB_BRIDGE[0].SEC_CTRL_APB_BRIDGE0_MEM_CTRL2 =
+ (0x33330333U) | /* Bits have to be set to '1' according to UM.*/
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE0_MEM_CTRL2_ANACTRL_RULE(0x0U); /* Analog modules controller */
/* Security access rules for APB Bridge 1 peripherals. */
AHB_SECURE_CTRL->SEC_CTRL_APB_BRIDGE[0].SEC_CTRL_APB_BRIDGE1_MEM_CTRL0 =
+ (0x33330330U) | /* Bits have to be set to '1' according to UM.*/
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_PMC_RULE(0x0U) | /* Power Management Controller */
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL0_SYSCTRL_RULE(0x0U); /* System Controller */
AHB_SECURE_CTRL->SEC_CTRL_APB_BRIDGE[0].SEC_CTRL_APB_BRIDGE1_MEM_CTRL1 =
+ (0x33003000U) | /* Bits have to be set to '1' according to UM.*/
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER2_RULE(0x0U) | /* Standard counter/Timer 2 */
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER3_RULE(0x0U) | /* Standard counter/Timer 3 */
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_CTIMER4_RULE(0x0U) | /* Standard counter/Timer 4 */
@@ -412,17 +434,21 @@ int32_t ahb_secure_control_peripheral_init(void)
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL1_OSEVENT_RULE(0x0U); /* OS Event Timer */
AHB_SECURE_CTRL->SEC_CTRL_APB_BRIDGE[0].SEC_CTRL_APB_BRIDGE1_MEM_CTRL2 =
- AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_FLASH_CTRL_RULE(0x0U) | /* Flash controller */
- AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_PRINCE_RULE(0x0U); /* PRINCE */
+ (0x33003333U) | /* Bits have to be set to '1' according to UM.*/
+ AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_FLASH_CTRL_RULE(0x3U) | /* Flash controller = S*/
+ AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL2_PRINCE_RULE(0x3U); /* PRINCE = S */
AHB_SECURE_CTRL->SEC_CTRL_APB_BRIDGE[0].SEC_CTRL_APB_BRIDGE1_MEM_CTRL3 =
+ /* 0x0F000000U | */
+ (0x33030030U) | /* Bits have to be set to '1' according to UM.*/
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_USBHPHY_RULE(0x0U) | /* USB High Speed Phy controller */
- AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_RNG_RULE(0x0U) | /* True Random Number Generator */
- AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PUF_RULE(0x0U) | /* PUF */
+ AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_RNG_RULE(0x3U) | /* True Random Number Generator = S */
+ AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PUF_RULE(0x3U) | /* PUF = S*/
AHB_SECURE_CTRL_SEC_CTRL_APB_BRIDGE1_MEM_CTRL3_PLU_RULE(0x0U); /* Programmable Look-Up logic */
/* Security access rules for AHB peripherals on AHB Slave Port P8*/
AHB_SECURE_CTRL->SEC_CTRL_AHB_PORT8_SLAVE0_RULE =
+ (0x00003033U) | /* Bits have to be set to '1' according to UM.*/
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_DMA0_RULE(0x0U) | /* DMA0 */
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FS_USB_DEV_RULE(0x0U) | /* USB */
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_SCT_RULE(0x0U) | /* SCT */
@@ -430,6 +456,7 @@ int32_t ahb_secure_control_peripheral_init(void)
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE0_RULE_FLEXCOMM1_RULE(0x0U); /* FLEXCOMM1 */
AHB_SECURE_CTRL->SEC_CTRL_AHB_PORT8_SLAVE1_RULE =
+ (0x00300000U) | /* Bits have to be set to '1' according to UM.*/
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM2_RULE(0x0U) | /* FLEXCOMM2 */
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM3_RULE(0x0U) | /* FLEXCOMM3 */
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT8_SLAVE1_RULE_FLEXCOMM4_RULE(0x0U) | /* FLEXCOMM4 */
@@ -438,12 +465,14 @@ int32_t ahb_secure_control_peripheral_init(void)
/* Security access rules for AHB peripherals on AHB Slave Port P9 */
AHB_SECURE_CTRL->SEC_CTRL_AHB_PORT9_SLAVE0_RULE =
+ (0x00003333U) | /* Bits have to be set to '1' according to UM.*/
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_USB_HS_DEV_RULE(0x0U) | /* USB high Speed device registers */
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_CRC_RULE(0x0U) | /* CRC engine */
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM5_RULE(0x0U) | /* FLEXCOMM5 */
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE0_RULE_FLEXCOMM6_RULE(0x0U); /* FLEXCOMM6 */
AHB_SECURE_CTRL->SEC_CTRL_AHB_PORT9_SLAVE1_RULE =
+ (0x03300330U) | /* Bits have to be set to '1' according to UM.*/
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_FLEXCOMM7_RULE(0x0U) | /* FLEXCOMM7 */
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_SDIO_RULE(0x0U) | /* SDIO */
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT9_SLAVE1_RULE_DBG_MAILBOX_RULE(0x0U) | /* Debug mailbox (aka ISP-AP) */
@@ -451,17 +480,18 @@ int32_t ahb_secure_control_peripheral_init(void)
/* Security access rules for AHB peripherals on AHB Slave Port P10. */
AHB_SECURE_CTRL->SEC_CTRL_AHB_PORT10[0].SLAVE0_RULE =
+ (0x00000030U) | /* Bits have to be set to '1' according to UM.*/
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_ADC_RULE(0x0U) | /* ADC */
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_FS_HOST_RULE(0x0U) | /* USB Full Speed Host registers. */
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_USB_HS_HOST_RULE(0x0U) | /* USB High speed host registers */
- AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_HASH_RULE(0x0U) | /* SHA-2 crypto registers */
- AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_CASPER_RULE(0x0U) | /* RSA/ECC crypto accelerator */
+ AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_HASH_RULE(0x3U) | /* SHA-2 crypto registers = S*/
+ AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_CASPER_RULE(0x3U) | /* RSA/ECC crypto accelerator = S */
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_PQ_RULE(0x0U) | /* Power Quad (CM33 processor hardware accelerator) */
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE0_RULE_DMA1_RULE(0x0U); /* DMA Controller (Secure) */
AHB_SECURE_CTRL->SEC_CTRL_AHB_PORT10[0].SLAVE1_RULE =
AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_GPIO1_RULE(0x0U) | /* Secure High Speed GPIO */
- AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_AHB_SEC_CTRL_RULE(0x0U); /* AHB Secure Controller */
+ AHB_SECURE_CTRL_SEC_CTRL_AHB_PORT10_SLAVE1_RULE_AHB_SEC_CTRL_RULE(0x3U); /* AHB Secure Controller = S */
/* Security access rules for AHB secure control. */
AHB_SECURE_CTRL->SEC_CTRL_AHB_PORT10[0].SEC_CTRL_AHB_SEC_CTRL_MEM_RULE[0] =
@@ -476,14 +506,6 @@ int32_t ahb_secure_control_peripheral_init(void)
AHB_SECURE_CTRL->SEC_CTRL_USB_HS[0].SLAVE_RULE =
AHB_SECURE_CTRL_SEC_CTRL_USB_HS_SLAVE_RULE_RAM_USB_HS_RULE(0x0U);
- /* Security access rules for USB-HS RAM sub region 0_0 to 0_3. Each USB-HS RAM sub region is 4 kbytes */
- AHB_SECURE_CTRL->SEC_CTRL_USB_HS[0].MEM_RULE[0] =
- AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_0_RULE(0x0U) | /* Address space: 0x4010_0000 - 0x4010_0FFF */
- AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_1_RULE(0x0U) | /* Address space: 0x4010_1000 - 0x4010_1FFF */
- AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_2_RULE(0x0U) | /* Address space: 0x4010_2000 - 0x4010_2FFF */
- AHB_SECURE_CTRL_SEC_CTRL_USB_HS_MEM_RULE_SRAM_SECT_3_RULE(0x0U); /* Address space: 0x4010_3000 - 0x4010_3FFF */
-
-
/* Enable AHB secure controller check */
AHB_SECURE_CTRL->MISC_CTRL_REG = (AHB_SECURE_CTRL->MISC_CTRL_REG & ~(AHB_SECURE_CTRL_MISC_CTRL_REG_ENABLE_SECURE_CHECKING_MASK | 0)) |
/* AHB bus matrix enable secure checking (restrictive mode). */
@@ -495,7 +517,7 @@ int32_t ahb_secure_control_peripheral_init(void)
- The violation detected by the secure checker causes abort.
- Simple master in strict mode. Can read and write to memories at same level only. (Mode recommended by ARM).
- Smart masters in strict mode. Can execute, read and write to memories at same level only. (Mode recommended by ARM.).
- � IDAU is enabled.
+ – IDAU is enabled.
*/
/* Secure control duplicate register */
AHB_SECURE_CTRL->MISC_CTRL_DP_REG = (AHB_SECURE_CTRL->MISC_CTRL_DP_REG & ~( AHB_SECURE_CTRL_MISC_CTRL_DP_REG_ENABLE_SECURE_CHECKING_MASK | 0)) |
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.h b/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.h
index a00a02f3f0..9c10ebe8f9 100755
--- a/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.h
+++ b/platform/ext/target/nxp/lpcxpresso55s69/target_cfg.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020 Arm Limited
+ * Copyright 2019-2020 NXP. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,6 +26,10 @@
extern "C" {
#endif
+#ifndef TARGET_DEBUG_LOG
+#define TARGET_DEBUG_LOG 0
+#endif
+
#define TFM_DRIVER_STDIO Driver_USART0
#define NS_DRIVER_STDIO Driver_USART0
@@ -48,8 +53,8 @@ struct memory_region_limits {
*/
struct platform_data_t
{
- uint32_t periph_start;
- uint32_t periph_limit;
+ uint32_t periph_start; /* Not used so far */
+ uint32_t periph_limit; /* Not used so far */
volatile uint32_t *periph_ppc_bank; /* Secure control register address */
uint32_t periph_ppc_loc; /* Position in the secure control register */
};
@@ -59,14 +64,14 @@ struct platform_data_t
*
* \return Returns error code.
*/
-int32_t ahb_secure_control_memory_init(void);
+int32_t mpc_init_cfg(void);
/**
* \brief Configures the Peripheral Protection Controller.
*
* \return Returns error code.
*/
-int32_t ahb_secure_control_peripheral_init(void);
+int32_t ppc_init_cfg(void);
/**
* \brief Restict access to peripheral to secure
diff --git a/platform/ext/target/nxp/lpcxpresso55s69/tfm_peripherals_def.h b/platform/ext/target/nxp/lpcxpresso55s69/tfm_peripherals_def.h
index 73bf1226ed..402c6c3a04 100755
--- a/platform/ext/target/nxp/lpcxpresso55s69/tfm_peripherals_def.h
+++ b/platform/ext/target/nxp/lpcxpresso55s69/tfm_peripherals_def.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2019, Arm Limited. All rights reserved.
+ * Copyright 2019-2020 NXP. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*