[QUESTION] How to deal with RP2040-E4
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- embedded-iot
Research direction
Review the RP2040-E4 errata descriptions and the stated workaround, then compare them with the proposed EP1_OUT example. Confirm whether the explanation accurately describes BUFF_STATUS, BUFF_CPU_SHOULD_HANDLE, and the single-buffered read behavior; done means providing a clear, authoritative clarification.
Written by the indexing model from the issue text.
Description
When double-buffering isn't needed for USB Host support, then the RP2040-E4 errata issue arises where:
The USB host controller has a bug (RP2040-E4) that means the status written back to the buffer control register can appear in the wrong half of the register. Bits 0-15 are for buffer 0, and bits 16-31 are for buffer 1. The host controller has a buffer selector that is flipped after each transfer is complete. This buffer selector is incorrectly used when writing status information back to the buffer control register even in single buffered mode. The buffer selector is not used when reading the buffer control register. The implication of this is that host software needs to keep track of the buffer selector and shift the buffer control register to the right by 16 bits if the buffer selector is 1.
Another description in the datasheet says:
The USB host maintains a buffer selector which switches between BUF0 and BUF1. This should only be toggled in double buffered mode but is toggled in single buffered mode too. For a transaction lasting multiple packets (i.e. length more than 8 bytes in low speed mode, and length more than 64 bytes in full speed mode), the buffer status can be written back to the BUF1 half of the status register when the buffer select is incorrectly set to BUF1. Note this does not affect reading new buffer information from the buffer control register, as the controller ignores the buffer selector in single buffered mode when reading the buffer control register.
And, the workaround is stated as:
Shift endpoint control register to the right by 16 bits if the buffer selector is BUF1. You can use BUFF_CPU_SHOULD_HANDLE find the value of the buffer selector when the buffer was marked as done.
Even with the above, which I'm sure was not easy to discover nor document, I'm still not 100% certain on the problem or the workaround. Is this basically saying:
The USB controller can incorrectly write to the upper half (bits 16-31) of the buffer control register, even in single-buffered mode. To work around this issue, suppose bit 3 of BUFF_STATUS has been set, indicating that the buffer for the EP1_OUT endpoint needs attention. When reading the buffer control register for this endpoint, you would shift its value 16 bits to the right if bit 3 of BUFF_CPU_SHOULD_HANDLE is set.
Is this description correct?
- Dominant language
- No language data
- Stars
- 35
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
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.
More from raspberrypi/pico-feedback
-
documentation hardware pdf
Difficulty 1/5 Under an hour Newbie friendliness 92/100
raspberrypi/pico-feedback#503 ·
-
documentation pdf
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
raspberrypi/pico-feedback#485 ·
-
documentation rp2350
Difficulty 1/5 Under an hour Newbie friendliness 88/100
raspberrypi/pico-feedback#478 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
raspberrypi/pico-feedback#390 ·
-
documentation pdf rp2040 rp2350
raspberrypi/pico-feedback#501 · 1 comment · 1 assignee ·
All issues in raspberrypi/pico-feedback
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
espressif/esp-iot-solution#786 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100