- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I have a question about UART.
1. Is there a high risk of Hard_Fault when using both UART_Tx and DMA_UART_Tx?
2. Is there a way to use UART_DMA_Tx for frequently changed length and data type for debug log?
For example, you can output "str" or "hex".
3. Do you have any examples for reference for inquiry number 2?
I am using Psoc6 Pioneer Kit.
Thankyou for your reply.
regard. Psoc_Student
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @psoc_student ,
Regarding your query number 2, I have created an example where you can send/transmit a variable size array over UART DMA TX without having to use the full size of the DMA TX descriptor .
In this example, the routine Uart_DMA_Transmit(), takes 2 arguments, i.e. the string to transmit and the size of the data to be transmitted and the same is sent over DMA TX.
Please check this and let me know if this satisfies your requirement.
Regarding query number 1, I tried sending a large string over the UART using the API Cy_SCB_UART_PutArray and immediately after the same tried sending another large string using Uart_DMA_Transmit() API but did not find any hardfault occurrence but only that the output data for the first API was stopped in half and the second one by the DMA started which is because both are using the same TX FIFO to send the data. So in short, no, it should not cause a hardfault, but only a corruption in the transmitted data.
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @psoc_student ,
Regarding your query number 2, I have created an example where you can send/transmit a variable size array over UART DMA TX without having to use the full size of the DMA TX descriptor .
In this example, the routine Uart_DMA_Transmit(), takes 2 arguments, i.e. the string to transmit and the size of the data to be transmitted and the same is sent over DMA TX.
Please check this and let me know if this satisfies your requirement.
Regarding query number 1, I tried sending a large string over the UART using the API Cy_SCB_UART_PutArray and immediately after the same tried sending another large string using Uart_DMA_Transmit() API but did not find any hardfault occurrence but only that the output data for the first API was stopped in half and the second one by the DMA started which is because both are using the same TX FIFO to send the data. So in short, no, it should not cause a hardfault, but only a corruption in the transmitted data.
Warm Regards
Alen