Complete Solution to the S3C2440/6410 touch jitter Problem

Source: Internet
Author: User

From http://bbs.driverdevelop.com/htm_data/48/0909/118452.html

Harktrip

 

 

Not tested. The results will be written after the test.

# Define tsp_sample_num 20
# Define tsp_adc_delay = 4000;
As for the call timer interruption, the number of times per second can be reduced to 50.
# Define tsp_sample_rate_low (50) // 50 samples per sec
# Define tsp_sample_rate_high (50) // 50 samples per sec
(Check whether the number of interruptions per second calculated by pclk and pwm_regs is 50)

In this way, the system is not shaken, and the response is fast enough and takes a short time.
When I caught touch, it would interfere with the serial port, So I forced the touch driver to be well watched,
I found that everyone's (official) practices have doubts:

Tsp_adc_delay all use the values 40000 and parameters,
In fact, this is wrong. Extend the ADC delay time, which may mean to make the signal time more stable,
However, the ADC conversion itself has an error. Extending the time does not make the signal more stable, but it only consumes the system time.

Therefore, I shortened tsp_adc_delay and increased the average number of reads (tsp_sample_num,
Let the CPU read several times more; accumulate more data on average, try Bingo !!

In addition, it effectively reduces the interruption time of touch,
The above settings occupy 2.1 msec (from interruption to disconnection)
However, if it is changed:
# Define tsp_sample_num 10
# Define tsp_adc_delay = 2000;
The occupied space can be reduced to 0.15 msec. Although it does not shake, sometimes location separation may occur.
If you don't care about the time-consuming brothers, you can first set the top priority to optimize it.

So, have you changed it?
Isn't tocuh even shaking,
If it still shakes, your hand is shaking ^_^

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.