Freed Buffer out of Range Issue in Ethernet for RT1170

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

Freed Buffer out of Range Issue in Ethernet for RT1170

767 Views
Meher_Vanukuri
Contributor I

Hi,

I am trying to execute basic ethernet testing from custom project on custom board. As a part of this project (which integrates different modules like SD card, CAN ,GPIO,ADC, Ethernet and EEPROM) basic ethernet send and receive is to be verified. But I am facing "freed buffer out of range error" before ping send. I have done all the basic initializations and configurations related to ethernet. I see the error is observed because of line  LWIP_ASSERT("Freed buffer out of range", ((idx >= 0) && (idx < ENET_RXBUFF_NUM))); in function "ethernetif_rx_free" (enet_ethernetif_kinetis.c) where the idx value I am getting it in negative. This complete functionality is working on EVK kit.

What could be missing? Kindly suggest.

0 Kudos
Reply
7 Replies

719 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

 

What SDK version are you using?

What is the SDK example you are using to test this?

If I understood correctly, the application works fine in an EVK, am I right?

 

Regards,

Daniel.

0 Kudos
Reply

688 Views
Meher_Vanukuri
Contributor I

Hi,

I am using SDK version 11.6.1. I'm trying to test lwip_ping_bm_cm7 example. It is working fine in EVK.

But it is not working in custom board when tried to interface all the source codes with Ethernet. What might be the issue if we are facing "Freed Buffer out of range" occurs. Please help me with this.

 

0 Kudos
Reply

681 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Could you please double check if there are any peripheral changes (i.e. peripheral instances) needed in your project in order to make the EVK example work in your custom hardware?

 

In case you already verified this, seems the problem is on the HW side.

By any chance have you already verified your design with the HDG?

 

Regards,

Daniel.

0 Kudos
Reply

638 Views
Meher_Vanukuri
Contributor I

Hi,

Actually the individual source code of Ethernet is working fine in Custom board. When I'm trying to integrate the code then Ethernet is not working. I observed that EIR register's 25th (RXF), 26th (TXB), and 27th (TXF) bits are set to 0, and the RDAR register's 24th bit is updated to 0. But in working code of Ethernet this registers are set to '1'. 

I suspect that these register updates are handled by interrupts, but I am unable to locate the specific handler responsible for these updates in my custom project codebase. Kindly help me.

0 Kudos
Reply

605 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

If I am understanding correctly, when you run the SDK example it works. But when you add your custom application, the issue appears. Can you confirm?

Regards,

Daniel.

0 Kudos
Reply

594 Views
Meher_Vanukuri
Contributor I

Hi,

Yes, the issue appears when implementing the merged source code in custom board. But, the individual source of Ethernet_ping,which was not merged with remaining interfaces is working fine in Custom board. Problem arises when the individual source of Ethernet is merged with remaining interfaces.

 

0 Kudos
Reply

587 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

If the example project is working fine in your custom board, seems the problem is on SW side.

You are not using FreeRTOS right?

Seems there is something interfering with the behavior of the example, probably some configurations are missing or just the example flow is being affected due the rest of the application.

I would recommend you to try to use the latest SDK release which is 2.15.000. If your issue still occurs with this release, then I’m afraid there is something wrong with the flow of your application.

Regards,

Daniel.

0 Kudos
Reply