From 5c7cfe2e1986e2f22e6295a02ac993464ccb711b Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sat, 22 Feb 2025 13:31:05 +1100 Subject: [PATCH] I2C inner function needs irq's --- .../bl_mcu_sdk/drivers/bl702_driver/std_drv/src/bl702_i2c.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/drivers/bl702_driver/std_drv/src/bl702_i2c.c b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/drivers/bl702_driver/std_drv/src/bl702_i2c.c index e1c91260..021e6832 100644 --- a/source/Core/BSP/Pinecilv2/bl_mcu_sdk/drivers/bl702_driver/std_drv/src/bl702_i2c.c +++ b/source/Core/BSP/Pinecilv2/bl_mcu_sdk/drivers/bl702_driver/std_drv/src/bl702_i2c.c @@ -538,6 +538,8 @@ BL_Err_Type I2C_MasterSendBlocking(I2C_ID_Type i2cNo, I2C_Transfer_Cfg *cfg) { uint32_t timeOut = 0; uint32_t temp = 0; uint32_t I2Cx = I2C_BASE; + I2C_IntMask(I2C0_ID, I2C_TRANS_END_INT, UNMASK); // This function needs to be able to use the irq status bits + I2C_IntMask(I2C0_ID, I2C_NACK_RECV_INT, UNMASK); // This function needs to be able to use the irq status bits /* Check the parameters */ CHECK_PARAM(IS_I2C_ID_TYPE(i2cNo)); @@ -618,6 +620,9 @@ BL_Err_Type I2C_MasterReceiveBlocking(I2C_ID_Type i2cNo, I2C_Transfer_Cfg *cfg) I2C_Disable(i2cNo); I2C_Init(i2cNo, I2C_READ, cfg); I2C_Enable(i2cNo); + I2C_IntMask(I2C0_ID, I2C_TRANS_END_INT, UNMASK); // This function needs to be able to use the irq status bits + I2C_IntMask(I2C0_ID, I2C_NACK_RECV_INT, UNMASK); // This function needs to be able to use the irq status bits + timeOut = I2C_FIFO_STATUS_TIMEOUT; if (cfg->dataSize == 0 && cfg->subAddrSize == 0) { while (BL_RD_REG(I2C_BASE, I2C_BUS_BUSY)) {