Attachments are accessible only for community members.
Not applicable
Jan 06, 2014
07:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 06, 2014
07:43 AM
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.
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.
1 Reply
Not applicable
Jan 06, 2014
09:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 06, 2014
09:19 AM
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.
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.