Hello
Has anybody tried to get it work on the 42800 cpu?
i experience problems in adapting the artxconfig.c
I wanted to use the cpu's PIT to generate the os_clock_interrupt, but didn't get it work.
So i wrote a simple programm to test the PIT and got it work.
the source:
void os_clock_interrupt_2 (void) __irq
{
PIOB_SODR = LED_MASK;
if(bActiveLed == 0x80) bActiveLed = 1;
bActiveLed <<= 1;
(ST_SR & 0x00000001); //without this it won't work, but i don't know why?!
AIC_EOICR = 0xffff; //signal end of ISR
}
void main (void)
{
PIOB_PER = LED_MASK;
PIOB_OER = LED_MASK;
PIOB_SODR = LED_MASK;
//PIT INIT
ST_PIMR = 0x00007500;//Set PIT Reload Value (SCK Cycles)
ST_IMR = 1; //Enable PIT_IRQ
ST_IER = 1;
//AIC Init
AIC_SPU = (DWORD)os_def_interrupt_2;
AIC_SVR12 = (DWORD)os_clock_interrupt_2;
AIC_SMR12 = AIC_SRCTYPE_INT_EDGE_TRIGGERED | 0;
AIC_IECR = (1<<12);
//Generate 1st IRQ to test
AIC_ISCR = (1<<12);
while(1)
{
PIOB_CODR = (dword)(bActiveLed<<8);
}
}
but it won't work an Tiny ARTX.
The Sys is running, but the scheduler doesn't change the running task.
the actual situation: the os_clock_interrupt is only called once, after timer initialization.
Anybody an idea what's the problem with this? maybe i'll use a normal Timer instead of the PIT?
Read-Only
Author Reinhard Keil
Posted 23-May-2005 08:11 GMT
Toolset ARM
RE: Tiny ARTX on AT91M42800A using PIT
Reinhard Keil
There is a ARTX configuration for the Atmel AT91SAM7S parts in the folder: \Keil\ARM\Boards\Atmel\AT91SAM7S\ARTX_Blinky which may help you to make the relevant adaptation.
I guess there is a missing source line in the OS_TIACK macro. It should look like below:
// Interrupt Ack
#define OS_TIACK() (ST_SR & 0x00000001) AIC_EOICR = 0xffff; //signal end of ISR
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.