Closed Sandvoxel closed 1 year ago
Digging through the imxrt-iomuxc I see that this issue has been resolved but the changes are not yet propagated to this release.
On Thu, Sep 22, 2022 at 03:08:26PM -0700, Kyle Kovalchick wrote:
Closed #123 as completed.
Completed by what? Please elaborate.
Groeten Geert Stappers -- Silence is hard to parse
Sorry for the trouble. I reproduced the error, and I notice two issues in the example code.
We're still using the I2C3 base peripheral, but we should be using the I2C1 peripheral. The clock
call returns a tuple, and we need to select the correct I2C instance from that result. Here's the first change that needs to happen.
// From:
let (_, _, i2c_clock, _) = periphs.i2c.clock(&mut periphs.ccm.handle, OSC, DIVIDE_3);
// To:
let (i2c_clock, _, _, _) = periphs.i2c.clock(&mut periphs.ccm.handle, OSC, DIVIDE_3);
Once we make that change, the example still doesn't compile. Pins 18 and 19 are swapped.
// From:
let mut i2c1 = i2c_clock.build(pins.p18, pins.p19);
// To:
let mut i2c1 = i2c_clock.build(pins.p19, pins.p18);
Tested the build on d7e97cb (didn't run it), which is using imxrt-iomuxc v0.1.1. We should have support for this peripheral and pins in today's BSP.
Sorry for the trouble. I reproduced the error, and I notice two issues in the example code.
- We're still using the I2C3 base peripheral, but we should be using the I2C1 peripheral. The
clock
call returns a tuple, and we need to select the correct I2C instance from that result. Here's the first change that needs to happen.// From: let (_, _, i2c_clock, _) = periphs.i2c.clock(&mut periphs.ccm.handle, OSC, DIVIDE_3); // To: let (i2c_clock, _, _, _) = periphs.i2c.clock(&mut periphs.ccm.handle, OSC, DIVIDE_3);
- Once we make that change, the example still doesn't compile. Pins 18 and 19 are swapped.
// From: let mut i2c1 = i2c_clock.build(pins.p18, pins.p19); // To: let mut i2c1 = i2c_clock.build(pins.p19, pins.p18);
Tested the build on d7e97cb (didn't run it), which is using imxrt-iomuxc v0.1.1. We should have support for this peripheral and pins in today's BSP.
Yes I closed the issue because I figured that out. Thanks for the timely response even thought I figured out.