RT1176EVK SPI压力测试无法通过

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

RT1176EVK SPI压力测试无法通过

1,162 Views
emmmmmmmmmmmmmm
Contributor III

Hi,all

我在使用两块RT1176 EVK做SPI收发测试时,长时间测试,中间会出现数据传输错误或者数据出现偏移,能帮忙看下吗?

 

硬件连线如下

 主                              从  
CLK <=========> CLK

CS <=========> CS

MISO <=========> MOSI

MOSI <=========> MISO

两块板子根据readme卸掉了R200,R404,R406,R408.

测试现场如下

c9027af8ee4af8333fd48151e2e1e06c.jpg

0 Kudos
8 Replies

1,051 Views
emmmmmmmmmmmmmm
Contributor III

出错时间不一定导致波形难以抓取,长的话两天会出现一次error,短则几小时出现一次error

0 Kudos

1,046 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I am thinking there with potential risk during SPI robust test: when SPI master start the transaction, while SPI slave are not ready (SPI slave eDMA was not ready to receive data). You can calculate the SPI communication count . During SPI master code, you could print count value with 10 minutes interval. Then you could check when there with communication issue happens.

Mike

0 Kudos

1,152 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I checked attached codes, the SPI slave has a loopCounter variable.

What's the loopCounter value when the communication issue happens.

If add the delay time at SPI master could make the situation be better?

delay_ms(2);

And I also find below different setting with SPI pads, could you using below setting at <pin_mux.c> file.

IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_28_LPSPI1_SCK, 0x02U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_29_LPSPI1_PCS0, 0x02U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_30_LPSPI1_SOUT, 0x02U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_31_LPSPI1_SIN, 0x02U);

Wish it helps.

Mike

0 Kudos

1,144 Views
emmmmmmmmmmmmmm
Contributor III

感谢回复
我会按照你的建议重新测试

0 Kudos

1,100 Views
emmmmmmmmmmmmmm
Contributor III

PinConfig设置0x02,延迟设置20ms,多次测试,仍然会出现问题。关于errorCount的值会不同,出问题时errorCount有时是1024有时是1或者其他值,并不固定

0 Kudos

1,077 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

Could you try to make below change:

while (1)
{

LPSPI_MasterTransferEDMA(EXAMPLE_LPSPI_MASTER_BASEADDR, &g_m_edma_handle, &masterXfer);

/* Wait until transfer completed */
while (!isTransferCompleted)
{
}
isTransferCompleted = false;

 

Change to 

while (1)
{

isTransferCompleted = false;

LPSPI_MasterTransferEDMA(EXAMPLE_LPSPI_MASTER_BASEADDR, &g_m_edma_handle, &masterXfer);

/* Wait until transfer completed */
while (!isTransferCompleted)
{
}

Wish it helps.

Mike

 

0 Kudos

1,073 Views
emmmmmmmmmmmmmm
Contributor III

按照您的建议,还是会出现数据错误现象。

0 Kudos

1,071 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

能否提供SPI主从机通信时,USB逻辑分析仪抓取的信号波形。尤其是出错时候SPI总线信号情况。

Mike

0 Kudos