Debugging SPI communication issues
Upendra Kumar
Automotive Software Engineer|Autosar|BSW|RTE|SWC|Memory Stack|Com Stack|CddSbc|Stepper Motor Driver|Bare-Metal Diriver|Integration MATLAB|Simulink|State flow|Embedded C
Case 1: Master can't able to produce clock and data?
? Root Causes:
Tip: Dump & inspect all SPI-related register values just before transmission.
Case 2: Master is sending data but slave is not receiving data?
? Root Causes:
Case 3: SPI Interrupts are not triggering?
? Root Causes:
Checklist: SPI_CR2 ? NVIC configuration ? ISR registration
Case 4: Master is producing right data but slave is receiving the different data?
? Root Causes:
IoT Lead
1 天前SPI Mode is most useful I found. I struggled for 2-3 days to initialize SD card in SPI mode due to mode differences for FAT file implemention using pic microcontrollers during 2012 That time SDIO interface was not available for pic microcontrollers, even today it is not available. Some PIC32 microcontrollers (MIPS-based) and SAM microcontrollers (ARM Cortex-based, acquired from Atmel) do offer SDHC or SDIO support.