cancel
Showing results for 
Search instead for 
Did you mean: 

FSMC access thread safe?

Ingmar
Associate II

Supposed I am using external memory via an 16 bit address / 8 bit data bus with FSMC (STM32F714). An RTOS is running.

Is access to this memory atomic (in the sense of thread safety) when I read/write 32 bit wide data? The consideration is, for instance:

  • bytes 1 and 2 are already written, then a task switch occurs, and another task uses the FSMC controller for a different read/write operation;
  • worse: the second task accesses the same memory location, thus overriding all 4 bytes, and then, when the former task continues, it finishes writing bytes 3 and 4.

Can the processor handle these operations atomically, or is usage of a mutex appropriate when accessing the same resource (external memory, or the FSMC infrastructure as a whole)?

1 ACCEPTED SOLUTION

Accepted Solutions

> STM32F714

?

Yes, FSMC/FMC writes are atomic, even if they are split internally because of narrow external bus.

JW

View solution in original post

2 REPLIES 2

> STM32F714

?

Yes, FSMC/FMC writes are atomic, even if they are split internally because of narrow external bus.

JW

Ingmar
Associate II

good news, thank you Jan!