IQ.Pilot Release Commit @ e46d557
This commit is contained in:
@@ -74,6 +74,10 @@ void init_interrupts(bool check_rate_limit){
|
||||
|
||||
for(uint16_t i=0U; i<NUM_INTERRUPTS; i++){
|
||||
interrupts[i].handler = unused_interrupt_handler;
|
||||
// Default priority, lowered so the comms link can preempt everything else and
|
||||
// re-arm its DMA (see IRQ_PRIORITY_COMMS). Shared state is guarded by
|
||||
// ENTER_CRITICAL, which masks all interrupts regardless of priority.
|
||||
NVIC_SetPriority((IRQn_Type)i, IRQ_PRIORITY_DEFAULT);
|
||||
}
|
||||
|
||||
// Init interrupt timer for a 1s interval
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
// The SPI slave must re-arm its RX DMA at every protocol turnaround before the
|
||||
// master clocks the next phase. Without preemption that re-arm waits behind any
|
||||
// in-flight handler (CAN RX under bus load), the master clocks into an unarmed
|
||||
// peripheral, and the transfer fails its checksum -> NACK retry storms.
|
||||
#define IRQ_PRIORITY_COMMS 0U
|
||||
#define IRQ_PRIORITY_DEFAULT 2U
|
||||
|
||||
typedef struct interrupt {
|
||||
IRQn_Type irq_type;
|
||||
void (*handler)(void);
|
||||
|
||||
Reference in New Issue
Block a user