How to access I2c and GPIO on Windows IoT

BjalvBjalv New Member Posts: 4
edited March 21 in 40-PIN GP-bus

The following code will open up the I2c without issue on the Raspberry Pi, but on Up Squared it results in an exception.

string advancedQuerySyntaxString = I2cDevice.GetDeviceSelector("I2C1"); 
var deviceInformationCollection = await DeviceInformation.FindAllAsync(advancedQuerySyntaxString);
_device = await I2cDevice.FromIdAsync(deviceInformationCollection[0].Id, settings);

It seems to not find any I2c, and thus "deviceInformationCollection" is empty.
It throws the following exception:

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
at System.Runtime.InteropServices.WindowsRuntime.IVectorViewToIReadOnlyListAdapter.Indexer_Get[T](Int32 index)
at Communication.Vehicle.VehicleCommunication.d__5.MoveNext()

How should the BIOS be configured to get I2c and GPIO working in Windows IoT?
Are there any additional changes that must be done elsewhere?

Comments

  • rogertsai(AAEON)rogertsai(AAEON) New Member Posts: 141 ✭✭✭

    @Bjalv
    Here is the link to download the UP^2 SDK for Win10, the SDK includes support for DIO, I2C, PWM
    https://aaeon365-my.sharepoint.com/:u:/g/personal/roger1tsai_aaeon_com_tw/EXgsXcbQpa1DjSBIHcz42hQBrwKvjj4grz2nFs7bm6cvsw?e=K36nDO

  • BjalvBjalv New Member Posts: 4

    Thank you for your reply @rogertsai(AAEON) .
    However the guide in that file referes to installing an .msi file, and also referes to the device manager.

    Can you please confirm if the files you shared can be used to get I2c and GPIO working for Windows IoT Core? and if so, how?
    We have installed Windows IoT Core from the following image:
    https://downloads.up-community.org/download/up-squared-windows-iot-core-image-beta/

  • rogertsai(AAEON)rogertsai(AAEON) New Member Posts: 141 ✭✭✭

    @Bjalv
    The SDK is for Windows 10 IoT enterprise & Win10, not IoT core.
    About IoT core SDK, please wait for our update.

  • BjalvBjalv New Member Posts: 4

    @rogertsai(AAEON)
    We have a deadline on our project that can't be extended. We need this card up and running as soon as possible so that we can complete the remaining parts of the project (and are 100% dependent on I2c working on the card, if we are to use the UP2 card).
    Do you have any estimate for when this update will arrive?
    Will it be by the end of this week? or some time out in next week?

  • mmsmms New Member Posts: 1

    Also need this.

  • rogertsai(AAEON)rogertsai(AAEON) New Member Posts: 141 ✭✭✭

    Hello everyone,
    Here is our release schedule:
    1. WIN10 IOT CORE image is expected to be done in 14th June 2019.
    2. Standard WIN10 SDK is expected to release later in July 2019.

  • BjalvBjalv New Member Posts: 4

    Thank you for the update.

    Is there much that has been changed in the IoT Core image, so that we ought to reinstall the OS when the new image is released?
    Or is it essentialy the same as the beta image from 2018, but with all the windows updates already applied?

    Looking forward to seeing the I2c and GPIO up and running once the SDK is released.

Sign In or Register to comment.