Mcu cannot receive packets from ethernet

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

Mcu cannot receive packets from ethernet

3,596 Views
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.

 

Labels (1)
0 Kudos
Reply
10 Replies

3,568 Views
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 Kudos
Reply

3,563 Views
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 Kudos
Reply

3,550 Views
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 Kudos
Reply

3,547 Views
danielchen
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

3,534 Views
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 Kudos
Reply

3,458 Views
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 Kudos
Reply

3,444 Views
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 Kudos
Reply

3,589 Views
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

 
 

 

 

 

 

 

 

Tags (1)
0 Kudos
Reply

3,587 Views
tianming_ji
Contributor I

Attached is project build link file.

0 Kudos
Reply

3,583 Views
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 Kudos
Reply