Jan 24, 2023
05:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 24, 2023
05:49 AM
Hi all,
I am using the PSoC 6 cy8ckit-064b0s2-4343w . I attempted to construct a UART interrupt in Modustoolbox using SCB blocks without FreeRTOS, and the hardware interrupt happened at that time. However, when I implemented it again with FreeRTOS, I did not encounter a hardware interrupt since FreeRTOS does not call the interrupt function while transmitting.
2 Replies
Jan 26, 2023
08:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 26, 2023
08:12 PM
Hi @Ramya1811 ,
Can you please share the UART related configuration with FreeRTOS project and which function do you call for transmitting data?
Best regards,
Bhamy Narasimha Shenoy
Jan 26, 2023
08:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 26, 2023
08:25 PM
Hi @Ramya1811 ,
You may try to add following code to enable the interrupt.
void uart_event_handler(void *handler_arg, cyhal_uart_event_t event)
{
(void)handler_arg;
if ((event & CYHAL_UART_IRQ_TX_DONE) == CYHAL_UART_IRQ_TX_DONE)
{
}
}
/* Register UART event handler */
cyhal_uart_register_callback(&uart_obj, uart_event_handler, NULL);
/* Enable required UART events */
cyhal_uart_enable_event(&uart_obj, (cyhal_uart_event_t)(CYHAL_UART_IRQ_TX_DONE), length, true); //Data transfer length
Kindly let me know if you need some further details.
Best regards,
Bhamy Narasimha Shenoy