4
votes

I am programming an ARM chip (STM32F2) "bare-metal". Specifically, I would like to read values held in external SRAM. Reading the reference manual I understand that such memory transactions are done through the FSMC (Flexible Static Memory Controller).

I understand how to initialise the FSMC for SRAM read/write operations. (I have to set the appropriate GPIO pins to the correct Alternate Function, modify a bunch of control registers, etc.). However, I do not see how to initiate, for example, a read operation.

What registers should I touch to read (or write) the SRAM after initialisation?

1

1 Answers

4
votes

As far as I've understood it, you get "memory-mapped" access through the FSMC controller. So all you need to do is decide in what address space to map the SRAM, and then just access it through pointers initialized to point there.