I am trying to understand the Flexible Static Memory Controller (FSMC) on the STM32f4-discovery.
I have done a lot of research and I cannot understand how this works. I am a completely self taught programmer who is currently pursuing a degree in chemistry, so be easy on me lol.
I have found these websites which I have been using to figure this out:
https://electronics.stackexchange.com/questions/165200/stm32f407-fsmc-interface-with-tft-lcd
http://prog3.com/sbdm/blog/u013030441/article/details/48159101
I have also found libraries with example code from ST themselves.
OK, now the misunderstanding:
When I look at the above code for both the TFT drivers, I see that the LCD is accessed with structs or definitions like
#define LCD_REG (*((volatile unsigned short *) 0x60000000))
#define LCD_RAM (*((volatile unsigned short *) 0x60020000))
LCD_RAM = data;
LCD_REG = command;
My question is why they have to access two areas of the FSMC SRAM bank instead of one. Basically why can't I just send data to the LCD by writing only to LCD_REG (the start of the memory bank)?
There must be something about FSMC that I am missing. I have read the datasheet multiple times and I know the bank starts at 0x6000 0000 but I can't reason why they would access the bank in another section at 0x6002 0000.
Any help in understanding is greatly appreciated. If you know of a book or website I can use to learn FSMC I would be very grateful.
Thank you for everyones time!