mirror of https://github.com/commaai/panda.git
H7 SPI: disable IRQs only when necessary (#1437)
less irq disable Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
parent
e1e9bd048d
commit
17ca4171df
|
@ -51,12 +51,9 @@ void llspi_miso_dma(uint8_t *addr, int len) {
|
|||
// master -> panda DMA finished
|
||||
void DMA2_Stream2_IRQ_Handler(void) {
|
||||
// Clear interrupt flag
|
||||
ENTER_CRITICAL();
|
||||
DMA2->LIFCR = DMA_LIFCR_CTCIF2;
|
||||
|
||||
spi_rx_done();
|
||||
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
|
||||
// panda -> master DMA finished
|
||||
|
@ -71,8 +68,6 @@ void DMA2_Stream3_IRQ_Handler(void) {
|
|||
|
||||
// panda TX finished
|
||||
void SPI4_IRQ_Handler(void) {
|
||||
ENTER_CRITICAL();
|
||||
|
||||
// clear flag
|
||||
SPI4->IFCR |= (0x1FFU << 3U);
|
||||
|
||||
|
@ -80,8 +75,6 @@ void SPI4_IRQ_Handler(void) {
|
|||
spi_tx_dma_done = false;
|
||||
spi_tx_done(false);
|
||||
}
|
||||
|
||||
EXIT_CRITICAL();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue