Part Number:AM2732
使用官方的SDK驱动配置的以太网部分,接收采用DMA方式,目前只能接收到VLAN优先级为0的报文,接收不到VLAN优先级为非0的报文。但项目要求接收的VLAN优先级为非0,关于这一块驱动如何配置呢?
Shine:
请问您运行的是SDK里的哪个demo? 做了怎样的修改?
,
zuo gang:
运行的mcu_plus_sdk_am273x_08_01_00_34里的networking,没做修改
,
Shine:
如果对例程没有做修改的话,请看一下是否按照下面文档中的步骤操作的?https://software-dl.ti.com/mcu-plus-sdk/esd/AM273X/08_03_00_18/exports/docs/api_guide_am273x/EXAMPLES_NETWORKING.html
,
zuo gang:
没发现配置上有啥区别,可否指出哪些地方会影响vlan优先级报文的接收,我没有用lwip,就在底层dma里接收打断点发现非0优先级的报文进去不了。采用的是loopback例程只是没让进行回环功能,也按layer2_multi_channel试了都不行,急!
,
Shine:
我把您的问题升级到英文e2e论坛了,请关注下面帖子的回复。e2e.ti.com/…/am2732-how-to-configure-the-code-to-receive-the-non-zero-priority-vlan-message
,
Shine:
请参考下面e2e工程师的回复。
For receiving the non-zero priority VLAN, you need to add a policer entry with required priority using CPSW_ALE_IOCTL_SET_POLICER IOCTL.
AM273x MCU+ SDK: Enet LLD IOCTL interface (ti.com)
AM273x MCU+ SDK: CpswAle_PolicerMatchParams Struct Reference (ti.com)
AM273x MCU+ SDK: CPSW Address Lookup Engine (ALE) (ti.com)
For using the Enet IOCTLs, you can refer to existing examples in mcu_plus_sdk_am273x_08_03_00_18\examples\networking.
,
zuo gang:
Shine,你好。我这里由于公司邮箱注册论坛Id后,邮件的确认网址不允许被打开。所以无法在英文论坛回复。麻烦您帮转下,谢谢了。
我现在按贴子设置了policer,但是现在连以太网报文都发布出来了,代码如下图,以太网报文发送没有使用lwip,直接构造报头发送的。
再下面为能接收到VLAN优先级为0的报文截图和接收不到vlan优先级为4的报文的截图
,
Shine:
工程师对他之前的回复有更新,请参考
Please ignore my previous response. I assumed you made changed to loopback code to enable specific priority handling.
Regarding your issue, can you please share how you send non-zero priority messages? Did you modify loopback example to create new VLAN packets?
Can you please share log and CPSW statistics (you can print stats using below)?
https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1040141/faq-mcu-plus-sdk-am243x-how-do-i-get-cpsw-diagnostic-statistics-using-debug-gels-in-mcu-sdk-enet-lld
,
zuo gang:
执行此脚本运行报错,如下图,然后将脚本里MSS_CPSW的基地址改为07000000,虽然不报错,但读不出任何寄存器的值
,
zuo gang:
我刚去掉了POLICER设置的那段代码,脚本设置MSS_CPSW基地址为0x07000000,可以打印出来状态信息,如下:
Cortex_R5_0: GEL Output: —>>> CPSW Gel Load In Progress… <<<—Cortex_R5_0: GEL Output: —>>> CPSW Gel Load DONE! <<<—Cortex_R5_0: GEL Output: STATS Cortex_R5_0: GEL Output: ——————————–Cortex_R5_0: GEL Output: PORT0 STATS Cortex_R5_0: GEL Output: ——————————–Cortex_R5_0: GEL Output: STAT_0_RXGOODFRAMES = 0x0000001CCortex_R5_0: GEL Output: STAT_0_RXBROADCASTFRAMES = 0x0000001CCortex_R5_0: GEL Output: STAT_0_RXOCTETS = 0x00000B98Cortex_R5_0: GEL Output: STAT_0_TXGOODFRAMES = 0x00000019Cortex_R5_0: GEL Output: STAT_0_TXBROADCASTFRAMES = 0x00000010Cortex_R5_0: GEL Output: STAT_0_TXMULTICASTFRAMES = 0x00000009Cortex_R5_0: GEL Output: STAT_0_TXOCTETS = 0x000009CFCortex_R5_0: GEL Output: STAT_0_OCTETFRAMES65T127 = 0x00000034Cortex_R5_0: GEL Output: STAT_0_OCTETFRAMES128T255 = 0x00000001Cortex_R5_0: GEL Output: STAT_0_NETOCTETS = 0x00001567Cortex_R5_0: GEL Output: STAT_0_ALE_UNKN_BRD = 0x00000003Cortex_R5_0: GEL Output: STAT_0_ALE_UNKN_BRD_BCNT = 0x0000013ECortex_R5_0: GEL Output: ——————————–Cortex_R5_0: GEL Output: PORT1 STATS Cortex_R5_0: GEL Output: ——————————–Cortex_R5_0: GEL Output: STAT_1_RXGOODFRAMES = 0x00000019Cortex_R5_0: GEL Output: STAT_1_RXBROADCASTFRAMES = 0x00000010Cortex_R5_0: GEL Output: STAT_1_RXMULTICASTFRAMES = 0x00000009Cortex_R5_0: GEL Output: STAT_1_RXOCTETS = 0x000009CFCortex_R5_0: GEL Output: STAT_1_TXGOODFRAMES = 0x0000001CCortex_R5_0: GEL Output: STAT_1_TXBROADCASTFRAMES = 0x0000001CCortex_R5_0: GEL Output: STAT_1_TXOCTETS = 0x00000B98Cortex_R5_0: GEL Output: STAT_1_OCTETFRAMES65T127 = 0x00000034Cortex_R5_0: GEL Output: STAT_1_OCTETFRAMES128T255 = 0x00000001Cortex_R5_0: GEL Output: STAT_1_NETOCTETS = 0x00001567Cortex_R5_0: GEL Output: STAT_1_ALE_UNKN_MLT = 0x00000002Cortex_R5_0: GEL Output: STAT_1_ALE_UNKN_MLT_BCNT = 0x00000105Cortex_R5_0: GEL Output: STAT_1_ALE_UNKN_BRD = 0x00000001Cortex_R5_0: GEL Output: STAT_1_ALE_UNKN_BRD_BCNT = 0x0000006ACortex_R5_0: GEL Output: STAT_1_TX_PRI_REG [0]= 0x0000001CCortex_R5_0: GEL Output: STAT_1_TX_PRI_BCNT_REG [0]= 0x00000B98Cortex_R5_0: GEL Output: STATS Cortex_R5_0: GEL Output: ——————————–Cortex_R5_0: GEL Output: PORT0 STATS Cortex_R5_0: GEL Output: ——————————–Cortex_R5_0: GEL Output: STAT_0_RXGOODFRAMES = 0x00000021Cortex_R5_0: GEL Output: STAT_0_RXBROADCASTFRAMES = 0x00000021Cortex_R5_0: GEL Output: STAT_0_RXOCTETS = 0x00000DAACortex_R5_0: GEL Output: STAT_0_TXGOODFRAMES = 0x00000025Cortex_R5_0: GEL Output: STAT_0_TXBROADCASTFRAMES = 0x00000016Cortex_R5_0: GEL Output: STAT_0_TXMULTICASTFRAMES = 0x0000000FCortex_R5_0: GEL Output: STAT_0_TXOCTETS = 0x00000E23Cortex_R5_0: GEL Output: STAT_0_OCTETFRAMES65T127 = 0x00000045Cortex_R5_0: GEL Output: STAT_0_OCTETFRAMES128T255 = 0x00000001Cortex_R5_0: GEL Output: STAT_0_NETOCTETS = 0x00001BCDCortex_R5_0: GEL Output: STAT_0_ALE_UNKN_BRD = 0x00000003Cortex_R5_0: GEL Output: STAT_0_ALE_UNKN_BRD_BCNT = 0x0000013ECortex_R5_0: GEL Output: ——————————–Cortex_R5_0: GEL Output: PORT1 STATS Cortex_R5_0: GEL Output: ——————————–Cortex_R5_0: GEL Output: STAT_1_RXGOODFRAMES = 0x00000025Cortex_R5_0: GEL Output: STAT_1_RXBROADCASTFRAMES = 0x00000016Cortex_R5_0: GEL Output: STAT_1_RXMULTICASTFRAMES = 0x0000000FCortex_R5_0: GEL Output: STAT_1_RXOCTETS = 0x00000E23Cortex_R5_0: GEL Output: STAT_1_TXGOODFRAMES = 0x00000021Cortex_R5_0: GEL Output: STAT_1_TXBROADCASTFRAMES = 0x00000021Cortex_R5_0: GEL Output: STAT_1_TXOCTETS = 0x00000DAACortex_R5_0: GEL Output: STAT_1_OCTETFRAMES65T127 = 0x00000045Cortex_R5_0: GEL Output: STAT_1_OCTETFRAMES128T255 = 0x00000001Cortex_R5_0: GEL Output: STAT_1_NETOCTETS = 0x00001BCDCortex_R5_0: GEL Output: STAT_1_ALE_UNKN_MLT = 0x00000002Cortex_R5_0: GEL Output: STAT_1_ALE_UNKN_MLT_BCNT = 0x00000105Cortex_R5_0: GEL Output: STAT_1_ALE_UNKN_BRD = 0x00000001Cortex_R5_0: GEL Output: STAT_1_ALE_UNKN_BRD_BCNT = 0x0000006ACortex_R5_0: GEL Output: STAT_1_TX_PRI_REG [0]= 0x00000021Cortex_R5_0: GEL Output: STAT_1_TX_PRI_BCNT_REG [0]= 0x00000DAA
,
Shine:
已在英文e2e上更新您的问题,请关注帖子的回复。
,
Shine:
抱歉,e2e那边的回复可能要晚一些。
Our experts are on leave please expect some delay in response. We will get back to you before end of next week.
,
zuo gang:
麻烦您再咨询下原厂这个问题:我发现导致POLICER match配置不成功的原因是ALE_STATUS这个寄存器值一直为0,怎样配置才可以使该寄存器中POLCNTDIV8不为0呢?
,
Shine:
已把您的问题在e2e帖子上更新,请关注帖子的回复。
,
Shine:
请看下面工程师最新回复。
Apologies for delay in response.
How to make POLCNTDIV8 is non zero?
This is a read only register.
Let me get back by tomorrow with more info on this.
,
Shine:
抱歉回复晚了。请看下面工程师的回复。能否发一下您的工程文件?
To debug this issue further I would need the below info here. As the example by default does not uses sample vlan packets and its configured for vlan unaware mode. And the example is configured for 0 vlan id UNICAST packets reception.
Prasad Jondhale said:
Regarding your issue, can you please share how you send non-zero priority messages? Did you modify loopback example to create new VLAN packets?For speeding up debug process, Can you please share example project(modified for vlan handling) by customer.
,
zuo gang:
我直接自定义结构体构造各层协议的包头(包括自定义的vlan)添加到以太网buf里,通过发送函数发送的
,
Shine:
已把您的问题在e2e帖子上更新,请关注帖子的回复。
,
zuo gang:
这个问题一直没解决,可否让原厂提供段接收非0vlan优先级报文的初始化代码或工程?这个应该不难吧
,
Shine:
抱歉,我去催一下工程师。