Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Sending break over serial port

serial break uart

  • Please log in to reply
3 replies to this topic

#1 Pyt

Pyt

    Member

  • Members
  • PipPip
  • 18 posts

Posted 30 December 2013 - 11:27 AM

Hello,

 

Is there a way  of sending a break condition over a serial port ? From the reference manual, the Netduino processor can apparently do this (there's an SBK bit in the UART CR1 register to that avail), but I couldn't find anything in the SerialPort class that gave that possiblity.

Did I overllok something ? Any hint as to how to do this ?

 

Thanks,

Pyt.

 

 



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 30 December 2013 - 01:20 PM

Hi Pyt, There's no built-in support for the .NET SerialPort.BreakState property in NETMF. This is something that we could look at adding in a future firmware update. We will be working on adding support for the RS-232 pin properties which aren't exposed in NETMF during February...so this might make sense to implement at the same time. Do you have a lot of requirements for this? Comfortable hacking the firmware yourself? BTW, the STM32 does have a bit which can be set to send a single BREAK frame as you mentioned. Unfortunately it can't put the serial port into a longer break state--which is what is often desired--but that could be worked around by disabling the USART peripheral and driving the pin low during (BreakState = true). That's not ideal and not necessarily easy, but technically it's possible. Chris

#3 Pyt

Pyt

    Member

  • Members
  • PipPip
  • 18 posts

Posted 30 December 2013 - 04:33 PM

Yes, this is an important requirement for me. I'm daisy-chaining Netduinos through serial ports, and propagating serial data frames across the chain. If  a netduino ever looses a piece of data, it will be desynchronized with no ability to easily find the start of frame again. One solution is to send a short break at the beginning of each frame, which will force every netduino in the chain back into a known state, whether they are in or out of sync.

The short break provided by the SBK is enough for my needs,but I reckon there might be other needs.

 

Yes, I'm comfortable hacking the firmware (with proper guidance). It's either that or do ugly things in my code for sync purposes, so if push comes to shove...

 

Regards,

Pyt.



#4 sfx

sfx

    Advanced Member

  • Members
  • PipPipPip
  • 52 posts

Posted 03 July 2014 - 02:57 AM

Hi Chris,

 

Just found this post and was wondering if you had any updates concerning it? This is an important requirement for me too. I'm having a similar issue with serial port BreakState and would also like to see a framework solution to this problem.

 

See my recent post here:

http://forums.netdui...and-breakstate/

 

Nathan







Also tagged with one or more of these keywords: serial, break, uart

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.