Thread.Sleep seems longer than usual

While waiting for the fixed in firmware, try a temporary workaround below:

We just tested on G120 and G80, but if you have issue with other devices, just post!

2 Likes

Is firmware fixed in TinyClr 1.0 ?
If not, can you remember me patch code as Issue is not accessible no more (For FEZ, G30, G80 and G120).
Thanks

is it the one you looking for?
https://github.com/ghi-electronics/TinyCLR-Devices/issues/463 ?

gives me a 404 page

        {
            // G80
            const int MODE_ADDRESS = 0x20002998;
            const int EVENT_ADDRESS = 0x20003278;
            const int OFFSET = 0;

            // UC5550
            //const int MODE_ADDRESS = 0x20013ab0;
            //const int EVENT_ADDRESS = 0x20014390;
            //const int OFFSET = 0;

            // UC2550
            //const int MODE_ADDRESS = 0x20003050;
            //const int EVENT_ADDRESS = 0x20003930;
            //const int OFFSET = 0;

            // BrainPad, FEZCLR
            //const int MODE_ADDRESS = 0x20001438;
            //const int EVENT_ADDRESS = 0x20001ef8;
            //const int OFFSET = 0;

            // G30
            //const int MODE_ADDRESS = 0x20001a68;
            //const int EVENT_ADDRESS = 0x20002348;
            //const int OFFSET = 0;

            // G120
            //const int MODE_ADDRESS = 0x200446F9; 
            //const int EVENT_ADDRESS = 0x20044FD9; 
            //const int OFFSET = int.MaxValue;

            // G400
            //const int MODE_ADDRESS = 0x2060bd10;
            //const int EVENT_ADDRESS = 0x2060c5f0;
            //const int OFFSET = 0;

            var isUsbDebugMode = Marshal.ReadInt32(IntPtr.Add(new IntPtr(OFFSET), MODE_ADDRESS)) != 0 ? true : false;
            var value = Marshal.ReadInt32(IntPtr.Add(new IntPtr(OFFSET), (EVENT_ADDRESS))) | (isUsbDebugMode ? 512 : 256);
            Marshal.WriteInt32(IntPtr.Add(new IntPtr(OFFSET), EVENT_ADDRESS), value);                 
        }
1 Like

@Dat_Tran : :+1:

It is exactly what Iā€™m looking for.