s32k3 sdhc/sdio read data uncorrect

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

s32k3 sdhc/sdio read data uncorrect

698 次查看
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.

 

标记 (1)
0 项奖励
7 回复数

644 次查看
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 项奖励

624 次查看
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 项奖励

591 次查看
Nhi_Nguyen
NXP Employee
NXP Employee

Hi jiangyaqiang,

Could please provide detail how it fail in while?

Best regards,

Nhi

 

0 项奖励

588 次查看
jiangyaqiang
Contributor IV

HI :

 

it will trigger "HardFault" event.

0 项奖励

585 次查看
Nhi_Nguyen
NXP Employee
NXP Employee

Hi jiangyaqiang,

Can you send me your project or configuration?

Best regards,

Nhi

0 项奖励

583 次查看
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 项奖励

490 次查看
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 项奖励