Skip to content

Commit

Permalink
[posix] fix rcp reset flow in ResetRcp (openthread#9314)
Browse files Browse the repository at this point in the history
Remove call to `WaitResponse` after calling `HardwareReset` which didn't
trigger any spinel transaction.

`kOpenFileDelay` change form 500 to 50.
  • Loading branch information
canisLupus1313 authored and Karol Witusik committed Aug 27, 2023
1 parent 4d2d950 commit 4078917
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/lib/spinel/radio_spinel_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,11 @@ template <typename InterfaceType> void RadioSpinel<InterfaceType>::ResetRcp(bool
}

hardwareReset = (mSpinelInterface.HardwareReset() == OT_ERROR_NONE);
SuccessOrExit(WaitResponse(false));

if (hardwareReset)
{
SuccessOrExit(WaitResponse(false));
}

resetDone = true;

Expand Down
2 changes: 1 addition & 1 deletion src/posix/platform/hdlc_interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class HdlcInterface : public ot::Spinel::SpinelInterface
{
kMaxWaitTime = 2000, ///< Maximum wait time in Milliseconds for socket to become writable (see `SendFrame`).
kResetTimeout = 5000, ///< Maximum wait time in Milliseconds for file to become ready (see `ResetConnection`).
kOpenFileDelay = 500, ///< Delay between open file calls, in Milliseconds (see `ResetConnection`).
kOpenFileDelay = 50, ///< Delay between open file calls, in Milliseconds (see `ResetConnection`).
kRemoveRcpDelay =
2000, ///< Delay for removing RCP device from host OS after hard reset (see `ResetConnection`).
};
Expand Down

0 comments on commit 4078917

Please sign in to comment.