Any buffer can be fine tuned for cspi

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Any buffer can be fine tuned for cspi

1,130 次查看
stevenyu
Contributor III

Hi Support,

We found the performance of SPI interface is about TX 4.2Mbps, RX 3.6Mbps. Do you know any buffer in cspi that we can enlarge to see any improvement, especially RX path ?

Regards,

Steven Yu

标签 (1)
0 项奖励
回复
2 回复数

1,048 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Steven

for eCSPI module one can try to increase BURST_LENGTH parameter

in ECSPIx_CONREG register. For processors with M4 core one can assign

spi procedures to this core. In general spi performance will depend on processor

load and application.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

1,048 次查看
stevenyu
Contributor III

Thanks, igor!

We have seen this piece of code in static spi_imx_setupxfer, however, if we double the value, it will cause spi read data error. 

if (bits == 32) {
unsigned len = spi_imx->len / 4;

while (len > 128) {
if (len & 1)
break;
len >>= 1;
}
while (len > 128) {
if (len % 3)
break;
len /= 3;
}
if ((len > 128) || !len)
len = 1;
bits = len << 5;
}
ctrl |= (bits - 1) << MX51_ECSPI_CTRL_BL_OFFSET;

==> 

ctrl |= (2*(bits - 1)) << MX51_ECSPI_CTRL_BL_OFFSET;

Regards,

Steven Yu

0 项奖励
回复