Closed sdalu closed 1 year ago
If that is the case then the i2c pinctrl lines need bias-pull-up;
added.
I changed boards/arm/decawave_dwm1001_dev/decawave_dwm1001_dev-pinctrl.dtsi
to include bias-pull-up
as defined in the fragment below, but it doesn't fix the problem
i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 29)>,
<NRF_PSEL(TWIM_SCL, 0, 28)>;
bias-pull-up;
};
};
i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 29)>,
<NRF_PSEL(TWIM_SCL, 0, 28)>;
bias-pull-up;
low-power-enable;
};
};
Remove the pull up from the sleep mode. That should be all you need, it would enable pulling the lines up which i2c needs. You'd need to check with a scope to debug further if that does not work.
Not working better :( I don't have a scope to perform additional check :(
The changes mentioned above fixes the issue. But there is something fishy with the flash runner, it does not reset core after flashing, you have to press reset switch on the board after the J-Link status LED starts to pulse again. @sdalu Would you like to continue and open a PR to fix this issue?
diff --git a/boards/arm/decawave_dwm1001_dev/decawave_dwm1001_dev-pinctrl.dtsi b/boards/arm/decawave_dwm1001_dev/decawave_dwm1001_dev-pinctrl.dtsi
index 8e47b5d13c6..8cc231c74b1 100644
--- a/boards/arm/decawave_dwm1001_dev/decawave_dwm1001_dev-pinctrl.dtsi
+++ b/boards/arm/decawave_dwm1001_dev/decawave_dwm1001_dev-pinctrl.dtsi
@@ -23,6 +23,7 @@
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 29)>,
<NRF_PSEL(TWIM_SCL, 0, 28)>;
+ bias-pull-up;
};
};
*** Booting Zephyr OS build v3.3.0-rc2-51-g4e2bd62b6a95 ***
Polling at 0.5 Hz
#1 @ 416 ms: x -0.229824 , y 0.153216 , z 9.461088
#2 @ 2421 ms: x -0.268128 , y 0.153216 , z 9.499392
#3 @ 4426 ms: x -0.268128 , y 0.076608 , z 9.576000
#4 @ 6431 ms: x -0.229824 , y 0.076608 , z 9.614304
#5 @ 8437 ms: x -0.229824 , y 0.076608 , z 9.576000
#6 @ 10442 ms: x -0.344736 , y 0.114912 , z 9.959040
If the board doesn't reset then it's probably because nRESET is not correctly wired. Can work around the issue by adding board_runner_args(nrfjprog "--softreset")
to the board.cmake
file
If the board doesn't reset then it's probably because nRESET is not correctly wired. Can work around the issue by adding
board_runner_args(nrfjprog "--softreset")
to theboard.cmake
file
It uses jlink runner, but thanks for the hint, I just opened PR now to get this issue out of the way.
I confirmed that worked once I unplugged/plugged the board.
If the board doesn't reset then it's probably because nRESET is not correctly wired. Can work around the issue by adding
board_runner_args(nrfjprog "--softreset")
to theboard.cmake
file
Is there something equivalent for openocd ?
Building the sample demo
samples/sensor/lis2dh
with the decawave_dwm1001_dev result inIt seems to be related to this commit, according to git bisect, https://github.com/zephyrproject-rtos/zephyr/commit/32a87215d7aa97191097357f602237f7da4a3536 : drivers: pinctrl_nrf: Fix nrf_pin_configure() implementation