diff --git a/samples/NXP/NXPGPIOSample/NXPGPIO.jpg b/samples/NXP/NXPGPIOSample/NXPGPIO.jpg
new file mode 100644
index 000000000..6dbfa789f
Binary files /dev/null and b/samples/NXP/NXPGPIOSample/NXPGPIO.jpg differ
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample.sln b/samples/NXP/NXPGPIOSample/NXPGPIOSample.sln
new file mode 100644
index 000000000..d9ce808f7
--- /dev/null
+++ b/samples/NXP/NXPGPIOSample/NXPGPIOSample.sln
@@ -0,0 +1,51 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.7.34302.85
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NXPGPIOSample", "NXPGPIOSample\NXPGPIOSample.csproj", "{A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM = Debug|ARM
+ Debug|ARM64 = Debug|ARM64
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|ARM = Release|ARM
+ Release|ARM64 = Release|ARM64
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Debug|ARM.ActiveCfg = Debug|ARM
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Debug|ARM.Build.0 = Debug|ARM
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Debug|ARM.Deploy.0 = Debug|ARM
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Debug|ARM64.Build.0 = Debug|ARM64
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Debug|x64.ActiveCfg = Debug|x64
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Debug|x64.Build.0 = Debug|x64
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Debug|x64.Deploy.0 = Debug|x64
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Debug|x86.ActiveCfg = Debug|x86
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Debug|x86.Build.0 = Debug|x86
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Debug|x86.Deploy.0 = Debug|x86
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Release|ARM.ActiveCfg = Release|ARM
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Release|ARM.Build.0 = Release|ARM
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Release|ARM.Deploy.0 = Release|ARM
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Release|ARM64.ActiveCfg = Release|ARM64
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Release|ARM64.Build.0 = Release|ARM64
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Release|ARM64.Deploy.0 = Release|ARM64
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Release|x64.ActiveCfg = Release|x64
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Release|x64.Build.0 = Release|x64
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Release|x64.Deploy.0 = Release|x64
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Release|x86.ActiveCfg = Release|x86
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Release|x86.Build.0 = Release|x86
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}.Release|x86.Deploy.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {74AAC59C-4197-413B-9284-1623FFC7DF6D}
+ EndGlobalSection
+EndGlobal
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/App.xaml b/samples/NXP/NXPGPIOSample/NXPGPIOSample/App.xaml
new file mode 100644
index 000000000..c3bf53e4b
--- /dev/null
+++ b/samples/NXP/NXPGPIOSample/NXPGPIOSample/App.xaml
@@ -0,0 +1,7 @@
+
+
+
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/App.xaml.cs b/samples/NXP/NXPGPIOSample/NXPGPIOSample/App.xaml.cs
new file mode 100644
index 000000000..2336a3596
--- /dev/null
+++ b/samples/NXP/NXPGPIOSample/NXPGPIOSample/App.xaml.cs
@@ -0,0 +1,100 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.ApplicationModel;
+using Windows.ApplicationModel.Activation;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Navigation;
+
+namespace NXPGPIOSample
+{
+ ///
+ /// Provides application-specific behavior to supplement the default Application class.
+ ///
+ sealed partial class App : Application
+ {
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ this.Suspending += OnSuspending;
+ }
+
+ ///
+ /// Invoked when the application is launched normally by the end user. Other entry points
+ /// will be used such as when the application is launched to open a specific file.
+ ///
+ /// Details about the launch request and process.
+ protected override void OnLaunched(LaunchActivatedEventArgs e)
+ {
+ Frame rootFrame = Window.Current.Content as Frame;
+
+ // Do not repeat app initialization when the Window already has content,
+ // just ensure that the window is active
+ if (rootFrame == null)
+ {
+ // Create a Frame to act as the navigation context and navigate to the first page
+ rootFrame = new Frame();
+
+ rootFrame.NavigationFailed += OnNavigationFailed;
+
+ if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
+ {
+ //TODO: Load state from previously suspended application
+ }
+
+ // Place the frame in the current Window
+ Window.Current.Content = rootFrame;
+ }
+
+ if (e.PrelaunchActivated == false)
+ {
+ if (rootFrame.Content == null)
+ {
+ // When the navigation stack isn't restored navigate to the first page,
+ // configuring the new page by passing required information as a navigation
+ // parameter
+ rootFrame.Navigate(typeof(MainPage), e.Arguments);
+ }
+ // Ensure the current window is active
+ Window.Current.Activate();
+ }
+ }
+
+ ///
+ /// Invoked when Navigation to a certain page fails
+ ///
+ /// The Frame which failed navigation
+ /// Details about the navigation failure
+ void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
+ {
+ throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
+ }
+
+ ///
+ /// Invoked when application execution is being suspended. Application state is saved
+ /// without knowing whether the application will be terminated or resumed with the contents
+ /// of memory still intact.
+ ///
+ /// The source of the suspend request.
+ /// Details about the suspend request.
+ private void OnSuspending(object sender, SuspendingEventArgs e)
+ {
+ var deferral = e.SuspendingOperation.GetDeferral();
+ //TODO: Save application state and stop any background activity
+ deferral.Complete();
+ }
+ }
+}
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/LockScreenLogo.scale-200.png b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/LockScreenLogo.scale-200.png
new file mode 100644
index 000000000..735f57adb
Binary files /dev/null and b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/LockScreenLogo.scale-200.png differ
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/SplashScreen.scale-200.png b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/SplashScreen.scale-200.png
new file mode 100644
index 000000000..023e7f1fe
Binary files /dev/null and b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/SplashScreen.scale-200.png differ
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/Square150x150Logo.scale-200.png b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/Square150x150Logo.scale-200.png
new file mode 100644
index 000000000..af49fec1a
Binary files /dev/null and b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/Square150x150Logo.scale-200.png differ
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/Square44x44Logo.scale-200.png b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/Square44x44Logo.scale-200.png
new file mode 100644
index 000000000..ce342a2ec
Binary files /dev/null and b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/Square44x44Logo.scale-200.png differ
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 000000000..f6c02ce97
Binary files /dev/null and b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/StoreLogo.png b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/StoreLogo.png
new file mode 100644
index 000000000..7385b56c0
Binary files /dev/null and b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/StoreLogo.png differ
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/Wide310x150Logo.scale-200.png b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/Wide310x150Logo.scale-200.png
new file mode 100644
index 000000000..288995b39
Binary files /dev/null and b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Assets/Wide310x150Logo.scale-200.png differ
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/MainPage.xaml b/samples/NXP/NXPGPIOSample/NXPGPIOSample/MainPage.xaml
new file mode 100644
index 000000000..24dd1620b
--- /dev/null
+++ b/samples/NXP/NXPGPIOSample/NXPGPIOSample/MainPage.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/MainPage.xaml.cs b/samples/NXP/NXPGPIOSample/NXPGPIOSample/MainPage.xaml.cs
new file mode 100644
index 000000000..161594b6c
--- /dev/null
+++ b/samples/NXP/NXPGPIOSample/NXPGPIOSample/MainPage.xaml.cs
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft. All rights reserved.
+
+using System;
+using Windows.Devices.Gpio;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Media;
+
+namespace NXPGPIOSample
+{
+ public sealed partial class MainPage : Page
+ {
+ private int[] LED_PINS = new int[] {147, 146, 141, 140, 139, 138, 137, 136, 87, 86, 85, 84, 83 };
+ private GpioPin[] pins;
+ private GpioPinValue[] pinValues;
+ private DispatcherTimer timer;
+ private SolidColorBrush redBrush = new SolidColorBrush(Windows.UI.Colors.Red);
+ private SolidColorBrush grayBrush = new SolidColorBrush(Windows.UI.Colors.LightGray);
+
+ public MainPage()
+ {
+ InitializeComponent();
+
+ timer = new DispatcherTimer();
+ timer.Interval = TimeSpan.FromMilliseconds(500);
+ timer.Tick += Timer_Tick;
+ InitGPIO();
+ if (pins != null)
+ {
+ timer.Start();
+ }
+ }
+
+ private void InitGPIO()
+ {
+ var gpio = GpioController.GetDefault();
+
+ // Show an error if there is no GPIO controller
+ if (gpio == null)
+ {
+ pins = null;
+ GpioStatus.Text = "There is no GPIO controller on this device.";
+ return;
+ }
+
+ pins = new GpioPin[LED_PINS.Length];
+ pinValues = new GpioPinValue[LED_PINS.Length];
+ for (int i = 0; i < LED_PINS.Length; i++)
+ {
+ pins[i] = gpio.OpenPin(LED_PINS[i]);
+ pinValues[i] = GpioPinValue.High;
+ pins[i].Write(pinValues[i]);
+ pins[i].SetDriveMode(GpioPinDriveMode.Output);
+ }
+
+ GpioStatus.Text = "GPIO pins initialized correctly.";
+ }
+
+ private void Timer_Tick(object sender, object e)
+ {
+ for (int i = 0; i < LED_PINS.Length; i++)
+ {
+ if (pinValues[i] == GpioPinValue.High)
+ {
+ pinValues[i] = GpioPinValue.Low;
+ pins[i].Write(pinValues[i]);
+ LED.Fill = redBrush;
+ }
+ else
+ {
+ pinValues[i] = GpioPinValue.High;
+ pins[i].Write(pinValues[i]);
+ LED.Fill = grayBrush;
+ }
+ }
+ }
+ }
+}
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/NXPGPIOSample.csproj b/samples/NXP/NXPGPIOSample/NXPGPIOSample/NXPGPIOSample.csproj
new file mode 100644
index 000000000..8daf22b12
--- /dev/null
+++ b/samples/NXP/NXPGPIOSample/NXPGPIOSample/NXPGPIOSample.csproj
@@ -0,0 +1,168 @@
+
+
+
+
+ Debug
+ x86
+ {A41EB9AB-5990-4B2F-9BB0-4DF9DECED77B}
+ AppContainerExe
+ Properties
+ NXPGPIOSample
+ NXPGPIOSample
+ en-US
+ UAP
+ 10.0.19041.0
+ 10.0.10586.0
+ 14
+ 512
+ {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ true
+ false
+
+
+ true
+ bin\x86\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ x86
+ false
+ prompt
+ true
+
+
+ bin\x86\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ x86
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\ARM\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ ARM
+ false
+ prompt
+ true
+
+
+ bin\ARM\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ ARM
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\ARM64\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ ARM64
+ false
+ prompt
+ true
+ true
+
+
+ bin\ARM64\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ ARM64
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\x64\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ x64
+ false
+ prompt
+ true
+
+
+ bin\x64\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ x64
+ false
+ prompt
+ true
+ true
+
+
+ PackageReference
+
+
+
+ App.xaml
+
+
+ MainPage.xaml
+
+
+
+
+
+ Designer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+
+ 6.2.14
+
+
+
+ 14.0
+
+
+
+
\ No newline at end of file
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/Package.appxmanifest b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Package.appxmanifest
new file mode 100644
index 000000000..891876973
--- /dev/null
+++ b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Package.appxmanifest
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+ NXPGPIOSample
+ jayuppaluri
+ Assets\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/Properties/AssemblyInfo.cs b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..3da4e4ef4
--- /dev/null
+++ b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Properties/AssemblyInfo.cs
@@ -0,0 +1,29 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("NXPGPIOSample")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("NXPGPIOSample")]
+[assembly: AssemblyCopyright("Copyright © 2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/samples/NXP/NXPGPIOSample/NXPGPIOSample/Properties/Default.rd.xml b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Properties/Default.rd.xml
new file mode 100644
index 000000000..af00722cd
--- /dev/null
+++ b/samples/NXP/NXPGPIOSample/NXPGPIOSample/Properties/Default.rd.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/NXP/NXPGPIOSample/README.md b/samples/NXP/NXPGPIOSample/README.md
new file mode 100644
index 000000000..27c5cebd7
--- /dev/null
+++ b/samples/NXP/NXPGPIOSample/README.md
@@ -0,0 +1,33 @@
+# NXP GPIO Sample Project
+
+This project is a C# application developed in Visual Studio, designed to validate the GPIO pins on the NXP i.MX8M Plus board.
+
+## Features
+
+- **GPIO Communication**: The application uses the GPIO pins for communication.
+
+- **GPIO Pin Control**: The application controls the state of the GPIO pins.
+
+## Code Structure
+
+The `MainPage` class is the core of the application. It includes methods for initializing the GPIO pins and controlling their state.
+
+## Usage
+
+To run this project, ensure that Visual Studio is installed on your machine. Open the `.sln` file in Visual Studio, build the solution, and run the project.
+
+To run this application on an NXP device, ensure that the NXP device is on the same network as your host machine and that Visual Studio remote tools are installed. Build this application for ARM64, set the debug mode to 'remote debug', and set the target machine to the IP address of the NXP device.
+
+## Key Aspects of the Code
+
+A crucial aspect of this code is the use of specific GPIO index numbers. These index numbers (155, 154, 147, 146, 141, 140, 139, 138, 137, 136, 88, 87, 86, 85, 84, 83) are used to access the GPIO pins on the NXP device. Any other index numbers would not work, as the GPIO pin indexes are unique to the hardware and software configuration of the NXP device.
+
+
+
+## Measuring GPIO Pins
+
+Once the application is running, you can measure the voltage levels of the GPIO pins on the NXP board using a multimeter. Connect the COM wire of the multimeter to the GND pin on the NXP board, and the V wire to each of the individual GPIO pins that you want to measure.
+
+## Note
+
+This project is designed to work with the specified GPIO pins on an NXP i.MX8M Plus board. Always ensure to follow the correct setup and connection procedures to avoid any hardware issues.
\ No newline at end of file
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample.sln b/samples/NXP/NXPI2CSample/NXPI2CSample.sln
new file mode 100644
index 000000000..0f9362db5
--- /dev/null
+++ b/samples/NXP/NXPI2CSample/NXPI2CSample.sln
@@ -0,0 +1,51 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.6.33829.357
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NXPI2CSample", "NXPI2CSample\NXPI2CSample.csproj", "{F408975A-0720-4013-8119-39F3421D5B9F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM = Debug|ARM
+ Debug|ARM64 = Debug|ARM64
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|ARM = Release|ARM
+ Release|ARM64 = Release|ARM64
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Debug|ARM.ActiveCfg = Debug|ARM
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Debug|ARM.Build.0 = Debug|ARM
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Debug|ARM.Deploy.0 = Debug|ARM
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Debug|ARM64.Build.0 = Debug|ARM64
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Debug|x64.ActiveCfg = Debug|x64
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Debug|x64.Build.0 = Debug|x64
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Debug|x64.Deploy.0 = Debug|x64
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Debug|x86.ActiveCfg = Debug|x86
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Debug|x86.Build.0 = Debug|x86
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Debug|x86.Deploy.0 = Debug|x86
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Release|ARM.ActiveCfg = Release|ARM
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Release|ARM.Build.0 = Release|ARM
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Release|ARM.Deploy.0 = Release|ARM
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Release|ARM64.ActiveCfg = Release|ARM64
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Release|ARM64.Build.0 = Release|ARM64
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Release|ARM64.Deploy.0 = Release|ARM64
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Release|x64.ActiveCfg = Release|x64
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Release|x64.Build.0 = Release|x64
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Release|x64.Deploy.0 = Release|x64
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Release|x86.ActiveCfg = Release|x86
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Release|x86.Build.0 = Release|x86
+ {F408975A-0720-4013-8119-39F3421D5B9F}.Release|x86.Deploy.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {8F8893EA-38B1-444E-A99C-1A3DA007375D}
+ EndGlobalSection
+EndGlobal
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/App.xaml b/samples/NXP/NXPI2CSample/NXPI2CSample/App.xaml
new file mode 100644
index 000000000..282c7c7e0
--- /dev/null
+++ b/samples/NXP/NXPI2CSample/NXPI2CSample/App.xaml
@@ -0,0 +1,7 @@
+
+
+
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/App.xaml.cs b/samples/NXP/NXPI2CSample/NXPI2CSample/App.xaml.cs
new file mode 100644
index 000000000..162dcf6db
--- /dev/null
+++ b/samples/NXP/NXPI2CSample/NXPI2CSample/App.xaml.cs
@@ -0,0 +1,100 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.ApplicationModel;
+using Windows.ApplicationModel.Activation;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Navigation;
+
+namespace NXPI2CSample
+{
+ ///
+ /// Provides application-specific behavior to supplement the default Application class.
+ ///
+ sealed partial class App : Application
+ {
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ this.Suspending += OnSuspending;
+ }
+
+ ///
+ /// Invoked when the application is launched normally by the end user. Other entry points
+ /// will be used such as when the application is launched to open a specific file.
+ ///
+ /// Details about the launch request and process.
+ protected override void OnLaunched(LaunchActivatedEventArgs e)
+ {
+ Frame rootFrame = Window.Current.Content as Frame;
+
+ // Do not repeat app initialization when the Window already has content,
+ // just ensure that the window is active
+ if (rootFrame == null)
+ {
+ // Create a Frame to act as the navigation context and navigate to the first page
+ rootFrame = new Frame();
+
+ rootFrame.NavigationFailed += OnNavigationFailed;
+
+ if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
+ {
+ //TODO: Load state from previously suspended application
+ }
+
+ // Place the frame in the current Window
+ Window.Current.Content = rootFrame;
+ }
+
+ if (e.PrelaunchActivated == false)
+ {
+ if (rootFrame.Content == null)
+ {
+ // When the navigation stack isn't restored navigate to the first page,
+ // configuring the new page by passing required information as a navigation
+ // parameter
+ rootFrame.Navigate(typeof(MainPage), e.Arguments);
+ }
+ // Ensure the current window is active
+ Window.Current.Activate();
+ }
+ }
+
+ ///
+ /// Invoked when Navigation to a certain page fails
+ ///
+ /// The Frame which failed navigation
+ /// Details about the navigation failure
+ void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
+ {
+ throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
+ }
+
+ ///
+ /// Invoked when application execution is being suspended. Application state is saved
+ /// without knowing whether the application will be terminated or resumed with the contents
+ /// of memory still intact.
+ ///
+ /// The source of the suspend request.
+ /// Details about the suspend request.
+ private void OnSuspending(object sender, SuspendingEventArgs e)
+ {
+ var deferral = e.SuspendingOperation.GetDeferral();
+ //TODO: Save application state and stop any background activity
+ deferral.Complete();
+ }
+ }
+}
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/LockScreenLogo.scale-200.png b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/LockScreenLogo.scale-200.png
new file mode 100644
index 000000000..735f57adb
Binary files /dev/null and b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/LockScreenLogo.scale-200.png differ
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/SplashScreen.scale-200.png b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/SplashScreen.scale-200.png
new file mode 100644
index 000000000..023e7f1fe
Binary files /dev/null and b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/SplashScreen.scale-200.png differ
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/Square150x150Logo.scale-200.png b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/Square150x150Logo.scale-200.png
new file mode 100644
index 000000000..af49fec1a
Binary files /dev/null and b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/Square150x150Logo.scale-200.png differ
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/Square44x44Logo.scale-200.png b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/Square44x44Logo.scale-200.png
new file mode 100644
index 000000000..ce342a2ec
Binary files /dev/null and b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/Square44x44Logo.scale-200.png differ
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 000000000..f6c02ce97
Binary files /dev/null and b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/StoreLogo.png b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/StoreLogo.png
new file mode 100644
index 000000000..7385b56c0
Binary files /dev/null and b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/StoreLogo.png differ
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/Wide310x150Logo.scale-200.png b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/Wide310x150Logo.scale-200.png
new file mode 100644
index 000000000..288995b39
Binary files /dev/null and b/samples/NXP/NXPI2CSample/NXPI2CSample/Assets/Wide310x150Logo.scale-200.png differ
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/MainPage.xaml b/samples/NXP/NXPI2CSample/NXPI2CSample/MainPage.xaml
new file mode 100644
index 000000000..2b96906e9
--- /dev/null
+++ b/samples/NXP/NXPI2CSample/NXPI2CSample/MainPage.xaml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/MainPage.xaml.cs b/samples/NXP/NXPI2CSample/NXPI2CSample/MainPage.xaml.cs
new file mode 100644
index 000000000..4a04478e3
--- /dev/null
+++ b/samples/NXP/NXPI2CSample/NXPI2CSample/MainPage.xaml.cs
@@ -0,0 +1,118 @@
+using System;
+using System.Diagnostics;
+using System.Threading.Tasks;
+using Windows.Devices.Enumeration;
+using Windows.Devices.I2c;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+
+namespace NXPI2CSample
+{
+ public sealed partial class MainPage : Page
+ {
+ private const string I2C_CONTROLLER_NAME = "I2C3";
+ private const int TCS34725_ADDRESS = 0x29;
+
+ private I2cDevice tcs34725;
+ private DispatcherTimer timer;
+ private const byte TCS34725_ENABLE = 0x00;
+ private const byte TCS34725_ENABLE_PON = 0x01; // Power on
+ private const byte TCS34725_ENABLE_AEN = 0x02; // RGBC Enable
+
+ // Change these to control the gain and integration time of the sensor, and
+ // uncomment the lines in 'InitialiseSensor' to set the values to the sensor
+
+ //private const byte TCS34725_ATIME = 0x01; // RGBC time
+ //private const byte TCS34725_INTEGRATIONTIME_700MS = 0x00; // Max count: 65535
+ //private const byte TCS34725_CONTROL = 0x0F; // Gain control register
+ //private const byte TCS34725_GAIN_60X = 0x03; // 60x gain
+
+
+ public MainPage()
+ {
+ this.InitializeComponent();
+ InitI2C();
+
+ // Create a timer to update the sensor values every 500 milliseconds
+ timer = new DispatcherTimer();
+ timer.Interval = TimeSpan.FromMilliseconds(500);
+ timer.Tick += Timer_Tick;
+ timer.Start();
+ }
+
+ private async void InitI2C()
+ {
+ var settings = new I2cConnectionSettings(TCS34725_ADDRESS);
+ settings.BusSpeed = I2cBusSpeed.FastMode;
+
+ string aqs = I2cDevice.GetDeviceSelector(I2C_CONTROLLER_NAME);
+ var dis = await DeviceInformation.FindAllAsync(aqs);
+
+ if (dis.Count == 0)
+ {
+ Debug.WriteLine("No I2C devices found.");
+ return;
+ }
+
+ foreach (var device in dis)
+ {
+ Debug.WriteLine($"Device ID: {device.Id}");
+ Debug.WriteLine($"Device Name: {device.Name}");
+ Debug.WriteLine($"Device Kind: {device.Kind}");
+ Debug.WriteLine($"Device Properties: {device.Properties}");
+ }
+
+ tcs34725 = await I2cDevice.FromIdAsync(dis[0].Id, settings);
+
+ if (tcs34725 == null)
+ {
+ Debug.WriteLine("Failed to connect to TCS34725 sensor.");
+ return;
+ }
+
+ Debug.WriteLine("Connected to TCS34725 sensor.");
+
+ // Initialize the sensor
+ InitialiseSensor();
+ }
+
+ private void Timer_Tick(object sender, object e)
+ {
+ // Read data from the sensor
+ byte[] data = new byte[8];
+ tcs34725.WriteRead(new byte[] { 0x94 }, data);
+
+ ushort clear = (ushort)(data[1] << 8 | data[0]);
+ ushort red = (ushort)(data[3] << 8 | data[2]);
+ ushort green = (ushort)(data[5] << 8 | data[4]);
+ ushort blue = (ushort)(data[7] << 8 | data[6]);
+
+ // Update the UI with the new sensor values
+ ClearTextBlock.Text = $"Clear: {clear}";
+ RedTextBlock.Text = $"Red: {red}";
+ GreenTextBlock.Text = $"Green: {green}";
+ BlueTextBlock.Text = $"Blue: {blue}";
+ }
+
+ private void write8(byte addr, byte cmd)
+ {
+ tcs34725.Write(new byte[] { addr, cmd });
+ }
+
+ private void InitialiseSensor()
+ {
+ // Turn on
+ write8(TCS34725_ENABLE, TCS34725_ENABLE_PON);
+ Task.Delay(3).Wait();
+ write8(TCS34725_ENABLE, TCS34725_ENABLE_PON | TCS34725_ENABLE_AEN);
+
+ // Integration Time
+ // write8(TCS34725_ATIME, TCS34725_INTEGRATIONTIME_700MS);
+
+ // Gain
+ // write8(TCS34725_CONTROL, TCS34725_GAIN_60X);
+
+ write8(0x80, 0x03);
+ }
+ }
+}
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/NXPI2CSample.csproj b/samples/NXP/NXPI2CSample/NXPI2CSample/NXPI2CSample.csproj
new file mode 100644
index 000000000..ea605027f
--- /dev/null
+++ b/samples/NXP/NXPI2CSample/NXPI2CSample/NXPI2CSample.csproj
@@ -0,0 +1,168 @@
+
+
+
+
+ Debug
+ x86
+ {F408975A-0720-4013-8119-39F3421D5B9F}
+ AppContainerExe
+ Properties
+ NXPI2CSample
+ NXPI2CSample
+ en-US
+ UAP
+ 10.0.19041.0
+ 10.0.17134.0
+ 14
+ 512
+ {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ true
+ false
+
+
+ true
+ bin\x86\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ x86
+ false
+ prompt
+ true
+
+
+ bin\x86\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ x86
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\ARM\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ ARM
+ false
+ prompt
+ true
+
+
+ bin\ARM\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ ARM
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\ARM64\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ ARM64
+ false
+ prompt
+ true
+ true
+
+
+ bin\ARM64\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ ARM64
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\x64\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ x64
+ false
+ prompt
+ true
+
+
+ bin\x64\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ x64
+ false
+ prompt
+ true
+ true
+
+
+ PackageReference
+
+
+
+ App.xaml
+
+
+ MainPage.xaml
+
+
+
+
+
+ Designer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+
+ 6.2.14
+
+
+
+ 14.0
+
+
+
+
\ No newline at end of file
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/Package.appxmanifest b/samples/NXP/NXPI2CSample/NXPI2CSample/Package.appxmanifest
new file mode 100644
index 000000000..24a79212b
--- /dev/null
+++ b/samples/NXP/NXPI2CSample/NXPI2CSample/Package.appxmanifest
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+ NXPI2CSample
+ jayuppaluri
+ Assets\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/Properties/AssemblyInfo.cs b/samples/NXP/NXPI2CSample/NXPI2CSample/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..93aa07bae
--- /dev/null
+++ b/samples/NXP/NXPI2CSample/NXPI2CSample/Properties/AssemblyInfo.cs
@@ -0,0 +1,29 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("NXPI2CSample")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("NXPI2CSample")]
+[assembly: AssemblyCopyright("Copyright © 2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/samples/NXP/NXPI2CSample/NXPI2CSample/Properties/Default.rd.xml b/samples/NXP/NXPI2CSample/NXPI2CSample/Properties/Default.rd.xml
new file mode 100644
index 000000000..af00722cd
--- /dev/null
+++ b/samples/NXP/NXPI2CSample/NXPI2CSample/Properties/Default.rd.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/NXP/NXPI2CSample/README.md b/samples/NXP/NXPI2CSample/README.md
new file mode 100644
index 000000000..b3decd2da
--- /dev/null
+++ b/samples/NXP/NXPI2CSample/README.md
@@ -0,0 +1,31 @@
+# NXP I2C Sample Project
+
+This project is a C# application developed in Visual Studio, designed to validate the I2C bus on the NXP i.MX8M Plus board. It communicates with a TCS34725 color sensor using the I2C protocol.
+
+## Features
+
+- **I2C Communication**: The application uses the I2C protocol for communication with the TCS34725 color sensor, operating at FastMode bus speed.
+
+- **Sensor Initialization**: The TCS34725 sensor is initialized by powering on and enabling the RGBC (Red, Green, Blue, Clear) channels.
+
+- **Sensor Data Reading**: The application reads data from the sensor every 500 milliseconds and updates the user interface with the new sensor values.
+
+## Code Structure
+
+The `MainPage` class is the core of the application. It includes methods for initializing the I2C device, initializing the sensor, reading data from the sensor, and updating the user interface with the sensor values.
+
+## Usage
+
+To run this project, ensure that Visual Studio is installed on your machine. Open the `.sln` file in Visual Studio, build the solution, and run the project.
+
+To run this application on an NXP device, ensure that the NXP device is on the same network as your host machine and that Visual Studio remote tools are installed. Build this application for ARM64, set the debug mode to 'remote debug', and set the target machine to the IP address of the NXP device.
+
+Please note that you will need to connect the TCS34725 sensor to a breadboard, and use male-to-female jumper cables to connect the corresponding ports on the sensor to the NXP board. The NXP Plus board's 40-pin I/O connector is labeled with the same names.
+
+## Key Aspects of the Code
+
+A crucial aspect of this code is the use of the friendly name 'I2C3' to access the I2C bus. This is specific to NXP - any other name would not work, as the I2C bus identifier is unique to the hardware and software configuration of the NXP device.
+
+## Note
+
+This project is designed to work with a TCS34725 color sensor. You will need to have this sensor connected to your machine in order to run the project. Always ensure to follow the correct setup and connection procedures to avoid any hardware issues.
diff --git a/samples/NXP/SPITemperatureAndSensor/README.md b/samples/NXP/SPITemperatureAndSensor/README.md
new file mode 100644
index 000000000..73952c166
--- /dev/null
+++ b/samples/NXP/SPITemperatureAndSensor/README.md
@@ -0,0 +1,31 @@
+# NXP SPI Sample Project
+
+This project is a C# application developed in Visual Studio, designed to validate the SPI bus on the NXP i.MX8M Plus board. It communicates with a BMP280 pressure and temperature sensor using the SPI protocol.
+
+## Features
+
+- **SPI Communication**: The application uses the SPI protocol for communication with the BMP280 pressure and temperature sensor.
+
+- **Sensor Initialization**: The BMP280 sensor is initialized by powering on and enabling the pressure and temperature channels.
+
+- **Sensor Data Reading**: The application reads data from the sensor every 500 milliseconds and updates the user interface with the new sensor values.
+
+## Code Structure
+
+The `MainPage` class is the core of the application. It includes methods for initializing the SPI device, initializing the sensor, reading data from the sensor, and updating the user interface with the sensor values.
+
+## Usage
+
+To run this project, ensure that Visual Studio is installed on your machine. Open the `.sln` file in Visual Studio, build the solution, and run the project.
+
+To run this application on an NXP device, ensure that the NXP device is on the same network as your host machine and that Visual Studio remote tools are installed. Build this application for ARM64, set the debug mode to 'remote debug', and set the target machine to the IP address of the NXP device.
+
+Please note that you will need to connect the BMP280 sensor to a breadboard, and use male-to-female jumper cables to connect the corresponding ports on the sensor to the NXP board. The NXP Plus board's 40-pin I/O connector is labeled with the same names.
+
+## Key Aspects of the Code
+
+A crucial aspect of this code is the use of the friendly name 'SPI2' to access the SPI bus. This is specific to NXP - any other name would not work, as the SPI bus identifier is unique to the hardware and software configuration of the NXP device. The line `SpiDevice.GetDeviceSelector("SPI2")` in the `InitSPI` method is particularly important as it uses the 'SPI2' name to access the SPI bus on the NXP device.
+
+## Note
+
+This project is designed to work with a BMP280 pressure and temperature sensor. You will need to have this sensor connected to your machine in order to run the project. Always ensure to follow the correct setup and connection procedures to avoid any hardware issues.
\ No newline at end of file
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor.sln b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor.sln
new file mode 100644
index 000000000..7760cf41e
--- /dev/null
+++ b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor.sln
@@ -0,0 +1,51 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.7.34009.444
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPITemperatureAndSensor", "SPITemperatureAndSensor\SPITemperatureAndSensor.csproj", "{6163540C-52CA-4009-8F76-409D15529E26}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM = Debug|ARM
+ Debug|ARM64 = Debug|ARM64
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|ARM = Release|ARM
+ Release|ARM64 = Release|ARM64
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {6163540C-52CA-4009-8F76-409D15529E26}.Debug|ARM.ActiveCfg = Debug|ARM
+ {6163540C-52CA-4009-8F76-409D15529E26}.Debug|ARM.Build.0 = Debug|ARM
+ {6163540C-52CA-4009-8F76-409D15529E26}.Debug|ARM.Deploy.0 = Debug|ARM
+ {6163540C-52CA-4009-8F76-409D15529E26}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {6163540C-52CA-4009-8F76-409D15529E26}.Debug|ARM64.Build.0 = Debug|ARM64
+ {6163540C-52CA-4009-8F76-409D15529E26}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {6163540C-52CA-4009-8F76-409D15529E26}.Debug|x64.ActiveCfg = Debug|x64
+ {6163540C-52CA-4009-8F76-409D15529E26}.Debug|x64.Build.0 = Debug|x64
+ {6163540C-52CA-4009-8F76-409D15529E26}.Debug|x64.Deploy.0 = Debug|x64
+ {6163540C-52CA-4009-8F76-409D15529E26}.Debug|x86.ActiveCfg = Debug|x86
+ {6163540C-52CA-4009-8F76-409D15529E26}.Debug|x86.Build.0 = Debug|x86
+ {6163540C-52CA-4009-8F76-409D15529E26}.Debug|x86.Deploy.0 = Debug|x86
+ {6163540C-52CA-4009-8F76-409D15529E26}.Release|ARM.ActiveCfg = Release|ARM
+ {6163540C-52CA-4009-8F76-409D15529E26}.Release|ARM.Build.0 = Release|ARM
+ {6163540C-52CA-4009-8F76-409D15529E26}.Release|ARM.Deploy.0 = Release|ARM
+ {6163540C-52CA-4009-8F76-409D15529E26}.Release|ARM64.ActiveCfg = Release|ARM64
+ {6163540C-52CA-4009-8F76-409D15529E26}.Release|ARM64.Build.0 = Release|ARM64
+ {6163540C-52CA-4009-8F76-409D15529E26}.Release|ARM64.Deploy.0 = Release|ARM64
+ {6163540C-52CA-4009-8F76-409D15529E26}.Release|x64.ActiveCfg = Release|x64
+ {6163540C-52CA-4009-8F76-409D15529E26}.Release|x64.Build.0 = Release|x64
+ {6163540C-52CA-4009-8F76-409D15529E26}.Release|x64.Deploy.0 = Release|x64
+ {6163540C-52CA-4009-8F76-409D15529E26}.Release|x86.ActiveCfg = Release|x86
+ {6163540C-52CA-4009-8F76-409D15529E26}.Release|x86.Build.0 = Release|x86
+ {6163540C-52CA-4009-8F76-409D15529E26}.Release|x86.Deploy.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {D459D964-62D0-4D03-B0C6-47737D02147A}
+ EndGlobalSection
+EndGlobal
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/App.xaml b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/App.xaml
new file mode 100644
index 000000000..8546f4222
--- /dev/null
+++ b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/App.xaml
@@ -0,0 +1,7 @@
+
+
+
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/App.xaml.cs b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/App.xaml.cs
new file mode 100644
index 000000000..75fe5ac41
--- /dev/null
+++ b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/App.xaml.cs
@@ -0,0 +1,100 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.ApplicationModel;
+using Windows.ApplicationModel.Activation;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Navigation;
+
+namespace SPITemperatureAndSensor
+{
+ ///
+ /// Provides application-specific behavior to supplement the default Application class.
+ ///
+ sealed partial class App : Application
+ {
+ ///
+ /// Initializes the singleton application object. This is the first line of authored code
+ /// executed, and as such is the logical equivalent of main() or WinMain().
+ ///
+ public App()
+ {
+ this.InitializeComponent();
+ this.Suspending += OnSuspending;
+ }
+
+ ///
+ /// Invoked when the application is launched normally by the end user. Other entry points
+ /// will be used such as when the application is launched to open a specific file.
+ ///
+ /// Details about the launch request and process.
+ protected override void OnLaunched(LaunchActivatedEventArgs e)
+ {
+ Frame rootFrame = Window.Current.Content as Frame;
+
+ // Do not repeat app initialization when the Window already has content,
+ // just ensure that the window is active
+ if (rootFrame == null)
+ {
+ // Create a Frame to act as the navigation context and navigate to the first page
+ rootFrame = new Frame();
+
+ rootFrame.NavigationFailed += OnNavigationFailed;
+
+ if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
+ {
+ //TODO: Load state from previously suspended application
+ }
+
+ // Place the frame in the current Window
+ Window.Current.Content = rootFrame;
+ }
+
+ if (e.PrelaunchActivated == false)
+ {
+ if (rootFrame.Content == null)
+ {
+ // When the navigation stack isn't restored navigate to the first page,
+ // configuring the new page by passing required information as a navigation
+ // parameter
+ rootFrame.Navigate(typeof(MainPage), e.Arguments);
+ }
+ // Ensure the current window is active
+ Window.Current.Activate();
+ }
+ }
+
+ ///
+ /// Invoked when Navigation to a certain page fails
+ ///
+ /// The Frame which failed navigation
+ /// Details about the navigation failure
+ void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
+ {
+ throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
+ }
+
+ ///
+ /// Invoked when application execution is being suspended. Application state is saved
+ /// without knowing whether the application will be terminated or resumed with the contents
+ /// of memory still intact.
+ ///
+ /// The source of the suspend request.
+ /// Details about the suspend request.
+ private void OnSuspending(object sender, SuspendingEventArgs e)
+ {
+ var deferral = e.SuspendingOperation.GetDeferral();
+ //TODO: Save application state and stop any background activity
+ deferral.Complete();
+ }
+ }
+}
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/LockScreenLogo.scale-200.png b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/LockScreenLogo.scale-200.png
new file mode 100644
index 000000000..735f57adb
Binary files /dev/null and b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/LockScreenLogo.scale-200.png differ
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/SplashScreen.scale-200.png b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/SplashScreen.scale-200.png
new file mode 100644
index 000000000..023e7f1fe
Binary files /dev/null and b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/SplashScreen.scale-200.png differ
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/Square150x150Logo.scale-200.png b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/Square150x150Logo.scale-200.png
new file mode 100644
index 000000000..af49fec1a
Binary files /dev/null and b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/Square150x150Logo.scale-200.png differ
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/Square44x44Logo.scale-200.png b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/Square44x44Logo.scale-200.png
new file mode 100644
index 000000000..ce342a2ec
Binary files /dev/null and b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/Square44x44Logo.scale-200.png differ
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 000000000..f6c02ce97
Binary files /dev/null and b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/StoreLogo.png b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/StoreLogo.png
new file mode 100644
index 000000000..7385b56c0
Binary files /dev/null and b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/StoreLogo.png differ
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/Wide310x150Logo.scale-200.png b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/Wide310x150Logo.scale-200.png
new file mode 100644
index 000000000..288995b39
Binary files /dev/null and b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Assets/Wide310x150Logo.scale-200.png differ
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/MainPage.xaml b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/MainPage.xaml
new file mode 100644
index 000000000..0c11db269
--- /dev/null
+++ b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/MainPage.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/MainPage.xaml.cs b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/MainPage.xaml.cs
new file mode 100644
index 000000000..d0c9267e8
--- /dev/null
+++ b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/MainPage.xaml.cs
@@ -0,0 +1,98 @@
+using System;
+using Windows.Devices.Spi;
+using Windows.Devices.Enumeration;
+using System.Threading.Tasks;
+using Windows.UI.Xaml.Controls;
+using System.Diagnostics;
+
+namespace SPITemperatureAndSensor
+{
+ public sealed partial class MainPage : Page
+ {
+ private SpiDevice SpiDevice;
+ private BMP280 BMP280Sensor;
+
+ public MainPage()
+ {
+ this.InitializeComponent();
+ InitSPI();
+ }
+
+ private async void InitSPI()
+ {
+ try
+ {
+ var settings = new SpiConnectionSettings(0); // Use chip select line 0
+ settings.ClockFrequency = 500000; // 500KHz clock rate
+ settings.Mode = SpiMode.Mode0; // SPI mode 0
+
+ string spiQuery = SpiDevice.GetDeviceSelector("SPI2"); // Find the selector string for the SPI bus controller
+ var deviceInfo = await DeviceInformation.FindAllAsync(spiQuery); // Find the SPI bus controller device with our selector string
+ SpiDevice = await SpiDevice.FromIdAsync(deviceInfo[0].Id, settings); // Create an SpiDevice with our bus controller and SPI settings
+
+ BMP280Sensor = new BMP280(SpiDevice);
+
+ ReadSensor();
+ }
+ catch (Exception ex)
+ {
+ throw new Exception("SPI Initialization Failed", ex);
+ }
+ }
+
+ private async void ReadSensor()
+ {
+ while (true)
+ {
+ double temperature = BMP280Sensor.ReadTemperature();
+ //double pressure = BMP280Sensor.ReadPressure();
+
+ TemperatureTextBlock.Text = $"Temperature: {temperature} °C";
+ //PressureTextBlock.Text = $"Pressure: {pressure} hPa";
+
+ await Task.Delay(1000); // Wait for one second
+ }
+ }
+ }
+
+ public class BMP280
+ {
+ private SpiDevice SpiDevice;
+
+ public BMP280(SpiDevice spiDevice)
+ {
+ this.SpiDevice = spiDevice;
+ }
+
+ public double ReadTemperature()
+ {
+ byte[] readBuffer = new byte[3]; // Buffer to hold read data
+ byte[] writeBuffer = new byte[] { 0xFA }; // Command to read temperature
+
+ SpiDevice.Write(writeBuffer); // Send the command
+ SpiDevice.Read(readBuffer); // Read the response
+
+ // Convert the data to temperature in degrees Celsius
+ int rawTemp = readBuffer[1] << 8 | readBuffer[2];
+ double temp = rawTemp / 16.0;
+
+ return temp;
+ }
+
+ public double ReadPressure()
+ {
+ byte[] readBuffer = new byte[3]; // Buffer to hold read data
+ byte[] writeBuffer = new byte[] { 0xF7 }; // Command to read pressure
+
+ SpiDevice.Write(writeBuffer); // Send the command
+ SpiDevice.Read(readBuffer); // Read the response
+
+ // Convert the data to pressure in hPa
+ int rawPressure = readBuffer[1] << 8 | readBuffer[2];
+ double pressure = rawPressure / 16.0;
+
+ return pressure;
+ }
+ }
+
+}
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Package.appxmanifest b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Package.appxmanifest
new file mode 100644
index 000000000..99379a041
--- /dev/null
+++ b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Package.appxmanifest
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+ SPITemperatureAndSensor
+ jayuppaluri
+ Assets\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Properties/AssemblyInfo.cs b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..31f302cf1
--- /dev/null
+++ b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Properties/AssemblyInfo.cs
@@ -0,0 +1,29 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("SPITemperatureAndSensor")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("SPITemperatureAndSensor")]
+[assembly: AssemblyCopyright("Copyright © 2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Properties/Default.rd.xml b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Properties/Default.rd.xml
new file mode 100644
index 000000000..af00722cd
--- /dev/null
+++ b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/Properties/Default.rd.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/SPITemperatureAndSensor.csproj b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/SPITemperatureAndSensor.csproj
new file mode 100644
index 000000000..b322afb30
--- /dev/null
+++ b/samples/NXP/SPITemperatureAndSensor/SPITemperatureAndSensor/SPITemperatureAndSensor.csproj
@@ -0,0 +1,168 @@
+
+
+
+
+ Debug
+ x86
+ {6163540C-52CA-4009-8F76-409D15529E26}
+ AppContainerExe
+ Properties
+ SPITemperatureAndSensor
+ SPITemperatureAndSensor
+ en-US
+ UAP
+ 10.0.19041.0
+ 10.0.17763.0
+ 14
+ 512
+ {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ true
+ false
+
+
+ true
+ bin\x86\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ x86
+ false
+ prompt
+ true
+
+
+ bin\x86\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ x86
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\ARM\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ ARM
+ false
+ prompt
+ true
+
+
+ bin\ARM\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ ARM
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\ARM64\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ ARM64
+ false
+ prompt
+ true
+ true
+
+
+ bin\ARM64\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ ARM64
+ false
+ prompt
+ true
+ true
+
+
+ true
+ bin\x64\Debug\
+ DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ ;2008
+ full
+ x64
+ false
+ prompt
+ true
+
+
+ bin\x64\Release\
+ TRACE;NETFX_CORE;WINDOWS_UWP
+ true
+ ;2008
+ pdbonly
+ x64
+ false
+ prompt
+ true
+ true
+
+
+ PackageReference
+
+
+
+ App.xaml
+
+
+ MainPage.xaml
+
+
+
+
+
+ Designer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+
+ 6.2.14
+
+
+
+ 14.0
+
+
+
+
\ No newline at end of file