MPC7548G ENET BD Problems

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC7548G ENET BD Problems

ソリューションへジャンプ
4,796件の閲覧回数
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

ラベル(1)
タグ(1)
1 解決策
4,343件の閲覧回数
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

元の投稿で解決策を見る

5 返答(返信)
2,709件の閲覧回数
jamesportman
Contributor I

The original issue isn't solved, I have just wasted quite a lot of time on this.

I see other posts where it is said that cache config causes the issue where the end of the buffers are reached and then no more messages are received, although the interrupts keep firing.

I was using the example code exactly as supplied and it seems to have been broken for years..

0 件の賞賛
返信
4,343件の閲覧回数
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

4,343件の閲覧回数
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 件の賞賛
返信
4,344件の閲覧回数
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

4,343件の閲覧回数
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 件の賞賛
返信