Read USB Node and PHY configuration registers from xgdb

If you have a simple question and just want an answer.
cl-b
Active Member
Posts: 44
Joined: Fri Sep 15, 2017 2:58 pm

Read USB Node and PHY configuration registers from xgdb

Postby cl-b » Wed Oct 09, 2019 11:04 am

How can I read USB Node and PHY configuration registers from xgdb ?

I cannot find any information how to use sysreg command
User avatar
mon2
XCore Legend
Posts: 1518
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Wed Oct 09, 2019 12:31 pm

Please review this page posted from another developer:

https://xcore.com/viewtopic.php?f=47&t=4185
cl-b
Active Member
Posts: 44
Joined: Fri Sep 15, 2017 2:58 pm

Postby cl-b » Wed Oct 09, 2019 12:41 pm

Thanks, I already have a look to this thread but I can't find information about fields to access USB node and USB PHY configuration registers.
The thread describe how to access node configuration registers
User avatar
mon2
XCore Legend
Posts: 1518
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Fri Oct 11, 2019 3:23 pm

Hi. Have you seen the details inside the XU208 datasheet? There is info on the USB Node and PHY inside this document. Perhaps this is what you are after?

xmos_usb_register.png
You do not have the required permissions to view the files attached to this post.
cl-b
Active Member
Posts: 44
Joined: Fri Sep 15, 2017 2:58 pm

Postby cl-b » Fri Oct 11, 2019 3:54 pm

That's exactly the information I want to read but through xgdb. I have to use "sysreg" command.
As far as I understand the sysreg syntax command is "sysreg read $node $switch $reg".
To access node configuration $node = 0, $switch = 1 and $reg is the register address.
But I can't find which parameter values I have to use to access USB node and phy registers.
User avatar
mon2
XCore Legend
Posts: 1518
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Fri Oct 11, 2019 4:05 pm

I think you may have answered your own question...
To access node configuration $node = 0, $switch = 1 and $reg is the register address.
$reg = 0 ; Device Identification Register

Start with $reg = 0 and validate that the response = Device ID as per datasheet - no harm to test since this is a RO = read only register.

then proceed as per datasheet with:

$reg = 4 ; Node configuration register

and so on...USB node and PHY offsets are listed in the same document.

Is this what you are after?

Who is online

Users browsing this forum: Gothmag and 0 guests