Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r_riic_rx RIIC_GEN_SCL_ONESHOT not working #23

Open
gurkerlbaron opened this issue Feb 7, 2024 · 0 comments
Open

r_riic_rx RIIC_GEN_SCL_ONESHOT not working #23

gurkerlbaron opened this issue Feb 7, 2024 · 0 comments

Comments

@gurkerlbaron
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant