ch552: Raise UART IRQ priority and tune USB polling period

Set UART1 IRQ to high priority to not miss any incoming bytes
and tune USB polling period (bInterval).
This commit is contained in:
Jonas Thörnblad 2025-01-23 13:44:53 +01:00 committed by Mikael Ågren
parent 361890042a
commit c292595ee3
No known key found for this signature in database
GPG key ID: E02DA3D397792C46
2 changed files with 5 additions and 4 deletions

View file

@ -151,6 +151,7 @@ inline void UART1Setup()
// Should correct for rounding in SBAUD1 calculation
SBAUD1 = 256 - FREQ_SYS/16/UART1_BAUD; // Calculation for Fast mode
IE_UART1 = 1; // Enable UART1 interrupt
IP_EX = bIP_UART1; // Serial port IRQ has high priority
}
/*******************************************************************************