SPI TXEIE is not SET even after configured it
I have done some debugging on SPI interrupt problem. So, I have a function that SPI_SendDataIT which means SPI send data with interrupt. the interrupt will be triggered if TXE flag is SET. But we have to enable the TXEIE first.
But, what happen is, after my code execute at line of:
pSPIHandle->pSPIx->CR2 |= (1 << SPI_CR2_TXEIE);
the TXEIE is not even SET. and I already check the register bit number is already correct. Im using stm32f302r8. What causes this problem?
One more, In my program, before I do the TXEIE become SET, I enable the SPI clock peripheral first, the TXE become SET.
So meaning the TXE already SET before making the TXEIE become SET.
can someone help me on this issue? Here I attached the picture:
- TXE is SET after SPI peripheral clock is enabled
2.The TXEIE is not SET eventhough inside the program I already make it SET
