This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

a strange problem when using UART

I don't know why timer 0 is not running when PS flag of serial port is set

  • Post the smallest complete piece of code that illustrates your problem.


    Remember: use cut-and-paste; do not manually re-type.

    Also remember to use the 'pre' and '/pre' tags, as explained in the Notes immediately above the Message box when you make your post.
    http://www.keil.com/forum/tips.asp

  • hi,

    I don't know why timer 0 is not running when PS flag of serial port is set

    A reason may be that you forget to clear either TI or RI bit at the end of the serial interrupt. As result, your program comes back to the serial ISR after each command of main() and never goes to timer ISR because serial ISR has higher priority (PS=1) than timer one.

    Regards,
    Oleg