Lpspi AsyncTransmit call takes long time

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

Lpspi AsyncTransmit call takes long time

跳至解决方案
1,272 次查看
sstelmak
Contributor III

I configured RTD 4.0.0 Lpspi to send stream of bytes and several CS by a single call Lpspi_Ip_AsyncTransmit, using DMA.  All SPI activities get performed by hw, however I noticed that Lpspi_Ip_AsyncTransmit call itself takes 36/41uS depending on DEV ERROR detection off or on.

I need to schedule SPI every 300uS. It means that this single call takes 12% of the entire throughput of the micro running at 160MHz. This looks very inefficient. 

Is there a possibility to optimize Lpspi performance?

Here is scope screenshot. Channel 3 shows a signal from DIO_SetPins/ClearPins that surround Lpspi_Ip_AsyncTransmit call.

sstelmak_2-1720032188660.jpeg

 

标签 (1)
0 项奖励
回复
1 解答
1,229 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @sstelmak,

There is a Quality package for the RTD driver that specify the execution time of the APIs in the profile report.

Such overhead should be expected though. If the code is in cacheable memory, this can reduce the overhead slightly.

Compiler optimization should be set exactly as per the RTD release note.

 

Regards,

Daniel

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,230 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @sstelmak,

There is a Quality package for the RTD driver that specify the execution time of the APIs in the profile report.

Such overhead should be expected though. If the code is in cacheable memory, this can reduce the overhead slightly.

Compiler optimization should be set exactly as per the RTD release note.

 

Regards,

Daniel

0 项奖励
回复