AnsweredAssumed Answered

FSMC setup for LCD interface in AN2790

Question asked by Tom Coates on Nov 29, 2017
Latest reply on Nov 29, 2017 by waclawek.jan

I'm trying to set up the LCD interfacing demo from AN2790 on an STM32F417, and have a couple of questions about the FSMC interface configuration:

 

1. On page 17, ADDSET and DATAST are configured for a cycle time of 100ns. This should work for write access, but violates the longer cycle time of 300ns required for read access. The reason given for this is that "we only write to the LCD", but in the source code there are also some read accesses. E.g. on line 67 of stm3210e_lcd.c

  /* Check if the LCD is SPFD5408B Controller */
  if(LCD_ReadReg(0x00) == 0x5408)

The code doesn't seem to be using different timings for read and write. Is it just relying on the LCD controller tolerating incorrect read timings, or is there something else I'm missing?

 

2. Page 14 says

Usually, ModeB is used for LCD interfacing (so the extended mode is not used)

This agrees with the code, which disables extended mode and sets bank 1 to access mode B:

p.FSMC_AccessMode = FSMC_AccessMode_B;

//...

FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable;

But the description of the ACCMOD bits in the chip reference manual says that the access mode is ignored when extended mode is disabled. So why do we need to use access mode B when this setting is ignored anyway?

 

Thanks,

Tom

Outcomes