Re: ARM920 Timer Counter Configuration
- From: sjohnson@xxxxxxxxxxxx
- Date: 19 Dec 2006 07:09:24 -0800
Michael Schnell wrote:
You want to create a device driver kernel module.
So first you need to know how to create a device driver: "Linux device
drivers 3rd Edition" by Rubini and Friends.
Then you proceed according to the information the chips data ***
provides.
-Michael
Thanks, Michael. I am able to build a device driver without a problem.
I guess my real question is how to actually configure the timer counter
in Linux for the AT9200RM processor. I have found an application note
on the Atmel site that describes the process without using an OS. My
problem is that I'm not sure what to do in Linux. Here's what I am
trying, but I think its totally wrong:
volatile AT91PS_TCB p_tcb = (AT91PS_TCB)AT91C_VA_BASE_TCB0;
volatile AT91PS_TC p_tc (AT91PS_TC)&p_tcb->TCB_TC0;
....
status = request_irq(AT91C_ID_TC0, timer_isr, SA_INTERRUPT,
"timer_isr", NULL);
if ( !status ) {
p_tc->TC_CCR = AT91_TC_CLKDIS;
p_tc->TC_IDR = AT91C_TC_CPCS;
dummy = p_tc->TC_SR;
p_tc->TC_CMR = AT91C_TC_TIMER_DIV2_CLOCK | AT91C_TC_CPCTRG;
p_tc->TC_CCR = AT91C_CLKEN;
p_tc->TC_IER = AT91C_TC_CPCS;
p_tc->TC_RC = 0x00ff;
p_tc->TC_CCR = AT91C_TC_SWTRG;
}
.....
}
.
- References:
- ARM920 Timer Counter Configuration
- From: sjohnson
- Re: ARM920 Timer Counter Configuration
- From: Michael Schnell
- ARM920 Timer Counter Configuration
- Prev by Date: Re: how to assay usb-ohci.c
- Next by Date: Re: security on linux embedded
- Previous by thread: Re: ARM920 Timer Counter Configuration
- Next by thread: GPL vs SonoCalc™ IMT Embedded Linux Software
- Index(es):