Open mickeyl opened 1 year ago
There's a bit of discussion about that going on @ https://www.esp32.com/viewtopic.php?f=12&t=35520
I think I know where to approach that (in twai_handle_tx_buffer_frame
), but I'm a bit out of my depth as to how to create a timer that creates the proper IRQ and event so that I can delay the call to twai_hal_set_tx_buffer_and_transmit
.
Please also see https://github.com/espressif/esp-idf/issues/12316 which indicates very unstable TWAI timing.
Is there any progress on this request? Is it possible to use interrupts for reception?
Many automotive systems (e.g. ISOTP as per ISO 15765-2) require a minimum inter-frame-delay when transmitting consecutive CAN frames.
Since TWAI is using an outgoing queue, it's not possible to achieve this inter-frame-delay outside the TWAI driver, in particular, when µs-granularity is a requirement.
Since work on a new TWAI driver is underway (see post by @wanckl in https://github.com/espressif/esp-idf/issues/10423#issuecomment-1724779541), let me use this opportunity to file an enhancement request for this.
I'll probably hack away, since I have an immediate need for this feature, but official support in the TWAI driver would be nicer.