Main Site Documentation

NETMF 4.2 Developer web page lists released versions 4.2.10.1 for the G400-D


#1

From the release notes I see there is a version Firmware Version 4.2.10.1
•G400 v4.2.10.1, TinyBooter v4.2.10.0

I done the Beta Tiny Boot loader update (G400_Beta_Programer.zip) and used FEX_Config to install the G400_Firmware_4.2.10.0.zip files.

But FEZ_Config still shows:
Firmware (TinyCLR) Version 4.2.10.0

Should this not be Version 4.2.10.1 and if so where can I find the latest?


#2

The correct Firmware version is indeed 4.2.10.0 for both TinyCLR and TinyBooter. The version in the release notes for the TinyCLR is a typo and thus is incorrect.

Rest assured that you have the latest version.


#3

I am currently working on PC based controller design but for the next few weeks still willing to switch to the G400-D, so I am tracking the development quite closely.

I noticed that there is no mention of the status of the Real Time Clock, just tried to set the current time, and it seems to leave the G400-D in an un-happy state. This required me to re-program the TinyBooter and TinyCLR. Not to bad if you know this has happened but some what of a pain when not expecting a crash.

It would be nice to see the status of Real Time Clock in the developer web page as a separate line item.


#4

looks like we completely forgot about RTC :slight_smile: Been busy with the large features. We will take care of this soon.


#5

RTC status has been added. Thank you for the positive feedback. :slight_smile:


#6

I am also having issues with the SerialPort Class, on the Chipworkx dev board, I was able to have the DataReceive receiving and parsing data, plus had a timer to check for 200mS timeout on messages responses. I have started a G400-D checkout program that exersizes the various features.

With the G400-D if I call the COMPORT.Write or Read methods I get an argument exception.

I only mention this here as the developer web page lists UARTS as done. I could provide my checkout program. Obviously serial ports would be a real show stopper for my project. I have tried with and without a loop back connector.

I’d gladly help with qualifying the G400-D as it would be a really sweet solution for us.


#7

It seems that taylorza has the G400-D serial ports working in a Gadgeteer project.

I have the following statement to open a serial port.

public static SerialPort RasPort = new SerialPort(“COM3”);


#8

Serial Ports were tested. If you have any issues, please post an example to reproduce. Do not include anything in your report beside the serial port please.


#9

public class Program
{
public static SerialPort RasPort = new SerialPort(“COM3”);

    public static void Main()
    {
        System.Text.Encoding enc = System.Text.Encoding.UTF8;

         RasPort.BaudRate = 38400;
         RasPort.Parity = Parity.None;
         RasPort.StopBits = StopBits.One;
         RasPort.DataBits = 8;
         RasPort.Handshake = Handshake.None;
         RasPort.ReadTimeout = 20;
         RasPort.Open();

         byte[] sendBuffer = new byte[100];
                             
         sendBuffer = enc.GetBytes("Hello World from G400-D SoC");
          RasPort.Write(sendBuffer, 0, sendBuffer.Length);
}

}

This is the exception message from RasPort.Write
#### Exception System.ArgumentException - 0xfd000000 (1) ####
#### Message:
#### System.IO.Ports.SerialPort::Write [IP: 0000] ####
#### G400_Console_G400HDR_BlinkLED.Program::Main [IP: 00ea] ####
A first chance exception of type ‘System.ArgumentException’ occurred in Microsoft.SPOT.Hardware.SerialPort.dll
An unhandled exception of type ‘System.ArgumentException’ occurred in Microsoft.SPOT.Hardware.SerialPort.dll


#10

@ PHITEK - I just tested your code and it work perfectly. I have the RS232 module plugged into Socket 6 (COM3) and I am receiving the data on the PC using TeraTerm.

Can you double check the firmware version that you have loaded, it should show 4.2.10.1 on the LCD display (this is not the correct version number, but at least you will be sure it is the latest :slight_smile: )

EDIT: Ignore my question regarding the version, I read your initial post and it seems you do have the latest… Sorry about that.

As a side note and I am sure you are aware, but it is worth mentioning just in case. You should not allocate the byte array of 100 bytes as in the following code


byte[] sendBuffer = new byte[100];

Because the next line


sendBuffer = enc.GetBytes("Hello World from G400-D SoC");

Returns a new byte array with the data from GetBytes, so the initial byte array of 100 bytes is orphaned and is left to the GC to clean-up.

This is not causing your problem however…


#11

@ talyorza - Thanks for checking the serial port code and the sendBuffer optimization.

I have the G400HDR - Breakout wired into prototype but some of the pins have changed since the initial pinout, let me update to the new pinout - the devices are not plugged in so I don’t think it is an issue, but am un-sure about the ERXER (47), ETX1 (49), MODE USB/COM (135) functions.


#12

@ PHITEK - It is a pleasure.

I hope I am not misinterpreting your point about ERXER, ETX1… but these are not COM3. COM3 is on the following pins


PA5 - TX
PA6 - RX


#13

@ taylorza - My project requires PC-104 ADC and DAC adapter, a PC-104 24 GPIO adapter, and a 2x16 LCD display in 8 bit mode, so I have a 8 bit software bus defined. This all worked fine with the ChipWorkx board. The serial port controls an in-house controller board for six stepper motors, which has a Mega32 per two motors.

Currently my main development is for a PC104 SBC running Embedded Windows 7 but I don’t want to give up on the G400-D just yet.


#14

@ Talyorza - cut all my signals that changed since the initial pin out that my have other purposes, but still get the exception.

Will let you know if I find anything else.


#15

Decide to order a second G400-D and the G400HDR to test them and the serial port in isolation from my proto-type hardware.

Re-did adding all the references, still see the exception in either .Read or .Write methods.

Check how the module seats in the G400HDR - looked fine.

Some of the other extenders, break out adapters will also come in handy and round out my order.


#16

Received the second G400-D Beta kit and new USB Client DP module, but sadly see the same results, argument exception from the Microsoft.Spot.Hardware.SerialPort.dll.

Just wondering if these modules need to be returned, or is there something I could be doing wrong, or should I wait for the next release of the firmware?


#17

@ PHITEK

We are looking into this issue. We will report back as soon as we can find an answer.


#18

@ PHITEK


using System;
using System.IO.Ports;
using System.Text;
using System.Threading;

using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;

namespace G400_UART_Forum_Test
{
    public class Program
    {
        // This is based on this forum post: https://www.ghielectronics.com/community/forum/topic?id=12355

        public static SerialPort RasPort = new SerialPort("COM3");

        public static void Main()
        {
            System.Text.Encoding enc = System.Text.Encoding.UTF8;

            RasPort.BaudRate = 38400;
            RasPort.Parity = Parity.None;
            RasPort.StopBits = StopBits.One;
            RasPort.DataBits = 8;
            RasPort.Handshake = Handshake.None;
            RasPort.ReadTimeout = 20;
            RasPort.Open();

            byte[] sendBuffer = new byte[100];

            sendBuffer = enc.GetBytes("Hello World from G400-D SoC");
            RasPort.Write(sendBuffer, 0, sendBuffer.Length);
        }

    }
}

The following assemblies were used:
Microsoft.SPOT.Graphics version 4.2.0.0
Microsoft.SPOT.Hardware version 4.2.0.0
Microsoft.SPOT.Hardware.SerialPort version 4.2.0.0
Microsoft.SPOT.Native version 4.2.0.0
mscorlib version 4.2.0.0

I deployed this code to the G400 and had the DIMM module in both the G400HDR and the ChipworkX Development System and I am not getting the exception that you are reporting.

Can you verify which versions of Micro Framework, the GHI SDK, and the G400 Firmware that you are using?


#19

@ Aron - Thanks very much for trying the code and reporting the assembly version numbers, that matches my version numbers exactly. I decide setup a new project on a different computer and the code now runs, same assembly version numbers. I tried a uninstall and re-install of the .NET MF 4.2 but that didn’t help. If I narrow the issue down I will be sure to report back here.