Hi, We are using MPC5748G and have Ethernet 0 configured and working fine.
We have the following memory sections configured in RAM.
ram : ORIGIN = 0x40018000, LENGTH = 0x00080000 /* Internal SRAM for data */
ethbuf : ORIGIN = 0x40090000, LENGTH = 0x00020000 /* Internal SRAM for data */
The ethbuf region is used for Eth Tx/Rx buffers and Eth Tx/Rx Buffer descriptors. The map file generated contains the following:
.ethbuf 0x0000000040090000 0x7a80 objs//Eth_31_MPC5748G_PBcfg.o
0x0000000040090000 Eth_TxBuffers_0
0x0000000040093c00 Eth_RxBuffers_0
0x0000000040097800 Eth_TargetTxBufferDescriptors_0
0x0000000040097940 Eth_TargetRxBufferDescriptors_0
This is working fine in normally. Now, we tried to enable memory protection and we are facing issue. We are not able to set the controller mode to Active. After setting the controller mode to active, setting the RDAR(Receive descriptor active register) produces the EBERR and the controller mode gets reset.
We analyzed and found that the EBERR happens because the Ethernet Rx/Tx descriptors region is mpu protected and that is the reason for this error. Cache Inhibit is set for all the memory regions.
We just tried to disable the SMPU_0 and SMPU_1 just to make sure that the mpu protection is the problem and we were able to see the packets.
Can you please suggest what is the correct way to have MPU protection and also to have separate region defined for Eth Rx/Tx buffer and Eth Rx/Tx buffer descriptors?