diff --git a/Host/Source/LibOpenBLT/port/linux/canif/socketcan/socketcan.c b/Host/Source/LibOpenBLT/port/linux/canif/socketcan/socketcan.c index af644266..262a8a67 100644 --- a/Host/Source/LibOpenBLT/port/linux/canif/socketcan/socketcan.c +++ b/Host/Source/LibOpenBLT/port/linux/canif/socketcan/socketcan.c @@ -38,6 +38,7 @@ #include /* for posix threads */ #include /* UNIX standard functions */ #include /* file control operations */ +#include /* time definitions */ #include /* I/O control operations */ #include /* network interfaces */ #include /* CAN kernel definitions */ @@ -567,8 +568,10 @@ static void *SocketCanEventThread(void *param) } } } - /* wait a little to not starve the CPU */ - UtilTimeDelayMs(1); + /* Wait a little to not starve the CPU, but not too long to prevent interference with + * data throughput. + */ + (void)usleep(10u); } /* handshake */ diff --git a/Host/Source/LibOpenBLT/xcploader.c b/Host/Source/LibOpenBLT/xcploader.c index 35c28f25..f6ef9020 100644 --- a/Host/Source/LibOpenBLT/xcploader.c +++ b/Host/Source/LibOpenBLT/xcploader.c @@ -54,7 +54,7 @@ #define XCPLOADER_CMD_PID_RES (0xFFu) /**< positive response */ /** \brief Maximum timeout for the XCP connect command. */ -#define XCPLOADER_CONNECT_TIMEOUT_MS (20u) +#define XCPLOADER_CONNECT_TIMEOUT_MS (50u) /** \brief Number of retries to connect to the XCP slave. */ #define XCPLOADER_CONNECT_RETRIES (5u)