Hi all, The PRU LOOP instruction (p48 of the assembly instruction guide <https://www.ti.com/lit/ug/spruij2/spruij2.pdf>) describes a "hardware-assisted loop" instruction. If you use a register, your loop counter can be 16-bits wide, so with
LDI r10.w0, 0xffff LOOP Exit, r10.w0 ... (stuff in here runs 65535 times) ... Exit: ... (Now we're outside the loop) ... you have a maximum of 65535 repetitions. Very good. What happens though if you want three times that? Can you do LOOP Exit, 3 LDI r10.w0, 0xffff LOOP Exit, r10.w0 ... (stuff in here runs how many times?) ... Exit: ... (Now we're outside the loop) ... Based on the documentation, I could see this loop iterating 3 times, 65535 times, or 3*65535 times. Does anyone know what the truth is? There must be a limit somewhere, right? Otherwise I could loop 2^100 times by doing this: LOOP Exit, 2 LOOP Exit, 2 LOOP Exit, 2 ; now repeat the line above 97 more times ... (stuff in here runs how many times?) ... Exit: ... (Now we're outside the loop) ... and there's no way that works, right? There would need to be a hundred hidden loop counter registers somewhere inside the PRU... Bonus question: the manual tells us that "The loop is non-interruptible(LOOP)." What does non-interruptible mean---do interrupt bits in r31 never get set inside a loop? --Tom -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/0b7f2a1b-d560-4dcd-bb0a-b79b4834521en%40googlegroups.com.
