OK, some tests
My simplest code:
using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHI.Pins;
using System.Threading;
namespace PD15ErrTest
{
public class PD15ErrTestProgram
{
static OutputPort debugLED = new OutputPort(G400.PD18, true);
//static InputPort pd15input = new InputPort(G400.PD15, true, Port.ResistorMode.Disabled);
public static void Main()
{
Debug.Print("Start PD15 ERROR Test");
int heartbeat = 0;
int cnt = 0;
while (true)
{
cnt++;
if (cnt > 100)
{
cnt = 0;
Debug.Print(DateTime.Now.ToString());
}
heartbeat++;
if (heartbeat > 10)
{
heartbeat = 0;
debugLED.Write(!debugLED.Read());
}
Thread.Sleep(10);
}
}
}
}
Output window says:
Loading start at 202dd578, end 2030ca0c
Assembly: mscorlib (4.3.1.0)
Assembly: Microsoft.SPOT.Native (4.3.1.0)
Assembly: Microsoft.SPOT.Security.PKCS11 (4.3.1.0)
Assembly: System.Security (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware (4.3.1.0)
Assembly: Microsoft.SPOT.Graphics (4.3.1.0)
Assembly: Microsoft.SPOT.TinyCore (4.3.1.0)
Assembly: Microsoft.SPOT.IO (4.3.1.0)
Assembly: System.IO (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware.Usb (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.3.1.0)
Assembly: Microsoft.SPOT.Touch (4.3.1.0)
Assembly: Microsoft.SPOT.Ink (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware.PWM (4.3.1.0)
Loading Deployment Assemblies.
Attaching deployed file.
Assembly: PD15ErrTest (1.0.0.0) Attaching deployed file.
Assembly: GHI.Pins (4.3.7.10) Resolving.
GC: 1msec 166452 bytes used, 66939312 bytes available
ā¦
Start PD15 ERROR Test
06/01/2011 00:03:15
06/01/2011 00:03:16
06/01/2011 00:03:18
06/01/2011 00:03:19
06/01/2011 00:03:20
06/01/2011 00:03:21
06/01/2011 00:03:22
06/01/2011 00:03:23
06/01/2011 00:03:24
06/01/2011 00:03:25
06/01/2011 00:03:26
06/01/2011 00:03:27
E.g. code works fine, 100 x 10ms is 1 sec.
[line]
Uncomented line without Glitch filter:
static InputPort pd15input = new InputPort(G400.PD15, false, Port.ResistorMode.Disabled);
Output works good:
06/01/2011 00:07:27
06/01/2011 00:07:28
06/01/2011 00:07:29
06/01/2011 00:07:30
06/01/2011 00:07:32
06/01/2011 00:07:33
06/01/2011 00:07:34
[line]
And when I try enable Glitch Filter:
static InputPort pd15input = new InputPort(G400.PD15, true, Port.ResistorMode.Disabled);
LED blinkings slowly and Output looks bad too:
06/01/2011 00:08:17
06/01/2011 00:08:23
06/01/2011 00:08:28
06/01/2011 00:08:36
06/01/2011 00:08:43
And I cannot upload repaired version. āFEZ Configā cannot ping too.
I must switch to Sam-Ba mode, upload new firmware (maybe TinyBooter) and then new firmware by āFEZ Configā.
Strange ![:frowning: :frowning:](https://forums.ghielectronics.com/images/emoji/twitter/frowning.png?v=12)
Thanks fo any ideas ā¦
Petr