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

Parents
  • 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

Reply
  • 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

Children
No data