Lpspi AsyncTransmit call takes long time

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Lpspi AsyncTransmit call takes long time

ソリューションへジャンプ
1,254件の閲覧回数
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,211件の閲覧回数
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,212件の閲覧回数
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 件の賞賛
返信