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
Petr

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)
      {
        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:

Thanks fo any ideas …
Petr

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:

Petr

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.

Petr

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?