cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX FSMC Configuration

James Elder
Associate II
Posted on March 15, 2017 at 02:13

I'm using a Nucleo-F413ZH board and an SSD1289 driver based LCD. I'm using the KEIL IDE.

I just wanted to confirm that I have setup my LCD and FSMC correctly. I have performed the following steps:

  1. Setup FSMC in STM32CubeMX (Chip Select: NE1, Memory Type: LCD Interface, LCD Register Select: A0, Data: 16 bits).
  2. Wired the LCD to the pins as indicated by STM32CubeMX:
    1. D0-D15 to FSMC D0-D15,
    2. LCD RS to FSMC_A0,
    3. LCD WR to FSMC_NWE,
    4. LCD RD to FSMC_NOE,
    5. LCD CS to FSMC_NE1
    6. LCD RST to a GPIO pin setup as GPIO Output (Pin State: Low, Mode: Output Push Pull, Pullup/Pulldown: None, Speed: Low)
  3. My main function calls the following (in order):
    1. HAL_Init()
    2. SystemClock_Config()
    3. MX_GPIO_Init()
    4. MX_FSMC_Init()
  4. Left the timings to the default values which are sufficiently high such that they shouldn't cause any problems - I'll tweak these once its working.
  5. I have setup my read/write data and write index functions, using the values:
    1. REG: 0x60000000
    2. RAM: 0x60020000

But I get just a white screen when trying to render to the LCD.

Can anyone please confirm whether I have setup the wiring and FSMC correctly, and f possible maybe even why I might be getting the white screen?

Thanks in advance!

#lcd #stm32f413 #fsmc #ssd1289
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on March 15, 2017 at 11:07

I don't Cube so don't quite know what are you talking about but wouldn't

  1. REG: 0x60000000
  2. RAM: 0x60020000

imply using

A17

A16 (because of the 16-bit data width) as address line, instead of

LCD RS to FSMC_A0,

?

JW

View solution in original post

2 REPLIES 2
Posted on March 15, 2017 at 11:07

I don't Cube so don't quite know what are you talking about but wouldn't

  1. REG: 0x60000000
  2. RAM: 0x60020000

imply using

A17

A16 (because of the 16-bit data width) as address line, instead of

LCD RS to FSMC_A0,

?

JW

Posted on March 16, 2017 at 13:33

Thanks for your reply, you were correct. I'll be honest I don't understand the addresses and registers, but I've been looking for a guide on them.