How to access SP1 on Arduino Giga

Hello everyone! I have a spa sd card reader connected to a arduino giga on SPI1 but I am unable to access it with the following code:

#include <SPI.h>

const uint8_t SPI_CS_PIN = 10; // Chip select pin (adjust according to your setup)

void setup() {
Serial.begin(115200);

// Initialize SPI1
SPI1.begin();

// Configure SPI settings (modify based on your device's requirements)
SPI1.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));

// Configure chip select pin
pinMode(SPI_CS_PIN, OUTPUT);
digitalWrite(SPI_CS_PIN, HIGH); // Set the chip select pin high initially

Serial.println("SPI1 Initialized.");
}

void loop() {ta
digitalWrite(SPI_CS_PIN, LOW); // Select the device

// Send a dummy byte and receive data
uint8_t sentData = 0x00;
uint8_t receivedData = SPI1.transfer(sentData);

digitalWrite(SPI_CS_PIN, HIGH); // Deselect the device

// Print sent and received data
Serial.print("Sent Data: ");
Serial.print(sentData, HEX);
Serial.print(" Received Data: ");
Serial.println(receivedData, HEX);

// Add delay
delay(1000);
}
// Add debugging to check chip select pin state
Serial.print("CS Pin State: ");
Serial.println(digitalRead(SPI_CS_PIN));

// Send and receive da

Which SPI1? The hardware SPI1 or the software SPI1?
If you look at their cheat sheet for SPI.
Arduino GIGA R1 Cheat Sheet | Arduino Documentation

You will see two SPI hardware objects: SPI1 and SPI5

Their documentation on this could be a bit clearer:
Please note that the in the GIGA R1 schematics and the code does not match exactly. In the schematics, you will notice that:

More specific if you are trying to use these pins:


Use the SPI object in your code.

If you are trying to use these pins:
image
Use the SPI1 object.