This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using LDREXD in a task/normal mode and STREXD in ISR

On a Cortex R,  where ldm/stm are interruptible, can i use ldrex and strex for double words to pass from ISR to a task in this way?

in ISR:

 STREXD,   //  Ignoring  (yes, dumping it)  if it actually failed to write , do no spin-lock or retry here at all

in Task :

  LDREXD   // load ..
  CLREX     // clear exclusion

One core  (2 in dual lock-step),  no sharing mem with other cores.  Will this work for automically write/read double words in the scenario one ISR feeding a task?

And yes, no buffering between them.

Parents
  • There is no general statement about the locked area, the size depends on architecture and implementation. But for what I know, it is a single bit per core. No inner/outer stuff here. Else "clrex" would not make any sense.

    There is also no "nesting". Any strex clears the lock.

    Edit: Typo.

Reply
  • There is no general statement about the locked area, the size depends on architecture and implementation. But for what I know, it is a single bit per core. No inner/outer stuff here. Else "clrex" would not make any sense.

    There is also no "nesting". Any strex clears the lock.

    Edit: Typo.

Children