S32K148 MCAL ENET EBERR 问题

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

S32K148 MCAL ENET EBERR 问题

Jump to solution
3,056 Views
fhz2000
Contributor II

您好 .遇到了问题.

以下是描述

目前正在配置S32K148-MCAL的Eth模块.

port中配置好pin脚

fhz2000_0-1726739311772.png

配置eth

fhz2000_1-1726739350182.png

生成代码后 组入

先调用eth_init

Eth_Init(&Eth_Config_VS_0);

随后使能控制器

Eth_SetControllerMode(EthConf_EthCtrlConfig_EthCtrlConfig_0, ETH_MODE_ACTIVE);

在此过程中

fhz2000_3-1726739557897.png

    Base->ECR |= ((uint32)(0x2U) | (0x100U));
    Base->ECR |= ((uint32)1U << (4U));
是可以正常配置ETHEREN为1的
fhz2000_5-1726740319507.png

 


但是一旦尝试初始化收发时,便会BUS ERROR

fhz2000_6-1726740363772.png

 

后续的发送更不可能了

请问我该如何继续调查

 

0 Kudos
Reply
1 Solution
2,993 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you can check following.
- be sure user buffer and buffer descriptors are properly aligned and placed into non-cacheable area. ENET_RDSR and ENET_TDSR points to beginning of buffer descriptors rings.
- if MPU is enabled, be sure ENET master have access to memory area where user buffer and buffer descriptors are placed.

Some comments can be seen in https://community.nxp.com/t5/S32-SDK/The-ENET-module-of-S32K148-chip-failed-to-initialize-and-the/td...as well.

BR, Petr

View solution in original post

4 Replies
3,032 Views
fhz2000
Contributor II

问题进展更新 : 现在追查到MPU的 CESR 寄存器了.看起来好像是uDMA尝试访问内存时被内存保护察觉到并拦截了.

fhz2000_0-1726749164182.png

fhz2000_1-1726749178708.png

 

0 Kudos
Reply
2,994 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you can check following.
- be sure user buffer and buffer descriptors are properly aligned and placed into non-cacheable area. ENET_RDSR and ENET_TDSR points to beginning of buffer descriptors rings.
- if MPU is enabled, be sure ENET master have access to memory area where user buffer and buffer descriptors are placed.

Some comments can be seen in https://community.nxp.com/t5/S32-SDK/The-ENET-module-of-S32K148-chip-failed-to-initialize-and-the/td...as well.

BR, Petr

2,948 Views
fhz2000
Contributor II
感谢 问题解决
0 Kudos
Reply
2,949 Views
fhz2000
Contributor II

感谢回复 问题已经 解决 原因是没配置MCAL的RM模块导致MPU模块没初始化ENET相关的内存访问权限

Tags (1)
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1957588%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ES32K148%20MCAL%20ENET%20EBERR%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1957588%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%20I%20have%20encountered%20a%20problem.%3C%2FP%3E%3CP%3EHere%20is%20the%20description%3C%2FP%3E%3CP%3ECurrently%20configuring%20the%20Eth%20module%20of%20S32K148-MCAL.%3C%2FP%3E%3CP%3Eport%E4%B8%AD%E9%85%8D%E7%BD%AE%E5%A5%BDpin%E8%84%9A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22fhz2000_0-1726739311772.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22fhz2000_0-1726739311772.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F299995i0153AB5CC34F7DDF%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22fhz2000_0-1726739311772.png%22%20alt%3D%22fhz2000_0-1726739311772.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EConfigure%20eth%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22fhz2000_1-1726739350182.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22fhz2000_1-1726739350182.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F299996i29C159464338688F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22fhz2000_1-1726739350182.png%22%20alt%3D%22fhz2000_1-1726739350182.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EAfter%20generating%20the%20code%2C%20insert%3C%2FP%3E%3CP%3EFirst%20call%20eth_init%3C%2FP%3E%3CP%3E%3CSPAN%3EEth_Init%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%3EEth_Config_VS_0%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThen%20enable%20the%20controller%3C%2FP%3E%3CP%3E%3CSPAN%3EEth_SetControllerMode%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3EEthConf_EthCtrlConfig_EthCtrlConfig_0%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3EETH_MODE_ACTIVE%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIn%20the%20process%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22fhz2000_3-1726739557897.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22fhz2000_3-1726739557897.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F299999i93F985CC641F4898%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22fhz2000_3-1726739557897.png%22%20alt%3D%22fhz2000_3-1726739557897.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3EBase%3C%2FSPAN%3E%3CSPAN%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3EECR%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3D%3C%2FSPAN%3E%3CSPAN%3E%20((%3C%2FSPAN%3E%3CSPAN%3Euint32%3C%2FSPAN%3E%3CSPAN%3E)(%3C%2FSPAN%3E%3CSPAN%3E0x2U%3C%2FSPAN%3E%3CSPAN%3E)%20%3C%2FSPAN%3E%3CSPAN%3E%7C%3C%2FSPAN%3E%3CSPAN%3E%20(%3C%2FSPAN%3E%3CSPAN%3E0x100U%3C%2FSPAN%3E%3CSPAN%3E))%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3EBase%3C%2FSPAN%3E%3CSPAN%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3EECR%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3D%3C%2FSPAN%3E%3CSPAN%3E%20((%3C%2FSPAN%3E%3CSPAN%3Euint32%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3CSPAN%3E1U%3C%2FSPAN%3E%20%3CSPAN%3E%26lt%3B%26lt%3B%3C%2FSPAN%3E%3CSPAN%3E%20(%3C%2FSPAN%3E%3CSPAN%3E4U%3C%2FSPAN%3E%3CSPAN%3E))%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EIt%20is%20possible%20to%20configure%20ETHEREN%20to%201%20normally%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22fhz2000_5-1726740319507.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22fhz2000_5-1726740319507.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F300003i9967C554BCB48F33%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22fhz2000_5-1726740319507.png%22%20alt%3D%22fhz2000_5-1726740319507.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3EHowever%2C%20once%20you%20try%20to%20initialize%20the%20transmission%20and%20reception%2C%20a%20BUS%20ERROR%20will%20occur.%3C%2FP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22fhz2000_6-1726740363772.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22fhz2000_6-1726740363772.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F300005i2512DD42FC1DEC7F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22fhz2000_6-1726740363772.png%22%20alt%3D%22fhz2000_6-1726740363772.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CP%3ESubsequent%20sending%20is%20even%20more%20impossible%3C%2FP%3E%3CP%3EHow%20can%20I%20continue%20the%20investigation%3F%3C%2FP%3E%3CBR%20%2F%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1961234%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K148%20MCAL%20ENET%20EBERR%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1961234%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3EThanks%20for%20solving%20the%20problem%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1961232%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3EProblem%20Solving%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1961232%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3EThanks%20for%20your%20reply.%20The%20problem%20has%20been%20solved.%20The%20reason%20is%20that%20the%20RM%20module%20of%20MCAL%20is%20not%20configured%2C%20which%20causes%20the%20MPU%20module%20to%20fail%20to%20initialize%20the%20ENET-related%20memory%20access%20permissions.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1959913%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20S32K148%20MCAL%20ENET%20EBERR%20%E9%97%AE%E9%A2%98%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1959913%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3Eyou%20can%20check%20following.%3CBR%20%2F%3E-%20be%20sure%20user%20buffer%20and%20buffer%20descriptors%20are%20properly%20aligned%20and%20placed%20into%20non-cacheable%20area.%20ENET_RDSR%20and%20ENET_TDSR%20points%20to%20beginning%20of%20buffer%20descriptors%20rings.%3CBR%20%2F%3E-%20if%20MPU%20is%20enabled%2C%20be%20sure%20ENET%20master%20have%20access%20to%20memory%20area%20where%26nbsp%3Buser%20buffer%20and%20buffer%20descriptors%20are%20placed.%3C%2FP%3E%0A%3CP%3ESome%20comments%20can%20be%20seen%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-SDK%2FThe-ENET-module-of-S32K148-chip-failed-to-initialize-and-the%2Ftd-p%2F1788630%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-SDK%2FThe-ENET-module-of-S32K148-chip-failed-to-initialize-and-the%2Ftd-p%2F1788630%20%3C%2FA%3Eas%20well.%3C%2FP%3E%0A%3CP%3EBR%2C%20Petr%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1957695%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K148%20MCAL%20ENET%20EBERR%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1957695%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3EUpdate%3A%20Now%20we%20have%20traced%20the%20MPU's%20CESR%20register.%20It%20looks%20like%20the%20memory%20protection%20detected%20and%20blocked%20the%20uDMA%20attempt%20to%20access%20the%20memory.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22fhz2000_0-1726749164182.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22fhz2000_0-1726749164182.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F300029iD0CFEC0B78426512%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22fhz2000_0-1726749164182.png%22%20alt%3D%22fhz2000_0-1726749164182.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22fhz2000_1-1726749178708.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22fhz2000_1-1726749178708.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F300030i6C6947E00E3FEE11%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22fhz2000_1-1726749178708.png%22%20alt%3D%22fhz2000_1-1726749178708.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E