Search found 6 matches

by rickyzhang
Thu Aug 02, 2018 2:28 pm
Forum: General Discussion
Topic: The right way to check SPI DMA completion
Replies: 10
Views: 21694

Re: The right way to check SPI DMA completion

That's a good point. I think you say min SCL write cycle is 100ns. That max out clock rate at 10Mhz. In fact, I'm doing interlacing in LCD driver. Thus, it only use half bandwidth from what I showed: 320 (width) x 240 (height) x 2 x 8 (bit) x 24 (fps) / 2 (interlacing) = 14.5 Mbps. I will give a try...
by rickyzhang
Wed Aug 01, 2018 11:43 pm
Forum: General Discussion
Topic: The right way to check SPI DMA completion
Replies: 10
Views: 21694

Re: The right way to check SPI DMA completion

I added assertion below. But I don't see any exception: assert(trans_desc == &trans[x]); if (1 == x || 3 == x) { assert(trans_desc->tx_data[0] == trans[x].tx_data[0] && trans_desc->tx_data[1] == trans[x].tx_data[1] && trans_desc->tx_data[2] == trans[x].tx_data[2] && trans_desc->tx_data[3] == trans[x...
by rickyzhang
Sat Jul 28, 2018 2:51 pm
Forum: General Discussion
Topic: The right way to check SPI DMA completion
Replies: 10
Views: 21694

Re: The right way to check SPI DMA completion

The implementation has two dual buffer techniques: 1. First dual buffer technique is for emulator in core 0 (https://github.com/rickyzhang82/go-play/blob/wip-improve-interlacing/nesemu-go/components/nofrendo/vid_drv.c#L357-L370). As you describe in your last paragraph, at the first time primary buff...
by rickyzhang
Fri Jul 27, 2018 11:21 am
Forum: General Discussion
Topic: The right way to check SPI DMA completion
Replies: 10
Views: 21694

Re: The right way to check SPI DMA completion

I shared my work-in-progress code in branch wip-improve-interlacing: https://github.com/rickyzhang82/go-play/tree/wip-improve-interlacing . I experiment dual buffer and interlace for ILI9341 over SPI at 40Mhz. The board is odroid-go https://www.hardkernel.com/main/products/prdt_info.php?g_code=G1528...
by rickyzhang
Thu Jul 26, 2018 1:20 pm
Forum: General Discussion
Topic: The right way to check SPI DMA completion
Replies: 10
Views: 21694

Re: The right way to check SPI DMA completion

That's a good point. My experiment is built on top of other's code. Before I added mine, it would crash when invoking spi_device_get_trans_result due to the mismatch with spi_device_queue_trans. The crash happen in free function within spi_device_get_trans_result https://github.com/espressif/esp-idf...
by rickyzhang
Thu Jul 26, 2018 1:03 am
Forum: General Discussion
Topic: The right way to check SPI DMA completion
Replies: 10
Views: 21694

The right way to check SPI DMA completion

I experimented dual frame buffer driver in ESP-32, which connects ili9341 LCD controller over SPI. I need to synchronize SPI DMA completion to switch frame buffer. There seem to be two ways to do this. 1. After calling a number of spi_device_queue_trans function to send DMA transaction to the queue,...