G400D and PD15 signal

Hello friends,

is a special meanings of PD15 signal at G400D ? If I select this signal as Input:
static InputPort alarm2 = new InputPort(G400.PD15, true, Port.ResistorMode.Disabled);
, my program works slowly (Thread.Sleep(10) is about 3x longer) and I cannot upload/debug/etc new version of code without many RESETs :frowning:

In thread https://www.ghielectronics.com/community/forum/topic?id=12202 I can read “Serial mode select, on pin PD15”, but in “User manual” is nothing special about PD15.

Thanks for help

Very strange. Can you give is a small example that we can try? Does the problem continue if you set the glitch filter to false?

OK, some tests :slight_smile: 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)
        if (cnt > 100)
          cnt = 0;

        if (heartbeat > 10)
          heartbeat = 0;


Output window says:

Loading start at 202dd578, end 2030ca0c

Assembly: mscorlib (
Assembly: Microsoft.SPOT.Native (
Assembly: Microsoft.SPOT.Security.PKCS11 (
Assembly: System.Security (
Assembly: Microsoft.SPOT.Hardware (
Assembly: Microsoft.SPOT.Graphics (
Assembly: Microsoft.SPOT.TinyCore (
Assembly: Microsoft.SPOT.IO (
Assembly: System.IO (
Assembly: Microsoft.SPOT.Hardware.Usb (
Assembly: Microsoft.SPOT.Hardware.SerialPort (
Assembly: Microsoft.SPOT.Touch (
Assembly: Microsoft.SPOT.Ink (
Assembly: Microsoft.SPOT.Hardware.PWM (
Loading Deployment Assemblies.

Attaching deployed file.
Assembly: PD15ErrTest ( Attaching deployed file.
Assembly: GHI.Pins ( 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.
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
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:

Thanks fo any ideas …

And one interesting thing. I have second G400D and it works fine with Glitch filter enabled (same code and FW version).
I don’t understand :frowning:


Erase your board and reflash with the firmware?

Complete erase is required after upload+run code, which sets PD15 as InputPort with Glitch filter enabled.
After executing these code, G400D runs slowly and connect/disconnect to/from USB every 5 sec (approx.). I can hear it, becase Windows (8 and 10) generates sound by USB changes.
And I cannot connect it to VisualStudio debugger or Ping with FEZ Config.

But strange is the fact that this makes only one module of my 2 pieces.


I meant flash the firmware, not your app.

It is interesting that only one of your devices behaves that way, with the same code deployed. Out of interest, can you please run Fez Config and check for updates, and paste the results here so we can see what versions you’re using?