PaulStoffregen / ST7735_t3

Teensy 3.x Optimized Version of Adafruit_ST7735 (1.8 inch TFT Display)
33 stars 16 forks source link

T4x dma no copy #27

Closed KurtE closed 3 years ago

KurtE commented 3 years ago

@PaulStoffregen @mjs513 and @defragster,

The DMA code for the T4.x was based on my earlier DMA code, to avoid DMA issues on T4.x where the Frame buffer was in DMAMEM or PS memory... And the graphic primitives would complete and we start up a DMA operation, The updated data may not go out do to the cache... So I copied it to low memory which worked, but caused lots of memory copy and interrupts.

Later I switched to be more like other Teensy code, where it sets up 2 or 3 DMASettings objecjts chained to each other, and on single shot DMA output, take care of the issue with armdcache... call at startup of DMA. And for continuous, I have interrupt at end of each frame, that does it again.

I also added the ili9341_t3n code for allowing callbacks to code when a frame completes and optionally at half frame completing.

I initially did most of the testing with the (MicroMod)

Also added the callback code for full and half frames to the T3.5 and T3.6 code. So far it has been tested on ST7789 240x240 and 320x240 As well as the ST7735 with 128x128 On T3.6, T3.4 and T4.

but so far I only on SPI, not SPI1 nor SPI2. Most part that should not mater except with T3.5..