Can anyone explain how the "enableTimeout" field in this structure is meant to be used:
typedef struct _i2c_master_config
{
bool enableMaster; /*!< Whether to enable master mode. */
uint32_t baudRate_Bps; /*!< Desired baud rate in bits per second. */
bool enableTimeout; /*!< Enable internal timeout function. */
uint8_t timeout_Ms; /*!< Event timeout and SCL low timeout value. */
} i2c_master_config_t;
There does not seem to be much information on it, and the SDK autogenerated code just toggles the initial field from false to true. I don't see where this field is actually checked in the driver source code. Am I supposed to register a handler for the timeout, etc...? Or is this a purely hardware item? What is actually timing out - the clock stretching, a read/write operation, a whole transaction, etc...?
Specifically working with an LPC55S16 if it matters.
Thanks.
Hi @JK_265
The information regarding the timout is on the User manual UM11295, chapter 33.6.2 I2C configuration register,
Best Regards, Miguel.