USART RX/TX Enable Pin via Register Empty Interrupt (DRE)
I have a RS485 signal that comes in and is converted to TTL USART and feed into my ATSAMD51 processor. I used Harmony to create my lib_sercomX_usart.c file and I added to the SERCOMX_USART_ISR_TX_Handler a digital IO line that puts the RX485 back into RX mode after transmission. Since my signal is sent at 9600 baud I find that I get the interrupt handler before the last byte has completed and thus I have to add a delay to get it to work.
Is there any other interrupt, other then DRE, that I can set that would work for telling me when the last byte has actually been sent?