As an application developer, you must make sure that calls to the OpenThread API are not preempted by other calls to the OpenThread API.
main
function context. Do not call any OpenThread functions in ISRs or callbacks from ISR context. You can use the app_scheduler
module to execute callbacks from the app_timer
and the SoftDevice in the main context. Refer to the examples included in this SDK to see how the app_scheduler
module should be used with OpenThread.The USB variant of the nRF52840 platform library uses a feature called pseudo reset.
Pseudo reset causes the reinitialization of the OpenThread stack and certain peripherals. It is invoked instead of triggering a hardware reset when a reset from OpenThread stack is requested. The reason for such behavior is that when native USB CDC connectivity is used, performing a hardware reset would cause the device to reenumerate in the host system. As a result, this would impair the ongoing communication through CLI or Spinel. Any application that uses USB CDC for serial communication must use the pseudo reset feature instead of the hardware reset. Refer to Thread CLI Example or Thread NCP/RCP Example for an example implementation of this feature.