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
This commit is contained in:
bubnikv 2018-01-20 16:20:51 +01:00
parent 815dfcb14b
commit a94e266cf1
2 changed files with 9 additions and 5 deletions

View file

@ -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<<M_FEx))
@ -74,7 +76,7 @@ SIGNAL(M_USARTx_RX_vect)
}
}
#ifndef SNMM
SIGNAL(USART1_RX_vect)
ISR(USART1_RX_vect)
{
// Test for a framing error.
if (UCSR1A & (1<<FE1))

View file

@ -7566,6 +7566,8 @@ void setup_fan_interrupt() {
EIMSK |= (1 << 7);
}
// The fan interrupt is triggered at maximum 325Hz (may be a bit more due to component tollerances),
// and it takes 4.24 us to process (the interrupt invocation overhead not taken into account).
ISR(INT7_vect) {
//measuring speed now works for fanSpeed > 18 (approximately), which is sufficient because MIN_PRINT_FAN_SPEED is higher