This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/SIMPLELINK-CC13X0-SDK: LDREX/STREX used by TI-RTOS with CC13X0?

Part Number: SIMPLELINK-CC13X0-SDK
Other Parts Discussed in Thread: CC1310

Tool/software: TI-RTOS

I want to use LDREX/STREX but I'm not sure if this will interfere with TI-RTOS operation. I searched the 2.20 SDK and can't find evidence of these instructions being used via __asm, but before I invest time and effort I'd like to confirm that I'm free to use them or if there are restrictions or caveats.

Thanks

  • Hi Pete,

    I'm unaware if the LDREX /STREX opcodes are used by TI-RTOS, however, we can never give such guarantees either. What are you trying to achieve by using the LDREX/STREX opcodes directly instead of using the synchronization primitives provided by TI-RTOS?
  • Thanks for your reply. I hope to make up for the lack of an atomic swpb instruction in the M3 and compare some inlined primitives to compare them with some of the TI  primitives like gates. After submitting this question, but before seeing your reply (was on the road), I found this thread  that suggests CLREX is only used by TI-RTOS in SMP environments. The CC1310 has three processors, but they are by no means operating in a symmetric fashion, so my question now is to confirm that TI-RTOS running on the CC13x0 does NOT use CLREX.

    Best Regards

  • I still don't understand what the motivation is to have inline synchronization primitives instead of using the synchronization primitives provided by TI-RTOS.

    TI-RTOS still cannot give any guarantees regarding any op-codes being generated or not. As far as I can see, you are correct the CLREX is only used by TI-RTOS in SMP environments. But, that is not something I can guarantee to be true in future versions of TI-RTOS.
  • Thanks very much for confirming this. So I can leverage the rich TI tool environment to experiment with these ARM instructions and trust that any deadlocks or livelocks are of my own making. And I won't come crying to the forum if TI starts using CLREX with TI-RTOS on CC13x0 in the future.

    Regards