fix: Corrupt data using soft serial driver (#3329)
* restore bit start detection IRQ for soft serial * restore bit start detection IRQ for softserial (target Taranis and Horus) * target Taranis: EXTI9_5 is a shared interrupt for Rotary Encoder and Heartbeat for X7, X7-ACCESS und TPRO radios. Changed IRQ priority accordingly * fix crashes where the heartbeat ISR running at interrupt priorities higher than 5 interferes with FreeRTOS calls made from within the heartbeat ISR. * changed mixer scheduler timer initialization to allow for software generated update events to avoid freeRTOS calls from now prio 0 heartbeat ISR. * resolved review feedback: using defines for IRQ prio settings * following review by @raphaelcoeffic: - new function void mixerSchedulerSoftTrigger() (to be called by heartbeat driver) - defines in hal.h for targets horus and taranis * following @raphaelcoeffics review - changed all but telemetry EXIT IRQ (soft serial) definition back to their original state and added define to override EXIT IRQ (soft serial) prio
This commit is contained in:
@@ -40,9 +40,6 @@ void mixerSchedulerStart();
|
||||
// Stop the scheduler timer
|
||||
void mixerSchedulerStop();
|
||||
|
||||
// Set the timer counter to 0
|
||||
void mixerSchedulerResetTimer();
|
||||
|
||||
// Set the scheduling period for a given module
|
||||
void mixerSchedulerSetPeriod(uint8_t moduleIdx, uint16_t periodUs);
|
||||
|
||||
@@ -55,6 +52,9 @@ void mixerSchedulerEnableTrigger();
|
||||
// Disable the timer trigger
|
||||
void mixerSchedulerDisableTrigger();
|
||||
|
||||
// Trigger mixer from heartbeat interrupt
|
||||
void mixerSchedulerSoftTrigger();
|
||||
|
||||
// Fetch the current scheduling period
|
||||
uint16_t getMixerSchedulerPeriod();
|
||||
|
||||
@@ -66,14 +66,14 @@ void mixerSchedulerISRTrigger();
|
||||
#define mixerSchedulerInit()
|
||||
#define mixerSchedulerStart()
|
||||
#define mixerSchedulerStop()
|
||||
#define mixerSchedulerResetTimer()
|
||||
#define mixerSchedulerSetPeriod(m,p) ((void)(p))
|
||||
#define mixerSchedulerGetPeriod(m) ((uint16_t)MIXER_SCHEDULER_DEFAULT_PERIOD_US)
|
||||
#define mixerSchedulerClearTrigger()
|
||||
|
||||
#define mixerSchedulerEnableTrigger()
|
||||
#define mixerSchedulerDisableTrigger()
|
||||
|
||||
#define mixerSchedulerSoftTrigger()
|
||||
|
||||
#define getMixerSchedulerPeriod() (MIXER_SCHEDULER_DEFAULT_PERIOD_US)
|
||||
#define mixerSchedulerISRTrigger()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user