-
Notifications
You must be signed in to change notification settings - Fork 2k
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
I2C Crashes Kernel on Raspberry Pi Pico #21187
Comments
Thx for the report. Could you try again without (Alternatively you could disable the auto initialisation of the I2C buses and then do by hand. I'm afk, but I think the module is named |
Hi @tanneberger However, a second call to |
That is not generally true. Most MCU peripherals are initialized in a way that the code is naturally idempotent. But some periph drivers rely on being called exactly once. Our documentation in again substandard here, but in https://doc.riot-os.org/group__drivers__periph.html#autotoc_md1719 it is hinted. |
Perhaps we could keep track of the state of the peripheral and early return if the initialization was already done or trigger an assert. |
@tanneberger: This issue to be auto-closed upon merge, rather than by intent, because I wrote Could you you report back if the issue was indeed the second call to And sorry for the doc being wrong here :/ |
Let's re-open the issue until then. |
Description
I want to use the veml7700 brightness sensor in combination with the Raspberry Pi PICO. Sadly, RIOT crashes after calling
i2c_init
(see the code below).I tested the same code on the
feather-nrf52840-sense
there it works flawlessly.Output I get by connecting a logic analyzer:
Steps to reproduce the issue
In the Makefile, I add the line
USEMODULE += periph_i2c
in order to use i2c. Just compile this program for theBOARD=rpi-pico
Expected results
Don't crash.
Versions
I run this on RIOT version 2024.10 (
b51f093a395bdd575cff94b7d26be415fa46771d
)The text was updated successfully, but these errors were encountered: