<?xml version="1.0" encoding="us-ascii"?><InstanceReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Version>2.2.0.25</Version><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios><ReportLongName>11301 - Disclosure - Commitments, Contingencies and Legal Matters</ReportLongName><DisplayLabelColumn>true</DisplayLabelColumn><ShowElementNames>false</ShowElementNames><RoundingOption /><HasEmbeddedReports>false</HasEmbeddedReports><Columns><Column><Id>1</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelColumn>false</LabelColumn><CurrencyCode /><FootnoteIndexer /><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios><MCU><KeyName>12/27/2010 - 3/27/2011
</KeyName><CurrencySymbol /><contextRef><ContextID>Duration_12_27_2010_To_3_27_2011</ContextID><EntitySchema>http://www.sec.gov/CIK</EntitySchema><EntityValue>0001322705</EntityValue><PeriodDisplayName /><PeriodType>duration</PeriodType><PeriodStartDate>2010-12-27T00:00:00</PeriodStartDate><PeriodEndDate>2011-03-27T00:00:00</PeriodEndDate><Segments /><Scenarios /></contextRef><UPS /><CurrencyCode /><OriginalCurrencyCode /></MCU><CurrencySymbol /><Labels><Label Id="1" Label="3 Months Ended" /><Label Id="2" Label="Mar. 27, 2011" /></Labels></Column></Columns><Rows><Row><Id>2</Id><IsAbstractGroupTitle>true</IsAbstractGroupTitle><Level>0</Level><ElementName>code_CommitmentsAndContingenciesDisclosureAbstract</ElementName><ElementPrefix>code</ElementPrefix><IsBaseElement>false</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><ShortDefinition>Commitments and Contingencies Disclosure [Abstract]</ShortDefinition><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsSubReportEnd>false</IsSubReportEnd><IsCalendarTitle>false</IsCalendarTitle><IsTuple>false</IsTuple><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><PreferredLabelRole /><FootnoteIndexer /><Cells><Cell><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText /><NonNumericTextHeader /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios></Cell></Cells><OriginalInstanceReportColumns /><Unit>Other</Unit><ElementDataType>xbrli:stringItemType</ElementDataType><SimpleDataType>string</SimpleDataType><ElementDefenition>Commitments and Contingencies Disclosure [Abstract]</ElementDefenition><IsTotalLabel>false</IsTotalLabel><IsEPS>false</IsEPS><Label>Commitments, Contingencies and Legal Matters</Label></Row><Row><Id>3</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><Level>0</Level><ElementName>us-gaap_CommitmentsAndContingenciesDisclosureTextBlock</ElementName><ElementPrefix>us-gaap</ElementPrefix><IsBaseElement>true</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><ShortDefinition>No definition available.</ShortDefinition><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsSubReportEnd>false</IsSubReportEnd><IsCalendarTitle>false</IsCalendarTitle><IsTuple>false</IsTuple><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><PreferredLabelRole>terselabel</PreferredLabelRole><FootnoteIndexer /><Cells><Cell><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText>&lt;div&gt;

&lt;p style="margin-top: 18px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;&lt;b&gt;13. Commitments, Contingencies and Legal Matters &lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 6px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;&lt;b&gt;Purchase Commitments &lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 6px; text-indent: 32px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;The Company maintains purchase commitments with certain suppliers, primarily for inventory and some nonproduction items. Purchase commitments for inventory materials are generally restricted to a forecasted time horizon as mutually agreed upon between the parties. This forecasted time horizon can vary for different suppliers. As of March&amp;nbsp;27, 2011, the total purchase commitments were $205.1 million, which are due through 2015. &lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 18px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;&lt;b&gt;Guarantees &lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 6px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;&lt;b&gt;&lt;i&gt;Product Warranties &lt;/i&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 6px; text-indent: 32px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;The Company generally offers a one-year limited warranty for its Flash memory products. Refer to Footnote 8 for further details relating to changes in the Company's liability for product warranty. &lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 18px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;&lt;b&gt;&lt;i&gt;Indemnities &lt;/i&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 6px; text-indent: 32px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;During the normal course of business, the Company makes certain indemnities and commitments under which it may be required to make payments in relation to certain transactions. These indemnities include non-infringement of patents and intellectual property, indemnities to our customers in connection with the delivery, design, manufacture and sale of our products, indemnities to our directors and officers in connection with legal proceedings, indemnities to various lessors in connection with facility leases for certain claims arising from such facility or lease, and indemnities to other parties to certain acquisition agreements. The duration of these indemnities and commitments varies, and in certain cases, is indefinite. The Company believes that substantially all of our indemnities and commitments provide for limitations on the maximum potential future payments it is obligated to make. However, the Company is unable to estimate the maximum amount of liability related to our indemnities and commitments because such liabilities are contingent upon the occurrence of events which are not reasonably determinable. Management believes that any liability for these indemnities and commitments would not be material to our accompanying condensed consolidated financial statements. &lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 0px; margin-bottom: 0px;"&gt; &lt;/p&gt;

&lt;p style="margin-top: 18px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;&lt;b&gt;&lt;i&gt;Uncertain Tax Positions &lt;/i&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 6px; text-indent: 32px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;As of March&amp;nbsp;27, 2011, the liability for uncertain tax positions was $19.3 million including interest and penalties. Due to the high degree of uncertainty regarding the timing of potential future cash flows associated with these liabilities, the Company is unable to make a reasonably reliable estimate of the amount and period in which these liabilities might be paid. &lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 18px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;&lt;b&gt;Legal Matters &lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 6px; text-indent: 32px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;For a complete description of the procedural history of each of the legal proceedings referred to below, please see our Annual Report on Form 10-K for the fiscal year ended December&amp;nbsp;26, 2010. &lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 18px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;&lt;b&gt;&lt;i&gt;Tessera ITC Action &lt;/i&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 6px; text-indent: 32px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;On February&amp;nbsp;4, 2011, Spansion, Freescale Semiconductor, Inc., ATI Technologies, ULC, STMicroelectronics N.V. and Qualcomm Incorporated (collectively, the "Appellants") filed with the Federal Circuit a request for a rehearing. On March&amp;nbsp;29, 2011, the Federal Circuit denied the Appellants' request for a rehearing. &lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 18px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;&lt;b&gt;&lt;i&gt;Spansion v. Samsung District Court Action &lt;/i&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 6px; text-indent: 32px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;The action is presently scheduled for trial on February&amp;nbsp;6, 2012 and discovery is underway. The U.S. Bankruptcy Court has set a reserve of approximately $75 million for any pre-petition damages that Samsung may have for its counterclaims. &lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 18px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;&lt;b&gt;&lt;i&gt;Samsung v. Spansion ITC Investigation &lt;/i&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="margin-top: 6px; text-indent: 32px; margin-bottom: 0px;"&gt;&lt;font style="font-family: Times New Roman;" class="_mt" size="2"&gt;On February 28, 2011, an Initial Determination was issued finding infringement by Spansion, D-Link Corporation and D-Link Systems, Inc. On March 14, 2011, Spansion and the Commission's investigative attorney filed petitions for the ITC to review the Initial Determination. On April 29, 2011, the ITC issued a notice of its decision to review the Initial Determination. &lt;/font&gt;&lt;/p&gt; &lt;/div&gt;</NonNumbericText><NonNumericTextHeader>13. Commitments, Contingencies and Legal Matters

Purchase Commitments

The Company maintains purchase commitments with certain suppliers, primarily for</NonNumericTextHeader><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios></Cell></Cells><OriginalInstanceReportColumns /><Unit>Other</Unit><ElementDataType>us-types:textBlockItemType</ElementDataType><SimpleDataType>string</SimpleDataType><ElementDefenition>Includes disclosure of commitments and contingencies. This element may be used as a single block of text to encapsulate the entire disclosure including data and tables.</ElementDefenition><ElementReferences>Reference 1: http://www.xbrl.org/2003/role/presentationRef
 -Publisher FASB
 -Name FASB Interpretation (FIN)
 -Number 14
 -Paragraph 3

Reference 2: http://www.xbrl.org/2003/role/presentationRef
 -Publisher FASB
 -Name Statement of Financial Accounting Standard (FAS)
 -Number 5
 -Paragraph 9, 10, 11, 12

</ElementReferences><IsTotalLabel>false</IsTotalLabel><IsEPS>false</IsEPS><Label>Commitments, Contingencies and Legal Matters</Label></Row></Rows><Footnotes /><NumberOfCols>1</NumberOfCols><NumberOfRows>2</NumberOfRows><ReportName>Commitments, Contingencies and Legal Matters</ReportName><MonetaryRoundingLevel>UnKnown</MonetaryRoundingLevel><SharesRoundingLevel>UnKnown</SharesRoundingLevel><PerShareRoundingLevel>UnKnown</PerShareRoundingLevel><ExchangeRateRoundingLevel>UnKnown</ExchangeRateRoundingLevel><HasCustomUnits>false</HasCustomUnits><SharesShouldBeRounded>true</SharesShouldBeRounded></InstanceReport>
