LCD on STR710 board

Hello, I’m working on a STR710 board (MB393B by ST) and I have a

problem: when I try to debug programs that use LCD, nothing appears on

it. I know it’s addressed by the 3rd bank of EMI (CSn2) and that I have

to configure PC0, PC1, PC2 and PD of GPIO2, but I really don’t know

how. For example, when I debug my programs for example in RAM, I also

use EMI SRAM, so I launch at first OpenOCD and then arm-elf-insight

with a gdb file for initialization (which sets the right registers to

use EMI SRAM). This is my gdb file:

target remote localhost:3333

monitor reset

monitor sleep 500

monitor poll

monitor soft_reset_halt

monitor arm7_9 sw_bkpts enable

monitor mww 0xA0000050 0x01c2

monitor mdw 0xA0000050

monitor mww 0xE0005000 0x000F <----this sets PC0

monitor mww 0xE0005004 0x000F <----this sets PC1

monitor mww 0xE0005008 0x000F <----this sets PC2

monitor mww 0x6C000004 0x8001 <----this sets BCON1 (it enables

EMI SRAM writing)

monitor mdw 0x6C000004

I don’t know why PC0, PC1 and PC2 are set that way, because I found

those settings on Internet, but it works for my EMI SRAM. I thought it

was the same for my LCD, that is tied to the 3d bank of EMI, so I added

this line:

monitor mww 0x6C000008 0x8001

but it doesn’t work. Do you know how I have to configure the registers

to make something appear on my LCD? Thanks in advance,

l3golas

Firstly the PC0-2 registers setup GPIOx.0- GPIOx.3 as alternate function outputs. You need this or the CS will not work.

As for configuring the BCON register I expect the LCD only has an 8 bit data bus and they are usually quite slow so you will need wait states. Something like 0x803c - 8 bit bus, 15 wait states. You will probably be able to use less than 15 wait states, you will have to check the timings.

I think there is some source code on the ST web site for driving the LCD display on the DEV board, I suggest you look there.

Ben

Thank you Ben, but I already tried doing that, with no results. Moreover, I’m already using ST’s software library and there are some examples in which LCD is initialised writing on the right registers, in the same way you told me. When I execute those programs, the light of the LCD switches on, but nothing appears on it. That’s very strange!

Have you tried adjusting the variable resistor R105, just below the display. If that still fails perhaps you have a fault on the board.

Are you using this demo software ?

http://mcu.st.com/mcu/download2.php?fil … 747744.zip

I expect you may get more help on the ST forum.