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:
@@ -28,6 +28,8 @@
|
||||
#define TIMER_MULT_APB1 2
|
||||
#define TIMER_MULT_APB2 2
|
||||
|
||||
#define TELEMETRY_EXTI_PRIO 0 // required for soft serial
|
||||
|
||||
// Keys
|
||||
#define KEYS_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOE | RCC_AHB1Periph_GPIOG | RCC_AHB1Periph_GPIOH | RCC_AHB1Periph_GPIOI | RCC_AHB1Periph_GPIOJ)
|
||||
#if defined(PCBX12S)
|
||||
@@ -521,8 +523,10 @@
|
||||
// TELEMETRY_EXTI IRQ
|
||||
#if !defined(USE_EXTI9_5_IRQ)
|
||||
#define USE_EXTI9_5_IRQ
|
||||
#define EXTI9_5_IRQ_Priority 5
|
||||
#endif
|
||||
// overwrite priority
|
||||
#undef EXTI9_5_IRQ_Priority
|
||||
#define EXTI9_5_IRQ_Priority TELEMETRY_EXTI_PRIO
|
||||
|
||||
#define TELEMETRY_TIMER TIM11
|
||||
#define TELEMETRY_TIMER_IRQn TIM1_TRG_COM_TIM11_IRQn
|
||||
|
||||
Reference in New Issue
Block a user