NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » SPI transfer delay
April 17, 2011 by Hexorg |
Hello, While trying to read some information from spi interface, I got puzzled... Here's my SPI function:
I've added uart output to trace the error better. And here's what UART says:
How is that possible? O_o I thought SPI just outputs the data, and as soon as the data is out, it sets that bit, well, apparently it doesn't >_< Sorry, i'm a little grumpy, was fishing for this error for past 13 hours... |
---|---|
April 18, 2011 by bretm |
Are you still having this problem? If the SPI interrupt is enabled (even if you didn't provide an ISR) it could clear the flag before you had a chance to look at it. That's all I can think of. |
April 18, 2011 by Hexorg |
I solved it. I guess I had a lot of noise in my circuit. I forgot to set SS pin as output, so I guess uC was becoming a slave at that point. |
Please log in to post a reply.
Did you know that first-order systems have a exponentially decaying response to step inputs? Learn more...
|