diff --git a/Examples/MAX32665/ADT7320_TempMonitor/.cproject b/Examples/MAX32665/ADT7320_TempMonitor/.cproject
new file mode 100644
index 00000000000..0965420980e
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/.cproject
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/.project b/Examples/MAX32665/ADT7320_TempMonitor/.project
new file mode 100644
index 00000000000..380d0c7195b
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/.project
@@ -0,0 +1,26 @@
+
+
+ ADT7320_TempMonitor
+
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+
+
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/.settings/language.settings.xml b/Examples/MAX32665/ADT7320_TempMonitor/.settings/language.settings.xml
new file mode 100644
index 00000000000..d32717b6f37
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/.settings/language.settings.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/.settings/org.eclipse.cdt.codan.core.prefs b/Examples/MAX32665/ADT7320_TempMonitor/.settings/org.eclipse.cdt.codan.core.prefs
new file mode 100644
index 00000000000..59c0b37ba75
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/.settings/org.eclipse.cdt.codan.core.prefs
@@ -0,0 +1,93 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.codan.checkers.errnoreturn=Warning
+org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return\\")",implicit\=>false}
+org.eclipse.cdt.codan.checkers.errreturnvalue=Error
+org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused return value\\")"}
+org.eclipse.cdt.codan.checkers.nocommentinside=-Error
+org.eclipse.cdt.codan.checkers.nocommentinside.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Nesting comments\\")"}
+org.eclipse.cdt.codan.checkers.nolinecomment=-Error
+org.eclipse.cdt.codan.checkers.nolinecomment.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Line comments\\")"}
+org.eclipse.cdt.codan.checkers.noreturn=Error
+org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return value\\")",implicit\=>false}
+org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
+org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Abstract class cannot be instantiated\\")"}
+org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
+org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Ambiguous problem\\")"}
+org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment in condition\\")"}
+org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
+org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment to itself\\")"}
+org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"C-Style cast instead of C++ cast\\")"}
+org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No break at end of case\\")",no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false,enable_fallthrough_quickfix_param\=>false}
+org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
+org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Catching by reference is recommended\\")",unknown\=>false,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
+org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Circular inheritance\\")"}
+org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning
+org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class members should be properly initialized\\")",skip\=>true}
+org.eclipse.cdt.codan.internal.checkers.CopyrightProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.CopyrightProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Lack of copyright information\\")",regex\=>".*Copyright.*"}
+org.eclipse.cdt.codan.internal.checkers.DecltypeAutoProblem=Error
+org.eclipse.cdt.codan.internal.checkers.DecltypeAutoProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid 'decltype(auto)' specifier\\")"}
+org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Field cannot be resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function cannot be resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.GotoStatementProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.GotoStatementProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Goto statement used\\")"}
+org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
+org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid arguments\\")"}
+org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
+org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid template argument\\")"}
+org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
+org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Label statement not found\\")"}
+org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
+org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Member declaration not found\\")"}
+org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Method cannot be resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.MissCaseProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.MissCaseProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing cases in switch\\")"}
+org.eclipse.cdt.codan.internal.checkers.MissDefaultProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.MissDefaultProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing default in switch\\")",defaultWithAllEnums\=>false}
+org.eclipse.cdt.codan.internal.checkers.MissReferenceProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.MissReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing reference return value in assignment operator\\")"}
+org.eclipse.cdt.codan.internal.checkers.MissSelfCheckProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.MissSelfCheckProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing self check in assignment operator\\")"}
+org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
+org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Name convention for function\\")",pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class has a virtual method and non-virtual destructor\\")"}
+org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
+org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid overload\\")"}
+org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
+org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redeclaration\\")"}
+org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redefinition\\")"}
+org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return with parenthesis\\")"}
+org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Format String Vulnerability\\")"}
+org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Statement has no effect\\")",macro\=>true,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suggested parenthesis around expression\\")",paramNot\=>false}
+org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suspicious semicolon\\")",else\=>false,afterelse\=>false}
+org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Type cannot be resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused function declaration\\")",macro\=>true}
+org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused static function\\")",macro\=>true}
+org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused variable declaration in file scope\\")",macro\=>true,exceptions\=>("@(\#)","$Id")}
+org.eclipse.cdt.codan.internal.checkers.UsingInHeaderProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.UsingInHeaderProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Using directive in header\\")"}
+org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol is not resolved\\")"}
+org.eclipse.cdt.codan.internal.checkers.VirtualMethodCallProblem=-Error
+org.eclipse.cdt.codan.internal.checkers.VirtualMethodCallProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Virtual method call in constructor/destructor\\")"}
+org.eclipse.cdt.qt.core.qtproblem=Warning
+org.eclipse.cdt.qt.core.qtproblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>true,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>null}
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/.settings/org.eclipse.cdt.core.prefs b/Examples/MAX32665/ADT7320_TempMonitor/.settings/org.eclipse.cdt.core.prefs
new file mode 100644
index 00000000000..8a611992234
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/.settings/org.eclipse.cdt.core.prefs
@@ -0,0 +1,15 @@
+eclipse.preferences.version=1
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/BOARD/delimiter=;
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/BOARD/operation=append
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/BOARD/value=EvKit_V1
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/GCC_PREFIX/delimiter=;
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/GCC_PREFIX/operation=replace
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/GCC_PREFIX/value=arm-none-eabi-
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/PROJECT/delimiter=;
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/PROJECT/operation=append
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/PROJECT/value=ADT7320_TempMonitor
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/TARGET/delimiter=;
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/TARGET/operation=append
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/TARGET/value=MAX32665
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/append=true
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1028364529/appendContributed=true
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/.settings/org.eclipse.core.resources.prefs b/Examples/MAX32665/ADT7320_TempMonitor/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000000..99f26c0203a
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/=UTF-8
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/.vscode/README.md b/Examples/MAX32665/ADT7320_TempMonitor/.vscode/README.md
new file mode 100644
index 00000000000..58733e941c7
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/.vscode/README.md
@@ -0,0 +1,47 @@
+# VSCode-Maxim
+
+_(If you're viewing this document from within Visual Studio Code you can press `CTRL+SHIFT+V` to open a Markdown preview window.)_
+
+## Quick Links
+
+* [MSDK User Guide](https://analog-devices-msdk.github.io/msdk/USERGUIDE/)
+* [VSCode-Maxim Github](https://github.com/Analog-Devices-MSDK/VSCode-Maxim)
+
+## Introduction
+
+VSCode-Maxim is a set of [Visual Studio Code](https://code.visualstudio.com/) project configurations and utilities for enabling embedded development for [Analog Device's MSDK](https://github.com/Analog-Devices-MSDK/msdk) and the [MAX32xxx/MAX78xxx microcontrollers](https://www.analog.com/en/product-category/microcontrollers.html).
+
+The following features are supported:
+
+* Code editing with intellisense down to the register level
+* Code compilation with the ability to easily re-target a project for different microcontrollers and boards
+* Flashing programs
+* GUI and command-line debugging
+
+## Dependencies
+
+* [Visual Studio Code](https://code.visualstudio.com/)
+ * [C/C++ VSCode Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)
+ * [Cortex-Debug Extension](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug)
+* [Analog Devices MSDK](https://analog-devices-msdk.github.io/msdk/)
+
+## Installation
+
+Install the MSDK, then set `"MAXIM_PATH"` in your _user_ VS Code settings.
+
+See [Getting Started with Visual Studio Code](https://analog-devices-msdk.github.io/msdk/USERGUIDE/#getting-started-with-visual-studio-code) in the MSDK User Guide for detailed instructions.
+
+## Usage
+
+See the [MSDK User Guide](https://analog-devices-msdk.github.io/msdk/USERGUIDE/#visual-studio-code) for detailed usage info.
+
+## Issue Tracker
+
+Bug reports, feature requests, and contributions are welcome via the [issues](https://github.com/Analog-Devices-MSDK/VSCode-Maxim/issues) tracker on Github.
+
+New issues should contain _at minimum_ the following information:
+
+* Visual Studio Code version #s (see `Help -> About`)
+* C/C++ Extension version #
+* Target microcontroller and evaluation platform
+* The projects `.vscode` folder and `Makefile` (where applicable). Standard compression formats such as `.zip`, `.rar`, `.tar.gz`, etc. are all acceptable.
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/.vscode/c_cpp_properties.json b/Examples/MAX32665/ADT7320_TempMonitor/.vscode/c_cpp_properties.json
new file mode 100644
index 00000000000..dfbed47b581
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/.vscode/c_cpp_properties.json
@@ -0,0 +1,53 @@
+{
+ "configurations": [
+ {
+ "name": "Win32",
+ "includePath": [
+ "${default}"
+ ],
+ "defines": [
+ "${default}"
+ ],
+ "intelliSenseMode": "gcc-arm",
+ "compilerPath": "${config:ARM_GCC_path}/bin/arm-none-eabi-gcc.exe",
+ "browse": {
+ "path": [
+ "${default}"
+ ]
+ }
+ },
+ {
+ "name": "Linux",
+ "includePath": [
+ "${default}"
+ ],
+ "defines": [
+ "${default}"
+ ],
+ "intelliSenseMode": "gcc-arm",
+ "compilerPath": "${config:ARM_GCC_path}/bin/arm-none-eabi-gcc",
+ "browse": {
+ "path": [
+ "${default}"
+ ]
+ }
+ },
+ {
+ "name": "Mac",
+ "includePath": [
+ "${default}"
+ ],
+ "defines": [
+ "${default}"
+ ],
+ "intelliSenseMode": "gcc-arm",
+ "compilerPath": "${config:ARM_GCC_path}/bin/arm-none-eabi-gcc",
+ "browse": {
+ "path": [
+ "${default}"
+ ]
+ }
+ }
+ ],
+ "version": 4
+}
\ No newline at end of file
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/.vscode/flash.gdb b/Examples/MAX32665/ADT7320_TempMonitor/.vscode/flash.gdb
new file mode 100755
index 00000000000..8f22801a47d
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/.vscode/flash.gdb
@@ -0,0 +1,17 @@
+define flash_m4
+ set architecture armv7e-m
+ set remotetimeout 10
+ target remote | openocd -c "gdb_port pipe;log_output flash.log" -s $arg0/scripts -f interface/$arg1 -f target/$arg2 -c "init; reset halt"
+ load
+ compare-sections
+ monitor reset halt
+end
+
+define flash_m4_run
+ set architecture armv7e-m
+ set remotetimeout 10
+ target remote | openocd -c "gdb_port pipe;log_output flash.log" -s $arg0/scripts -f interface/$arg1 -f target/$arg2 -c "init; reset halt"
+ load
+ compare-sections
+ monitor resume
+end
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/.vscode/launch.json b/Examples/MAX32665/ADT7320_TempMonitor/.vscode/launch.json
new file mode 100644
index 00000000000..01fe5199048
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/.vscode/launch.json
@@ -0,0 +1,133 @@
+{
+ "configurations": [
+ {
+ "name": "Debug Arm (Cortex-debug)",
+ "cwd":"${workspaceRoot}",
+ "executable": "${workspaceFolder}/build/${config:program_file}",
+ "loadFiles": ["${workspaceFolder}/build/${config:program_file}"],
+ "symbolFiles": [{
+ "file": "${workspaceFolder}/build/${config:symbol_file}"
+ }],
+ "request": "launch",
+ "type": "cortex-debug",
+ "servertype": "openocd",
+ "linux": {
+ "gdbPath": "${config:ARM_GCC_path}/bin/arm-none-eabi-gdb",
+ "serverpath": "${config:OCD_path}/openocd",
+ },
+ "windows": {
+ "gdbPath": "${config:ARM_GCC_path}/bin/arm-none-eabi-gdb.exe",
+ "serverpath": "${config:OCD_path}/openocd.exe",
+ },
+ "osx": {
+ "gdbPath": "${config:ARM_GCC_path}/bin/arm-none-eabi-gdb",
+ "serverpath": "${config:OCD_path}/openocd",
+ },
+ "searchDir": ["${config:OCD_path}/scripts"],
+ "configFiles": ["interface/${config:M4_OCD_interface_file}", "target/${config:M4_OCD_target_file}"],
+ "interface": "swd",
+ "runToEntryPoint": "main",
+ "svdFile": "${config:MAXIM_PATH}/Libraries/CMSIS/Device/Maxim/${config:target}/Include/${config:target}.svd"
+ },
+ {
+ "name": "GDB (Arm M4)",
+ "type": "cppdbg",
+ "request": "launch",
+ "program": "${workspaceFolder}/build/${config:program_file}",
+ "args": [],
+ "stopAtEntry": true,
+ "cwd": "${workspaceFolder}",
+ "environment": [],
+ "externalConsole": false,
+ "MIMode": "gdb",
+ "linux": {
+ "miDebuggerPath": "${config:ARM_GCC_path}/bin/arm-none-eabi-gdb",
+ "debugServerPath": "${config:OCD_path}/openocd",
+ },
+ "windows": {
+ "miDebuggerPath": "${config:ARM_GCC_path}/bin/arm-none-eabi-gdb.exe",
+ "debugServerPath": "${config:OCD_path}/openocd.exe",
+ },
+ "osx": {
+ "miDebuggerPath": "${config:ARM_GCC_path}/bin/arm-none-eabi-gdb",
+ "debugServerPath": "${config:OCD_path}/bin/openocd",
+ },
+ "logging": {
+ "exceptions": true,
+ "trace": false,
+ "traceResponse": false,
+ "engineLogging": false
+ },
+ "miDebuggerServerAddress": "localhost:3333",
+ "debugServerArgs": "-s ${config:OCD_path}/scripts -f interface/${config:M4_OCD_interface_file} -f target/${config:M4_OCD_target_file} -c \"init; reset halt\"",
+ "serverStarted": "Info : Listening on port 3333 for gdb connections",
+ "filterStderr": true,
+ "targetArchitecture": "arm",
+ "customLaunchSetupCommands": [
+ {"text":"-list-features"}
+ ],
+ "setupCommands": [
+ { "text":"set logging overwrite on"},
+ { "text":"set logging file debug-arm.log"},
+ { "text":"set logging on"},
+ { "text":"cd ${workspaceFolder}" },
+ { "text":"exec-file build/${config:program_file}" },
+ { "text":"symbol-file build/${config:symbol_file}" },
+ { "text":"target remote localhost:3333" },
+ { "text":"monitor reset halt" },
+ { "text":"set $pc=Reset_Handler"},
+ { "text":"b main" }
+ ]
+ },
+ {
+ "name": "GDB (RISC-V)",
+ "type": "cppdbg",
+ "request": "launch",
+ "program": "${workspaceFolder}/buildrv/${config:program_file}",
+ "args": [],
+ "stopAtEntry": false,
+ "cwd": "${workspaceFolder}",
+ "environment": [],
+ "externalConsole": false,
+ "MIMode": "gdb",
+ "linux": {
+ "miDebuggerPath": "${config:xPack_GCC_path}/bin/riscv-none-elf-gdb",
+ "debugServerPath": "${config:OCD_path}/openocd",
+ },
+ "windows": {
+ "miDebuggerPath": "${config:xPack_GCC_path}/bin/riscv-none-elf-gdb.exe",
+ "debugServerPath": "${config:OCD_path}/openocd.exe",
+ },
+ "osx": {
+ "miDebuggerPath": "${config:xPack_GCC_path}/bin/riscv-none-elf-gdb",
+ "debugServerPath": "${config:OCD_path}/bin/openocd",
+ },
+ "logging": {
+ "exceptions": true,
+ "trace": false,
+ "traceResponse": false,
+ "engineLogging": false
+ },
+ "miDebuggerServerAddress": "localhost:3334",
+ "debugServerArgs": "-c \"gdb_port 3334\" -s ${config:OCD_path}/scripts -f interface/${config:RV_OCD_interface_file} -f target/${config:RV_OCD_target_file}",
+ "serverStarted": "Info : Listening on port 3334 for gdb connections",
+ "filterStderr": true,
+ "customLaunchSetupCommands": [
+ {"text":"-list-features"}
+ ],
+ "targetArchitecture": "arm",
+ "setupCommands": [
+ { "text":"set logging overwrite on"},
+ { "text":"set logging file debug-riscv.log"},
+ { "text":"set logging on"},
+ { "text":"cd ${workspaceFolder}" },
+ { "text": "set architecture riscv:rv32", "ignoreFailures": false },
+ { "text":"exec-file build/${config:program_file}", "ignoreFailures": false },
+ { "text":"symbol-file buildrv/${config:symbol_file}", "ignoreFailures": false },
+ { "text":"target remote localhost:3334" },
+ { "text":"b main" },
+ { "text": "set $pc=Reset_Handler","ignoreFailures": false }
+ ]
+ }
+ ]
+}
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/.vscode/settings.json b/Examples/MAX32665/ADT7320_TempMonitor/.vscode/settings.json
new file mode 100755
index 00000000000..df671a81271
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/.vscode/settings.json
@@ -0,0 +1,88 @@
+{
+ "terminal.integrated.env.windows": {
+ "Path":"${config:OCD_path};${config:ARM_GCC_path}/bin;${config:xPack_GCC_path}/bin;${config:MSYS_path}/usr/bin;${config:Make_path};${env:PATH}",
+ "MAXIM_PATH":"${config:MAXIM_PATH}"
+ },
+ "terminal.integrated.defaultProfile.windows": "Command Prompt",
+
+ "terminal.integrated.env.linux": {
+ "PATH":"${config:OCD_path}:${config:ARM_GCC_path}/bin:${config:xPack_GCC_path}/bin:${env:PATH}",
+ "MAXIM_PATH":"${config:MAXIM_PATH}"
+ },
+ "terminal.integrated.env.osx": {
+ "PATH":"${config:OCD_path}/bin:${config:ARM_GCC_path}/bin:${config:xPack_GCC_path}/bin:${env:PATH}",
+ "MAXIM_PATH":"${config:MAXIM_PATH}"
+ },
+
+ "target":"MAX32665",
+ "board":"EvKit_V1",
+
+ "project_name":"${workspaceFolderBasename}",
+
+ "program_file":"${config:project_name}.elf",
+ "symbol_file":"${config:program_file}",
+
+ "M4_OCD_interface_file":"cmsis-dap.cfg",
+ "M4_OCD_target_file":"max32665.cfg",
+ "RV_OCD_interface_file":"ftdi/olimex-arm-usb-ocd-h.cfg",
+ "RV_OCD_target_file":"${config:target}_riscv.cfg",
+
+ "v_Arm_GCC":"10.3",
+ "v_xPack_GCC":"12.2.0-3.1",
+
+ "OCD_path":"${config:MAXIM_PATH}/Tools/OpenOCD",
+ "ARM_GCC_path":"${config:MAXIM_PATH}/Tools/GNUTools/${config:v_Arm_GCC}",
+ "xPack_GCC_path":"${config:MAXIM_PATH}/Tools/xPack/riscv-none-elf-gcc/${config:v_xPack_GCC}",
+ "Make_path":"${config:MAXIM_PATH}/Tools/GNUTools/Make",
+ "MSYS_path":"${config:MAXIM_PATH}/Tools/MSYS2",
+
+ "C_Cpp.default.includePath": [
+ "${workspaceFolder}",
+ "${workspaceFolder}/**",
+ "${config:MAXIM_PATH}/Libraries/Boards/${config:target}/Include",
+ "${config:MAXIM_PATH}/Libraries/Boards/${config:target}/${config:board}/Include",
+ "${config:MAXIM_PATH}/Libraries/CMSIS/Device/Maxim/${config:target}/Include",
+ "${config:MAXIM_PATH}/Libraries/CMSIS/Include",
+ "${config:ARM_GCC_path}/arm-none-eabi/include",
+ "${config:ARM_GCC_path}/lib/gcc/arm-none-eabi/${config:v_Arm_GCC}/include",
+ "${config:MAXIM_PATH}/Libraries/PeriphDrivers/Include/${config:target}",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/Camera",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/Display",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/ExtMemory",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/LED",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/PMIC",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/PushButton",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/Touchscreen",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/Display/fonts",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/EEPROM",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/CODEC",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/SRAM",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/TempSensor"
+ ],
+ "C_Cpp.default.browse.path": [
+ "${workspaceFolder}",
+ "${config:MAXIM_PATH}/Libraries/Boards/${config:target}/Source",
+ "${config:MAXIM_PATH}/Libraries/Boards/${config:target}/${config:board}/Source",
+ "${config:MAXIM_PATH}/Libraries/PeriphDrivers/Source",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/Camera",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/Display",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/LED",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/PMIC",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/PushButton",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/Touchscreen",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/ADC",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/Display/fonts",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/EEPROM",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/CODEC",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/SRAM",
+ "${config:MAXIM_PATH}/Libraries/MiscDrivers/TempSensor"
+ ],
+ "C_Cpp.default.defines": [
+
+ ],
+ "C_Cpp.default.forcedInclude": [
+ "${workspaceFolder}/build/project_defines.h"
+ ]
+}
+
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/.vscode/tasks.json b/Examples/MAX32665/ADT7320_TempMonitor/.vscode/tasks.json
new file mode 100644
index 00000000000..e95445e2b3e
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/.vscode/tasks.json
@@ -0,0 +1,115 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build",
+ "type": "shell",
+ "command": "make -r -j 8 --output-sync=target --no-print-directory TARGET=${config:target} BOARD=${config:board} MAXIM_PATH=${config:MAXIM_PATH} MAKE=make PROJECT=${config:project_name}",
+ "osx":{
+ "command": "source ~/.zshrc && make -r -j 8 --output-sync=target --no-print-directory TARGET=${config:target} BOARD=${config:board} MAXIM_PATH=${config:MAXIM_PATH} MAKE=make PROJECT=${config:project_name}"
+ },
+ "group": "build",
+ "problemMatcher": []
+ },
+ {
+ "label": "clean",
+ "type": "shell",
+ "command": "make -j 8 clean --output-sync=target --no-print-directory TARGET=${config:target} BOARD=${config:board} MAXIM_PATH=${config:MAXIM_PATH} MAKE=make PROJECT=${config:project_name}",
+ "osx":{
+ "command": "source ~/.zshrc && make -j 8 clean --output-sync=target --no-print-directory TARGET=${config:target} BOARD=${config:board} MAXIM_PATH=${config:MAXIM_PATH} MAKE=make PROJECT=${config:project_name}"
+ },
+ "group": "build",
+ "problemMatcher": []
+ },
+ {
+ "label": "clean-periph",
+ "type": "shell",
+ "command": "make -j 8 distclean --output-sync=target --no-print-directory TARGET=${config:target} BOARD=${config:board} MAXIM_PATH=${config:MAXIM_PATH} MAKE=make PROJECT=${config:project_name}",
+ "osx":{
+ "command": "source ~/.zshrc && make -j 8 distclean --output-sync=target --no-print-directory TARGET=${config:target} BOARD=${config:board} MAXIM_PATH=${config:MAXIM_PATH} MAKE=make PROJECT=${config:project_name}"
+ },
+ "group": "build",
+ "problemMatcher": []
+ },
+ {
+ "label": "flash",
+ "type": "shell",
+ "command": "arm-none-eabi-gdb",
+ "args": [
+ "--cd=\"${workspaceFolder}\"",
+ "--se=\"build/${config:program_file}\"",
+ "--symbols=build/${config:symbol_file}",
+ "-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
+ "--ex=\"flash_m4 ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
+ "--batch"
+ ],
+ "group": "build",
+ "problemMatcher": [],
+ "dependsOn":["build"]
+ },
+ {
+ "label": "flash & run",
+ "type": "shell",
+ "command": "arm-none-eabi-gdb",
+ "args": [
+ "--cd=\"${workspaceFolder}\"",
+ "--se=\"build/${config:program_file}\"",
+ "--symbols=build/${config:symbol_file}",
+ "-x=\"${workspaceFolder}/.vscode/flash.gdb\"",
+ "--ex=\"flash_m4_run ${config:OCD_path} ${config:M4_OCD_interface_file} ${config:M4_OCD_target_file}\"",
+ "--batch"
+ ],
+ "group": "build",
+ "problemMatcher": [],
+ "dependsOn":["build"]
+ },
+ {
+ "label": "erase flash",
+ "type": "shell",
+ "command": "openocd",
+ "args": [
+ "-s", "${config:OCD_path}/scripts",
+ "-f", "interface/${config:M4_OCD_interface_file}",
+ "-f", "target/${config:M4_OCD_target_file}",
+ "-c", "\"init; reset halt; max32xxx mass_erase 0;\"",
+ "-c", "exit"
+ ],
+ "group":"build",
+ "problemMatcher": [],
+ "dependsOn":[]
+ },
+ {
+ "label": "openocd (m4)",
+ "type": "shell",
+ "command": "openocd",
+ "args": [
+ "-s",
+ "${config:OCD_path}/scripts",
+ "-f",
+ "interface/${config:M4_OCD_interface_file}",
+ "-f",
+ "target/${config:M4_OCD_target_file}",
+ "-c",
+ "\"init; reset halt\""
+ ],
+ "problemMatcher": [],
+ "dependsOn":[]
+ },
+ {
+ "label": "gdb (m4)",
+ "type": "shell",
+ "command": "arm-none-eabi-gdb",
+ "args": [
+ "--ex=\"cd ${workspaceFolder}\"",
+ "--se=\"build/${config:program_file}\"",
+ "--symbols=build/${config:symbol_file}",
+ "--ex=\"target remote localhost:3333\"",
+ "--ex=\"monitor reset halt\"",
+ "--ex=\"b main\"",
+ "--ex=\"c\""
+ ],
+ "problemMatcher": [],
+ "dependsOn":[]
+ },
+ ]
+}
\ No newline at end of file
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/ADT7320_TempMonitor.launch b/Examples/MAX32665/ADT7320_TempMonitor/ADT7320_TempMonitor.launch
new file mode 100644
index 00000000000..e8ca004a348
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/ADT7320_TempMonitor.launch
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/Makefile b/Examples/MAX32665/ADT7320_TempMonitor/Makefile
new file mode 100644
index 00000000000..7d521b4c9c2
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/Makefile
@@ -0,0 +1,413 @@
+###############################################################################
+ #
+ # Copyright (C) 2022-2023 Maxim Integrated Products, Inc., All Rights Reserved.
+ # (now owned by Analog Devices, Inc.)
+ #
+ # Permission is hereby granted, free of charge, to any person obtaining a
+ # copy of this software and associated documentation files (the "Software"),
+ # to deal in the Software without restriction, including without limitation
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ # and/or sell copies of the Software, and to permit persons to whom the
+ # Software is furnished to do so, subject to the following conditions:
+ #
+ # The above copyright notice and this permission notice shall be included
+ # in all copies or substantial portions of the Software.
+ #
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ # IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
+ # OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ # OTHER DEALINGS IN THE SOFTWARE.
+ #
+ # Except as contained in this notice, the name of Maxim Integrated
+ # Products, Inc. shall not be used except as stated in the Maxim Integrated
+ # Products, Inc. Branding Policy.
+ #
+ # The mere transfer of this software does not imply any licenses
+ # of trade secrets, proprietary technology, copyrights, patents,
+ # trademarks, maskwork rights, or any other form of intellectual
+ # property whatsoever. Maxim Integrated Products, Inc. retains all
+ # ownership rights.
+ #
+ ##############################################################################
+ #
+ # Copyright 2023 Analog Devices, Inc.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License");
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ #
+ ##############################################################################
+
+# ** Readme! **
+# Don't edit this file! This is the core Makefile for a MaximSDK
+# project. The available configuration options can be overridden
+# in "project.mk", on the command-line, or with system environment
+# variables.
+
+# See https://analog-devices-msdk.github.io/msdk/USERGUIDE/#build-system
+# for more detailed instructions on how to use this system.
+
+# The detailed instructions mentioned above are easier to read than
+# this file, but the comments found in this file also outline the
+# available configuration variables. This file is organized into
+# sub-sections, some of which expose config variables.
+
+
+# *******************************************************************************
+# Set the target microcontroller and board to compile for.
+
+# Every TARGET microcontroller has some Board Support Packages (BSPs) that are
+# available for it under the MaximSDK/Libraries/Boards/TARGET folder. The BSP
+# that gets selected is MaximSDK/Libraries/Boards/TARGET/BOARD.
+
+# Configuration Variables:
+# - TARGET : Override the default target microcontroller. Ex: TARGET=MAX78000
+# - BOARD : Override the default BSP (case sensitive). Ex: BOARD=EvKit_V1, BOARD=FTHR_RevA
+
+
+ifeq "$(TARGET)" ""
+# Default target microcontroller
+TARGET := MAX32665
+TARGET_UC := MAX32665
+TARGET_LC := max32665
+else
+# "TARGET" has been overridden in the environment or on the command-line.
+# We need to calculate an upper and lowercase version of the part number,
+# because paths on Linux and MacOS are case-sensitive.
+TARGET_UC := $(subst m,M,$(subst a,A,$(subst x,X,$(TARGET))))
+TARGET_LC := $(subst M,m,$(subst A,a,$(subst X,x,$(TARGET))))
+endif
+
+# Default board.
+BOARD ?= EvKit_V1
+
+# *******************************************************************************
+# Locate the MaximSDK
+
+# This Makefile needs to know where to find the MaximSDK, and the MAXIM_PATH variable
+# should point to the root directory of the MaximSDK installation. Setting this manually
+# is usually only required if you're working on the command-line.
+
+# If MAXIM_PATH is not specified, we assume the project still lives inside of the MaximSDK
+# and move up from this project's original location.
+
+# Configuration Variables:
+# - MAXIM_PATH : Tell this Makefile where to find the MaximSDK. Ex: MAXIM_PATH=C:/MaximSDK
+
+
+ifneq "$(MAXIM_PATH)" ""
+# Sanitize MAXIM_PATH for backslashes
+MAXIM_PATH := $(subst \,/,$(MAXIM_PATH))
+# Locate some other useful paths...
+LIBS_DIR := $(abspath $(MAXIM_PATH)/Libraries)
+CMSIS_ROOT := $(LIBS_DIR)/CMSIS
+endif
+
+# *******************************************************************************
+# Include project Makefile. We do this after formulating TARGET, BOARD, and MAXIM_PATH
+# in case project.mk needs to reference those values. However, we also include
+# this as early as possible in the Makefile so that it can append to or override
+# the variables below.
+
+
+PROJECTMK ?= $(abspath ./project.mk)
+include $(PROJECTMK)
+$(info Loaded project.mk)
+# PROJECTMK is also used by implicit rules and other libraries to add project.mk as a watch file
+
+# *******************************************************************************
+# Final path sanitization and re-calculation. No options here.
+
+ifeq "$(MAXIM_PATH)" ""
+# MAXIM_PATH is still not defined...
+DEPTH := ../../../
+MAXIM_PATH := $(abspath $(DEPTH))
+$(warning Warning: MAXIM_PATH is not set! Set MAXIM_PATH in your environment or in project.mk to clear this warning.)
+$(warning Warning: Attempting to use $(MAXIM_PATH) calculated from relative path)
+else
+# Sanitize MAXIM_PATH for backslashes
+MAXIM_PATH := $(subst \,/,$(MAXIM_PATH))
+endif
+
+# Final recalculation of LIBS_DIR/CMSIS_ROOT
+LIBS_DIR := $(abspath $(MAXIM_PATH)/Libraries)
+CMSIS_ROOT := $(LIBS_DIR)/CMSIS
+
+# One final UC/LC check in case user set TARGET in project.mk
+TARGET_UC := $(subst m,M,$(subst a,A,$(subst x,X,$(TARGET))))
+TARGET_LC := $(subst M,m,$(subst A,a,$(subst X,x,$(TARGET))))
+
+export TARGET
+export TARGET_UC
+export TARGET_LC
+export CMSIS_ROOT
+# TODO: Remove dependency on exports for these variables.
+
+# *******************************************************************************
+# Set up search paths, and auto-detect all source code on those paths.
+
+# The following paths are searched by default, where "./" is the project directory.
+# ./
+# |- *.h
+# |- *.c
+# |-include (optional)
+# |- *.h
+# |-src (optional)
+# |- *.c
+
+# Configuration Variables:
+# - VPATH : Tell this Makefile to search additional locations for source (.c) files.
+# You should use the "+=" operator with this option.
+# Ex: VPATH += your/new/path
+# - IPATH : Tell this Makefile to search additional locations for header (.h) files.
+# You should use the "+=" operator with this option.
+# Ex: VPATH += your/new/path
+# - SRCS : Tell this Makefile to explicitly add a source (.c) file to the build.
+# This is really only useful if you want to add a source file that isn't
+# on any VPATH, in which case you can add the full path to the file here.
+# You should use the "+=" operator with this option.
+# Ex: SRCS += your/specific/source/file.c
+# - AUTOSEARCH : Set whether this Makefile should automatically detect .c files on
+# VPATH and add them to the build. This is enabled by default. Set
+# to 0 to disable. If autosearch is disabled, source files must be
+# manually added to SRCS.
+# Ex: AUTOSEARCH = 0
+
+
+# Where to find source files for this project.
+VPATH += .
+VPATH += src
+VPATH := $(VPATH)
+
+# Where to find header files for this project
+IPATH += .
+IPATH += include
+IPATH := $(IPATH)
+
+AUTOSEARCH ?= 1
+ifeq ($(AUTOSEARCH), 1)
+# Auto-detect all C/C++ source files on VPATH
+SRCS += $(wildcard $(addsuffix /*.c, $(VPATH)))
+SRCS += $(wildcard $(addsuffix /*.cpp, $(VPATH)))
+endif
+
+# Collapse SRCS before passing them on to the next stage
+SRCS := $(SRCS)
+
+# *******************************************************************************
+# Set the output filename
+
+# Configuration Variables:
+# - PROJECT : Override the default output filename. Ex: PROJECT=MyProject
+
+
+# The default value creates a file named after the target micro. Ex: MAX78000.elf
+PROJECT ?= $(TARGET_LC)
+
+# *******************************************************************************
+# Compiler options
+
+# Configuration Variables:
+# - DEBUG : Set DEBUG=1 to build explicitly for debugging. This adds some additional
+# symbols and sets -Og as the default optimization level.
+# - MXC_OPTIMIZE_CFLAGS : Override the default compiler optimization level.
+# Ex: MXC_OPTIMIZE_CFLAGS = -O2
+# - PROJ_CFLAGS : Add additional compiler flags to the build.
+# You should use the "+=" operator with this option.
+# Ex: PROJ_CFLAGS += -Wextra
+# - MFLOAT_ABI : Set the floating point acceleration level.
+# The only options are "hard", "soft", or "softfp".
+# Ex: MFLOAT_ABI = hard
+# - LINKERFILE : Override the default linkerfile.
+# Ex: LINKERFILE = customlinkerfile.ld
+# - LINKERPATH : Override the default search location for $(LINKERFILE)
+# The default search location is $(CMSIS_ROOT)/Device/Maxim/$(TARGET_UC)/Source/GCC
+# If $(LINKERFILE) cannot be found at this path, then the root project
+# directory will be used as a fallback.
+
+# Select 'GCC' or 'IAR' compiler
+ifeq "$(COMPILER)" ""
+COMPILER := GCC
+endif
+
+# Set default compiler optimization levels
+ifeq "$(MAKECMDGOALS)" "release"
+# Default optimization level for "release" builds (make release)
+MXC_OPTIMIZE_CFLAGS ?= -O2
+DEBUG = 0
+endif
+
+ifeq ($(DEBUG),1)
+# Optimizes for debugging as recommended
+# by GNU for code-edit-debug cycles
+# https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Optimize-Options
+MXC_OPTIMIZE_CFLAGS := -Og
+endif
+
+# Default level if not building for release or explicitly for debug
+MXC_OPTIMIZE_CFLAGS ?= -Og
+
+# Set compiler flags
+PROJ_CFLAGS += -Wall # Enable warnings
+PROJ_CFLAGS += -DMXC_ASSERT_ENABLE
+
+# Set hardware floating point acceleration.
+# Options are:
+# - hard
+# - soft
+# - softfp (default if MFLOAT_ABI is not set)
+MFLOAT_ABI ?= softfp
+# MFLOAT_ABI must be exported to other Makefiles
+export MFLOAT_ABI
+
+# This path contains system-level intialization files for the target micro. Add to the build.
+VPATH += $(CMSIS_ROOT)/Device/Maxim/$(TARGET_UC)/Source
+
+# *******************************************************************************
+# Secure Boot Tools (SBT)
+
+# This section integrates the Secure Boot Tools. It's intended for use with
+# microcontrollers that have a secure bootloader.
+
+# Enabling SBT integration will add some special rules, such as "make sla", "make scpa", etc.
+
+# Configuration variables:
+# SBT : Toggle SBT integration. Set to 1 to enable, or 0
+# to disable
+# MAXIM_SBT_DIR : Specify the location of the SBT tool binaries. This defaults to
+# Tools/SBT in the MaximSDK. The standalone SBT installer will override
+# this via an environment variable.
+# TARGET_SEC : Specify the part number to be passed into the SBT. This should match
+# the secure variant part #. The default value will depend on TARGET.
+# For example, TARGET=MAX32650 will result in TARGET_SEC=MAX32651, and
+# the default selection happens in Tools/SBT/SBT-config.
+# However, if there are multiple secure part #s for the target
+# microcontroller this variable may need to be changed.
+
+SBT ?= 0
+ifeq ($(SBT), 1)
+MAXIM_SBT_DIR ?= $(MAXIM_PATH)/Tools/SBT
+MAXIM_SBT_DIR := $(subst \,/,$(MAXIM_SBT_DIR))
+# ^ Must sanitize path for \ on Windows, since this may come from an environment
+# variable.
+
+export MAXIM_SBT_DIR # SBTs must have this environment variable defined to work
+
+# SBT-config.mk and SBT-rules.mk are included further down this Makefile.
+
+endif # SBT
+
+# *******************************************************************************
+# Default goal selection. This section allows you to override the default goal
+# that will run if no targets are specified on the command-line.
+# (ie. just running 'make' instead of 'make all')
+
+# Configuration variables:
+# .DEFAULT_GOAL : Set the default goal if no targets were specified on the
+# command-line
+# ** "override" must be used with this variable. **
+# Ex: "override .DEFAULT_GOAL = mygoal"
+
+ifeq "$(.DEFAULT_GOAL)" ""
+ifeq ($(SBT),1)
+override .DEFAULT_GOAL := sla
+else
+override .DEFAULT_GOAL := all
+endif
+endif
+
+# Developer note: 'override' is used above for legacy Makefile compatibility.
+# gcc.mk/gcc_riscv.mk need to hard-set 'all' internally, so this new system
+# uses 'override' to come in over the top without breaking old projects.
+
+# It's also necessary to explicitly set MAKECMDGOALS...
+ifeq "$(MAKECMDGOALS)" ""
+MAKECMDGOALS:=$(.DEFAULT_GOAL)
+endif
+
+# Enable colors when --sync-output is used.
+# See https://www.gnu.org/software/make/manual/make.html#Terminal-Output (section 13.2)
+ifneq ($(MAKE_TERMOUT),)
+PROJ_CFLAGS += -fdiagnostics-color=always
+endif
+
+ifneq ($(FORCE_COLOR),)
+PROJ_CFLAGS += -fdiagnostics-color=always
+endif
+
+# *******************************************************************************
+# Include SBT config. We need to do this here because it needs to know
+# the current MAKECMDGOAL.
+ifeq ($(SBT),1)
+include $(MAXIM_PATH)/Tools/SBT/SBT-config.mk
+endif
+
+# *******************************************************************************
+# Libraries
+
+# This section offers "toggle switches" to include or exclude the libraries that
+# are available in the MaximSDK. Set a configuration variable to 1 to include the
+# library in the build, or 0 to exclude.
+
+# Each library may also have its own library specific configuration variables. See
+# Libraries/libs.mk for more details.
+
+# Configuration variables:
+# - LIB_BOARD : Include the Board-Support Package (BSP) library. (Enabled by default)
+# - LIB_PERIPHDRIVERS : Include the peripheral driver library. (Enabled by default)
+# - LIB_CMSIS_DSP : Include the CMSIS-DSP library.
+# - LIB_CORDIO : Include the Cordio BLE library
+# - LIB_FCL : Include the Free Cryptographic Library (FCL)
+# - LIB_FREERTOS : Include the FreeRTOS and FreeRTOS-Plus-CLI libraries
+# - LIB_LC3 : Include the Low Complexity Communication Codec (LC3) library
+# - LIB_LITTLEFS : Include the "little file system" (littleFS) library
+# - LIB_LWIP : Include the lwIP library
+# - LIB_MAXUSB : Include the MAXUSB library
+# - LIB_SDHC : Include the SDHC library
+
+include $(LIBS_DIR)/libs.mk
+
+
+# *******************************************************************************
+# Rules
+
+# Include the rules for building for this target. All other makefiles should be
+# included before this one.
+include $(CMSIS_ROOT)/Device/Maxim/$(TARGET_UC)/Source/$(COMPILER)/$(TARGET_LC).mk
+
+# Include the rules that integrate the SBTs. SBTs are a special case that must be
+# include after the core gcc rules to extend them.
+ifeq ($(SBT), 1)
+include $(MAXIM_PATH)/Tools/SBT/SBT-rules.mk
+endif
+
+
+# Get .DEFAULT_GOAL working.
+ifeq "$(MAKECMDGOALS)" ""
+MAKECMDGOALS:=$(.DEFAULT_GOAL)
+endif
+
+
+all:
+# Extend the functionality of the "all" recipe here
+ arm-none-eabi-size --format=berkeley $(BUILD_DIR)/$(PROJECT).elf
+
+libclean:
+ $(MAKE) -f ${PERIPH_DRIVER_DIR}/periphdriver.mk clean.periph
+
+clean:
+# Extend the functionality of the "clean" recipe here
+
+# The rule to clean out all the build products.
+distclean: clean libclean
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/README.md b/Examples/MAX32665/ADT7320_TempMonitor/README.md
new file mode 100644
index 00000000000..4cd10580500
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/README.md
@@ -0,0 +1,46 @@
+## Description
+
+This example reads the temperature data from ADT7320 via SPI and writes it to the serial terminal.
+
+
+## Software
+
+### Project Usage
+
+Universal instructions on building, flashing, and debugging this project can be found in the **[MSDK User Guide](https://analog-devices-msdk.github.io/msdk/USERGUIDE/)**.
+
+### Project-Specific Build Notes
+
+(None - this project builds as a standard example)
+
+## Required Connections
+
+- Connect a USB cable between the PC and the CN2 (USB/PWR) connector.
+- Open an terminal application on the PC and connect to the EV kit's console UART at 115200, 8-N-1.
+- You must connect ADT7320 to the related pins on MAX32666 FTHR2 board.
+
+| ADT7320 | FTHR2 / EvKit | FTHR |
+| ------- | --------------- | ----- |
+| SCLK -> | P1_8_QSPI0_SCK | P0_16 |
+| GND -> | GND | GND |
+| DOUT -> | P1_8_QSPI0_MISO | P0_18 |
+| VDD -> | 3V3 | 3V3 |
+| DIN -> | P1_8_QSPI0_MOSI | P0_17 |
+| CS -> | P1_8_QSPI0_SS | P0_16 |
+
+## Expected Output
+
+The Console UART of the device will output these messages:
+
+```
+***************** ADT7320 Temperature Sensor Example *****************
+This example reads the temperature data from ADT7320 temperature sensor
+via SPI and write it to the terminal.
+You will need to connect the ADT7320 sensor to the SPI0 pins.
+
+Over Temperature Limit Set to 29.297
+Hysteresis Set to 1
+Temperature Value = 28.438, Over Temp. Flag: 0
+
+```
+
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/main.c b/Examples/MAX32665/ADT7320_TempMonitor/main.c
new file mode 100644
index 00000000000..91ede2b534a
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/main.c
@@ -0,0 +1,112 @@
+/**
+ * @file main.c
+ * @brief ADT7320 Temp Sensor Demo
+ * @details Reading Temperature via ADT7320
+ */
+
+/******************************************************************************
+ *
+ * Copyright (C) 2024 Analog Devices, Inc. All Rights Reserved. This software
+ * is proprietary to Analog Devices, Inc. and its licensors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+
+/***** Includes *****/
+#include
+#include
+#include
+#include "mxc_device.h"
+#include "mxc_delay.h"
+#include "mxc_pins.h"
+#include "nvic_table.h"
+#include "uart.h"
+#include "spi.h"
+#include "led.h"
+#include "adt7320_driver.h"
+
+/***** Preprocessors *****/
+
+/***** Definitions *****/
+#define SPI_SPEED 10000 // Bit Rate
+#if defined(BOARD_FTHR)
+#define SPI MXC_SPI1
+#else
+#define SPI MXC_SPI0
+#endif
+
+/***** Globals *****/
+
+/***** Functions *****/
+
+int main(void)
+{
+ int retVal = E_NO_ERROR;
+ float temp_c = 0.0f;
+ float overTempLimit = 0.0f;
+ uint8_t hysValue = 0.0f;
+ uint8_t statusReg = 0x00;
+ uint8_t overTemp = 0x00;
+
+ printf("\n***************** ADT7320 Temperature Sensor Example *****************\n");
+ printf("This example reads the temperature data from ADT7320 temperature sensor\n");
+ printf("via SPI and write it to the terminal. \n");
+ printf("You will need to connect the ADT7320 sensor to the ");
+#if defined(BOARD_FTHR)
+ printf("SPI1 pins.\n\n");
+#else
+ printf("SPI0 pins.\n\n");
+#endif
+
+ printf("\n");
+
+#if defined(BOARD_FTHR)
+ MXC_GPIO_Config(&gpio_cfg_spi1_ss0);
+#else
+ MXC_GPIO_Config(&gpio_cfg_spi0_ss0a);
+#endif
+
+ retVal = MXC_SPI_Init(SPI, 1, 0, 1, 0, SPI_SPEED, MAP_A);
+ MXC_SPI_SetWidth(SPI, SPI_WIDTH_STANDARD);
+ MXC_SPI_SetMode(SPI, SPI_MODE_3);
+ if (retVal != E_NO_ERROR) {
+ printf("\nSPI INITIALIZATION ERROR\n");
+ return retVal;
+ }
+
+ MXC_Delay(MXC_DELAY_MSEC(500));
+
+ adt7320_init(SPI);
+ adt7320_SetADCResolution(ADC_RES_16);
+ adt7320_SetIntCtMode(COMPARATOR_MODE);
+ adt7320_SetOverTemperatureLimit(29.3);
+ adt7320_ReadOverTemperatureLimit(&overTempLimit);
+ printf("\nOver Temperature Limit Set to %.3f", (double)overTempLimit);
+ adt7320_SetHysteresisValue(1);
+ adt7320_ReadTHysteresisSetPoint(&hysValue);
+ printf("\nHysteresis Set to %d", hysValue);
+
+ printf("\n");
+ while (1) {
+ adt7320_ReadTemperature(&temp_c);
+ adt7320_ReadStatusRegister(&statusReg);
+
+ overTemp = (statusReg >> 5) & 0x01;
+
+ printf("\033[A");
+ printf("\nTemperature Value = %.3f, Over Temp. Flag: %d", (double)temp_c, overTemp);
+
+ MXC_Delay(MXC_DELAY_MSEC(500));
+ }
+}
diff --git a/Examples/MAX32665/ADT7320_TempMonitor/project.mk b/Examples/MAX32665/ADT7320_TempMonitor/project.mk
new file mode 100644
index 00000000000..032450c807b
--- /dev/null
+++ b/Examples/MAX32665/ADT7320_TempMonitor/project.mk
@@ -0,0 +1,18 @@
+# This file can be used to set build configuration
+# variables. These variables are defined in a file called
+# "Makefile" that is located next to this one.
+
+# For instructions on how to use this system, see
+# https://analog-devices-msdk.github.io/msdk/USERGUIDE/#build-system
+
+# **********************************************************
+
+# Add your config here!
+VPATH += $(LIBS_DIR)/MiscDrivers/TempSensor
+IPATH += $(LIBS_DIR)/MiscDrivers/TempSensor
+SRCS += adt7320_driver.c
+
+# If you have secure version of MCU (MAX32666), set SBT=1 to generate signed binary
+# For more information on how sing process works, see
+# https://www.analog.com/en/education/education-library/videos/6313214207112.html
+SBT=0
diff --git a/Libraries/Boards/MAX32665/EvKit_129B/examples.txt b/Libraries/Boards/MAX32665/EvKit_129B/examples.txt
index bff78c973e8..83b440a4614 100644
--- a/Libraries/Boards/MAX32665/EvKit_129B/examples.txt
+++ b/Libraries/Boards/MAX32665/EvKit_129B/examples.txt
@@ -1,4 +1,5 @@
ADC
+ADT7320_TempMonitor
AES
ARM-DSP/arm_bayes_example
ARM-DSP/arm_class_marks_example
diff --git a/Libraries/Boards/MAX32665/EvKit_129C/examples.txt b/Libraries/Boards/MAX32665/EvKit_129C/examples.txt
index bff78c973e8..83b440a4614 100644
--- a/Libraries/Boards/MAX32665/EvKit_129C/examples.txt
+++ b/Libraries/Boards/MAX32665/EvKit_129C/examples.txt
@@ -1,4 +1,5 @@
ADC
+ADT7320_TempMonitor
AES
ARM-DSP/arm_bayes_example
ARM-DSP/arm_class_marks_example
diff --git a/Libraries/Boards/MAX32665/EvKit_V1/examples.txt b/Libraries/Boards/MAX32665/EvKit_V1/examples.txt
index 0c3ae4c9f8a..573906413ea 100644
--- a/Libraries/Boards/MAX32665/EvKit_V1/examples.txt
+++ b/Libraries/Boards/MAX32665/EvKit_V1/examples.txt
@@ -1,4 +1,5 @@
ADC
+ADT7320_TempMonitor
AES
ARM-DSP/arm_bayes_example
ARM-DSP/arm_class_marks_example
diff --git a/Libraries/Boards/MAX32665/FTHR/examples.txt b/Libraries/Boards/MAX32665/FTHR/examples.txt
index 262b6334357..7ee4c0f0957 100644
--- a/Libraries/Boards/MAX32665/FTHR/examples.txt
+++ b/Libraries/Boards/MAX32665/FTHR/examples.txt
@@ -1,4 +1,5 @@
ADC
+ADT7320_TempMonitor
AES
ARM-DSP/arm_bayes_example
ARM-DSP/arm_class_marks_example
diff --git a/Libraries/Boards/MAX32665/FTHR2/examples.txt b/Libraries/Boards/MAX32665/FTHR2/examples.txt
index 4fd2e297b28..a0e5ed68cbc 100644
--- a/Libraries/Boards/MAX32665/FTHR2/examples.txt
+++ b/Libraries/Boards/MAX32665/FTHR2/examples.txt
@@ -1,4 +1,5 @@
ADC
+ADT7320_TempMonitor
AES
ARM-DSP/arm_bayes_example
ARM-DSP/arm_class_marks_example
diff --git a/Libraries/MiscDrivers/TempSensor/adt7320_driver.c b/Libraries/MiscDrivers/TempSensor/adt7320_driver.c
new file mode 100644
index 00000000000..7b1457a7d6e
--- /dev/null
+++ b/Libraries/MiscDrivers/TempSensor/adt7320_driver.c
@@ -0,0 +1,398 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2024 Analog Devices, Inc. All Rights Reserved. This software
+ * is proprietary to Analog Devices, Inc. and its licensors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+
+#include
+#include
+#include
+#include "spi.h"
+#include "mxc_device.h"
+#include "mxc_delay.h"
+#include "adt7320_driver.h"
+
+// clang-format off
+#define ADT7320_16BIT_NEG 16
+#define ADT7320_16BIT_SIGN 0x8000
+#define ADT7320_16BIT_DIV 128
+#define ADT7320_13BIT_NEG 13
+#define ADT7320_13BIT_SIGN 0x1000
+#define ADT7320_13BIT_DIV 16
+// clang-format on
+
+static mxc_spi_req_t spi_req;
+
+static int adt7320_WriteRegister(uint8_t addr, uint8_t *txBuffer, uint8_t len);
+static int adt7320_ReadRegister(uint8_t addr, uint8_t *rxBuffer, uint8_t expectedLen);
+
+int adt7320_init(mxc_spi_regs_t *spi)
+{
+ uint8_t ID;
+
+ if (!spi)
+ return E_NULL_PTR;
+
+ spi_req.spi = spi;
+
+ if (adt7320_ReadID(&ID) != E_NO_ERROR) {
+ printf("\n\nCommunication Error!");
+ return E_COMM_ERR;
+ }
+ if (ID != ADT7320_DEVICE_ID) {
+ printf("\n\nSensor ID Error Expected: 0xC3, Read: 0x%02x\n", ID);
+ return E_COMM_ERR;
+ }
+ return E_NO_ERROR;
+}
+
+int adt7320_SetFaultQueue(ad7320_FaultQueue_t value)
+{
+ uint8_t registerValue = 0;
+
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ if (adt7320_ReadRegister(ADT7320_01_CONFIGURATION, ®isterValue, 1) != E_NO_ERROR) {
+ return E_COMM_ERR;
+ }
+
+ registerValue &= ~ADT7320_CONFIG_FAULT_QUEUE(FAULT_QUEUE_4);
+ registerValue |= ADT7320_CONFIG_FAULT_QUEUE(value);
+
+ return adt7320_WriteRegister(ADT7320_01_CONFIGURATION, ®isterValue, 1);
+}
+
+int adt7320_SetCTPolarity(ad7320_PinPolarity_t value)
+{
+ uint8_t registerValue = 0;
+
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ if (adt7320_ReadRegister(ADT7320_01_CONFIGURATION, ®isterValue, 1) != E_NO_ERROR) {
+ return E_COMM_ERR;
+ }
+
+ registerValue &= ~(0x01 << ADT7320_CONFIG_CT_POL_POS);
+ registerValue |= (value << ADT7320_CONFIG_CT_POL_POS);
+
+ return adt7320_WriteRegister(ADT7320_01_CONFIGURATION, ®isterValue, 1);
+}
+
+int adt7320_SetIntPolarity(ad7320_PinPolarity_t value)
+{
+ uint8_t registerValue = 0;
+
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ if (adt7320_ReadRegister(ADT7320_01_CONFIGURATION, ®isterValue, 1) != E_NO_ERROR) {
+ return E_COMM_ERR;
+ }
+
+ registerValue &= ~(0x01 << ADT7320_CONFIG_INT_POL_POS);
+ registerValue |= (value << ADT7320_CONFIG_INT_POL_POS);
+
+ return adt7320_WriteRegister(ADT7320_01_CONFIGURATION, ®isterValue, 1);
+}
+
+int adt7320_SetIntCtMode(ad7320_IntCtMode_t value)
+{
+ uint8_t registerValue = 0;
+
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ if (adt7320_ReadRegister(ADT7320_01_CONFIGURATION, ®isterValue, 1) != E_NO_ERROR) {
+ return E_COMM_ERR;
+ }
+
+ registerValue &= ~(0x01 << ADT7320_CONFIG_INT_CT_MODE_POS);
+ registerValue |= (value << ADT7320_CONFIG_INT_CT_MODE_POS);
+
+ return adt7320_WriteRegister(ADT7320_01_CONFIGURATION, ®isterValue, 1);
+}
+
+int adt7320_SetOperationMode(ad7320_OperationMode_t value)
+{
+ uint8_t registerValue = 0;
+
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ if (adt7320_ReadRegister(ADT7320_01_CONFIGURATION, ®isterValue, 1) != E_NO_ERROR) {
+ return E_COMM_ERR;
+ }
+
+ registerValue &= ~ADT7320_CONFIG_OP_MODE(MODE_SHUTDOWN);
+ registerValue |= ADT7320_CONFIG_OP_MODE(value);
+
+ return adt7320_WriteRegister(ADT7320_01_CONFIGURATION, ®isterValue, 1);
+}
+
+int adt7320_SetADCResolution(adt7320_adc_resolution_t value)
+{
+ uint8_t registerValue = 0;
+
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ if (adt7320_ReadRegister(ADT7320_01_CONFIGURATION, ®isterValue, 1) != E_NO_ERROR) {
+ return E_COMM_ERR;
+ }
+
+ registerValue &= ~(0x01 << ADT7320_CONFIG_RESOLUTION_POS);
+ registerValue |= (value << ADT7320_CONFIG_RESOLUTION_POS);
+
+ return adt7320_WriteRegister(ADT7320_01_CONFIGURATION, ®isterValue, 1);
+}
+
+int adt7320_SetHysteresisValue(uint8_t value)
+{
+ uint8_t registerValue = 0;
+
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ registerValue = value & 0x0F;
+
+ return adt7320_WriteRegister(ADT7320_05_THYST_SETPOINT, ®isterValue, 1);
+}
+
+int adt7320_SetOverTemperatureLimit(float value)
+{
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ float resolution = 0.0078;
+ int rawValue = (int)(value / resolution);
+ uint16_t registerValue = (uint16_t)rawValue;
+ uint8_t reg[2] = { 0 };
+
+ reg[0] = registerValue >> 8;
+ reg[1] = registerValue & 0xFF;
+
+ return adt7320_WriteRegister(ADT7320_06_THIGH_SETPOINT, reg, 2);
+}
+
+int adt7320_SetCriticalOverTemperatureLimit(float value)
+{
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ float resolution = 0.0078;
+ int rawValue = (int)(value / resolution);
+ uint16_t registerValue = (uint16_t)rawValue;
+ uint8_t reg[2] = { 0 };
+
+ reg[0] = registerValue >> 8;
+ reg[1] = registerValue & 0xFF;
+
+ return adt7320_WriteRegister(ADT7320_04_TCRIT_SETPOINT, reg, 2);
+}
+
+int adt7320_SetUnderTemperatureLimit(float value)
+{
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ float resolution = 0.0078;
+ int rawValue = (int)(value / resolution);
+ uint16_t registerValue = (uint16_t)rawValue;
+ uint8_t reg[2] = { 0 };
+
+ reg[0] = registerValue >> 8;
+ reg[1] = registerValue & 0xFF;
+
+ return adt7320_WriteRegister(ADT7320_07_TLOW_SETPOINT, reg, 2);
+}
+
+int adt7320_ReadStatusRegister(uint8_t *reg)
+{
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ return adt7320_ReadRegister(ADT7320_00_STATUS, reg, 1);
+}
+
+int adt7320_ReadTemperature(float *temperature)
+{
+ uint8_t buf[2] = { 0 };
+ uint16_t temp = 0;
+ uint8_t config = 0;
+ float temp_c = 0;
+
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ if (adt7320_ReadConfigurationRegister(&config) != E_NO_ERROR)
+ return E_COMM_ERR;
+
+ if (adt7320_ReadRegister(0x02, buf, 2) != E_NO_ERROR)
+ return E_COMM_ERR;
+
+ temp |= (buf[0] << 8) | buf[1];
+
+ if ((config >> ADT7320_CONFIG_RESOLUTION_POS) == 1) {
+ if (temp & ADT7320_16BIT_SIGN)
+ /*! Negative temperature */
+ temp_c = (float)((int32_t)temp - ADT7320_16BIT_NEG) / ADT7320_16BIT_DIV;
+ else
+ /*! Positive temperature */
+ temp_c = (float)temp / ADT7320_16BIT_DIV;
+ } else {
+ temp >>= 3;
+ if (temp & ADT7320_13BIT_SIGN)
+ /*! Negative temperature */
+ temp_c = (float)((int32_t)temp - ADT7320_13BIT_NEG) / ADT7320_13BIT_DIV;
+ else
+ /*! Positive temperature */
+ temp_c = (float)temp / ADT7320_13BIT_DIV;
+ }
+
+ *temperature = temp_c;
+
+ return E_NO_ERROR;
+}
+
+int adt7320_ReadConfigurationRegister(uint8_t *reg)
+{
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ return adt7320_ReadRegister(ADT7320_01_CONFIGURATION, reg, 1);
+}
+
+int adt7320_ReadID(uint8_t *ID)
+{
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ return adt7320_ReadRegister(ADT7320_03_ID, ID, 1);
+}
+
+int adt7320_ReadCriticalOverTemperatureLimit(float *value)
+{
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ float resolution = 0.0078;
+ uint16_t regValue = 0;
+ uint8_t reg[2] = { 0 };
+
+ if (adt7320_ReadRegister(ADT7320_04_TCRIT_SETPOINT, reg, 2) != E_NO_ERROR) {
+ return E_COMM_ERR;
+ }
+
+ regValue |= (reg[0] << 8) | reg[1];
+
+ *value = ((float)regValue * resolution);
+ return E_NO_ERROR;
+}
+
+int adt7320_ReadOverTemperatureLimit(float *value)
+{
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ float resolution = 0.0078;
+ uint16_t regValue = 0;
+ uint8_t reg[2] = { 0 };
+
+ if (adt7320_ReadRegister(ADT7320_06_THIGH_SETPOINT, reg, 2) != E_NO_ERROR) {
+ return E_COMM_ERR;
+ }
+ regValue |= (reg[0] << 8) | reg[1];
+ *value = ((float)regValue * resolution);
+ return E_NO_ERROR;
+}
+
+int adt7320_ReadLowTemperatureLimit(float *value)
+{
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ float resolution = 0.0078;
+ uint16_t regValue = 0;
+ uint8_t reg[2] = { 0 };
+
+ if (adt7320_ReadRegister(ADT7320_07_TLOW_SETPOINT, reg, 2) != E_NO_ERROR) {
+ return E_COMM_ERR;
+ }
+ regValue |= (reg[0] << 8) | reg[1];
+ *value = ((float)regValue * resolution);
+ return E_NO_ERROR;
+}
+
+int adt7320_ReadTHysteresisSetPoint(uint8_t *value)
+{
+ if (spi_req.spi == NULL)
+ return E_NULL_PTR;
+
+ return adt7320_ReadRegister(ADT7320_05_THYST_SETPOINT, value, 1);
+}
+
+static int adt7320_ReadRegister(uint8_t addr, uint8_t *rxBuffer, uint8_t expectedLen)
+{
+ int ret = E_NO_ERROR;
+ uint8_t cmd = 0x00;
+ uint8_t sendData[3] = { 0 };
+ uint8_t recData[3] = { 0 };
+
+ memset(sendData, 0xFF, sizeof(sendData));
+
+ cmd |= 0x01 << 6;
+ cmd |= addr << 3;
+
+ sendData[0] = cmd;
+
+ spi_req.txData = sendData;
+ spi_req.rxData = recData;
+ spi_req.txLen = expectedLen + 1;
+ spi_req.rxLen = expectedLen + 1;
+ spi_req.ssIdx = 0;
+ spi_req.ssDeassert = 1;
+ spi_req.txCnt = 0;
+ spi_req.rxCnt = 0;
+
+ MXC_SPI_SetDataSize(spi_req.spi, 8);
+ ret = MXC_SPI_MasterTransaction(&spi_req);
+ if (ret == E_NO_ERROR) {
+ memcpy(rxBuffer, &recData[1], expectedLen);
+ }
+ return ret;
+}
+
+static int adt7320_WriteRegister(uint8_t addr, uint8_t *txBuffer, uint8_t len)
+{
+ uint8_t sendData[5] = { 0 };
+
+ sendData[0] = addr << 3;
+ memcpy(&sendData[1], txBuffer, len);
+
+ spi_req.txData = sendData;
+ spi_req.rxData = NULL;
+ spi_req.txLen = len + 1;
+ spi_req.rxLen = 0;
+ spi_req.ssIdx = 0;
+ spi_req.ssDeassert = 1;
+ spi_req.txCnt = 0;
+ spi_req.rxCnt = 0;
+
+ MXC_SPI_SetDataSize(spi_req.spi, 8);
+ return MXC_SPI_MasterTransaction(&spi_req);
+}
diff --git a/Libraries/MiscDrivers/TempSensor/adt7320_driver.h b/Libraries/MiscDrivers/TempSensor/adt7320_driver.h
new file mode 100644
index 00000000000..4b1acf39845
--- /dev/null
+++ b/Libraries/MiscDrivers/TempSensor/adt7320_driver.h
@@ -0,0 +1,241 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2024 Analog Devices, Inc. All Rights Reserved. This software
+ * is proprietary to Analog Devices, Inc. and its licensors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************************/
+
+#ifndef LIBRARIES_MISCDRIVERS_TEMPSENSOR_ADT7320_DRIVER_H_
+#define LIBRARIES_MISCDRIVERS_TEMPSENSOR_ADT7320_DRIVER_H_
+
+#include "spi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ADT7320 registers */
+#define ADT7320_00_STATUS 0x00
+#define ADT7320_01_CONFIGURATION 0x01
+#define ADT7320_02_TEMPERATURE_VALUE 0x02
+#define ADT7320_03_ID 0x03
+#define ADT7320_04_TCRIT_SETPOINT 0x04
+#define ADT7320_05_THYST_SETPOINT 0x05
+#define ADT7320_06_THIGH_SETPOINT 0x06
+#define ADT7320_07_TLOW_SETPOINT 0x07
+
+/* ADT7320_REG_STATUS definition */
+#define ADT7320_STATUS_T_LOW (1 << 4)
+#define ADT7320_STATUS_T_HIGH (1 << 5)
+#define ADT7320_STATUS_T_CRIT (1 << 6)
+#define ADT7320_STATUS_RDY (1 << 7)
+
+/* ADT7320_REG_CONFIG definition */
+#define ADT7320_CONFIG_FAULT_QUEUE(x) (x & 0x3)
+#define ADT7320_CONFIG_CT_POL_POS (2)
+#define ADT7320_CONFIG_INT_POL_POS (3)
+#define ADT7320_CONFIG_INT_CT_MODE_POS (4)
+#define ADT7320_CONFIG_OP_MODE(x) ((x & 0x3) << 5)
+#define ADT7320_CONFIG_RESOLUTION_POS (7)
+
+/* ADT7320 device ID */
+#define ADT7320_DEVICE_ID 0xC3
+
+typedef enum _ADC_RESOLUTION { ADC_RES_13, ADC_RES_16 } adt7320_adc_resolution_t;
+
+typedef enum _FAULT_QUEUE {
+ FAULT_QUEUE_1 = 0x0,
+ FAULT_QUEUE_2,
+ FAULT_QUEUE_3,
+ FAULT_QUEUE_4
+} ad7320_FaultQueue_t;
+
+typedef enum _PIN_POLARITY { ACTIVE_LOW = 0x0, ACTIVE_HIGH } ad7320_PinPolarity_t;
+
+typedef enum _INT_MODE { INTERRUPT_MODE = 0x0, COMPARATOR_MODE } ad7320_IntCtMode_t;
+
+typedef enum _OPERATION_MODE {
+ MODE_CONTINUOUS_CONVERSION = 0x0,
+ MODE_ONE_SHOT,
+ MODE_1_SPS,
+ MODE_SHUTDOWN
+} ad7320_OperationMode_t;
+
+/**
+ * @brief Initialize ADT7320 Temperature Sensor
+ *
+ * @details Initialized the ADT7320 Temperature sensor.
+ *
+ * @param spi SPI instance for communication with sensor
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_init(mxc_spi_regs_t *spi);
+
+/**
+ * @brief Sets the fault queue
+ *
+ * @details This setting sets the number of undertemperature/overtemperature faults that can
+ * occur before setting the INT and CT pins. This helps to avoid false triggering due to
+ * temperature noise.
+ *
+ * @param value Fault queue value
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_SetFaultQueue(ad7320_FaultQueue_t value);
+
+/**
+ * @brief Sets the CT pin polarity
+ *
+ * @param value CT pin polarity value
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_SetCTPolarity(ad7320_PinPolarity_t value);
+
+/**
+ * @brief Sets the INT pin polarity
+ *
+ * @param value INT pin polarity value
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_SetIntPolarity(ad7320_PinPolarity_t value);
+
+/**
+ * @brief Sets the Interrupt or Comparator mode
+ *
+ * @param value Mode value
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_SetIntCtMode(ad7320_IntCtMode_t value);
+
+/**
+ * @brief Sets the operation mode
+ *
+ * @param value Operation mode value
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_SetOperationMode(ad7320_OperationMode_t value);
+
+/**
+ * @brief Sets the ADC Resolution
+ *
+ * @param value ADC resolution value
+ * 13-bit resolution: Sign bit + 12 bits gives a temperature resolution of 0.0625°C
+ * 16-bit resolution. Sign bit + 15 bits gives a temperature resolution of 0.0078°C.
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_SetADCResolution(adt7320_adc_resolution_t value);
+
+/**
+ * @brief Sets the hysteresis value
+ *
+ * @param value Hysteresis value, from 0°C to 15°C. Stored in straight binary format.
+ * The default setting is 5°C.
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_SetHysteresisValue(uint8_t value);
+
+/**
+ * @brief Sets the Critical Over Temperature limit
+ *
+ * @param value 16-bit critical overtemperature limit, stored in twos complement format
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_SetOverTemperatureLimit(float value);
+
+/**
+ * @brief Sets the Over Temperature limit
+ *
+ * @param value 16-bit overtemperature limit, stored in twos complement format
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_SetCriticalOverTemperatureLimit(float value);
+
+/**
+ * @brief Sets the Under Temperature limit
+ *
+ * @param value 16-bit undertemperature limit, stored in twos complement format
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_SetUnderTemperatureLimit(float value);
+
+/**
+ * @brief Reads the Temperature value
+ *
+ * @param value Pointer to write temperature value
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_ReadTemperature(float *temperature);
+
+/**
+ * @brief Reads the Status register value
+ *
+ * @param value Pointer to write status register value
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_ReadStatusRegister(uint8_t *reg);
+
+/**
+ * @brief Reads the Configuration register value
+ *
+ * @param value Pointer to write configuration register value
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_ReadConfigurationRegister(uint8_t *reg);
+
+/**
+ * @brief Reads the Device ID register value
+ *
+ * @param value Pointer to write Device ID register value
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_ReadID(uint8_t *ID);
+
+/**
+ * @brief Reads the Critical Over Temperature limit
+ *
+ * @param value Pointer to write Critical Over Temperature limit
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_ReadCriticalOverTemperatureLimit(float *value);
+
+/**
+ * @brief Reads the Over Temperature limit
+ *
+ * @param value Pointer to write Over Temperature limit
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_ReadOverTemperatureLimit(float *value);
+
+/**
+ * @brief Reads the Low Temperature limit
+ *
+ * @param value Pointer to write Low Temperature limit
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_ReadLowTemperatureLimit(float *value);
+
+/**
+ * @brief Reads the Hysteresis value
+ *
+ * @param value Pointer to write Hysteresis value
+ * @return int #E_NO_ERROR if successful, @ref MXC_Error_Codes "error" if unsuccessful.
+ */
+int adt7320_ReadTHysteresisSetPoint(uint8_t *value);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // LIBRARIES_MISCDRIVERS_TEMPSENSOR_ADT7320_DRIVER_H_
diff --git a/Libraries/MiscDrivers/libinfo.json b/Libraries/MiscDrivers/libinfo.json
index 92aa2480c9b..22ebddaedf6 100644
--- a/Libraries/MiscDrivers/libinfo.json
+++ b/Libraries/MiscDrivers/libinfo.json
@@ -11,7 +11,8 @@
"PushButton",
"Touchscreen",
"CODEC",
- "SRAM"
+ "SRAM",
+ "TempSensor"
],
"vpaths":[
"ADC",
@@ -25,6 +26,7 @@
"Touchscreen",
"CODEC",
"SRAM",
+ "TempSensor",
"./"],
"whitelist":"False"
}