when a FRSKY serial sum receiver (D4FR) get no transmit signal (for example you have forgot to switch on the transmitter ) it connects the serial sum output to zero.
In this case an ATmega32U4 based board hangs up (it can be still tested by connecting the serial sum input to ground). The controller hangs (also if the transmitter was switch on in the meantime) until you switch off the board.
Normally no problem but sometimes the controller activates one or more motor outputs with full throttle, a dangerous situation !!!
I have no idea for the reason but the problem is the serial sum interrupt routine rxInt().
In revision r1101, the interrupt was (re)enable inside the interrupt routine:
Code: Select all
now = micros();
sei(); // <= new line
diff = now - last;
The new sei(); line is the reason for the crash.
If the line was deleted, there's no more hanging up.
JayBee