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: 
Visitor hebin1124
Visitor
7,533 Views
Registered: ‎06-28-2016

Problem using UART0 on zedboard with amp system(linux&freeRTOS)

I want to use uart0 on cpu1 which run FreeRTOS, and it works fine with cpu0 running bare-metal app.

But, when I run linux on cpu0, neither FreeRTOS nor linux can access registers of uart0. For example:

2016-06-28 19:31:19屏幕截图.png

as you can see, I write value 0x114 to Control_reg0 of uart0, as i read it, it still 0. It also happens with my code,:

2016-06-28 19:36:37屏幕截图.png

here is the print of my code:

2016-06-28 19:38:07屏幕截图.png

BTW, at first time, I can't access the register too with cpu0 running bare-metal, but after i regenerate the fsbl with new hdf file, everything goes right. However, it still not works with linux, do I miss something?

 

Any help is highly appreciated.

 

 

0 Kudos
4 Replies
Xilinx Employee
Xilinx Employee
7,421 Views
Registered: ‎02-01-2008

Re: Problem using UART0 on zedboard with amp system(linux&freeRTOS)

Linux is probably controlling uart0. Remove uart0 from the devicetree.

0 Kudos
Adventurer
Adventurer
7,405 Views
Registered: ‎11-05-2014

Re: Problem using UART0 on zedboard with amp system(linux&freeRTOS)

When running an AMP configuration with Linux on CPU0 and an RTOS on CPU1, is removing a peripheral from the device tree the proper way to tell Linux to give up control of a peripheral so that CPU1 can use it?  Or is it to use one of the following?

 

ps7_i2c_0: ps7-i2c@e0004000 { compatible = "invalid"; };
ps7_i2c_0: ps7-i2c@e0004000 { status = "disabled"; };
/delete-node/ &ps7_i2c_0;

And is there another way to prevent Linux from turning off the clock for the peripheral, aside from kernel parameter "clk_ignore_unused", which seems like the shotgun approach to do this?

 

0 Kudos
Visitor hebin1124
Visitor
7,398 Views
Registered: ‎06-28-2016

Re: Problem using UART0 on zedboard with amp system(linux&freeRTOS)

Thank you for your reply, I have resolved this problem. I found removing uart0 from devicetree is not  enough, because somewhere in linux kernel initialize UART_CLK_CTRL and APER_CLK_CTRL register, and it close the clock of uart0, that is why I can't access the registers.

0 Kudos
Visitor moons520
Visitor
679 Views
Registered: ‎07-30-2017

Re: Problem using UART0 on zedboard with amp system(linux&freeRTOS)

I have the same problem,how to resolve this problem?

 

Thank u very much.

0 Kudos