器件型号: AM6442
我正在开发一个需要 PRU 读取 DRAM0 的应用、但我需要确切知道 LBBO 指令需要多少个周期;每次都需要多少个周期。
为此、我需要确保如果有任何其他内核正在写入 DRAM0、PRU 将始终在仲裁中胜出、从而使时钟周期数保持不变。
在 这篇 E2E 文章中、PRU 工程师提到了一种方法、可确保 PRU 在每次尝试读取 DRAM0 时赢得仲裁。
"If you want to completely avoid arbitration delay, you could program the non-PRU core to perform multiple 4 Byte writes instead of a single long write. In that case, the PRU would win arbitration every clock cycle it initiates a read. “
根据我的理解、如果 R5F 正在使用以下 API 写入 DRAM、那么由于每次单独写入的值小于 4 字节、每当 PRU 尝试读取 DRAM 时、它就将赢得仲裁。
我了解仲裁胜出意味着 R5F 将在四字节写入期间暂停、PRU 将读取存储器、然后 R5F 将完成写入调用中的剩余字节?
R5F API 调用: HW_WR_REG16(0x30000000 +偏移,值);