Is there a good way to abort an asynchronous I2C operation?
Am I allowed to 'i2c_master_bus_rm_device' a device for which an asynchronous operation is currently in process? Would/should it get aborted?
Can I shut down the whole bus ('i2c_del_master_bus') if an operation is still in process?
Abort an asynchronous I2C operation
-
floitsch_toit
- Posts: 43
- Joined: Wed Jun 29, 2022 4:25 pm
- Location: Aarhus, Denmark
- Contact:
-
ahsrabrifat
- Posts: 201
- Joined: Sat Jan 18, 2025 2:31 pm
Re: Abort an asynchronous I2C operation
ESP-IDF does not provide a direct API to abort an in-progress asynchronous I²C operation. If you are using i2c_master_cmd_begin(), set a short timeout so that operations do not block indefinitely. You can manually reset the I²C bus by reinitializing it if you detect an operation getting stuck.
Who is online
Users browsing this forum: ChatGPT-User, Qwantbot, trendictionbot and 2 guests