2
\$\begingroup\$

Given is a PCB with a STM32L432KCU6 and a microSD card connected to it via SPI at 40 MHz in SPI Mode 0. The communication is protected by CRC which is calculated by the microSD card on the fly. When heating up the PCB to approximately 55° C, the microcontroller receives erroneous data from the microSD card. A wave file is being read out and there occur several bit flips in the wave header data (for example, the microcontroller receives data that says the wave file has 0 channels instead of 1 or has sampling rate of 22051 instead of 22050). These errors only occur from 55°C on. The strange thing is that the CRC seems to be correct as the microcontroller does not detect any CRC errors. Therefore, it seems that the microSD card calculates the CRC for the erratic data. The data are transmitted as 16 bit. If the errors occur, they always occur in the middle of the transmission (i.e. between the first and last bit). I tested several microSD cards (Kingston class 10 and SanDisk class 10 which are rated for 85° C), but the problem maintains. Only the needed temperature to produce this behavior differs slightly.

  • Kingston class 10: erratic data at temperatures above 55° C
  • SanDisk class 10: erratic data at temperatures above 63° C

All parts on the PCB are rated for 85° C.

Does anyone have an idea what could cause this?

\$\endgroup\$
7
  • \$\begingroup\$ 55°C for an SD card is pretty hot, you may have to switch to an industrial SD card. I'm guessing that the card is what is actually causing the issues. Are these off-the-shelf cards? When you say they are "rated", where did you read those rates? Are those storage rates, or operational? \$\endgroup\$
    – Ron Beyer
    Commented Feb 25, 2020 at 18:16
  • \$\begingroup\$ @RonBeyer: Yes, they are off-the-shelf cards. It confuses me though because they are actually rated for 85° C. \$\endgroup\$
    – Hermetica
    Commented Feb 25, 2020 at 18:17
  • 1
    \$\begingroup\$ I edited my comment, can you source where you read those rated values? If those are "storage" temps instead of operational ones that could be the difference. \$\endgroup\$
    – Ron Beyer
    Commented Feb 25, 2020 at 18:17
  • \$\begingroup\$ @RonBeyer: It says operational temperature: kingston.com/en/memory-cards/canvas-select-plus-microsd-card \$\endgroup\$
    – Hermetica
    Commented Feb 25, 2020 at 18:18
  • \$\begingroup\$ So, what "communication" has to do with errors if CRC is correct? It seems the data is corrupted on SD card itself, in which case nothing you can do on MCU side. Frankly, I am surprised that you are getting any data at 40 MHz, the SPI interface is not a subject to speed class ratings. In fact, I believe the spec says something along the line "when using SPI protocol all cards should be considered Class 0" \$\endgroup\$
    – Maple
    Commented Feb 25, 2020 at 18:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.