Jetzt habe ich endlich einen schönen Display-Controller von Epson
gefunden, den S1D13706
Praktischerweise soll sich dieser Controller über das Flexible static
memory controller (FSMC) mit dem STM32 verbinden lassen, wodurch sich
der Displayspeicher vom STM32 direkt adressieren läßt.
Im ST Forum habe ich dazu folgenden Thread gefunden:
https://my.st.com/public/STe2ecommunities/mcu/Lists/ARM%20CortexM3%20STM32/Flat.aspx?RootFolder=https%3a%2f%2fmy.st.com%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fARM%20CortexM3%20STM32%2fSTM32%20%20Epson%20S1D13A05&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000626BE2B829C32145B9EB5739142DC17E¤tviews=1618
Besonders diese beiden Abschnitte dürften Interessant sein:
1 | Hi,
|
2 |
|
3 | We have connected the stm32 to both the SSD1906 and SSD1961.
|
4 | Solomon pretty much share similar connections as epson - the Generic 2 should work fine.
|
5 |
|
6 | FSMC_NBL0 - A0
|
7 | FSMC_NBL1 - WE1
|
8 | FSMC_A0 - A1
|
9 | FSMC_A1 - A2
|
10 | ... for rest of addresses
|
11 | FSMC_A17 - M/R
|
12 | FSMC_OE - RD
|
13 | FSMC_WE - WE0
|
14 | FSMC_NWAIT - WAIT
|
15 | BS, RD/WR - pullup
|
16 |
|
17 | using 16bit data mode.
|
und
1 | Hi,
|
2 |
|
3 | we are not using burst mode, the fsmc config is as follows:
|
4 | /* fsmc setup */
|
5 |
|
6 | p.FSMC_AddressSetupTime = 2;
|
7 | p.FSMC_AddressHoldTime = 0;
|
8 | p.FSMC_DataSetupTime = 40;
|
9 | p.FSMC_BusTurnAroundDuration = 0;
|
10 | p.FSMC_CLKDivision = 0;
|
11 | p.FSMC_DataLatency = 0;
|
12 | p.FSMC_AccessMode = FSMC_AccessMode_A;
|
13 |
|
14 | /* Color LCD configuration --
|
15 | LCD configured as follow:
|
16 | - Data/Address MUX = Disable
|
17 | - Memory Type = SRAM
|
18 | - Data Width = 16bit
|
19 | - Write Operation = Enable
|
20 | - Extended Mode = Enable
|
21 | - Asynchronous Wait = Disable */
|
22 | FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM4;
|
23 | FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = SMC_DataAddressMux_Disable;
|
24 | FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_SRAM;
|
25 | FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b;
|
26 | FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable;
|
27 | FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low;
|
28 | FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable;
|
29 | FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_DuringWaitState;
|
30 | FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable;
|
31 | FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Enable;
|
32 | FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Enable;
|
33 | FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable;
|
34 | FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p;
|
35 | FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p;
|
36 |
|
37 | and the ssd1906 config is:
|
38 | /* using ssd Generic #2 interface */
|
39 | /* CLKI: 25MHz BCLK: 25MHz MCLK: 25MHz PCLK: 6.25MHz */
|
40 | /* PCLKI uses CLKI/4 */
|
41 | /* MCLK >= PCLK * 2 (16bit/pixel) */
|
42 |
|
43 | for the clock we use an external 25MHz, but you could easily use the MCO from the stm32.
|
Hört sich ja erst mal gut an. Als ich versucht habe das nachzuvollziehen
hab ich es aber nicht wirklich nachvollziehen können.
Auf Seite 11 des Controller-Datenblatts ist die Generic Bus Variante II
gezeigt (ab Seite 18 sind dann die Pins des Controllers beschrieben)
Für Generic BUS II steht dort für A0: system adress bit 0 (A0)
Also würde man ja annehmen, dass A0-A15 einfach mit A0-15 Flexible
static memory controller (FSMC) des STM32 verbindet.
In dem Beispiel aus dem Forum sieht es aber so aus:
FSMC_NBL0 - A0
FSMC_NBL1 - WE1
FSMC_A0 - A1
FSMC_A1 - A2
... for rest of addresses
FSMC_A17 - M/R
FSMC_OE - RD
FSMC_WE - WE0
FSMC_NWAIT - WAIT
BS, RD/WR - pullup
using 16bit data mode.
NBL0 ist laut STM32 Manual Seite 419 Lowed byte enable (memory signal
name: NLB)
http://www.st.com/stonline/products/literature/rm/13902.pdf
Ich hoffe einer von euch Hardware-Spezialisten blickt da besser durch,
ich bin mit meinem Latein am Ende.
Gruß
Tom