AnsweredAssumed Answered

Waiting for a flag to set - hangs

Question asked by Jack Boatman on Feb 13, 2019
Latest reply on Feb 13, 2019 by Jack Boatman

Many of the various code examples have simple wait instructions. For example:

while (CAN_A.MCR.B.NOTRDY == 0) {};


And these generally work. However, I occasionally (often) find that they do not work. For example:

while (eSCI_B.IFSR1.B.TDRE == 0) {};


This one (checking for LIN to be ready) hangs; when I stop the debugger / halt execution it is just sitting on that line of code. I have in some cases created multiple lines of code to create an "equivalent" function, but that is sort of silly.


I'm using S32DS and mpc5777C. I've got most of the other peripherals (CAN, SPI, etc.) working. Any ideas?