MPC7548G ENET BD Problems

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

MPC7548G ENET BD Problems

Jump to solution
1,502 Views
ailtonlopes
Contributor III

Hi, 

So recently I´ve been having a strange problem with the Buffer Descriptor array, so basically when the MAC gets to the last position of the BD array I stop receiving new data (no more interrupt is generated) and I have no idea why as I´m using the UDP example that comes with the IDE, I also have checked the PING example where it works fine and I have the same configurations, when I process the new data I´m writing the E bit back to 1 to mark the BD as free but the mac stops at the last position of the ring and never gets back to the first position. 
The number of messages I´m able to get its equal to the size of my buffer descriptor array´s size. 

I attached the code to this question and I´d appreciate any help as I´m running out of ideas on what might be the problem. 

Kind regards, 

Lopes

Labels (1)
Tags (1)
1 Solution
1,049 Views
PetrS
NXP TechSupport
NXP TechSupport

this will be caused by enabled data cache. Buffer descriptors should be placed in non-cachable region.

So either disable cache in startup or configure ceitain memory as cache inhibited using SMPU as mentioned here:

https://community.nxp.com/message/818983?commentID=818983#comment-804432 

BR, Petr

View solution in original post

4 Replies
1,049 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

seems you set start address of descriptiors in ENET_RDSR to the non used one. You have defined rxdb and rx2bd descriptor rings but work with rxdb. Also the only rxdb last descriptor has Wrap bit set.

But ENET_RDSR points to rx2db[0].

BR, Petr

1,049 Views
ailtonlopes
Contributor III

Another thing that I was able to realize is that sometimes I get the message but the MAC never sets the E (bit 0 of offset + 0 reg) bit on the buffer descriptor struct.

0 Kudos
1,050 Views
PetrS
NXP TechSupport
NXP TechSupport

this will be caused by enabled data cache. Buffer descriptors should be placed in non-cachable region.

So either disable cache in startup or configure ceitain memory as cache inhibited using SMPU as mentioned here:

https://community.nxp.com/message/818983?commentID=818983#comment-804432 

BR, Petr

1,049 Views
ailtonlopes
Contributor III

Hi PetrS‌ thank for the reply, 
Actually I made a mistake there and forgot to change back to the rxdb instead of the rx2db as I was trying to see if setting it to an other buffer would work, but even with the ENET_RDSR pointer set to rxdb its not working.

Here´s the old version of the code, where I'm doing everything the same as in the original example but when i get x messages and x= size of my bd array the driver never gets an other message. In this one by bd size is set to 20 ( NUM_RXBDS 20 in eth_conf.h) so I'm only getting 20 frames.

Again thanks for the reply and sorry for the mistake with the code.

0 Kudos