cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
demke234
Visitor
Visitor
8,232 Views
Registered: ‎02-10-2015

/dev/mem access to PL registers, system freeze

Jump to solution

I have a system design with a blockram at 0x40000000, The memtest application runs correctly, but anytime I try to access this memory from u-boot or linux the system hangs.

 

I've found many threads of people experiencing similar issues, but no real solutions. One intriguing post discussed linux disabling clocks not in use, so depending on device tree contents that could be it then. But how can I fix this? And wouldn't access from u-boot still work?

 

I'm running debian on a Zybo board with the linux-xlnx kernel and u-boot-xilinx. My device tree does not contain the axi interconnect info etcetera, I still haven't figured out how to generate this proper.

 

.size() on the mmap-object in python returns zero, any access, read or write till cause system freeze.

 

Ever thankful for any advice or ideas.

1 Solution

Accepted Solutions
demke234
Visitor
Visitor
12,515 Views
Registered: ‎02-10-2015
This works in Linux also using the /dev/mem mmap method.

As far as I understand it the FSBL will only automatically enable the level shifters when and if it loads a .bit-file.

View solution in original post

0 Kudos
4 Replies
demke234
Visitor
Visitor
8,177 Views
Registered: ‎02-10-2015
I added a custom AXI device to the system and modified the bare-metal hello world to exercise this part.

The bare-metal app works fine but reading the registers from u-boot freezes the system. Assuming linux would freeze as well.

What is going on here, the FPGA i newly conffigured so the clocks should be running. Can i confirm this from u-boot somehow?


0 Kudos
demke234
Visitor
Visitor
8,167 Views
Registered: ‎02-10-2015

I haven't been able to confirm this works in linux, but at least I can now read and write the BRAM from u-boot without it hanging.

 

The solution was enabling the level shifters. This can be done by the following commands in u-boot:

 

mw.l 0xf8000008 0x0000df0d
mw.l 0xf8000900 0xf
mw.l 0xf8000008 0x00000000

 

 

 

0 Kudos
demke234
Visitor
Visitor
12,516 Views
Registered: ‎02-10-2015
This works in Linux also using the /dev/mem mmap method.

As far as I understand it the FSBL will only automatically enable the level shifters when and if it loads a .bit-file.

View solution in original post

0 Kudos
krishnam
Visitor
Visitor
1,916 Views
Registered: ‎12-02-2016
Hi demke234,

In u-boat code can you point how to add level shifter??
I am able to access BRAM from Linux, want to achieve the same in uboot.
Do you have any idea in zynq uboot on custom board how we can read i2c eeprom data?

Thanks,
Krishna
0 Kudos