Benchmark SSD1289

etmatrix
Posts: 46
Joined: Sun Oct 21, 2012 10:05 pm

Benchmark SSD1289

Postby etmatrix » Sat Dec 22, 2012 4:39 pm

I have done some benchmarks with SSD1289 using GPIO and FSMC.
I have used this souce code https://github.com/etmatrix/ChibiOS-GFX ... nch/main.c posted by mobyfab.
I got about 2400000 with GPIO and about 5300000 with FSMC. Without using CS in acquire and release bus I got about 2800000 with GPIO.
Has anyone ever tried it?

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Benchmark SSD1289

Postby Tectu » Sat Dec 22, 2012 5:19 pm

Hello etmatrix,

Thanks for your data. I never really found time myself for making benchmarks.
Would you be open to create a main.c + gfxconf.h for demos/benchmarks in the repository? The demo could run several thins like normal pixel manipulation as well as area blitting and others and display the values like pixels/sec. on the screen afterwards. What do you say?

Of course you don't need the CS thing as long as you don't have anything else connected to your bus. This is the advantage of the board files. You can simply optimize everything for your hardware setup!


Kind regards,

~ Tectu

etmatrix
Posts: 46
Joined: Sun Oct 21, 2012 10:05 pm

Re: Benchmark SSD1289

Postby etmatrix » Sat Dec 22, 2012 7:02 pm

Hello Tectu,

Tectu wrote:I never really found time myself for making benchmarks.
I have done for test FSMC and understand the advantages to use it.

Tectu wrote:Would you be open to create a main.c + gfxconf.h for demos/benchmarks in the repository? The demo could run several thins like normal pixel manipulation as well as area blitting and others and display the values like pixels/sec. on the screen afterwards. What do you say?
Ok done! The first version do a simple gdispFillArea, as original version. I need to understand better CPU_RESET_CYCLECOUNTER, I think that code works only on STM32F4xx.

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Benchmark SSD1289

Postby Tectu » Sat Dec 22, 2012 7:06 pm

Thank you very much for your pull request, It's already in the repo master.
Please note that You have to take the proper file header. You took the ChibiOS/RT license header. I replaced the header by the proper one you can find in any ChibiOS/GFX file.
Also, I made a few more cleanups (removed the noreturn attribute for since not every compiler might support that as well as the gdispInit() has been moved into the main where it belongs.

However, I couldn't try the demo out yet. I'll do that somewhen this night.

File free to update the demo whenever you want :)

~ Tecut

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Benchmark SSD1289

Postby Tectu » Sat Dec 22, 2012 7:46 pm

Okay. I tried the benchmark out and I also made a little cleanup.

Here are my results:

  • STM32F103RBT, 240x320, GPIO: 3640048 Pixels/s


~ Tectu

etmatrix
Posts: 46
Joined: Sun Oct 21, 2012 10:05 pm

Re: Benchmark SSD1289

Postby etmatrix » Sat Dec 22, 2012 7:58 pm

etmatrix wrote:I need to understand better CPU_RESET_CYCLECOUNTER, I think that code works only on STM32F4xx.
My error, I'm a newbie on ARM. That code should be works with all Cortex-M3 and over.

My connections with GPIO use bit-banging. I forget to write this information.

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Benchmark SSD1289

Postby Tectu » Sun Dec 23, 2012 12:17 pm

Sorry, I cannot help you with that macro, but feel free to tell me the answer when you find out :P


~ Tectu

Eddie
Posts: 44
Joined: Sat Mar 16, 2013 5:57 pm
Location: Czech Republic
Has thanked: 2 times
Been thanked: 6 times

Re: Benchmark SSD1289

Postby Eddie » Mon Jun 03, 2013 3:48 pm

Hello, I improved SSD1289 driver performance using FSMC and DMA on STM32F4. Also added backlight control using PWM output.
Tested on STM32F4 Discovery and TFT LCD HY32C.

Benchmark:
FSMC DMA off - 6 Mpix/sec
FSMC DMA on - 17 Mpix/sec

Eddie
Attachments
ADS7843.ZIP
(6.63 KiB) Downloaded 530 times
SSD1289.ZIP
(12.21 KiB) Downloaded 608 times

mobyfab
Posts: 483
Joined: Sat Nov 19, 2011 6:47 pm
Location: Le Mans, France
Has thanked: 21 times
Been thanked: 30 times

Re: Benchmark SSD1289

Postby mobyfab » Mon Jun 03, 2013 4:11 pm

You can use halGetCounterValue() and just skip reseting the cpu cycles counter.

Code: Select all

    
uint32_t start = halGetCounterValue();
for (i = 0; i < 5000; i++) {
  ...
}
uint32_t ms = (halGetCounterValue()-start) / 168000;


Also try to play with the FSMC delays to get the best performance possible :)

As far as I know the SSD1289 was already using FSMC and DMA ported from my SSD1963 code.

Edit: seems like the FSMC board file has the DMA config, but the fillarea/blitarea functions do not handle DMA requests.

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: Benchmark SSD1289

Postby Tectu » Mon Jun 03, 2013 9:47 pm

Thank you very much for your contribution Eddie. I took a look to your changes and everything looks nice. It also works without any issues here. Therefore I have commited the changes and added your contribution to credits table.
Awaiting your next contribution ;-)


~ Tectu


Return to “LCD Driver and Graphic Framework”

Who is online

Users browsing this forum: No registered users and 2 guests