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.
All global data cannot be placed on OCRAM ?Could you give me some more detail explanation about it?
Thanks a lot
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
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
They should be put to NON-CACHEBALE region according to my test.
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);
The official code put the rx/tx buffers into the DTCM. I will issue a ticket to the software team.
Regards
Daniel
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
Please also check your global data placement, if you place global data to OCRAM, it will result in packets missing.
Regards
Daniel