This is a pretty old thread, so apologies for revisiting it, but it's still linked at at the ILI9341_t3 library on GitHub via the README
I've been digging through the driver code, because seeing it in the wild helps me to understand the manual when I finally encounter it.
Well, I've been looking for the manual and trying to cross reference with the code to find the *right* manual.
This appears to be relevant
https://www.pjrc.com/teensy/IMXRT1060RM_rev2.pdf
And yet, many of the register definitions referred to like SPI_SR_TCF aren't coming up in my search of the PDF.
So my first question is, which manuals are you folks talking about above?
Specifically I'm primarily interested in the Teensy 4.x, but eventually I will be interested in the earlier ones too.
I also am looking for a general overview - a bit more high level, less in the weeds of how the SPI registers work as well as the strange business going on with the DC line in the t3 code.
By strange business, I mean for example how the code for some reason fiddles with a DC connected register every time you start an SPI transaction, whether you're writing a command or data.
Here's why I care.
https://honeythecodewitch.com/gfx/wiki/index.md
Basically, htcw_gfx already works with the teensy. I want to make all the SPI code for every driver it supports faster for the teensy.
I can do that by changing two files which will update every single driver, and future drivers.
https://github.com/codewitch-honey-crisis/htcw_tft_io/blob/master/include/tft_spi.hpp
https://github.com/codewitch-honey-crisis/htcw_tft_io/blob/master/include/tft_driver.hpp
My current challenge aside from understanding the function of the individual registers (which should be easy once I can find the right manual!) is understanding the relationship between DC and the SPI transactions in your code.
They seem very much tied to one another.
In the code I linked to above, the SPI code is not tied to the DC line driving code, which is handled over the top of the SPI code. I see that creating issues if I try to make it work like Paul's T3 code does. The SPI code cannot manipulate the DC line directly the way my library is structured, but the code that operates the DC line *can* manipulate SPI.
So bottom line, is I was hoping someone could point me to the manual you folks are referring to in the above thread - the one with the registers used in Paul's T3 code,
and any insight on how the Teensy's CPU controls the DC line - I thought it would just be a separate pin you tweak, but it appears like maybe there's intrinsic support for it in the SPI hardware if you tie it to a hardware CS pin? I can't really tell other than from what I've seen in the code, which I don't fully understand without that manual!
I also would be interested in the Teensy's DMA SPI capabilities. I was fiddling a bit with the DMA library, and it looks like you can only send in 32kB chunks max. So what I was planning on doing was something like the ESP-IDF does - create some sort of list of 32kB chunks from a larger memory buffer, and kick off a series of DMA transfers, one for each chunk. I'm hoping that's realistic, otherwise I guess 32kB will have to be enough.
Lots of research and effort is clearly required for me to update the code to be optimized for the Teensy, but to my mind this is worth it, because htcw_gfx is my go to these days, and also once I do it in one place, the ILI934x, ST77xx, SSD1306 (SPI), SSD1351 and others will all be optimized in the same manner, so at least that should cover my expenditure.