- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I need to detect UART Irq cause at "CY_ISR(UART2_SCB_IRQ_Interrupt)" functon
If I well understand UART does not have separate Tx/Rx Irq vectors
so internally the avobe function I have to switch to the right code.....
I'm developing in PSoC Creator 4.2 on "CYBLE-022001-00" module.
Can anyone help me?
Thanks
Regards
Luigi
Solved! Go to Solution.
- Labels:
-
PSoC 4 Architecture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi LUBA_1714456,
1. First you need to setup which all events can trigger an interrupt event in either the component (UART advanced Tab) or by writing to the interrupt mask register, using the API SCB_SetTxInterruptMode() or SCB_SetTxInterruptMode()
2. If you are using internal interrupt handler, register a callback function using SCB_SetCustomInterruptHandler() to handle the interrupt events.
If you are using external interrupt handler, then use CY_ISR(CustomFunction).
3. In the ISR, use SCB_GetTxInterruptSourceMasked() and SCB_GetRxInterruptSourceMasked() APIs to determine the reason for the interrupts.
4. Clear the particular interrupt source using SCB_ClearRxInterruptSource() or SCB_ClearTxInterruptSource()
Please refer to the component datasheet for these information.
https://www.cypress.com/file/408071/download
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi LUBA_1714456,
1. First you need to setup which all events can trigger an interrupt event in either the component (UART advanced Tab) or by writing to the interrupt mask register, using the API SCB_SetTxInterruptMode() or SCB_SetTxInterruptMode()
2. If you are using internal interrupt handler, register a callback function using SCB_SetCustomInterruptHandler() to handle the interrupt events.
If you are using external interrupt handler, then use CY_ISR(CustomFunction).
3. In the ISR, use SCB_GetTxInterruptSourceMasked() and SCB_GetRxInterruptSourceMasked() APIs to determine the reason for the interrupts.
4. Clear the particular interrupt source using SCB_ClearRxInterruptSource() or SCB_ClearTxInterruptSource()
Please refer to the component datasheet for these information.
https://www.cypress.com/file/408071/download
Regards,
Bragadeesh
Bragadeesh