Hardware: nRF52840 DK
SDK: 16.0.0
FreeRTOS: 10.0.0
I am attempting to use UARTE1 for a Modbus port. UART0 is already in use for a Command Line Interface. I can set up and use UART0 with no issues. However when I call nrf_serial_init to setup UARTE1, something goes wrong with RTC2. I have RTC2 setup to generate a one second COMPARE 0 event which we used to keep track of time. After nrf_serial_init is called, the interrupt goes from firing once a second to firing once every 30 or 31 seconds. Stopping in the debugger I can see that the RTC2 registers are unchanged. The prescalar is 0, and the compare 0 register has a multiple of 32768 in it. I checked the CLOCK peripheral and it looks correct as well.
UARTE1 is set up on ports P1.2 (TX), and P1.3 (RX), no flow control. DMA is enabled for the channel. UARTE1 will successfully transmit and receive data.
I'm looking for any thoughts on a) debug approach, or b) you know what this is!