3448 views|2 replies

73

Posts

0

Resources
The OP

How to configure AT91RM9200 PA16/EMDIO/IRQ6 pin as IRQ6 function of function B [Copy link]

The hardware connection of the linux-2.4.27 touch screen driver is as follows: the interrupt output pin/PENIRQ of the touch screen chip 7843 <-----> PA16/EMDIO/IRQ6, that is, the IRQ function of the 16th line of PIOA is used to receive the interrupt signal generated by the touch screen. I configured this interrupt line as follows: AT91C_SYS->PMC_PCER = 1<< AT91C_ID_IRQ6 ; //Turn on PIOA peripheral clock AT91C_SYS->PIOA_PDR = AT91C_PA16_IRQ6; //Disable PIOA function AT91C_SYS->PIOA_BSR = AT91C_PA16_IRQ6; //Select function B, The touch screen driver in the kernel has been successfully compiled, and the interrupt allocation has also been successful. The assigned interrupt number is 31 (AT91C_ID_IRQ6), but when executing the read of the touch screen file /dev/touchscreen/0raw, that is, cat this file, it is obviously opened successfully, but when the screen is pressed by hand, it seems that the LINUX kernel cannot receive the interrupt generated, because the interrupt service function ads7843_ts_interrupt is not entered. This function is specified in request_irq. I have tracked this information, but the electrical level is normal at this time, that is, when the screen is pressed, the electrical level is pulled low, and cat The number of interrupts shown in /proc/interrupts will not change. In a word, the kernel does not collect the interrupt signal "normally", but the generation of the interrupt signal is normal, that is, the level of the /PenIrq pin changes normally. When touched, the level is low; when released, it is high. If you want to use the IRQ function of the 16th pin of PIOA, how should you configure it? Are the three items above okay? It has been configured to use peripheral function B, right? Are there other places that need attention? Take the use of interrupt lines as an example. Another question: What does it take to successfully drive the touch screen? If you write a user test program, use read to read the touch screen file /dev/touchscreen/0raw, and print out the read value information, because read is blocked by default, it will block if the touch screen is not pressed. If you press the touch screen, it should immediately print out the read value information. Does this mean that the driver is "good"?
This post is from Embedded System

Latest reply

I read the manual and it seems to say that when configuring the interrupt line, the clock does not work, that is, there is no need to turn on the clock. So how do I use the interrupt of AT91RM9200? I found that there is no example in the manual. It only has a data sheet, but no user manual. For example, LPC chips have examples.  Details Published on 2007-11-8 10:01

64

Posts

0

Resources
2
I found that I could not set the PMC_PCER register at all. Other drivers in the kernel could set it successfully, but I could not set the 31st bit successfully.
This post is from Embedded System

74

Posts

0

Resources
3
I read the manual and it seems to say that when configuring the interrupt line, the clock does not work, that is, there is no need to turn on the clock. So how do I use the interrupt of AT91RM9200? I found that there is no example in the manual. It only has a data sheet, but no user manual. For example, LPC chips have examples.
This post is from Embedded System

Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

    EEWorld
    subscription
    account

    EEWorld
    service
    account

    Automotive
    development
    circle

    Robot
    development
    community

    Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
    快速回复 返回顶部 Return list