Multibyte frame SPI receive interrupts missing.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Not applicable
I'm trying to send multibyte SPI frames and capture the corresponding received bytes. Attempting to do so for 1, 2, or 3 byte frames works, in that I get 1, 2, 3 receive indication interrupts. But when I try to send/receive 4 bytes (or more) I only get 3 interrupts.

I've attached a sample project (just re-generate the DAVE code and re-build the project).

The project as-is is setup for a 4-byte test. When run, it hangs in MBF_SPI_XmtRcv() at line 84 waiting for spiRcvDataCount to reach 4 -- but it's stuck at 3.

If I change TEST_FRAME_LENGTH in Main.c to 3, and re-configure SPI001_0 for a Frame Length of 24, it works. The program continues to run, repeatedly sending/receiving 3-byte frames.

Is there something I'm doing wrong or not understanding about this? Has anyone seen this behavior? Or has anyone gotten it to work successfully?

Thanks.
0 Likes
1 Reply
Not applicable
Solved, I think.

Just after posting, it struck me that maybe the FIFOs were overflowing. So I increased the size of both to 8. Now I'm getting all the interrupts I expect.

Thanks.
0 Likes