Page 2 of 2

Re: SPI slave mode (example)

Posted: Fri Dec 01, 2017 9:15 am
by AAAwen
Dear all,

The new ESP-IDF which updated last week work this sample very well. :P

But, how much frequancy does the spi-slave reach? thanks.






Re: SPI slave mode (example)

Posted: Sat Dec 02, 2017 9:47 am
by ESP_Sprite
If you use random pins, the speed can go up to 20MHz (absolute max) if the signals are well-formed (50% duty cycle, clean edges etc) although a max of 10MHz may be better to keep in mind if you're not sure about the well-formed-ness. If you use the dedicated pins for the SPI peripheral you select, you can get up to 40MHz (again, absolute max) with well-formed signals and 20MHz for random signals.

Re: SPI slave mode (example)

Posted: Mon Dec 04, 2017 2:03 am
by AAAwen
Hi! ESP_Sprite,

Thanks for your reply.

I used the spi-slave sample upon two esp32-kit.
When I raise the sender's speed(ex. .clock_speed_hz=10000000), I receive messy message.
When I reduce the speed to 8MHz(.clock_speed_hz=8000000), it work well.
What's wrong with the spi-slave? Thank you!

当我把发送端速度调到10M( .clock_speed_hz=10000000),收到的都是乱码;

Re: SPI slave mode (example)

Posted: Mon Dec 04, 2017 8:19 am
by ESP_Sprite
Hard to say from wording like 'very messy'. Can you be more specific; what exactly do you send, what exactly do you receive? Do you have an oscilloscope trace of the signals on the line?

Re: SPI slave mode (example)

Posted: Thu Dec 14, 2017 5:32 am
by AAAwen

When I set .clock_speed_hz=8000000, the spi work well.
spi-slave 8M
esp32-spi-8M.png (121.58 KiB) Viewed 3440 times
But, when I set .clock_speed_hz=10000000, I receive wrong data as follow.
spi-slave 10M
esp32-spi-10M.png (143.91 KiB) Viewed 3440 times

Re: SPI slave mode (example)

Posted: Thu Dec 14, 2017 9:04 am
by ESP_Sprite
Any chance you can connect an oscilloscope to your signal lines? I'm thinking that stray capacitance or something may mess up your clock signal.

Re: SPI slave mode (example)

Posted: Fri Dec 22, 2017 3:27 am
by venkateshmunna
LakshmiDhanaraj wrote:Hi,

I am using the SPI slaver driver example,sender as master and receiver as slave.I can able to transmit/receive data without dma.But it restricts the number of bytes to 32.For transmitting more than 32bytes,I am enabling the dma to 1,won't receive/transmits the data.Please help me out to solve this issue.What I have to change in the code for transmitting more than 32 bytes?

Can you please send the code, I am struggling with code.