G400 hanging and then reboot

Hi all,

In my project I have a G400 as “core” processing, and a cerberus connected on the G400 by a null modem module.

Until the last firmware, the communication was working normally. but since the last update, the serial communication between the 2 mainboards is crashing the G400.

I disabled line by line to identify the source, and the read operation on the serial port caused this.

I changed all my cables, I replace de G400 vith another one, I replaced the power module, I change the socket on the G400 (initially it was the 12, I switch on 11), I tried with GT.Interfaces.Serial.SerialStopBits.One and GT.Interfaces.Serial.SerialStopBits.Two and here is the code I use to instantiate the connection :


Gadgeteer.Interfaces.Serial sr = new GT.Interfaces.Serial(GT.Socket.GetSocket(11, true, null, null), 9600, GT.Interfaces.Serial.SerialParity.None, GT.Interfaces.Serial.SerialStopBits.Two, 8, GT.Interfaces.Serial.HardwareFlowControl.NotRequired, null);

In my project I also have a network connection, through an ENC28, which works well, but there is no way to make it works if a read operation is executing on the serial line.

So :

  • Communication between mainboards is working if I disable the network
  • Network is working if I don’t call Read operation on the serial line
  • Before last firmware update, both were working well…

Usually it crashes after 5 sec.

Anyone has an idea ?

it’d help if you could tell us the two specific firmware versions you’re discussing.

@ Brett for the G400 : v4.2.11.2 and the cerberus : v4.2.6.2

Sorry, you need to tell us the BEFORE version and the AFTER version. What version were you running when it worked, and what version are you now running (now broken). Are the versions above the before or after?

It’s the later version, the ones furnished with the latest release.
The version before were the one of the previous release (Sorry, I don’t have the number)

Any news ?

I did some more tests :

I used another G400 mainboard -> no difference
I used another Cerberus mainboard -> no difference

I replace the Cerberus by a Spider -> The G400 is nor hanging anymore… The G400 is rebooting when the Spider is started, but the communication works well.

@ GMISoft -

We will take a look into it to see why it is.

Thanks

Thanks a lot,

I joined the scheme of my G400 card :

  • ENC28 is linked to socket 1
  • Link to null modem module on socket 11

The cerberus on the other side is empty (I removed all modules to do the test) and I tried on every “U” socket.

I also remark some other problem with the serial line :
On G400/USB Host is connected an external GPS antenna, sometimes I get an exception meaning that the device is not recognized, sometimes I get bad infos from the GPS (message aren’t complete) and sometimes it works

@ GMISoft -

I made a simple project, in Cerberus, it only send a text every 100ms via UART, socket 6

On G400, I have one thread to received data from Cerberus, the serial.Read function is called every 100ms.

And in Main thread, I set up ENC28, and reading data from a website in a loop.

And, I was not able to reproduce that issue. I tested on 4.3 (g400 + Cerb) but I don’t think that is reason.

Can you please show us your code, pls?

Hi Dat,

Thank you for testing !

My code will be hard to be shown here, since the whole project is around 2 millions line…

But on my side, the read function is always called, I mean once I get result, I send data to another thread and call the read directly, to get the quickest reaction as possible.

Could that be the problem ?

@ GMISoft -

I am not clear what you mean. Can you please write a simple test only with ENC28 and UART to see if it is still happened? It is about half hour because you have everything, com port, spi config…

Thanks for your help and share to us your result, pls