Skip to content

r_riic_rx RIIC_GEN_SCL_ONESHOT not working #23

@gurkerlbaron

Description

@gurkerlbaron

I' m using r_riic_rx V 2.49 for RX65N CPU with e2 studio

I tried to recover from I2C SDA stuck low problem by using the recomended function

ret = R_RIIC_Control(&iic_info_m, RIIC_GEN_SDA_HI_Z | RIIC_GEN_SCL_ONESHOT); 

but there is no SCL cycle generated.

ICCR2.BBSY is set (because SDL is stuck low)
According to the RX54 hardware manual, it is required to set ICCR1.CLO and be in master mode (ICCR2.MST = 1) . But this never happens.
RIIC_GEN_SCL_ONESHOT wil set the CLO bit but not the MST bit so no SCL cycle is generated.

How to reproduce:
set SDA low by a connection to ground
SCL is high
start a R_RIIC_MasterSend(), this will return RIIC_ERR_BUS_BUSY
try to recover with R_RIIC_Control() and check SCL line with oscilloscope.
there will be no extra SCL cycel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions