-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPI (fix): Adds SPI 3 to the ESP32-S2 and adds comments about it #9216
Conversation
👋 Hello SuGlider, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
While you're at it, can you perhaps also add (or link to) some info about how the naming schema for all FSPI/VSPI/HSPI is intended? If FSPI is always connected to the flash, then it would make sense to me. However it seems to be a bit random how it is used among ESP32-variants. |
I'm kinda leaning towards switching to a different way to identify the buses. Maybe by a custom ID (because otherwise they will have to start from 2), so |
Maybe it can even be extended to the peripheral manager to ask for a bus used for peripheral type X This removes the need to know about all platforms how they all use the SPI bus. |
This can't really work in Arduino. Such buses use multiple pins and so on. As sketch developer, it's your job to know which bus is used for which device. Sometimes this also needs to be defined on board level, when you have screen on a separate bus. Question is rather semantics. in ESP the SPI buses that are available to the users do not start from 0, which is confusing. It worked somewhat using names, but with more chips added, this also proves not perfect. Having all start from 0 would make it more intuitive and easier to handle. We could add name definitions for backward compatibility. |
I know asking for used pins isn't really in the scope of Arduino. |
We do provide the used pins from peripheral manager
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ESP32 has introduced the SPI names FSPI/VSPI/HSPI in the Technical Reference Manual at chapter 7 (page 125) about SPI. ESP32-S2 doesn't use these names. Just uses SPI0, SPI1, SPI2 and SPI3. ESP32-S2 TRM - Chapter 24 ESP32-S3 does the same as ESP32-S2 with SPI0, SPI1, GP-SPI2 and GP-SPI3. ESP32-H2, ESP32-C3 and ESP32-C6 have 3 SPI peripherals, but only GP-SPI2 is available for the users. Therefore the use of FSPI/VSPI/HSPI names is ESP32 legacy. |
@SuGlider Thanks, I will have another look at this list and try to find a proper way to represent the available SPI options in the ESPEasy UI. |
Description of Change
ESP32-S2 has 3 SPI buses available.
It fixes names and definitons in order to add the 3rd SPI to the list.
It also adds some commentaries in order to help users.
Tests scenarios
CI Only
Related links
Closes #9210