Mcu cannot receive packets from ethernet

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

Mcu cannot receive packets from ethernet

2,657 次查看
tianming_ji
Contributor I

Hello,I use imxrt1061 in my project.Sometimes I meet the problem that my board cannot receive any packets  from ethernet.After the board powers up,it can work well.It has LWIP protocol and we can ping from computer to board.After a while,occasionally,we find ping is error.I dump some register values as attached.You can see RMON_R_PACKETS(402D8284): 0000121E and IEEE_R_FRAME_OK(402D82CC): 0000121D.These two register values arenot equal.I think it is abnormal.

Can you explain the meaning of these two register and the reason they arenot equal.Thank you a lot.

 

标签 (1)
0 项奖励
回复
10 回复数

2,629 次查看
tianming_ji
Contributor I

All global data cannot be placed on OCRAM ?Could you give me some more detail explanation about it?

Thanks a lot

0 项奖励
回复

2,624 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi 

To make more accurate,   the enet descriptor and enet buffer need to be placed in a NON-CACHEABLE region.    DTCM is  a non cacheable region.  

in enet_etherentif_kinetis.c

AT_NONCACHEABLE_SECTION_ALIGN(static enet_rx_bd_struct_t rxBuffDescrip_0[ENET_RXBD_NUM], FSL_ENET_BUFF_ALIGNMENT);
AT_NONCACHEABLE_SECTION_ALIGN(static enet_tx_bd_struct_t txBuffDescrip_0[ENET_TXBD_NUM], FSL_ENET_BUFF_ALIGNMENT);
SDK_ALIGN(static rx_buffer_t rxDataBuff_0[ENET_RXBD_NUM], FSL_ENET_BUFF_ALIGNMENT);
SDK_ALIGN(static tx_buffer_t txDataBuff_0[ENET_TXBD_NUM], FSL_ENET_BUFF_ALIGNMENT);

 

Regards

Daniel

0 项奖励
回复

2,611 次查看
tianming_ji
Contributor I

I notice your examlpe code:

SDK_ALIGN(static rx_buffer_t rxDataBuff_0[ENET_RXBD_NUM], FSL_ENET_BUFF_ALIGNMENT);
SDK_ALIGN(static tx_buffer_t txDataBuff_0[ENET_TXBD_NUM], FSL_ENET_BUFF_ALIGNMENT);

it doesnot have AT_NONCACHEABLE_SECTION_ALIGN ahead

0 项奖励
回复

2,608 次查看
danielchen
NXP TechSupport
NXP TechSupport

They should be put to NON-CACHEBALE region according to my test.

0 项奖励
回复

2,595 次查看
danielchen
NXP TechSupport
NXP TechSupport

It should be 

AT_NONCACHEABLE_SECTION_ALIGN(static rx_buffer_t rxDataBuff_0[ENET_RXBD_NUM], FSL_ENET_BUFF_ALIGNMENT);
AT_NONCACHEABLE_SECTION_ALIGN(static tx_buffer_t txDataBuff_0[ENET_TXBD_NUM], FSL_ENET_BUFF_ALIGNMENT);

 

 

0 项奖励
回复

2,519 次查看
tianming_ji
Contributor I

Hi,Daniel:

Thanks for your reply.As we known,the ethernet driver code is from nxp.I want to know whether the official code has been changed like that.

Besides,according to ocram_dma.jpg,DMA visits ocram more effectively than TCAM

0 项奖励
回复

2,505 次查看
danielchen
NXP TechSupport
NXP TechSupport

The official code put the rx/tx buffers into the DTCM.  I will issue a ticket to the software team.

 

Regards

Daniel

0 项奖励
回复

2,650 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi

 

RMON_R_PACKETS: Rx packet count statistics register

IEEE_R_FRAME_OK:  Frames received OK statistics register.

It means packets missed during receiving.

Which RAM is the first RAM in your project?  can you dump your memory details?

 

Regards

Daniel

 
 

 

 

 

 

 

 

标记 (1)
0 项奖励
回复

2,648 次查看
tianming_ji
Contributor I

Attached is project build link file.

0 项奖励
回复

2,644 次查看
danielchen
NXP TechSupport
NXP TechSupport

Please also check your global data placement, if you place global data  to OCRAM, it will result in packets missing.

Regards

Daniel

0 项奖励
回复