Question about New Notepad Demo for ChibiOS/GFX

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

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby Tectu » Wed Jun 12, 2013 8:41 pm

I am really not understanding why this is not working for you... I tried it on four different developement boards and the simulators - it works fine for me :/
When you press the save or load button, does the text in the status bar (at the bottom left corner) change the messages?

Please don't always quote the messages you're replying to the full post. Please use PostReply at the top or bottom of the thread.


~ Tectu

jscott
Posts: 124
Joined: Tue Jul 03, 2012 3:50 pm
Location: Middle Georgia, USA
Contact:

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby jscott » Wed Jun 12, 2013 9:07 pm

Tectu wrote:You are supposed not to get a smooth line. Inside the *_conf.h file of your ginput driver you fill find a polling delay macro. This defines the frequency with wich your touchscreen is polled. Otherwise the touchscreen polling would eat all your CPU.
You may decrease this value to 2 or 3 if you want smoother lines.


Tectu,

Have you though about a variable polling rate? Start with a slow polling interval, then when a touch is detected, switch to a faster polling rate for some interval.

Fast poll rate, slow poll rate and fast poll period would all be configurable...

just a quick thought...

-John Scott

inmarket
Posts: 89
Joined: Fri Jul 27, 2012 1:37 pm
Location: Brisbane, Australia

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby inmarket » Thu Jun 13, 2013 3:42 am

This is a very good idea. I will look at adding it in the future.

xlh1460
Posts: 25
Joined: Wed May 22, 2013 6:48 pm

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby xlh1460 » Thu Jun 13, 2013 6:06 am

Yes the text changes.

I do have another board, STM3242G-EVAL, I'll give that a try.

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

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby Tectu » Thu Jun 13, 2013 7:05 am

@jscott: That's indeed a very nice idea! It has been added to the ToDo list. It shall be done as soon as the other new stuff has been completed ;)
Thanks for the idea!


~ Tectu

xlh1460
Posts: 25
Joined: Wed May 22, 2013 6:48 pm

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby xlh1460 » Thu Jun 13, 2013 4:08 pm

Has any thought been given to making the touchscreen interface interrupt driven instead of using polling?

STM uses that approach in their GUI library samples but I have no idea how complex that may be to realize in ChibiOS/GFX.

xlh1460
Posts: 25
Joined: Wed May 22, 2013 6:48 pm

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby xlh1460 » Thu Jun 13, 2013 4:22 pm

Tectu wrote:I tried it on four different developement boards and the simulators - it works fine for me :/


I got it to work on the simulator too.

Can you provide information on the display that you used with your STM32F4-DISCOVERY board?

I wouldn't mind sourcing one to see if that is the root of my issues.

I had some problems getting the ADS7843 driver working with my setup, details here: http://www.wvshare.com/column/STM32_DevelopmentBoard.htm#Open407V-D

I see that a new driver file named ginput_lld_mouse_board_st_stm32f4_discovery.h had been added.

I needed to add the following additional pad mode configuration statements in the init_board routine to get it to work:

Code: Select all

 
  palSetPadMode(GPIOC, 4, PAL_MODE_OUTPUT_PUSHPULL | PAL_MODE_INPUT_PULLUP | PAL_STM32_OSPEED_HIGHEST);
  palSetPadMode(GPIOC, 5, PAL_MODE_INPUT | PAL_MODE_INPUT_PULLUP | PAL_STM32_OSPEED_LOWEST);
  palSetPadMode(GPIOB, 13, PAL_MODE_ALTERNATE(5) |
                           PAL_STM32_OSPEED_HIGHEST);       /* New SCK.     */
  palSetPadMode(GPIOB, 14, PAL_MODE_ALTERNATE(5) |
                           PAL_STM32_OSPEED_HIGHEST);       /* New MISO.    */
  palSetPadMode(GPIOB, 15, PAL_MODE_ALTERNATE(5) |
                           PAL_STM32_OSPEED_HIGHEST);       /* New MOSI.    */


The thing is, since my setup works fine with the touch_driver_test demo and the code that you directed to, am I foolish to suspect that there is anything wrong with my driver?

Thanks again.

inmarket
Posts: 89
Joined: Fri Jul 27, 2012 1:37 pm
Location: Brisbane, Australia

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby inmarket » Fri Jun 14, 2013 2:37 am

The touch drivers can be interrupt driven where the hardware supports it. For example, the Win32 and POSIX emulators use a interrupt emulation to provide a very smooth mouse performance.
In practice none of the real hardware that we have played with has ever been connected to a real CPU interrupt pin. The driver API certainly supports it if the hardware does.

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

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby Tectu » Fri Jun 14, 2013 4:33 pm

inmarket wrote:In practice none of the real hardware that we have played with has ever been connected to a real CPU interrupt pin.

This is not completely true. At least on an STM32, you can use any GPIO as an external interrupt. Nearly every developement board I have here myself would be capable of using the external interrupt of the touschreen controller instead of polling. The issue we came across first was more that it's hard to implement a generic external interrupt interface. The EXT driver HAL of ChibiOS/RT is very different for all the platforms. It's the same with the ADC - there the solution was to add another abstraction layer called GADC.
But since ChibiOS/GFX becomes usable now, there should really some work on finding a sane solution for that. Back the days it just wasn't important enough :)

Can you provide information on the display that you used with your STM32F4-DISCOVERY board?
I wouldn't mind sourcing one to see if that is the root of my issues.

I tested the notepad demo with an SSD1289, SSD2119, ILI9320 and the simulator. However, it was just the SSD2119 which was used on the F4 Discovery board. If you want to source a display, we can evaluate the issue.

I needed to add the following additional pad mode configuration statements in the init_board routine to get it to work:

The board files are just there as an example. You simply have another pin configuration on your setup. Therefore it's completely okay and even required that you modify the board files for a generic development board since you can connect the SPI of the touchscreen controller in many different ways to your F4 Discovery


~ Tectu

xlh1460
Posts: 25
Joined: Wed May 22, 2013 6:48 pm

Re: Question about New Notepad Demo for ChibiOS/GFX

Postby xlh1460 » Fri Jun 14, 2013 5:47 pm

Thanks again for the information.

I'll try the notepad app again once i get around to testing with my STM3242G-EVAL board.

For now i think I'll focus on developing my own app since i now have a very suitable platform to do so!

Did I mention that you guys are awesome? :D


Return to “LCD Driver and Graphic Framework”

Who is online

Users browsing this forum: No registered users and 1 guest