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.
Solved! Go to Solution.
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
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