nRF52840 TWIS hangs after WRITE_REQ with CONFIG_UART_ASYNC_API enabled; CONSTLAT prevents failure

I am seeing a reproducible interaction between asynchronous UART support and the TWIS peripheral on an nRF52840 running NCS v3.4.0.

The application uses nrfx TWIS to implement an I2C peripheral interface to another MCU. With CONFIG_UART_ASYNC_API=n, the I2C interface operates reliably.

When CONFIG_UART_ASYNC_API=y is enabled, the first few I2C transactions may complete normally, but eventually a transaction hangs. Instrumentation of the TWIS event handler shows that NRFX_TWIS_EVT_WRITE_REQ is received for the failing transaction, but the expected NRFX_TWIS_EVT_WRITE_DONE event never occurs.

The failure occurs even when the UART instance itself is disabled in devicetree, suggesting that simply enabling the async UART support/configuration is sufficient to expose the problem.

Some additional observations:

  • Delaying each MCU request by 10ms causes the 2nd command to fail, implying that timing is significant.
  • Running the application under debugger control appears to prevent the failure.
  • Keeping main() continuously busy also prevents the failure.
  • Setting CONFIG_TICKLESS_KERNEL=n does not prevent the failure.
  • Executing NRF_POWER->TASKS_CONSTLAT = 1 during startup prevents the failure and the TWIS interface remains reliable.

These results appear to indicate an interaction with the SoC power/clock state. I do not know whether the root cause is in the UARTE driver, TWIS/nrfx handling, or the associated power/clock management.

I would appreciate guidance on whether this is a known issue and whether enabling the UART asynchronous API could change power/clock handling in a way that affects TWIS/EasyDMA operation.

Thanks

Related