| ??? 12/02/02 17:38 Read: times |
#33584 - RE: Simple 8052 O/S |
... I just realised I can trigger TX from app by loading the buffer and clearing TI and a flag (so that TX task knows the int came from app not the UART)
A frequently used method is just to set TI What will happen if UART happens to finish TX-ing a character while the ISR is running? That will mean that your ISR is WAAAY too slow Or even at the EXACT same moment that the app code clears the bit? Whoops, very intermittent failures because ISR cannot know when UART is free ... impossible to find out or test for and risky I think. Can't expect poor chip to know about that. If you are having multiple tasks all accessing a UART transmit, you WILL need to do some housekeeping or get mixed transmission, depending on the active task at TI time. Erik |



