2018-04-01 11:08 PM
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 #stm32l053spi2018-04-02 12:53 AM
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.
2018-04-02 07:09 AM
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.
2018-04-02 07:25 AM
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.
2018-04-03 03:57 AM
sorry to inform you that as per our last conversation i already told you that...each thnig i've done.
N about the flags yes i'vr did it!!!
2018-04-03 04:39 AM
how did you clear the receive buffer ?
what page in the reference manual are you on ?
2018-04-03 11:08 PM
i refer the reference manual, registers of the SPI.