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.

AM5728: PRU share memory

Part Number: AM5728


Hi all,

因项目需求正在开发PRU,但PRU只有12KB的指令RAM,所以考虑将代码分到两个PRU单元处理。

上个贴解决了双PRU核之间,通过VDS200下载器,CCS裸机编程调试双核,因为这样的调试方式更为方便。

通过下载器直接烧录的方式开发了双核互相等待的功能(RxAck&TxAck定义在双PRU核的share memory):

PRU 0 ICSS1:

{

while(!RxAck);

RxAck = false;

...

TxAck = true;

}

----------------------------------------------------------------------------

PRU 1 ICSS1:

{

...

RxAck = true;

while(!TxAck );

TxAck = false;

}

通过上述的方式可以实现相互等待握手的功能

遂将CCS编译的两个.out文件通过内核烧写固件的功能烧写并启动:

# echo "PRU_0_ICSS_1.out" > /sys/class/remoteproc/remoteproc4/firmware

# echo "start" > /sys/class/remoteproc/remoteproc4/state

# echo "PRU_1_ICSS_1.out" > /sys/class/remoteproc/remoteproc6/firmware

# echo "start" > /sys/class/remoteproc/remoteproc6/state

发现问题:PRU_0_ICSS_1一直卡在等待while(!RxAck);,预示共享内存的数据存储是失败的!

PRU 0 ICSS1:

{

while(!RxAck);

RxAck = false;

...

TxAck = true;

}

引发疑问,是否与内核有关?如果建议,非常感谢!

 

Best regards,

Loading