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.
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 :)
If it were buffered no collision would occur in the first place.
© 2021 Microchip Technology Inc.