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

Program gets stuck, maybe wrong Pins are used. #1

Open
Mirabellensaft opened this issue Sep 25, 2019 · 1 comment
Open

Program gets stuck, maybe wrong Pins are used. #1

Mirabellensaft opened this issue Sep 25, 2019 · 1 comment

Comments

@Mirabellensaft
Copy link
Contributor

The when using any of the functions of the SCD30 driver on the sensor instance, the program gets stuck. This may be related to using the wrong pins to instantiate the sensor. The result is the same, if the current pins for scl and sda are used, or if the accelerometer pins.

Backtracing in gdb shows this:

(gdb) bt
#0  0x00002312 in nrf52832_pac::twim0::events_lasttx::<impl nrf52832_pac::twim0::EVENTS_LASTTX>::read (self=0x40003160)
    at /Users/tanks/.cargo/registry/src/github.com-1ecc6299db9ec823/nrf52832-pac-0.8.0/src/twim0/events_lasttx.rs:26
#1  0x00001e74 in nrf52_hal_common::twim::Twim<T>::write (self=0x2000ffe6, address=97, buffer=...)
    at /Users/tanks/.cargo/registry/src/github.com-1ecc6299db9ec823/nrf52-hal-common-0.8.1/src/twim.rs:160
#2  0x0000205c in <nrf52_hal_common::twim::Twim<T> as embedded_hal::blocking::i2c::Write>::write (self=0x2000ffe6, addr=97, bytes=...)
    at /Users/tanks/.cargo/registry/src/github.com-1ecc6299db9ec823/nrf52-hal-common-0.8.1/src/twim.rs:381
#3  0x00000b2a in scd30::scd30::Scd30<T>::soft_reset (self=0x2000ffe6) at /Users/tanks/.cargo/git/checkouts/scd30-rs-24cca21ab41f2a0f/0ae24d2/src/scd30.rs:66
#4  0x00000da4 in main () at src/main.rs:50
(gdb) 
@Mirabellensaft
Copy link
Contributor Author

using a logic analyser:
once the program gets stuck calling the soft_reset function, the scl signal is erratic and shows ERROR, sda is silent.

if no function is called on the sensor instance, the both signals are regular but in ERROR at most times and occasionally this for a fraction of a second:

Screenshot 2019-09-27 at 12 04 49

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

No branches or pull requests

1 participant