nRF5340 GPIOTE CONFIG[n] registers don't appear to clear on first write of 0 and then don't stay cleared

We are implementing a multi-protocol system with the Nordic BLE soft controller and a proprietary protocol. When we change modes all the resources being used by the currently active protocol must be released for use by the alternate protocol (e.g. RADIO, TIMERs, DPPI, GPIOTE, IPC channels, etc.). When trying to release GPIOTE channels we observe that writing 0 to a CONFIG[n] register does not usually result in the register being cleared. In most cases it requires a subsequent write (0) to the same CONFIG[n] register before it actually clears. In addition, when reading the CONFIG[n] some time afterwards (a few seconds) it appears to go back to it's previous value even though no further accesses have been made to the register.

Parents Reply Children
  • Following the function calls from this reference I can see that nrf_gpiote_te_default() does actually write 0 to the CONFIG[] register for the nRF5340 device. I am now using that call to clear the CONFIG[] registers. The issue with the registers going back to their previous values was a side effect of another function call that was restoring those values in order to resume BLE operation, a misunderstanding on my part.

    Thanks for your help!

Related