Open taoloo897 opened 2 months ago
This is the expected behavior if no message is received. You need to capture the result of twai_receive and if it is ESP_ERR_TIMEOUT then it has simply timed out. You really ought to check the result of twai_driver_install to make sure that is ESP_OK as well.
It has a big delay, I had a delay(10) in receive and if i comment it , i receive ok (with little delay between frames) I tried with (twai_receive(&message, 1) == ESP_OK) and with 0 (twai_receive(&message, 0) == ESP_OK) No difference.
BUTTTTT if i leave like upstairs in TWAI_MODE_NORMAL) , i don;t received any frame . I must put in MODE_LISTEN_ONLY. With other esp boards 32U and S3 , the same sketch works ok.
Board
ESP32 wroom-32e
Device Description
can not make canbus work, i used a SN65HVD230 and twai library with esp32 board updated to 3.0.4 (not work on 2.0.11 too)
Hardware Configuration
i tried pin 4 and 5 and other 32 +34 it is a board with esp 32 wroom 32e with 1 channel relay
Version
v3.0.4
IDE Name
arduino ide
Operating System
windows 11
Flash frequency
80
PSRAM enabled
yes
Upload speed
921600
Description
, i tried to double the init speed , not work any suggestions please
twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT((gpio_num_t)TX_PIN, (gpio_num_t)RX_PIN, TWAI_MODE_NORMAL);
twai_timing_config_t t_config = TWAI_TIMING_CONFIG_1MBITS(); twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); twai_driver_install(&g_config, &t_config, &f_config); twai_start();
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide