This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x PRU: GPI to GPO response time

Hey there,

I'm trying to make a simple PRU application there is reading an enhanced GPIO input and immidiatly sendt that value to an enhanced GPIO output. So here is what i came up with:

// INPUT	= P9_29	= r31.t1
// OUTPUT	= P9_30	= r30.t2

READ:
	qbbs	WRITEHIGH, r31, 1
	qbbc	WRITELOW, r31, 1

WRITEHIGH:
	set	r30.t2
	jmp READ

WRITELOW:
	clr r30.t2
	jmp READ

So the application quick branches to a write state after having read the input bit where it writes the output bit and jumps back to start over.

It works fairly fine, but when I measure the input and output with a oscilloscope, I get the delay to ~35ns, which corresponds to ~7 cycles at 200MHz. 

How come 35ns.!??

I read some where that the quick branches, and the jump took one cycle. If that's true i get the fastest case to 3 cycles (15ns) and the slow case to 4 cycles (20 ns). Maybe I'm wrong about branch and jump assumption, if so, does someone know or have the documentation for the cycle count for these instructions?

Does anyone know a faster way to do this data loopback?