| ??? 11/16/07 00:18 Modified: 11/16/07 02:08 Read: times |
#147043 - Question about SPI interrupts |
I have a SiLabs C8051F41x.
When I receive a SPIF interrupt, can I read from SPI0DAT, then write to it right afterwards? Should I check TXBMT? It seems redundant to do so. I'm missing bytes on the receive side of the SPI transmit from my module, so I was hoping some of you can lend me a clue here. Thanks!
interrupt()
{
if (SPIF)
{
rx = SPI0DAT;
[...do things depending on rx's value...]
SPI0DAT = my_data;
SPIF = 0;
}
... (clear WCOL, MODF, and RXOVRN if needed)
}
|
| Topic | Author | Date |
| Question about SPI interrupts | 01/01/70 00:00 | |
| Is it a SPI slave? | 01/01/70 00:00 | |
RXOVRN | 01/01/70 00:00 |



