Hi Sulyn, My apologies for the delay in getting a solution to the issue. There was no EVM - so I had to make a small board to test it out. I was able to reproduce the problem. As you had mentioned, I also noticed that the SPI pattern takes effect only when fired twice. After some debugging, i came to the following conclusion: 1. When the SPI Mode is 1 i.e. CPOL = 0 and CPHA = 1, the SPI frame needs to be written twice. As per the timing diagram of the datasheet, this should not happen. But I don't have an explanation at the moment, as this is an old part 2. When the SPI Mode is 2 i.e. CPOL = 1 and CPHA = 0, the SPI frame works at the first instance If you have a mechanism in your controller, you can use SPI mode 2 or else you need to implement the workaround of writing twice for each frame. Sorry for the inconvenience. Hope that resolves your issue. Please let me know if you have further questions. Regards, Uttam
↧