Hi, referring to my original post, reading the S1SPSR value won't help since when the fault occurs the code will hang in the while loop and the results will not be not accessible.
Probing the SPI signals hasn't helped since the interface works fine for several hours, doing may thousands of successful writes and reads, and then mysteriously the SPIF flag fails to be set.
We have had products working perfectly with exactly the same software for over 6 years.
This problem has definitely been introduced with the revision /01 silicon.
In the /01 version an SSP interface was added, sharing the SPI1 pins.
Also SPI 16-bit transfer widths were introduced so the silicon has been changed.
To catch the error we have to leave units running overnight.
ALL /01 based units we have tried have shown the problem. None of the earlier suffix-less based units show the problem.
As we have customers screaming at us, I have now had to implement a software bit-banged interface for SPI1.
This is not ideal as there is a significant performance overhead.
PS: here are the read back values:
PCONP: 0x00001FBE (default reset value)
PINSEL0: 0x00055505 (using UART0, SPI0 and UART1)
PINSEL1: 0x000006A8 (using SPI1 and PWM5)