Other Parts Discussed in Thread: OMAPL138
Hello,
I would like to know which is the best way to synchronize access to a shared resource between the arm and dsp on the omapl138. In our application the arm writes several peripheral registers and the dsp reads out those registers asynchronously. While the arm updates those registers the dsp is not allowed to read out the values and while the dsp reads out the values the arm is not allowed to update the registers. So we need a kind of semaphore mechanism. What is the best way to achieve this? We are thinking of a simple spin lock mechanism without using communication interrupts.
On the arm processor there is a swp instruction which can read out memory content into a register and update the memory content with the values of another register. This instruction is atomar, e.g. while the memory content is read out and updated no other processor has access to this memory location. With this swp instruction a semaphore mechanism can be implemented. Is there a similar instruction on the dsp side which allows memory read and memory write in an atomar way?
Thanks for your efforts