Hi, i using SPI for communicating Transmiting and Receiving with STM32F407. My routine for transmit:
void spi_transmit(uint8_t DataX) {//Envio while(!(SPI_TFT->SR & SPI_SR_TXE)); SPI_TFT->DR = DataX; while(!(SPI_TFT->SR & SPI_SR_RXNE)); SPI_TFT->DR; // while(SPI_TFT->SR & SPI_SR_BSY); return; }
My problem is that in normal function, arbitrary the program counter is stack in the waiting of flag SPI_SR_RXNE=1. If i debug step by step, when i read SPI_SR_RXNE, it clears and never continue. Why is that? i cant understand.
That's a question for ST: https://community.st.com/s/
https://community.arm.com/developer/tools-software/tools/f/keil-forum/43684/lpc2148-timer0-not-working-as-expected/158950#158950