Replies: 6 comments 6 replies
-
SoftSPI is, what it says: SPI implemented in software. Given that the CPU runs at 160MHz, you cannot expect a 40MHz baudrate. And generally for SPI the baud rates cannot be precise. Did you try the same with hardware SPI? The SPI hardware is clocked from a 160MHz clock, AFAIK. There, 40Mhz or even 80Mhz are accepted as input value. |
Beta Was this translation helpful? Give feedback.
-
@robert-hh Yes I have tried normal SPI also, makes no difference And micropython also just says:
|
Beta Was this translation helpful? Give feedback.
-
SPI(-1. ...) was used to denote SoftSPI. So with SPI(-1, ...) you still got SoftSPI. For hard SPI, use e.g. SPI(0, ....) or SPI(1, .....). And I checked with the oscilloscope, that with hard SPI SCK is indeed 40Mhz, if selected. |
Beta Was this translation helpful? Give feedback.
-
@robert-hh What ID should I use in micropython for SPI pins 11-13 |
Beta Was this translation helpful? Give feedback.
-
That's SPI(0). If you write:
it will show you which pins are used. |
Beta Was this translation helpful? Give feedback.
-
@robert-hh So I tried the suggestion but get this error?
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using this code on an esp32s3
Outputs:
As you can see 800_000 != 40_000_000
When I use a value < 800_000. For example 200_000.
Conclusion: Micropython is limiting the ESP32S3 to a baud rate of 800_000
All help is much appreciated, thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions