Hello, first of all I saw 3 topic about Sn_SR reading problem but didn’t see the solution. I have the same problem Sn_SR is always 0. In the same time all communications is working.
I use STM Discovery board and HAL library to communicate via SPI using DMA. Baud Rate 1,5Mbits/s.
Trying solve the problem I make an experiment in witch I read (one after one without any other reading of writing via SPI):
- 4 registers starting from MR for socket 1 and receive 13 (Sock_init) at position number 4;
- 3 registers starting from CR for socket 1 and receive 13 (Sock_init) at position number 3;
In this 2 experiments at MISO line I saw 1,2,3 for fist 3 byte (address and command). - 2 registers starting from IR for socket 1 and receive 0 at position number 2;
- 1 registers starting from SR for socket 1 and receive 0 at position number 0;
And at MISO I saw 1, 0, 8 and 1,2,6 for first 3 byte for 1st and 2nd message. - 4 registers starting from MR for socket 1 and receive 13 (Sock_init) at position number 4;
- 3 registers starting from CR for socket 1 and receive 13 (Sock_init) at position number 3.
In this 2 experiments at MISO line I saw 1,2,3 for fist 3 byte (address and command) also.
So, as I understand if all is OK at MISO for first 3 byte will be 1,2,3 is it true? I have oscillograms of communication process if it is interesting I can post it.
And the second question could I read IR and SR register without reading CR register? And why it happens? As I understand it must be possible to read it.