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

i2c driver for cc13xx/cc26xx is configured with incorrect frequency #20480

Closed
vanti opened this issue Nov 8, 2019 · 0 comments · Fixed by #20481
Closed

i2c driver for cc13xx/cc26xx is configured with incorrect frequency #20480

vanti opened this issue Nov 8, 2019 · 0 comments · Fixed by #20481
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@vanti
Copy link
Collaborator

vanti commented Nov 8, 2019

Describe the bug
The I2C peripheral should be configured using the CPU clock frequency and
not the system clock frequency. This used to be fine because they were the
same before #19232, but now that the system clock is RTC-based (which
has a different frequency), we can no longer make that assumption.

To Reproduce
Steps to reproduce the behavior:
Create the file boards/shields/boostxl_sensors/boostxl_sensors.overlay:

&i2c0 {

        bme280@77 {
                compatible = "bosch,bme280";
                reg = <0x77>;
                label = "BME280";
        };

};
  1. cd samples/sensor/bme280
  2. west build -b cc1352r1_launchxl -- -DSHIELD=boostxl_sensors
  3. west flash
  4. See error
***** Booting Zephyr OS build zephyr-v2.0.0-1913-g30fc72a50e1b *****
Could not get BME280 device

Expected behavior
I would expect the sample to run.

Impact
Prevents users from using the I2C on this platform.

Environment (please complete the following information):

  • OS: Ubuntu 18.04
  • Toolchain: Zephyr SDK 0.10.3
  • Commit SHA or Version used: 30fc72a
@vanti vanti added the bug The issue is a bug, or the PR is fixing a bug label Nov 8, 2019
vanti added a commit to vanti/zephyr that referenced this issue Nov 8, 2019
The I2C peripheral should be configured using the CPU clock frequency
and not the system clock frequency. This used to be fine because they
were the same before zephyrproject-rtos#19232, but now that the system clock is
RTC-based (which has a different frequency), we can no longer make
that assumption.

Fixes zephyrproject-rtos#20480

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
galak pushed a commit that referenced this issue Nov 11, 2019
The I2C peripheral should be configured using the CPU clock frequency
and not the system clock frequency. This used to be fine because they
were the same before #19232, but now that the system clock is
RTC-based (which has a different frequency), we can no longer make
that assumption.

Fixes #20480

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant