Hallo Dimitri,
sorry that i am responding so late, but the student who encountered this
interrupt-problem in his diploma work came back into the lab today.
He has tried to follow your suggestion - but didn’t succeed.
Here are the essential parts of the code he used:
///////////////////////////////////////////////////////////////////////////////////
// Resource Manager
//////////////////////////////////////////////////////////////////////////////////
volatile int counter = 0;
// thread for the interrupt service routine
void * dmmat_interrupt(void * data )
{
struct sigevent event;
event.sigev_notify = SIGEV_INTR;
InterruptAttachEvent(PPC800_INTR_IRQ3, &event, 0);
while(1)
{
// => the following output appears
printf(“waiting for IRQ %i\n”, PPC800_INTR_IRQ3);
InterruptWait(NULL,NULL) ;
counter++; // => counter never increments
InterruptUnmask(PPC800_INTR_IRQ3,id);
}
}
In the init_intrinfo()-routine he used for the startup-program there is
also a line (***) he is not sure about.
////////////////////////////////////////////////////////////////////////////////
// using startup-mbx800
// /usr/src/bsp-6.2.1/ppc/mbx800/src/hardware/startup/boards/mbx800
/////////////////////////////////////////////////////////////////////////////////
// init_intrinfo.c
void
init_intrinfo() {
/* Mask off all the interrupt sources /
PPC800_IMMR(SIMASK,32) = 0; // => is this initialisation
// correct (**) ?
// program CPIC
// PPC800_IMMR(CIMR, 32) = 0;
PPC800_IMMR(CICR, 32) &= ~PPC8CPM_CICR_IRLM;
PPC800_IMMR(CICR, 32) |= (PPC8CPM_CICR_IEN |
PPC8CPM_CICR_IRL(PPC8CPM_CICR_IRL_D));
add_interrupt_array(intrs, sizeof(intrs));
}
Thanks in advance
Bernhard
Dmitri Poustovalov schrieb:
What interrupt are you attaching to? All ISA interrupts are multiplexed
into IRQ3 on MBX860. Try to attach PPC800_INTR_IRQ3 and post here results.
Prof. Dr. B. Buchholz wrote:
Hello Everyone,
we are using the MBX860-board from Motorola with QNX Momentics PE 6.2.x
(for Education). We have to write a resource manager for a data-
acquisition board (Diamond MM-AT), which uses interrupts and sits on the
PC/104-bus.
On an x86-platform we were able to work with the boards interrupt by
using the calls to ThreadCtl(), mmap_device_io(),
InterruptAttachEvent(), InterruptWait(), and InterruptUnmask().
But on th MBX860-board we didn’t succeed to get an interrupt.
We suppose, that we have to do some initialization work in the
image startup program. (We are using the board support package for the
MBX860.) The information in the “Building Embedded Systems” document
was not not sufficient for us.
Does anyone have some hints or code-examples for our problem?
Thanks in advance
Bernhard Buchholz
TFH-Berlin, University of Applied Sciences
\