Hello NXP Community,
I am currently working on a project involving the S32K146 MCU and facing a critical issue with SPI communication.
Issue Description:
When I integrate the FATFS library for SD card operations with LPSPI communication, the MCU fails to read the MCU registers correctly. Here's a detailed breakdown of the problem:
- SD Card Module: When using only the SD card module with the FATFS library, everything works as expected, and the MCU can read and write to the SD card without issues.
- Full BMS Code: The problem arises when I integrate the SD card module with the rest of my BMS code. In this scenario, the MCU fails to read the registers correctly.
Debugging Steps Taken:
- Verified that the SD card module works fine in isolation.
- Checked the SPI communication lines for potential conflicts or noise.
- Ensured that the SPI configurations do not overlap or conflict with other peripherals.
- Analyzed the code to identify any potential issues with interrupt handling or priority settings.
Additional Information:
- Microcontroller: NXP S32K146
- Libraries Used: FATFS library for SD card operations, NXP SDK for S32K146
- Communication Protocols: LPSPI for SPI communication
- Symptoms: Failure to read MCU registers when both SD card and other SPI communications are active. No issues when SD card module is used alone.
Request for Assistance:
I would greatly appreciate any insights or suggestions to resolve this issue. Specifically, I am looking for advice on:
- Potential conflicts between FATFS and LPSPI communication.
- Best practices for integrating multiple SPI devices with the S32K146 MCU.
- Any known issues or recommended configurations to avoid register read failures in such scenarios.
Thank you in advance for your support!
Best regards,
Koushik