[prev in list] [next in list] [prev in thread] [next in thread]
List: openocd-development
Subject: Re: [OpenOCD-devel] How to read slow (250ms) register over ftdi?
From: Rick Foos <rfoos () solengtech ! com>
Date: 2018-08-12 20:18:40
Message-ID: 05fbd2ad-9c27-14e3-9b3c-9f029c6e06ba () solengtech ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Thank you Matthias and Andreas!
Andreas, a combination of $dap_name.memaccess and adapter_khz, allowed
me to work around the problem.
There is a case where memaccess must be set > the 255 maximum.
I have one question on the best way to set an address range for special
read/write processing.
Thank you,
Rick
---
One request (no change involved): Please leave the ability to set
memaccess above the 255 maximum value.
The default max memaccess is 255. This is set in target/arm_dap.c:47
dap_instance_init.
I need memaccess to go above this (up to 400) to work with some adapters
that will not run below 1Mhz.
It is not a problem in that I can set $dap_name.memaccess to any 32 bit
value, the 255 max is not enforced. (arm_adi_v5.c:1593
dap_memaccess_command)
Technically that is a bug. If it is fixed in the future, I will need a
workaround.
---
One question: Is there a way to trigger an event based on address range?
Only one peripheral bus has this delay problem. I need to save and
restore adapter_khz and $dap_name.memaccess on each read and write of a
range of addresses.
I can create some special commands to wrap read and write accesses with
the settings for the slow bus.
The slow bus commands could be responsible to determine which addresses
need timing adjustments.
Is there a better way to define address ranges to adjust timing on all
read/write accesses?
On 08/09/2018 09:29 AM, Andreas Fritiofson wrote:
>
>
> On Tue, Aug 7, 2018 at 6:58 AM, Rick Foos <rfoos@solengtech.com
> <mailto:rfoos@solengtech.com>> wrote:
>
> Looking for ideas on how to read a slow register (250ms) with
> openocd Mdw.
>
>
> You say 250 ms but from the code and the log, OpenOCD attempts the
> access for 10*75 ms without success. Typo?
>
> When I try to read one of these slow registers, I hit a WAIT, read
> back bus float.
>
> The dap disconnects, reconnects, and the value appears in an
> unexpected location.
>
>
> When OpenOCD does give up it should abort the AP access, which it
> apparently doesn't. A line reset doesn't affect the AP state and the
> value is for some reason returned in the next unrelated AP access.
>
> When the DAP disconnects, I'm able to read the value in another
> return location.
>
> Am I adjusting time correctly? Or does it have to do with dap
> resets and not delay time?
>
> How should I handle reading a very slow register on the target.
>
>
> You could set $dap_name memaccess to a high value and/or lower the
> adapter_khz, temporarily around the access.
>
> /Andreas
[Attachment #5 (text/html)]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Thank you Matthias and Andreas!</p>
<p>Andreas, a combination of $dap_name.memaccess and adapter_khz,
allowed me to work around the problem.</p>
<p>There is a case where memaccess must be set > the 255 maximum.</p>
<p>I have one question on the best way to set an address range for
special read/write processing.</p>
<p>Thank you,</p>
<p>Rick<br>
</p>
<p>---<br>
</p>
<p>One request (no change involved): Please leave the ability to set
memaccess above the 255 maximum value.<br>
</p>
<p>The default max memaccess is 255. This is set in
target/arm_dap.c:47 dap_instance_init.<br>
</p>
<p>I need memaccess to go above this (up to 400) to work with some
adapters that will not run below 1Mhz.</p>
<p>It is not a problem in that I can set $dap_name.memaccess to any
32 bit value, the 255 max is not enforced. (arm_adi_v5.c:1593
dap_memaccess_command)<br>
</p>
<p>Technically that is a bug. If it is fixed in the future, I will
need a workaround.</p>
<p>---</p>
<p>One question: Is there a way to trigger an event based on address
range?<br>
</p>
<p>Only one peripheral bus has this delay problem. I need to save
and restore adapter_khz and $dap_name.memaccess on each read and
write of a range of addresses.</p>
<p>I can create some special commands to wrap read and write
accesses with the settings for the slow bus.</p>
<p>The slow bus commands could be responsible to determine which
addresses need timing adjustments.<br>
</p>
<p>Is there a better way to define address ranges to adjust timing
on all read/write accesses?<br>
</p>
<br>
<div class="moz-cite-prefix">On 08/09/2018 09:29 AM, Andreas
Fritiofson wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKGHftd8bA6Cnia7EHibTPD814kkv1kM=BThY8mjk4sUJpuUHQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Aug 7, 2018 at 6:58 AM, Rick
Foos <span dir="ltr"><<a
href="mailto:rfoos@solengtech.com" target="_blank"
moz-do-not-send="true">rfoos@solengtech.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Looking for ideas on how to read a slow register
(250ms) with openocd Mdw.</p>
</div>
</blockquote>
<div><br>
</div>
<div>You say 250 ms but from the code and the log, OpenOCD
attempts the access for 10*75 ms without success. Typo?<br>
</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>When I try to read one of these slow registers, I hit
a WAIT, read back bus float.</p>
<p>The dap disconnects, reconnects, and the value
appears in an unexpected location.</p>
</div>
</blockquote>
<div><br>
</div>
<div>When OpenOCD does give up it should abort the AP
access, which it apparently doesn't. A line reset doesn't
affect the AP state and the value is for some reason
returned in the next unrelated AP access.</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>When the DAP disconnects, I'm able to read the value
in another return location.</p>
<p>Am I adjusting time correctly? Or does it have to do
with dap resets and not delay time?</p>
<p>How should I handle reading a very slow register on
the target.<br>
</p>
</div>
</blockquote>
<div><br>
</div>
<div>You could set $dap_name memaccess to a high value
and/or lower the adapter_khz, temporarily around the
access.</div>
<div><br>
</div>
<div>/Andreas</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic