How do I get started with setting up I2S and DMA for my ILI9341 display?

RetroZvoc
Posts: 9
Joined: Tue Nov 27, 2018 1:21 am

How do I get started with setting up I2S and DMA for my ILI9341 display?

Postby RetroZvoc » Sun Feb 17, 2019 12:25 am

Hello.
I've been looking for a microcontroller fast enough to drive a display without tearing at full 60fps which is also able to run a game engine without having to wait for VBlank. ESP32 has been the best choice. As Bitluni was working on his VGA demo for ESP32 and found out some out of specs I2S DMA 580MHz of data transfer speed, I was expecting to use this for my ILI9341 display and to throw away those QuadSPI-to-Parallel FPGA chip ideas and to use his code. Usually, Bitluni licenses everything under the MIT license which is my favorite and which I've been boasting about to my professors and with no drawback, I was expecting Bitluni to release that under the MIT license like he did with everything else, but the whole plan fell into the water when I read that he used ShareAlike because he wanted to get some support as he didn't have any money for the last two months.

When he amended his licensing methods, his response didn't satisfy my license requirements, especially when I just wanted to use the I2S code for my ILI9341 display which I had a huge fiasco over ordering because that Velleman one wasn't an ILI9341 and the driver was unspecified in my local shop and the guys who developed that display used some MCUFRIEND_mkv library which somehow tries to remotely guess what the display is in a dirty hacky way and it didn't work for me at all. No picture was shown on my screen, my college grant didn't arrive yet due to a ridiculous administration error, and I had already wasted my money on the Velleman crap. But as soon as my college grant has arrived, I had to pay for super expensive shipping for an Adafruit ILI9341 display from Germany (and I needed my brother's help to read German as the website did not have an English setting) to arrive sooner as I was late with my project so that I could work with it as the Chinese New Year just had to be in the time of my exams when I had to show my college professors my progress on this game console project which meant that eBay was out of the question until February 13th.

So now since this finally works with this epic driver which I optimized as much as I could (unrolling a loop that reads bytes from a scanline buffer which contains incremented colors), the max speed I could get was 39fps. But if Bitluni could achieve more than 60fps on just one CPU core with I2S and DMA, then surely the same I2S settings could be applied to fit my display's needs. However, since his code is ShareAlike, I'll have to figure this out on my own. So, are there any tutorials on how to set up I2S and DMA together? I'm not finding anything much relevant because either Google hates me or the search engines have simply become more stupid than ever due to Moore's Law and Murphy's Law as well. As I don't want to lurk around googling things and finding disinformation, I have come here to ask you this:

Could you please help me by showing me some starting points about how I2S and DMA could work together?

My ESP32 is a NODEMCU ESP32-S which I'm using with Arduino IDE and I also have another issue with it explained here.

Who is online

Users browsing this forum: No registered users and 56 guests