UART flow control not suported in modules/Dev boards described in Serialnet

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I am facing some issues with the ATZB-S1-256-3-0-C module when data is sent. In the Serialnet software it is said that ,"to ensure safe data transmission over a serial interface between a host and an MCU, it is strongly recommended to set hardware flow control". However, modules that are suported by serialnet such as ATZB-S1-256-3-0-C, ATZB-256RFR2-XPRO and ATmega256RFR2-XPRO do not have CTS/RTS pins, therefore, this is a bit contradictory, right?

 

These modules are based on the ATmega256RFR2, thus, it should be posible to load the Serialnet firmware on a propietary hardware with the ATmega256RFR2, shouldn't it? But which ones would be the CTS/RTS pins.

 

Note: I found that the ATZB-24-A2/B0 module (which is obsolete) supports UART with CTS/RTS control ,but it mounts the ATmega1281. 

 

Thanks in advace.

Last Edited: Tue. Oct 24, 2017 - 05:30 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It seems what used to be common serial handshacking protocol has become a lost art.....

Since hardware handshacking is not support within the USART module, you must choose any two port pins and write functions to handle the handshake protocol, which can be rts/cts or dtr/dsr, the choice is yours.

From the wiki Flow control (data)

 

Hardware flow control

In common RS-232 there are pairs of control lines which are usually referred to as hardware flow control:

Hardware flow control is typically handled by the DTE or "master end", as it is first raising or asserting its line to command the other side:

  • In the case of RTS control flow, DTE sets its RTS, which signals the opposite end (the slave end such as a DCE) to begin monitoring its data input line. When ready for data, the slave end will raise its complementary line, CTS in this example, which signals the master to start sending data, and for the master to begin monitoring the slave's data output line. If either end needs to stop the data, it lowers its respective "data readyness" line.
  • For PC-to-modem and similar links, in the case of DTR flow control, DTR/DSR are raised for the entire modem session (say a dialup internet call where DTR is raised to signal the modem to dial, and DSR is raised by the modem when the connection is complete), and RTS/CTS are raised for each block of data.

An example of hardware flow control is a Half-duplex radio modem to computer interface. In this case, the controlling software in the modem and computer may be written to give priority to incoming radio signals such that outgoing data from the computer is paused by lowering CTS if the modem detects a reception.

  • Polarity:
    • RS-232 level signals are inverted by the driver ICs, so line is TxD-, RxD-, CTS+, RTS+ (Clear to send when HI, Data 1 is a LO)
    • for microprocessor pins the signals are TxD+, RxD+, CTS-, RTS- (Clear to send when LO, Data 1 is a HI)

 

Hope that helps

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks.

 

Ok, but despite of it is a lost art, Serialnet firmware supports it...

 

You mean that I need to write functions to handle the handshake protocol in the Atmel BitCloud® ZigBee® PRO-certified stack? But I am using Serialnet. In the user guide there is a register to set the UART flow control, but what pins are mapped to?

 

As I said in the preious post " ATZB-S1-256-3-0-C, ATZB-256RFR2-XPRO and ATmega256RFR2-XPRO modules are based on the ATmega256RFR2, thus, it should be posible to load the Serialnet firmware on a propietary hardware with the ATmega256RFR2, shouldn't it? But which ones would be the CTS/RTS pins.

 

Last Edited: Tue. Oct 24, 2017 - 02:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MarkosLosada wrote:
In the user guide there is a register to set the UART flow control, but what pins are mapped to?
Are you talking about an AVR (subject of this message board)? AFAIK they all are just TX/RX only. It's up to you, the user to implement things like CTS/RTS (maybe even DTR/DSR too?) on unused IO pins if you need that.

 

But I notice you mention an "RF" based AVR. The problem with radio networks is that you can't have "control" wire connections providing CTS, DSR etc so the only hope of "flow control" over the airwaves is a soft protocol like Xon/Xoff that is "in band" with the data.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No. Let see we understand each other:

 

In the page 5 of the Serialnet User guide (AVR2051) it is shown the supported hardware.

In the page 42 is is said that "To ensure safe data transmission over a serial interface between a host and an MCU, it is strongly recommended to set hardware flow control (see Section 5.7.9 “+IFC” - Serial Port Flow Control for details)."

 

Therefore, for the ATZB-S1-256-3-0-C which ones are the CTS/RTS pins?

 

 

 

Last Edited: Tue. Oct 24, 2017 - 03:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MarkosLosada wrote:
the UART flow control, but what pins are mapped to?

If it's part of the software, then it should be documented which pins are used.....   

 

googling serialnet, I found a PDF with this note:

 

I would assume (you know what that means) the h/w in question does a loopback on the rts/cts pin pair as it states the software does no flow control. 

 

So its use on a custom board may not be a concern.    Are you having any indications of a serial buffer overflow or data overruns?

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Would this not be better in the IoT forum ... ?

 

EDIT

 

EG, https://community.atmel.com/forum...

 

ISTR reading there that Serialnet is no longer supported/maintained ... ?

 

https://community.atmel.com/search/site/Serialnet?filter_by=9666

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Oct 24, 2017 - 03:16 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok. I will continue in the other forum.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Moved and locked

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

Topic locked