cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
1,933 Views
Registered: ‎03-06-2017

write in slcr register from PL

Hi there !

I'm looking for a way to write in slcr register from PL (if it is possible !).
For now I run one baremetal application on each CPU. CPU0 is in charge to start CPU1.
I'm able to reset CPU1 from CPU0, But I would like to reset CPU1 from PL.
Sequence would be :
- unlock register
- reset CPU0
- lock register

Do you have any ideas ?

regards,
Yohan

0 Kudos
5 Replies
Highlighted
Moderator
Moderator
1,815 Views
Registered: ‎03-19-2014

Re: write in slcr register from PL

There is no method for the PL to have access to the PS register space that I'm aware of.   I think another way to do what you have in mind is to have the PL issue an interrupt to CPU0, then in that interrupt have CPU0 reset CPU1.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Observer
Observer
1,794 Views
Registered: ‎03-06-2017

Re: write in slcr register from PL

Hi glena, thank you for answer.

 

I found some clue that is should be possible, don't know exactly how though.

 

In ug585 (https://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf) I found this :

 

Note: Unlike the POR or system resets, when the user applies a software reset to a single processor, the user must stop the associated clock, de-assert the reset, and then restart the clock. During a system or POR reset, hardware automatically takes care of this. Therefore, a CPU cannot run the code that applies the software reset to itself. This reset needs to be applied by the other CPU or through JTAG or PL. Assuming the user wants to reset CPU0, the user must to set the following fields in the slcr.A9_CPU_RST_CTRL (address 0x000244) register in the order listed:

1. A9_RST0 = 1 to assert reset to CPU0

2. A9_CLKSTOP0 = 1 to stop clock to CPU0

3. A9_RST0 = 0 to release reset to CPU0

4. A9_CLKSTOP0 = 0 to restart clock to CPU0

 

So it seems to be possible.

In SLCR section in ug585 (p 114), it says : The System-Level Control registers (SLCR) consist of various registers that are used to control the PS behavior. These registers are accessible via the central interconnect using load and store instructions. 

 

So i'm gessing I need to find a way to talk with the PS central interconnect.  

I assume we can connect to the central interconnect through AXI slave GP port.

So I need to have an AXI master in PL to be able to talk with this port and write the right values to the right address.

But I don't exactly know how to do and where to begin to achieve this goal.

Not sure the flow is correct though.

 

Do you have any inputs ?

 

regards,

Yohan

0 Kudos
Highlighted
Moderator
Moderator
1,784 Views
Registered: ‎03-19-2014

Re: write in slcr register from PL

I think my interrupt solution is a much better method.    What you are trying to do is not a supported method.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Observer
Observer
1,779 Views
Registered: ‎03-06-2017

Re: write in slcr register from PL

This is not a solution for me. The PL MUST apply the reset to the CPU.

Maybe you know other way to reset CPU(s) only from PL.

 

Thank you anyways. 

0 Kudos
Highlighted
Visitor
Visitor
1,366 Views
Registered: ‎04-10-2018

Re: write in slcr register from PL

Hi,

 

did you solve your issue?

I am trying to achieve the same application.

 

regards,

 

Max

0 Kudos