This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

app_twi_perform fails with NRF_ERROR_INTERNAL

Hello Nordic Forum!

Our product relies heavily in the TWI Bus, we use it to communicate with different sensors periodically. The most "important" one is read once every 4 ms.

Additionally we have a TWI controlled IO expander, which has connected to it a USB detection chip.

The problem we're having is that sometimes one of the operation of the sensor fails with the error code NRF_ERROR_INTERNAL, in particular, it tends to fail when the something is connected to the USB. Since we were sensing USB changes by polling the IO expander, we though that somehow this was the issue, but recently we added a SAADC detection of the USB voltage to stop polling for IO expander state changes, and the problem persist, and is gotten more frequent (when the USB is connected) than before.

So, what are the possible causes for the NRF_ERROR_INTERNAL? I know they're hardware related, but, can you be more specific?

Our setup:

  • Custom Board with nRF52832
  • SDK ver 13.0
  • S132 4.0.4

Thanks in advance.

Kind regards.

  • NRF_ERROR_INTERNAL aka code 0x03 is sent by app_twi on all kinds of faults from problems with the bus (no electrical connection, wrong pullup values, noise) to something as common as slave sending a NACK which depending on a slave may have a special meaning (ex. you need to repeat the transmission until slave finishes some operation). You should record oscilloscope trace when fault happens and look at the signals. This way you'll know if this is a hardware or software problem and you'll have starting point for further debugging.

Related