I am using a TFT display with an SPI interface on my Nano Matter.
I am using the Arduino Silabs core package 2.2.0, the latest.
While I am able to get the display to work with the Adafruit_ST7789 library, I measure the SPI clock at 38 MHz which the display can barely handle. I can't seem to slow the SPI clock rate down using any of the following methods:
tft.initSPI(8000000,SPI_MODE0);
This is a function call of the tft library, but doesn't work with MG240
SPI.setClockDivider(8);
This doesn't work with MG240S -deprecated
SPI.beginTransaction(8000000,MSBFIRST,SPI_MODE0);
This won't even compile- err message is :
no matching function for call to 'arduino::SilabsSPI::beginTransaction(int, BitOrder, arduino::SPIMode)'
I see in the api folder of the core package, in file HardwareSPI.h the following:
// Default speed set to 4MHz, SPI mode set to MODE 0 and Bit order set to MSB first. SPISettings() { init_AlwaysInline(4000000, MSBFIRST, SPI_MODE0); }
However, this can't be right, as I get a 38 MHz SPI clock regardless of what I try.
Has anyone managed to set the SPI clock rate?
Thanks