GMAC MTL RXQ_Debug PRXQ read fails

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

GMAC MTL RXQ_Debug PRXQ read fails

1,178 次查看
oliver777777
Contributor II

Hi, 

I have ethernet traffic running into GMAC 0 thats functioning properly but I want to periodically read out the packet count of the RXQs in the MTL. 

I'm reading off the PRXQ field every 1ms in the MTL_RXQ0_DEBUG, 1, and 2 registers but I'm only getting 0s suggesting that there is never a packet in the RXQ. I've attempted to read across all 3 queues without success. It seems I can read the overflow counter properly, as when I pause GDB the overflow counter will fill up. 

I read it through a direct hardware access to the registers: 

#define GMAC_MTL_RXQ_GET(x) \
  (uint32_t)(((x)&GMAC_MTL_RXQ0_DEBUG_RXQSTS_MASK) >> GMAC_MTL_RXQ0_DEBUG_RXQSTS_SHIFT)

Am I missing something in how the MTL_RXQ_DEBUG register works? Is there a better solution to monitor the DMA/MTL fill status (eth bus load)?

0 项奖励
回复
2 回复数

1,147 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi oliver,

let me check this RX queue question with Apps team.
Anyway how did you really read MTL_RXQ0_DEBUG register, as this macro just returns RXQSTS field content from given x value?
Maybe module DMA is reading out the queue meanwhile, so you read queue as empty.  

What about to simply use MAC Management Counters, which store the statistics about the received and transmitted packets in registers; see more in chapter 76.11 MAC Management Counters of the Reference Manual.

BR, Petr

0 项奖励
回复

1,170 次查看
oliver777777
Contributor II
As a followup: do the corresponding fields in MTL_DBG_CTL have to set correctly to be able to access MTL_RXQ0_DEBUG registers or are they decoupled?
0 项奖励
回复