Skip to content

Shared SPI bus between devices with different SPI modes #608

Open
@dan-corneanu

Description

@dan-corneanu

I have a small board that has 2 devices attached to the same SPI bus

  • AD9833 DDS that uses SPI MODE 2
  • MCP41010 Digital Potentiometer that can use SPI MODE 0 or MODE 3

Each device has its own CS pin.

I am using the following two drivers

The problem that I am facing is that my program can only communicate with one of the devices because
the SpiDevice can not change the mode of the SpiBus.

I think this design decision was discussed back in 2022 in this comment #351 (comment).

Could you please advise on how I could address this problem in my code?

If interested in the code of my application you can have a look at this branch https://github.com/dan-corneanu/ad983x_signal_generator/tree/features/configure_ushell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions