[ESP32-P4] PARLIO TX: Missing callbacks when transitioning between Loop and Non-Loop modes + Custom DMA callback inquiry

amitrs
Posts: 8
Joined: Mon Jan 26, 2026 7:40 am

[ESP32-P4] PARLIO TX: Missing callbacks when transitioning between Loop and Non-Loop modes + Custom DMA callback inquiry

Postby amitrs » Fri May 29, 2026 2:48 pm

Hi ,

I am working with the ESP32-P4 PARLIO peripheral, while i face an issue with not receiving memory used data in cb i also now am running into an edge case regarding callbacks when mixing loop and single-shot transmissions.

The Issue:
If I start a transmission in "loop mode" and later try to queue non-loop data, the parlio_tx_done_cb never fires for the finite data. Vice versa, if I start with non-loop data and then queue looping data, the on_buffer_switched callback stops triggering. It seems that seamlessly transitioning between these two states on the fly breaks the callback logic unless I explicitly call parlio_tx_unit_stop() between them.

I suspect this comes down to how the underlying GDMA controller handles DMA descriptors. My assumption is that "loop mode" creates a circular linked list of DMA descriptors (meaning it never natively hits an EOF/End of Frame), while "non-loop mode" creates a linear list ending with an EOF flag. Dynamically appending a linear descriptor to a running circular list (or vice versa) via parlio_tx_unit_transmit seems to confuse the driver's interrupt state machine.

My Questions:

Is my understanding of the internal DMA descriptor linked list correct? Does the PARLIO driver rely on circular vs. linear descriptors under the hood to achieve this?

Can I implement a custom DMA callback? If it does use standard DMA descriptors, is there a way to hook into the underlying GDMA driver to register a custom callback directly to the DMA EOF (End of Frame) interrupt?

Ideally, I would like to manually manipulate the descriptor links or catch the raw hardware interrupts to achieve a seamless transition between looping and finite data without having to completely halt the PARLIO TX unit or use multiple of buffers to manage it all

Any insights into the lower-level GDMA implementation or workarounds would be greatly appreciated. Thanks!

Who is online

Users browsing this forum: Applebot, ChatGPT-User, Google [Bot] and 5 guests