cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Adventurer
Adventurer
386 Views
Registered: ‎06-13-2019

Xil_DataAbortHandler when reading from 0xFFFC0000 zynq 7000

Jump to solution

I'm doing an AXI stream to high mapped OCM through the ACP port of the Zynq 7000.  The AXI stream is coming from the PL.  When I do a read on address 0xFFFC0000 I get Xil_DataAbortHandler and the systems is stuck in a while loop.  I have the OCM set to high address and the DMA is mapped to 0xFFFC0000 to 0xFFFFFFFF in the Address Editor.  Here's my code:

DMA_in = Xil_In32(0x40410030);  //DMA control register

Xil_Out32(0x40410048, 0xFFFC0000);  //set stream start address
Xil_Out32(0x40410030, DMA_in | 1); //Set ready status
Xil_Out32(0x40410058, 0x1f00); //  BEGIN STREAM

u64* dataptr = (u64*)0xFFFC0000;

u64 data64;

for(int i=0; i<0x3e0; i++) {
data64= dataptr [i];
}

 

I want to be able to stream from PL to OCM and read the data in the PS for processing.  How will I do this?

 
 
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Voyager
Voyager
279 Views
Registered: ‎08-02-2019

Hi @jcwill585 ,

It seems, your OCM is not configured properly as high address enabled.

You can try same operations for other 3 OCM blocks:

0xFFFD0000, 0xFFFE0000, 0xFFFF0000(all of them has 64kB capacity)

 

Saban

 

<--- If reply is helpful, please feel free to give Kudos, and close if it answers your question --->

View solution in original post

5 Replies
Highlighted
Voyager
Voyager
349 Views
Registered: ‎08-02-2019

Hi @jcwill585 ,

Nowadays I'm writing my register values into OCM memory, but I'm using AXI Full Master Interfaces to do it.

About your problem I can recemmond you two things:

  1. I dont know whether you are using a DMA Reference Design or not. The most of the people recommend to use Xilinx's Bare Metal reference design. It contains a loopback test, you can configure it SG or simple mode. You can call it polling mode or by using interrupts. All of versions are ready to use in Xilinx directories.To utilize it takes maybe only one hour.  This video describes everything wonderful.
  2. About writing into OCM memory and get an error. I can recommend to write into same memory with different way.  Connect your target and run this command to test related address is really available or not.
  3. I'm adding an example XSCT console. mwr & mrd.

 

mwr 0xFFFC0000 0x1234
mrd 0xFFFC0000
mrd 0xFFFC0000 20 #Lists consecutive 20 Register value!

If you were using Petalinux, you could use also peek and poke commands to test related memory.

 

Saban

 

<------------------------------------------------------------------------------>

if(solves_problem) mark_as_solution <= 1 else if(helpful) Kudo <= Kudo + 1

 

<--- If reply is helpful, please feel free to give Kudos, and close if it answers your question --->
SDK_Targets_Mwr_Mrd.png
0 Kudos
Highlighted
Adventurer
Adventurer
283 Views
Registered: ‎06-13-2019

xsct% mwr 0xFFFC0000 0x1234 

xsct% Memory write error at 0xFFFC0000. Blocked address 0xfffc0000. OCM is not enabled at 0xfffc0000. Invalid address

I'm not able to do read or write to 0xFFFC0000 through xcst console.  I get "invalid Address".  I do have OCM as high address enabled in the block diagram configuration.  What should I try next?

 

0 Kudos
Highlighted
Voyager
Voyager
280 Views
Registered: ‎08-02-2019

Hi @jcwill585 ,

It seems, your OCM is not configured properly as high address enabled.

You can try same operations for other 3 OCM blocks:

0xFFFD0000, 0xFFFE0000, 0xFFFF0000(all of them has 64kB capacity)

 

Saban

 

<--- If reply is helpful, please feel free to give Kudos, and close if it answers your question --->

View solution in original post

Highlighted
Adventurer
Adventurer
266 Views
Registered: ‎06-13-2019

I'm able to read and write to 0xFFFF0000.  I read the slcr.OCM_CFG[RAM_HI] register and the value is 0x18.  According to the reference manual the OCM was only set to high for OCM3 which is 0xFFFF0000.  I wrote 0x1F to the OCM configuration register but the value did not change.  I'm able to do an xsct console read and write to 0x00000, 0x10000, 0x20000, and 0xFFFF0000.  My bare metal program, lwip echo server, still gets a Xil_DataAbortHandler when the program tries to read from 0x00000, 0x10000, 0x20000, and 0xFFFF0000.

0 Kudos
Highlighted
Voyager
Voyager
255 Views
Registered: ‎08-02-2019

Hi @jcwill585 ,

Strange.

I can recommend to you, to focus on MyXil_SetTlbAttributes function. It changes memory features.

// Disable L1 cache for OCM
MyXil_SetTlbAttributes(0xFFFF0000,0x04de2); 

normally xst consol works as:

Xil_In32(0xFFFF0000);
Xil_Out32(0xFFFF0000, 0x123);

you can try to execute this commands also.

I think, there is some other part of your design(Petalinux device-tree, Bare Metal bsp...), it somehow changes your memory's features.

 

Saban

 

<------------------------------------------------------------------------------>

if(solves_problem) mark_as_solution <= 1 else if(helpful) Kudo <= Kudo + 1

<--- If reply is helpful, please feel free to give Kudos, and close if it answers your question --->
0 Kudos