piolib: Please add some method of unblocking DMA write
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- c
- Domain
- embedded-iot
Research direction
Start with the piolib implementations or documentation for pio_sm_config_xfer and pio_sm_xfer_data, then reproduce the 1 ms and random-gap behavior using the issue's transfer loops. Done means providing a documented, usable way to keep DMA writes supplied without gaps and explaining the final pio_sm_config_xfer argument, with validation of continuous output.
Written by the indexing model from the issue text.
Description
All I want to do is stream data without gaps but it doesn't seem possible on RP1 pio.
I set a large buffer:
#define BUF_SIZE 32768
uint8_t databuf[BUF_SIZE];
pio_sm_config_xfer(pio, sm, PIO_DIR_TO_SM, BUF_SIZE, 1);
while (1) {
pio_sm_xfer_data(pio, sm, PIO_DIR_TO_SM, sizeof(databuf), databuf);
sleep_ms(1); //simulate some calculation here
}
This works fine but the sleep_ms(1) inserts 1ms delay even though packet is 42ms long.
Doing:
while (1) {
pio_sm_xfer_data(pio, sm, PIO_DIR_TO_SM, sizeof(databuf), databuf);
}
In attempts to do continous data out, adds random blips of 100us and up to 5ms spacing.
Is there anyway around this eg automatic ring buffer or ping pong buffer? I don't understand what the last argument in pio_sm_config_xfer(pio, sm, PIO_DIR_TO_SM, BUF_SIZE, 1); does: different values doesn't seem to do anything -> any clues?
- Dominant language
- C
- Stars
- 346
- Forks
- 98
- 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/utils
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/utils#197 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
raspberrypi/utils#147 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
raspberrypi/utils#159 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
raspberrypi/utils#158 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
raspberrypi/utils#137 · 1 comment ·
All issues in raspberrypi/utils
Similar issues
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
hapostgres/pg_auto_failover#1190 ·
-
docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
P3 sonic-vpp
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sonic-net/sonic-buildimage#29662 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
spack/spack-packages#6586 ·