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?