1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6<meta name="generator" content="Doxygen 1.8.13"/>
7<meta name="viewport" content="width=device-width, initial-scale=1"/>
8<title>ISSDK: boardkit/evk-mimxrt1170/evkmimxrt1170.c Source File</title>
9<link href="tabs.css" rel="stylesheet" type="text/css"/>
10<script type="text/javascript" src="jquery.js"></script>
11<script type="text/javascript" src="dynsections.js"></script>
12<link href="issdk_stylesheet.css" rel="stylesheet" type="text/css" />
13</head>
14<body>
15<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
16<div id="titlearea">
17<table cellspacing="0" cellpadding="0">
18 <tbody>
19 <tr style="height: 56px;">
20  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
21  <td id="projectalign" style="padding-left: 0.5em;">
22   <div id="projectname">ISSDK
23   &#160;<span id="projectnumber">1.8</span>
24   </div>
25   <div id="projectbrief">IoT Sensing Software Development Kit</div>
26  </td>
27 </tr>
28 </tbody>
29</table>
30</div>
31<!-- end header part -->
32<!-- Generated by Doxygen 1.8.13 -->
33<script type="text/javascript" src="menudata.js"></script>
34<script type="text/javascript" src="menu.js"></script>
35<script type="text/javascript">
36$(function() {
37  initMenu('',false,false,'search.php','Search');
38});
39</script>
40<div id="main-nav"></div>
41<div id="nav-path" class="navpath">
42  <ul>
43<li class="navelem"><a class="el" href="dir_6994211064bad48d3d63a6227f5100d6.html">boardkit</a></li><li class="navelem"><a class="el" href="dir_ca828fa6c7b8f5e58ad88cad4394b679.html">evk-mimxrt1170</a></li>  </ul>
44</div>
45</div><!-- top -->
46<div class="header">
47  <div class="headertitle">
48<div class="title">evkmimxrt1170.c</div>  </div>
49</div><!--header-->
50<div class="contents">
51<a href="a00749.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright 2020 NXP</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">/**</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * @file  evkmimxrt1170.c</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * @brief The  evkmimxrt1170.c file defines GPIO pins and I2C CMSIS utilities for  evkmimxrt1170 board.</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00752.html">evkmimxrt1170.h</a>&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * Execute the instrument to enter low power.</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> stop(<span class="keywordtype">void</span>)</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;{</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    SCB-&gt;SCR |= SCB_SCR_SLEEPDEEP_Msk;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    __asm(<span class="stringliteral">&quot;WFI&quot;</span>);</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;}</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">/*!</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> * @brief Configures the system to WAIT power mode.</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> *        API name used from Kinetis family to maintain compatibility.</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> * @param Power peripheral base address (dummy).</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment"> * @return Configuration error code.</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="a00749.html#a5423cac017d1d1a8ac8bba8e91e80e29">   31</a></span>&#160;status_t <a class="code" href="a00749.html#a5423cac017d1d1a8ac8bba8e91e80e29">SMC_SetPowerModeWait</a>(<span class="keywordtype">void</span> *arg)</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;{</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    CLOCK_SetMode(kCLOCK_ModeWait);</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    stop();</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keywordflow">return</span> kStatus_Success;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;}</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="comment">/*!</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="comment"> * @brief Configures the system to VLPR power mode.</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="comment"> *        API name used from Kinetis family to maintain compatibility.</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="comment"> * @param Power peripheral base address (dummy).</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="comment"> * @return Configuration error code.</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="a00749.html#a82cb114bb9a5ea2f235a0216709d70f8">   46</a></span>&#160;status_t <a class="code" href="a00749.html#a82cb114bb9a5ea2f235a0216709d70f8">SMC_SetPowerModeVlpr</a>(<span class="keywordtype">void</span> *arg)</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;{</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    CLOCK_SetMode(kCLOCK_ModeWait);</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    stop();</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordflow">return</span> kStatus_Success;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;}</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="comment">/*! @brief       Determines the Clock Frequency feature.</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="comment"> *  @details     The Clock Frequecny computation API required by fsl_uart_cmsis.c.</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="comment"> *  @param[in]   void</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="comment"> *  @Constraints None</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="comment"> *  @Reentrant   Yes</span></div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="comment"> *  @return      uint32_t Returns the clock frequency .</span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="a00749.html#aa95b4db5f83f44dfffb28b2789908f15">   61</a></span>&#160;uint32_t <a class="code" href="a00749.html#aa95b4db5f83f44dfffb28b2789908f15">LPUART1_GetFreq</a>(<span class="keywordtype">void</span>)</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;{</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="a04139.html#a921b59b97132dd599e078cf5f24be833">BOARD_DebugConsoleSrcFreq</a>();</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;}</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="comment">/*! @brief       Determines the Clock Frequency feature.</span></div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="comment"> *  @details     The Clock Frequecny computation API required by fsl_i2c_cmsis.c.</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="comment"> *  @param[in]   void</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="comment"> *  @Constraints None</span></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="comment"> *  @Reentrant   Yes</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="comment"> *  @return      uint32_t Returns the clock frequency .</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="a00749.html#a7e9a78d0068cb0ce85db008ec5f42462">   73</a></span>&#160;uint32_t <a class="code" href="a00749.html#a7e9a78d0068cb0ce85db008ec5f42462">LPI2C1_GetFreq</a>(<span class="keywordtype">void</span>)</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;{</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="keywordflow">return</span> CLOCK_GetFreq(kCLOCK_OscRc48MDiv2);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;}</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="comment">/*! @brief       Determines the Clock Frequency feature.</span></div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="comment"> *  @details     The Clock Frequecny computation API required by fsl_spi_cmsis.c.</span></div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="comment"> *  @param[in]   void</span></div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="comment"> *  @Constraints None</span></div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="comment"> *  @Reentrant   Yes</span></div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="comment"> *  @return      uint32_t Returns the clock frequency .</span></div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="a00749.html#a0826d440ab9ef70e60c080c51e246665">   85</a></span>&#160;uint32_t <a class="code" href="a00749.html#a0826d440ab9ef70e60c080c51e246665">LPSPI1_GetFreq</a>(<span class="keywordtype">void</span>)</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;{</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keywordflow">return</span> CLOCK_GetFreqFromObs(CCM_OBS_LPSPI1_CLK_ROOT);</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;}</div><div class="ttc" id="a00749_html_a0826d440ab9ef70e60c080c51e246665"><div class="ttname"><a href="a00749.html#a0826d440ab9ef70e60c080c51e246665">LPSPI1_GetFreq</a></div><div class="ttdeci">uint32_t LPSPI1_GetFreq(void)</div><div class="ttdoc">Determines the Clock Frequency feature. </div><div class="ttdef"><b>Definition:</b> <a href="a00749_source.html#l00085">evkmimxrt1170.c:85</a></div></div>
52<div class="ttc" id="a00749_html_a5423cac017d1d1a8ac8bba8e91e80e29"><div class="ttname"><a href="a00749.html#a5423cac017d1d1a8ac8bba8e91e80e29">SMC_SetPowerModeWait</a></div><div class="ttdeci">status_t SMC_SetPowerModeWait(void *arg)</div><div class="ttdoc">Configures the system to WAIT power mode. API name used from Kinetis family to maintain compatibility...</div><div class="ttdef"><b>Definition:</b> <a href="a00749_source.html#l00031">evkmimxrt1170.c:31</a></div></div>
53<div class="ttc" id="a00749_html_a7e9a78d0068cb0ce85db008ec5f42462"><div class="ttname"><a href="a00749.html#a7e9a78d0068cb0ce85db008ec5f42462">LPI2C1_GetFreq</a></div><div class="ttdeci">uint32_t LPI2C1_GetFreq(void)</div><div class="ttdoc">Determines the Clock Frequency feature. </div><div class="ttdef"><b>Definition:</b> <a href="a00749_source.html#l00073">evkmimxrt1170.c:73</a></div></div>
54<div class="ttc" id="a04139_html_a921b59b97132dd599e078cf5f24be833"><div class="ttname"><a href="a04139.html#a921b59b97132dd599e078cf5f24be833">BOARD_DebugConsoleSrcFreq</a></div><div class="ttdeci">uint32_t BOARD_DebugConsoleSrcFreq(void)</div><div class="ttdef"><b>Definition:</b> <a href="a04139_source.html#l00025">board.c:25</a></div></div>
55<div class="ttc" id="a00752_html"><div class="ttname"><a href="a00752.html">evkmimxrt1170.h</a></div><div class="ttdoc">The evkmimxrt1170.h file defines GPIO pin mappings for evkmimxrt1170 board. </div></div>
56<div class="ttc" id="a00749_html_a82cb114bb9a5ea2f235a0216709d70f8"><div class="ttname"><a href="a00749.html#a82cb114bb9a5ea2f235a0216709d70f8">SMC_SetPowerModeVlpr</a></div><div class="ttdeci">status_t SMC_SetPowerModeVlpr(void *arg)</div><div class="ttdoc">Configures the system to VLPR power mode. API name used from Kinetis family to maintain compatibility...</div><div class="ttdef"><b>Definition:</b> <a href="a00749_source.html#l00046">evkmimxrt1170.c:46</a></div></div>
57<div class="ttc" id="a00749_html_aa95b4db5f83f44dfffb28b2789908f15"><div class="ttname"><a href="a00749.html#aa95b4db5f83f44dfffb28b2789908f15">LPUART1_GetFreq</a></div><div class="ttdeci">uint32_t LPUART1_GetFreq(void)</div><div class="ttdoc">Determines the Clock Frequency feature. </div><div class="ttdef"><b>Definition:</b> <a href="a00749_source.html#l00061">evkmimxrt1170.c:61</a></div></div>
58</div><!-- fragment --></div><!-- contents -->
59
60<hr class="footer"/><address class="footer"><small>
61&copy; Copyright 2016-2022 NXP. All Rights Reserved. SPDX-License-Identifier: BSD-3-Clause
62</small></address>
63</body>
64</html>
65