Page 1 of 1

Beginner's question about the AVRcam Embedded software.

PostPosted: Thu Nov 17, 2005 6:42 am
by Sung Ho Kim
I am a korean mobile engineer.
First of all, thanks for your opening the good source.
In researching the camera sensor data, I met your AVRCAM project.
Your AVRCAM project is very interesting and I am studying
the AVRcam Embedded software.

Can I ask a question about the AVRcam Embedded software?
I can not understant below.

void Exec_run(void)
{
unsigned char eventGenerated;

while(1)
{
if (fastEventBitmask)
{
... [ROUTE1]
}
else if (IS_DATA_IN_EVENT_FIFO() == TRUE)
{
... [ROUTE2]
}
}
}


unsigned char fastEventBitmask = 0x00;
and
IS_DATA_IN_EVENT_FIFO() is not TUUE

So [ROUTE1] and [ROUTE2] is can not executed.

Yes! Of course this varable and function's return value must be changed
before Exec_run() reached.

But I can not find there.

the function executed before Exec_run() is these:
DebugInt_init(), UartInt_init(), I2CInt_init(), CamInt_init()
ENABLE_INTS(), CamConfig_init(), UIMgr_init(), FrameMgr_init()
Utility_delay(1000).

They are not touch the varables(fastEventBitmask, Exec_eventFifoHead, Exec_eventFifoTail).

Please can you help me?

Best regard!.

PostPosted: Sat Nov 19, 2005 3:51 pm
by Guest
Why do you think that fastEventBitmask or IS_DATA_IN_EVENT_FIFO() need to be asserted before the Exec_run() call? They typically aren't. The main key here is the fact that they are contained within the magic line:

while(1)
{
...
}

Thus, in the case where there are no events to be processed, the while(1) loop continues on forever, constantly checking to see if new events have been generated (they are typically generated from interrupt service routines).

Does this make sense? If not, post back and I can go in to more details.

PostPosted: Sat Nov 19, 2005 5:30 pm
by jnugen
Hello,

I think the original poster wanted to know where the two variables were set or modified:

'fastEventBitmask' is modified in CamInterfaceAsm.s
'IS_DATA_IN_EVENT_FIFO()' is a macro defined in Executive.c

Hope this helps,
James Nugen

Thanks for your teaching!.

PostPosted: Sun Nov 20, 2005 6:30 pm
by Sung Ho Kim
Hi.
I am very glad to know the fack that Interrupt service route change the
'fastEventBitmask' in CamInterfaceAsm.s

I am novice in AVR Interrupt service route, more over written in assembly.

It must be very difficult work to make this firmware program.

Again. I am really appreciative of your teaching.

Best regard form Korea.

Sung Ho Kim.