[Suzaku-en:00507] Re: Interrupts help .. bufer
Fri Nov 30 20:37:37 JST 2007
At Thu, 22 Nov 2007 09:46:31 -0400,
Alberto Perasic wrote:
> >please help us to help you; tell us what exactly your problem is.
> Well, my problem is how I fill a big buffer, lets say 2048 bytes
> in a automatic way using uartlite. As i see uartlite have a 16 characters
> tx-rx fifo, that is to small for me.
by "automatic", do you mean by interrupt handler?
> I think i got two options... polling the status register of uartlite
> to tell when read , and the other
> way using interrupts. The first option may lost data if i not get the
> characters in the
> rxfifo to the aplication in time... and the second option is little
> hard to implement.
and a standard way to do is using an interrupt.
> ¿ Which will be the best way to implement a large buffer to contain
> data temporarily ?
so, I'd suggest with interrupts.
if you are a fpga enginner, I'd suggest creating a periodic timer
input to an interrupt controller, and write a interrupt handler for
it. the handler might just prints some word, so that you can feel
that your code is working.
linux already have pretty eash framework for interrupt handler. so
it's just writing a function, which is the actual handler, then pass
the function to request_irq().
hope this helps,
More information about the suzaku-en