2024-01-03 09:34 AM - edited 2024-01-03 09:36 AM
Hi! If I have a running FreeRtos task that for example is sending data with SPI, will ILDE event (callback) from uart dma affect the SPI? If so how to prevent this and at the same time dont lose data from uart?
Solved! Go to Solution.
2024-01-03 11:14 AM
Hello @oeliks
If both peripherals are not using the same resources (DMA channel or interrept ..) and both executing in the same task, this will depend on the speed of the SPI bus and the size of the data being transferred. For example, for small data transfers, such as 4 bytes, using DMA may be excessive overhead. In this case a spin wait may be reasonable. For faster SPI bus, this approach may not be feasible.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-01-03 11:14 AM
Hello @oeliks
If both peripherals are not using the same resources (DMA channel or interrept ..) and both executing in the same task, this will depend on the speed of the SPI bus and the size of the data being transferred. For example, for small data transfers, such as 4 bytes, using DMA may be excessive overhead. In this case a spin wait may be reasonable. For faster SPI bus, this approach may not be feasible.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-01-03 09:55 PM - edited 2024-01-03 09:56 PM
Thanks for answer.
SPI is running in task. UART is not running in any task. When it detects idle it triggers callback function that is executed. I don't know how to compare priority of this idle callback function to task (task that is running SPI has known priority).