Skip to content

Commit c1dd362

Browse files
committed
whb04b: Use isProgramIdle to check if manual mode can be activated
Note: isProgramRunning can not be used due to this is false when paused
1 parent 03b1e74 commit c1dd362

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • src/hal/user_comps/xhc-whb04b-6

src/hal/user_comps/xhc-whb04b-6/hal.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,9 +1341,11 @@ bool Hal::requestAutoMode(bool isRisingEdge)
13411341
// ----------------------------------------------------------------------
13421342
bool Hal::requestManualMode(bool isRisingEdge)
13431343
{
1344-
if(isRisingEdge && *memory->in.isModeAuto)
1344+
if(isRisingEdge && !*memory->in.isProgramIdle)
13451345
{
1346-
//Don't try to change from auto to manual
1346+
//Don't try to change to manual when not idle
1347+
//When a program is running, this will fail
1348+
//When an MDI command is active, this would stop it
13471349
return false;
13481350
}
13491351
return requestMode(isRisingEdge, memory->out.doModeManual, memory->in.isModeManual);

0 commit comments

Comments
 (0)