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.

AM5729: PRU broadside transfer data between PRUs with xin & xout without using struct

Part Number: AM5729

Hi all,

There is an example (direct connect) in the PRU software support package.

It shows using __xin and __xout to transfer data between 2 PRUs.

This is similar to this previous question:

e2e.ti.com/.../1858859

While there is the options of using RAM (which I've not looked into yet), I would like to try this method out.

The given example uses a struct with 6 variables .  The TRM (page 7391) and C/C++ compiler user guide (page 93) discuss these commands.

One is supposed to use a device (14 for transfer between 2 cores, other values are scratch pad banks etc), a "base register", such as 5 in the example, and ending with the address pointer to value(s) to be transferred.

This only seems to work with a struct, such as in the example, but not other types of pointers to the data, or array.

Why is this?  I can send the address of the data I want to transfer as the compiler refuses wanting an "lvalue".

If I make another variable which is a pointer, it accepts it, or if I just pass the variable directly (not it's address).

After that, I definitely know that you have to synchronise your __xout and __xin functions like with an interrupt so they are called within 1024 cycles, and it seem that during that time, xin is actually waiting for xout, or also the other way.

Thanks,

Fisher