2008-03-09 20:42:11     ads7843 doesn’t work

Document created by Aaronwu Employee on Aug 7, 2013
Version 1Show Document
  • View in full screen mode

2008-03-09 20:42:11     ads7843 doesn’t work

wwww wwww (AFGHANISTAN)

Message: 52229   


Hi all:

In uclinux-2008R2 ,I use ads7843 touchscreen device , i config ads7846 driver in stamp.c.


but i can't receive any data .





static int ads7846_pendown_state(void)


return gpio_get_value(GPIO_6);



static struct bfin5xx_spi_chip ads7846_chip_info = {


    .enable_dma = 0, 

    .bits_per_word = 8,





static struct ads7846_platform_data ads7846_pdata = {

.model   = 7843,

.x_min   = 150,

.x_max   = 4095,

.y_min   = 190,

.y_max   = 4095,

.vref_delay_usecs = 100,

.x_plate_ohms  = 450,

.y_plate_ohms  = 250,

.pressure_max  = 15000,

.debounce_max  = 1,

.debounce_rep  = 0,

.debounce_tol  = (~0),

.get_pendown_state = ads7846_pendown_state,














.irq = IRQ_PF6, //pf6 pin

    .modalias = "ads7843",

.platform_data = &ads7846_pdata,

.max_speed_hz = 587500,

.bus_num = 0,

    .chip_select = 7,   //pf7 pin

    .controller_data = &ads7846_chip_info,

.mode = SPI_MODE_0,











2008-03-09 20:54:00     Re: ads7843 doesn’t work

Mike Frysinger (UNITED STATES)

Message: 52231    we've never tested that part, but looking at the code, you will probably need to modify the driver for gpio handling




2008-08-14 16:01:39     Re: ads7843 doesn’t work

Isaac Leung (CANADA)

Message: 60490   


Did anyone have any success or progress with this?


We are actually using the TCS2046 part, which should be same and compatible with the ADS7846/ADS7843 part and we have the same requirement. We are running our own custom board based off the BF547 but the LCD + touchscreen is otherwise same as that in the BF548 EZ-Kit.


What has to be modified with the driver? Will gpio_get_value() not return a useable result for the driver?


(I tried doing something similar to that described above but it doesn't work, no response from touchscreen. During bootup, I can see the touch screen is initialized and appears to be up correctly. It is on SPI2).




2008-08-15 15:30:54     Re: ads7843 doesn’t work


Message: 60506   




What Mike said was:


> you will probably need to modify the driver


That means you. - no one here has the hardware - no one is working on it. If you are using the TI part (which you said you were) - no one is going to get assigned to it either


Since we have not done the work - we can't say exactly what needs to be modified.


You will need to poke at it and fingure it out (sorry).






2008-08-15 17:11:32     Re: ads7843 doesn’t work

Isaac Leung (CANADA)

Message: 60509   


Well I'm not asking you or Mike to do my work for me, I'm just asking if anyone else has had success with this as there are clearly at least 2 others who are using this part, the original driver contributor and the original poster. It seems likely somebody has it functioning and it would be nice not to repeat their mistakes.


Anyways at this point, the driver appears to load correctly and our application detects the availability of the touchscreen driver. A simple test on the GPIO shows that PENIRQ from the touch controller is attached and seems to be functioning correctly as it will at least detect a touch. I will hazard a guess that the driver is probably okay, but my error is in the custom board configuration (e.g. equivalent to arch/blackfin/mach-bf548/boards/ezkit.c). With the most-working configuration, when we run our application, it will at least detect a touch on the screen but then uClinux crashes with some error about memory alignment problem. The same application, without re-compile, seems to work fine on the BF548 EZKit.


Will keep poking at our custom board config for now unless somebody points me elsewhere...