Arduino SD library & other SPI sensors with different SPI Clock Settings


I'm using thermocouple amplifieres which need 4Mhz Clock Speed. In addition, I want to log the temperature on a SD using the SD library. The latter also uses the SPI-Interface. However, the SD library might use a different clock speed.

Therefore, It's important that things doesn't get mixed up.

When getting the temperature I always set the SPISetting.

void getTemperature() {

SPI.beginTransaction(SPISettings(SPI_CLOCK_DIV4, MSBFIRST, SPI_MODE0)); digitalWrite(csT1, LOW);

.... get Data ... digitalWrite(csT1, HIGH); SPI.endTransaction(); }

However, in case of the SD I do not want to call

SD.begin(chipSelect); dataFile ="test6.txt", FILE_WRITE);

every time since these methods take a while...

So are the SPI-Setting also resettet for the SD when just calling