Thanks,
I believe by default the library is configured for SPI to run at 24Mhz. For some other boards there is configuration stuff in the ILI9341 library, is set higher. You can change, the SPI speed in the begin method.
I mentioned in the previous post that these boards did not define the count of SPI busses, which the libraries use to know which objects that might exist.
And I mentioned that I fixed that locally, but SPI1 still did not work...
Found the problem: Notice the two constructors:
Adafruit_ILI9341::Adafruit_ILI9341(int8_t cs, int8_t dc, int8_t rst)
: Adafruit_SPITFT(ILI9341_TFTWIDTH, ILI9341_TFTHEIGHT, cs, dc, rst) {}
Adafruit_ILI9341::Adafruit_ILI9341(SPIClass *spiClass, int8_t dc, int8_t cs,
int8_t rst)
: Adafruit_SPITFT(ILI9341_TFTWIDTH, ILI9341_TFTHEIGHT, spiClass, cs, dc,
rst) {}
Notice the order of the three pins:
WIthout SPI object: cs. dc. rst
WITH SPI object: dc, cs, rst
Changed the order around in sketch like:
Adafruit_ILI9341 tft = Adafruit_ILI9341(&SPI1, TFT_DC, TFT_CS, TFT_RST);
And now it is crawling
Edit: - I passed in 40mhz to begin and it is running faster.
enchmark Time (microseconds)
Screen fill 1810904
Text 70808
Lines 689704
Horiz/Vert Lines 146988
Rectangles (outline) 93694
Rectangles (filled) 3769201
Circles (filled) 397642
Circles (outline) 302077
Triangles (outline) 160134
Triangles (filled) 1207263
Rounded rects (outline) 173611
Rounded rects (filled) 3744490
Done!
But still the majority of the time, the SPI buss is not doing anything: