LAN Issue on SAMA5D3xek

Moderator: nferre

MSARUL36
Posts: 3
Joined: Thu Jul 05, 2018 6:38 am

LAN Issue on SAMA5D3xek

Thu Jul 05, 2018 8:16 am

Hello All,
We are using SAMA5D3xek board. We are using IAR 8.20 IDE. In board LAN is working fine if we disable the cache. When we enable the cache no packets are being received by the DMA (Ownership bit in receive buffer descriptor is always zero). The same way no packets are received if we choose SAMA5D35 as the target in options tab of project. We had to select the device as NONE, then only packets are being received by the Target. We would appreciate if you could help us find the issue.
blue_z
Location: USA
Posts: 1763
Joined: Thu Apr 19, 2007 10:15 pm

Re: LAN Issue on SAMA5D3xek

Fri Jul 06, 2018 8:41 pm

MSARUL36 wrote:We are using SAMA5D3xek board. We are using IAR 8.20 IDE.
...
That's not sufficient information.
Are we to guess that you're running some standalone program without an OS?
That EK board has two Ethernet ports, yet you only refer to a single external "LAN", i.e. a network?
How is the MMU configured?
By "cache", presumably you are referring to the processor cache?
Are you enabling/disabling the I or D or both processor caches?
What have you done to ensure that these buffers are DMA-able?

The EMAC and GMAC peripherals use DMA exclusively to transfer Ethernet frame data to/from memory; there is no programmed I/O capability.
In general, DMA and processor cache do not work well together, and can interfere with each other to produce data incoherence.
Is your unawareness of this conflict the crux of your problem?

Regards
MSARUL36
Posts: 3
Joined: Thu Jul 05, 2018 6:38 am

Re: LAN Issue on SAMA5D3xek

Sun Jul 08, 2018 6:51 am

Hello,
Thanks for your response. I am able to solve the problem. It was obviously with the cache handling. I had to remap the MMU table, and allocate some memory as non-cache-able in linker and configure the same as in MMU.

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 3 guests