There has been a change in the TWAI driver in the latest release that means the library fails to log the TWAI driver. Th problem is that there are some extra options in the twai_general_config_t structure. This manifests itself with an illegal argument error response when calling twai_driver_install().
The fix is simple, in the begin() routine zero out the contents of g_config with a call to memset. This should be future proof in that any new things added will also get set to zero.
bool CBUSESP32::begin(bool poll, SPIClass& spi) {
esp_err_t iret;
_numMsgsSent = 0;
_numMsgsRcvd = 0;
// configure CAN bus driver
twai_general_config_t g_config;
memset(&g_config, 0, sizeof(g_config)); // Initialise all configuration
g_config.mode = TWAI_MODE_NORMAL;
There has been a change in the TWAI driver in the latest release that means the library fails to log the TWAI driver. Th problem is that there are some extra options in the twai_general_config_t structure. This manifests itself with an illegal argument error response when calling twai_driver_install().
The fix is simple, in the begin() routine zero out the contents of g_config with a call to memset. This should be future proof in that any new things added will also get set to zero.