cancel
Showing results for 
Search instead for 
Did you mean: 

Why SPI transmit doesn't work from timer interrupt?

NikolaiB
Associate III

Hello everyone!
That works:

int main(void)
{
  ...
  init_SPI1();
  for(;;)
    SPI1_Send();
}

And that doesn't:

void TIM2_IRQHandler(void)
{
  SPI1_Send();
  TIM2->SR &= ~TIM_SR_UIF; // reset UIF bit in the status register of the timer
}

Why?

Thank you very much!

0 REPLIES 0