Cant read SD Card on Nano Every

Hi,

I am trying to use the MKR MEM Shield with Arduino Nano Every. This is the code that I am trying to run

#include <SPI.h>
#include <string.h>
#include <CSV_Parser.h>
#include <SD.h>

#define CAN_2515

#if defined(SEEED_WIO_TERMINAL) && defined(CAN_2518FD)
const int SPI_CS_PIN  = BCM8;
const int CAN_INT_PIN = BCM25;
#else

const int SPI_CS_PIN = 10; //Arduino MKR Shield = 3, Arduino Nano Every = 10
const int CAN_INT_PIN = 2; //Arduino MKR Shield = 7, Arduino Nano Every = 2
#endif

#ifdef CAN_2518FD
#include "mcp2518fd_can.h"
mcp2518fd CAN(SPI_CS_PIN);
#endif

#ifdef CAN_2515
#include "mcp2515_can.h"
mcp2515_can CAN(SPI_CS_PIN);
#endif

char *to_find_list[] = {"BMS_HvBus1_Tract_OnFb_bool", "BMS_HvBus2_Chrg_OnFb_bool", "BMS_HvBus3_Anc_OnFb_bool", "BMS_HvBus4_Null_OnFb_bool", "BMS_HvBus5_Null_OnFb_bool", "BMS_Status_enum", "BMS_IsolVal_kohm"};
int x[sizeof(to_find_list) / sizeof(to_find_list[0])];
int ignitionPin = A0;
int physVals[sizeof(to_find_list) / sizeof(to_find_list[0])];
int led_red = 3;   //define red pin
int led_green = 5; //define green pin
int led_blue = 6;  //define blue pin
int condition;
const int chipSelect = 8;
File myFile; 

int rows_count;
char      **names;
uint16_t  *startbits;
uint16_t  *lengths;
int16_t   *initial_values;
float     *factors;
int16_t   *offsets;
char      **units;
int32_t   *message_ids;

void setup() {

  pinMode(chipSelect, OUTPUT);
  pinMode(led_red, OUTPUT);
  pinMode(led_green, OUTPUT);
  pinMode(led_blue, OUTPUT);

  Serial.begin(115200);
  delay(5000);

  int voltageValue = analogRead(ignitionPin);
  
  Serial.print("Initializing SD card...");

  if (!SD.begin(chipSelect)) {
    Serial.println("Card failed, or not present");
    while (1);
  }
  Serial.print("card initialized...");
  
  CSV_Parser cp("s--udud--dfd--s--ux---", true, ';');

  if (cp.readSDfile("/DBC_3.csv")) {
    Serial.print(F("Reading file..."));
    names           = (char**)cp["Name"];
    startbits       = (uint16_t*)cp["Startbit"];
    lengths         = (uint16_t*)cp["Length [Bit]"];
    initial_values  = (int16_t*)cp["Initial Value"];
    factors         = (float*)cp["Factor"];
    offsets         = (int16_t*)cp["Offset"];
    units           = (char**)cp["Unit"];
    message_ids     = (int32_t*)cp["Message ID"];

    rows_count = cp.getRowsCount();
  }

  else {
    Serial.println("ERROR: File called '/DBC_3.csv' does not exist...");
  }

  while (CAN_OK != CAN.begin(CAN_500KBPS)) {             // init can bus : baudrate = 500k
    Serial.println("CAN init fail, retry...");
    delay(100);
  }
  Serial.println("CAN init ok!");

  for (int i = 0; i < sizeof(x) / sizeof(x[0]); i++) {
    Serial.println();
    Serial.print(to_find_list[i]);
    Serial.println();
    x[i] = searcher(to_find_list[i]);
  }

}

void loop() {
  unsigned char dlc = 0; unsigned char canData[8]; unsigned char data[8][8]; unsigned int byteData[64] = {0}; int voltageVal = analogRead(ignitionPin);
  voltageVal = 1;
  
  if (voltageVal > 0) {
    condition = 1;

    if (CAN_MSGAVAIL == CAN.checkReceive()) {         // Check if data coming
      CAN.readMsgBuf(&dlc, canData);      // Read data,  dlc: DLC, data: CAN data 

      unsigned long canId = CAN.getCanId();

      Serial.println("-----------------------------");
      Serial.print("Get data from ID: 0x");
      Serial.println(canId, HEX);
      
      for(int i = 0; i < sizeof(x) / sizeof(x[0]); i++) {

        unsigned int index = x[i];

        if (message_ids[index] == canId) { //If canIds are equal to canIds of stored signal names in to_find_list[]

          unsigned int sb = startbits[index]; unsigned int len = lengths[index]; int initVal = initial_values[index]; int factor = factors[index]; int offset = offsets[index];
        
          for (int i = 0; i < dlc; i++) { //This for loop converts the whole data into binary format
            int* binNum = decToBin(canData[i]); //Each byte of canData is converted to binary number and stored

            for (int j = 0; j < 8; j++) {
              data[i][j] = binNum[j]; //Binary number is stored in a multidimensional array 
            }

            Serial.print(canData[i], HEX);
            Serial.print("\t");
          }

            if ((sb + len) % 8 != 0) { //If startbits + length > the byte size, we will have to take the next byte into consideration
              int index_byte = 0;

              for (int j = (sb + len) / 8; j >= (int)(sb / 8); j--) { //Extract the necessary bytes
                
                for (int k = 0; k < 8; k++) {

                  byteData[index_byte++] = data[j][k];
                }
              }
            } 

            else { //If startbits + length is divisible by 8
              int index_byte = 0;

              for (int j = ((sb + len) / 8) - 1; j >= (int)(sb / 8); j--) { //Extract the necessary bytes
                
                for (int k = 0; k < 8; k++) {

                  byteData[index_byte++] = data[j][k];
                }
              }
            }

          int size = 0;

          if ((sb + len) % 8 != 0) {

            size = ((len / 8) + 1) * 8;
          }

          else {

            size = len;          
          }
          
          int to = size - 1 - (sb % 8) - len; int from = size - 1 - (sb % 8); unsigned int bitData[len] = {0}; int j = 0;
                  
          for (int i = from; i > to; i--) { //Extract the data according to the bit length

            bitData[j++] = byteData[i];
          }
          
          int size2 = sizeof(bitData) / sizeof(bitData[0]); int rawVal = binTodec(bitData, size2); int physVal;

          Serial.println();        
          Serial.print("Decimal value of extracted data: ");        
          Serial.print(rawVal); //Convert the extracted bits to decimal format and print
          Serial.println();

          physVal = offset + (factor * rawVal); //Apply offset and scale to the raw value to get the physical value
          Serial.print("Name = ");
          Serial.print(to_find_list[i]);
          Serial.println();
          Serial.print("Binary: ");
          for (int i = 0; i < (int)(sizeof (bitData) / sizeof (bitData[0])); i ++) {
            Serial.print(bitData[i]);
          }
          Serial.println();
          Serial.print("Physical value = ");
          physVals[i] = physVal;
          Serial.print(physVals[i]); // Print the physical value
          Serial.println();
        }
      }

      if (physVals[5] == 5) {
        Serial.print("Ignition off! ");
        Serial.println();
        condition = 0;  //Lights off
      }

      else if (physVals[5] == 50) {
        Serial.print("Fault! ");
        Serial.println();
        condition = 3; //Red
      }

      else if (physVals[5] == 20) {
        Serial.print("HV active!");
        Serial.println();
        condition = 2; //Orange
      }
      
      else {
        Serial.print("Ignition on! ");
        condition = 1;  //Green

        if (physVals[0] == 1 || physVals[1] == 1 || physVals[2] == 1) {
          Serial.print("Contactors closed! ");
          Serial.println();
          condition = 2;  //Orange        
        }

        else {
          Serial.print("Contactors open! ");
          condition = 1;  //Green

          if (physVals[6] < 48) {
            Serial.print(physVals[6]);
            Serial.print("Isolation value < 48 kohm! System not isolated! Fault detected!");
            Serial.println();
            condition = 3;  //Red
          } 
          
          else {
            Serial.print("System isolated!");
            Serial.println();
            condition = 1;  //Green
          }
        }
      }      
    }

    else {
      Serial.print("CAN Messages Unavailable!");
      Serial.println();
      condition = 3;
    }
  }

  else {
    Serial.print("Ignition off! ");
    Serial.println();
    condition = 0; //No colour 
  }

  updateLEDs(condition);
}

int searcher(char *to_find) {
  for(int i = 0; i < rows_count; i++) {
    if (strcmp(names[i], to_find) == 0) {
      return i;
    }
  }
}

int* decToBin (int decimalNumber) {
  static int binaryNumber[8];

  for (int i = 7; i >= 0; i--) {
    binaryNumber[i] = decimalNumber % 2;
    decimalNumber = decimalNumber / 2;
  }

  return binaryNumber;
}

int binTodec (unsigned int binaryNumber[], int size) {
  unsigned int decimalNumber = 0;

  for (int i = size - 1; i >= 0 ; i--) {

    decimalNumber += binaryNumber[i] * (int)(pow(2, i));
  }
  
  return decimalNumber;
}

void showColor(byte r, byte g, byte b) {
  //Byte values for range 0-255
  analogWrite(led_red, r);
  analogWrite(led_green, g);
  analogWrite(led_blue, b);
}

void updateLEDs(int condition) { 

  if (condition == 0) {
  //Always delay 5 minutes before switching off
    showColor(0, 0, 0);       // No colour
  }

  else if (condition == 1) {
    showColor(0, 255, 0);     // Green
  }

  else if (condition == 2) {
    showColor(255, 127, 0);   // Orange
  }

  else {
    showColor(255, 0, 0);     // Red
  }
}

The output for above code

Initializing SD card...card initialized...R�

The code runs perfectly with some modication on MKR Wifi 1010. But not on Nano Every. I have checked the wiring and it is fine. The CardInfo.ino example from the SD library works perfectly with MKR Mem shield and Nano Every.

/*
  SD card test

  This example shows how use the utility libraries on which the'
  SD library is based in order to get info about your SD card.
  Very useful for testing a card when you're not sure whether its working or not.

  The circuit:
    SD card attached to SPI bus as follows:
 ** MOSI - pin 11 on Arduino Uno/Duemilanove/Diecimila
 ** MISO - pin 12 on Arduino Uno/Duemilanove/Diecimila
 ** CLK - pin 13 on Arduino Uno/Duemilanove/Diecimila
 ** CS - depends on your SD card shield or module.
 		Pin 4 used here for consistency with other Arduino examples


  created  28 Mar 2011
  by Limor Fried
  modified 9 Apr 2012
  by Tom Igoe
*/
// include the SD library:
#include <SPI.h>
#include <SD.h>

// set up variables using the SD utility library functions:
Sd2Card card;
SdVolume volume;
SdFile root;

// change this to match your SD shield or module;
// Arduino Ethernet shield: pin 4
// Adafruit SD shields and modules: pin 10
// Sparkfun SD shield: pin 8
// MKRZero SD: SDCARD_SS_PIN
const int chipSelect = 8;

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  Serial.print("\nInitializing SD card...");

  // we'll use the initialization code from the utility libraries
  // since we're just testing if the card is working!
  if (!card.init(SPI_HALF_SPEED, chipSelect)) {
    Serial.println("initialization failed. Things to check:");
    Serial.println("* is a card inserted?");
    Serial.println("* is your wiring correct?");
    Serial.println("* did you change the chipSelect pin to match your shield or module?");
    while (1);
  } else {
    Serial.println("Wiring is correct and a card is present.");
  }

  // print the type of card
  Serial.println();
  Serial.print("Card type:         ");
  switch (card.type()) {
    case SD_CARD_TYPE_SD1:
      Serial.println("SD1");
      break;
    case SD_CARD_TYPE_SD2:
      Serial.println("SD2");
      break;
    case SD_CARD_TYPE_SDHC:
      Serial.println("SDHC");
      break;
    default:
      Serial.println("Unknown");
  }

  // Now we will try to open the 'volume'/'partition' - it should be FAT16 or FAT32
  if (!volume.init(card)) {
    Serial.println("Could not find FAT16/FAT32 partition.\nMake sure you've formatted the card");
    while (1);
  }

  Serial.print("Clusters:          ");
  Serial.println(volume.clusterCount());
  Serial.print("Blocks x Cluster:  ");
  Serial.println(volume.blocksPerCluster());

  Serial.print("Total Blocks:      ");
  Serial.println(volume.blocksPerCluster() * volume.clusterCount());
  Serial.println();

  // print the type and size of the first FAT-type volume
  uint32_t volumesize;
  Serial.print("Volume type is:    FAT");
  Serial.println(volume.fatType(), DEC);

  volumesize = volume.blocksPerCluster();    // clusters are collections of blocks
  volumesize *= volume.clusterCount();       // we'll have a lot of clusters
  volumesize /= 2;                           // SD card blocks are always 512 bytes (2 blocks are 1KB)
  Serial.print("Volume size (Kb):  ");
  Serial.println(volumesize);
  Serial.print("Volume size (Mb):  ");
  volumesize /= 1024;
  Serial.println(volumesize);
  Serial.print("Volume size (Gb):  ");
  Serial.println((float)volumesize / 1024.0);

  Serial.println("\nFiles found on the card (name, date and size in bytes): ");
  root.openRoot(volume);

  // list all files in the card with date and size
  root.ls(LS_R | LS_DATE | LS_SIZE);
}

void loop(void) {
}

The output for CardInfo.ino

Initializing SD card...Wiring is correct and a card is present.

Card type:         SDHC
Clusters:          485936
Blocks x Cluster:  64
Total Blocks:      31099904

Volume type is:    FAT32
Volume size (Kb):  15549952
Volume size (Mb):  15185
Volume size (Gb):  14.83

Files found on the card (name, date and size in bytes): 
SYSTEM~1/     2024-07-16 09:40:40
  WPSETT~1.DAT  2024-07-16 09:40:40 12
  INDEXE~1      2024-07-16 09:40:40 76
DBC_2.TXT     2024-07-16 10:33:08 35631
DBC_1.TXT     2024-07-16 10:33:08 35819
DBC.TXT       2024-07-16 11:34:28 39302
DBC_AQ~1.CSV  2024-07-16 10:33:08 5411
DBC_BM~1.CSV  2024-07-16 11:34:26 42983
DBC_BM~2.CSV  2024-07-16 11:34:34 38013
DBC_VS~1.CSV  2024-07-16 10:33:08 39309
DBC_VS~2.CSV  2024-07-16 10:33:08 39309
NAMES.TXT     2000-01-01 01:00:00 5361
TEST.TXT      2000-01-01 01:00:00 260
DBC_3.CSV     2024-07-16 14:47:08 38242

I think the problem lies with Serial port or program memory. How do I make this code work?

@UKHeliBob @sherzaad @J-M-L @docdoc

the MKR MEM shield is for a 3.3 V MCU so it doesn't do a logic level conversion for the SD card. The Nano Every is a 5 V board

1 Like

But there is a 3.3V output on Nano Every. I am using the same output.

not powering. logic level.
do you have 115200 baud set in Serial Monitor?

Yes, I have 115200 baud set in Serial Monitor. I have also used the same code with different pin s on MKR Wifi 1010. The code works there.

/*
  SD card read/write

  This example shows how to read and write data to and from an SD card file
  The circuit:
   SD card attached to SPI bus as follows:
 ** MOSI - pin 11
 ** MISO - pin 12
 ** CLK - pin 13
 ** CS - pin 4 (for MKRZero SD: SDCARD_SS_PIN)

  created   Nov 2010
  by David A. Mellis
  modified 9 Apr 2012
  by Tom Igoe

  This example code is in the public domain.

*/

#include <SPI.h>
#include <SD.h>

File myFile;

void setup() {
  pinMode(8, OUTPUT);
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  Serial.print("Initializing SD card...");

  if (!SD.begin(9)) {
    Serial.println("initialization failed!");
    while (1);
  }
  Serial.println("initialization done.");

  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  myFile = SD.open("test.txt", FILE_WRITE);

  // if the file opened okay, write to it:
  if (myFile) {
    Serial.print("Writing to test.txt...");
    myFile.println("testing 1, 2, 3.");
    // close the file:
    myFile.close();
    Serial.println("done.");
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening test.txt");
  }

  // re-open the file for reading:
  myFile = SD.open("DBC_3.csv");
  if (myFile) {
    Serial.println("DBC_3.csv:");

    // read from the file until there's nothing else in it:
    while (myFile.available()) {
      Serial.write(myFile.read());
    }
    // close the file:
    myFile.close();
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening DBC_3.csv");
  }
}

void loop() {
  // nothing happens after setup
}

Could explain why does this code work when I use Arduino MEM shield with Nano Every if it is a 5V MCU board.

Initializing SD card...initialization done.
Writing to test.txt...done.
DBC_3.csv:
Name;Message;Multiplexing/Group;Startbit;Length [Bit];Byte Order;Value Type;Initial Value;Factor;Offset;Minimum;Maximum;Unit;Value Table;Comment;Message ID;GenSigInactiveValue;GenSigSendType;GenSigStartValue
Name;Message;Multiplexing/Group;Startbit;Length [Bit];Byte Order;Value Type;Initial Value;Factor;Offset;Minimum;Maximum;Unit;Value Table;Comment;Message ID;GenSigInactiveValue;GenSigSendType;GenSigStartValue
BMS_AncVolt_V;BMS_PackInfo3;-;16;16;Intel;Unsigned;0;0.1;0;0;1000;V;-;Fuel Cell Voltage - measured by HVM;0x71D;0;Cyclic;0
BMS_BalancingStatus_enum;BMS_Status2;-;12;4;Intel;Unsigned;0;1;0;0;15;enum;VtSig_BMS_BalancingStatus_enum;Balancing state;0x291;0;Cyclic;0
BMS_Cell_ChrgCycles_num;BMS_PackInfo5;-;0;16;Intel;Unsigned;0;0.1;0;0;6553.4;num;-;-;0x71F;0;Cyclic;0
BMS_Cell_TempAvg_degC;BMS_CellTemperatureInfo;-;48;8;Intel;Signed;0;1;0;-128;127;degC;-;Average cell temperature;0x717;0;Cyclic;0
BMS_Cell_TempMax_CmuId_num;BMS_CellTemperatureInfo;-;32;8;Intel;Unsigned;0;1;0;0;255;num;-;CMU ID of cell with highest temperature;0x717;0;Cyclic;0
BMS_Cell_TempMax_degC;BMS_CellTemperatureInfo;-;24;8;Intel;Signed;0;1;0;-128;127;degC;-;Maximum cell temperature;0x717;0;Cyclic;0
BMS_Cell_TempMax_Id_num;BMS_CellTemperatureInfo;-;40;8;Intel;Unsigned;0;1;0;0;255;num;-;Cell number of cell with highest temperature.;0x717;0;Cyclic;0
BMS_Cell_TempMin_CmuId_num;BMS_CellTemperatureInfo;-;8;8;Intel;Unsigned;0;1;0;0;255;num;-;CMU ID of cell with lowest temperature;0x717;0;Cyclic;0
BMS_Cell_TempMin_degC;BMS_CellTemperatureInfo;-;0;8;Intel;Signed;0;1;0;-128;127;degC;-;Minimum cell temperature;0x717;0;Cyclic;0
BMS_Cell_TempMin_Id_num;BMS_CellTemperatureInfo;-;16;8;Intel;Unsigned;0;1;0;0;255;num;-;Cell number of cell with lowest temperature;0x717;0;Cyclic;0
BMS_Cell_VoltDelta_V;BMS_PackInfo1;-;0;16;Intel;Unsigned;0;0.0001;0;0;6.5535;V;-;Cell voltage difference between minimum and maximum cell voltage;0x71B;0;Cyclic;0
BMS_Cell_VoltMax_CmuId_num;BMS_CellVoltageInfo;-;48;8;Intel;Unsigned;0;1;0;0;255;num;-;CMU ID of cell with maximum voltage;0x713;0;Cyclic;0
BMS_Cell_VoltMax_Id_num;BMS_CellVoltageInfo;-;56;8;Intel;Unsigned;0;1;0;0;255;num;-;Cell number of cell with maximum voltage;0x713;0;Cyclic;0
BMS_Cell_VoltMax_V;BMS_CellVoltageInfo;-;32;16;Intel;Unsigned;0;0.0001;0;0;6.5535;V;-;Maximum cell voltage;0x713;0;Cyclic;0
BMS_Cell_VoltMin_CmuId_num;BMS_CellVoltageInfo;-;16;8;Intel;Unsigned;0;1;0;0;255;num;-;CMU ID of cell with minimum voltage;0x713;0;Cyclic;0
BMS_Cell_VoltMin_Id_num;BMS_CellVoltageInfo;-;24;8;Intel;Unsigned;0;1;0;0;255;num;-;Cell number of cell with lowest voltage;0x713;0;Cyclic;0
BMS_Cell_VoltMin_V;BMS_CellVoltageInfo;-;0;16;Intel;Unsigned;0;0.0001;0;0;6.5535;V;-;Minimum cell voltage;0x713;0;Cyclic;0
BMS_Chrg_CapacityRemain_Ah;BMS_Status2;-;32;8;Intel;Unsigned;0;0.2;0;0;51;-;-;Battery Pack Charge Capacity Remaining in Ah;0x291;0;Cyclic;0
BMS_Chrg_TmRemain_min;BMS_PackInfo5;-;16;16;Intel;Unsigned;0;1;0;0;65534;minutes;-;-;0x71F;0;Cyclic;0
BMS_ChrgComplete_bool;BMS_Status2;-;7;1;Intel;Unsigned;0;1;0;0;1;bool;-;BMS charge complete flag. 0 = Not complete, 1 = Complete.;0x291;0;Cyclic;0
BMS_ChrgCurLim30s_A;BMS_Limits2;-;16;16;Intel;Unsigned;0;0.1;0;0;6553.5;A;-;Charge Current Limit for 30 second events / continuous;0x296;0;Cyclic;0
BMS_ChrgCurrLim30s_enum;BMS_FltInfo_Derate1;-;48;16;Intel;Unsigned;0;1;0;0;65535;enum;VtSig_BMS_ChrgCurrLim30s_enum;Charge Current Limit Enumeration for 30 second events / continuous;0x73F;0;Cyclic;0
BMS_ChrgCurrReq_A;BMS_Limits1;-;32;16;Intel;Unsigned;0;0.1;0;0;6553.5;A;-;Current request for charging in Amps;0x295;0;Cyclic;0
BMS_ChrgModeReqFb_bool;BMS_Status1;-;6;1;Intel;Unsigned;0;1;0;0;1;bool;-;Charge mode request acknowledgement feedback (0 = charge mode not requested feedback, 1 = charge mode requested feedback);0x290;0;Cyclic;0
BMS_ChrgPwrLim10s_enum;BMS_FltInfo_Derate1;-;16;16;Intel;Unsigned;0;1;0;0;65535;enum;VtSig_BMS_ChrgPwrLim10s_enum;Regen Current Limit Enumeration for 10 second events / instantaneous;0x73F;0;Cyclic;0
BMS_ChrgPwrLim10s_W;BMS_Limits1;-;16;16;Intel;Unsigned;0;20;0;0;1310700;W;-;Regen Current Limit for 10 second events / instantaneous;0x295;0;Cyclic;0
BMS_ChrgVolt_V;BMS_PackInfo3;-;32;16;Intel;Unsigned;0;0.1;0;0;1000;V;-;Anc Voltage - measured by HVM;0x71D;0;Cyclic;0
BMS_ChrgVoltMax_V;BMS_Limits1;-;48;16;Intel;Unsigned;0;0.1;0;0;6553.5;V;-;Maximum charging voltage of pack;0x295;0;Cyclic;0
BMS_CMU1_temp1;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;8;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0
BMS_CMU1_temp2;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;16;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0
BMS_CMU1_temp3;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;24;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0
BMS_CMU1_temp4;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;32;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0
BMS_CMU1_temp5;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;40;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0
BMS_CMU1_temp6;BMS_CMU_Temp1;BMS_CMU_counter = 0x0;48;8;Intel;Unsigned;-40;1;-40;-40;215;DegC;-;CMU Cell Temperature;0x500;0;Cyclic;0
BMS_CMU1_voltage1;BMS_CMU_Voltages1;BMS_CMU_counter = 0x0;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0
BMS_CMU1_voltage10;BMS_CMU_Voltages1;BMS_CMU_counter = 0x2;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0
BMS_CMU1_voltage11;BMS_CMU_Voltages1;BMS_CMU_counter = 0x2;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0
BMS_CMU1_voltage12;BMS_CMU_Voltages1;BMS_CMU_counter = 0x2;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0
BMS_CMU1_voltage13;BMS_CMU_Voltages1;BMS_CMU_counter = 0x3;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0
BMS_CMU1_voltage14;BMS_CMU_Voltages1;BMS_CMU_counter = 0x3;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0
BMS_CMU1_voltage2;BMS_CMU_Voltages1;BMS_CMU_counter = 0x0;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0
BMS_CMU1_voltage3;BMS_CMU_Voltages1;BMS_CMU_counter = 0x0;32;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0
BMS_CMU1_voltage4;BMS_CMU_Voltages1;BMS_CMU_counter = 0x0;45;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0
BMS_CMU1_voltage5;BMS_CMU_Voltages1;BMS_CMU_counter = 0x1;6;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0
BMS_CMU1_voltage6;BMS_CMU_Voltages1;BMS_CMU_counter = 0x1;19;13;Intel;Unsigned;0;0.001;0;0;8.191;volts;-;CMU Cell Voltage;0x507;0;Cyclic;0

SD card is a 3.3 V device. it may tolerate 5 V logic signal level for some time, because those are just short pulses on clock and MOSI line.
and the flash memory chip gets the pulses too of course.

Thank you for the explanation!