Skip to content
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 MOSI, MISO pins are labelled as TX, RX #192

Closed
shreekumar3d opened this issue Oct 6, 2021 · 1 comment
Closed

SPI MOSI, MISO pins are labelled as TX, RX #192

shreekumar3d opened this issue Oct 6, 2021 · 1 comment
Labels
documentation Improvements or additions to documentation question Further information is requested rp2040 Concerning the RP2040 chip wontfix This will not be worked on

Comments

@shreekumar3d
Copy link

The pinout (Figure 2) shown in the Pico datasheet labels SPI pins as "SPI0/1 TX" and "SPI0/1 RX". In SPI terminology, pins are typically referred to as "SPI MOSI" and "SPI MISO". Can the Pico datasheet be corrected to follow this convention ? This should help reduce confusion & mistakes while connecting SPI devices to the Pico.

This may also help eliminate mistakes when connecting two RP2040s over SPI. With SPI pins labelled as RX/TX, folks who are familiar with UART may end up creating cross-connections (RX -> TX, and TX -> RX).

The RP2040 datasheet - given it's lower level nature - must use MOSI & MISO in the context of SPI. The following places would need corrections:

  1. Section 1.4.3, "GPIO functions"
  2. Section 2.19.2, "Function Select"
  3. Section 2.5.3.1, "System DREQ Table"

Similarly, the C SDK & documentation needs to be modified.

Note that all the PIO programs use the right conventions. So I found some of these deviations surprising in an otherwise admirable documentation effort.

@lurch lurch added documentation Improvements or additions to documentation question Further information is requested rp2040 Concerning the RP2040 chip labels Oct 6, 2021
@lurch
Copy link
Contributor

lurch commented Oct 6, 2021

I believe we use the TX / RX nomenclature because when the RP2040 is operating as a master SPI device, then TX is MOSI (Master Out) and RX is MISO; but when the RP2040 is operating as a slave SPI device, then TX is MISO (Slave Out) and RX is MOSI.
So yes, when you're connecting an RP2040 SPI master to an RP2040 SPI slave you would indeed cross-connect RX to TX and vice-versa. (although we don't have any SPI slave example code merged yet, see raspberrypi/pico-examples#101 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested rp2040 Concerning the RP2040 chip wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants