s32k3 sdhc/sdio read data uncorrect

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

s32k3 sdhc/sdio read data uncorrect

605 Views
jiangyaqiang
Contributor IV

HI anyone, 

          I got a problem when using s32k358 usdhc/sdio to config wifi module 88w8987.

          After download FW success, it need to read some data from the module, but it will always got uncorrect data at somewhere, but there is no error during transfer(no CRC or DMA error).

        I have disabled D-cache and I-cache, and do not use DMA, the no help.

       And when the data uncorrect, it always uncorrect in first 4 bytes, as bellow picture:

jiangyaqiang_0-1697717685698.png

      Could anyone give me a hand ?

  Thanks very much.

 

Tags (1)
0 Kudos
7 Replies

551 Views
Nhi_Nguyen
NXP Employee
NXP Employee

Hi @jiangyaqiang ,

Did you try to put data buffer into the non-cache memory? like this:

Nhi_Nguyen_0-1700041114626.png

Best regards,

Nhi

 

0 Kudos

531 Views
jiangyaqiang
Contributor IV

HI:

 

Thanks for reply. 

I have fixed the problem, it's because of hardware not good, I need to turn low the frequency , but not too low , it's ok for 1M , but fail at 400K.

but I have another problem when use DMA and cache, it will cache in function:

hwAcc_ArmCoreMx_DataCacheCleanByAddr(
false,
(uint32_t)(content->data->txData == NULL ? content->data->rxData : content->data->txData),
(content->data->blockSize) * (content->data->blockCount));

it will fail in the while of the function

hwAcc_ArmCoreMx_DataCacheCleanByAddr

{

   while(tmpAddr < endAddr)
   {
       *pDataCacheCleanByAddr = tmpAddr;
       MCAL_DATA_SYNC_BARRIER();
       MCAL_INSTRUCTION_SYNC_BARRIER();
      tmpAddr = tmpAddr + cacheLineSize; /* Clean 1 line at a time. */
   }

}

do you have any idea about it ?

0 Kudos

498 Views
Nhi_Nguyen
NXP Employee
NXP Employee

Hi jiangyaqiang,

Could please provide detail how it fail in while?

Best regards,

Nhi

 

0 Kudos

495 Views
jiangyaqiang
Contributor IV

HI :

 

it will trigger "HardFault" event.

0 Kudos

492 Views
Nhi_Nguyen
NXP Employee
NXP Employee

Hi jiangyaqiang,

Can you send me your project or configuration?

Best regards,

Nhi

0 Kudos

490 Views
jiangyaqiang
Contributor IV

HI Nhi:

 

I'm  using S32K3X8EVB , the code and config is from S32K3_SDHC_CD1_0_4_0_D2307_updatesite.zip example of "sdhc_wifi_S32K358"

0 Kudos

397 Views
Nhi_Nguyen
NXP Employee
NXP Employee

Hi @jiangyaqiang ,

I was attached an example for DMA and cache enabled. Please refer to it.

Best regards,

Nhi

0 Kudos