Skip to main content
silvia
Associate II
December 13, 2011
Question

STM32F10xx two USART at the same time

  • December 13, 2011
  • 2 replies
  • 755 views
Posted on December 13, 2011 at 13:23

Hello,

Pardon by my english.

I need two USART work at the same time. One USART is all the time sending bytes and the other USART is receiving bytes.I work with USART configures in Half Duplex mode. I work in baudrate of 7200bps. I have changed the priority of the NVIC, first both USART with the same priority and next one with higest priority.

In the attach file, I put the code with which I configure both USART. My problem is that I lose bytes.

Is my configuration wrong?
    This topic has been closed for replies.

    2 replies

    emalund
    Associate III
    December 13, 2011
    Posted on December 13, 2011 at 17:18

    1) please cut-and-paste your code into the post rather than attaching it

    2) the problem is, more likely in your ISRs, show them

    Erik

    Tesla DeLorean
    Guru
    December 13, 2011
    Posted on December 13, 2011 at 17:45

    Not sure of the merits of half-duplex in unidirection flow.

    Your problems, at a guess, are a failure to adequately buffer the channels, and blocking on USART status, rather than some perceived priority issue.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..