nRF9151/61: Errata 36 workaround

Errata 36 for the nRF9161 (and the same problem exists on the nRF9151) disables the access port in SYSTEM ON IDLE, which is the default low power state for nRF9120 devices.

https://docs.nordicsemi.com/bundle/errata_nRF9161_Rev1/page/ERR/nRF9161/Rev1/latest/anomaly_161_36.html

As noted in the link, this prevents attaching a debugger (and consequently RTT logging), unless the device is forced into constant latency mode.

Unfortunately as far as I can tell, NCS does not provide any options to actually apply the suggested workaround.

Ideally there would be a "CONFIG_NRF_CONSTANT_LATENCY_MODE" or similar option that users could enable to automatically handle this errata.

Simply pasting "NRF_POWER->TASKS_CONSTLAT=1;" at the start of the application main function is not sufficient as it appears that this needs to be applied somewhere between nrf91_handle_approtect() and the first time the SiP would enter SYSTEM ON IDLE.

Related