Page 1 of 1

SPI very slow

Posted: Mon Mar 25, 2019 2:28 am
by jollytopper
I'm making consecutive calls to one device using polling transactions. I have acquired the bus in initialization. My transactions are relatively short and usually come in chunks of 10 (10 polling transactions).

I find that the speed is still not satisfactory. How can I improve this?

Re: SPI very slow

Posted: Mon Mar 25, 2019 3:18 am
by jollytopper
Specifically, by logging a time value I'm reading that each polling transaction takes around 3 ms. Should it not be much quicker? <100 us?

Re: SPI very slow

Posted: Mon Mar 25, 2019 11:20 am
by ESP_michael
Hi jollytopper,
What's your clock speed?
Can you provide a piece of simple code for us to test it? From our internal test, one-byte transaction should only take 8us (at 10MHz).

Re: SPI very slow

Posted: Thu May 30, 2019 2:45 am
by jollytopper
I have found that the problem was I was outputting many ESP_LOG statements over UART, thus causing delay.

Re: SPI very slow

Posted: Thu May 30, 2019 2:49 am
by jollytopper
I have found that the problem was I was outputting many ESP_LOG statements over UART, thus causing delay.

Re: SPI very slow

Posted: Sat Jun 01, 2019 10:55 am
by Ritesh
Hi,

So, After reducing logs dis you get improvement into SPI Speed?

Re: SPI very slow

Posted: Mon Jun 03, 2019 1:56 am
by jollytopper
Yes. Speed improved significantly after removing log statements.

Re: SPI very slow

Posted: Mon Jun 03, 2019 8:24 am
by Ritesh
jollytopper wrote:
Mon Jun 03, 2019 1:56 am
Yes. Speed improved significantly after removing log statements.
Great. Thanks for update regarding same.