nrf9160 & NCS: reset reason CTRLAP

Hi,

While developing my application for my company on a nRF9160 on a custom board, I came to use the nrfx_reset_reason.h to get my reset cause.

RESETREAS looks as follows:

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf9160%2Fpower.html&anchor=register.RESETREAS

Inside nrfx_reset_reason.h, you can get the reset cause with nrfx_reset_reason_get() and then you are supposed to compare the flags with nrfx_reset_reason_mask_t.

nrfx_reset_reason_mask_t does not have an entry for CTRLAP-reset though in case of the nRF9160, even though, according to the documentation it should be available in the RESETREAS register..

I wanted to ask if there is a reason for this, or if I overlooked something. (or if that one just slipped through).

Parents
  • Hello, 

    the DevZone team and Nordic Semiconductor are currently in a summer vacation period, some delays in answers must be expected due to lower staffing during this period. We apologize for the inconvenience. 


    What version of nRF Connect SDK are you working on?

    In modules\hal\nordic\nrfx\helpers\nrfx_reset_reason.h there is:

        NRFX_RESET_REASON_CTRLAP_MASK    = RESET_RESETREAS_CTRLAP_Msk,
        /**< Reset from application CTRL-AP detected. */

    Kind regards,
    Øyvind

  • I'm on NCS 1.8.0, but the enum is the same in 1.9.1.

    Well, this isn't available because of the #if !NRF_POWER_HAS_RESETREAS above.

    When the RESETREAS register is available, the enum entries get mapped to the POWER_RESETREAS_XXX_Msk defines.

    But somehow the CtrlAp reset isn't in this enum.
    As a workaround, I am directly checking against the define POWER_RESETREAS_CTRLAP_Msk, which should work in my application, but I still think that CTRLAP should also get an entry in the enum.
Reply
  • I'm on NCS 1.8.0, but the enum is the same in 1.9.1.

    Well, this isn't available because of the #if !NRF_POWER_HAS_RESETREAS above.

    When the RESETREAS register is available, the enum entries get mapped to the POWER_RESETREAS_XXX_Msk defines.

    But somehow the CtrlAp reset isn't in this enum.
    As a workaround, I am directly checking against the define POWER_RESETREAS_CTRLAP_Msk, which should work in my application, but I still think that CTRLAP should also get an entry in the enum.
Children
Related