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

app_error_fault_handler() when using spi_master_using_nrf_spi_mngr example

Hello,

I'm beginner with Nordic nRF52 devices.

I'm working on a PCA10040 (2.1.0) dev kit and I would like to communicate through TWI interface.

Then I have installed SES and opened the example given in \nRF5_SDK_17.0.0_9d13099\examples\peripheral\spi_master_using_nrf_spi_mngr.

I have NO mbed Application Shield daughter card connected on the dev kit, I would like first to test the FW example before adding my custom board with sensor on it.

When I debug this project, I come in app_error_fault_handler() after the call of nrf_twi_mngr_perform() (in main.c)

I don't expect to raise an error handler if TWI sensor is not responsive, right?

Why do I have this error handler?

Thanks,

François

  • Hi François

    The example is set up to treat any error returned from the twi_manager module as a critical error, by calling the default error handler. 

    If you want to test the example without a sensor attached I would suggest changing this behavior, and rather print the error code that is returned to the log so that you can see if the twi_manager library returns an error or not. 

    Then the code will continue running, and you can try to connect your shield and (hopefully) see the error disappear. 

    Best regards
    Torbjørn

Related