Skip to main content
Huzaifah Limbada
Associate III
April 2, 2018
Question

If i want to enable the received inerrupt in the STM32L053C8 then what i have to do?

  • April 2, 2018
  • 1 reply
  • 818 views
Posted on April 02, 2018 at 08:08

I want to start the only received interrupt for the SPI in STM32L053, but when i enable it it will call the ISR before transmitting aything.

can anyone have suggestion for that??

#stm32l053 #stm32l053spi
This topic has been closed for replies.

1 reply

T J
Senior III
April 2, 2018
Posted on April 02, 2018 at 09:53

is your SPI set to slave ?

did you try to clear the receive buffer ?

did you check the reference manual ? find how to clear the interrupt flag.

Huzaifah Limbada
Associate III
April 2, 2018
Posted on April 02, 2018 at 14:09

each n every things i have checked, but when i call the

HAL_SPI_Receive_IT(&hspi2,&buf,1);

dirctly it is call the

HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi);

it's like calling an interrupt without transmit a data.

T J
Senior III
April 2, 2018
Posted on April 02, 2018 at 14:25

in SPI terms, when you transmit, you receive as well.

you must clear the receive buffer

and there may be some error flags that need clearing too.

what page are you reading in the reference manual ?

Its your job to check the flags that need clearing.