SPI slave interrupt is slow in STM32F767
I am working on SPI slave at NUCLEO-F767ZI.
I am using the interrupt and LL library. This is the RX handler:
void SPI1_Rx_Callback(void) {
if (LL_SPI_GetRxFIFOLevel(SPI1) > LL_SPI_RX_FIFO_HALF_FULL)
{
// this is only for break point
spi1_rx = LL_SPI_ReceiveData16(SPI1);
return;
}
spi1_rx = LL_SPI_ReceiveData16(SPI1);
spi1_tx = spi1_rx;
LL_SPI_TransmitData16(SPI1, spi1_tx);
}It just echos. The master sends 70 bytes data with no delay or gap until the end of the transmission. I put a break point in the line of 5 in the above code. When the master sends the data in 1MHz, it never go into the break point. But if I increase it to 2MHz, it stops in the break point. I think 2MHz is not that fast speed in SPI bus. How can I fix this?
- sysclk: 96MHz
- Here is SPI1 setting:

