Output >1MByte Buffer continuously from SPI-Buffer at high speeds
Posted: Tue Aug 26, 2025 1:53 pm
Project-Goal:
I work on a project where i need to drive a ADV7391 Video Encoder to generate analog PAL Signal.
I know, that neither the ESP32-S3 nor the EPS32-P4 supports BT.656 Protocol from the getgo, but i can generate this data myself. (With SAV EAV porches in YCrCB color space and so on.)
On the data side:
A Video line consists of 1728 Bytes
A Video Full Image consists of 625 lines.
This results in 1080000 Bytes of Data.
The whole data Transmission is clocked at a whopping 27MHz
So basically the whole 1MByte of Data needs to be sent out about 25 Times per second, which results in a read rate from the SPI-Ram (and write rate to the peripheral of course) of about 27MByte/s
Technical half-Successes:
I successfully used the LCD-RGB Peripheral on the ESP32-S3 to feed a framebuffer (in spi-ram) to the adv7391. (more or less continuous)
But changing the framebuffer on the fly is not really easy. And rewriting the whole buffer takes quite some time.
The Double Buffering Feature never really worked fully for me. I would wish for a function like "switchframebuffer(...)"
I tried "esp_lcd_panel_draw_bitmap" which should have the effect of switching the framebuffer, but this always took way too much time and the data stream was not continuous anymore.
Technical Difficulties:
I used the parlio_tx driver on the P4 to do the same. Here I split the Buffer into 25 * 1728 Bytes. 25 of these Packages would result in one full image.
25 Lines result in more then 1ms of data-length which is kind of compatible to use it in a task-scope again.
But no real success until now.
I also saw the "loop_transmission" flag in the parlio_transmit_config_t which exists since 5.5. But this only loops one buffer, which is not enough. And the maximum buffer size parlio is offering is too small to hold the full image.
Open for Ideas:
Does anyone have any Ideas how to solve this Problem.
- Does Espressif have tried something like that?
- Generating BT.656 Data in general
- Writing a huge (>1MByte) amount of data continuously at over parallel bus
- Does anyone else have experience with this?
- Any Ideas for other peripherals to use for that?
- Any Ideas for other configurations to use?
Best regards and thanks for any input/advice
Martin
I work on a project where i need to drive a ADV7391 Video Encoder to generate analog PAL Signal.
I know, that neither the ESP32-S3 nor the EPS32-P4 supports BT.656 Protocol from the getgo, but i can generate this data myself. (With SAV EAV porches in YCrCB color space and so on.)
On the data side:
A Video line consists of 1728 Bytes
A Video Full Image consists of 625 lines.
This results in 1080000 Bytes of Data.
The whole data Transmission is clocked at a whopping 27MHz
So basically the whole 1MByte of Data needs to be sent out about 25 Times per second, which results in a read rate from the SPI-Ram (and write rate to the peripheral of course) of about 27MByte/s
Technical half-Successes:
I successfully used the LCD-RGB Peripheral on the ESP32-S3 to feed a framebuffer (in spi-ram) to the adv7391. (more or less continuous)
But changing the framebuffer on the fly is not really easy. And rewriting the whole buffer takes quite some time.
The Double Buffering Feature never really worked fully for me. I would wish for a function like "switchframebuffer(...)"
I tried "esp_lcd_panel_draw_bitmap" which should have the effect of switching the framebuffer, but this always took way too much time and the data stream was not continuous anymore.
Technical Difficulties:
I used the parlio_tx driver on the P4 to do the same. Here I split the Buffer into 25 * 1728 Bytes. 25 of these Packages would result in one full image.
25 Lines result in more then 1ms of data-length which is kind of compatible to use it in a task-scope again.
But no real success until now.
I also saw the "loop_transmission" flag in the parlio_transmit_config_t which exists since 5.5. But this only loops one buffer, which is not enough. And the maximum buffer size parlio is offering is too small to hold the full image.
Open for Ideas:
Does anyone have any Ideas how to solve this Problem.
- Does Espressif have tried something like that?
- Generating BT.656 Data in general
- Writing a huge (>1MByte) amount of data continuously at over parallel bus
- Does anyone else have experience with this?
- Any Ideas for other peripherals to use for that?
- Any Ideas for other configurations to use?
Best regards and thanks for any input/advice
Martin