UartController.FromName( )

Using a UCM Dev Board Rev E with a UC5550
I want to use
UCM Dev Board USB connector (x6)
Device Manager shows this as Ports(COM&LPT) - USB Serial Port(COM4)

var SerialDevice = UartController.FromName(“name”);

I have not been able to find information on what “some name” is expected.
I have tried everything I can think of but all return null.

Thank you!

I think from GHIElectronics.TinyClr.Pins Nuget packge, you would have your uart id (string) for your board.

The string is something like that:

Where the last number is usart number - 1

Probably better to use something like that : STM32F4.UartPort.Usart1 , just in case the underlying string is changing at some time ?

1 Like

Yes right. But sometime can be useful to know how it works…

Thanks to all!

var SerialDevice = UartController.FromName(UC5550.UartPort.Usart1);

Did not return null so I can now get in more trouble…

Indeed ! And that’s how I was doing in my first programs with TinyCLR :wink:
But this string was too long to remember for me :flushed:

Not that we have discovered a memory leak in uart. Sadly I really needed it for a project I am working on. Crossing fingers for a soon fix.