Hi,

I'm trying to send some data from ARM to the PRU for the PRU to execute 
upon it, but I'm having some issues where it tends to miss some of the data 
on the PRU, so I assume I am not synchronizing the interrupts properly, 
here is basically what I am doing:

C code:

for (i = 0; i < 10; i++) {
>  prussdrv_pru_write_memory(PRUSS0_PRU0_DATARAM, SHARED_MEMORY, (unsigned 
> int*)pkts[i], memSize);
>   //if I put a sleep here it generally works: usleep(500000);
>   //printf("sending intc...\n");
>   // here are the packets!
>   prussdrv_pru_send_event(ARM_PRU0_INTERRUPT);
>   // wait for PRU response
>   //printf("waiting intc...\n");
>   prussdrv_pru_wait_event (PRU_EVTOUT_0);
>   // clear PRU response
>   //printf("clr intc from PRU0...\n");
>   prussdrv_pru_clear_event (PRU_EVTOUT_0, PRU0_ARM_INTERRUPT);

 }

 PRU:

HANDLE_DATA:
>    // wait for interrupt
>    WBS r31, #30
>    // reset interrupt
>    LBCO    r20, CONST_IEP, 0x44, 4      // Load CMP_STATUS register
>    sbco rResetInterrupt, CONST_PRUSSINTC, SICR_OFFSET, 4
>    // handle data
>    MOV       R31.b0, PRU0_R31_VEC_VALID | PRU_EVTOUT_0
>    sub rCounter, rCounter, rCounter
>    qbne HANDLE_DATA, rCounter, 0


Kernel: Linux beaglebone 3.8.13-bone79 #1 SMP Tue Oct 13 20:44:55 UTC 2015 
armv7l GNU/Linux

Thanks!

-- 
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 beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6ea5fc62-1bee-44fd-b13a-56d39c773111%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to