Skip to content

Separating CS from lpspi #131

Discussion options

You must be logged in to vote

It sounds like the Lpspi::without_pins() constructor would help. This gives us the driver handle, but it doesn't configure any pins. The caller is responsible for setting up the pins. There's more information here.

The BSP lets us write this, but we have to ignore the board APIs. e985b7f shows how to rewrite the blocking_spi_loopback.rs example to create an LPSPI4 driver without the four required pins.


For full transparency: I've never personally tested the "drive chip select with a GPIO" approach. Additionally, there's an LPSPI command queue, and writes block until there's space in the queue. Writes can return early before data is actually sent out. Keep this in mind when changing GPIO …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ameliamariecollins
Comment options

@mciantyre
Comment options

Answer selected by ameliamariecollins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants