We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c03b29 commit 5bd641aCopy full SHA for 5bd641a
1 file changed
libuavcan_drivers/stm32/driver/src/uc_stm32_can.cpp
@@ -467,8 +467,8 @@ uavcan::int16_t CanIface::configureFilters(const uavcan::CanFilterConfig* filter
467
468
bool CanIface::waitMsrINakBitStateChange(bool target_state)
469
{
470
-#if UAVCAN_STM32_NUTTX
471
- const unsigned Timeout = 500;
+#if UAVCAN_STM32_NUTTX || UAVCAN_STM32_CHIBIOS
+ const unsigned Timeout = 1000;
472
#else
473
const unsigned Timeout = 2000000;
474
#endif
@@ -480,7 +480,10 @@ bool CanIface::waitMsrINakBitStateChange(bool target_state)
480
return true;
481
}
482
#if UAVCAN_STM32_NUTTX
483
- ::usleep(2000);
+ ::usleep(1000);
484
+#endif
485
+#if UAVCAN_STM32_CHIBIOS
486
+ ::chThdSleep(MS2ST(1));
487
488
489
return false;
0 commit comments