nrf_drv_twi_rx error 3

I'm trying to get the device ID of the lis3dh accelerometer on a Thingy:52

nrf_drv_twi_tx returns 3 as an error. This means NRF_ERROR_INTERNAL  --> "If an error was detected by hardware." 

I doubt that my hardware is broken... 

I used a driver template: https://github.com/STMicroelectronics/lis3dh/tree/6a82fc90cfb688686d0b344c82184c33ee844697

My code is included in this post. Line 361 is where I'm trying to get the device ID. 

Greetings

Willem

Parents
  • Hi Willem

    Since this is a public post, I would just like to remind future other readers of this forum that our nRF Connect SDK has a sample for the LIS2DH: Motion Sensor Monitor, which is compatible with the LIS3DH.

    However, you told me last time that you cannot switch to the nRF Connect SDK, so let us continue to work with the nRF5 SDK here.

    Where do is the function "lis3dh_device_id_get" defined?

    Is your LIS3DH sensor an external sensor?
    If so, how is it connected? Are the SCL and SDA lines pulled up?

    Regards,
    Sigurd Hellesvik

Reply
  • Hi Willem

    Since this is a public post, I would just like to remind future other readers of this forum that our nRF Connect SDK has a sample for the LIS2DH: Motion Sensor Monitor, which is compatible with the LIS3DH.

    However, you told me last time that you cannot switch to the nRF Connect SDK, so let us continue to work with the nRF5 SDK here.

    Where do is the function "lis3dh_device_id_get" defined?

    Is your LIS3DH sensor an external sensor?
    If so, how is it connected? Are the SCL and SDA lines pulled up?

    Regards,
    Sigurd Hellesvik

Children
Related