LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rt fpga dma timeout not waiting

Solved!
Go to solution

Hello

I have a Target to Host DMA between. The read function sits in a while loop with a 2000ms timeout. Upon timeout it loops round and recalls the read function. On the second, and subsequent calls, it does not wait for the timeout time. I assume that this is because it was already itemed out. The error is wired to a shift register.

 

Does the timeout result in an error on the error line?

Is there a way to clear the timeout?

If i change it to an indefinite wait, is there a way to force the read to wake up?

 

Thanks

0 Kudos
Message 1 of 4
(2,314 Views)
Solution
Accepted by topic author jonnnnnnn

@jonnnnnnn wrote:

Hello

I have a Target to Host DMA between. The read function sits in a while loop with a 2000ms timeout. Upon timeout it loops round and recalls the read function. On the second, and subsequent calls, it does not wait for the timeout time. I assume that this is because it was already itemed out. The error is wired to a shift register.

 

Does the timeout result in an error on the error line?

Is there a way to clear the timeout?

If i change it to an indefinite wait, is there a way to force the read to wake up?

 

Thanks


Does the timeout result in an error on the error line? Yes, errro -54000 if memory serves correctly. Did you try highlighting execution to see this...

Is there a way to clear the timeout? Don't wire -1, I got burned by this. The DMA actually polls in the background (I think but I never verified) so a negative timeout can slam your processor. You can maybe try interrupts, although I didn't use this method I just threw a not-too-long timeout on there and cleared the error if it was -54000

If i change it to an indefinite wait, is there a way to force the read to wake up? The read will only return when data is there, unless you have a timeout.

 

0 Kudos
Message 2 of 4
(2,312 Views)

@jonnnnnnn wrote:
The error is wired to a shift register.

 

Does the timeout result in an error on the error line?


Why don't you probe the wire, or put an indicator on it, and find out?  If it does return an error, there's your problem.  You'll have that error in the shift register so on the second call that error will go into the DMA FIFO Read.  Since there's an incoming error, the read doesn't execute (standard behavior for most functions is to do nothing when there's an error) so it doesn't wait for the timeout.

0 Kudos
Message 3 of 4
(2,305 Views)

Thanks for the info.

After thought last night I was figuring that it might be an error condition causing it, but I didn' get time to check. I'll be able to check today. If it is I'll just clear that error out and/or stop or somwthing else.

 

0 Kudos
Message 4 of 4
(2,290 Views)