A quick one, where do I find a list of the err_codes? I have had a look in the documentation and I was expecting to find a table of them, but I couldn't locate one.
Thanks - RJH
A quick one, where do I find a list of the err_codes? I have had a look in the documentation and I was expecting to find a table of them, but I couldn't locate one.
Thanks - RJH
There isn't one - but it's a very good idea to make yourself one which maps hex error code to the possible (often more than one) error code. It will save lots of time. Remember they do change a bit from release to release so you do have to keep the list up to date.
Interesting, thanks RK. I'm looking at 0x00000002 which given its number looks pretty common, but what do I reference against to find out what it means without dragging in files to interpret? - RJH
unfortunately I don't have my cheat sheet on me because I'm on the way home. I originally made it by just copy/pasting error codes from the 5 or 6 .h files in the SDK and then sorting them by error number.
If you know what function you called to get the error code you can look that up in the header file, usually tells you what error codes it can return.
As RK says there is no list. The various error codes are defined in the files they are related to. E.g. GAP errors are defined in nrf_gap.h, UART errors in nrf_uart.h, etc. This can can make it difficult to find the documentation on a particular error if you just have a number like you do. What you can do is to go to the declaration of the function that is returning an error. Above the declaration there is usually a list of errors that might be returned form the function. Then search for these errors in your project and you should be able to find its definition with a comment.
Error 0x0002 is defined in nrf_error.h:
#define NRF_ERROR_SOFTDEVICE_NOT_ENABLED (NRF_ERROR_BASE_NUM + 2) ///< SoftDevice has not been enabled
actually 0x02 .. my memory tells me it's the softdevice not enabled error - this came up the other day