USART Tx-interupt overruling Rx-interrupt?

Hi,

Using the STM32F103ZE USART2.

The usart interrupt handler is called when receiving data and when transmitting data, but...

my interrupt handler exclusively first checks for received data (bit RXNE) and if not there it checks then for transmitted data (bit TXE) in the status register. The RXNE is continuously detected as I do not read the rx databuffer.
But if meanwhile sending data to the usart the RXNE bit is never detected although evaluated first.
My interrupthandler, after having checked for both bits, waits for 1 second just using a loop.

If I disable the TXE interrupt then the RXNE is detected.

Why?

Henk

Parents
  • ERRATA:

    Hi,

    Using the STM32F103ZE USART2.

    The usart interrupt handler is called when receiving data and when transmitting data, but...

    my interrupt handler exclusively first checks for received data (bit RXNE) and if not there it checks then for transmitted data (bit TXE) in the status register.

    [errata]
    The TXE is continuously detected as I do not write to the Tx databuffer.
    [/errata]

    But if meanwhile sending data to the usart the RXNE bit is never detected although evaluated first.
    My interrupthandler, after having checked for both bits, waits for 1 second just using a loop.

    If I disable the TXE interrupt then the RXNE is detected.

    Why?

    Henk

Reply
  • ERRATA:

    Hi,

    Using the STM32F103ZE USART2.

    The usart interrupt handler is called when receiving data and when transmitting data, but...

    my interrupt handler exclusively first checks for received data (bit RXNE) and if not there it checks then for transmitted data (bit TXE) in the status register.

    [errata]
    The TXE is continuously detected as I do not write to the Tx databuffer.
    [/errata]

    But if meanwhile sending data to the usart the RXNE bit is never detected although evaluated first.
    My interrupthandler, after having checked for both bits, waits for 1 second just using a loop.

    If I disable the TXE interrupt then the RXNE is detected.

    Why?

    Henk

Children
More questions in this forum