Device: SCM20260D Dev Rev C
OS Version: 2.1.0-preview2
#### Exception System.ArgumentException - 0xfd000000 (1) ####
#### Message:
#### GHIElectronics.TinyCLR.Native.NativeApi::GetDefaultName [IP: 0000] ####
#### GHIElectronics.TinyCLR.Devices.Dac.DacController::GetDefault [IP: 0017] ####
#### TinyCLRDAC.Program::Main [IP: 0004] ####
Exception thrown: 'System.ArgumentException' in GHIElectronics.TinyCLR.Native.dll
An unhandled exception of type 'System.ArgumentException' occurred in GHIElectronics.TinyCLR.Native.dll
Test code:
using GHIElectronics.TinyCLR.Devices.Dac;
using GHIElectronics.TinyCLR.Pins;
namespace TinyCLRDAC
{
class Program
{
static void Main()
{
DacChannel dac = DacController.GetDefault().OpenChannel(SC20260.Dac.PA5);
dac.WriteValue(0xFF);
while (true) ;
}
}
}
while working on previews, there’s not much point working on the older version… I’d upgrade and confirm you have a repro this on Preview3. TinyCLR OS 2.1 Preview 3 - #11 by Dat_Tran