void setup(){
Serial.begin(9600);
Serial.println(F("TEST FUNCTION"));
#ifdef LED
pinMode(LED, OUTPUT);
digitalWrite(LED, LOW);
#endif
pinMode(FONA_RST, OUTPUT);
digitalWrite(FONA_RST, HIGH); // Default state
pinMode(FONA_PWRKEY, OUTPUT);
powerOn(); // Power on the module
moduleSetup(); // Establishes first-time serial comm and prints IMEI
fona.setFunctionality(1); // AT+CFUN=1
fona.setNetworkSettings(F("hologram")); //
fona.setPreferredMode(38); // Use LTE only, not 2G
fona.setPreferredLTEMode(1); // Use LTE CAT-M only, not NB-IoT
fona.setOperatingBand("CAT-M", 12); // AT&T uses band 12
if (!fona.enableGPRS(false)) Serial.println(F("Failed to disable GPRS!"));
// Turn on GPRS
while (!fona.enableGPRS(true)) {
Serial.println(F("Failed to enable GPRS, retrying..."));
delay(2000); // Retry every 2s
}
Serial.println(F("Enabled GPRS!"));
Serial.println("Initializing SD card...");
if (!SD.begin(SD_CS)) {
Serial.println(F("initialization failed!"));
while (1);
}
Serial.println(F("initialization done."));
}`
in the above code, nothing works after initializing SD card. I get the initialization done message but after that the system stop communicating with the sim7000 module. It sends AT commands but doesnt receive any replies, none of the GET/POST request work either. If i comment the SD card initialization, everything works normal. What i am missing? Something to do with SPI communication ?