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

Issue : Should react to the case of IIC read failure (应该对IIC读取失败的情况做出反应) #281

Open
MR-XieXuan opened this issue Mar 12, 2023 · 4 comments

Comments

@MR-XieXuan
Copy link

MR-XieXuan commented Mar 12, 2023

If the read fails, you should return a DateTime error, which is not good for your program.
write_then_read returns false on failure and true on success.
The library should also handle this.
It looks like this.
Chinese (中文) :
如果读取失败,应该会出现返回DateTime错误的情况,这样子对程序不利。
而 write_then_read 在操作失败以后会返回 false , 成功后会返回true。
库中也应该对这个进行处理 。
像这样子。

@caternuson
Copy link
Contributor

What RTC module is being used?

What Arduino sketch is being run?

The validity of the I2C connection is checked in begin() which returns false if it fails. If begin() is returning true but I2C is failing later, then it may be something else.

@MR-XieXuan
Copy link
Author

MR-XieXuan commented Mar 13, 2023

I found that in the case of high core reuse, it is possible to fail to read the wrong data, such as the date of June 24, 2024.
The DateTime object receives this error message and does nothing with it.
And the write_then_read functionalso gives us the return value, if there is an error halfway through the read, and the value is read without any obvious exception.
This may cause the read out data to be untrustworthy.
The above translation results are from Youdao Neural Network Translation (YNMT) · computer
image

Chinese(中文):
我发现在核心高复用的情况下可能会出现读取失败的情况,读取出来的数据是错误的,比如 2024年123月24日 。
而对象DateTime接到这种错误的信息却不做任何处理。
而且在write_then_read方法中也给出了返回值,如果读取到一半出现错误,而读取出来的值是无明显异常。
这可能会导致读出的数据不可信。
以上翻译结果来自有道神经网络翻译(YNMT)· 计算机

@MR-XieXuan
Copy link
Author

RTC module : RTC_DS1307
Sometimes this problem occurs :
image

@Thermelgy-Repo
Copy link

Thermelgy-Repo commented Apr 9, 2024

RTC module : RTC_DS1307 Sometimes this problem occurs : image

I am also getting similar issue. Any fix you haave got?

[ 3041][E][Wire.cpp:499] requestFrom(): i2cWriteReadNonStop returned Error 263

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

3 participants