Functions | |
cy_en_sysint_status_t | Cy_SysInt_Init (const cy_stc_sysint_t *config, cy_israddress userIsr) |
Initializes the referenced interrupt by setting the priority and the interrupt vector. More... | |
cy_israddress | Cy_SysInt_SetVector (IRQn_Type IRQn, cy_israddress userIsr) |
Changes the ISR vector for the interrupt. More... | |
cy_israddress | Cy_SysInt_GetVector (IRQn_Type IRQn) |
Gets the address of the current ISR vector for the interrupt. More... | |
void | Cy_SysInt_SetInterruptSource (IRQn_Type IRQn, cy_en_intr_t devIntrSrc) |
Configures the interrupt selection for the specified NVIC channel. More... | |
cy_en_intr_t | Cy_SysInt_GetInterruptSource (IRQn_Type IRQn) |
Gets the interrupt source of the NVIC channel. More... | |
IRQn_Type | Cy_SysInt_GetNvicConnection (cy_en_intr_t devIntrSrc) |
Gets the NVIC channel to which the interrupt source is connected. More... | |
cy_en_intr_t | Cy_SysInt_GetInterruptActive (IRQn_Type IRQn) |
Gets the highest priority active interrupt for the selected NVIC channel. More... | |
void | Cy_SysInt_DisconnectInterruptSource (IRQn_Type IRQn, cy_en_intr_t devIntrSrc) |
Disconnect the interrupt source from the specified NVIC channel. More... | |
cy_en_sysint_status_t | Cy_SysInt_InitExtIRQ (const cy_stc_sysint_t *config, cy_israddress userIsr) |
Initializes the referenced external interrupt by setting the CPU IRQ priority and the interrupt vector. More... | |
cy_en_sysint_status_t | Cy_SysInt_InitIntIRQ (const cy_stc_sysint_t *config, cy_israddress userIsr) |
Initializes the referenced internal interrupt by setting the priority and the interrupt vector. More... | |
void | Cy_SysInt_SetSystemIrqVector (cy_en_intr_t sysIntSrc, cy_israddress userIsr) |
Sets the User ISR vector for the System Interrupt. More... | |
cy_israddress | Cy_SysInt_GetSystemIrqVector (cy_en_intr_t sysIntSrc) |
Gets the address of the current user ISR vector for the System Interrupt. More... | |
void | Cy_SysInt_EnableSystemInt (cy_en_intr_t sysIntSrc) |
Enable system interrupt. More... | |
void | Cy_SysInt_DisableSystemInt (cy_en_intr_t sysIntSrc) |
Disable system interrupt. More... | |
void | Cy_SysInt_SetNmiSource (cy_en_sysint_nmi_t nmiNum, cy_en_intr_t devIntrSrc) |
Sets the interrupt source of the CPU core NMI. More... | |
cy_en_intr_t | Cy_SysInt_GetNmiSource (cy_en_sysint_nmi_t nmiNum) |
Gets the interrupt source of the CPU core NMI for the given NMI source number. More... | |
cy_en_sysint_status_t Cy_SysInt_Init | ( | const cy_stc_sysint_t * | config, |
cy_israddress | userIsr | ||
) |
Initializes the referenced interrupt by setting the priority and the interrupt vector.
In case of CM33 with Security Extension enabled, if this function is called from secure world then, the parameters are used to configure secure interrupt. If it is called form non-secure world then the parameters are used to configure non-secure interrupt. In case of CM33 without Security Extension, this function always configures the non-secure interrupt. In case of CM55, this function always configures the non-secure interrupt. In case of CM7/CM0+ it initializes the external system interrupt, maps it to CPU interrupt and registers the User ISR vector for the System Interrupt.
Use the CMSIS core function NVIC_EnableIRQ(config.intrSrc) to enable the interrupt.
config | Interrupt configuration structure |
userIsr | Address of the ISR |
cy_israddress Cy_SysInt_SetVector | ( | IRQn_Type | IRQn, |
cy_israddress | userIsr | ||
) |
Changes the ISR vector for the interrupt.
CM0+/CM4 (non-TVIIBE):
This function relies on the assumption that the vector table is relocated to __ramVectors[RAM_VECTORS_SIZE] in SRAM. Otherwise it will return the address of the default ISR location in the flash vector table.
CM0+/CM7 and TVIIBE CM0+/CM4:
This function relies on the assumption that the vector table is relocated to __ramVectors[RAM_VECTORS_SIZE] in SRAM. Otherwise it will return the address of the default ISR location in the flash vector table. This function is applicable only to User Interrupts (NvicMux0_IRQn - NvicMux7_IRQn) and System Interrupts (Internal0_IRQn - Internal0_IRQn).
CM33:
When called from secure world. this function relies on the assumption that the vector table is relocated to __s_vector_table_rw[] in secure SRAM. Otherwise it will return the address of the default ISR location in the secure flash/ROM vector table.
When called from non-secure world. this function relies on the assumption that the vector table is relocated to __ns_vector_table_rw[] in non-secure SRAM. Otherwise it will return the address of the default ISR location in the non-secure flash/ROM vector table.
CM55:
This function relies on the assumption that the vector table is relocated to __ns_vector_table_rw[] in non-secure SRAM. Otherwise it will return the address of the default ISR location in the non-secure flash/ROM vector table.
Use the CMSIS core function NVIC_EnableIRQ(config.intrSrc) to enable the interrupt.
IRQn | Interrupt source |
userIsr | Address of the ISR to set in the interrupt vector table |
cy_israddress Cy_SysInt_GetVector | ( | IRQn_Type | IRQn | ) |
Gets the address of the current ISR vector for the interrupt.
CM0+/CM4:
This function relies on the assumption that the vector table is relocated to __ramVectors[RAM_VECTORS_SIZE] in SRAM. Otherwise it will return the address of the default ISR location in the flash vector table.
CM0+/CM7:
This function relies on the assumption that the vector table is relocated to __ramVectors[RAM_VECTORS_SIZE] in SRAM. Otherwise it will return the address of the default ISR location in the flash vector table. This function is applicable only to User Interrupts (NvicMux0_IRQn - NvicMux7_IRQn) and System Interrupts (Internal0_IRQn - Internal0_IRQn).
CM33:
When called from the secure world, this function relies on the assumption that the vector table is relocated to __ns_vector_table_rw[] in non-secure SRAM. Otherwise it will return the address of the default ISR location in the flash/ROM vector table.
CM55:
This function relies on the assumption that the vector table is relocated to __ns_vector_table_rw[] in non-secure SRAM. Otherwise it will return the address of the default ISR location in the flash/ROM vector table.
IRQn | Interrupt source |
void Cy_SysInt_SetInterruptSource | ( | IRQn_Type | IRQn, |
cy_en_intr_t | devIntrSrc | ||
) |
Configures the interrupt selection for the specified NVIC channel.
To disconnect the interrupt source from the NVIC channel use the Cy_SysInt_DisconnectInterruptSource.
IRQn | NVIC channel number connected to the CPU core. |
devIntrSrc | Device interrupt to be routed to the NVIC channel. |
cy_en_intr_t Cy_SysInt_GetInterruptSource | ( | IRQn_Type | IRQn | ) |
Gets the interrupt source of the NVIC channel.
IRQn | NVIC channel number connected to the CPU core |
IRQn_Type Cy_SysInt_GetNvicConnection | ( | cy_en_intr_t | devIntrSrc | ) |
Gets the NVIC channel to which the interrupt source is connected.
devIntrSrc | Device interrupt that is potentially connected to the NVIC channel. |
cy_en_intr_t Cy_SysInt_GetInterruptActive | ( | IRQn_Type | IRQn | ) |
Gets the highest priority active interrupt for the selected NVIC channel.
The priority of the interrupt in a given channel is determined by the index value of the interrupt in the cy_en_intr_t enum. The lower the index, the higher the priority. E.g. Consider a case where an interrupt source with value 29 and an interrupt source with value 46 both source the same NVIC channel. If both are active (triggered) at the same time, calling Cy_SysInt_GetInterruptActive() will return 29 as the active interrupt.
IRQn | NVIC channel number connected to the CPU core |
void Cy_SysInt_DisconnectInterruptSource | ( | IRQn_Type | IRQn, |
cy_en_intr_t | devIntrSrc | ||
) |
Disconnect the interrupt source from the specified NVIC channel.
IRQn | NVIC channel number connected to the CPU core. This parameter is ignored for devices using CPUSS_ver2. |
devIntrSrc | Device interrupt routed to the NVIC channel. This parameter is ignored for devices using CPUSS_ver1. |
cy_en_sysint_status_t Cy_SysInt_InitExtIRQ | ( | const cy_stc_sysint_t * | config, |
cy_israddress | userIsr | ||
) |
Initializes the referenced external interrupt by setting the CPU IRQ priority and the interrupt vector.
Use the CMSIS core function NVIC_EnableIRQ(config.intrSrc) to enable the interrupt.
config | Interrupt configuration structure |
userIsr | Address of the ISR |
cy_en_sysint_status_t Cy_SysInt_InitIntIRQ | ( | const cy_stc_sysint_t * | config, |
cy_israddress | userIsr | ||
) |
Initializes the referenced internal interrupt by setting the priority and the interrupt vector.
Use the CMSIS core function NVIC_EnableIRQ(config.intrSrc) to enable the interrupt.
config | Interrupt configuration structure |
userIsr | Address of the ISR |
void Cy_SysInt_SetSystemIrqVector | ( | cy_en_intr_t | sysIntSrc, |
cy_israddress | userIsr | ||
) |
Sets the User ISR vector for the System Interrupt.
sysIntSrc | Interrupt source |
userIsr | Address of the ISR to set in the interrupt vector table |
cy_israddress Cy_SysInt_GetSystemIrqVector | ( | cy_en_intr_t | sysIntSrc | ) |
Gets the address of the current user ISR vector for the System Interrupt.
sysIntSrc | Interrupt source |
void Cy_SysInt_EnableSystemInt | ( | cy_en_intr_t | sysIntSrc | ) |
Enable system interrupt.
sysIntSrc | System interrupt source to be enabled. |
void Cy_SysInt_DisableSystemInt | ( | cy_en_intr_t | sysIntSrc | ) |
Disable system interrupt.
sysIntSrc | System interrupt source to be disabled. |
void Cy_SysInt_SetNmiSource | ( | cy_en_sysint_nmi_t | nmiNum, |
cy_en_intr_t | devIntrSrc | ||
) |
Sets the interrupt source of the CPU core NMI.
The interrupt source must be a positive number. Setting the value to "unconnected_IRQn" or "disconnected_IRQn" disconnects the interrupt source from the NMI. Depending on the device, the number of interrupt sources that can provide the NMI trigger signal to the core can vary.
nmiNum | NMI source number. CPUSS_ver2 allows up to 4 sources to trigger the core NMI. CPUSS_ver1 allows only one source to trigger the core NMI and the specified NMI number is ignored. |
devIntrSrc | Interrupt source. This parameter can either be of type cy_en_intr_t or IRQn_Type for CM0+/CM7 and CM4/CM33/CM55 respectively. |
cy_en_intr_t Cy_SysInt_GetNmiSource | ( | cy_en_sysint_nmi_t | nmiNum | ) |
Gets the interrupt source of the CPU core NMI for the given NMI source number.
nmiNum | NMI source number. CPUSS_ver2 allows up to 4 sources to trigger the core NMI (i.e. #1, 2, 3, 4). CPUSS_ver1 allows only 1 source to trigger the core NMI (i.e #1). |