i used the example from ( and changed it just a bit. I used TX_RX instead of RX only and made the transfer a loop so I could watch it on a scope. I also hooked MISO <-> MOSI so I should see the data in the rx_buffer. I don't The data is on the scope but is not in the buffer. Attached is the project,any suggestions of what I might be doing wrong. We HAVE to use SPI in a hardware project and if this doesn't work we will have to use another processor.
Isn't this behavior caused because the buffer is full? There's a thread that discusses how to clear the buffer. You can apply the same principle to try to clear the buffer. Take a look at /thread/103948 https://communities.intel.com/thread/103948 .
Let us know your results.
I am confused. I went to the specified document and found the UART stuff. Does this apply to SPI ? In any case am I supposed to call qm_uart_read_non_block() and if so how many times ? Read till it returns EOF or something ?
The enclosed project according to the original poster was supposed to work (he said it worked with the 2MHz clock but not higher. Could you try the project on a D2000 all you have to do is jumper MOSI <-> MISO and it should work but doesn't.
I can see you opened a service ticket and managed to resolve this issue. We encourage you to share your results with the community and if you have questions don't hesitate to contact us again. We'd be happy to assist you.