Hi All.
I have a problem which has me beaten.
Using a STM32F4 discovery board and this TFT:- http://tinyurl.com/am2x5wk
and the latest ChibiOS/GFX files I have built the touchscreen calibrate utility with help
from this github repo etmatrix/ChibiOS-GFX-Example.
When the code runs everything seems normal Device type touch detected.
Next test hold finger on touchscreen and all it keeps repeating on the screen is 0:0
Then the next test to touch a number of points to calibrate after the second teach it reports
Error: Same Reading - Check Driver!
I am running this with a the FSMC driver.
And now I am stuck checked the touchscreen with another program outside of ChibiOS and
the touch screen works fine.
Can somebody give me some pointers to lookout for.
Regards Peter
Touchscreen problem
Re: Touchscreen problem
Hello Peter and welcome to ChibiOS!
The "hold down" test is not supposed to output the coordinates of the point touched, as far as I remember. When your calibration does fail every time, it's most likely because your pixel tolerance is set to low. Please try to set the value of GINPUT_MOUSE_MAX_CALIBRATION_ERROR higher. Let's begin with 20.
If this still dosen't help, please try a pen.
Also, you mentioned that the hardware works without ChibiOS -> Are you sure that your SPI is set up correctly?
~ Tectu
The "hold down" test is not supposed to output the coordinates of the point touched, as far as I remember. When your calibration does fail every time, it's most likely because your pixel tolerance is set to low. Please try to set the value of GINPUT_MOUSE_MAX_CALIBRATION_ERROR higher. Let's begin with 20.
If this still dosen't help, please try a pen.
Also, you mentioned that the hardware works without ChibiOS -> Are you sure that your SPI is set up correctly?
~ Tectu
Re: Touchscreen problem
Okay, I just found some time to take out my hardware and make a quick test. I have used the exactly same LCD module as you:
Also the calibration stuff works like a charm. Please try to increase the GINPUT_MOUSE_MAX_CALIBRATION_ERROR in the ginput_lld_mouse_config.h file of the ADS7843 driver. If this doesn't help, make sure your SPI is set up correctly.
~ Tectu
- STM32F103RBT
- SSD1289
- ADS7843
- ChibiOS/RT: 2.5.1
- ChibiOS/GFX: latest master
Also the calibration stuff works like a charm. Please try to increase the GINPUT_MOUSE_MAX_CALIBRATION_ERROR in the ginput_lld_mouse_config.h file of the ADS7843 driver. If this doesn't help, make sure your SPI is set up correctly.
~ Tectu
Re: Touchscreen problem
Hello Tectu.
Sorry for the late reply to your suggestions.
I think you are correct the SPI port is not being setup properly.
I am trying to use SPI3 on GPIOC
TP_CS_PORT GPIOC
TP_IRQ_PORT GPIOC
TP_IRQ_PIN 5
TP_CS_PIN 4
SCK 10
MISO 11
MOSI 12
I think I need to read some more documentation on creating a ginput_lld_mouse_board for my setup.
As I do not appear to be able to create one correctly.
Regards Peter
Sorry for the late reply to your suggestions.
I think you are correct the SPI port is not being setup properly.
I am trying to use SPI3 on GPIOC
TP_CS_PORT GPIOC
TP_IRQ_PORT GPIOC
TP_IRQ_PIN 5
TP_CS_PIN 4
SCK 10
MISO 11
MOSI 12
I think I need to read some more documentation on creating a ginput_lld_mouse_board for my setup.
As I do not appear to be able to create one correctly.
Regards Peter
Re: Touchscreen problem
I suggest you to take this board file and fix it to your needs. It shows how to do the SPI stuff correctly.
~ Tectu
~ Tectu
Return to “LCD Driver and Graphic Framework”
Who is online
Users browsing this forum: No registered users and 29 guests