s32k3 sdhc/sdio read data uncorrect

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

s32k3 sdhc/sdio read data uncorrect

1,411件の閲覧回数
jiangyaqiang
Contributor V

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 返答(返信)

1,357件の閲覧回数
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 件の賞賛
返信

1,337件の閲覧回数
jiangyaqiang
Contributor V

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 件の賞賛
返信

1,304件の閲覧回数
Nhi_Nguyen
NXP Employee
NXP Employee

Hi jiangyaqiang,

Could please provide detail how it fail in while?

Best regards,

Nhi

 

0 件の賞賛
返信

1,301件の閲覧回数
jiangyaqiang
Contributor V

HI :

 

it will trigger "HardFault" event.

0 件の賞賛
返信

1,298件の閲覧回数
Nhi_Nguyen
NXP Employee
NXP Employee

Hi jiangyaqiang,

Can you send me your project or configuration?

Best regards,

Nhi

0 件の賞賛
返信

1,296件の閲覧回数
jiangyaqiang
Contributor V

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 件の賞賛
返信

1,203件の閲覧回数
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 件の賞賛
返信