.MX53: Failure of Simultaneous usage of SPI and SD Memory in WinCE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

.MX53: Failure of Simultaneous usage of SPI and SD Memory in WinCE

860 Views
StanleyLee
NXP Employee
NXP Employee

A customer is facing issues in using SPI and SD card simultaneously.

 

   Please find the attached code and observations observed by the team.

1. SPI NOR Read Write

Pre-requisite:   SPI NOR with DMA burst Len = 64*32, Exchange Count = 64. Logging in "SDMemory".

Operation:  A. Read/write operations on SPINOR and log messages stored in SDMemory.

                        B. From file manager  copy file >100KB file to SDMemory.

Result:  SPI DMA Communication Failed, Not able to access SDMemory and got hanged.

 

2. SPI NOR Read Write

Pre-requisite:     SPI NOR without DMA (ECSPI_Test32bit.cpp line no. 159 buscnfg.usedma = FALSE) burst Len = 64*32, Exchange Count = 64. Logging in "SDMemory".

Operation:  A. Read/write operations on SPINOR and log messages stored in SDMemory.

                        B. From file manager  copy file >100KB file to SDMemory.

Result:  Works Fine. No Hang.

 

3. SPI NOR Read Write

Pre-requisite:     SPI NOR with DMA burst Len = 64*32, Exchange Count = 64. Logging in "Hard Disk"

Operation:  A. Read/write operations on SPINOR and log messages stored in "Hard Disk"(USB stick).

                        B. From file manager  copy file >100KB file to SDMemory.

Result:  Works Fine. No Hang.

Labels (1)
Tags (2)
0 Kudos
1 Reply

500 Views
StanleyLee
NXP Employee
NXP Employee

In default,  SD driver only uses ADMA, and by default our eCSPI driver uses non-DMA mode, so we didn't see any issue during our test.

 

However, we found that :

When eCSPI enables DMA mode, eCSPI uses DMA, but does not use the DMA channel interrupt. While ISR will still report eCSPI DMA channel irq number, and an improper sysintr number is mapped which is the exact SDHC1 sysintr, then OS disables SDHC1 irq interrupt by OEMInterruptDisable( ), so SDHC1 does not work.

 

The fix is to register eCSPI TX/RX DMA channels sysintr numbers to avoid such conflict.

 

Please refer to attachment

0 Kudos