Lwip packet drop while boot to SDRAM.

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

Lwip packet drop while boot to SDRAM.

1,336 Views
KyleHsieh
Contributor I

Hi,

I used "evkmimxrt1060_lwip_ping_freertos" original example code on MIMXRT1060-EVK board for ping test.

The attachment "original example code.txt" is log which I used example code for ping test.

The result seems ping function working well.

The other attachment "packet drop while boot to SDRAM.txt" is example code which modify memory details to boot to SDRAM.

The packet was dropped after ping for a while.

The code which I modified are as below,

memory details.JPG

linker script input sections.JPG

symbols.JPG

May I ask why boot to SDRAM will effect the ping function?

Did I use the wrong way to config my project to boot to SDRAM?

Please give us some advise.

Thank you.

 

Best Regards.

Kyle

0 Kudos
Reply
3 Replies

1,327 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi @KyleHsieh 

 

ENET buffers need to store in non-cacheable region.  please try below code change.

 

Original definition:(enet_ethernetif_kinetis.c)

    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);

 

Change to:

  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);

 

Regards

Daniel

0 Kudos
Reply

1,288 Views
GottiLuca
Contributor IV

Dear danielchan,

 

Many thanks for this useful hint, it helped me to solve a very similar problem ( packets drop ) in my ( quite large now )  project using both SDRAM and internal Flash on RT1064 part .

 

Just a suggestion : since this can be a very noisy problem to solve ( personally i've lost few days to figure out the cause ), It would not be better to declare this two buffer in non-cachable region by default in the SDK .. ?

Regards,

Luca 

 

 

0 Kudos
Reply

1,276 Views
danielchen
NXP TechSupport
NXP TechSupport

Thank you for your suggestion, I will report it to software team.

0 Kudos
Reply