This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TWI without SoftDevice

Hi,

I just switch to Embbeded Studio following the last tutorial (here).

I'm working on NRF51822 with SDK12 and TWI_sensor example (without SoftDevice). I followed the tutorial to import Keil project.I can compile my project without problem.

When I started to debug, TWI init is ok but I have "NRF_ERROR_SVC_HANDLER_MISSING" error when err_code = nrf_drv_twi_tx(&m_twi, LP3918_ADDR, reg, sizeof(reg), false); is called.

I already take a look to some topics about this error seems to be related to SoftDevice application and I don't use SoftDevice on this example.

Do you have any idea of what is happening?

Thanks

  • Are you sure that it's NRF_ERROR_SVC_HANDLER_MISSING? I don't think it should be possible that nrf_drv_twi_tx() function return that err_code. What number is the err_code ?

  • The nrf_drv_twi is not dependent on the SoftDevice and consequently does not perform any SV calls. As @danify (Daniel Wang) says, nrf_drv_twi_tx() does not return that error code, see the API documentation here. Please provide the returned error code in hex.

  • Thank you for your help. I don't know why but the value of err_code which is displayed in debugger mode is not the good one... I still have 0x01, I can't explain why. I added NRF_LOG to TWI module to debug and I can confirm that there is no error...

    Just have no ACK from the device but I should find the problem quickly.

    Thank you

Related