I’m improving the serial communications in a project using a G30 with Netmf 4.3.
How big is the serial port’s RX buffer? Is TX Buffer the same size?
I tried to figure this out using the debugger in VS 2013 but the most promising field “Length” returns a SystemNotSupported exception. Not sure what to make of that. Here’s a picture:
How often will this object check for data on my wireless module’s output? Is it interrupt driven or polled?
On the G30 in 2016 R1, the TX buffer is 256 bytes and RX is 512 bytes, both per port. This is not guaranteed to remain the same between releases. The native driver reads data as it arrives and fills the RX buffer. You’ll get an event in managed code telling you data has arrived, it’s up to you to read it before the buffer is overrun.
Length is not related to the size of the internal buffers.
Thanks for the info!
Great, If i can keep my wireless messages small then 512 bytes of immediately handled buffering should make my job much easier. Much appreciated.
This event handler, is it important that I keep it as tight as possible? I’m imaging that if data comes in towards the end of handling the event that the event won’t be triggered again until even more data comes in?
You should keep the handler as tight as possible, yes. Don’t do any processing in it, just read the data into a buffer of yours, then signal another thread to process.
Will do, thanks for clarifying.