Skip to main content
T YX
Associate
July 4, 2017
Question

SPI CPOL takes effect only after SPE is set

  • July 4, 2017
  • 1 reply
  • 774 views
Posted on July 04, 2017 at 05:25

I understand that CPOL takes effect only after SPE is set. But when I talks with AD7606, I need to have CPOL high at idle, and one line only(either BIDIMODE=0 or BIDIMODE=1) for receiving. In this mode, SPE can only be set after NSS is pulled low and that's when the receiving can start. Well now I cannot have SCK high before NSS low and that makes the timing wrong.

Yes I can utilize the full duplex mode and always have SPE set, which makes correct timing. But the transmit line is wasted this way because it's not needed.

Is there a perfect way to talk with this kind of device, which requires SCK high at idle and only a receiving line is used?

Thanks.

    This topic has been closed for replies.

    1 reply

    waclawek.jan
    Super User
    July 5, 2017
    Posted on July 06, 2017 at 00:22

    But the transmit line is wasted this way because it's not needed.

    Which STM32? On anything but the F1 you don't need to actually assign any AF to MOSI.

    JW

    T YX
    T YXAuthor
    Associate
    July 8, 2017
    Posted on July 08, 2017 at 11:44

    Thanks for replying.

    Yes I'm using F101.