Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Usage of Twi_Scanner-Example impossible

Hello,

I am was playing around a bit with the twi_scanner-example and I figured out, that no matter if I chose the legacy-layer with nrf_drv_twi-functions or the new nrfx_twi-functions I am always getting NRF_SUCCESS-messages on all I2C-addresses available, indicating that a device was successfully found.

Tried that with rx-/tx-functions likewise and also on the nRF52832-/nRF52840-DK including our own custom boards.

Even though I have just 1 specific sensor attached to the I2C-bus it shows possitive findings on all addresses, which makes the scanner-functionality obviously useless...

On the other hand I am able to successfully configure, read and transmit the sensor data with S132-/S140-softdevice-based-examples.

Is there anything I might be forgetting!?

Additional note: The plain twi_scanner-Example shows no results at all on the respective DKs with a sensor connected.

Kind regards,

Ray

Parents
  • Hi Harald,

      There does not seem to be something wrong with the unmodified "twi_scanner" example from the SDKv15.

    I just tested it with a sensor shield and received the addresses for two sensors.

    I suggest you download a fresh copy of SDKv15 and make sure to use the unmodified "twi_sensor" example and hook up the sensor to the correct pins.

    If you get "no devices found", my hunch is that either its the wrong pins or something is not getting power.

    Could you take a picture of you set-up, and share the details of your twi sensor please?

  • Hello Martin,

    after numerous tests and a thorough hardware-check we also figured out, that the sources of the twi_sensor-example never have been the problem in the first place. Since the code is fairly simple with just minor places that allow modification, I also would have been quite surprised if this would have been the cause of our problem.

    In the end it was an error in connecting the external sensor to the nRF52840 within our board-layout, just because the I2C-signal-names got mixed up. Definitely something you can waste hours of testing on, without ever having the chance of realy seeing the bigger picture.

    I am sorry for the inconvenience I might have caused!

    Everything is up and running now.

    Kind regards,

    Ray

Reply
  • Hello Martin,

    after numerous tests and a thorough hardware-check we also figured out, that the sources of the twi_sensor-example never have been the problem in the first place. Since the code is fairly simple with just minor places that allow modification, I also would have been quite surprised if this would have been the cause of our problem.

    In the end it was an error in connecting the external sensor to the nRF52840 within our board-layout, just because the I2C-signal-names got mixed up. Definitely something you can waste hours of testing on, without ever having the chance of realy seeing the bigger picture.

    I am sorry for the inconvenience I might have caused!

    Everything is up and running now.

    Kind regards,

    Ray

Children
No Data
Related