Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
openocd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
openocd
Commits
4490a42a
Commit
4490a42a
authored
15 years ago
by
Øyvind Harboe
Browse files
Options
Downloads
Patches
Plain Diff
Work in progress on arm11 reset. Assert srst.
parent
44e9200d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/target/arm11.c
+50
-6
50 additions, 6 deletions
src/target/arm11.c
with
50 additions
and
6 deletions
src/target/arm11.c
+
50
−
6
View file @
4490a42a
...
@@ -1200,18 +1200,62 @@ int arm11_step(struct target_s *target, int current, uint32_t address, int handl
...
@@ -1200,18 +1200,62 @@ int arm11_step(struct target_s *target, int current, uint32_t address, int handl
int
arm11_assert_reset
(
target_t
*
target
)
int
arm11_assert_reset
(
target_t
*
target
)
{
{
FNC_INFO
;
FNC_INFO
;
int
retval
;
/* FIX! we really should assert srst here, but
arm11_common_t
*
arm11
=
target
->
arch_info
;
* how do we reset the target into the halted state?
retval
=
arm11_check_init
(
arm11
,
NULL
);
*
if
(
retval
!=
ERROR_OK
)
* Also arm11 behaves "funny" when srst is asserted
return
retval
;
* (as of writing the rules are not understood).
*/
target
->
state
=
TARGET_UNKNOWN
;
/* we would very much like to reset into the halted, state,
* but resetting and halting is second best... */
if
(
target
->
reset_halt
)
if
(
target
->
reset_halt
)
{
{
CHECK_RETVAL
(
target_halt
(
target
));
CHECK_RETVAL
(
target_halt
(
target
));
}
}
/* srst is funny. We can not do *anything* else while it's asserted
* and it has unkonwn side effects. Make sure no other code runs
* meanwhile.
*
* Code below assumes srst:
*
* - Causes power-on-reset (but of what parts of the system?). Bug
* in arm11?
*
* - Messes us TAP state without asserting trst.
*
* - There is another bug in the arm11 core. When you generate an access to
* external logic (for example ddr controller via AHB bus) and that block
* is not configured (perhaps it is still held in reset), that transaction
* will never complete. This will hang arm11 core but it will also hang
* JTAG controller. Nothing, short of srst assertion will bring it out of
* this.
*
* Mysteries:
*
* - What should the PC be after an srst reset when starting in the halted
* state?
*/
jtag_add_reset
(
0
,
1
);
jtag_add_reset
(
0
,
0
);
/* How long do we have to wait? */
jtag_add_sleep
(
5000
);
/* un-mess up TAP state */
jtag_add_tlr
();
retval
=
jtag_execute_queue
();
if
(
retval
!=
ERROR_OK
)
{
return
retval
;
}
return
ERROR_OK
;
return
ERROR_OK
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment