AnsweredAssumed Answered

LPC845: Behavior of SPI RXRDY flag

Question asked by 12345 67890 on Aug 25, 2019

Hi, on a LPC845-BRK, MCUXpresso 11.0, SDK 2.6.0:

Import SDK examples, driver_examples, spi, spi_polling_master.

Debugging: Stepping into line 114, SPI_MasterTransferBlocking(EXAMPLE_SPI_MASTER, &xfer);

There in fsl_spi.c line 519: RXRDY flag in STAT is 0, correct.

Next step, in line 522: RXRDY flag is 1, correct.

Next step, in line 525: RXRDY flag is 0, INCORRECT. Now being trapped in endless loop in this line because of

while (!(base->STAT & SPI_STAT_RXRDY_MASK))


From UM11029:


When NOT STEPPING through the code it works.

So why is RXRDY flag automatically reset shortly after setting without reading RXDAT register?

Because of the RXIGNORE flag in this case? Does the RXIGNORE flag reset the RXRDY flag immediately or after a special time after being set? This can be useful to determine the end of the transfer but should then be explained in the UM.


EDIT: The RXIGNORE flag has no influence to this behaviour.


EDIT II: After a relaxing weekend I think it's the debugger. In the next step the debugger reads the registers, of course RXDAT as well if watched. And this is the required action to reset the RXRDY flag...