So, I have a system here that I recently observed a non-reproducible lockup in, so I rushed over and attached a debugger to the running target to see where the problem was.
I saw that the UART driver code (at an SDK level outside of STM's HAL) was busywaiting for TC=1 after firing off a DMA transmit.
Of note may be that the USART is set up with RTS/CTS to communicate with another STM32 micro, which was apparently alive and running (although I had no way of debugging the state of the UART peripheral on that end).
Also of note is that SR.CTS = 1 at the time.
I have not quite been able to parse from the manual what state the UART might have been in, especially due to the mention of both nCTS for the pin state and SR.CTS for the status register.
As far as I can tell, none of the interrupts are enabled, and the intended usages is to initiate DMA and then busywait for completion.
What could cause a waiting situation like this, with no TC = 1, but SR.CTS = 1?