From a94e266cf1763044fffaa5241bcb5d5a0bcad24a Mon Sep 17 00:00:00 2001 From: bubnikv Date: Sat, 20 Jan 2018 16:20:51 +0100 Subject: [PATCH] Documented CPU load and frequency of the following interrupts: 9. ISR(INT7_vect) - Fan signal interrupt 26. ISR(M_USARTx_RX_vect) - USB to serial RX 37. ISR(USART1_RX_vect) - R-PI serial RX --- Firmware/MarlinSerial.cpp | 12 +++++++----- Firmware/Marlin_main.cpp | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Firmware/MarlinSerial.cpp b/Firmware/MarlinSerial.cpp index 357de7c6..0464fe41 100644 --- a/Firmware/MarlinSerial.cpp +++ b/Firmware/MarlinSerial.cpp @@ -49,11 +49,13 @@ FORCE_INLINE void store_char(unsigned char c) } -//#elif defined(SIG_USART_RECV) #if defined(M_USARTx_RX_vect) - // fixed by Mark Sproul this is on the 644/644p - //SIGNAL(SIG_USART_RECV) -SIGNAL(M_USARTx_RX_vect) +// The serial line receive interrupt routine for a baud rate 115200 +// ticks at maximum 11.76 kHz and blocks for 2.688 us at each tick. +// If the serial line is fully utilized, this corresponds to 3.16% +// loading of the CPU (the interrupt invocation overhead not taken into account). +// As the serial line is not fully utilized, the CPU load is likely around 1%. +ISR(M_USARTx_RX_vect) { // Test for a framing error. if (M_UCSRxA & (1< 18 (approximately), which is sufficient because MIN_PRINT_FAN_SPEED is higher