electroRF
Member
Hi,
I have the following mechanism to implement and would appreciate your advises as always
So far, I programmed the uC to write logs Cyclically to a 10KB Buffer of fast memory.
Now I'd like to use a 1MB buffer of slower memory, to be able to increase the amount of logs I capture.
The problem is the due to real-time, I can't afford the delay of having the uC writing logs directly to the 1MB buffer.
Therefore I'd use a DMA to transfer data from the 10KB buffer to the 1MB buffer, in background.
What algorithm would you use for that transfer?
the difficulties are:
I can't instruct the DMA to transfer the 10KB data to the 1MB buffer, because then I'd have to wait for it to finish until I can log messages again to the 10KB buffer.
On the other hand, I can't tell the DMA to transfer data to the 1MB buffer after each message the uC writes to the 10KB buffer, that would be waste of time due to overhead.
Therefore, when should I tell the DMA to start transferring data?
Thank you.
I have the following mechanism to implement and would appreciate your advises as always
So far, I programmed the uC to write logs Cyclically to a 10KB Buffer of fast memory.
Now I'd like to use a 1MB buffer of slower memory, to be able to increase the amount of logs I capture.
The problem is the due to real-time, I can't afford the delay of having the uC writing logs directly to the 1MB buffer.
Therefore I'd use a DMA to transfer data from the 10KB buffer to the 1MB buffer, in background.
What algorithm would you use for that transfer?
the difficulties are:
I can't instruct the DMA to transfer the 10KB data to the 1MB buffer, because then I'd have to wait for it to finish until I can log messages again to the 10KB buffer.
On the other hand, I can't tell the DMA to transfer data to the 1MB buffer after each message the uC writes to the 10KB buffer, that would be waste of time due to overhead.
Therefore, when should I tell the DMA to start transferring data?
Thank you.
Last edited: