Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8041

General • Re: Trouble with DMA timings <> PIO <> PSRAM latency

$
0
0
@dthacher so for you there is nothing to do on this hardware :( ?

@Tharre I know right... not to ignore the hotpotato but it's CircuitPython's functions, though they've got reasons to do it like this. Sadly refactoring external working code is both time consuming and risky so I'm sorry for that.
The reason the buffer is not on PSRAM is because I havn't pushed it (since it doesn't work). But here's how I declare it locally:

Code:

uint8_t __attribute__((section(".psram_bss"))) buffer[BUFF_SIZE];
@gmx I don't use direct mode. It gets corrupted (or at least unreadable) around ~8kb - so if I set the camera to output compressed jpg files small enough the dma actually works. Here's the PSRAM config I use https://github.com/fabYkun/picoOV5640/c ... ef3f1a535c
I'm not sure what direct mode vs XIP is about. Using direct mode means I can't write directly using pointers right ? So no DMA (unless there is a way to link it with XIP FIFO since I see there is a DREQ_XIP_STREAM), but maybe something like

Code:

while (rx_remaining && !pio_sm_is_rx_fifo_empty(self->pio, self->state_machine)) {     ? Put things into PSRAM's TX FIFO ?}
If you guys have any idea of a direction I could go towards it would be wonderful - it seems to me that it's too difficult to implement given my current understanding. At the same time it seems so trivial (from a dunning-kruger perspective) that I feel stupid not getting it to work... So yeah if for you streaming the data directly to the PSRAM is possible in any way shape or form on a PGA2350 tell me right away.

Statistics: Posted by fabY — Thu May 29, 2025 11:29 pm



Viewing all articles
Browse latest Browse all 8041

Trending Articles