2008-01-14 22:16:53     About ads7846 in blackfin

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

2008-01-14 22:16:53     About ads7846 in blackfin

DAVID ZHOU (CHINA)

Message: 49572   

 

I want to use ads7846 in my blackfin uclinux project,  I have enabled ads7846 input driver in config menu,but I can not find where to define ads7846_chip_info such as ad7877 or I just should define it as http://docs.blackfin.uclinux.org/doku.php?id=spi told me.Could some one give me some help ?

 

I want to use it as an input device.

 

Thanks

 

refer to define ad7877 in  stamp.c

 

#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)

static struct bfin5xx_spi_chip spi_ad7877_chip_info = {

//      .cs_change_per_word = 1,

        .ctl_reg = 0x1000,

        .enable_dma = 0,

        .bits_per_word = 16,

};

 

static const struct ad7877_platform_data bfin_ad7877_ts_info = {

        .model                  = 7877,

        .vref_delay_usecs       = 50,   /* internal, no capacitor */

        .x_plate_ohms           = 419,

        .y_plate_ohms           = 486,

        .pressure_max           = 1000,

        .pressure_min           = 0,

        .stopacq_polarity       = 1,

        .first_conversion_delay = 3,

        .acquisition_time       = 1,

        .averaging              = 1,

        .pen_down_acc_interval  = 1,

};

#endif

QuoteReplyEditDelete

 

 

2008-01-15 03:52:23     Re: About ads7846 in blackfin

DAVID ZHOU (CHINA)

Message: 49581    When I enable Input device support and ads7846 touchscreen, Kernel can not boot up, error is NULL point access and Kernel panic

QuoteReplyEditDelete

 

 

2008-01-15 06:57:19     Re: About ads7846 in blackfin

Michael Hennerich (GERMANY)

Message: 49594   

 

Have a look at linux/arch/arm/mach-omap1/board-nokia770.c

 

there is an example on how to add the 7846 to the board file...

 

-Michael

QuoteReplyEditDelete

 

 

2008-01-15 08:31:44     Re: About ads7846 in blackfin

Robin Getz (UNITED STATES)

Message: 49596    David:

 

Can you post the kernel dump?

 

Thanks

-Robin

QuoteReplyEditDelete

 

 

2008-01-15 20:32:52     Re: About ads7846 in blackfin

DAVID ZHOU (CHINA)

Message: 49629   

 

Creating 3 MTD partitions on "m25p128":

0x00000000-0x00080000 : "uboot&conf"

0x00080000-0x00380000 : "kernels"

0x00380000-0x01000000 : "file system"

 

 

NULL pointer access (probably)

 

CURRENT PROCESS:

 

COMM=swapper PID=1

return address: 0x000afffe; contents of [PC-16...PC+8]:

2ff6 0568 0167 6f86 0035 e147 1062 6006

e107 4dd3 e12a 0064 0031 0000 0000 0024 X

9910 0041 4342 4802 1854 6080 0806 1851

 

RETE:  00000000  RETN: 0021bf4c  RETX: 000afffe  RETS: 000b00d4

IPEND: 8030  SYSCFG: 0036

SEQSTAT: 00000027    SP: 0021be70

R0: 00000001    R1: 0000001f    R2: 00000060    R3: 00222e00

R4: 0021bfa8    R5: 0000ffff    R6: 00000000    R7: 10624dd3

P0: 00000000    P1: 00142ff0    P2: 00000064    P3: 0013a2f0

P4: 0021a000    P5: 0013a2a0    FP: 0013969c

A0.w: 00000000    A0.x: 00000000    A1.w: 00000000    A1.x: 00000000

LB0: ffa01f10  LT0: ffa01f10  LC0: 00000000

LB1: 00032ff2  LT1: 00032fec  LC1: 00000000

B0: 00000000  L0: 00000000  M0: 00000000  I0: 0025ed70

B1: 00000000  L1: 00000000  M1: 00000000  I1: 00000000

B2: 00000000  L2: 00000000  M2: 00000000  I2: fffedb69

B3: 00000000  L3: 00000000  M3: 00000000  I3: 00000000

 

USP: 00000000   ASTAT: 00003004

DCPLB_FAULT_ADDR=00000064

ICPLB_FAULT_ADDR=000afffe

 

 

Hardware Trace:

0 Target : <0x000047d0> { _trap_c + 0x0 }

   Source : <0xffa00b98> { _exception_to_level5 + 0xb4 }

1 Target : <0xffa00ae4> { _exception_to_level5 + 0x0 }

   Source : <0xffa00ae2> { _ex_trap_c + 0x4e }

2 Target : <0xffa00a94> { _ex_trap_c + 0x0 }

   Source : <0xffa00c38> { _trap + 0x28 }

3 Target : <0xffa00c10> { _trap + 0x0 }

   Source : <0x000afffc> { _i8042_flush + 0x1c }

4 Target : <0x000affe0> { _i8042_flush + 0x0 }

   Source : <0x000b00d0> { _i8042_controller_check + 0x4 }

5 Target : <0x000b00cc> { _i8042_controller_check + 0x0 }

   Source : <0x00136ebe> { _i8042_init + 0x46 }

6 Target : <0x00136eae> { _i8042_init + 0x36 }

   Source : <0x00011c6e> { ___request_region + 0x6a }

7 Target : <0x00011c66> { ___request_region + 0x62 }

   Source : <0x00011c4c> { ___request_region + 0x48 }

8 Target : <0x00011c4a> { ___request_region + 0x46 }

   Source : <0x0001183a> { ___request_resource + 0x5a }

9 Target : <0x0001182e> { ___request_resource + 0x4e }

   Source : <0x00011810> { ___request_resource + 0x30 }

10 Target : <0x0001180c> { ___request_resource + 0x2c }

   Source : <0x00011806> { ___request_resource + 0x26 }

11 Target : <0x000117e0> { ___request_resource + 0x0 }

   Source : <0x00011c46> { ___request_region + 0x42 }

12 Target : <0x00011c26> { ___request_region + 0x22 }

   Source : <0x000333a0> { _kmem_cache_zalloc + 0x4c }

13 Target : <0x00033398> { _kmem_cache_zalloc + 0x44 }

   Source : <0xffa01f16> { _memset + 0x2e }

14 Target : <0xffa01ee8> { _memset + 0x0 }

   Source : <0x00033394> { _kmem_cache_zalloc + 0x40 }

15 Target : <0x00033354> { _kmem_cache_zalloc + 0x0 }

   Source : <0x00011c22> { ___request_region + 0x1e }

Stack from 0021be50:

        002229c0 ffa00b9c 00142714 00142714 00142710 01edbd50 ffffa1ff 00064e5c

        000afffe 00008030 00000027 00000000 0021bf4c 000afffe 000afffe 000b00d4

        00000001 00003004 00032ff2 ffa01f10 00032fec ffa01f10 00000000 00000000

        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

        00000000 fffedb69 00000000 0025ed70 00000000 0013969c 0013a2a0 0021a000

Call Trace:

[<0000ffff>] _do_setitimer+0x83/0x564

[<00011c26>] ___request_region+0x22/0x6c

[<000b00d4>] _i8042_controller_check+0x8/0x28

[<00117ed4>] ___func__.14610+0xee70/0x13984

[<00136ec2>] _i8042_init+0x4a/0xd0

[<00117ed4>] ___func__.14610+0xee70/0x13984

[<00001298>] _init+0x88/0x228

[<00001210>] _init+0x0/0x228

[<00001a06>] _kernel_thread_helper+0x6/0xc

 

Kernel panic - not syncing: Kernel exception

QuoteReplyEditDelete

 

 

2008-01-15 21:12:49     Re: About ads7846 in blackfin

Yi Li (CHINA)

Message: 49630    The HW trace shows

 

"  Source : <0x000afffc> { _i8042_flush + 0x1c }

4 Target : <0x000affe0> { _i8042_flush + 0x0 }"

 

triggers a NULL pointer exception. You could refer to "http://docs.blackfin.uclinux.org/doku.php?id=debuging_applications#analyzing_traces" to debug.

QuoteReplyEditDelete

 

 

2008-01-15 21:25:28     Re: About ads7846 in blackfin

DAVID ZHOU (CHINA)

Message: 49631   

 

OK

 

I reconfig the Input layer, just disable Input layer support ---->hardware I/O ports. then it is OK

 

Thank you all !

QuoteReplyEditDelete

 

 

2008-01-15 21:51:42     Re: About ads7846 in blackfin

DAVID ZHOU (CHINA)

Message: 49632   

 

But there is still something wrong:

 

When booting there is a error :

 

ads7846: probe of spi1.2 failed with error -22

rtc-bfin rtc-bfin: rtc intf: sysfs

rtc-bfin rtc-bfin: rtc intf: proc

rtc-bfin rtc-bfin: rtc intf: dev (254:0)

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

QuoteReplyEditDelete

 

 

2008-01-15 23:35:36     Re: About ads7846 in blackfin

Robin Getz (UNITED STATES)

Message: 49634    A better question is - why is the Intel SuperIO keyboard controller (i8042) driver compiled into your kernel for the Blackfin?

 

But it looks like you already figured that out...

 

-Robin

QuoteReplyEditDelete

 

 

2008-01-23 03:05:08     Re: About ads7846 in blackfin

DAVID ZHOU (CHINA)

Message: 49988    Error was fixed!

Because of the pen_down check function in ads7846 is null.

Attachments

    Outcomes