SPI multi byte transfer hangs in endless loop, when FIFOs are disabled
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.2k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Dear Xilinx,
in xspi.c line 763:
DataLen = (InstancePtr->RemainingBytes > InstancePtr->FifosDepth) ? InstancePtr->FifosDepth : InstancePtr->RemainingBytes;
This code alway returns 0, when there are still bytes to send, but the FIFOs are disabled (in hardware).
As a quick fix I changed the code to:
if ((InstancePtr->RemainingBytes > InstancePtr->FifosDepth) && (InstancePtr->FifosDepth != 0)) {
DataLen = InstancePtr->FifosDepth;
}
else {
DataLen =InstancePtr->RemainingBytes;
}
Best regards,
kmikl
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in xspi.c around line 763 and trace the multi-byte transfer path when FIFOs are disabled. Verify that the transfer progresses when FIFO depth is zero, while the existing FIFO-enabled behavior remains correct, and confirm that the loop completes for data larger than one byte.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100