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
Solved! Go to Solution.
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
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
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.
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
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.