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.
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.
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.
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.
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
@ 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 )
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.
@ 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.
@ 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.
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?
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?
@ 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.