Hi,
I am trying send some data from ARM to DSP. ARM is running on Linux OS and DSP on TI RTOS.
For this, I am allocating a buffer using CMEM_alloc2() in my Linux user space application.
The physical address for this buffer is being sent to DSP ( rpmsg packet) for retrieving data from the buffer and to process buffer data.
When I try to free CMEM in my user space application, I am getting 'failed to free memory' error.
At this point, my DSP program is not processing anything, it is just mapping the physical address to some virtual address using Resource_physToVirt() function.
Now I have a couple of questions here,
1. Am I seeing this CMEM error on the Linux side as a result of physical to virtual address mapping on the DSP side?
If yes, How does the CMEM module know that the address is mapped?
2. Eventually I will have to process data in the buffer. How can I handle freeing CMEM buffers on the Linux side without risking their reallocation, while data is processed on the DSP side?
Is there a way to free the CMEM buffer on the DSP side once I am done with data processing? I know there is no CMEM support for TI RTOS on the DSP.
Thanks