Files
KSDK_2.0_MK22FN512xxx12/docs/Kinetis SDK v.2.0 API Reference Manual/group__lmem__cache.html
2016-08-09 18:06:35 +02:00

798 lines
54 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Kinetis SDK v.2.0 API Reference Manual: LMEM: Local Memory Controller Cache Control Driver</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="fs_logo.gif"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">Kinetis SDK v.2.0 API Reference Manual
&#160;<span id="projectnumber">Rev. 0</span>
</div>
<div id="projectbrief">Freescale Semiconductor, Inc.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>API&#160;Reference</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__lmem__cache.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#files">Files</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> </div>
<div class="headertitle">
<div class="title">LMEM: Local Memory Controller Cache Control Driver</div> </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<p>The KSDK provides a peripheral driver for the Local Memory Controller Cache Controller module of Kinetis devices.</p>
<h1><a class="anchor" id="LMEMDescrip"></a>
Descriptions</h1>
<p>The LMEM Cache peripheral driver allows the user to enable/disable the cache and to perform cache maintenance operations such as invalidate, push, and clear. These maintenance operations may be performed on the Processor Code (PC) bus or Both Processor Code (PC) and Processor System (PS) bus.</p>
<p>The Kinetis devices contain a Processor Code (PC) bus and a Processor System (PS) bus: The Processor Code (PC) bus - a 32-bit address space bus with low-order addresses (0x0000_0000 through 0x1FFF_FFFF) used normally for code access. The Processor System (PS) bus - a 32-bit address space bus with high-order addresses (0x2000_0000 through 0xFFFF_FFFF) used normally for data accesses.</p>
<p>Some Kinetic MCU devices have caches available for the PC bus and PS bus, others may only have a PC bus cache, while some do not have PC or PS caches at all. See the appropriate Kinetis reference manual for cache availability.</p>
<p>Cache maintenance operations:</p>
<div> <table class="doxtable">
<tr>
<td colspan="1" align="center" bgcolor="#2E9AFE">command </td><td colspan="1" align="center" bgcolor="#2E9AFE">description </td></tr>
<tr>
<th align="center">Invalidate </th><td align="left">Unconditionally clear valid and modify bits of a cache entry. </td></tr>
<tr>
<th align="center">Push </th><td align="left">Push a cache entry if it is valid and modified, then clear the modify bit. If entry is not valid or not modified, leave as is. A cache push is synonymous with a cache flush. </td></tr>
<tr>
<th align="center">Clear </th><td align="left">Push a cache entry if it is valid and modified, then clear the valid and modify bits. If entry is not valid or not modified, clear the valid bit. </td></tr>
</table>
</div><p>The above cache maintenance operations may be performed on the entire cache or on a line-basis. The peripheral driver API names distinguish between the two using the terms "All" or Line".</p>
<h1><a class="anchor" id="LMEMCacheFunGrps"></a>
Function groups</h1>
<h2><a class="anchor" id="LMEMCodeBusCacheControl"></a>
Local Memory Processor Code Bus Cache Control</h2>
<p>The invalidate command can be performed on the entire cache, one line and multiple lines by calling <a class="el" href="group__lmem__cache.html#ga181ac89141e61050cfc032efaf45b2c2" title="Invalidates the processor code bus cache. ">LMEM_CodeCacheInvalidateAll()</a>, <a class="el" href="group__lmem__cache.html#ga750774c1b0e082ee3f405207941f7cf6" title="Invalidates a specific line in the processor code bus cache. ">LMEM_CodeCacheInvalidateLine()</a>, and <a class="el" href="group__lmem__cache.html#gab98f2c4473e833fbbf357ccffec3ff1f" title="Invalidates multiple lines in the processor code bus cache. ">LMEM_CodeCacheInvalidateMultiLines()</a>.</p>
<p>The push command can be performed on the entire cache, one line and multiple lines by calling <a class="el" href="group__lmem__cache.html#ga230b22ba46c4d5c60ae37c9cc201b40d" title="Pushes all modified lines in the processor code bus cache. ">LMEM_CodeCachePushAll()</a>, <a class="el" href="group__lmem__cache.html#ga5058349ee0774fc2af503986ea65e798" title="Pushes a specific modified line in the processor code bus cache. ">LMEM_CodeCachePushLine()</a>, and <a class="el" href="group__lmem__cache.html#ga2c3d306975555463b581746b7fbfd86b" title="Pushes multiple modified lines in the processor code bus cache. ">LMEM_CodeCachePushMultiLines()</a>.</p>
<p>The clear command can be performed on the entire cache, one line and multiple lines by calling <a class="el" href="group__lmem__cache.html#ga3768011d4d7ac9b228eae28fae8f8989" title="Clears the processor code bus cache. ">LMEM_CodeCacheClearAll()</a>, <a class="el" href="group__lmem__cache.html#gae90ade5b09656d898f5a3a1edec8864c" title="Clears a specific line in the processor code bus cache. ">LMEM_CodeCacheClearLine()</a>, and <a class="el" href="group__lmem__cache.html#gacabe403fb94aa540a676333355f85fc0" title="Clears multiple lines in the processor code bus cache. ">LMEM_CodeCacheClearMultiLines()</a>.</p>
<p>Note that the parameter "address" must be supplied which indicates the physical address of the line you wish to perform the one line cache maintenance operation. In addition, the length the number of bytes should be supplied for multiple lines operation. The function determines if the length meets or exceeds 1/2 the cache size because the cache contains 2 WAYs, half of the cache is in WAY0 and the other half in WAY1 and if so, performs a cache maintenance "all" operation which is faster than performing the cache maintenance on a line-basis.</p>
<p>Cache Demotion: Cache region demotion - Demoting the cache mode reduces the cache function applied to a memory region from write-back to write-through to non-cacheable. The cache region demote function checks to see if the requested cache mode is higher than or equal to the current cache mode, and if so, returns an error. After a region is demoted, its cache mode can only be raised by a reset, which returns it to its default state. To demote a cache region, call the <a class="el" href="group__lmem__cache.html#ga8e2d695e7cd7c103eed501176e12770b" title="Demotes the cache mode of a region in processor code bus cache. ">LMEM_CodeCacheDemoteRegion()</a>.</p>
<p>Note that the address region assignment of the 16 subregions is device-specific and is detailed in the Chip Configuration section of the SoC Kinetis reference manual. The LMEM provides typedef enums for each of the 16 regions, starting with "kLMEM_CacheRegion0" and ending with "kLMEM_CacheRegion15". The parameter cacheMode is of type lmem_cache_mode_t. This provides typedef enums for each of the cache modes, such as "kLMEM_CacheNonCacheable", "kLMEM_CacheWriteThrough", and "kLMEM_CacheWriteBack".</p>
<p>Cache Enable and Disable: The cache enable function enables the PC bus cache and the write buffer. However, before enabling these, the function first performs an invalidate all. The user should call <a class="el" href="group__lmem__cache.html#ga9fd3f219c41f48b2dcf83cb8c84ca5df" title="Enables/disables the processor code bus cache. ">LMEM_EnableCodeCache()</a> to enable a particular bus cache.</p>
<h2><a class="anchor" id="LMEMSysBusCacheControl"></a>
Local Memory Processor System Bus Cache Control</h2>
<p>The invalidate command can be performed on the entire cache, one line and multiple lines by calling LMEM_SystemCacheInvalidateAll(), LMEM_SystemCacheInvalidateLine(), and LMEM_SystemCacheInvalidateMultiLines().</p>
<p>The push command can be performed on the entire cache, one line and multiple lines by calling LMEM_SystemCachePushAll(), LMEM_SystemCachePushLine(), and LMEM_SystemCachePushMultiLines().</p>
<p>The clear command can be performed on the entire cache, one line and multiple lines by calling LMEM_SystemCacheClearAll(), LMEM_SystemCacheClearLine(), and LMEM_SystemCacheClearMultiLines().</p>
<p>Note that the parameter "address" must be supplied, which indicates the physical address of the line you wish to perform the one line cache maintenance operation. In addition, the length the number of bytes should be supplied for multiple lines operation. The function determines if the length meets or exceeds 1/2 the cache size because the cache contains 2 WAYs, half of the cache is in WAY0 and the other half in WAY1 and if so, performs a cache maintenance "all" operation which is faster than performing the cache maintenance on a line-basis.</p>
<p>Cache Demotion: Cache region demotion - Demoting the cache mode reduces the cache function applied to a memory region from write-back to write-through to non-cacheable. The cache region demote function checks to see if the requested cache mode is higher than or equal to the current cache mode, and if so, returns an error. After a region is demoted, its cache mode can only be raised by a reset, which returns it to its default state. To demote a cache region, call the LMEM_SystemCacheDemoteRegion().</p>
<p>Note that the address region assignment of the 16 subregions is device-specific and is detailed in the Chip Configuration section of the Kinetis SoC reference manual. The LMEM provides typedef enums for each of the 16 regions, starting with "kLMEM_CacheRegion0" and ending with "kLMEM_CacheRegion15". The parameter cacheMode is of type lmem_cache_mode_t. This provides typedef enums for each of the cache modes, such as "kLMEM_CacheNonCacheable", "kLMEM_CacheWriteThrough", and "kLMEM_CacheWriteBack".</p>
<p>Cache Enable and Disable: The cache enable function enables the PS bus cache and the write buffer. However, before enabling these, the function first performs an invalidate all. The user should call LMEM_EnableSystemCache() to enable a particular bus cache. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:fsl__lmem__cache_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fsl__lmem__cache_8h.html">fsl_lmem_cache.h</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gab15785d98d8873207f708e46aab35306"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#gab15785d98d8873207f708e46aab35306">LMEM_CACHE_LINE_SIZE</a>&#160;&#160;&#160;(0x10U)</td></tr>
<tr class="memdesc:gab15785d98d8873207f708e46aab35306"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cache line is 16-bytes. <a href="#gab15785d98d8873207f708e46aab35306">More...</a><br/></td></tr>
<tr class="separator:gab15785d98d8873207f708e46aab35306"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga915a068b47d97bfc70628571bc24e777"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#ga915a068b47d97bfc70628571bc24e777">LMEM_CACHE_SIZE_ONEWAY</a>&#160;&#160;&#160;(4096U)</td></tr>
<tr class="memdesc:ga915a068b47d97bfc70628571bc24e777"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cache size is 4K-bytes one way. <a href="#ga915a068b47d97bfc70628571bc24e777">More...</a><br/></td></tr>
<tr class="separator:ga915a068b47d97bfc70628571bc24e777"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga09096baa68dd9ae3de591d60f6011996"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#ga09096baa68dd9ae3de591d60f6011996">lmem_cache_mode_t</a> { <br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga09096baa68dd9ae3de591d60f6011996a2fcebcb37f55c9d2c561cf329eb96626">kLMEM_NonCacheable</a> = 0x0U,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga09096baa68dd9ae3de591d60f6011996a8eb97a4de64ce57df954c0b9b0f4adef">kLMEM_CacheWriteThrough</a> = 0x2U,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga09096baa68dd9ae3de591d60f6011996a112b9b26738baa2a1084f0c2ba3c58ba">kLMEM_CacheWriteBack</a> = 0x3U
<br/>
}</td></tr>
<tr class="memdesc:ga09096baa68dd9ae3de591d60f6011996"><td class="mdescLeft">&#160;</td><td class="mdescRight">LMEM cache mode options. <a href="group__lmem__cache.html#ga09096baa68dd9ae3de591d60f6011996">More...</a><br/></td></tr>
<tr class="separator:ga09096baa68dd9ae3de591d60f6011996"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6f44b818849af333fa61b68897e14c03"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#ga6f44b818849af333fa61b68897e14c03">lmem_cache_region_t</a> { <br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03ad74a9d9517cd0c6d862c3a1c14489e18">kLMEM_CacheRegion15</a> = 0U,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03a56bd9b2fe99926baff82935df81787cd">kLMEM_CacheRegion14</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03ae2c8c655a5c07d27d4fe70650923af5b">kLMEM_CacheRegion13</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03a832180ee865a178f0b640cb06d4650d0">kLMEM_CacheRegion12</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03a4b577a123c3d5e2b18577b05bd5e8beb">kLMEM_CacheRegion11</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03ab8406d7e02c4ba1d8cad30f3088f774e">kLMEM_CacheRegion10</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03aa403544c05bc15ae353def2bcd971ed0">kLMEM_CacheRegion9</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03a66100f2291290ba55d2640126bcac726">kLMEM_CacheRegion8</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03a88c1ae1c31a41e5d32a93b473dd3f78e">kLMEM_CacheRegion7</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03aec2370cd20f3c949e6c00322cb4b2f39">kLMEM_CacheRegion6</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03a2ade4fc2a2fd54cc56eb86fb99824fbe">kLMEM_CacheRegion5</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03a05f125c196a9d463595ec374434c28b9">kLMEM_CacheRegion4</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03a2b7d1f4f13cea7c270b800cb2750a40a">kLMEM_CacheRegion3</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03ac4cb8c10e4687c303875ec47eb6b8077">kLMEM_CacheRegion2</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03aa97121954dcdfe6578962fba835a9446">kLMEM_CacheRegion1</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga6f44b818849af333fa61b68897e14c03a8ad55d0c458ea05794481674cdee91f8">kLMEM_CacheRegion0</a>
<br/>
}</td></tr>
<tr class="memdesc:ga6f44b818849af333fa61b68897e14c03"><td class="mdescLeft">&#160;</td><td class="mdescRight">LMEM cache regions. <a href="group__lmem__cache.html#ga6f44b818849af333fa61b68897e14c03">More...</a><br/></td></tr>
<tr class="separator:ga6f44b818849af333fa61b68897e14c03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga43186bf9e2770c987a52838fbe727a7a"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#ga43186bf9e2770c987a52838fbe727a7a">lmem_cache_line_command_t</a> { <br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga43186bf9e2770c987a52838fbe727a7aaf10fa0c0605c816d948169575dcb0aeb">kLMEM_CacheLineSearchReadOrWrite</a> = 0U,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga43186bf9e2770c987a52838fbe727a7aaf3447098ecfdb6906516e874a7cdc443">kLMEM_CacheLineInvalidate</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga43186bf9e2770c987a52838fbe727a7aae35d06abf37513e3aad8a827db6b608b">kLMEM_CacheLinePush</a>,
<br/>
&#160;&#160;<a class="el" href="group__lmem__cache.html#gga43186bf9e2770c987a52838fbe727a7aaf4b898e3fc67d1fa137d018f3cac903f">kLMEM_CacheLineClear</a>
<br/>
}</td></tr>
<tr class="memdesc:ga43186bf9e2770c987a52838fbe727a7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">LMEM cache line command. <a href="group__lmem__cache.html#ga43186bf9e2770c987a52838fbe727a7a">More...</a><br/></td></tr>
<tr class="separator:ga43186bf9e2770c987a52838fbe727a7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Driver version</h2></td></tr>
<tr class="memitem:ga96be95568443eb9f88a9bbc7bf27e5e1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#ga96be95568443eb9f88a9bbc7bf27e5e1">FSL_LMEM_DRIVER_VERSION</a>&#160;&#160;&#160;(<a class="el" href="group__flash__driver.html#ga812138aa3315b0c6953c1a26130bcc37">MAKE_VERSION</a>(2, 0, 0))</td></tr>
<tr class="memdesc:ga96be95568443eb9f88a9bbc7bf27e5e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">LMEM controller driver version 2.0.0. <a href="#ga96be95568443eb9f88a9bbc7bf27e5e1">More...</a><br/></td></tr>
<tr class="separator:ga96be95568443eb9f88a9bbc7bf27e5e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Local Memory Processor Code Bus Cache Control</h2></td></tr>
<tr class="memitem:ga9fd3f219c41f48b2dcf83cb8c84ca5df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#ga9fd3f219c41f48b2dcf83cb8c84ca5df">LMEM_EnableCodeCache</a> (LMEM_Type *base, bool enable)</td></tr>
<tr class="memdesc:ga9fd3f219c41f48b2dcf83cb8c84ca5df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables/disables the processor code bus cache. <a href="#ga9fd3f219c41f48b2dcf83cb8c84ca5df">More...</a><br/></td></tr>
<tr class="separator:ga9fd3f219c41f48b2dcf83cb8c84ca5df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga181ac89141e61050cfc032efaf45b2c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#ga181ac89141e61050cfc032efaf45b2c2">LMEM_CodeCacheInvalidateAll</a> (LMEM_Type *base)</td></tr>
<tr class="memdesc:ga181ac89141e61050cfc032efaf45b2c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Invalidates the processor code bus cache. <a href="#ga181ac89141e61050cfc032efaf45b2c2">More...</a><br/></td></tr>
<tr class="separator:ga181ac89141e61050cfc032efaf45b2c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga230b22ba46c4d5c60ae37c9cc201b40d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#ga230b22ba46c4d5c60ae37c9cc201b40d">LMEM_CodeCachePushAll</a> (LMEM_Type *base)</td></tr>
<tr class="memdesc:ga230b22ba46c4d5c60ae37c9cc201b40d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pushes all modified lines in the processor code bus cache. <a href="#ga230b22ba46c4d5c60ae37c9cc201b40d">More...</a><br/></td></tr>
<tr class="separator:ga230b22ba46c4d5c60ae37c9cc201b40d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3768011d4d7ac9b228eae28fae8f8989"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#ga3768011d4d7ac9b228eae28fae8f8989">LMEM_CodeCacheClearAll</a> (LMEM_Type *base)</td></tr>
<tr class="memdesc:ga3768011d4d7ac9b228eae28fae8f8989"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the processor code bus cache. <a href="#ga3768011d4d7ac9b228eae28fae8f8989">More...</a><br/></td></tr>
<tr class="separator:ga3768011d4d7ac9b228eae28fae8f8989"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga750774c1b0e082ee3f405207941f7cf6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#ga750774c1b0e082ee3f405207941f7cf6">LMEM_CodeCacheInvalidateLine</a> (LMEM_Type *base, uint32_t address)</td></tr>
<tr class="memdesc:ga750774c1b0e082ee3f405207941f7cf6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Invalidates a specific line in the processor code bus cache. <a href="#ga750774c1b0e082ee3f405207941f7cf6">More...</a><br/></td></tr>
<tr class="separator:ga750774c1b0e082ee3f405207941f7cf6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab98f2c4473e833fbbf357ccffec3ff1f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#gab98f2c4473e833fbbf357ccffec3ff1f">LMEM_CodeCacheInvalidateMultiLines</a> (LMEM_Type *base, uint32_t address, uint32_t length)</td></tr>
<tr class="memdesc:gab98f2c4473e833fbbf357ccffec3ff1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Invalidates multiple lines in the processor code bus cache. <a href="#gab98f2c4473e833fbbf357ccffec3ff1f">More...</a><br/></td></tr>
<tr class="separator:gab98f2c4473e833fbbf357ccffec3ff1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5058349ee0774fc2af503986ea65e798"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#ga5058349ee0774fc2af503986ea65e798">LMEM_CodeCachePushLine</a> (LMEM_Type *base, uint32_t address)</td></tr>
<tr class="memdesc:ga5058349ee0774fc2af503986ea65e798"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pushes a specific modified line in the processor code bus cache. <a href="#ga5058349ee0774fc2af503986ea65e798">More...</a><br/></td></tr>
<tr class="separator:ga5058349ee0774fc2af503986ea65e798"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2c3d306975555463b581746b7fbfd86b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#ga2c3d306975555463b581746b7fbfd86b">LMEM_CodeCachePushMultiLines</a> (LMEM_Type *base, uint32_t address, uint32_t length)</td></tr>
<tr class="memdesc:ga2c3d306975555463b581746b7fbfd86b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pushes multiple modified lines in the processor code bus cache. <a href="#ga2c3d306975555463b581746b7fbfd86b">More...</a><br/></td></tr>
<tr class="separator:ga2c3d306975555463b581746b7fbfd86b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae90ade5b09656d898f5a3a1edec8864c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#gae90ade5b09656d898f5a3a1edec8864c">LMEM_CodeCacheClearLine</a> (LMEM_Type *base, uint32_t address)</td></tr>
<tr class="memdesc:gae90ade5b09656d898f5a3a1edec8864c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears a specific line in the processor code bus cache. <a href="#gae90ade5b09656d898f5a3a1edec8864c">More...</a><br/></td></tr>
<tr class="separator:gae90ade5b09656d898f5a3a1edec8864c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacabe403fb94aa540a676333355f85fc0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#gacabe403fb94aa540a676333355f85fc0">LMEM_CodeCacheClearMultiLines</a> (LMEM_Type *base, uint32_t address, uint32_t length)</td></tr>
<tr class="memdesc:gacabe403fb94aa540a676333355f85fc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears multiple lines in the processor code bus cache. <a href="#gacabe403fb94aa540a676333355f85fc0">More...</a><br/></td></tr>
<tr class="separator:gacabe403fb94aa540a676333355f85fc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8e2d695e7cd7c103eed501176e12770b"><td class="memItemLeft" align="right" valign="top">status_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__lmem__cache.html#ga8e2d695e7cd7c103eed501176e12770b">LMEM_CodeCacheDemoteRegion</a> (LMEM_Type *base, <a class="el" href="group__lmem__cache.html#ga6f44b818849af333fa61b68897e14c03">lmem_cache_region_t</a> region, <a class="el" href="group__lmem__cache.html#ga09096baa68dd9ae3de591d60f6011996">lmem_cache_mode_t</a> cacheMode)</td></tr>
<tr class="memdesc:ga8e2d695e7cd7c103eed501176e12770b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Demotes the cache mode of a region in processor code bus cache. <a href="#ga8e2d695e7cd7c103eed501176e12770b">More...</a><br/></td></tr>
<tr class="separator:ga8e2d695e7cd7c103eed501176e12770b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga96be95568443eb9f88a9bbc7bf27e5e1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FSL_LMEM_DRIVER_VERSION&#160;&#160;&#160;(<a class="el" href="group__flash__driver.html#ga812138aa3315b0c6953c1a26130bcc37">MAKE_VERSION</a>(2, 0, 0))</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="gab15785d98d8873207f708e46aab35306"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LMEM_CACHE_LINE_SIZE&#160;&#160;&#160;(0x10U)</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="ga915a068b47d97bfc70628571bc24e777"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LMEM_CACHE_SIZE_ONEWAY&#160;&#160;&#160;(4096U)</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga09096baa68dd9ae3de591d60f6011996"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group__lmem__cache.html#ga09096baa68dd9ae3de591d60f6011996">lmem_cache_mode_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga09096baa68dd9ae3de591d60f6011996a2fcebcb37f55c9d2c561cf329eb96626"></a>kLMEM_NonCacheable</em>&#160;</td><td class="fielddoc">
<p>CACHE mode: non-cacheable. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga09096baa68dd9ae3de591d60f6011996a8eb97a4de64ce57df954c0b9b0f4adef"></a>kLMEM_CacheWriteThrough</em>&#160;</td><td class="fielddoc">
<p>CACHE mode: write-through. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga09096baa68dd9ae3de591d60f6011996a112b9b26738baa2a1084f0c2ba3c58ba"></a>kLMEM_CacheWriteBack</em>&#160;</td><td class="fielddoc">
<p>CACHE mode: write-back. </p>
</td></tr>
</table>
</div>
</div>
<a class="anchor" id="ga6f44b818849af333fa61b68897e14c03"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group__lmem__cache.html#ga6f44b818849af333fa61b68897e14c03">lmem_cache_region_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03ad74a9d9517cd0c6d862c3a1c14489e18"></a>kLMEM_CacheRegion15</em>&#160;</td><td class="fielddoc">
<p>Cache Region 15. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03a56bd9b2fe99926baff82935df81787cd"></a>kLMEM_CacheRegion14</em>&#160;</td><td class="fielddoc">
<p>Cache Region 14. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03ae2c8c655a5c07d27d4fe70650923af5b"></a>kLMEM_CacheRegion13</em>&#160;</td><td class="fielddoc">
<p>Cache Region 13. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03a832180ee865a178f0b640cb06d4650d0"></a>kLMEM_CacheRegion12</em>&#160;</td><td class="fielddoc">
<p>Cache Region 12. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03a4b577a123c3d5e2b18577b05bd5e8beb"></a>kLMEM_CacheRegion11</em>&#160;</td><td class="fielddoc">
<p>Cache Region 11. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03ab8406d7e02c4ba1d8cad30f3088f774e"></a>kLMEM_CacheRegion10</em>&#160;</td><td class="fielddoc">
<p>Cache Region 10. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03aa403544c05bc15ae353def2bcd971ed0"></a>kLMEM_CacheRegion9</em>&#160;</td><td class="fielddoc">
<p>Cache Region 9. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03a66100f2291290ba55d2640126bcac726"></a>kLMEM_CacheRegion8</em>&#160;</td><td class="fielddoc">
<p>Cache Region 8. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03a88c1ae1c31a41e5d32a93b473dd3f78e"></a>kLMEM_CacheRegion7</em>&#160;</td><td class="fielddoc">
<p>Cache Region 7. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03aec2370cd20f3c949e6c00322cb4b2f39"></a>kLMEM_CacheRegion6</em>&#160;</td><td class="fielddoc">
<p>Cache Region 6. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03a2ade4fc2a2fd54cc56eb86fb99824fbe"></a>kLMEM_CacheRegion5</em>&#160;</td><td class="fielddoc">
<p>Cache Region 5. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03a05f125c196a9d463595ec374434c28b9"></a>kLMEM_CacheRegion4</em>&#160;</td><td class="fielddoc">
<p>Cache Region 4. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03a2b7d1f4f13cea7c270b800cb2750a40a"></a>kLMEM_CacheRegion3</em>&#160;</td><td class="fielddoc">
<p>Cache Region 3. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03ac4cb8c10e4687c303875ec47eb6b8077"></a>kLMEM_CacheRegion2</em>&#160;</td><td class="fielddoc">
<p>Cache Region 2. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03aa97121954dcdfe6578962fba835a9446"></a>kLMEM_CacheRegion1</em>&#160;</td><td class="fielddoc">
<p>Cache Region 1. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga6f44b818849af333fa61b68897e14c03a8ad55d0c458ea05794481674cdee91f8"></a>kLMEM_CacheRegion0</em>&#160;</td><td class="fielddoc">
<p>Cache Region 0. </p>
</td></tr>
</table>
</div>
</div>
<a class="anchor" id="ga43186bf9e2770c987a52838fbe727a7a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group__lmem__cache.html#ga43186bf9e2770c987a52838fbe727a7a">lmem_cache_line_command_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga43186bf9e2770c987a52838fbe727a7aaf10fa0c0605c816d948169575dcb0aeb"></a>kLMEM_CacheLineSearchReadOrWrite</em>&#160;</td><td class="fielddoc">
<p>Cache line search and read or write. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga43186bf9e2770c987a52838fbe727a7aaf3447098ecfdb6906516e874a7cdc443"></a>kLMEM_CacheLineInvalidate</em>&#160;</td><td class="fielddoc">
<p>Cache line invalidate. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga43186bf9e2770c987a52838fbe727a7aae35d06abf37513e3aad8a827db6b608b"></a>kLMEM_CacheLinePush</em>&#160;</td><td class="fielddoc">
<p>Cache line push. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga43186bf9e2770c987a52838fbe727a7aaf4b898e3fc67d1fa137d018f3cac903f"></a>kLMEM_CacheLineClear</em>&#160;</td><td class="fielddoc">
<p>Cache line clear. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga9fd3f219c41f48b2dcf83cb8c84ca5df"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LMEM_EnableCodeCache </td>
<td>(</td>
<td class="paramtype">LMEM_Type *&#160;</td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>enable</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function enables/disables the cache. The function first invalidates the entire cache and then enables/disable both the cache and write buffers.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>LMEM peripheral base address. </td></tr>
<tr><td class="paramname">enable</td><td>The enable or disable flag. true - enable the code cache. false - disable the code cache. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga181ac89141e61050cfc032efaf45b2c2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LMEM_CodeCacheInvalidateAll </td>
<td>(</td>
<td class="paramtype">LMEM_Type *&#160;</td>
<td class="paramname"><em>base</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function invalidates the cache both ways, which means that it unconditionally clears valid bits and modifies bits of a cache entry.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>LMEM peripheral base address. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga230b22ba46c4d5c60ae37c9cc201b40d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LMEM_CodeCachePushAll </td>
<td>(</td>
<td class="paramtype">LMEM_Type *&#160;</td>
<td class="paramname"><em>base</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function pushes all modified lines in both ways in the entire cache. It pushes a cache entry if it is valid and modified and clears the modified bit. If the entry is not valid or not modified, leave as is. This action does not clear the valid bit. A cache push is synonymous with a cache flush.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>LMEM peripheral base address. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga3768011d4d7ac9b228eae28fae8f8989"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LMEM_CodeCacheClearAll </td>
<td>(</td>
<td class="paramtype">LMEM_Type *&#160;</td>
<td class="paramname"><em>base</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function clears the entire cache and pushes (flushes) and invalidates the operation. Clear - Pushes a cache entry if it is valid and modified, then clears the valid and modified bits. If the entry is not valid or not modified, clear the valid bit.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>LMEM peripheral base address. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga750774c1b0e082ee3f405207941f7cf6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LMEM_CodeCacheInvalidateLine </td>
<td>(</td>
<td class="paramtype">LMEM_Type *&#160;</td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>address</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function invalidates a specific line in the cache based on the physical address passed in by the user. Invalidate - Unconditionally clears valid and modified bits of a cache entry.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>LMEM peripheral base address. </td></tr>
<tr><td class="paramname">address</td><td>The physical address of the cache line. Should be 16-byte aligned address. If not, it is changed to the 16-byte aligned memory address. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gab98f2c4473e833fbbf357ccffec3ff1f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LMEM_CodeCacheInvalidateMultiLines </td>
<td>(</td>
<td class="paramtype">LMEM_Type *&#160;</td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function invalidates multiple lines in the cache based on the physical address and length in bytes passed in by the user. If the function detects that the length meets or exceeds half the cache. Then the function performs an entire cache invalidate function, which is more efficient than invalidating the cache line-by-line. The need to check half the total amount of cache is due to the fact that the cache consists of two ways and that line commands based on the physical address searches both ways. Invalidate - Unconditionally clear valid and modified bits of a cache entry.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>LMEM peripheral base address. </td></tr>
<tr><td class="paramname">address</td><td>The physical address of the cache line. Should be 16-byte aligned address. If not, it is changed to the 16-byte aligned memory address. </td></tr>
<tr><td class="paramname">length</td><td>The length in bytes of the total amount of cache lines. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga5058349ee0774fc2af503986ea65e798"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LMEM_CodeCachePushLine </td>
<td>(</td>
<td class="paramtype">LMEM_Type *&#160;</td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>address</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function pushes a specific modified line based on the physical address passed in by the user. Push - Push a cache entry if it is valid and modified, then clear the modified bit. If the entry is not valid or not modified, leave as is. This action does not clear the valid bit. A cache push is synonymous with a cache flush.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>LMEM peripheral base address. </td></tr>
<tr><td class="paramname">address</td><td>The physical address of the cache line. Should be 16-byte aligned address. If not, it is changed to the 16-byte aligned memory address. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga2c3d306975555463b581746b7fbfd86b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LMEM_CodeCachePushMultiLines </td>
<td>(</td>
<td class="paramtype">LMEM_Type *&#160;</td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function pushes multiple modified lines in the cache based on the physical address and length in bytes passed in by the user. If the function detects that the length meets or exceeds half of the cache, the function performs an cache push function, which is more efficient than pushing the modified lines in the cache line-by-line. The need to check half the total amount of cache is due to the fact that the cache consists of two ways and that line commands based on the physical address searches both ways. Push - Push a cache entry if it is valid and modified, then clear the modified bit. If the entry is not valid or not modified, leave as is. This action does not clear the valid bit. A cache push is synonymous with a cache flush.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>LMEM peripheral base address. </td></tr>
<tr><td class="paramname">address</td><td>The physical address of the cache line. Should be 16-byte aligned address. If not, it is changed to the 16-byte aligned memory address. </td></tr>
<tr><td class="paramname">length</td><td>The length in bytes of the total amount of cache lines. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gae90ade5b09656d898f5a3a1edec8864c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LMEM_CodeCacheClearLine </td>
<td>(</td>
<td class="paramtype">LMEM_Type *&#160;</td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>address</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function clears a specific line based on the physical address passed in by the user. Clear - Push a cache entry if it is valid and modified, then clear the valid and modify bits. If entry not valid or not modified, clear the valid bit.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>LMEM peripheral base address. </td></tr>
<tr><td class="paramname">address</td><td>The physical address of the cache line. Should be 16-byte aligned address. If not, it is changed to the 16-byte aligned memory address. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gacabe403fb94aa540a676333355f85fc0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LMEM_CodeCacheClearMultiLines </td>
<td>(</td>
<td class="paramtype">LMEM_Type *&#160;</td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function clears multiple lines in the cache based on the physical address and length in bytes passed in by the user. If the function detects that the length meets or exceeds half the total amount of cache, the function performs a cache clear function which is more efficient than clearing the lines in the cache line-by-line. The need to check half the total amount of cache is due to the fact that the cache consists of two ways and that line commands based on the physical address searches both ways. Clear - Push a cache entry if it is valid and modified, then clear the valid and modify bits. If entry not valid or not modified, clear the valid bit.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>LMEM peripheral base address. </td></tr>
<tr><td class="paramname">address</td><td>The physical address of the cache line. Should be 16-byte aligned address. If not, it is changed to the 16-byte aligned memory address. </td></tr>
<tr><td class="paramname">length</td><td>The length in bytes of the total amount of cache lines. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga8e2d695e7cd7c103eed501176e12770b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">status_t LMEM_CodeCacheDemoteRegion </td>
<td>(</td>
<td class="paramtype">LMEM_Type *&#160;</td>
<td class="paramname"><em>base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__lmem__cache.html#ga6f44b818849af333fa61b68897e14c03">lmem_cache_region_t</a>&#160;</td>
<td class="paramname"><em>region</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__lmem__cache.html#ga09096baa68dd9ae3de591d60f6011996">lmem_cache_mode_t</a>&#160;</td>
<td class="paramname"><em>cacheMode</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function allows the user to demote the cache mode of a region within the device's memory map. Demoting the cache mode reduces the cache function applied to a memory region from write-back to write-through to non-cacheable. The function checks to see if the requested cache mode is higher than or equal to the current cache mode, and if so, returns an error. After a region is demoted, its cache mode can only be raised by a reset, which returns it to its default state which is the highest cache configure for each region. To maintain cache coherency, changes to the cache mode should be completed while the address space being changed is not being accessed or the cache is disabled. Before a cache mode change, this function completes a cache clear all command to push and invalidate any cache entries that may have changed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">base</td><td>LMEM peripheral base address. </td></tr>
<tr><td class="paramname">region</td><td>The desired region to demote of type lmem_cache_region_t. </td></tr>
<tr><td class="paramname">cacheMode</td><td>The new, demoted cache mode of type lmem_cache_mode_t. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The execution result. kStatus_Success The cache demote operation is successful. kStatus_Fail The cache demote operation is failure. </dd></dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul class="foot">
<li class="footer">&copy; 2016 NXP Semiconductors. All rights reserved.
</li>
</ul>
</div>
</body>
</html>