Interesting G120 Bug


I just managed to isolate an issue in a G120 application that i’m currently developing. It’s incredibly easy to reproduce. I have tested it on one hand-soldered board and one FEZ Cobra II Wifi, both crashes identically with firmware and loader of version

        public static void Main()
            SerialPort Com1 = new SerialPort("COM1", 9600);

            for (int i = 10; i > 0; i--)
                byte[] text = System.Text.Encoding.UTF8.GetBytes("Killing G120 in " + i + "\r\n");
                Com1.Write(text, 0, text.Length);


            WiFiRS9110 _wifi = new WiFiRS9110(SPI.SPI_module.SPI2, G120.P1_10, G120.P2_11, G120.P1_9, 4000);
            if (!_wifi.Opened) _wifi.Open();


The output looks like the following:

  pc  =0xa0306154
  lr  =0x00000000
  sp  =0x1000ac00
  r00 =0x00000000
  r01 =0x00000000
  r02 =0x00000001
  r03 =0x00000000
  r04 =0x00000001
  r05 =0x00000000
  r06 =0xa0306154
  r07 =0x00000000
  r08 =0xa00255d0
  r09 =0xa0024f98
  r10 =0x00000000
  r11 =0x00000000
  r12 =0x00000001

Connecting external power does not seem to make any difference.

1 Like

Excellent bug report. I wish all reports are like this, short and to the point. We will investigate immediately, thanks.

After a little bit more debugging i managed to reduce it to:

            byte[] b = {03, 51, 67, 73, 11, 58, 82};

@ cluez - I was able to reproduce it on a few of our boards, but it looks like its an issue in NETMF itself:


I guess it will be fixed somewhere in .NETMF vNext then. In the meantime this workaround should work:

        public String GetPhysicalAddress()
            String result = String.Empty;
            foreach (byte b in _wifi.PhysicalAddress)
                result += b.ToString("X2") + "-";
            return result.TrimEnd('-');