Skip to content

Commit

Permalink
When enabling the debug module, poll til it's really enabled
Browse files Browse the repository at this point in the history
Resolves #435
  • Loading branch information
aswaterman committed Mar 30, 2020
1 parent a346ad5 commit acd953a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fesvr/dtm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,8 @@ void dtm_t::producer_thread()

// Enable the debugger.
write(DMI_DMCONTROL, DMI_DMCONTROL_DMACTIVE);
// Poll until the debugger agrees it's enabled.
while ((read(DMI_DMCONTROL) & DMI_DMCONTROL_DMACTIVE) == 0) ;

// These are checked every time we run an abstract command.
uint32_t abstractcs = read(DMI_ABSTRACTCS);
Expand Down

0 comments on commit acd953a

Please sign in to comment.