Mcu cannot receive packets from ethernet

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

Mcu cannot receive packets from ethernet

2,654件の閲覧回数
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,626件の閲覧回数
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,621件の閲覧回数
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,608件の閲覧回数
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,605件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信

2,592件の閲覧回数
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,516件の閲覧回数
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,502件の閲覧回数
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,647件の閲覧回数
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,645件の閲覧回数
tianming_ji
Contributor I

Attached is project build link file.

0 件の賞賛
返信

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