2019-04-09 01:05 AM
I've configured bank1 FSMC to drive a LCD using CubeMx copying the various example code. I've set up FSMC-A18 to be the pin driving the Control/Data selection on the LCD. All data lines + OE and WR work perfectly but A18 sits continuously low whether I write to REG or RAM. I can't see in the examples how this is supposed to work as I can't find any code that sets whether it should be high for data/low for control or visa versa. The pin itself works fine if I drive it direct.
This is my first use of FSMC and I'm clearly missing something - help appreciated
I can attach code and CubeMX images if that helps diagnose
Solved! Go to Solution.
2019-04-09 09:23 AM
" copying the various example code"
Various example codes may use different C/D (Control/Data) pin than A18 (usually A16)
For example if use Bank 1 of NOR/SRAM
and A16, then LCD_Ram Address is 0x60020000 and LCD_Reg addr is 0x60000000
If use A18, then LCD_Ram Address is 0x60080000 and LCD_Reg addr is 0x60000000
2019-04-09 02:45 AM
> A18 sits continuously low whether I write to REG or RAM
What is "write to REG or RAM"?
Also check in respective GPIO registers if the given bit is set properly to AF and to proper AF (and maybe also its speed and type).
JW
2019-04-09 09:23 AM
" copying the various example code"
Various example codes may use different C/D (Control/Data) pin than A18 (usually A16)
For example if use Bank 1 of NOR/SRAM
and A16, then LCD_Ram Address is 0x60020000 and LCD_Reg addr is 0x60000000
If use A18, then LCD_Ram Address is 0x60080000 and LCD_Reg addr is 0x60000000
2019-04-09 11:54 AM
Thanks - that was the bit I was missing