RP2 SPI oddness with default pins. I'm foxed. #11074
Replies: 4 comments 24 replies
-
|
@peterhinch The code configures the GPIO mode to GPIO_FUNC_SPI, but nothing besides that. Your example with specifying the pins performs additional configuration. Since you see signals at the LA, it would be interesting if the difference is only related to the miso pin. Could you try to run both variants, but only specify miso? |
Beta Was this translation helpful? Give feedback.
-
|
I re-tested the three variants as follows
Testing was done by power cycling the system: the above behaviour seems consistent. |
Beta Was this translation helpful? Give feedback.
-
|
So that is the state now of the port_spi branch in my copy of the repository:
|
Beta Was this translation helpful? Give feedback.
-
|
fwiw, it doesn't look like pin 28 is the default for SPI(1): |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have encountered this at least twice but have failed to produce a simple repro. If a hard SPI interface is instantiated with (e.g)
the interface works, in that signals appear on the expected pins, but the application behaves erratically. By contrast this is reliable:
I encountered this with the NRF24l02 - see code comment - and also with a display driver. The display application would run under some circumstances but not others, e.g. worked on USB connection to PC but not when launched on power up by
main.py. At one point it worked on USB but only if I ranrshellfirst. None of the symptoms made any sense until I remembered the NRF24l01.The odd thing is that, in the failing state, a scope or LA shows perfect signals on the pins.
The workround is obvious: always specify pins. But it would be good to know what is going on...
Beta Was this translation helpful? Give feedback.
All reactions