FrequencyIn: do not raise in interrupt handler

This commit is contained in:
Dan Halbert 2020-12-22 18:54:42 -05:00
parent 3266720f15
commit eb03e4ba59

View File

@ -82,7 +82,8 @@ void frequencyin_emergency_cancel_capture(uint8_t index) {
#ifdef SAM_D5X_E5X #ifdef SAM_D5X_E5X
NVIC_EnableIRQ(EIC_0_IRQn + self->channel); NVIC_EnableIRQ(EIC_0_IRQn + self->channel);
#endif #endif
mp_raise_RuntimeError(translate("Frequency captured is above capability. Capture Paused.")); // Frequency captured is above capability. Capture paused.
// We can't raise an error here; we're in an interrupt handler.
} }
void frequencyin_interrupt_handler(uint8_t index) { void frequencyin_interrupt_handler(uint8_t index) {