GLCD and Touchpad Library

Locked
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: GLCD and Touchpad Library

Post by Badger »

Yes I did exactly that setup.

I put a 10k pullup on CS, copying a schematic from my F1 lcd board, but that probably wasn't necessary. I'll remove tonight and re-test.

Have you tried reading a register? hopefully there's an ID register (0x0000 on SSD1289 and S6D1121).

I removed resistors on PD14 (red led), PD15 (blue led) and PD5 (OTG current sense) according to my notes. An easy way to find them is to look through the F4Discovery datasheet, it lists which pins are used.

It could be the FSMC timing; try increasing the delays. On S6D1121 if I drive it too fast I get garbled screen or nothing at all.
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: GLCD and Touchpad Library

Post by mobyfab »

Image

I had to lower the capture frequency by a lot (20Khz). I didn't expect the fsmc to be so slow (running at 20HZ!!). Something must be messed up.
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: GLCD and Touchpad Library

Post by Badger »

there is definitely something wrong there! look at my capture from the last page or so, it should be in the order of ns between transistions, not ms!

does the rest of the board run at the correct speed?
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: GLCD and Touchpad Library

Post by mobyfab »

I will check the clock out pin tonight.

In theory I can drive the FSMC at full speed once the driver is initialised at 120Mhz.

actually 50ms is the time to clear the full screen, not the time to write one word: (130560 words each time so 2.6Mhz)

Code: Select all

  while (TRUE) {
     for (i=0;i<=0xFF;i++) {
        lcdClear(i);
     }
  }


I will hook up the command pins as well, should be more relevant.
Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm

Re: GLCD and Touchpad Library

Post by Abhishek »

I've been getting 234Hz with split GPIO on the S6D1121 LCD. I think it needs a little tinkering with the FSMC timing delays, maybe could be pushed a little further.

BTW mobyfab, I suppose your LCD is 480*272? Or is it QVGA? F4Discovery runs on 168Mhz.
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: GLCD and Touchpad Library

Post by Badger »

The best I could push my S6D1121 display was around 10ms for a complete screen update. Anything faster than that and the communication got corrupted.
Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm

Re: GLCD and Touchpad Libraryt

Post by Abhishek »

I guess you would be able to push it a little more further with a PCB or a more arranged setup :) ? Maybe the long wires are playing havoc with the speed.

In one of the earlier posts made on this topic, one member was able to get 263Hz with SSD1289 on F4D. I don't know about corrupted communication in his case. The 234Hz mentioned is at full speed, I ran a stress test to confirm it (clearing on press of user button and looking for black dots / lines. I use 2 NOPs btw WR pin toggles. Haven't tested GPIO readback yet.
User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm

Re: GLCD and Touchpad Library

Post by Badger »

I just did a quick test: set all FSMC delays to 0 (fastest they can be) and timed how long 1000 lcdClear(Black) took: ~1832ms. So that's about 545Hz max update for FSMC on F4. Abhishek is probably correct when he says the length of wires is a limiting factor in my setup! (it is a mass of wires bent around each other on a matrix board..) I will design a PCB with very short traces soon.

Anyway, one of the main advantage of using FSMC isn't so much the speed, but the fact that we can use DMA so that the writeStream operations all take place in the background without blocking the cpu.
Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm

Re: GLCD and Touchpad Library

Post by Abhishek »

I agree with you, Badger on your last point. Two NOPs per write cycle is really a wastage of CPU power that could have been passed on for a better job.

Another thing that the FSMC can beat GPIO is when a read-modify-write cycle is done. For GPIO, it would require a switch of pad mode everytime from output, to input, and to output, but it's natural for FSMC, I believe.

Anyways, we needn't worry about whatever interface we're using as long as it works great. That was one of the design goals of the lib.

So Badger, did you review any 3rd party lib yet to study their architecture?
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: GLCD and Touchpad Library

Post by mobyfab »

480*272 indeed.

In theory I can do around 500 fps with the controller running at 120Mhz. (60M words/s)

I have done 53 fps with the controller running at 10Mhz, and using GPIO. (5M words/s)
Last edited by mobyfab on Thu Jul 26, 2012 10:06 am, edited 1 time in total.
Locked