Lpspi AsyncTransmit call takes long time

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lpspi AsyncTransmit call takes long time

Jump to solution
210 Views
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

 

Labels (1)
0 Kudos
Reply
1 Solution
167 Views
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

View solution in original post

0 Kudos
Reply
1 Reply
168 Views
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 Kudos
Reply