USART - Sending break characters on RS485 bus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-01-30 11:58 AM
Hi all,
I can't figure out whether the TC flag is set at the end of a break character or not.I use a GPIO to enable TX mode on the RS485 transceiver at the end of any transmission I normally monitor the TC flag and disable 485 TX mode when TC=1.Sending a break character is not like sending data and there is nothing in the manual that explains if the TC is set at the end of a break character or not.Anyone knows?The ref.manual says:
Break charactersSetting the SBK bit transmits a break character. The break frame length depends on the Mbit (see Figure 223). If the SBK bit is set to �1 a break character is sent on the TX line after completing the current character transmission. This bit is reset by hardware when the break character is completed. #uart-break #stm32-usart-break-character- Labels:
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-01-30 2:13 PM
I don't know, but a quick way to check yourself would be to forward the TC status to a GPIO in a tight foreground loop.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-02-01 1:42 AM
I checked on the logic analyzer. TC is not changed when sending a break character. Also, it's not possible to send long breaks ( i need 5 ms) so USART has to be deinitialised and break signal has to be sent using GPIO, it's painful but I'll get over it :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-02-01 5:09 AM
''it's not possible to send long breaks ( i need 5 ms) so USART has to be deinitialised and break signal has to be sent using GPIO''
Instead of completely ''deinitialising'' the UART, could you just reduce the baud rate and/or increase the clock divider to ''stretch'' the break...?
A complex system designed from scratch never works and cannot be patched up to make it work.
