SPI very slow

jollytopper
Posts: 30
Joined: Mon Sep 17, 2018 6:39 am

SPI very slow

Postby jollytopper » Mon Mar 25, 2019 2:28 am

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?

jollytopper
Posts: 30
Joined: Mon Sep 17, 2018 6:39 am

Re: SPI very slow

Postby jollytopper » Mon Mar 25, 2019 3:18 am

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?

ESP_michael
Posts: 37
Joined: Mon Aug 28, 2017 10:25 am

Re: SPI very slow

Postby ESP_michael » Mon Mar 25, 2019 11:20 am

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).

jollytopper
Posts: 30
Joined: Mon Sep 17, 2018 6:39 am

Re: SPI very slow

Postby jollytopper » Thu May 30, 2019 2:45 am

I have found that the problem was I was outputting many ESP_LOG statements over UART, thus causing delay.

jollytopper
Posts: 30
Joined: Mon Sep 17, 2018 6:39 am

Re: SPI very slow

Postby jollytopper » Thu May 30, 2019 2:49 am

I have found that the problem was I was outputting many ESP_LOG statements over UART, thus causing delay.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: SPI very slow

Postby Ritesh » Sat Jun 01, 2019 10:55 am

Hi,

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

jollytopper
Posts: 30
Joined: Mon Sep 17, 2018 6:39 am

Re: SPI very slow

Postby jollytopper » Mon Jun 03, 2019 1:56 am

Yes. Speed improved significantly after removing log statements.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: SPI very slow

Postby Ritesh » Mon Jun 03, 2019 8:24 am

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

Who is online

Users browsing this forum: Bing [Bot] and 276 guests