cancel
Showing results for 
Search instead for 
Did you mean: 

FSMC-why do I need it?

navintiwari08
Associate III
Posted on February 06, 2016 at 06:37

hello there,

I've seen on some forums that people are suggesting to use FSMC to interface LCDs. Many LCD drivers also make use of FSMC. So, I tried to find out what FSMC does. ST provides manual that explains all the interfacing info about FSMC. However, I want to know very basic of what FSMC does? Why do I need it? How is it different from normal access? If you could refer me to some link that explains how fsmc accesses external memory and role does the processor plays in all this? I'm using STM32F103ZET6. I want to use emWin drivers to interface SSD1289 LCD driver. But before that I want to have a basic understanding of how FSMC works. Thanks for your time!

#ssd1289 #ssd1289 #ssd1289 #stemwin #stemwin #stemwin #stm32f1 #stm32f1 #fsmc
11 REPLIES 11

>>..there are way more steps to getting the correct address and why just copy/pasting all this code on the internet..

That's true in many situations, copying things doesn't require any knowledge or understanding. There's definitely going to be a Cargo Cult issue with Chat Bots.

The Address Bit reflecting the Cmd/Data Decoding will shift in 16-bit vs 8-bit modes, as the former doesn't put the internal A0 bit on the external interface, and Internal A1..n reflect as External A0..n-1

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

There are a few concepts that don't get explained. 

Without going into all the different methods of interfacing to an LCD display, some of them appear like two ranges of addresses.  Say 0-nnnnn being the address of display memory,  and 0-1nnnnn being the address of the registers.  Both need to be talked to.  You're looking at two "chips" with the same CS, but a high order address bit selecting register or memory.  As long as you have enough room for the addresses, you're fine.

Another interface is an indirect interface.  This has two active addresses.  One is an address you write to with the register address.  The second is a data address.  What you may want to do is read up on memory protection to see how far these need to be from each other (they could be N and N+1, except that you may want the processor memory mapping to treat them differently.

So to write to a register, you write to the register address the address of the register, and then to the memory address, write the data.

What FMC does is to take a chip (display chip) and then address it as memory (generally, static memory) and allow you to use the chip address lines and register select lines to map the chip into processor memory.  With the right model and display chip, you can pick a pixel, which shows up as a memory location, and then write to it.  The I8080 mode (depends on chip) uses pointers and writes using them.