Skip to content

Commit a2db1e6

Browse files
Rocketctpennam
authored andcommitted
I2C: abort when nack event happens
1 parent 5d13f91 commit a2db1e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ra/fsp/src/r_iic_master/r_iic_master.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,9 @@ static void iic_master_err_master (iic_master_instance_ctrl_t * p_ctrl)
12001200
(uint8_t) (IIC_MASTER_TIMEOUT_MODE_SHORT ==
12011201
((iic_master_extended_cfg_t *) p_ctrl->p_cfg->p_extend)->timeout_mode);
12021202
p_ctrl->p_reg->ICFER_b.TMOE = 1;
1203+
iic_master_abort_seq_master(p_ctrl, true);
12031204

1205+
iic_master_notify(p_ctrl, I2C_MASTER_EVENT_ABORTED);
12041206
/* This interrupt will be fired again when wither stop condition is sent
12051207
* or the hardware detects the line is stuck low causing a timeout */
12061208
}

0 commit comments

Comments
 (0)