You can use the API cyhal_uart_write_async() to transfer more than 128 bytes (TX FIFO size). This is a non-blocking function that initiates a UART transfer. The internal UART ISR takes care of further data transfer. The end of the event can be checked using callback event CYHAL_UART_IRQ_TX_DONE. f
See Snippet 2 : Hardware Abstraction Layer (HAL)
If you want to offload the CPU, you can make use of DMA to do the transfer.
Thank you for the pointers.
I would like to use DMA for the transfer.
From the example, it seems like the transmit will happen upon trigger from the receive channel.
I would like to have a much simpler use-case whereby I would like to transmit after I have filled up the buffer.
I have been trying but no success yet.
Will you be able to provide me with an example for this use-case? Or some pointers on the configuration and APIs to use.
You can do the following:
Set the X and Y loops according to this formula given in PSoC 6 Architecture TRM
Let's say you want to transfer 500 bytes from Source to Destination. You can set the DMA configurator as follows:
I'm sharing the source files for the project I created that transfers 500 bytes of data from UART every 2 seconds. You can choose to trigger the DMA transaction whenever the application wants. You can set the source buffer, destination buffers, no of X loops, Y loops, source , Destination increment etc. in run time also using the descriptor related functions
Review the design.modus file for the configuration settings for DMA and UART.
If the above example doesn't help, please feel free to post your sample code here, we will try to debug it here.