UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
1,116 Views
Registered: ‎02-04-2016

Access to Zynq CAN peripheral hangs !

Jump to solution

Hi,

I am trying to access the CAN IP in Zynq using linux platform. The CAN peripheral is located in address 0xE0008000. Whenever i try to devmem to that address , my system hangs. I am attaching device tree dts file I am using.


This is the hard IP in Zynq PS side and hence PL side has nothing to do I guess. I suspect mainly the device tree file and hence attaching it .

Goutham

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Scholar rfs613
Scholar
1,745 Views
Registered: ‎05-28-2013

Re: Access to Zynq CAN peripheral hangs !

Jump to solution
Hangs like this are usually caused by a missing clock signal. The IP does not respond to requests and this causes the whole bus to hang.

Normally the clocks for the subsystems are configured in Vivado. Clocks are all derived from one of the three primary clocks, with additional dividers. This is turned into code that is part of the FSBL and therefore part of BOOT.BIN. Thus clocks are enabled long before linux boots.

It is also possible to manually set the registers: there is typically one to select the clock source and its divisor, and a second one to enable the subsystem. For the CAN subsystem, the relevant registers are:

CAN_CLK_CTRL at 0xF800015C
CAN_RST_CTRL at 0xF8000220
0 Kudos
2 Replies
Scholar rfs613
Scholar
1,746 Views
Registered: ‎05-28-2013

Re: Access to Zynq CAN peripheral hangs !

Jump to solution
Hangs like this are usually caused by a missing clock signal. The IP does not respond to requests and this causes the whole bus to hang.

Normally the clocks for the subsystems are configured in Vivado. Clocks are all derived from one of the three primary clocks, with additional dividers. This is turned into code that is part of the FSBL and therefore part of BOOT.BIN. Thus clocks are enabled long before linux boots.

It is also possible to manually set the registers: there is typically one to select the clock source and its divisor, and a second one to enable the subsystem. For the CAN subsystem, the relevant registers are:

CAN_CLK_CTRL at 0xF800015C
CAN_RST_CTRL at 0xF8000220
0 Kudos
Highlighted
Adventurer
Adventurer
1,044 Views
Registered: ‎02-04-2016

Re: Access to Zynq CAN peripheral hangs !

Jump to solution

Thank you @rfs613. Yes That was the reason . Mainly, Three registers used to configure clocks and enable CAN are these.
APER_CLK_CTRL

CAN_CLK_CTRL

CAN_RST_CTRL

 

Zynq-7000 TRM was really helpful.

 

Goutham

 

0 Kudos