Beginner's question about the AVRcam Embedded software.

This forum is used for discussing hardware, software, and technical details of the AVRcam embedded system.

Beginner's question about the AVRcam Embedded software.

Postby Sung Ho Kim » Thu Nov 17, 2005 6:42 am

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!.
Sung Ho Kim
 

Postby Guest » Sat Nov 19, 2005 3:51 pm

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.
Guest
 

Postby jnugen » Sat Nov 19, 2005 5:30 pm

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
jnugen
 
Posts: 1
Joined: Sat Nov 19, 2005 5:14 pm

Thanks for your teaching!.

Postby Sung Ho Kim » Sun Nov 20, 2005 6:30 pm

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.
Sung Ho Kim
 


Return to AVRcam Embedded System

Who is online

Users browsing this forum: No registered users and 22 guests

cron