[prev in list] [next in list] [prev in thread] [next in thread]
List: uclinux-dev
Subject: [uClinux-dev] continuously interrupt in 50ms
From: "Hua zhang" <zhanghua () megabyte ! com ! cn>
Date: 2002-11-28 2:10:41
[Download RAW message or body]
[Attachment #2 (text/plain)]
Hi all:
When implement the read() function of the device driver, I need to use interrupt \
continuously for about 50ms. I use a sensor to shoot the image, when it starts to \
shoot, it will generate a low to high DS signal when gets one byte data. I connect \
this signal to one external interrupt, and hope to use the external interrupt to get \
the image. In this 50ms peried, I first close uClinux's task schedule by disable one \
timer interrupt, and then hope the cpu doesn't deal with any other task except to \
response to the interrupts(about 352*288 times in 50ms). The external interrupt can \
only get part of the DS signal. I don't know how to make the cpu idle. I tried \
udelay() function, then the system seems die.
I have tried to use
save_flags();cli();
.......
sti();
to get the image data. In the get image function, I need to get the state when the \
DS changes from low to high, and it wastes a lot of cpu time, and I can only get the \
whole image data when the sensor's frequence is low. Now I have to get the sensor \
image with higher frequence.
Any idea?
Thanks!
Hua.
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="MSHTML 5.00.3315.2870" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#d4d0c8>
<DIV><FONT size=2>Hi all:</FONT></DIV>
<DIV><FONT size=2> </FONT></DIV>
<DIV><FONT size=2> When implement the read() function of the
device driver, I need to use interrupt continuously for about 50ms. I use a
sensor to shoot the image, when it starts to shoot, it will generate a low to
high DS signal when gets one byte data. I connect this signal to one external
interrupt, and hope to use the external interrupt to get the image. In this 50ms
peried, I first close uClinux's task schedule by disable one timer interrupt,
and then hope the cpu doesn't deal with any other task except to response to the
interrupts(about 352*288 times in 50ms). The external
interrupt can only get part of the DS signal. I don't know
how to make the cpu idle. I tried udelay() function, then the system seems
die. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> I have tried to use </FONT></DIV>
<DIV><FONT size=2>
save_flags();cli();</FONT></DIV>
<DIV><FONT size=2> .......</FONT></DIV>
<DIV><FONT size=2> sti();</FONT></DIV>
<DIV><FONT size=2> to get the image data. In the get image function, I
need to get the state when the DS changes from low to high, and it wastes a lot
of cpu time, and I can only get the whole image data when the sensor's
frequence is low.</FONT> <FONT size=2>Now I have to get the sensor
image with higher frequence.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Any idea?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Thanks!</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Hua.</FONT></DIV>
<DIV> </DIV></BODY></HTML>
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic