/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Atomic Operations

Username:     
Password:     
             

Forum

# 1   2012-09-18 19:21:41 Atomic Operations

primagen
Member
Registered: 2010-12-07
Posts: 13

Atomic Operations

Hi,
as i know stm32 operations alway read-modify-write. Not atomic.
If i read below it looks like C is already atomic for some operations. Or is it not guarantee on stm32 platform?
http://www.informit.com/guides/content. … seqNum=469

Offline

 

# 2   2012-09-19 06:59:17 Atomic Operations

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Atomic Operations

You cannot say that C instructions are atomic or not, it depends of the MCU platform, and the assembler code generated by the compiler (your article was talking about Win32 platform).
In the case of STM32, take a look at Ride assembler view, and at the ARM Thumb2 instructions.

Concerning the peripheral access, the only STM32 atomic instructions are the bit set and reset by GPIOx_BSRR and GPIOx_BRR registers access.

Offline

 

Board footer