SPI write collision

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Anyone knows what happens to the transferred SPI data in a situation resulting in WCOL bit being set? Is the SPDR protected from the write access or will the shift register get corrupted? Thanks.

Mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think the data is buffered so that writing SPDR writes into a buffer instead of directly writing into the shift register. This is how it is able to detect the collision, I think.

But I think you should avoid situations where you get the WCOL bit set. Don't write SPDR twice :)

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If it were buffered no collision would occur in the first place.