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

Adding I2C Interface test with Arduino #35

Open
TheoHollender opened this issue Sep 25, 2024 · 1 comment · May be fixed by #36
Open

Adding I2C Interface test with Arduino #35

TheoHollender opened this issue Sep 25, 2024 · 1 comment · May be fixed by #36
Assignees

Comments

@TheoHollender
Copy link

We want to add a test for the I2C interface that checks whether all the drivers work using an arduino.

@TheoHollender
Copy link
Author

TheoHollender commented Sep 25, 2024

The test is already ready and works in the following way :

The Arduino works as an I2C Slave on address 0x42, and the following protocol is used :

  • The Raspberry Pi sends on register 1 the "Hello, World !\0" string without using the write function (using writeDevice by putting register in front of the string)
  • If the received string is correct, the Arduino sends "Hello, RPI !\0" back and the Raspberry Pi verifies it is present (testing readDevice).
  • Then the Raspberry Pi writes 256 times a byte (all distinct) in register 0 (using write) and expects the arduino to send it back.
  • Finally, the raspberry pi reads 10.000 randoms bytes (<= 165) from register 2 (using read), and the raspberry pi checks the fact that bytes are <= 165 and that the entropy is correct.

Some information about the testing :

  • The arduino has a delay of about 350 microseconds to avoid a input / output error when ioctl (i suspect that the arduino code is too slow otherwise and gets interrupted too fast)

@TheoHollender TheoHollender linked a pull request Sep 30, 2024 that will close this issue
@TheoHollender TheoHollender self-assigned this Sep 30, 2024
@TheoHollender TheoHollender linked a pull request Sep 30, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant